[comp.sys.amiga] Wanted: fast string searching routine in C

etmjvro@sunbeam15.ericsson.se (John Vrolijk) (04/11/91)

 Hi there,
 I'm kinda new to this, so I hope this is the right group to ask
 these questions.
 First question:
 
 I'm working on a program that needs to extract the functions
 from the autodoc files. I've used the lattice/sas grep program,
 but this is not so fast. What I need is a program or routine in
 C that will enable me to search through a text file and search
 for a specified string. When the string is found, it should
 return some kind of pointer that states where the string was
 found (basically a linenumber or something like that). The next
 time the routine/program is called, the search should continue
 at the place where the previous search was ended. I know this
 sounds a bit like the EXECIO function in the WShell, but I
 cannot use this. Those of you who have been or are working on
 IBM mainframes, should know the EXECIO command. This has about
 the functionallity I'm looking for : example EXECIO * DISKR name
 type mode (LOCATE /string/
 This call will give back the line where the string was found,
 which can then be used in the calling program.
 If there is anybody out there who has some idea or better yet,
 the routine itself to do this kind of string searching, I would
 appriciate it if he/she can send me an answer back.
 
 
 My second question: has anybody ever written a program that uses
 the AREXX variable interface ? The question above is more or
 less related with this one. The search program should return
 information back to AREXX variables.
 
 I've read through the AREXX manual, but it is not very clear on
 the RVI (rexx variable interface).
 
 PS: My full name is John Vrolijk, we use abbreviation here for
 our userid's on the workstations.
 
 Thanks from a beginning programmer.