1/*
2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License as
4 * published by the Free Software Foundation; either version 2 of
5 * the License, or (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
15 * MA 02111-1307 USA
16 */
17/***************************************************************************
18 * LPRng - An Extended Print Spooler System
19 *
20 * Copyright 1988-2003, Patrick Powell, San Diego, CA
21 *     papowell@lprng.com
22 * See LICENSE for conditions of use.
23 *
24 ***************************************************************************/
25
26 static char *const _id =
27"$Id: controlword.c,v 1.1.1.1 2008/10/15 03:28:26 james26_jang Exp $";
28
29
30#include "lp.h"
31#include "control.h"
32/**** ENDINCLUDE ****/
33
34 static struct keywords controlwords[] = {
35
36{ "ABORT", N_("ABORT"), OP_ABORT, 0, 0, 0, 0},
37{ "ACTIVE", N_("ACTIVE"), OP_ACTIVE, 0, 0, 0, 0},
38{ "CLASS", N_("CLASS"), OP_CLASS, 0, 0, 0, 0},
39{ "CLIENT", N_("CLIENT"), OP_CLIENT, 0, 0, 0, 0},
40{ "DEBUG", N_("DEBUG"), OP_DEBUG, 0, 0, 0, 0},
41{ "DEFAULTQ", N_("DEFAULTQ"), OP_DEFAULTQ, 0, 0, 0, 0},
42{ "DISABLE", N_("DISABLE"), OP_DISABLE, 0, 0, 0, 0},
43{ "DOWN", N_("DOWN"), OP_DOWN, 0, 0, 0, 0},
44{ "ENABLE", N_("ENABLE"), OP_ENABLE, 0, 0, 0, 0},
45{ "HOLD", N_("HOLD"), OP_HOLD, 0, 0, 0, 0},
46{ "HOLDALL", N_("HOLDALL"), OP_HOLDALL, 0, 0, 0, 0},
47{ "KILL", N_("KILL"), OP_KILL, 0, 0, 0, 0},
48{ "LPD", N_("LPD"), OP_LPD, 0, 0, 0, 0},
49{ "LPQ", N_("LPQ"), OP_LPQ, 0, 0, 0, 0},
50{ "LPRM", N_("LPRM"), OP_LPRM, 0, 0, 0, 0},
51{ "MOVE", N_("MOVE"), OP_MOVE, 0, 0, 0, 0},
52{ "MSG", N_("MSG"), OP_MSG, 0, 0, 0, 0},
53{ "NOHOLDALL", N_("NOHOLDALL"), OP_NOHOLDALL, 0, 0, 0, 0},
54{ "PRINTCAP", N_("PRINTCAP"), OP_PRINTCAP, 0, 0, 0, 0},
55{ "REDIRECT", N_("REDIRECT"), OP_REDIRECT, 0, 0, 0, 0},
56{ "REDO", N_("REDO"), OP_REDO, 0, 0, 0, 0},
57{ "RELEASE", N_("RELEASE"), OP_RELEASE, 0, 0, 0, 0},
58{ "REREAD", N_("REREAD"), OP_REREAD, 0, 0, 0, 0},
59{ "START", N_("START"), OP_START, 0, 0, 0, 0},
60{ "STATUS", N_("STATUS"), OP_STATUS, 0, 0, 0, 0},
61{ "STOP", N_("STOP"), OP_STOP, 0, 0, 0, 0},
62{ "TOPQ", N_("TOPQ"), OP_TOPQ, 0, 0, 0, 0},
63{ "UP", N_("UP"), OP_UP, 0, 0, 0, 0},
64{ "SERVER", N_("SERVER"), OP_SERVER, 0, 0, 0, 0},
65{ "DEFAULTS", N_("DEFAULTS"), OP_DEFAULTS, 0, 0, 0, 0},
66{ "FLUSH", N_("FLUSH"), OP_FLUSH, 0, 0, 0, 0},
67{ "LANG", N_("LANG"), OP_LANG, 0, 0, 0, 0},
68
69{0,0,0,0,0,0,0}
70};
71
72
73/***************************************************************************
74 * Get_controlword()
75 * - decode the control word and return a key
76 ***************************************************************************/
77
78int Get_controlword( char *s )
79{
80	return( Get_keyval( s, controlwords ) );
81}
82
83char *Get_controlstr( int c )
84{
85	return( Get_keystr( c, controlwords ) );
86}
87