Re: Simple Parser

Discussion in 'C Programming' started by Bill Cunningham, Apr 11, 2004.


  1. > I recommend getc and putc, using real FILE* objects which you can
    > test by setting them to stdin and stdout in main(). Example:
    >
    >
    > int process_stream(FILE *in, FILE *out);
    >
    > int main()
    > {
    > process_stream(stdin, stdout);
    > return 0;
    > }


    I tried this code with djgpp and it wouldn't compile. There must be
    something wrong somewhere.

    Bill
    Bill Cunningham, Apr 11, 2004
    #1
    1. Advertising

  2. Bill Cunningham

    Mike Wahler Guest

    "Bill Cunningham" <> wrote in message
    news:...
    >
    > > I recommend getc and putc, using real FILE* objects which you can
    > > test by setting them to stdin and stdout in main(). Example:
    > >
    > >
    > > int process_stream(FILE *in, FILE *out);
    > >
    > > int main()
    > > {
    > > process_stream(stdin, stdout);
    > > return 0;
    > > }

    >
    > I tried this code with djgpp and it wouldn't compile. There must be
    > something wrong somewhere.
    >


    Did you #include <stdio.h> ?

    Of course it still won't link, until you provide a
    definition for 'process_stream()'

    -Mike
    Mike Wahler, Apr 12, 2004
    #2
    1. Advertising


  3. > Did you #include <stdio.h> ?
    >
    > Of course it still won't link, until you provide a
    > definition for 'process_stream()'
    >

    Oh of course in included stdio.h I think that's the only header
    necessarily to declare the FILE struct. This file is lacking an input and
    ouput function. The pointers *in and *out. Are they to be used as objects?
    in must = something as well as out. But what is the question?
    If I could parse textual input into it's binary compliment. That's what
    I want to do. There's no header of footer for a binary format descriptor of
    course. A real object file isn't being produced.

    Bill
    Bill Cunningham, Apr 13, 2004
    #3
  4. Bill Cunningham

    CBFalconer Guest

    Bill Cunningham wrote:
    >
    >> Did you #include <stdio.h> ?
    >>
    >> Of course it still won't link, until you provide a
    >> definition for 'process_stream()'
    >>

    > Oh of course in included stdio.h I think that's the only header
    > necessarily to declare the FILE struct. This file is lacking an
    > input and ouput function. The pointers *in and *out. Are they to
    > be used as objects? in must = something as well as out. But what
    > is the question?
    >
    > If I could parse textual input into it's binary compliment.
    > That's what I want to do. There's no header of footer for a
    > binary format descriptor of course. A real object file isn't
    > being produced.


    Orsber crbcyr fgneg fpernzvat 'Gebyy' urer, OP frrzf gb fhssre
    sebz n zragny qvfbeqre, naq uvf yhpvqvgl inevrf terngyl. Guvf vf
    n pbapyhfvba qenja sebz fbzr bs uvf zber yhpvq cbfgf va gur cnfg,
    naq ur frrzf gb whfg onggyr ba.

    You wouldn't believe the gyrations necessary to generate the above
    with my software! You have it easier.

    --
    Chuck F () ()
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net> USE worldnet address!
    CBFalconer, Apr 14, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bernd Oninger
    Replies:
    0
    Views:
    743
    Bernd Oninger
    Jun 9, 2004
  2. ZOCOR

    XML Parser VS HTML Parser

    ZOCOR, Oct 3, 2004, in forum: Java
    Replies:
    11
    Views:
    797
    Paul King
    Oct 5, 2004
  3. Bernd Oninger
    Replies:
    0
    Views:
    798
    Bernd Oninger
    Jun 9, 2004
  4. Joel Hedlund
    Replies:
    2
    Views:
    488
    Joel Hedlund
    Nov 11, 2006
  5. Joel Hedlund
    Replies:
    0
    Views:
    294
    Joel Hedlund
    Nov 11, 2006
Loading...

Share This Page