Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!apple!amdahl!kevin From: kevin@uts.amdahl.com (Kevin Clague) Newsgroups: comp.sys.amiga.tech Subject: Re: regex.library - regular expression library Message-ID: <7emG02=U3fCx01@amdahl.uts.amdahl.com> Date: 17 Jul 89 14:49:43 GMT References: <59256@linus.UUCP> <15161@watdragon.waterloo.edu> Reply-To: kevin@amdahl.uts.amdahl.com (Kevin Clague) Organization: Amdahl Corporation, Sunnyvale, CA 94086 Lines: 44 In article <15161@watdragon.waterloo.edu> ehoogerbeets@rose.waterloo.edu (Edwin Hoogerbeets) writes: > >Hi, I just managed to shoehorn the Gnu regular expression package >into an Amiga sharable library. (with some assembler glue) > >And it works. Almost. That is, it works only if you have one copy >running at a time. So I suspect there is something in there that isn't >re-entrant. > >I've attached the global variables to the struct RegexBase, so they are >different for each OpenLibrary() call. That does not seem to be the >problem. I do have to use the Manx heapmem.o to access the realloc() >call. > >My question is this: are the routines in heapmem.o re-entrant? (ie. >free(), malloc(), realloc()) Are there any other Manx library routines >that I should avoid? None of the Manx library routines are guaranteed to be reentrant :-( If you have the source to the libraries, you could look at all the functions you use and check their source. Another solution would be to write your own version of all the lib functions you use. You might want (need) to hack at the GNU code to make it use Amiga functions whenever possible. This is, of course, more work. > >If I get this resolved, I shall send it to Bob soon. (no excuse for >not having regular expression searching anymore! Like in dme, hint, >hint... ;-) > >Thanks for any suggestions. > >Edwin Kevin -- UUCP: kevin@uts.amdahl.com or: {sun,decwrl,hplabs,pyramid,seismo,oliveb}!amdahl!kevin DDD: 408-737-5481 USPS: Amdahl Corp. M/S 249, 1250 E. Arques Av, Sunnyvale, CA 94086 [ Any thoughts or opinions which may or may not have been expressed ] [ herein are my own. They are not necessarily those of my employer. ]