From 9466df1be7b9af303f37eb0f3f7daba8218878d8 Mon Sep 17 00:00:00 2001 From: div0 Date: Wed, 23 Dec 2009 18:40:59 +0000 Subject: [PATCH] document DP_QC_SPRINTF git-svn-id: svn://svn.icculus.org/nexuiz/trunk@8450 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/extensions.qh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/data/qcsrc/server/extensions.qh b/data/qcsrc/server/extensions.qh index fb03ed84f..6b6fbed7e 100644 --- a/data/qcsrc/server/extensions.qh +++ b/data/qcsrc/server/extensions.qh @@ -928,6 +928,26 @@ float(float a, float b) pow = #97; //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: $ for the argument to format +// flags: #0- + +// optional: , *, or *$ for the field width +// optional: ., .*, or .*$ 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 -- 2.39.2