From 5b67c195e4c04713405d33fc19421a9456778e3d Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 10 Jun 2012 18:44:36 +0200 Subject: [PATCH] sync dpdefs with DP --- qcsrc/dpdefs/dpextensions.qc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/qcsrc/dpdefs/dpextensions.qc b/qcsrc/dpdefs/dpextensions.qc index 114e84803..0a5504392 100644 --- a/qcsrc/dpdefs/dpextensions.qc +++ b/qcsrc/dpdefs/dpextensions.qc @@ -2487,6 +2487,28 @@ void(float bufhandle, float string_index) bufstr_free = #469; //cvars that start with pattern but not with antipattern will be stored into the buffer void(float bufhandle, string pattern, string antipattern) buf_cvarlist = #517; +//DP_QC_STRINGBUFFERS_EXT_WIP +//idea: VorteX +//darkplaces implementation: VorteX +//constant definitions: +const float MATCH_AUTO = 0; +const float MATCH_WHOLE = 1; +const float MATCH_LEFT = 2; +const float MATCH_RIGHT = 3; +const float MATCH_MIDDLE = 4; +const float MATCH_PATTERN = 5; +//builtin definitions: +float(string filename, float bufhandle) buf_loadfile = #535; // append each line of file as new buffer string, return 1 if succesful +float(float filehandle, float bufhandle, float startpos, float numstrings) buf_writefile = #536; // writes buffer strings as lines, returns 1 if succesful +float(float bufhandle, string match, float matchrule, float startpos, float step) bufstr_find = #537; // returns string index +float(string s, string pattern, float matchrule) matchpattern = #538; // returns 0/1 +float(string s, string pattern, float matchrule, float pos) matchpatternofs = #538; +//description: +//provides a set of functions to manipulate with string buffers +//pattern wildcards: * - any character (or no characters), ? - any 1 character +//Warning: This extension is work-in-progress, it may be changed/revamped/removed at any time, dont use it if you dont want any trouble +//wip note: UTF8 is not supported yet + //DP_QC_STRREPLACE //idea: Sajt //darkplaces implementation: Sajt -- 2.39.2