aboutsummaryrefslogtreecommitdiff
path: root/drivers/trex/test.c
diff options
context:
space:
mode:
authorAnton Yabchinskiy2015-07-29 23:01:36 +0300
committerAnton Yabchinskiy2015-07-29 23:01:36 +0300
commitdc8df8a91a995796f0f330bf6bb6b209f6dfce08 (patch)
tree46cfe09124703b07860754d6b44e0289422e0573 /drivers/trex/test.c
parent16746f157f83d666079ba3266acec13d35b84c3f (diff)
parent922356b903061cda7591090bf19e8346c3a78cf5 (diff)
downloadgodot-dc8df8a91a995796f0f330bf6bb6b209f6dfce08.tar.gz
godot-dc8df8a91a995796f0f330bf6bb6b209f6dfce08.tar.zst
godot-dc8df8a91a995796f0f330bf6bb6b209f6dfce08.zip
Merge branch 'master' of github.com:okamstudio/godot
Diffstat (limited to 'drivers/trex/test.c')
-rw-r--r--drivers/trex/test.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/trex/test.c b/drivers/trex/test.c
deleted file mode 100644
index 69db49c1a..000000000
--- a/drivers/trex/test.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#include "trex.h"
-#include <stdio.h>
-#include <string.h>
-
-#ifdef _UNICODE
-#define trex_sprintf swprintf
-#else
-#define trex_sprintf sprintf
-#endif
-
-int main(int argc, char* argv[])
-{
- const TRexChar *begin,*end;
- TRexChar sTemp[200];
- const TRexChar *error = NULL;
- TRex *x = trex_compile(_TREXC("(x{1,5})xx"),&error);
- if(x) {
- trex_sprintf(sTemp,_TREXC("xxxxxxx"));
- if(trex_search(x,sTemp,&begin,&end))
- {
- int i,n = trex_getsubexpcount(x);
- TRexMatch match;
- for(i = 0; i < n; i++)
- {
- TRexChar t[200];
- trex_getsubexp(x,i,&match);
- trex_sprintf(t,_TREXC("[%%d]%%.%ds\n"),match.len);
- trex_printf(t,i,match.begin);
- }
- trex_printf(_TREXC("match! %d sub matches\n"),trex_getsubexpcount(x));
- }
- else {
- trex_printf(_TREXC("no match!\n"));
- }
- trex_free(x);
- }
- else {
- trex_printf(_TREXC("compilation error [%s]!\n"),error?error:_TREXC("undefined"));
- }
- return 0;
-}