Commit 5edf5fe3 5edf5fe39c5b3f61cdce967a2a82b1988885599e by Alain Magloire

* mail/mailline.c: "interupt" is actually a key word

	for somce C compiler i.e. Watcomm C, rename it to "interrupted".
	* mail/util.c: The macros O_CREAT etc needs <sys/fnct.h>.
1 parent 733fb106
1 2001-07-06 Alain Magloire 1 2001-07-06 Alain Magloire
2 2
3 * mail/mailline.c: "interupt" is actually a key word
4 for somce C compiler i.e. Watcomm C, rename it to "interrupted".
5 * mail/util.c: The macros O_CREAT etc needs <sys/fnct.h>.
6
7 2001-07-06 Alain Magloire
8
3 * mail/mail.c: Be a little more verbose when mailbox_{create,open}() 9 * mail/mail.c: Be a little more verbose when mailbox_{create,open}()
4 fails at startup. 10 fails at startup.
5 * doc/Makefile.am: Add the missing *.texi in the list of EXTRA_DIST. 11 * doc/Makefile.am: Add the missing *.texi in the list of EXTRA_DIST.
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 static char **ml_command_completion __P((char *cmd, int start, int end)); 20 static char **ml_command_completion __P((char *cmd, int start, int end));
21 static char *ml_command_generator __P((char *text, int state)); 21 static char *ml_command_generator __P((char *text, int state));
22 22
23 static int _interrupt; 23 static volatile int _interrupted;
24 24
25 static RETSIGTYPE 25 static RETSIGTYPE
26 sig_handler (int signo) 26 sig_handler (int signo)
...@@ -30,7 +30,7 @@ sig_handler (int signo) ...@@ -30,7 +30,7 @@ sig_handler (int signo)
30 case SIGINT: 30 case SIGINT:
31 if (util_find_env ("quit")->set) 31 if (util_find_env ("quit")->set)
32 exit (0); 32 exit (0);
33 _interrupt++; 33 _interrupted++;
34 break; 34 break;
35 #if defined (SIGWINCH) 35 #if defined (SIGWINCH)
36 case SIGWINCH: 36 case SIGWINCH:
...@@ -43,14 +43,14 @@ sig_handler (int signo) ...@@ -43,14 +43,14 @@ sig_handler (int signo)
43 void 43 void
44 ml_clear_interrupt () 44 ml_clear_interrupt ()
45 { 45 {
46 _interrupt = 0; 46 _interrupted = 0;
47 } 47 }
48 48
49 int 49 int
50 ml_got_interrupt () 50 ml_got_interrupt ()
51 { 51 {
52 int rc = _interrupt; 52 int rc = _interrupted;
53 _interrupt = 0; 53 _interrupted = 0;
54 return rc; 54 return rc;
55 } 55 }
56 56
...@@ -66,7 +66,7 @@ ml_getc (FILE *stream) ...@@ -66,7 +66,7 @@ ml_getc (FILE *stream)
66 return c; 66 return c;
67 if (errno == EINTR) 67 if (errno == EINTR)
68 { 68 {
69 if (_interrupt) 69 if (_interrupted)
70 break; 70 break;
71 /* keep going if we handled the signal */ 71 /* keep going if we handled the signal */
72 } 72 }
...@@ -197,7 +197,7 @@ readline (const char *prompt) ...@@ -197,7 +197,7 @@ readline (const char *prompt)
197 197
198 if (p) 198 if (p)
199 n = strlen(p); 199 n = strlen(p);
200 else if (_interrupt) 200 else if (_interrupted)
201 { 201 {
202 free (line); 202 free (line);
203 return NULL; 203 return NULL;
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
22 # include <termios.h> 22 # include <termios.h>
23 #endif 23 #endif
24 #include <sys/ioctl.h> 24 #include <sys/ioctl.h>
25 #include <sys/fcntl.h>
25 26
26 typedef struct _node { 27 typedef struct _node {
27 /* for the msglist expander */ 28 /* for the msglist expander */
......