]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
strcat(): update QC defs to match implementation
authorbones_was_here <bones_was_here@xonotic.au>
Sat, 22 Jul 2023 09:27:29 +0000 (19:27 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Sat, 22 Jul 2023 09:27:29 +0000 (19:27 +1000)
Xonotic was defining strcat1n to allow single-arg cases without
boilerplate...

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
clvm_cmds.c
dpdefs/csprogsdefs.qc
dpdefs/dpextensions.qc
dpdefs/menudefs.qc
prvm_cmds.c
svvm_cmds.c

index 05bb57a934d3f3cb743470fefbf7b6432771fd7c..8ccc97fa630fd76b90a686fcacc568dc8e985d9c 100644 (file)
@@ -5090,7 +5090,7 @@ VM_fclose,                                                // #111 void(float fhandle) fclose (FRIK_FILE)
 VM_fgets,                                              // #112 string(float fhandle) fgets (FRIK_FILE)
 VM_fputs,                                              // #113 void(float fhandle, string s) fputs (FRIK_FILE)
 VM_strlen,                                             // #114 float(string s) strlen (FRIK_FILE)
-VM_strcat,                                             // #115 string(string s1, string s2, ...) strcat (FRIK_FILE)
+VM_strcat,                                             // #115 string(string s, string...) strcat (FRIK_FILE)
 VM_substring,                                  // #116 string(string s, float start, float length) substring (FRIK_FILE)
 VM_stov,                                               // #117 vector(string) stov (FRIK_FILE)
 VM_strzone,                                            // #118 string(string s) strzone (FRIK_FILE)
index b396e84b9f2bc5c90ea3dbfda9a4b018d07fcaab..d78e6b0b425c3a0fe5e5cf9e6f5d3dadc6e4b684 100644 (file)
@@ -430,7 +430,7 @@ void(float fhandle) fclose = #111;
 string(float fhandle) fgets = #112;
 void(float fhandle, string s) fputs = #113;
 float(string s) strlen = #114;
-string(...) strcat = #115;
+string(string s, string...) strcat = #115;
 string(string s, float start, float length) substring = #116;
 vector(string) stov = #117;
 string(string s) strzone = #118;
index 73996cbf4eda687fcd986157a1e9a19a2cb277e6..faf6dcdd2b53f5d31fd11a7a47921e2b4042fba2 100644 (file)
@@ -2140,7 +2140,7 @@ void(float fhandle) fclose = #111; // closes a file
 string(float fhandle) fgets = #112; // reads a line of text from the file and returns as a tempstring
 void(float fhandle, string s, ...) fputs = #113; // writes a line of text to the end of the file
 float(string s) strlen = #114; // returns how many characters are in a string
-string(string s1, string s2, ...) strcat = #115; // concatenates two or more strings (for example "abc", "def" would return "abcdef") and returns as a tempstring
+string(string s, string...) strcat = #115; // concatenates 1 to 8 strings (for example "abc", "def" would return "abcdef") and returns as a tempstring
 string(string s, float start, float length) substring = #116; // returns a section of a string as a tempstring - see FTE_STRINGS for enhanced version
 vector(string s) stov = #117; // returns vector value from a string
 string(string s, ...) strzone = #118; // makes a copy of a string into the string zone and returns it, this is often used to keep around a tempstring for longer periods of time (tempstrings are replaced often)
index 1278dd710a8052bd77db771c258db428be8c0904..b987491b7cf778c5ea33bcfb2f783851b5a60461 100644 (file)
@@ -246,7 +246,7 @@ string      fgets(float fhandle)  = #50;
 void   fputs(float fhandle, string s)  = #51;
 
 float  strlen(string s)  = #52;
-string strcat(string s1,string s2,...)  = #53;
+string strcat(string s, string...)  = #53;
 string substring(string s, float start, float length)  = #54;
 
 vector stov(string s)  = #55;
index e8c54bb2fe9a045eae0ea214b3f4f633d4632d57..0d281e62ce7f9672edcd6da82f0a6bb5af5c56c2 100644 (file)
@@ -2322,11 +2322,11 @@ void VM_strtoupper(prvm_prog_t *prog)
 =========
 VM_strcat
 
-string strcat(string,string,...[string])
+string strcat(string s, string...)
 =========
 */
-//string(string s1, string s2) strcat = #115;
-// concatenates two strings (for example "abc", "def" would return "abcdef")
+//string(string s, string...) strcat = #115;
+// concatenates strings (for example "abc", "def" would return "abcdef")
 // and returns as a tempstring
 void VM_strcat(prvm_prog_t *prog)
 {
index 3692bc2f42c588d099bdca2fdc12f3788fe50120..a9d50af10c50008f3640642f8e8ac0a622eda71e 100644 (file)
@@ -3379,7 +3379,7 @@ VM_fclose,                                                // #111 void(float fhandle) fclose (FRIK_FILE)
 VM_fgets,                                              // #112 string(float fhandle) fgets (FRIK_FILE)
 VM_fputs,                                              // #113 void(float fhandle, string s) fputs (FRIK_FILE)
 VM_strlen,                                             // #114 float(string s) strlen (FRIK_FILE)
-VM_strcat,                                             // #115 string(string s1, string s2, ...) strcat (FRIK_FILE)
+VM_strcat,                                             // #115 string(string s, string...) strcat (FRIK_FILE)
 VM_substring,                                  // #116 string(string s, float start, float length) substring (FRIK_FILE)
 VM_stov,                                               // #117 vector(string) stov (FRIK_FILE)
 VM_strzone,                                            // #118 string(string s) strzone (FRIK_FILE)