Mercurial > hg > xemacs-beta
comparison lib-src/cvtmail.c @ 363:972bbb6d6ca2 r21-1-11
Import from CVS: tag r21-1-11
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:59:28 +0200 |
parents | 376386a54a3c |
children | cc15677e0335 |
comparison
equal
deleted
inserted
replaced
362:1e474c183006 | 363:972bbb6d6ca2 |
---|---|
51 static void skip_to_lf (FILE *stream); | 51 static void skip_to_lf (FILE *stream); |
52 static void fatal (CONST char *s1, CONST char *s2); | 52 static void fatal (CONST char *s1, CONST char *s2); |
53 static void error (CONST char *s1, CONST char *s2); | 53 static void error (CONST char *s1, CONST char *s2); |
54 | 54 |
55 int | 55 int |
56 main (argc, argv) | 56 main (int argc, char *argv[]) |
57 int argc; | |
58 char *argv[]; | |
59 { | 57 { |
60 char *hd; | 58 char *hd; |
61 char *md; | 59 char *md; |
62 char *mdd; | 60 char *mdd; |
63 char *mfile; | 61 char *mfile; |
116 fclose (mfilef); | 114 fclose (mfilef); |
117 return 0; | 115 return 0; |
118 } | 116 } |
119 | 117 |
120 static void | 118 static void |
121 skip_to_lf (stream) | 119 skip_to_lf (FILE *stream) |
122 FILE *stream; | |
123 { | 120 { |
124 register int c; | 121 register int c; |
125 while ((c = getc(stream)) != '\n') | 122 while ((c = getc(stream)) != '\n') |
126 ; | 123 ; |
127 } | 124 } |
128 | 125 |
129 static void * | 126 static void * |
130 xmalloc (size) | 127 xmalloc (unsigned int size) |
131 unsigned size; | |
132 { | 128 { |
133 char *result = (char *) malloc (size); | 129 char *result = (char *) malloc (size); |
134 if (!result) | 130 if (!result) |
135 fatal ("virtual memory exhausted", 0); | 131 fatal ("virtual memory exhausted", 0); |
136 return result; | 132 return result; |
137 } | 133 } |
138 | 134 |
139 static void * | 135 static void * |
140 xrealloc (ptr, size) | 136 xrealloc (char *ptr, unsigned int size) |
141 char *ptr; | |
142 unsigned size; | |
143 { | 137 { |
144 char *result = (char *) realloc (ptr, size); | 138 char *result = (char *) realloc (ptr, size); |
145 if (!result) | 139 if (!result) |
146 fatal ("virtual memory exhausted", 0); | 140 fatal ("virtual memory exhausted", 0); |
147 return result; | 141 return result; |