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

Strip comments from text.dat string IDs (macros)

This fixes the issue with the ContinueQ setting in ctrl/text.??.ini when
attempting to use one of them to replace text.dat strings with localized text.
parent da320721
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -233,8 +233,8 @@ const char * const text_defaults[TOTAL_TEXT]={ ...@@ -233,8 +233,8 @@ const char * const text_defaults[TOTAL_TEXT]={
"\x68\x40\x2c\x20\x7e\x40\x41\x6c\x6c\x40\x2c\x20\x6f\x72\x20\x7e\x40\x51\x75\x69\x74\x40\x3a\x20" // 138 WhichOrAll "\x68\x40\x2c\x20\x7e\x40\x41\x6c\x6c\x40\x2c\x20\x6f\x72\x20\x7e\x40\x51\x75\x69\x74\x40\x3a\x20" // 138 WhichOrAll
,"\x0d\x0a\x52\x61\x77\x20\x49\x6e\x70\x75\x74\x2f\x4f\x75\x74\x70\x75\x74\x20\x4d\x6f\x64\x65\x20\x69\x73\x20\x6e\x6f\x77\x3a\x20" ,"\x0d\x0a\x52\x61\x77\x20\x49\x6e\x70\x75\x74\x2f\x4f\x75\x74\x70\x75\x74\x20\x4d\x6f\x64\x65\x20\x69\x73\x20\x6e\x6f\x77\x3a\x20"
"\x01\x68" // 139 RawMsgInputModeIsNow "\x01\x68" // 139 RawMsgInputModeIsNow
,"\x4f\x46\x46" // 140 Unused140 /* was OFF */ ,"\x4f\x46\x46" // 140 Unused140
,"\x4f\x4e" // 141 Unused141 /* was ON */ ,"\x4f\x4e" // 141 Unused141
,"\x0d\x0a\x01\x6e\x01\x6d\x50\x61\x67\x69\x6e\x67\x20\x01\x68\x25\x73\x20\x23\x25\x75\x01\x6e\x01\x6d\x20\x66\x6f\x72\x20\x70\x72" ,"\x0d\x0a\x01\x6e\x01\x6d\x50\x61\x67\x69\x6e\x67\x20\x01\x68\x25\x73\x20\x23\x25\x75\x01\x6e\x01\x6d\x20\x66\x6f\x72\x20\x70\x72"
"\x69\x76\x61\x74\x65\x20\x63\x68\x61\x74\x0d\x0a" // 142 PagingUser "\x69\x76\x61\x74\x65\x20\x63\x68\x61\x74\x0d\x0a" // 142 PagingUser
,"\x0d\x0a\x01\x2d\x01\x67\x53\x79\x73\x74\x65\x6d\x20\x53\x74\x61\x74\x69\x73\x74\x69\x63\x73\x3a\x0d\x0a\x0d\x0a\x01\x6e" // 143 SystemStatsHdr ,"\x0d\x0a\x01\x2d\x01\x67\x53\x79\x73\x74\x65\x6d\x20\x53\x74\x61\x74\x69\x73\x74\x69\x63\x73\x3a\x0d\x0a\x0d\x0a\x01\x6e" // 143 SystemStatsHdr
...@@ -902,7 +902,7 @@ const char * const text_defaults[TOTAL_TEXT]={ ...@@ -902,7 +902,7 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x0d\x0a\x01\x5f\x01\x77\x01\x68\x4e\x6f\x64\x65\x20\x25\x32\x64\x3a\x20\x01\x67\x25\x73\x01\x6e\x01\x67\x20\x6c\x65\x66\x74\x20" ,"\x0d\x0a\x01\x5f\x01\x77\x01\x68\x4e\x6f\x64\x65\x20\x25\x32\x64\x3a\x20\x01\x67\x25\x73\x01\x6e\x01\x67\x20\x6c\x65\x66\x74\x20"
"\x70\x72\x69\x76\x61\x74\x65\x20\x63\x68\x61\x74\x2e\x01\x6e\x0d\x0a" // 542 NodeLeftPrivateChat "\x70\x72\x69\x76\x61\x74\x65\x20\x63\x68\x61\x74\x2e\x01\x6e\x0d\x0a" // 542 NodeLeftPrivateChat
,"\x4e\x6f\x20\x6f\x6e\x65\x20\x68\x61\x73\x20\x6c\x6f\x67\x67\x65\x64\x20\x6f\x6e\x20\x74\x6f\x64\x61\x79\x2e\x0d\x0a" // 543 NoOneHasLoggedOnToday ,"\x4e\x6f\x20\x6f\x6e\x65\x20\x68\x61\x73\x20\x6c\x6f\x67\x67\x65\x64\x20\x6f\x6e\x20\x74\x6f\x64\x61\x79\x2e\x0d\x0a" // 543 NoOneHasLoggedOnToday
,"\x55\x4e\x55\x53\x45\x44\x35\x34\x34" // 544 Unused544 /* Was LastFewCallers */ ,"\x55\x4e\x55\x53\x45\x44\x35\x34\x34" // 544 Unused544
,"\x0d\x0a\x01\x6e\x01\x68\x01\x6d\x25\x2d\x32\x64\x20\x01\x6e\x01\x6d\x25\x2d\x36\x75\x20\x01\x77\x01\x68\x25\x2d\x32\x35\x2e\x32" ,"\x0d\x0a\x01\x6e\x01\x68\x01\x6d\x25\x2d\x32\x64\x20\x01\x6e\x01\x6d\x25\x2d\x36\x75\x20\x01\x77\x01\x68\x25\x2d\x32\x35\x2e\x32"
"\x35\x73\x20\x01\x6d\x25\x2d\x32\x35\x2e\x32\x35\x73\x01\x6e\x01\x6d\x25\x30\x32\x75\x3a\x25\x30\x32\x75\x20\x01\x68\x25\x2d\x38" "\x35\x73\x20\x01\x6d\x25\x2d\x32\x35\x2e\x32\x35\x73\x01\x6e\x01\x6d\x25\x30\x32\x75\x3a\x25\x30\x32\x75\x20\x01\x68\x25\x2d\x38"
"\x2e\x38\x73\x20\x01\x6e\x01\x6d\x25\x33\x64" // 545 LastFewCallersFmt "\x2e\x38\x73\x20\x01\x6e\x01\x6d\x25\x33\x64" // 545 LastFewCallersFmt
...@@ -939,7 +939,7 @@ const char * const text_defaults[TOTAL_TEXT]={ ...@@ -939,7 +939,7 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x4e\x6f" // 561 No ,"\x4e\x6f" // 561 No
,"\x40\x45\x58\x45\x43\x3a\x6e\x6f\x79\x65\x73\x62\x61\x72\x40" // 562 NoYesQuestion ,"\x40\x45\x58\x45\x43\x3a\x6e\x6f\x79\x65\x73\x62\x61\x72\x40" // 562 NoYesQuestion
,"\x01\x5f\x01\x72\x01\x68\x5b\x48\x69\x74\x20\x61\x20\x6b\x65\x79\x5d\x20" // 563 Pause ,"\x01\x5f\x01\x72\x01\x68\x5b\x48\x69\x74\x20\x61\x20\x6b\x65\x79\x5d\x20" // 563 Pause
,"\x43\x6f\x6e\x74\x69\x6e\x75\x65" // 564 ContinueQ /* was Wait */ ,"\x43\x6f\x6e\x74\x69\x6e\x75\x65" // 564 ContinueQ
,"\x01\x2d\x01\x67\x0d\x0a\x53\x79\x73\x74\x65\x6d\x20\x53\x74\x61\x74\x69\x73\x74\x69\x63\x73\x20\x4c\x6f\x67\x3a\x0d\x0a\x0d\x0a" ,"\x01\x2d\x01\x67\x0d\x0a\x53\x79\x73\x74\x65\x6d\x20\x53\x74\x61\x74\x69\x73\x74\x69\x63\x73\x20\x4c\x6f\x67\x3a\x0d\x0a\x0d\x0a"
"\x01\x6e" // 565 SysStatsLogHdr "\x01\x6e" // 565 SysStatsLogHdr
,"\x01\x2d\x01\x67\x0d\x0a\x4e\x6f\x64\x65\x20\x23\x25\x64\x20\x53\x74\x61\x74\x69\x73\x74\x69\x63\x73\x20\x4c\x6f\x67\x3a\x0d\x0a" ,"\x01\x2d\x01\x67\x0d\x0a\x4e\x6f\x64\x65\x20\x23\x25\x64\x20\x53\x74\x61\x74\x69\x73\x74\x69\x63\x73\x20\x4c\x6f\x67\x3a\x0d\x0a"
...@@ -1180,7 +1180,7 @@ const char * const text_defaults[TOTAL_TEXT]={ ...@@ -1180,7 +1180,7 @@ const char * const text_defaults[TOTAL_TEXT]={
,"" // 717 NodeActionPrivateChat ,"" // 717 NodeActionPrivateChat
,"" // 718 NodeActionPaging ,"" // 718 NodeActionPaging
,"" // 719 NodeActionRetrieving ,"" // 719 NodeActionRetrieving
,"\x59\x4e\x51\x2a" // 720 Unused720 /* Used to be YNQP */ ,"\x59\x4e\x51\x2a" // 720 Unused720
,"\x56\x69\x65\x77\x20\x73\x69\x67\x6e\x61\x74\x75\x72\x65" // 721 ViewSignatureQ ,"\x56\x69\x65\x77\x20\x73\x69\x67\x6e\x61\x74\x75\x72\x65" // 721 ViewSignatureQ
,"\x44\x65\x6c\x65\x74\x65\x20\x73\x69\x67\x6e\x61\x74\x75\x72\x65" // 722 DeleteSignatureQ ,"\x44\x65\x6c\x65\x74\x65\x20\x73\x69\x67\x6e\x61\x74\x75\x72\x65" // 722 DeleteSignatureQ
,"\x43\x72\x65\x61\x74\x65\x2f\x45\x64\x69\x74\x20\x73\x69\x67\x6e\x61\x74\x75\x72\x65" // 723 CreateEditSignatureQ ,"\x43\x72\x65\x61\x74\x65\x2f\x45\x64\x69\x74\x20\x73\x69\x67\x6e\x61\x74\x75\x72\x65" // 723 CreateEditSignatureQ
......
...@@ -140,8 +140,8 @@ const char* const text_id[]={ ...@@ -140,8 +140,8 @@ const char* const text_id[]={
,"SubPtrLstFmt" ,"SubPtrLstFmt"
,"WhichOrAll" ,"WhichOrAll"
,"RawMsgInputModeIsNow" ,"RawMsgInputModeIsNow"
,"Unused140 /* was OFF */" ,"Unused140"
,"Unused141 /* was ON */" ,"Unused141"
,"PagingUser" ,"PagingUser"
,"SystemStatsHdr" ,"SystemStatsHdr"
,"NodeStatsHdr" ,"NodeStatsHdr"
...@@ -544,7 +544,7 @@ const char* const text_id[]={ ...@@ -544,7 +544,7 @@ const char* const text_id[]={
,"NodeJoinedPrivateChat" ,"NodeJoinedPrivateChat"
,"NodeLeftPrivateChat" ,"NodeLeftPrivateChat"
,"NoOneHasLoggedOnToday" ,"NoOneHasLoggedOnToday"
,"Unused544 /* Was LastFewCallers */" ,"Unused544"
,"LastFewCallersFmt" ,"LastFewCallersFmt"
,"CallersToday" ,"CallersToday"
,"DoYouMeanThisUserQ" ,"DoYouMeanThisUserQ"
...@@ -564,7 +564,7 @@ const char* const text_id[]={ ...@@ -564,7 +564,7 @@ const char* const text_id[]={
,"No" ,"No"
,"NoYesQuestion" ,"NoYesQuestion"
,"Pause" ,"Pause"
,"ContinueQ /* was Wait */" ,"ContinueQ"
,"SysStatsLogHdr" ,"SysStatsLogHdr"
,"NodeStatsLogHdr" ,"NodeStatsLogHdr"
,"ReducedTime" ,"ReducedTime"
...@@ -720,7 +720,7 @@ const char* const text_id[]={ ...@@ -720,7 +720,7 @@ const char* const text_id[]={
,"NodeActionPrivateChat" ,"NodeActionPrivateChat"
,"NodeActionPaging" ,"NodeActionPaging"
,"NodeActionRetrieving" ,"NodeActionRetrieving"
,"Unused720 /* Used to be YNQP */" ,"Unused720"
,"ViewSignatureQ" ,"ViewSignatureQ"
,"DeleteSignatureQ" ,"DeleteSignatureQ"
,"CreateEditSignatureQ" ,"CreateEditSignatureQ"
......
...@@ -252,6 +252,7 @@ int main(int argc, char **argv) ...@@ -252,6 +252,7 @@ int main(int argc, char **argv)
fprintf(stderr,"Mismatch! %s has %ld... should be %d\n", comment, lno, i); fprintf(stderr,"Mismatch! %s has %ld... should be %d\n", comment, lno, i);
} }
fprintf(text_h, "\t%c%s\n", i==1?' ':',', macro); fprintf(text_h, "\t%c%s\n", i==1?' ':',', macro);
truncstr(macro, " \t");
fprintf(text_js, "var %s=%d;\n", macro, i); fprintf(text_js, "var %s=%d;\n", macro, i);
fprintf(text_id, "\t%c\"%s\"\n", i == 1 ? ' ' : ',', macro); fprintf(text_id, "\t%c\"%s\"\n", i == 1 ? ' ' : ',', macro);
fprintf(text_defaults_c, "\t%c%s // %s\n", i==1?' ':',', cstr, comment); fprintf(text_defaults_c, "\t%c%s // %s\n", i==1?' ':',', cstr, comment);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment