381
382
383
384
385
386
387
388
389
390
391
392
393
394
|
free(p);
}
void *fossil_realloc(void *p, size_t n){
p = realloc(p, n);
if( p==0 ) fossil_panic("out of memory");
return p;
}
/*
** Return a name for an SQLite error code
*/
static const char *sqlite_error_code_name(int iCode){
static char zCode[30];
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
|
free(p);
}
void *fossil_realloc(void *p, size_t n){
p = realloc(p, n);
if( p==0 ) fossil_panic("out of memory");
return p;
}
/*
** This function implements a cross-platform "system()" interface.
*/
int fossil_system(const char *zOrigCmd){
int rc;
#if defined(_WIN32)
/* On windows, we have to put double-quotes around the entire command.
** Who knows why - this is just the way windows works.
*/
char *zNewCmd = mprintf("\"%s\"", zOrigCmd);
rc = system(zNewCmd);
free(zNewCmd);
#else
/* On unix, evaluate the command directly.
*/
rc = system(zOrigCmd);
#endif
return rc;
}
/*
** Return a name for an SQLite error code
*/
static const char *sqlite_error_code_name(int iCode){
static char zCode[30];
|