On Sun, 2006-08-06 at 20:31 +0200, Per Jessen wrote:
Carl William Spitzer IV wrote:
it won't compile as you have some includes that don't exist on a typical linux system: dos.h, dir.h, process.h, alloc.h.
Next you'll have to look at uniquename() and fix you retrieve time and date - check time.h for some clues. fnsplit() and fnmerge() don't exist either, so you'll have to find equivalents or write them yourself.
That is why I asked I do not have any unix programming books to study.
You don't need any books - the man pages will tell you everything you need to know.
the file name split and merge routines should be simple string routines but the includes I can not begin to guess at.
Just remove the ones you don't have, then see what fails to compile. It's a trial-and-error exercise.
Of course, Jerry has already mentioned mkstemp which is the correct solution.
its not a tmp file program its a renaming program so mkstemp does not solve the problem. -- _______ _______ _______ __ / ____\ \ / / ____|_ _\ \ / / | | \ \ /\ / / (___ | | \ \ / / | | \ \/ \/ / \___ \ | | \ \/ / | |____ \ /\ / ____) |_| |_ \ / \_____| \/ \/ |_____/|_____| \/ | \ /|\ || |\ / |~~\ /~~\ /~~| //~~\ | \ / | \ || | X |__/| || |( `--. |__ | | \| \_/ / \ | \ \__/ \__| \\__/