1 /* $OpenBSD: gettytab.h,v 1.8 2015/11/06 16:42:30 tedu Exp $*/ 2 3 /* 4 * Copyright (c) 1983, 1993, 1994 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 3. Neither the name of the University nor the names of its contributors 16 * may be used to endorse or promote products derived from this software 17 * without specific prior written permission. 18 * 19 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 * 31 * from: @(#)gettytab.h 8.2 (Berkeley) 3/30/94 32 */ 33 34 /* 35 * Getty description definitions. 36 */ 37 struct gettystrs { 38 char *field; /* name to lookup in gettytab */ 39 char *defalt; /* value we find by looking in defaults */ 40 char *value; /* value that we find there */ 41 }; 42 43 struct gettynums { 44 char *field; /* name to lookup */ 45 long defalt; /* number we find in defaults */ 46 long value; /* number we find there */ 47 int set; /* we actually got this one */ 48 }; 49 50 struct gettyflags { 51 char *field; /* name to lookup */ 52 char invrt; /* name existing in gettytab --> false */ 53 char defalt; /* true/false in defaults */ 54 char value; /* true/false flag */ 55 char set; /* we found it */ 56 }; 57 58 /* 59 * String values. 60 */ 61 #define NX gettystrs[0].value 62 #define CL gettystrs[1].value 63 #define IM gettystrs[2].value 64 #define LM gettystrs[3].value 65 #define ER gettystrs[4].value 66 #define KL gettystrs[5].value 67 #define ET gettystrs[6].value 68 #define PC gettystrs[7].value 69 #define TT gettystrs[8].value 70 #define EV gettystrs[9].value 71 #define LO gettystrs[10].value 72 #define HN gettystrs[11].value 73 #define HE gettystrs[12].value 74 #define IN gettystrs[13].value 75 #define QU gettystrs[14].value 76 #define XN gettystrs[15].value 77 #define XF gettystrs[16].value 78 #define BK gettystrs[17].value 79 #define SU gettystrs[18].value 80 #define DS gettystrs[19].value 81 #define RP gettystrs[20].value 82 #define FL gettystrs[21].value 83 #define WE gettystrs[22].value 84 #define LN gettystrs[23].value 85 86 /* 87 * Numeric definitions. 88 */ 89 #define IS gettynums[0].value 90 #define OS gettynums[1].value 91 #define SP gettynums[2].value 92 #define ND gettynums[3].value 93 #define CD gettynums[4].value 94 #define TD gettynums[5].value 95 #define FD gettynums[6].value 96 #define BD gettynums[7].value 97 #define TO gettynums[8].value 98 #define PF gettynums[9].value 99 #define C0 gettynums[10].value 100 #define C0set gettynums[10].set 101 #define C1 gettynums[11].value 102 #define C1set gettynums[11].set 103 #define C2 gettynums[12].value 104 #define C2set gettynums[12].set 105 #define I0 gettynums[13].value 106 #define I0set gettynums[13].set 107 #define I1 gettynums[14].value 108 #define I1set gettynums[14].set 109 #define I2 gettynums[15].value 110 #define I2set gettynums[15].set 111 #define L0 gettynums[16].value 112 #define L0set gettynums[16].set 113 #define L1 gettynums[17].value 114 #define L1set gettynums[17].set 115 #define L2 gettynums[18].value 116 #define L2set gettynums[18].set 117 #define O0 gettynums[19].value 118 #define O0set gettynums[19].set 119 #define O1 gettynums[20].value 120 #define O1set gettynums[20].set 121 #define O2 gettynums[21].value 122 #define O2set gettynums[21].set 123 124 /* 125 * Boolean values. 126 */ 127 #define HT gettyflags[0].value 128 #define NL gettyflags[1].value 129 #define EP gettyflags[2].value 130 #define EPset gettyflags[2].set 131 #define OP gettyflags[3].value 132 #define OPset gettyflags[3].set 133 #define AP gettyflags[4].value 134 #define APset gettyflags[4].set 135 #define EC gettyflags[5].value 136 #define CO gettyflags[6].value 137 #define CB gettyflags[7].value 138 #define CK gettyflags[8].value 139 #define CE gettyflags[9].value 140 #define PE gettyflags[10].value 141 #define RW gettyflags[11].value 142 #define XC gettyflags[12].value 143 #define LC gettyflags[13].value 144 #define UC gettyflags[14].value 145 #define IG gettyflags[15].value 146 #define PS gettyflags[16].value 147 #define HC gettyflags[17].value 148 #define UB gettyflags[18].value 149 #define AB gettyflags[19].value 150 #define DX gettyflags[20].value 151 #define NP gettyflags[21].value 152 #define MB gettyflags[22].value 153 154 int getent(char *, char *); 155 long getnum(char *); 156 int getflag(char *); 157 char *getstr(char *, char **); 158 159 extern struct gettyflags gettyflags[]; 160 extern struct gettynums gettynums[]; 161 extern struct gettystrs gettystrs[]; 162 extern int hopcount; 163