summary refs log tree commit diff stats
path: root/lib/wrappers/tre.nim
diff options
context:
space:
mode:
authorpdw <algorithicimperative@gmail.com>2015-05-24 22:50:19 -0500
committerAraq <rumpf_a@web.de>2015-06-04 13:18:40 +0200
commitcbd8da93f4eebf07df35866c0987eff4cdcd7d6a (patch)
tree67fdb5067bbfa7a54725d71c741b45c550befea5 /lib/wrappers/tre.nim
parentb2bc5440aa9748b0c7cf05688071cf012442e6ef (diff)
downloadNim-cbd8da93f4eebf07df35866c0987eff4cdcd7d6a.tar.gz
lib/wrappers/s-z - Dropped 'T' from types
Diffstat (limited to 'lib/wrappers/tre.nim')
-rw-r--r--lib/wrappers/tre.nim44
1 files changed, 23 insertions, 21 deletions
diff --git a/lib/wrappers/tre.nim b/lib/wrappers/tre.nim
index 92cd16333..36bf3cb69 100644
--- a/lib/wrappers/tre.nim
+++ b/lib/wrappers/tre.nim
@@ -27,16 +27,16 @@ const
 #   structs and enums ourselves. 
 
 type 
-  TRegoff* = cint
-  TRegex*{.pure, final.} = object 
+  Regoff* = cint
+  Regex*{.pure, final.} = object 
     re_nsub*: int          ## Number of parenthesized subexpressions. 
     value*: pointer        ## For internal use only. 
   
-  TRegmatch*{.pure, final.} = object 
-    rm_so*: TRegoff
-    rm_eo*: TRegoff
+  Regmatch*{.pure, final.} = object 
+    rm_so*: Regoff
+    rm_eo*: Regoff
 
-  TReg_errcode*{.size: 4.} = enum  ## POSIX tre_regcomp() return error codes. 
+  Reg_errcode*{.size: 4.} = enum  ## POSIX tre_regcomp() return error codes. 
                                    ## (In the order listed in the standard.)	 
     REG_OK = 0,               ## No error. 
     REG_NOMATCH,              ## No match. 
@@ -52,6 +52,8 @@ type
     REG_ERANGE,               ## Invalid use of range operator 
     REG_ESPACE,               ## Out of memory.  
     REG_BADRPT                ## Invalid use of repetition operators. 
+{.deprecated: [TRegoff: Regoff, TRegex: Regex, TRegmatch: Regmatch,
+              TReg_errcode: Reg_errcode].}
 
 # POSIX tre_regcomp() flags. 
 
@@ -88,22 +90,22 @@ const
 
 # The POSIX.2 regexp functions 
 
-proc regcomp*(preg: var TRegex, regex: cstring, cflags: cint): cint{.cdecl, 
+proc regcomp*(preg: var Regex, regex: cstring, cflags: cint): cint{.cdecl, 
     importc: "tre_regcomp", dynlib: treDll.}
-proc regexec*(preg: var TRegex, string: cstring, nmatch: int, 
-              pmatch: ptr TRegmatch, eflags: cint): cint{.cdecl, 
+proc regexec*(preg: var Regex, string: cstring, nmatch: int, 
+              pmatch: ptr Regmatch, eflags: cint): cint{.cdecl, 
     importc: "tre_regexec", dynlib: treDll.}
-proc regerror*(errcode: cint, preg: var TRegex, errbuf: cstring, 
+proc regerror*(errcode: cint, preg: var Regex, errbuf: cstring, 
                errbuf_size: int): int{.cdecl, importc: "tre_regerror", 
     dynlib: treDll.}
-proc regfree*(preg: var TRegex){.cdecl, importc: "tre_regfree", dynlib: treDll.}
+proc regfree*(preg: var Regex){.cdecl, importc: "tre_regfree", dynlib: treDll.}
 # Versions with a maximum length argument and therefore the capability to
 #   handle null characters in the middle of the strings (not in POSIX.2). 
 
-proc regncomp*(preg: var TRegex, regex: cstring, len: int, cflags: cint): cint{.
+proc regncomp*(preg: var Regex, regex: cstring, len: int, cflags: cint): cint{.
     cdecl, importc: "tre_regncomp", dynlib: treDll.}
-proc regnexec*(preg: var TRegex, string: cstring, len: int, nmatch: int, 
-               pmatch: ptr TRegmatch, eflags: cint): cint{.cdecl, 
+proc regnexec*(preg: var Regex, string: cstring, len: int, nmatch: int, 
+               pmatch: ptr Regmatch, eflags: cint): cint{.cdecl, 
     importc: "tre_regnexec", dynlib: treDll.}
 # Approximate matching parameter struct. 
 
@@ -124,7 +126,7 @@ type
 type 
   TRegamatch*{.pure, final.} = object 
     nmatch*: int              ## Length of pmatch[] array. 
-    pmatch*: ptr TRegmatch    ## Submatch data. 
+    pmatch*: ptr Regmatch     ## Submatch data. 
     cost*: cint               ## Cost of the match. 
     num_ins*: cint            ## Number of inserts in the match. 
     num_del*: cint            ## Number of deletes in the match. 
@@ -133,10 +135,10 @@ type
 
 # Approximate matching functions. 
 
-proc regaexec*(preg: var TRegex, string: cstring, match: ptr TRegamatch, 
+proc regaexec*(preg: var Regex, string: cstring, match: ptr TRegamatch, 
                params: TRegaparams, eflags: cint): cint{.cdecl, 
     importc: "tre_regaexec", dynlib: treDll.}
-proc reganexec*(preg: var TRegex, string: cstring, len: int, 
+proc reganexec*(preg: var Regex, string: cstring, len: int, 
                 match: ptr TRegamatch, params: TRegaparams, 
                 eflags: cint): cint{.
     cdecl, importc: "tre_reganexec", dynlib: treDll.}
@@ -155,8 +157,8 @@ type
     context*: pointer
 
 
-proc reguexec*(preg: var TRegex, string: ptr TStrSource, nmatch: int, 
-               pmatch: ptr TRegmatch, eflags: cint): cint{.cdecl, 
+proc reguexec*(preg: var Regex, string: ptr TStrSource, nmatch: int, 
+               pmatch: ptr Regmatch, eflags: cint): cint{.cdecl, 
     importc: "tre_reguexec", dynlib: treDll.}
 
 proc runtimeVersion*(): cstring{.cdecl, importc: "tre_version", dynlib: treDll.}
@@ -177,10 +179,10 @@ const
 
 # Returns 1 if the compiled pattern has back references, 0 if not. 
 
-proc have_backrefs*(preg: var TRegex): cint{.cdecl, 
+proc have_backrefs*(preg: var Regex): cint{.cdecl, 
     importc: "tre_have_backrefs", dynlib: treDll.}
 # Returns 1 if the compiled pattern uses approximate matching features,
 #   0 if not. 
 
-proc have_approx*(preg: var TRegex): cint{.cdecl, importc: "tre_have_approx", 
+proc have_approx*(preg: var Regex): cint{.cdecl, importc: "tre_have_approx", 
     dynlib: treDll.}