Re: Bug/Gross InEfficiency in HeathField's fgetline program

Discussion in 'C Programming' started by Dik T. Winter, Nov 7, 2007.

  1. In article <> lid writes:
    > Charlie Gordon said:
    >
    > <snip>
    >
    > > Actually, I don't know why I am arguing with you on this issue: I can't
    > > think of any compelling reason to even include this function in the
    > > Standard.

    >
    > Neither can I


    I can. Because it was in K&R C. And it was in K&R C to manipulate
    file names in Unix V6 (maximal 14 characters, not necessarily null
    terminated, but if shorter null filled).
    --
    dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
    home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
    Dik T. Winter, Nov 7, 2007
    #1
    1. Advertising

  2. Dik T. Winter

    Richard Guest

    "Dik T. Winter" <> writes:

    > In article <> lid writes:
    > > Charlie Gordon said:
    > >
    > > <snip>
    > >
    > > > Actually, I don't know why I am arguing with you on this issue: I can't
    > > > think of any compelling reason to even include this function in the
    > > > Standard.

    > >
    > > Neither can I

    >
    > I can. Because it was in K&R C. And it was in K&R C to manipulate
    > file names in Unix V6 (maximal 14 characters, not necessarily null
    > terminated, but if shorter null filled).


    I can too. To insert sub strings into pre-formatted string buffers.
    Richard, Nov 7, 2007
    #2
    1. Advertising

  3. "Dik T. Winter" <> a écrit dans le message de news:
    ...
    > In article <> lid
    > writes:
    > > Charlie Gordon said:
    > >
    > > <snip>
    > >
    > > > Actually, I don't know why I am arguing with you on this issue: I
    > > > can't
    > > > think of any compelling reason to even include this function in the
    > > > Standard.

    > >
    > > Neither can I

    >
    > I can. Because it was in K&R C. And it was in K&R C to manipulate
    > file names in Unix V6 (maximal 14 characters, not necessarily null
    > terminated, but if shorter null filled).


    You are refering to the directory structure used in Unix V6, and some other
    obscure accounting files. That hardly qualifies as compelling for inclusion
    in c89. Such use was completely specific to the underlying operating
    system, just like the system calls. strdup was also present in K&R C, as an
    example from the book, but was not included in the Standard.

    --
    Chqrlie.
    Charlie Gordon, Nov 7, 2007
    #3
    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. Jeff Rodriguez
    Replies:
    4
    Views:
    436
    Jeff Rodriguez
    Nov 17, 2003
  2. Program inefficiency?

    , Sep 29, 2007, in forum: Python
    Replies:
    17
    Views:
    610
    Florian Schmidt
    Oct 1, 2007
  3. Replies:
    6
    Views:
    301
    Dimiter \malkia\ Stanev
    Oct 1, 2007
  4. Antoninus Twink

    Bug/Gross InEfficiency in HeathField's fgetline program

    Antoninus Twink, Oct 7, 2007, in forum: C Programming
    Replies:
    436
    Views:
    6,039
    user923005
    Nov 13, 2007
  5. Antoninus Twink

    K&R2 ex. 2-4: Heathfield's gross inefficiency

    Antoninus Twink, May 12, 2009, in forum: C Programming
    Replies:
    37
    Views:
    991
    Antoninus Twink
    May 21, 2009
Loading...

Share This Page