/****************************************************************************** * This file is part of a software distribution, which is furnished under the * * terms of a license. Use of this software by any means is subject to this * * license and signifies the acceptance of the licensing terms stated * * therein. Please see the file LICENSE in the top-level directory of this * * software distribution for detailed copyright disclaimers and licensing * * terms. * ****************************************************************************** * Copryight (c) by Andreas S. Wetzel - All rights reserved. * ******************************************************************************/ /* $Id: vd_usage.c,v 1.3 2001/03/19 19:32:56 mickey Exp $ */ #include #include #include extern char *prog_name; /* * void usage(char *fmt, ...); * * Print program usage information to stderr. */ void usage(char *fmt, ...) { va_list ap; va_start(ap, fmt); fprintf(stderr, "\n"); fprintf(stderr, " ==============================================================================\n"); fprintf(stderr, " vchatd %s - %s / Protocol revision: %x-%x\n", VERSION, REL_DATE, MAJOR_REV(PROTO_REV), MINOR_REV(PROTO_REV)); fprintf(stderr, " %s\n", CPR1); fprintf(stderr, " %s\n", CPR2); fprintf(stderr, " ==============================================================================\n\n"); #if HAVE_VPRINTF vfprintf(stderr, fmt, ap); #else # error "No vprintf() available" #endif fprintf(stderr, "\r\n\r\n"); fprintf(stderr, "USAGE: %s [-b ] [-c ] [-l] [-L ]\r\n", prog_name); fprintf(stderr, " %*s [-p ] [-s ] [-S]\r\n\r\n", (int)strlen(prog_name), " "); fprintf(stderr, "OPTIONS: -b Show file to users at startup\r\n"); fprintf(stderr, " -c Enter the given conference channel at signon\r\n"); fprintf(stderr, " -l Enable logging\r\n"); fprintf(stderr, " -L Specify alternate logfile name (default=vchatd-log)\r\n"); fprintf(stderr, " -p Use TCP port (default=1168)\r\n"); fprintf(stderr, " -s Connect to VChat conference server at \r\n"); fprintf(stderr, " -S Log via LOG_LOCAL2 to syslog (implies -l)\r\n"); fprintf(stderr, "\r\n"); va_end(ap); }