-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlpr.h
68 lines (61 loc) · 1.88 KB
/
lpr.h
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* Номера сообщений */
#define M_AR MSGS[0]
#define M_CREAT MSGS[1]
#define M_DIR MSGS[2]
#define M_EMPTY MSGS[3]
#define M_EXEC MSGS[4]
#define M_EXECU MSGS[5]
#define M_FTN MSGS[6]
#define M_GRAPH MSGS[7]
#define M_LINK MSGS[8]
#define M_OPEN MSGS[9]
#define M_READ MSGS[10]
#define M_SC MSGS[11]
#define M_SPEC MSGS[12]
#define M_STAT MSGS[13]
#define M_UNKNOWN MSGS[14]
#define M_UNLINK MSGS[15]
#define M_USAGE MSGS[16]
#define M_USER MSGS[17]
#define M_WRITE MSGS[18]
#define M_DISABLE MSGS[19]
/* Тексты сообщений */
char *MSGS[] = {
"archive file",
"cannot create",
"directory",
"empty file",
"cannot exec",
"executive program",
"no fortran filter for printer",
"no graph filter for printer",
"cannot rename",
"cannot open",
"cannot read",
"suppress multiple copies",
"special file",
"cannot stat",
"unknown printer",
"cannot unlink",
"usage: lpr [-P<printer> [-J<name>] [-<copies>] [-i<indent>]\n\t\t[-m] [-h] [-c] [-g] [-f] [file ...]",
"who are You?",
"cannot write",
"spooling queue disable"
};
/* Характеристики устройства из /etc/printcap */
struct c_strs STRS[] = {
{ D_DN, Null, DEF_DN },
{ D_SD, Null, DEF_SD },
{ D_GF, Null, DEF_GF },
{ D_RF, Null, DEF_RF }
};
struct c_strs *END_STRS = &STRS[(sizeof (STRS) / sizeof (struct c_strs))];
#define C_DEAMON STRS[0].cs_value
#define C_SPOOL STRS[1].cs_value
#define C_GRAPH STRS[2].cs_value
#define C_FTN STRS[3].cs_value
struct c_flgs FLGS[] = {
{ D_SC, FALSE }
};
struct c_flgs *END_FLGS = &FLGS[(sizeof (FLGS) / sizeof (struct c_flgs))];
#define C_SCOPIES FLGS[0].cf_value