Diff
Not logged in

Differences From Artifact [08d8d9df09]:

To Artifact [fbabf4b6dc]:


34
35
36
37
38
39
40






41
42
43
44
45
46
47
#  include "cson_amalgamation.h" /* JSON API. Needed inside the INTERFACE block! */
#  include "json_detail.h"
#endif
#ifdef FOSSIL_ENABLE_TCL
#include "tcl.h"
#endif







/*
** Number of elements in an array
*/
#define count(X)  (sizeof(X)/sizeof(X[0]))

/*
** Size of a UUID in characters







>
>
>
>
>
>







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#  include "cson_amalgamation.h" /* JSON API. Needed inside the INTERFACE block! */
#  include "json_detail.h"
#endif
#ifdef FOSSIL_ENABLE_TCL
#include "tcl.h"
#endif

#if !defined(_WIN32)
# define fossil_unicode_to_utf8 fossil_mbcs_to_utf8
# define wchar_t char
# define wmain main
#endif

/*
** Number of elements in an array
*/
#define count(X)  (sizeof(X)/sizeof(X[0]))

/*
** Size of a UUID in characters
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
  char *z;            /* General use string pointer */
  char **newArgv;     /* New expanded g.argv under construction */
  char const * zFileName;   /* input file name */
  FILE * zInFile;           /* input FILE */

  g.argc = argc;
  g.argv = argv;
#if defined(_WIN32) && defined(UNICODE)
  for(i=0; i<g.argc; i++) g.argv[i] = fossil_unicode_to_utf8(g.argv[i]);
#else
  for(i=0; i<g.argc; i++) g.argv[i] = fossil_mbcs_to_utf8(g.argv[i]);
#endif
  for(i=1; i<g.argc-1; i++){
    z = g.argv[i];
    if( z[0]!='-' ) continue;
    z++;
    if( z[0]=='-' ) z++;
    if( z[0]==0 ) return;   /* Stop searching at "--" */
    if( fossil_strcmp(z, "args")==0 ) break;







<

<
<
<







356
357
358
359
360
361
362

363



364
365
366
367
368
369
370
  char *z;            /* General use string pointer */
  char **newArgv;     /* New expanded g.argv under construction */
  char const * zFileName;   /* input file name */
  FILE * zInFile;           /* input FILE */

  g.argc = argc;
  g.argv = argv;

  for(i=0; i<g.argc; i++) g.argv[i] = fossil_unicode_to_utf8(g.argv[i]);



  for(i=1; i<g.argc-1; i++){
    z = g.argv[i];
    if( z[0]!='-' ) continue;
    z++;
    if( z[0]=='-' ) z++;
    if( z[0]==0 ) return;   /* Stop searching at "--" */
    if( fossil_strcmp(z, "args")==0 ) break;
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
  g.argc = j;
  g.argv = newArgv;
}

/*
** This procedure runs first.
*/
#if defined(_WIN32) && defined(UNICODE)
int wmain(int argc, char **argv)
#else
int main(int argc, char **argv)
#endif
{
  const char *zCmdName = "unknown";
  int idx;
  int rc;

  sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
  memset(&g, 0, sizeof(g));







<
|
<
<
<







414
415
416
417
418
419
420

421



422
423
424
425
426
427
428
  g.argc = j;
  g.argv = newArgv;
}

/*
** This procedure runs first.
*/

int wmain(int argc, wchar_t **argv)



{
  const char *zCmdName = "unknown";
  int idx;
  int rc;

  sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
  memset(&g, 0, sizeof(g));