Esempio n. 1
0
File: secho.c Progetto: 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);
}
Esempio n. 2
0
File: who.c Progetto: 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);
}
Esempio 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 */
Esempio n. 4
0
File: id.c Progetto: 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);
}