mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-27 07:58:07 -04:00
main/client: replace some uses of printf() with puts() in print_usage()
FOOT_DEFAULT_TERM is a string literal passed as a -D argument to the compiler, so it can just be concatenated with the other string literals, instead of being formatted with printf().
This commit is contained in:
parent
ed0ef4bb1d
commit
537cd9b367
2 changed files with 28 additions and 27 deletions
15
client.c
15
client.c
|
|
@ -54,11 +54,9 @@ version_and_features(void)
|
||||||
static void
|
static void
|
||||||
print_usage(const char *prog_name)
|
print_usage(const char *prog_name)
|
||||||
{
|
{
|
||||||
printf("Usage: %s [OPTIONS...]\n", prog_name);
|
static const char options[] =
|
||||||
printf("Usage: %s [OPTIONS...] command [ARGS...]\n", prog_name);
|
"\nOptions:\n"
|
||||||
printf("\n");
|
" -t,--term=TERM value to set the environment variable TERM to (" FOOT_DEFAULT_TERM ")\n"
|
||||||
printf("Options:\n");
|
|
||||||
printf(" -t,--term=TERM value to set the environment variable TERM to (%s)\n"
|
|
||||||
" -T,--title=TITLE initial window title (foot)\n"
|
" -T,--title=TITLE initial window title (foot)\n"
|
||||||
" -a,--app-id=ID window application ID (foot)\n"
|
" -a,--app-id=ID window application ID (foot)\n"
|
||||||
" -w,--window-size-pixels=WIDTHxHEIGHT initial width and height, in pixels\n"
|
" -w,--window-size-pixels=WIDTHxHEIGHT initial width and height, in pixels\n"
|
||||||
|
|
@ -73,8 +71,11 @@ print_usage(const char *prog_name)
|
||||||
" -o,--override=[section.]key=value override configuration option\n"
|
" -o,--override=[section.]key=value override configuration option\n"
|
||||||
" -d,--log-level={info|warning|error|none} log level (info)\n"
|
" -d,--log-level={info|warning|error|none} log level (info)\n"
|
||||||
" -l,--log-colorize=[{never|always|auto}] enable/disable colorization of log output on stderr\n"
|
" -l,--log-colorize=[{never|always|auto}] enable/disable colorization of log output on stderr\n"
|
||||||
" -v,--version show the version number and quit\n",
|
" -v,--version show the version number and quit\n";
|
||||||
FOOT_DEFAULT_TERM);
|
|
||||||
|
printf("Usage: %s [OPTIONS...]\n", prog_name);
|
||||||
|
printf("Usage: %s [OPTIONS...] command [ARGS...]\n", prog_name);
|
||||||
|
puts(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool NOINLINE
|
static bool NOINLINE
|
||||||
|
|
|
||||||
16
main.c
16
main.c
|
|
@ -56,16 +56,13 @@ version_and_features(void)
|
||||||
static void
|
static void
|
||||||
print_usage(const char *prog_name)
|
print_usage(const char *prog_name)
|
||||||
{
|
{
|
||||||
printf(
|
static const char options[] =
|
||||||
"Usage: %s [OPTIONS...]\n"
|
"\nOptions:\n"
|
||||||
"Usage: %s [OPTIONS...] command [ARGS...]\n"
|
|
||||||
"\n"
|
|
||||||
"Options:\n"
|
|
||||||
" -c,--config=PATH load configuration from PATH ($XDG_CONFIG_HOME/foot/foot.ini)\n"
|
" -c,--config=PATH load configuration from PATH ($XDG_CONFIG_HOME/foot/foot.ini)\n"
|
||||||
" -C,--check-config verify configuration, exit with 0 if ok, otherwise exit with 1\n"
|
" -C,--check-config verify configuration, exit with 0 if ok, otherwise exit with 1\n"
|
||||||
" -o,--override=[section.]key=value override configuration option\n"
|
" -o,--override=[section.]key=value override configuration option\n"
|
||||||
" -f,--font=FONT comma separated list of fonts in fontconfig format (monospace)\n"
|
" -f,--font=FONT comma separated list of fonts in fontconfig format (monospace)\n"
|
||||||
" -t,--term=TERM value to set the environment variable TERM to (%s)\n"
|
" -t,--term=TERM value to set the environment variable TERM to (" FOOT_DEFAULT_TERM ")\n"
|
||||||
" -T,--title=TITLE initial window title (foot)\n"
|
" -T,--title=TITLE initial window title (foot)\n"
|
||||||
" -a,--app-id=ID window application ID (foot)\n"
|
" -a,--app-id=ID window application ID (foot)\n"
|
||||||
" -m,--maximized start in maximized mode\n"
|
" -m,--maximized start in maximized mode\n"
|
||||||
|
|
@ -81,8 +78,11 @@ print_usage(const char *prog_name)
|
||||||
" -d,--log-level={info|warning|error|none} log level (info)\n"
|
" -d,--log-level={info|warning|error|none} log level (info)\n"
|
||||||
" -l,--log-colorize=[{never|always|auto}] enable/disable colorization of log output on stderr\n"
|
" -l,--log-colorize=[{never|always|auto}] enable/disable colorization of log output on stderr\n"
|
||||||
" -s,--log-no-syslog disable syslog logging (only applicable in server mode)\n"
|
" -s,--log-no-syslog disable syslog logging (only applicable in server mode)\n"
|
||||||
" -v,--version show the version number and quit\n",
|
" -v,--version show the version number and quit\n";
|
||||||
prog_name, prog_name, FOOT_DEFAULT_TERM);
|
|
||||||
|
printf("Usage: %s [OPTIONS...]\n", prog_name);
|
||||||
|
printf("Usage: %s [OPTIONS...] command [ARGS...]\n", prog_name);
|
||||||
|
puts(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue