shurr@cbnews.ATT.COM (Larry A. Shurr) (02/28/89)
Has anyone compiled and used Henry Spencer's regexp(3X) package with Turbo C 2.0? I have encountered some sort of difficulty. I am using the regexp(3X) source recently posted as part of the pax program in a program of my own. With some regular expressions, it seems to work fine, no problems. With others, it's kablooey! For instance, "^.*(c|obj)$" (equivalent to "*@(c|obj)" in new Korn shell when applied to a list of filenames) seems to work fine. However, the similar pattern "^.*\.(c|obj)$" (equivalent to "*.@(c|obj)") causes my program to go to la-la land. I used egrep to verify that these regular expressions are valid and that they should produce the anticipated results. I am using large model. At first, I thought the stack was too small so I defined a larger stack (32K), but this did not help. Neither did a 40K or 50K stack. When I run with the debugger, and apply the RE given above which fails, I found that regexec(3X) finds a correct match (matches beachbal.c) then returns to the calling function, but with the stack apparently damaged because that function immediately "returns" to an arbitrary place in the middle of another function rather than to the place from which it was called. If you have any information or suggestions, please post or email. I will summarize any results. regards, Larry -- Signed: Larry A. Shurr (att!cbnews!cbema!las or osu-cis!apr!las) Clever signature, Wonderful wit, Outdo the others, Be a big hit! - Burma Shave (With apologies to the real thing. The above represents my views only.)
shurr@cbnews.ATT.COM (Larry A. Shurr) (03/01/89)
Recently I asked if anyone had encountered difficulties with Henry Spencer's regexp(3X) when using Turbo C 2.0. I was having difficulty, but as it turns out, the difficulty was my own fault. An obscure coding error on my part was overwriting a string and clobbering memory. Oddly enough, only regexp was being hurt by my mistake. Once I corrected the error, regexp worked fine. Therefore, there is no need to be concerned about using regexp with Turbo C 2.0. Sorry for the inconvenience. regards, Larry -- Signed: Larry A. Shurr (att!cbnews!cbema!las or osu-cis!apr!las) Clever signature, Wonderful wit, Outdo the others, Be a big hit! - Burma Shave (With apologies to the real thing. The above represents my views only.)