Mail Archives: djgpp/2004/12/18/19:12:40
> Did you know that
> _lfn_gen_short_fname
> does *not* actually return the true Windows Short Filename?
Proof? What does it return, then?
> Truncating a string with printf() Does anyone know if such a thing
> is possible?
Of course it is, if you read the directions.
> Using %-12s has no effect if the string is long;
Neither does using %d. Try using %.12s instead.
> Binary_Blocks_of_Data: What I'd also like to see is a tutorial on
> copying, concatenating, and searching Binary-Blocks of Data...
Nothing in C provides a "block of data" type. Files are either text,
organized into lines, or raw binary data, not organized at all. If
you want to apply some structure to the data, that's entirely up to
you. Neither C nor DJGPP has anything to do with it, aside from
providing the tools to get and put binary data from/to the file.
> on the fly... a function like memcat(), would be nice
Most programmers just keep the location in a separate variable, often
using a struct type to keep track of all the variables relating to a
block of data. This is not DJGPP specific, though. Any C tutorial
(try your local bookstore) should be able to teach you this.
- Raw text -