PageRenderTime 26ms CodeModel.GetById 15ms app.highlight 10ms RepoModel.GetById 0ms app.codeStats 0ms

/packages/libc/src/regexph.inc

https://github.com/slibre/freepascal
Pascal | 128 lines | 31 code | 6 blank | 91 comment | 0 complexity | e0be253a16fa559076c09400cc49e05e MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
  1
  2{$ifndef _REGEXP_H}
  3
  4const
  5   _REGEXP_H = 1;
  6{$include <features.h>}
  7{$include <alloca.h>}
  8{$include <regex.h>}
  9{$include <stdlib.h>}
 10{$include <string.h>}
 11  var
 12     loc1 : Pchar;cvar;external;
 13     loc2 : Pchar;cvar;external;
 14     locs : Pchar;cvar;external;
 15{$ifndef __DO_NOT_DEFINE_COMPILE}
 16(* error
 17{
 18 in declarator_list *)
 19  var
 20 : char;
 21(* error
 22  size_t __input_size = 0;
 23 in declarator_list *)
 24(* error
 25  size_t __current_size = 0;
 26 in declarator_list *)
 27     __ch : longint;cvar;public;
 28     __error : longint;cvar;public;
 29(* error
 30  regex_t *__expr_ptr;
 31 in declarator_list *)
 32{$if defined __GNUC__ && __GNUC__ >= 2}
 33(* error
 34  const size_t __req = __alignof__ (regex_t *);
 35 in declarator_list *)
 36{$else}
 37(* error
 38  const size_t __req = 8;
 39 in declarator_list *)
 40{$endif}
 41(* error
 42  expbuf += __req;
 43in declaration at line 122 *)
 44(* error
 45  expbuf -= (expbuf - ((char *) 0)) % __req;
 46in declaration at line 123 *)
 47(* error
 48  if (endbuf < expbuf + sizeof (regex_t))
 49 in declarator_list *)
 50(* error
 51    }
 52in declaration at line 128 *)
 53(* error
 54  __expr_ptr->buffer = expbuf + sizeof (regex_t);
 55(* error
 56  __expr_ptr->buffer = expbuf + sizeof (regex_t);
 57 in declarator_list *)
 58(* error
 59  __expr_ptr->allocated = endbuf -  (char *) __expr_ptr->buffer;
 60(* error
 61  __expr_ptr->allocated = endbuf -  (char *) __expr_ptr->buffer;
 62 in declarator_list *)
 63(* error
 64  while ((__ch = (GETC ())) != eof)
 65 in declarator_list *)
 66(* error
 67          break;
 68in declaration at line 139 *)
 69(* error
 70        }
 71in declaration at line 144 *)
 72(* error
 73          char *__new_room = (char *) alloca (__new_size);
 74 in declarator_list *)
 75(* error
 76          if (__new_room + __new_size == __input_buffer)
 77 in declarator_list *)
 78(* error
 79              __input_buffer = (char *) memcpy (__new_room, __input_buffer,
 80in declaration at line 151 *)
 81(* error
 82            }
 83in declaration at line 154 *)
 84(* error
 85            {
 86in declaration at line 157 *)
 87(* error
 88              __input_buffer = (char *) memcpy (__new_room, __input_buffer,
 89in declaration at line 159 *)
 90(* error
 91            }
 92in declaration at line 162 *)
 93(* error
 94    }
 95in declaration at line 164 *)
 96(* error
 97  __error = regcomp (__expr_ptr, __input_buffer, REG_NEWLINE);
 98in declaration at line 167 *)
 99(* error
100  if (__error != 0)
101 in declarator_list *)
102      var
103         REG_ESUBREG : case;cvar;public;
104         REG_EBRACK : case;cvar;public;
105         REG_EPAREN : case;cvar;public;
106         REG_EBRACE : case;cvar;public;
107         REG_BADBR : case;cvar;public;
108         REG_ERANGE : case;cvar;public;
109(* error
110      case REG_ESIZE:
111 in declarator_list *)
112(* error
113      }
114in declaration at line 200 *)
115(* error
116}
117{$endif}
118in declaration at line 210 *)
119
120function advance(__string:Pchar; __expbuf:Pchar):longint;cdecl;external clib name 'advance';
121{$endif}
122
123
124{ ---------------------------------------------------------------------
125    Borland compatibility types
126  ---------------------------------------------------------------------}
127
128// Type