- Subject: Re: Stack Overflow problem
- From: Paul Boekholt <p.boekholt@xxxxxxxxx>
- Date: Sat, 6 Mar 2004 19:34:17 +0100
On Sat, Mar 06, 2004 at 10:52:15AM -0500, Brian Blais wrote:
> while (-1 != fgets (&line, fp)) {
>
> printf("%s",line);
> count=count+1;
>
> }
> If you comment out the printf, you have no problem.
Obviously, printf pushes something on the stack:
Int_Type printf (String_Type fmt, ...)
Try () = printf("%s",line);
> I would use a search, instead of a line-by-line scan, but I need a
> regular expression with OR (I'm looking for one of 3 things in the
> file, whichever one comes first). This doesn't seem to be supported in
> Slang. Any advice?
Depending on what you're trying to do, you could
- use slsh with the pcre module
- use sed
- use jed, read the file into a buffer, and search three times setting a
user_mark - user_marks can be compared, so you'd write something like
{
if (this_usermark < min_usermark)
min_usermark = this_usermark;
}
goto_user_mark(min_usermark);
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2004 date index]
[2004 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]