/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

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