Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!zaphod.mps.ohio-state.edu!mips!decwrl!shelby!agate!darkstar!cash!aryeh From: aryeh@cash.uucp (the over worked C something or another) Newsgroups: comp.lang.c Subject: how tmpname works Message-ID: <7372@darkstar.ucsc.edu> Date: 1 Oct 90 09:31:28 GMT Sender: usenet@darkstar.ucsc.edu Organization: WorldNet Lines: 54 From tmpname(3) or sunos4.1: > char *tmpnam (s) > char *s; > tmpnam() always generates a file name using the path-prefix > defined as P_tmpdir in the header file. If s is > NULL, tmpnam() leaves its result in an internal static area > and returns a pointer to that area. The next call to > tmpnam() will destroy the contents of the area. If _s is not > NULL, it is assumed to be the address of an array of at > least L_tmpnam bytes, where L_tmpnam is a constant defined > in ; tmpnam() places its result in that array and > returns s. I am to assume if I call tmpname once with a NULL arg and then call it again with a pointer to char s[...] that it will nuke the old L_tmpnam? Sun Release 4.0 Last change: 1 February 1988 2 -- Aryeh Friedman aryeh@cash.ucsc.edu or "ain't bug hunts the funnest" tsource@watnxt2.ucr.edu