[nexuiz-commits] r8450 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Dec 23 13:41:00 EST 2009


Author: div0
Date: 2009-12-23 13:40:59 -0500 (Wed, 23 Dec 2009)
New Revision: 8450

Modified:
   trunk/data/qcsrc/server/extensions.qh
Log:
document DP_QC_SPRINTF


Modified: trunk/data/qcsrc/server/extensions.qh
===================================================================
--- trunk/data/qcsrc/server/extensions.qh	2009-12-23 09:06:58 UTC (rev 8449)
+++ trunk/data/qcsrc/server/extensions.qh	2009-12-23 18:40:59 UTC (rev 8450)
@@ -928,6 +928,26 @@
 //description:
 //useful math functions, sine of val, cosine of val, square root of val, and raise a to power b, respectively.
 
+//DP_QC_SPRINTF
+//idea: div0
+//darkplaces implementation: div0
+//builtin definitions:
+string(string format, ...) sprintf = #627;
+//description:
+//you know sprintf :P
+//supported stuff:
+//  %
+//  optional: <argpos>$ for the argument to format
+//  flags: #0- +
+//  optional: <width>, *, or *<argpos>$ for the field width
+//  optional: .<precision>, .*, or .*<argpos>$ for the precision
+//  length modifiers: h for forcing a float, l for forcing an int/entity (by default, %d etc. cast a float to int)
+//  conversions:
+//    di take a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to an int
+//    ouxXc take a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to an unsigned int
+//    eEfFgG take a float if no length is specified or h is, and an int/entity if l is specified as length, and cast it to a double
+//    s takes a string
+
 //DP_QC_STRFTIME
 //idea: LordHavoc
 //darkplaces implementation: LordHavoc



More information about the nexuiz-commits mailing list