On 05/12/2010, at 7:26 AM, Erick Tryzelaar wrote: > On Saturday, December 4, 2010, john skaller > <skal...@users.sourceforge.net> wrote: >> >> On 05/12/2010, at 4:23 AM, Erick Tryzelaar wrote: >> >>>> >>>> If the code is inline .. I need a temporary filename! >>> >>> What about mkstemp? >> >> >> Ugg .. :) I guess so .. something like >> >> char x[20]; strcpy(x,"/tmp/xxXXXXXX"); >> close(mkstemp(x)); >> strcat(x,".flx"); >> FILE *a = fopen(x,"rw"); >> >> Ouch.. > > That behavior is in mktemp, but it's unsafe since someone else could > create that file before you open it. Why bother to close the file from > mkstemp? You can just pass the fd it returns to fdopen to get a FILE > pointer.
No I can't, because the stupid template has to end in XXXXXX and not *.cpp or *.flx or whatever that I require. It's probably easier to just use the process ID plus rand() function :) -- john skaller skal...@users.sourceforge.net ------------------------------------------------------------------------------ What happens now with your Lotus Notes apps - do you make another costly upgrade, or settle for being marooned without product support? Time to move off Lotus Notes and onto the cloud with Force.com, apps are easier to build, use, and manage than apps on traditional platforms. Sign up for the Lotus Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language