ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Convert-UUlib/uulib/uulib.c
(Generate patch)

Comparing Convert-UUlib/uulib/uulib.c (file contents):
Revision 1.29 by root, Sat Sep 24 06:32:50 2022 UTC vs.
Revision 1.30 by root, Sat Sep 24 10:55:43 2022 UTC

234 { &uuscan_pvvalue, 300 }, /* from uuscan.c:ParseValue() */ 234 { &uuscan_pvvalue, 300 }, /* from uuscan.c:ParseValue() */
235 { &uuscan_phtext, 300 }, /* from uuscan.c:ParseHeader() */ 235 { &uuscan_phtext, 300 }, /* from uuscan.c:ParseHeader() */
236 { &uuscan_sdline, 1025 }, /* from uuscan.c:ScanData(), +1 for UURepairData */ 236 { &uuscan_sdline, 1025 }, /* from uuscan.c:ScanData(), +1 for UURepairData */
237 { &uuscan_sdbhds1, 1300 }, /* 1024 for line in UUScan + 256 potential overhead UUDecodeLine */ 237 { &uuscan_sdbhds1, 1300 }, /* 1024 for line in UUScan + 256 potential overhead UUDecodeLine */
238 { &uuscan_sdbhds2, 1300 }, /* 1024 for line in UUScan + 256 potential overhead UUDecodeLine */ 238 { &uuscan_sdbhds2, 1300 }, /* 1024 for line in UUScan + 256 potential overhead UUDecodeLine */
239 { &uuscan_spline, 1024 }, /* from uuscan.c:ScanPart() */ 239 { &uuscan_spline, 1024 }, /* from uuscan.c:UUScanPart() */
240 { &uuutil_bhwtmp, 300 }, /* from uuutil.c:UUbhwrite() */ 240 { &uuutil_bhwtmp, 300 }, /* from uuutil.c:UUbhwrite() */
241 { NULL, 0 } 241 { NULL, 0 }
242}; 242};
243 243
244/* 244/*
245 * Handle the printing of messages. Works like printf. 245 * Handle the printing of messages. Works like printf.
246 */ 246 */
247 247
248int 248int
249UUMessage_ (char *file, int line, int level, char *format, ...) 249UUMessage_ (const char *file, int line_level, const char *format, ...)
250{ 250{
251 int msgofs; 251 int msgofs;
252 int line = line_level >> 4;
253 int level = line_level & 0x000f;
254
252 va_list ap; 255 va_list ap;
253 va_start (ap, format); 256 va_start (ap, format);
254 257
255 if (uu_debug) { 258 if (uu_debug) {
256 snprintf (uulib_msgstring, 1024, "%s(%d): %s", file, line, msgnames[level]); 259 snprintf (uulib_msgstring, 1024, "%s(%d): %s", file, line, msgnames[level]);
654 657
655 return fname; 658 return fname;
656} 659}
657 660
658/* 661/*
659 * Load a File. We call ScanPart repeatedly until at EOF and 662 * Load a File. We call UUScanPart repeatedly until at EOF and
660 * add the parts to UUGlobalFileList 663 * add the parts to UUGlobalFileList
661 */ 664 */
662 665
663int UUEXPORT 666int UUEXPORT
664UULoadFile (char *filename, char *fileid, int delflag, int *partcount) 667UULoadFile (char *filename, char *fileid, int delflag, int *partcount)
742 if (FP_feof (datei) || ferror (datei)) 745 if (FP_feof (datei) || ferror (datei))
743 break; 746 break;
744 else 747 else
745 ungetc (res, datei); 748 ungetc (res, datei);
746 749
747 if ((loaded = ScanPart (datei, fileid, &sr)) == NULL) { 750 if ((loaded = UUScanPart (datei, fileid, &sr)) == NULL) {
748 if (sr != UURET_NODATA && sr != UURET_OK && sr != UURET_CONT) { 751 if (sr != UURET_NODATA && sr != UURET_OK && sr != UURET_CONT) {
749 UUkillfread (loaded); 752 UUkillfread (loaded);
750 if (sr != UURET_CANCEL) 753 if (sr != UURET_CANCEL)
751 UUMessage (UUMSG_ERROR, 754 UUMessage (UUMSG_ERROR,
752 uustring (S_READ_ERROR), filename, 755 uustring (S_READ_ERROR), filename,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines