home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Pascal / BPASCAL.700 / D12 / GREP.ZIP / REGEXP.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1992-10-01  |  709 b   |  27 lines

  1. unit Regexp;
  2.  
  3. interface
  4.  
  5. type
  6.   HRegexp = Word;
  7.  
  8.   TRegMatch = record
  9.     Start: Word;        { Start of match }
  10.     Stop:  Word;        { End of match }
  11.   end;
  12.  
  13. function RegComp(Pattern: PChar; var Error: Integer): HRegexp;
  14. function RegExec(Regex: HRegexp; Str: PChar; var Match: TRegMatch): Integer;
  15. function RegError(Regex: HRegexp; Error: Integer;
  16.   ErrorBuf: array of Char): Integer;
  17. procedure RegFree(Regex: HRegexp);
  18.  
  19. implementation
  20.  
  21. procedure RegFree;              external 'REGEXP' index 2;
  22. function RegError;              external 'REGEXP' index 3;
  23. function RegExec;               external 'REGEXP' index 4;
  24. function RegComp;               external 'REGEXP' index 5;
  25.  
  26. end.
  27.