comparison uip/slocal.c @ 12:441a2190cfae

Lion fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 21 Apr 2012 13:10:49 +0900
parents bce86c4163a3
children 3c5835cca094
comparison
equal deleted inserted replaced
11:5cf052bee63d 12:441a2190cfae
1 /* slocal.c - MH style mailer to write to a local user's mailbox */ 1 /* slocal.c - MH style mailer to write to a local user's mailbox */
2 #ifndef lint 2 #ifndef lint
3 static char ident[] = "@(#)$Id$"; 3 static char ident[] = "@(#)$Id: slocal.c,v 1.1.1.1 2005/04/18 14:46:07 kono Exp $";
4 #endif /* lint */ 4 #endif /* lint */
5 5
6 /* This program implements mail delivery in the MH/MMDF style. 6 /* This program implements mail delivery in the MH/MMDF style.
7 7
8 Under SendMail, users should add the line 8 Under SendMail, users should add the line
67 #include <sys/types.h> 67 #include <sys/types.h>
68 #include <sys/file.h> 68 #include <sys/file.h>
69 #ifdef SYS5 69 #ifdef SYS5
70 #include <fcntl.h> 70 #include <fcntl.h>
71 #endif 71 #endif
72 #ifdef UNISTD 72 //#ifdef UNISTD
73 #include <unistd.h> 73 #include <unistd.h>
74 #endif 74 //#endif
75 #if defined(LOCKF) && !defined(F_ULOCK) 75 #if defined(LOCKF) && !defined(F_ULOCK)
76 #include <sys/fcntl.h> 76 #include <sys/fcntl.h>
77 #endif /* LOCKF */ 77 #endif /* LOCKF */
78 78
79 #endif 79 #endif
828 q = lookup (hdrs, "from"); 828 q = lookup (hdrs, "from");
829 p -> p_value = getcpy (q ? q -> p_value : ""); 829 p -> p_value = getcpy (q ? q -> p_value : "");
830 p -> p_flags &= ~P_CHK; 830 p -> p_flags &= ~P_CHK;
831 if (debug) 831 if (debug)
832 fprintf (stderr, "vars[%d]: name=\"%s\" value=\"%s\"\n", 832 fprintf (stderr, "vars[%d]: name=\"%s\" value=\"%s\"\n",
833 p - vars, p -> p_name, p -> p_value); 833 (int)(p - vars), p -> p_name, p -> p_value);
834 } 834 }
835 #define empty(s) ((s) ? (s) : "") 835 #define empty(s) ((s) ? (s) : "")
836 if (debug) 836 if (debug)
837 for (p = hdrs; p -> p_name; p++) 837 for (p = hdrs; p -> p_name; p++)
838 fprintf (stderr, "hdrs[%d]: name=\"%s\" value=\"%s\"\n", 838 fprintf (stderr, "hdrs[%d]: name=\"%s\" value=\"%s\"\n",
839 p - hdrs, p -> p_name, empty(p -> p_value)); 839 (int)(p - hdrs), p -> p_name, empty(p -> p_value));
840 #undef empty 840 #undef empty
841 841
842 #ifdef MIME_HEADERS 842 #ifdef MIME_HEADERS
843 for (p = hdrs; p -> p_name; p++) { 843 for (p = hdrs; p -> p_name; p++) {
844 char *tmpbuf; 844 char *tmpbuf;
916 p -> p_value = getcpy (info); 916 p -> p_value = getcpy (info);
917 917
918 if (debug) 918 if (debug)
919 for (p = vars; p -> p_name; p++) 919 for (p = vars; p -> p_name; p++)
920 fprintf (stderr, "vars[%d]: name=\"%s\" value=\"%s\"\n", 920 fprintf (stderr, "vars[%d]: name=\"%s\" value=\"%s\"\n",
921 p - vars, p -> p_name, p -> p_value); 921 (int)(p - vars), p -> p_name, p -> p_value);
922 } 922 }
923 923
924 /* */ 924 /* */
925 925
926 static struct pair *lookup (pairs, key) 926 static struct pair *lookup (pairs, key)