temp.c (da52b4caaf187775f6b56a72c6b16e94ad728f7b) | temp.c (6d8484b0d0191b66f9bfd0dfa89c06a29647f02a) |
---|---|
1/* 2 * Copyright (c) 1980, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 33 unchanged lines hidden (view full) --- 42 * Mail -- a mail program 43 * 44 * Give names to all the temporary files that we will need. 45 */ 46 47char *tmpdir; 48 49void | 1/* 2 * Copyright (c) 1980, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 33 unchanged lines hidden (view full) --- 42 * Mail -- a mail program 43 * 44 * Give names to all the temporary files that we will need. 45 */ 46 47char *tmpdir; 48 49void |
50tinit() | 50tinit(void) |
51{ 52 char *cp; 53 54 if ((tmpdir = getenv("TMPDIR")) == NULL || *tmpdir == '\0') 55 tmpdir = _PATH_TMP; 56 if ((tmpdir = strdup(tmpdir)) == NULL) 57 errx(1, "Out of memory"); 58 /* Strip trailing '/' if necessary */ --- 30 unchanged lines hidden --- | 51{ 52 char *cp; 53 54 if ((tmpdir = getenv("TMPDIR")) == NULL || *tmpdir == '\0') 55 tmpdir = _PATH_TMP; 56 if ((tmpdir = strdup(tmpdir)) == NULL) 57 errx(1, "Out of memory"); 58 /* Strip trailing '/' if necessary */ --- 30 unchanged lines hidden --- |