question about buffered output



hey all,

I'd like to make a 'rotating log' -- ie one that saves on space by allocating so many 
lines in a buffer, and then writes to that buffer, wrapping around when it reaches 
to a certain point (say 20000 carriage returns). Are there any glib functions that 
can help out with this, or am I better off writing my own? 

(ps - I already looked at the 'message output and debugging functions' - it didn't seem
like there was anything to help me there. I also looked at the array functionality, and 
there doesn't seem to be a 'replace' method for elements, presumably because of sizing
issues. Exactly how do you substitute one element for another (there's an insert and a 
remove, but I'd hate to have all that overhead, and it says specifically that the 
'void *' should not change in a given element.)

Ed



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]