Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   Re: Bug/Gross InEfficiency in HeathField's fgetline program (http://www.velocityreviews.com/forums/t550046-re-bug-gross-inefficiency-in-heathfields-fgetline-program.html)

Dik T. Winter 11-07-2007 12:57 PM

Re: Bug/Gross InEfficiency in HeathField's fgetline program
 
In article <ddydnesN7r6zP6zanZ2dneKdnZydnZ2d@bt.com> rjh@see.sig.invalid 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/

Richard 11-07-2007 01:36 PM

Re: Bug/Gross InEfficiency in HeathField's fgetline program
 
"Dik T. Winter" <Dik.Winter@cwi.nl> writes:

> In article <ddydnesN7r6zP6zanZ2dneKdnZydnZ2d@bt.com> rjh@see.sig.invalid 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.

Charlie Gordon 11-07-2007 01:38 PM

Re: Bug/Gross InEfficiency in HeathField's fgetline program
 
"Dik T. Winter" <Dik.Winter@cwi.nl> a écrit dans le message de news:
Jr4zz3.FzM@cwi.nl...
> In article <ddydnesN7r6zP6zanZ2dneKdnZydnZ2d@bt.com> rjh@see.sig.invalid
> 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.




All times are GMT. The time now is 01:37 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.