Mercurial > hg > xemacs-beta
comparison lib-src/cvtmail.c @ 442:abe6d1db359e r21-2-36
Import from CVS: tag r21-2-36
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:35:02 +0200 |
parents | 8de8e3f6228a |
children | 023b83f4e54b |
comparison
equal
deleted
inserted
replaced
441:72a7cfa4a488 | 442:abe6d1db359e |
---|---|
22 * Program to convert oldstyle goslings emacs mail directories into | 22 * Program to convert oldstyle goslings emacs mail directories into |
23 * gnu-rmail format. Program expects a directory called Messages to | 23 * gnu-rmail format. Program expects a directory called Messages to |
24 * exist in your home directory, containing individual mail messages in | 24 * exist in your home directory, containing individual mail messages in |
25 * separate files in the standard gosling emacs mail reader format. | 25 * separate files in the standard gosling emacs mail reader format. |
26 * | 26 * |
27 * Program takes one argument: an output file. THis file will contain | 27 * Program takes one argument: an output file. This file will contain |
28 * all the messages in Messages directory, in berkeley mail format. | 28 * all the messages in Messages directory, in berkeley mail format. |
29 * If no output file is mentioned, messages are put in ~/OMAIL. | 29 * If no output file is mentioned, messages are put in ~/OMAIL. |
30 * | 30 * |
31 * In order to get rmail to read the messages, the resulting file must | 31 * In order to get rmail to read the messages, the resulting file must |
32 * be mv'ed to ~/mbox, and then have rmail invoked on them. | 32 * be mv'ed to ~/mbox, and then have rmail invoked on them. |
33 * | 33 * |
34 * Author: Larry Kolodney, 1985 | 34 * Author: Larry Kolodney, 1985 |
35 */ | 35 */ |
36 | 36 |
37 | 37 |
38 #include <config.h> | 38 #include <config.h> |
42 #include <stdlib.h> | 42 #include <stdlib.h> |
43 | 43 |
44 static void *xmalloc (size_t); | 44 static void *xmalloc (size_t); |
45 static void *xrealloc (void *, size_t); | 45 static void *xrealloc (void *, size_t); |
46 static void skip_to_lf (FILE *stream); | 46 static void skip_to_lf (FILE *stream); |
47 static void fatal (CONST char *s1, CONST char *s2); | 47 static void fatal (const char *s1, const char *s2); |
48 static void error (CONST char *s1, CONST char *s2); | 48 static void error (const char *s1, const char *s2); |
49 | 49 |
50 int | 50 int |
51 main (int argc, char *argv[]) | 51 main (int argc, char *argv[]) |
52 { | 52 { |
53 char *hd; | 53 char *hd; |
104 putc ('\n', mfilef); | 104 putc ('\n', mfilef); |
105 skip_to_lf (mddf); | 105 skip_to_lf (mddf); |
106 fclose (cff); | 106 fclose (cff); |
107 } | 107 } |
108 fclose (mddf); | 108 fclose (mddf); |
109 fclose (mfilef); | 109 fclose (mfilef); |
110 return 0; | 110 return 0; |
111 } | 111 } |
112 | 112 |
113 static void | 113 static void |
114 skip_to_lf (FILE *stream) | 114 skip_to_lf (FILE *stream) |
137 } | 137 } |
138 | 138 |
139 /* Print error message and exit. */ | 139 /* Print error message and exit. */ |
140 | 140 |
141 static void | 141 static void |
142 fatal (CONST char *s1, CONST char *s2) | 142 fatal (const char *s1, const char *s2) |
143 { | 143 { |
144 error (s1, s2); | 144 error (s1, s2); |
145 exit (1); | 145 exit (1); |
146 } | 146 } |
147 | 147 |
148 static void | 148 static void |
149 error (CONST char *s1, CONST char *s2) | 149 error (const char *s1, const char *s2) |
150 { | 150 { |
151 fprintf (stderr, "cvtmail: "); | 151 fprintf (stderr, "cvtmail: "); |
152 fprintf (stderr, s1, s2); | 152 fprintf (stderr, s1, s2); |
153 fprintf (stderr, "\n"); | 153 fprintf (stderr, "\n"); |
154 } | 154 } |