Diff
Not logged in

Differences From Artifact [4c98087550]:

To Artifact [34122c7954]:


195
196
197
198
199
200
201



202
203
204
205
206
207
208
  const char *azAuxName[MX_AUX]; /* Name of each aux() or option() value */
  char *azAuxParam[MX_AUX];      /* Param of each aux() or option() value */
  const char *azAuxVal[MX_AUX];  /* Value of each aux() or option() value */
  const char **azAuxOpt[MX_AUX]; /* Options of each option() value */
  int anAuxCols[MX_AUX];         /* Number of columns for option() values */

  int allowSymlinks;             /* Cached "allow-symlinks" option */




#ifdef FOSSIL_ENABLE_JSON
  struct FossilJsonBits {
    int isJsonMode;            /* True if running in JSON mode, else
                                  false. This changes how errors are
                                  reported. In JSON mode we try to
                                  always output JSON-form error







>
>
>







195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
  const char *azAuxName[MX_AUX]; /* Name of each aux() or option() value */
  char *azAuxParam[MX_AUX];      /* Param of each aux() or option() value */
  const char *azAuxVal[MX_AUX];  /* Value of each aux() or option() value */
  const char **azAuxOpt[MX_AUX]; /* Options of each option() value */
  int anAuxCols[MX_AUX];         /* Number of columns for option() values */

  int allowSymlinks;             /* Cached "allow-symlinks" option */
#ifdef _WIN32
  int isNT;
#endif

#ifdef FOSSIL_ENABLE_JSON
  struct FossilJsonBits {
    int isJsonMode;            /* True if running in JSON mode, else
                                  false. This changes how errors are
                                  reported. In JSON mode we try to
                                  always output JSON-form error
551
552
553
554
555
556
557



558
559
560





561
562
563
564
565
566
567
** This procedure runs first.
*/
int main(int argc, char **argv)
{
  const char *zCmdName = "unknown";
  int idx;
  int rc;




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





  g.now = time(0);
#ifdef FOSSIL_ENABLE_JSON
#if defined(NDEBUG)
  g.json.errorDetailParanoia = 2 /* FIXME: make configurable
                                    One problem we have here is that this
                                    code is needed before the db is opened,
                                    so we can't sql for it.*/;







>
>
>



>
>
>
>
>







554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
** This procedure runs first.
*/
int main(int argc, char **argv)
{
  const char *zCmdName = "unknown";
  int idx;
  int rc;
#ifdef _WIN32
  OSVERSIONINFOA sInfo;
#endif

  sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
  memset(&g, 0, sizeof(g));
#ifdef _WIN32
  sInfo.dwOSVersionInfoSize = sizeof(sInfo);
  GetVersionExA(&sInfo);
  g.isNT = sInfo.dwPlatformId==VER_PLATFORM_WIN32_NT;
#endif
  g.now = time(0);
#ifdef FOSSIL_ENABLE_JSON
#if defined(NDEBUG)
  g.json.errorDetailParanoia = 2 /* FIXME: make configurable
                                    One problem we have here is that this
                                    code is needed before the db is opened,
                                    so we can't sql for it.*/;
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
*/
int fossil_system(const char *zOrigCmd){
  int rc;
#if defined(_WIN32)
  /* On windows NT, we have to put double-quotes around the entire command.
  ** Who knows why - this is just the way windows works.
  */
  OSVERSIONINFOA sInfo;
  char *zNewCmd;
  TCHAR *zMbcs;

  sInfo.dwOSVersionInfoSize = sizeof(sInfo);
  GetVersionExA(&sInfo);
  if (sInfo.dwPlatformId==VER_PLATFORM_WIN32_NT) {
    zNewCmd = mprintf("\"%s\"", zOrigCmd);
  } else {
    zNewCmd = mprintf("%s", zOrigCmd);
  }
  zMbcs = fossil_utf8_to_mbcs(zNewCmd);
  if( g.fSystemTrace ) {
    char *zOut = mprintf("SYSTEM: %s\n", zNewCmd);







<



<
<
|







839
840
841
842
843
844
845

846
847
848


849
850
851
852
853
854
855
856
*/
int fossil_system(const char *zOrigCmd){
  int rc;
#if defined(_WIN32)
  /* On windows NT, we have to put double-quotes around the entire command.
  ** Who knows why - this is just the way windows works.
  */

  char *zNewCmd;
  TCHAR *zMbcs;



  if (g.isNT) {
    zNewCmd = mprintf("\"%s\"", zOrigCmd);
  } else {
    zNewCmd = mprintf("%s", zOrigCmd);
  }
  zMbcs = fossil_utf8_to_mbcs(zNewCmd);
  if( g.fSystemTrace ) {
    char *zOut = mprintf("SYSTEM: %s\n", zNewCmd);