- Subject: Re: (hints for parsing?)
- From: "Klaus Schmid" <klaus.schmid@xxxxxx>
- Date: Wed, 29 Jan 2003 21:45:59 +0100
Morten Bo Johansen on Wednesday, January 29, 2003 7:51 PM
> I am using the function that follows below to open files
> in a window where the filename is taken from lines like this:
>
> #: auth/pam.c:154 auth/sql.c:410 auth/sql.c:412
>
> and then jump to the line number that follows the filename.
> so in this case it will open "pam.c" in a window and jump to
> line 154. Its shortcoming is that it only opens the first
> file referenced. I would like it to be able to cycle through
> all the references in a line like the one above in turn, with
> a message in between to the user like: "press enter for next
> reference, 'q' to quit".
>
> I have looked at foreach but I am quite stuck so I could use
> some help, not neccesarily a ready-made solution but some
> pointers on how to do it.
Maybe you can use strtok with ": \t" as delimiting charset.
Then you may use a common for loop with step 2
to get any file with subsequent number.
-- Klaus
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2003 date index]
[2003 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]