Removed note from BUGS section of several man pages saying
[mmh] / docs / historical / mh-6.8.5 / uip / RCS / rcvpack.c,v
1 head    1.5;
2 access;
3 symbols;
4 locks; strict;
5 comment @ * @;
6
7
8 1.5
9 date    93.08.25.17.27.19;      author jromine; state Exp;
10 branches;
11 next    1.4;
12
13 1.4
14 date    92.12.15.00.20.22;      author jromine; state Exp;
15 branches;
16 next    1.3;
17
18 1.3
19 date    92.11.04.00.57.54;      author jromine; state Exp;
20 branches;
21 next    1.2;
22
23 1.2
24 date    92.01.31.22.24.46;      author jromine; state Exp;
25 branches;
26 next    1.1;
27
28 1.1
29 date    92.01.31.22.24.30;      author jromine; state Exp;
30 branches;
31 next    ;
32
33
34 desc
35 @@
36
37
38 1.5
39 log
40 @off_t fixes for BSD44
41 @
42 text
43 @/* rcvpack.c - a rcvmail program to keep a copy */
44 #ifndef lint
45 static char ident[] = "@@(#)$Id: rcvpack.c,v 1.4 1992/12/15 00:20:22 jromine Exp jromine $";
46 #endif  /* lint */
47
48 #include "../h/mh.h"
49 #include "../h/dropsbr.h"
50 #include "../h/rcvmail.h"
51 #include "../zotnet/tws.h"
52 #include "../zotnet/mts.h"
53 #ifdef LOCALE
54 #include        <locale.h>
55 #endif
56
57 /* \f */
58
59 static struct swit switches[] = {
60 #define HELPSW  0
61     "help", 4,
62
63     NULL, 0
64 };
65
66 /* \f */
67
68 /* ARGSUSED */
69
70 main (argc, argv)
71 int     argc;
72 char  **argv;
73 {
74     int     md;
75     char   *cp,
76            *file = NULL,
77             buf[100],
78             ddate[BUFSIZ],
79           **ap,
80           **argp,
81            *arguments[MAXARGS];
82
83 #ifdef LOCALE
84         setlocale(LC_ALL, "");
85 #endif
86     invo_name = r1bindex (argv[0], '/');
87     mts_init (invo_name);
88     if ((cp = m_find (invo_name)) != NULL) {
89         ap = brkstring (cp = getcpy (cp), " ", "\n");
90         ap = copyip (ap, arguments);
91     }
92     else
93         ap = arguments;
94     (void) copyip (argv + 1, ap);
95     argp = arguments;
96
97 /* \f */
98
99     while (cp = *argp++) {
100         if (*cp == '-')
101             switch (smatch (++cp, switches)) {
102                 case AMBIGSW: 
103                     ambigsw (cp, switches);
104                     done (1);
105                 case UNKWNSW: 
106                     adios (NULLCP, "-%s unknown", cp);
107                 case HELPSW: 
108                     (void) sprintf (buf, "%s [switches] file", invo_name);
109                     help (buf, switches);
110                     done (1);
111             }
112         if (file)
113             adios (NULLCP, "only one file at a time!");
114         else
115             file = cp;
116     }
117
118 /* \f */
119
120     if (!file)
121         adios (NULLCP, "%s [switches] file", invo_name);
122
123     (void) sprintf (ddate, "Delivery-Date: %s\n", dtimenow ());
124     rewind (stdin);
125     if ((md = mbx_open (file, getuid (), getgid (), m_gmprot ())) == NOTOK
126             || mbx_copy (file, md, fileno (stdin), 1, ddate, 0) == NOTOK
127             || mbx_close (file, md) == NOTOK) {
128         if (md != NOTOK)
129             (void) mbx_close (file, md);
130         done (RCV_MBX);
131     }
132
133     done (RCV_MOK);
134 }
135 @
136
137
138 1.4
139 log
140 @endif sugar
141 @
142 text
143 @d3 1
144 a3 1
145 static char ident[] = "@@(#)$Id: rcvpack.c,v 1.3 1992/11/04 00:57:54 jromine Exp jromine $";
146 a22 4
147
148 /* \f */
149
150 long    lseek ();
151 @
152
153
154 1.3
155 log
156 @LOCALE
157 TYPESIG
158 @
159 text
160 @d3 2
161 a4 2
162 static char ident[] = "@@(#)$Id: rcvpack.c,v 1.2 1992/01/31 22:24:46 jromine Exp jromine $";
163 #endif  lint
164 @
165
166
167 1.2
168 log
169 @kerberos
170 @
171 text
172 @d3 1
173 a3 1
174 static char ident[] = "@@(#)$Id: scan.c,v 1.9 1992/01/23 23:06:45 jromine Exp $";
175 d11 3
176 d45 3
177 @
178
179
180 1.1
181 log
182 @Initial revision
183 @
184 text
185 @d2 3
186 d18 1
187 a18 1
188     NULL, NULL
189 @