File: help.c

package info (click to toggle)
vlock 1.0-9
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 112 kB
  • ctags: 53
  • sloc: ansic: 464; makefile: 43
file content (45 lines) | stat: -rw-r--r-- 1,376 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* help.c -- print help and usage message.
 *
 * This program is copyright (C) 1994 Michael K. Johnson, and is free
 * software, which is freely distributable under the terms of the
 * GNU public license, included as the file COPYING in this
 * distribution.  It is NOT public domain software, and any
 * redistribution not permitted by the GNU Public License is
 * expressly forbidden without prior written permission from
 * the author.
 *
 */

/* RCS log:
 * $Log: help.c,v $
 * Revision 1.2  1994/03/23 17:00:16  johnsonm
 * Removed reference to --pattern and -p.
 *
 * Revision 1.1  1994/03/13  16:28:16  johnsonm
 * Initial revision
 *
 */


#include <stdio.h>
#include <unistd.h>
#include "vlock.h"


static char rcsid[] = "$Id: help.c,v 1.2 1994/03/23 17:00:16 johnsonm Exp johnsonm $";


void print_help(int exitcode) {
  fprintf(stderr,
	  "vlock: locks virtual consoles, saving your current session.\n"
	  "Usage: vlock [options]\n"
	  "       Where [options] are any of:\n"
	  "-c or --current: lock only this virtual console, allowing user to\n"
	  "       switch to other virtual consoles.\n"
	  "-a or --all: lock all virtual consoles by preventing other users\n"
	  "       from switching virtual consoles.\n"
	  "-v or --version: Print the version number of vlock and exit.\n"
	  "-h or --help: Print this help message and exit.\n"
	  );
	  exit(exitcode);
}