Exemplo n.º 1
0
Arquivo: secho.c Projeto: Orc/secho
/* spit out a usage message, then die
 */
void
usage(int rc)
{
    char eb[BUFSIZ];

    setbuf(stderr, eb);
    fprintf(stderr, "usage: %s [options] [args...]\n", pgm);
    showopts(stderr, NR(options), options);
    exit(rc);
}
Exemplo n.º 2
0
Arquivo: who.c Projeto: Orc/bin
void
usage(int fail)
{
    char iob[1024];

    setbuffer(stderr, iob, sizeof iob);
    fprintf(stderr, "usage: %s [-HmqsTu?] [am I] [file]\n", pgm);
    showopts(stderr, NROPTS, opts);
    setbuf(stderr, NULL);
    exit(fail ? 1 : 0);
}
Exemplo n.º 3
0
/*
 * spit out a usage message, then quit
 */
static void
usage(int is_an_error)
{
    char iob[1024];

    setbuffer(stderr, iob, sizeof iob);
    fprintf(stderr, "usage: %s [options]\n", pgm);
    showopts(stderr, NROPTIONS, options);
    setbuf(stderr, NULL);

    exit (is_an_error ? 1 : 0);
} /* usage */
Exemplo n.º 4
0
Arquivo: id.c Projeto: Orc/bin
void
usage(int rc)
{
    char iob[1024];

    setbuffer(stderr, iob, sizeof iob);

    fprintf(stderr, "usage: %s [options] [user]\n", pgm);
    showopts(stderr, NROPTIONS, options);
    setbuf(stderr, NULL);
    exit(rc);
}