comparison lib-src/cvtmail.c @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents 972bbb6d6ca2
children 74fd4e045ea6
comparison
equal deleted inserted replaced
370:bd866891f083 371:cc15677e0335
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 (int argc, char *argv[]) 56 main (argc, argv)
57 int argc;
58 char *argv[];
57 { 59 {
58 char *hd; 60 char *hd;
59 char *md; 61 char *md;
60 char *mdd; 62 char *mdd;
61 char *mfile; 63 char *mfile;
114 fclose (mfilef); 116 fclose (mfilef);
115 return 0; 117 return 0;
116 } 118 }
117 119
118 static void 120 static void
119 skip_to_lf (FILE *stream) 121 skip_to_lf (stream)
122 FILE *stream;
120 { 123 {
121 register int c; 124 register int c;
122 while ((c = getc(stream)) != '\n') 125 while ((c = getc(stream)) != '\n')
123 ; 126 ;
124 } 127 }
125 128
126 static void * 129 static void *
127 xmalloc (unsigned int size) 130 xmalloc (size)
131 unsigned size;
128 { 132 {
129 char *result = (char *) malloc (size); 133 char *result = (char *) malloc (size);
130 if (!result) 134 if (!result)
131 fatal ("virtual memory exhausted", 0); 135 fatal ("virtual memory exhausted", 0);
132 return result; 136 return result;
133 } 137 }
134 138
135 static void * 139 static void *
136 xrealloc (char *ptr, unsigned int size) 140 xrealloc (ptr, size)
141 char *ptr;
142 unsigned size;
137 { 143 {
138 char *result = (char *) realloc (ptr, size); 144 char *result = (char *) realloc (ptr, size);
139 if (!result) 145 if (!result)
140 fatal ("virtual memory exhausted", 0); 146 fatal ("virtual memory exhausted", 0);
141 return result; 147 return result;