… | |
… | |
55 | #include <uudeview.h> |
55 | #include <uudeview.h> |
56 | #include <uuint.h> |
56 | #include <uuint.h> |
57 | #include <fptools.h> |
57 | #include <fptools.h> |
58 | #include <uustring.h> |
58 | #include <uustring.h> |
59 | |
59 | |
60 | char * uuscan_id = "$Id: uuscan.c,v 1.3.2.4 2003/11/06 13:08:24 root Exp $"; |
60 | char * uuscan_id = "$Id: uuscan.c,v 1.3.2.5 2004/04/18 19:55:46 root Exp $"; |
61 | |
61 | |
62 | /* |
62 | /* |
63 | * Header fields we recognize as such. See RFC822. We add "From ", |
63 | * Header fields we recognize as such. See RFC822. We add "From ", |
64 | * the usual marker for a beginning of a new message, and a couple |
64 | * the usual marker for a beginning of a new message, and a couple |
65 | * of usual MDA, News and MIME headers. |
65 | * of usual MDA, News and MIME headers. |
… | |
… | |
153 | static int |
153 | static int |
154 | IsHeaderLine (char *data) |
154 | IsHeaderLine (char *data) |
155 | { |
155 | { |
156 | if (data == NULL) return 0; |
156 | if (data == NULL) return 0; |
157 | if (*data == ':') return 0; |
157 | if (*data == ':') return 0; |
158 | while (*data && isalnum (*data)) data++; |
158 | while (*data && (isalnum (*data) || *data=='-')) data++; |
159 | return (*data == ':') ? 1 : 0; |
159 | return (*data == ':') ? 1 : 0; |
160 | } |
160 | } |
161 | |
161 | |
162 | /* |
162 | /* |
163 | * Scans a potentially folded header line from the input file. If |
163 | * Scans a potentially folded header line from the input file. If |
… | |
… | |
389 | *attribute != '@' && *attribute != ',' && |
389 | *attribute != '@' && *attribute != ',' && |
390 | /* *attribute != ';' && */ *attribute != ':' && |
390 | /* *attribute != ';' && */ *attribute != ':' && |
391 | *attribute != '\\' &&*attribute != '"' && |
391 | *attribute != '\\' &&*attribute != '"' && |
392 | *attribute != '/' && /* *attribute != '[' && |
392 | *attribute != '/' && /* *attribute != '[' && |
393 | *attribute != ']' && */ *attribute != '?' && |
393 | *attribute != ']' && */ *attribute != '?' && |
394 | *attribute != '=' && length < 255) |
394 | *attribute != '=' && length < 255) { |
395 | *ptr++ = *attribute++; |
395 | *ptr++ = *attribute++; |
|
|
396 | length++; |
|
|
397 | } |
396 | |
398 | |
397 | *ptr = '\0'; |
399 | *ptr = '\0'; |
398 | } |
400 | } |
399 | return uuscan_pvvalue; |
401 | return uuscan_pvvalue; |
400 | } |
402 | } |
… | |
… | |
627 | if (boundary) |
629 | if (boundary) |
628 | blen = strlen (boundary); |
630 | blen = strlen (boundary); |
629 | |
631 | |
630 | while (!feof (datei)) { |
632 | while (!feof (datei)) { |
631 | oldposition = ftell (datei); |
633 | oldposition = ftell (datei); |
632 | if (_FP_fgets (line, 299, datei) == NULL) |
634 | if (_FP_fgets (line, 255, datei) == NULL) |
633 | break; |
635 | break; |
634 | if (ferror (datei)) |
636 | if (ferror (datei)) |
635 | break; |
637 | break; |
636 | |
638 | |
637 | line[299] = '\0'; /* For Safety of string functions */ |
639 | line[255] = '\0'; /* For Safety of string functions */ |
638 | |
640 | |
639 | /* |
641 | /* |
640 | * Make Busy Polls |
642 | * Make Busy Polls |
641 | */ |
643 | */ |
642 | |
644 | |