233
234
235
236
237
238
239
240
241
242
243
244
245
246
|
const char *zPidKey; /* Saved value of the --usepidkey option. Only
* 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 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 */
|
>
|
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
|
const char *zPidKey; /* Saved value of the --usepidkey option. Only
* 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 */
|
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
|
}
}
fossil_warning("%s", blob_str(&msg));
blob_reset(&msg);
}
/*
** Initialize the g.comFmtFlags global variable.
**
** Global command-line options --comfmtflags or --comment-format can be
** used for this. However, those command-line options are undocumented
** and deprecated. They are here for backwards compatibility only.
*/
static void fossil_init_flags_from_options(void){
const char *zValue = find_option("comfmtflags", 0, 1);
if( zValue==0 ){
zValue = find_option("comment-format", 0, 1);
}
if( zValue ){
g.comFmtFlags = atoi(zValue);
}else{
g.comFmtFlags = COMMENT_PRINT_UNSET; /* Command-line option not found. */
}
}
/*
** 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.
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
|
}
}
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).
*/
static void fossil_init_flags_from_options(void){
char *zEnvVar;
const char *zValue = find_option("comfmtflags", 0, 1);
if( zValue==0 ){
zValue = find_option("comment-format", 0, 1);
}
if( zValue ){
g.comFmtFlags = atoi(zValue);
}else{
g.comFmtFlags = COMMENT_PRINT_UNSET; /* Command-line option not found. */
}
g.colorOutput = COLOR_VT_UNSET;
zValue = find_option("color", 0, 1);
if( zValue ){
if( fossil_strcmp(zValue,"never")==0 ){
g.colorOutput = COLOR_VT_NEVER;
}
else if( fossil_strcmp(zValue,"always")==0 ){
g.colorOutput = COLOR_VT_ALWAYS;
}
else if( fossil_strcmp(zValue,"auto")==0 ){
g.colorOutput = COLOR_VT_AUTO;
}else{
fossil_fatal("the --color option must be 'never', 'always', or 'auto'");
}
}
if( g.colorOutput==COLOR_VT_UNSET ){
zEnvVar = fossil_getenv("NO_COLOR");
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.
|