C vs C++ vs Lisp (156)

60 Name: #!/usr/bin/anonymous : 2008-07-27 09:52 ID:o893+jN4

>>59
Oh, and FILE ** file because it will close it and set your copy to NULL if it reaches the end. The suits the way that I use it better.

And then there's a less control-freak append_from_descriptor function which I use for sockets mainly, etc.

So this is normal C programming, and there will NEVER be buffer overflows!

The only downside is that data is never shuffled, no in-memory-copies.

So If you have a long running buffer, and are using it as some kind of FIFO pipe or something, and it is never fully consumed, then it's size is just going to grow and grow and grow. And it never realloc's down, only up.

This is because it never starts from the begining unless it is "empty", obviously. But then I don't use it for stupid things, because as a programmer I use the best tool for the job. Simple.

This thread has been closed. You cannot post in this thread any longer.