Skip to content
Snippets Groups Projects
Commit 75601aec authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Update BulkUploadDescPrompt string to take a string instead of uint for bytes

With this change, it's important you don't try to use a newer text.dat with an
older sbbs (and perform a ;UPLOAD sysop operation).

Previously, each file's size in (k)ibibytes was displayed, which is not very
modern of us. Use the byte estimate (e.g. "1.2M") strings intead.
parent 01928336
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
......@@ -324,7 +324,7 @@
"\r\nProtocol, ~Batch, ~@Quit@, or [~Next]: " 264 ProtocolBatchQuitOrNext
"\r\nBulk Upload %s %s Directory\r\n"\ 265 BulkUpload
"(Enter '-' for description to skip file):\r\n"
"\1_\1y\1h%-12s\1w%7uk\1b:" 266 BulkUploadDescPrompt
"\1_\1y\1h%-12s\1w%7s\1b:" 266 BulkUploadDescPrompt
"\r\n\1r\1h\1iNo files in batch queue.\1n"\ 267 NoFilesInBatchQueue
"\r\n\r\n\1mUse \1hD\1n\1m or \1hU\1n\1m to add files to the queue.\r\n"
"\1_\r\n\1y\1hBatch: \1n" 268 BatchMenuPrompt
......
......@@ -88,12 +88,15 @@ const char * const text_defaults[TOTAL_TEXT]={
"\x77\x25\x75\x01\x62\x29\x3a\x20\x01\x6e\x01\x7e" // 049 ReadingMail
,"\x01\x6e\x0d\x0a\x59\x6f\x75\x20\x63\x61\x6e\x27\x74\x20\x72\x65\x70\x6c\x79\x20\x74\x6f\x20\x74\x68\x69\x73\x20\x6d\x65\x73\x73"
"\x61\x67\x65\x2e\x0d\x0a" // 050 CantReplyToMsg
,"\x20\x20\x01\x68\x01\x62\x52\x65\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x25\x73\x01\x6e\x0d\x0a\x0d\x0a" // 051 Regarding
,"\x20\x20\x01\x68\x01\x62\x52\x65\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x25\x73\x0d\x0a\x20\x20\x01\x62\x42\x79\x01\x6e\x01\x62"
"\x3a\x20\x01\x68\x01\x63\x25\x73\x20\x01\x62\x6f\x6e\x20\x01\x63\x25\x73\x01\x6e\x0d\x0a\x0d\x0a" // 052 RegardingByOn
,"\x20\x20\x01\x68\x01\x62\x52\x65\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x25\x73\x0d\x0a\x20\x20\x01\x62\x42\x79\x01\x6e\x01\x62"
"\x3a\x20\x01\x68\x01\x63\x25\x73\x20\x01\x62\x74\x6f\x20\x01\x63\x25\x73\x20\x01\x62\x6f\x6e\x20\x01\x63\x25\x73\x01\x6e\x0d\x0a"
"\x0d\x0a" // 053 RegardingByToOn
,"\x20\x20\x01\x68\x01\x62\x52\x65\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x40\x4d\x53\x47\x5f\x53\x55\x42\x4a\x45\x43\x54\x40\x01"
"\x6e\x0d\x0a\x0d\x0a" // 051 Regarding
,"\x20\x20\x01\x68\x01\x62\x52\x65\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x40\x4d\x53\x47\x5f\x53\x55\x42\x4a\x45\x43\x54\x40\x0d"
"\x0a\x20\x20\x01\x62\x42\x79\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x40\x4d\x53\x47\x5f\x46\x52\x4f\x4d\x5f\x4e\x41\x4d\x45\x40"
"\x20\x01\x62\x6f\x6e\x20\x01\x63\x40\x4d\x53\x47\x5f\x44\x41\x54\x45\x40\x01\x6e\x0d\x0a\x0d\x0a" // 052 RegardingByOn
,"\x20\x20\x01\x68\x01\x62\x52\x65\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x40\x4d\x53\x47\x5f\x53\x55\x42\x4a\x45\x43\x54\x40\x0d"
"\x0a\x20\x20\x01\x62\x42\x79\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x40\x4d\x53\x47\x5f\x46\x52\x4f\x4d\x5f\x4e\x41\x4d\x45\x40"
"\x20\x01\x62\x74\x6f\x20\x01\x63\x40\x4d\x53\x47\x5f\x54\x4f\x5f\x4e\x41\x4d\x45\x40\x20\x01\x62\x6f\x6e\x20\x01\x63\x40\x4d\x53"
"\x47\x5f\x44\x41\x54\x45\x40\x01\x6e\x0d\x0a\x0d\x0a" // 053 RegardingByToOn
,"\x44\x65\x6c\x65\x74\x65\x20\x6d\x61\x69\x6c\x20\x66\x72\x6f\x6d\x20\x25\x73" // 054 DeleteMailQ
,"\x4f\x4b" // 055 OK
,"\x0d\x0a\x01\x5f\x01\x62\x01\x68\x46\x6f\x72\x77\x61\x72\x64\x20\x6d\x61\x69\x6c\x20\x74\x6f\x3a\x20\x01\x77" // 056 ForwardMailTo
......@@ -433,7 +436,7 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x0d\x0a\x42\x75\x6c\x6b\x20\x55\x70\x6c\x6f\x61\x64\x20\x25\x73\x20\x25\x73\x20\x44\x69\x72\x65\x63\x74\x6f\x72\x79\x0d\x0a\x28"
"\x45\x6e\x74\x65\x72\x20\x27\x2d\x27\x20\x66\x6f\x72\x20\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6f\x6e\x20\x74\x6f\x20\x73\x6b\x69"
"\x70\x20\x66\x69\x6c\x65\x29\x3a\x0d\x0a" // 265 BulkUpload
,"\x01\x5f\x01\x79\x01\x68\x25\x2d\x31\x32\x73\x01\x77\x25\x37\x75\x6b\x01\x62\x3a" // 266 BulkUploadDescPrompt
,"\x01\x5f\x01\x79\x01\x68\x25\x2d\x31\x32\x73\x01\x77\x25\x37\x73\x01\x62\x3a" // 266 BulkUploadDescPrompt
,"\x0d\x0a\x01\x72\x01\x68\x01\x69\x4e\x6f\x20\x66\x69\x6c\x65\x73\x20\x69\x6e\x20\x62\x61\x74\x63\x68\x20\x71\x75\x65\x75\x65\x2e"
"\x01\x6e\x0d\x0a\x0d\x0a\x01\x6d\x55\x73\x65\x20\x01\x68\x44\x01\x6e\x01\x6d\x20\x6f\x72\x20\x01\x68\x55\x01\x6e\x01\x6d\x20\x74"
"\x6f\x20\x61\x64\x64\x20\x66\x69\x6c\x65\x73\x20\x74\x6f\x20\x74\x68\x65\x20\x71\x75\x65\x75\x65\x2e\x0d\x0a" // 267 NoFilesInBatchQueue
......
......@@ -531,8 +531,8 @@ bool sbbs_t::bulkupload(int dirnum)
if(strListFind(list, fname, /* case-sensitive: */FALSE) < 0) {
smb_freemsgmem(&f);
smb_hfield_str(&f, SMB_FILENAME, dirent->d_name);
off_t flen = flength(str);
bprintf(text[BulkUploadDescPrompt], format_filename(f.name, fname, 12, /* pad: */FALSE), flen/1024);
char tmp[64];
bprintf(text[BulkUploadDescPrompt], format_filename(f.name, fname, 12, /* pad: */FALSE), byte_estimate_to_str(flength(str), tmp, sizeof tmp, 1, 1));
if(strcmp(f.name, fname) != 0)
SAFECOPY(desc, f.name);
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment