2 * Sherlock Library -- Temporary Files
4 * (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
17 static int seeded = 0;
26 rand += key * 0xdeadbeef;
31 open_temp(struct tempfile *tf, byte *tftype)
36 sprintf(tf->name, TMP_DIR "/%s%08x", tftype, temprand(retry));
37 tf->fh = open(tf->name, O_RDWR | O_CREAT | O_EXCL, 0666);
41 die("Unable to create temporary file");
45 delete_temp(struct tempfile *tf)