当前位置: 首页>>代码示例>>C++>>正文


C++ USAGE_MAN_TAIL函数代码示例

本文整理汇总了C++中USAGE_MAN_TAIL函数的典型用法代码示例。如果您正苦于以下问题:C++ USAGE_MAN_TAIL函数的具体用法?C++ USAGE_MAN_TAIL怎么用?C++ USAGE_MAN_TAIL使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了USAGE_MAN_TAIL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: __attribute__

static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
	fprintf(out, USAGE_HEADER);
	fprintf(out, _(" %s <hard|soft>\n"), program_invocation_short_name);
	fprintf(out, USAGE_OPTIONS);
	fprintf(out, USAGE_HELP);
	fprintf(out, USAGE_VERSION);
	fprintf(out, USAGE_MAN_TAIL("ctrlaltdel(8)"));
	exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
开发者ID:apprisi,项目名称:util-linux,代码行数:10,代码来源:ctrlaltdel.c

示例2: __attribute__

static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
	fprintf(out, USAGE_HEADER);
	fprintf(out, _(" %s [options] new_root put_old\n"),
		program_invocation_short_name);
	fprintf(out, USAGE_OPTIONS);
	fprintf(out, USAGE_HELP);
	fprintf(out, USAGE_VERSION);
	fprintf(out, USAGE_MAN_TAIL("pivot_root(8)"));
	exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
开发者ID:SpoilForHawkeye,项目名称:mount,代码行数:11,代码来源:pivot_root.c

示例3: __attribute__

static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
	fprintf(out, USAGE_HEADER);
	/* Synopsis */
	fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
	fprintf(out, USAGE_OPTIONS);
	fprintf(out, USAGE_HELP);
	fprintf(out, USAGE_VERSION);
	fprintf(out, USAGE_MAN_TAIL("arch(1)"));
	exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
开发者ID:SpoilForHawkeye,项目名称:mount,代码行数:11,代码来源:arch.c

示例4: __attribute__

static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
	fputs(USAGE_HEADER, out);
	fprintf(out, _(" %s <disk device> <partition number> <start> <length>\n"),
		program_invocation_short_name);
	fputs(USAGE_OPTIONS, out);
	fputs(USAGE_HELP, out);
	fputs(USAGE_VERSION, out);
	fprintf(out, USAGE_MAN_TAIL("addpart(8)"));
	exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
开发者ID:bdwalton,项目名称:util-linux,代码行数:11,代码来源:addpart.c

示例5: __attribute__

static void __attribute__((__noreturn__)) usage(FILE *output)
{
	fputs(USAGE_HEADER, output);
	fprintf(output, _(" %s [options] <newrootdir> <init> <args to init>\n"),
		program_invocation_short_name);
	fputs(USAGE_OPTIONS, output);
	fputs(USAGE_HELP, output);
	fputs(USAGE_VERSION, output);
	fprintf(output, USAGE_MAN_TAIL("switch_root(8)"));

	exit(output == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
开发者ID:azat-archive,项目名称:util-linux,代码行数:12,代码来源:switch_root.c

示例6: __attribute__

static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
	fputs(USAGE_HEADER, out);
	fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
	fputs(USAGE_OPTIONS, out);
	fputs(USAGE_HELP, out);
	fputs(_(" -s, --since    system up since\n"), out);
	fputs(USAGE_VERSION, out);
	fprintf(out, USAGE_MAN_TAIL("uptime(1)"));

	exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
开发者ID:DrinkShot,项目名称:procps,代码行数:12,代码来源:uptime.c

示例7: usage

usage (int status) {
    if (su_mode == RUNUSER_MODE) {
        fputs(USAGE_HEADER, stdout);
        printf (_(" %s [options] -u <user> <command>\n"),
                program_invocation_short_name);
        printf (_(" %s [options] [-] [<user> [<argument>...]]\n"),
                program_invocation_short_name);
        fputs (_("\n"
                 "Run <command> with the effective user ID and group ID of <user>.  If -u is\n"
                 "not given, fall back to su(1)-compatible semantics and execute standard shell.\n"
                 "The options -c, -f, -l, and -s are mutually exclusive with -u.\n"), stdout);

        fputs(USAGE_OPTIONS, stdout);

        fputs (_(" -u, --user <user>             username\n"), stdout);

    } else {
        fputs(USAGE_HEADER, stdout);
        printf (_(" %s [options] [-] [<user> [<argument>...]]\n"),
                program_invocation_short_name);
        fputs (_("\n"
                 "Change the effective user ID and group ID to that of <user>.\n"
                 "A mere - implies -l.  If <user> is not given, root is assumed.\n"), stdout);

        fputs(USAGE_OPTIONS, stdout);
    }

    fputs (_(" -m, -p, --preserve-environment  do not reset environment variables\n"),
           stdout);
    fputs (_(" -g, --group <group>             specify the primary group\n"),
           stdout);
    fputs (_(" -G, --supp-group <group>        specify a supplemental group\n\n"),
           stdout);

    fputs (_(" -, -l, --login                  make the shell a login shell\n"),
           stdout);
    fputs (_(" -c, --command <command>         pass a single command to the shell with -c\n"),
           stdout);
    fputs (_(" --session-command <command>     pass a single command to the shell with -c\n"
             "                                   and do not create a new session\n"),
           stdout);
    fputs (_(" -f, --fast                      pass -f to the shell (for csh or tcsh)\n"),
           stdout);
    fputs (_(" -s, --shell <shell>             run <shell> if /etc/shells allows it\n"),
           stdout);
    fputs (" -v, --verbose                   verbose output\n", stdout);

    fputs(USAGE_SEPARATOR, stdout);
    fputs(USAGE_HELP, stdout);
    fputs(USAGE_VERSION, stdout);
    printf(USAGE_MAN_TAIL(su_mode == SU_MODE ? "su(1)" : "runuser(1)"));
    exit (status);
}
开发者ID:TheNeikos,项目名称:bughack,代码行数:53,代码来源:su-common.2.27.1-1.modified.c

示例8: __attribute__

static void __attribute__((__noreturn__)) usage(void)
{
	FILE *out = stdout;
	fputs(USAGE_HEADER, out);
	fprintf(out,
	      _(" %s [options]\n"), program_invocation_short_name);

	fputs(USAGE_SEPARATOR, out);
	fputs(_("Set the attributes of a terminal.\n"), out);

	fputs(USAGE_OPTIONS, out);
	fputs(_(" --term          <terminal_name>   override TERM environment variable\n"), out);
	fputs(_(" --reset                           reset terminal to power-on state\n"), out);
	fputs(_(" --resize                          reset terminal rows and columns\n"), out);
	fputs(_(" --initialize                      display init string, and use default settings\n"), out);
	fputs(_(" --default                         use default terminal settings\n"), out);
	fputs(_(" --store                           save current terminal settings as default\n"), out);
	fputs(_(" --cursor        [on|off]          display cursor\n"), out);
	fputs(_(" --repeat        [on|off]          keyboard repeat\n"), out);
	fputs(_(" --appcursorkeys [on|off]          cursor key application mode\n"), out);
	fputs(_(" --linewrap      [on|off]          continue on a new line when a line is full\n"), out);
	fputs(_(" --inversescreen [on|off]          swap colors for the whole screen\n"), out);
	fputs(_(" --foreground    default|<color>   set foreground color\n"), out);
	fputs(_(" --background    default|<color>   set background color\n"), out);
	fputs(_(" --ulcolor       [bright] <color>  set underlined text color\n"), out);
	fputs(_(" --hbcolor       [bright] <color>  set bold text color\n"), out);
	fputs(_("                 <color>: black blue cyan green grey magenta red white yellow\n"), out);
	fputs(_(" --bold          [on|off]          bold\n"), out);
	fputs(_(" --half-bright   [on|off]          dim\n"), out);
	fputs(_(" --blink         [on|off]          blink\n"), out);
	fputs(_(" --underline     [on|off]          underline\n"), out);
	fputs(_(" --reverse       [on|off]          swap foreground and background colors\n"), out);
	fputs(_(" --clear         [all|rest]        clear screen and set cursor position\n"), out);
	fputs(_(" --tabs          [<number>...]     set these tab stop positions, or show them\n"), out);
	fputs(_(" --clrtabs       [<number>...]     clear these tab stop positions, or all\n"), out);
	fputs(_(" --regtabs       [1-160]           set a regular tab stop interval\n"), out);
	fputs(_(" --blank         [0-60|force|poke] set time of inactivity before screen blanks\n"), out);
	fputs(_(" --dump          [<number>]        write vcsa<number> console dump to file\n"), out);
	fputs(_(" --append        [<number>]        append vcsa<number> console dump to file\n"), out);
	fputs(_(" --file          <filename>        name of the dump file\n"), out);
	fputs(_(" --msg           [on|off]          send kernel messages to console\n"), out);
	fputs(_(" --msglevel      0-8               kernel console log level\n"), out);
	fputs(_(" --powersave     [on|vsync|hsync|powerdown|off]\n"), out);
	fputs(_("                                   set vesa powersaving features\n"), out);
	fputs(_(" --powerdown     [0-60]            set vesa powerdown interval in minutes\n"), out);
	fputs(_(" --blength       [0-2000]          duration of the bell in milliseconds\n"), out);
	fputs(_(" --bfreq         <number>          bell frequency in Hertz\n"), out);
	printf( " --help                            %s\n", USAGE_OPTSTR_HELP);
	printf( " --version                         %s\n", USAGE_OPTSTR_VERSION);

	printf(USAGE_MAN_TAIL("setterm(1)"));
	exit(EXIT_SUCCESS);
}
开发者ID:Webster-WXH,项目名称:util-linux,代码行数:53,代码来源:setterm.c

示例9: __attribute__

static void __attribute__((__noreturn__)) usage(FILE *out)
{
    fputs(USAGE_HEADER, out);

    fprintf(out,
            _(" %s [options]\n"), program_invocation_short_name);

    fputs(USAGE_OPTIONS, out);
    fputs(USAGE_HELP, out);
    fputs(USAGE_VERSION, out);

    fprintf(out, USAGE_MAN_TAIL("nologin(8)"));
    exit(EXIT_FAILURE);
}
开发者ID:huawenyu,项目名称:util-linux,代码行数:14,代码来源:nologin.c

示例10: __attribute__

static void __attribute__((__noreturn__)) usage(FILE *out)
{
	fputs(USAGE_HEADER, out);
	fprintf(out, _(" %s [options] <device>\n"),
		program_invocation_short_name);
	fputs(USAGE_OPTIONS, out);
	fputs(_(" -L, --label <label> specify a new label\n"
		" -U, --uuid <uuid>   specify a new uuid\n"), out);
	fputs(USAGE_SEPARATOR, out);
	fputs(USAGE_HELP, out);
	fputs(USAGE_VERSION, out);
	fprintf(out, USAGE_MAN_TAIL("swaplabel(8)"));
	exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
开发者ID:dankamongmen,项目名称:util-linux,代码行数:14,代码来源:swaplabel.c

示例11: __attribute__

static void __attribute__((__noreturn__)) usage(FILE *out)
{
	fputs(USAGE_HEADER, out);
	fprintf(out, " %s\n", program_invocation_short_name);

	fputs(USAGE_SEPARATOR, out);
	fputs(_("Edit the password or group file.\n"), out);

	fputs(USAGE_OPTIONS, out);
	fputs(USAGE_HELP, out);
	fputs(USAGE_VERSION, out);
	fprintf(out, USAGE_MAN_TAIL("vipw(8)"));
	exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
开发者ID:hallyn,项目名称:util-linux,代码行数:14,代码来源:vipw.c

示例12: __attribute__

static void __attribute__((__noreturn__)) usage(void)
{
	FILE *out = stdout;
	fputs(USAGE_HEADER, out);
	fprintf(out, _(" %s hard|soft\n"), program_invocation_short_name);

	fputs(USAGE_SEPARATOR, out);
	fprintf(out, _("Set the function of the Ctrl-Alt-Del combination.\n"));

	fputs(USAGE_OPTIONS, out);
	printf(USAGE_HELP_OPTIONS(16));
	printf(USAGE_MAN_TAIL("ctrlaltdel(8)"));
	exit(EXIT_SUCCESS);
}
开发者ID:karelzak,项目名称:util-linux,代码行数:14,代码来源:ctrlaltdel.c

示例13: __attribute__

static void __attribute__((__noreturn__)) usage(void)
{
	FILE *out = stdout;
	fputs(USAGE_HEADER, out);
	fprintf(out, _(" %s <group>\n"), program_invocation_short_name);

	fputs(USAGE_SEPARATOR, out);
	fputs(_("Log in to a new group.\n"), out);

	fputs(USAGE_OPTIONS, out);
	printf(USAGE_HELP_OPTIONS(16));
	printf(USAGE_MAN_TAIL("newgrp(1)"));
	exit(EXIT_SUCCESS);
}
开发者ID:karelzak,项目名称:util-linux,代码行数:14,代码来源:newgrp.c

示例14: __attribute__

static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
	fputs(USAGE_HEADER, out);
	fprintf(out,
	      _(" %s [options] [tty]\n"), program_invocation_short_name);
	fputs(USAGE_OPTIONS, out);
	fputs(_(" -d, --delay <secs>  update delay in seconds\n"), out);
	fputs(_(" -s, --scale <num>   vertical scale\n"), out);
	fputs(USAGE_SEPARATOR, out);
	fputs(USAGE_HELP, out);
	fputs(USAGE_VERSION, out);
	fprintf(out, USAGE_MAN_TAIL("tload(1)"));

	exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
开发者ID:avagin,项目名称:procps-task-diag,代码行数:15,代码来源:tload.c

示例15: __attribute__

static void __attribute__((__noreturn__)) usage(void)
{
	FILE *out = stdout;
	fprintf(out, _("Usage: %s [options] [file ...]\n"),
		program_invocation_short_name);

	fputs(USAGE_SEPARATOR, out);
	fputs(_("Reverse lines characterwise.\n"), out);

	fputs(USAGE_OPTIONS, out);
	printf(USAGE_HELP_OPTIONS(16));
	printf(USAGE_MAN_TAIL("rev(1)"));

	exit(EXIT_SUCCESS);
}
开发者ID:karelzak,项目名称:util-linux,代码行数:15,代码来源:rev.c


注:本文中的USAGE_MAN_TAIL函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。