Fossil

Check-in [b41c57d5c8]
Login

Check-in [b41c57d5c8]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:PATH_MAX -> MAX_PATH
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | ticket-c8c0b78c84
Files: files | file ages | folders
SHA1: b41c57d5c82aa49365391583d9ca1905855a9ae0
User & Date: jan.nijtmans 2012-08-30 22:02:35.311
Context
2012-08-31
19:47
Improved handling of command-line arguments under windows. Possible fix for ticket [c8c0b78c84]. ... (check-in: 0c7ae64ab5 user: drh tags: trunk)
2012-08-30
22:02
PATH_MAX -> MAX_PATH ... (Closed-Leaf check-in: b41c57d5c8 user: jan.nijtmans tags: ticket-c8c0b78c84)
09:21
... and teach popen how to handle non-mbcs characters ... (check-in: 7d842b654b user: jan.nijtmans tags: ticket-c8c0b78c84)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
  int n;                    /* Number of bytes in one line */
  char *z;            /* General use string pointer */
  char **newArgv;     /* New expanded g.argv under construction */
  char const * zFileName;   /* input file name */
  FILE * zInFile;           /* input FILE */
  int foundBom = -1;        /* -1= not searched yet, 0 = no; 1=yes */
#ifdef _WIN32
  wchar_t buf[PATH_MAX];
#endif

  g.argc = argc;
  g.argv = argv;
#ifdef _WIN32
  GetModuleFileNameW(NULL, buf, PATH_MAX);
  g.argv[0] = fossil_unicode_to_utf8(buf);
  for(i=1; 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++;







|





|







351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
  int n;                    /* Number of bytes in one line */
  char *z;            /* General use string pointer */
  char **newArgv;     /* New expanded g.argv under construction */
  char const * zFileName;   /* input file name */
  FILE * zInFile;           /* input FILE */
  int foundBom = -1;        /* -1= not searched yet, 0 = no; 1=yes */
#ifdef _WIN32
  wchar_t buf[MAX_PATH];
#endif

  g.argc = argc;
  g.argv = argv;
#ifdef _WIN32
  GetModuleFileNameW(NULL, buf, MAX_PATH);
  g.argv[0] = fossil_unicode_to_utf8(buf);
  for(i=1; 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++;