News for hackers. Stuff that matters.
Re:Deconstructing "K&R C" by shabble on Tuesday January 10, 2012 @08:55PM (#3450119)
I didn't see it yet from a quick skim of the available chapters, but I'm going to guess that his preferred alternative is 'bstr - The Better String Library' - http://bstring.sourceforge.net/

I've used it the past, and I try to include it in any project that isn't immediately trivial, although the to/from integration with just about all library code ever is a bit of a hassle.

Re:Deconstructing "K&R C" by tptacek on Tuesday January 10, 2012 @09:10PM (#3450157)
It's not just that the to/from is a hassle, it's also that you have to deeply understand the gotchas of ASCIIZ strings to safely do that bridging at all --- so pretending it doesn't exist is probably not a good teaching strategy. (I have no opinion about the article and am only commenting on this thread because I like C).
Re:Deconstructing "K&R C" by zedshaw on Wednesday January 11, 2012 @12:06AM (#3450525)
I do not pretend anything about null-terminated strings in the book. In fact, I have many exercises and assignments where they use Valgrind to buffer overflow C strings repeatedly and don't introduce bstring until much later.
Re:Deconstructing "K&R C" by tptacek on Wednesday January 11, 2012 @12:55AM (#3450625)
Sorry, I haven't read your book, meant to be clear that I was talking in the abstract, but I can see after rereading I wasn't clear enough.
Re:Deconstructing "K&R C" by zedshaw on Wednesday January 11, 2012 @12:04AM (#3450521)
I use bstring but there's a few others. Generally it's the easiest way to avoid some common buffer overflows and other problems.