Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | John Gordon <gordon@panix.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: stream functions |
| Date | 2012-02-08 21:09 +0000 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <jguo9o$lop$1@reader1.panix.com> (permalink) |
| References | <4f319cb1$0$1049$bbae4d71@news.suddenlink.net> <jgsar8$g8o$1@reader1.panix.com> <4f31b446$0$1075$bbae4d71@news.suddenlink.net> <jgu3f7$quk$1@reader1.panix.com> <4f32e0fa$0$1300$bbae4d71@news.suddenlink.net> |
In <4f32e0fa$0$1300$bbae4d71@news.suddenlink.net> "Bill Cunningham" <nospam@nspam.invalid> writes:
> Ok so with a page of text, like a man page for example; scanning that
> text would best be done with what? scanf or fscanf?
I'd use fgets to read the lines of text and store them in an array.
After that, it depends how the information is formatted. If the text
is arranged in columns, sscanf might be a good candidate for picking
out individual pieces of information. Or if it's plain free-form text,
strstr might be a better choice.
--
John Gordon A is for Amy, who fell down the stairs
gordon@panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
stream functions "Bill Cunningham" <nospam@nspam.invalid> - 2012-02-07 16:50 -0500
Re: stream functions John Gordon <gordon@panix.com> - 2012-02-07 23:07 +0000
Re: stream functions "Bill Cunningham" <nospam@nspam.invalid> - 2012-02-07 18:31 -0500
Re: stream functions "Bill Cunningham" <nospam@nspam.invalid> - 2012-02-07 18:33 -0500
Re: stream functions Johann Klammer <klammerj@NOSPAM.a1.net> - 2012-02-08 02:39 +0100
Re: stream functions Keith Thompson <kst-u@mib.org> - 2012-02-07 18:39 -0800
Re: stream functions "Bill Cunningham" <nospam@nspam.invalid> - 2012-02-07 22:36 -0500
Re: stream functions Nobody <nobody@nowhere.com> - 2012-02-08 19:43 +0000
Re: stream functions Barry Schwarz <schwarzb@dqel.com> - 2012-02-07 21:01 -0800
Re: stream functions John Gordon <gordon@panix.com> - 2012-02-08 15:13 +0000
Re: stream functions "Bill Cunningham" <nospam@nspam.invalid> - 2012-02-08 15:54 -0500
Re: stream functions John Gordon <gordon@panix.com> - 2012-02-08 21:09 +0000
Re: stream functions "Bill Cunningham" <nospam@nspam.invalid> - 2012-02-08 17:37 -0500
Re: stream functions John Gordon <gordon@panix.com> - 2012-02-08 23:16 +0000
Re: stream functions Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-02-13 02:14 -0800
Re: stream functions James Kuyper <jameskuyper@verizon.net> - 2012-02-13 05:53 -0500
Re: stream functions Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-02-13 03:23 -0800
Re: stream functions Markus Wichmann <nullplan@gmx.net> - 2012-02-14 21:50 +0100
Re: stream functions "Heinrich Wolf" <invalid@invalid.invalid> - 2012-02-09 10:45 +0100
Re: stream functions "Bill Cunningham" <nospam@nspam.invalid> - 2012-02-09 22:37 -0500
Re: stream functions Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-02-13 02:17 -0800
Re: stream functions gordonb.qxgs4@burditt.org (Gordon Burditt) - 2012-02-13 01:03 -0600
Re: stream functions Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-02-13 08:23 +0000
Re: stream functions Keith Thompson <kst-u@mib.org> - 2012-02-13 02:06 -0800
Re: stream functions David Thompson <dave.thompson2@verizon.net> - 2012-02-18 23:12 -0500
csiph-web