Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   Your getline is better than mine (http://www.velocityreviews.com/forums/t556123-your-getline-is-better-than-mine.html)

Richard Harter 11-29-2007 09:11 PM

Your getline is better than mine
 

I have done an implementation of the file reading routine. The
"man page" is at http://home.tiac.net/~cri/2007/gflspec.html.
It contains links to a directory containing two source files
called getfline.c and getfline.h. The directory URL is
http://home.tiac.net/~cri_a/source_code/getfline/.

The code has been run through a test suite, but the suite was not
so extensive that I will guarantee that it is ironclad.
Corrections and suggestions are always welcome.

The routine does not check for an attempt to read the same file
at the same time from two different places. Presumably this
should be a catchable error. Incidentally I can't tell from the
standard what happens if you attempt to open a file that already
is open. (I'm looking at 7.9.5.3 and 7.9.5.4 from Plauger's "The
Standard C Library".) It's not clear to me how this should be
handled.

The license is a BSD license with an extra clause requiring that
modified versions be labeled as modified versions.


Richard Harter, cri@tiac.net
http://home.tiac.net/~cri, http://www.varinoma.com
In the fields of Hell where the grass grows high
Are the graves of dreams allowed to die


All times are GMT. The time now is 01:48 AM.

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