Moved sm_memtable files in sqlite extension to sdk directory (to be consistent with topmenus) Some extension source files had an incorrect extension name in their headers --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402037
		
			
				
	
	
		
			39 lines
		
	
	
		
			825 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			825 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /**
 | |
|  * vim: set ts=4 :
 | |
|  * ======================================================
 | |
|  * Metamod:Source Stub Plugin
 | |
|  * Written by AlliedModders LLC.
 | |
|  * ======================================================
 | |
|  *
 | |
|  * This software is provided 'as-is', without any express or implied warranty.
 | |
|  * In no event will the authors be held liable for any damages arising from 
 | |
|  * the use of this software.
 | |
|  *
 | |
|  * This stub plugin is public domain.
 | |
|  *
 | |
|  * Version: $Id$
 | |
|  */
 | |
| 
 | |
| #include <stdio.h>
 | |
| #include <stdarg.h>
 | |
| #include "stub_util.h"
 | |
| 
 | |
| size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...)
 | |
| {
 | |
| 	va_list ap;
 | |
| 
 | |
| 	va_start(ap, fmt);
 | |
| 	size_t len = vsnprintf(buffer, maxlength, fmt, ap);
 | |
| 	va_end(ap);
 | |
| 
 | |
| 	if (len >= maxlength)
 | |
| 	{
 | |
| 		len = maxlength - 1;
 | |
| 		buffer[len] = '\0';
 | |
| 	}
 | |
| 
 | |
| 	return len;
 | |
| }
 | |
| 
 | |
| 
 |