… | |
… | |
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.8 2004/02/01 18:50:00 root Exp $"; |
60 | char * uuscan_id = "$Id: uuscan.c,v 1.9 2004/04/18 20:08:11 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 |
… | |
… | |
400 | *attribute != '@' && *attribute != ',' && |
400 | *attribute != '@' && *attribute != ',' && |
401 | /* *attribute != ';' && */ *attribute != ':' && |
401 | /* *attribute != ';' && */ *attribute != ':' && |
402 | *attribute != '\\' &&*attribute != '"' && |
402 | *attribute != '\\' &&*attribute != '"' && |
403 | *attribute != '/' && /* *attribute != '[' && |
403 | *attribute != '/' && /* *attribute != '[' && |
404 | *attribute != ']' && */ *attribute != '?' && |
404 | *attribute != ']' && */ *attribute != '?' && |
405 | *attribute != '=' && length < 255) |
405 | *attribute != '=' && length < 255) { |
406 | *ptr++ = *attribute++; |
406 | *ptr++ = *attribute++; |
|
|
407 | length++; |
|
|
408 | } |
407 | |
409 | |
408 | *ptr = '\0'; |
410 | *ptr = '\0'; |
409 | } |
411 | } |
410 | return uuscan_pvvalue; |
412 | return uuscan_pvvalue; |
411 | } |
413 | } |
… | |
… | |
640 | if (boundary) |
642 | if (boundary) |
641 | blen = strlen (boundary); |
643 | blen = strlen (boundary); |
642 | |
644 | |
643 | while (!feof (datei)) { |
645 | while (!feof (datei)) { |
644 | oldposition = ftell (datei); |
646 | oldposition = ftell (datei); |
645 | if (_FP_fgets (line, 299, datei) == NULL) |
647 | if (_FP_fgets (line, 255, datei) == NULL) |
646 | break; |
648 | break; |
647 | if (ferror (datei)) |
649 | if (ferror (datei)) |
648 | break; |
650 | break; |
649 | |
651 | |
650 | line[299] = '\0'; /* For Safety of string functions */ |
652 | line[255] = '\0'; /* For Safety of string functions */ |
651 | |
653 | |
652 | /* |
654 | /* |
653 | * Make Busy Polls |
655 | * Make Busy Polls |
654 | */ |
656 | */ |
655 | |
657 | |