mirror of
				https://github.com/sqlite/sqlite.git
				synced 2025-11-03 16:53:36 +03:00 
			
		
		
		
	Misc cleanup. Notes on compiling for Win95. (CVS 152)
FossilOrigin-Name: 3f0f1fa1fce794d1661c845f1a63a8d744892c25
This commit is contained in:
		
							
								
								
									
										16
									
								
								src/util.c
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								src/util.c
									
									
									
									
									
								
							@@ -26,15 +26,18 @@
 | 
			
		||||
** This file contains functions for allocating memory, comparing
 | 
			
		||||
** strings, and stuff like that.
 | 
			
		||||
**
 | 
			
		||||
** $Id: util.c,v 1.15 2000/09/14 01:21:10 drh Exp $
 | 
			
		||||
** $Id: util.c,v 1.16 2000/10/11 19:28:52 drh Exp $
 | 
			
		||||
*/
 | 
			
		||||
#include "sqliteInt.h"
 | 
			
		||||
#include <stdarg.h>
 | 
			
		||||
#include <ctype.h>
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** If MEMORY_DEBUG is defined, then use versions of malloc() and
 | 
			
		||||
** free() that track memory usage and check for buffer overruns.
 | 
			
		||||
*/
 | 
			
		||||
#ifdef MEMORY_DEBUG
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Allocate new memory and set it to zero.  Return NULL if
 | 
			
		||||
** no memory is available.
 | 
			
		||||
@@ -164,9 +167,14 @@ char *sqliteStrNDup_(const char *z, int n, char *zFile, int line){
 | 
			
		||||
  }
 | 
			
		||||
  return zNew;
 | 
			
		||||
}
 | 
			
		||||
#endif /* MEMORY_DEBUG */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** The following versions of malloc() and free() are for use in a
 | 
			
		||||
** normal build.
 | 
			
		||||
*/
 | 
			
		||||
#if !defined(MEMORY_DEBUG)
 | 
			
		||||
 | 
			
		||||
#else  /* !defined(MEMORY_DEBUG) */
 | 
			
		||||
/*
 | 
			
		||||
** Allocate new memory and set it to zero.  Return NULL if
 | 
			
		||||
** no memory is available.
 | 
			
		||||
@@ -219,7 +227,7 @@ char *sqliteStrNDup(const char *z, int n){
 | 
			
		||||
  }
 | 
			
		||||
  return zNew;
 | 
			
		||||
}
 | 
			
		||||
#endif /* MEMORY_DEBUG */
 | 
			
		||||
#endif /* !defined(MEMORY_DEBUG) */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Create a string from the 2nd and subsequent arguments (up to the
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user