Fossil

Diff
Login

Differences From Artifact [c309f7516f]:

To Artifact [e8907f14c0]:


234
235
236
237
238
239
240

241
242
243
244
245
246
247
                           * applicable when using SEE on Windows or Linux. */
#endif
  int useLocalauth;       /* No login required if from 127.0.0.1 */
  int noPswd;             /* Logged in without password (on 127.0.0.1) */
  int userUid;            /* Integer user id */
  int isHuman;            /* True if access by a human, not a spider or bot */
  int colorOutput;        /* Control output of color VT escapes to CLI */

  int comFmtFlags;        /* Zero or more "COMMENT_PRINT_*" bit flags, should be
                          ** accessed through get_comment_format(). */
  const char *zSockName;  /* Name of the unix-domain socket file */
  const char *zSockMode;  /* File permissions for unix-domain socket */
  const char *zSockOwner; /* Owner, or owner:group for unix-domain socket */

  /* Information used to populate the RCVFROM table */







>







234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
                           * applicable when using SEE on Windows or Linux. */
#endif
  int useLocalauth;       /* No login required if from 127.0.0.1 */
  int noPswd;             /* Logged in without password (on 127.0.0.1) */
  int userUid;            /* Integer user id */
  int isHuman;            /* True if access by a human, not a spider or bot */
  int colorOutput;        /* Control output of color VT escapes to CLI */
  const char *cliColor;   /* VT color code for CLI highlight; default: "91" */
  int comFmtFlags;        /* Zero or more "COMMENT_PRINT_*" bit flags, should be
                          ** accessed through get_comment_format(). */
  const char *zSockName;  /* Name of the unix-domain socket file */
  const char *zSockMode;  /* File permissions for unix-domain socket */
  const char *zSockOwner; /* Owner, or owner:group for unix-domain socket */

  /* Information used to populate the RCVFROM table */
639
640
641
642
643
644
645

646
647
648
649
650
651
652
  }
  fossil_warning("%s", blob_str(&msg));
  blob_reset(&msg);
}

/*
** Initialize the g.comFmtFlags and g.colorOutput global variables.

**
** The global command-line options --comfmtflags or --comment-format to
** set the comment format are undocumented and deprecated, and are only
** for backwards compatibility.
**
** If the --color option isn't found, the NO_COLOR environment variable
** may disable colored output (but is otherwise trumped by the option).







>







640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
  }
  fossil_warning("%s", blob_str(&msg));
  blob_reset(&msg);
}

/*
** Initialize the g.comFmtFlags and g.colorOutput global variables.
** Also read the environment variable FOSSIL_COLOR into g.cliColor.
**
** The global command-line options --comfmtflags or --comment-format to
** set the comment format are undocumented and deprecated, and are only
** for backwards compatibility.
**
** If the --color option isn't found, the NO_COLOR environment variable
** may disable colored output (but is otherwise trumped by the option).
682
683
684
685
686
687
688
















689
690
691
692
693
694
695
    if( zEnvVar ){
      if( is_false(zEnvVar) ){
        g.colorOutput = COLOR_VT_NEVER;
      }
      fossil_path_free(zEnvVar);
    }
  }
















}

/*
** Check to see if the Fossil binary contains an appended repository
** file using the appendvfs extension.  If so, change command-line arguments
** to cause Fossil to launch with "fossil ui" on that repo.
*/







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
    if( zEnvVar ){
      if( is_false(zEnvVar) ){
        g.colorOutput = COLOR_VT_NEVER;
      }
      fossil_path_free(zEnvVar);
    }
  }
  g.cliColor = "\033[91m";
  zEnvVar = fossil_getenv("FOSSIL_COLOR");
  if( zEnvVar ){
    if( fossil_strcmp(zEnvVar,"none")==0 &&
        g.colorOutput==COLOR_VT_UNSET ){
      g.colorOutput = COLOR_VT_NEVER;
    }else{
      int i, fValid = 1;
      /* Rudimentary sanity check: only allow digits and semicolon. */
      for( i=0; zEnvVar[i]; i++ ){
        if( !strchr("0123456789;",zEnvVar[i]) ) fValid = 0;
      }
      if( fValid ) g.cliColor = mprintf("\033[%sm",zEnvVar);
    }
    fossil_path_free(zEnvVar);
  }
}

/*
** Check to see if the Fossil binary contains an appended repository
** file using the appendvfs extension.  If so, change command-line arguments
** to cause Fossil to launch with "fossil ui" on that repo.
*/