vars.c (1591) | vars.c (74769) |
---|---|
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 --- 18 unchanged lines hidden (view full) --- 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint | 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 --- 18 unchanged lines hidden (view full) --- 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint |
35#if 0 |
|
35static char sccsid[] = "@(#)vars.c 8.1 (Berkeley) 6/6/93"; | 36static char sccsid[] = "@(#)vars.c 8.1 (Berkeley) 6/6/93"; |
37#endif 38static const char rcsid[] = 39 "$FreeBSD: head/usr.bin/mail/vars.c 74769 2001-03-25 04:57:05Z mikeh $"; |
|
36#endif /* not lint */ 37 38#include "rcv.h" 39#include "extern.h" 40 41/* 42 * Mail -- a mail program 43 * --- 47 unchanged lines hidden (view full) --- 91{ 92 char *new; 93 unsigned len; 94 95 if (*str == '\0') 96 return ""; 97 len = strlen(str) + 1; 98 if ((new = malloc(len)) == NULL) | 40#endif /* not lint */ 41 42#include "rcv.h" 43#include "extern.h" 44 45/* 46 * Mail -- a mail program 47 * --- 47 unchanged lines hidden (view full) --- 95{ 96 char *new; 97 unsigned len; 98 99 if (*str == '\0') 100 return ""; 101 len = strlen(str) + 1; 102 if ((new = malloc(len)) == NULL) |
99 panic("Out of memory"); | 103 err(1, "Out of memory"); |
100 bcopy(str, new, (int) len); 101 return new; 102} 103 104/* 105 * Get the value of a variable and return it. 106 * Look in the environment if its not available locally. 107 */ --- 83 unchanged lines hidden --- | 104 bcopy(str, new, (int) len); 105 return new; 106} 107 108/* 109 * Get the value of a variable and return it. 110 * Look in the environment if its not available locally. 111 */ --- 83 unchanged lines hidden --- |