version 1.13, 2000/08/02 04:10:48 |
version 1.14, 2001/01/16 05:36:08 |
|
|
cmd[sizeof(cmd) - 1] = '\0'; |
cmd[sizeof(cmd) - 1] = '\0'; |
if (bangexp(cmd, sizeof(cmd)) < 0) |
if (bangexp(cmd, sizeof(cmd)) < 0) |
return(1); |
return(1); |
if ((shell = value("SHELL")) == NULL) |
shell = value("SHELL"); |
shell = _PATH_CSHELL; |
|
(void)run_command(shell, 0, -1, -1, "-c", cmd, NULL); |
(void)run_command(shell, 0, -1, -1, "-c", cmd, NULL); |
(void)signal(SIGINT, sigint); |
(void)signal(SIGINT, sigint); |
puts("!"); |
puts("!"); |
|
|
sig_t sigint = signal(SIGINT, SIG_IGN); |
sig_t sigint = signal(SIGINT, SIG_IGN); |
char *shell; |
char *shell; |
|
|
if ((shell = value("SHELL")) == NULL) |
shell = value("SHELL"); |
shell = _PATH_CSHELL; |
|
(void)run_command(shell, 0, -1, -1, NULL, NULL, NULL); |
(void)run_command(shell, 0, -1, -1, NULL, NULL, NULL); |
(void)signal(SIGINT, sigint); |
(void)signal(SIGINT, sigint); |
putchar('\n'); |
putchar('\n'); |
|
|
/* |
/* |
* Print out a nice help message from some file or another. |
* Print out a nice help message from some file or another. |
*/ |
*/ |
|
|
int |
int |
help(v) |
help(v) |
void *v; |
void *v; |
{ |
{ |
int c; |
|
FILE *f; |
|
|
|
if ((f = Fopen(_PATH_HELP, "r")) == NULL) { |
(void)run_command(value("PAGER"), 0, -1, -1, _PATH_HELP, NULL); |
warn(_PATH_HELP); |
|
return(1); |
|
} |
|
while ((c = getc(f)) != EOF) |
|
putchar(c); |
|
(void)Fclose(f); |
|
return(0); |
return(0); |
} |
} |
|
|
|
|
} |
} |
|
|
/* |
/* |
|
* Mark new the named messages, so that they will be left in the system |
|
* mailbox as unread. |
|
*/ |
|
int |
|
marknew(v) |
|
void *v; |
|
{ |
|
int *msgvec = v; |
|
int *ip; |
|
|
|
for (ip = msgvec; *ip != NULL; ip++) { |
|
dot = &message[*ip-1]; |
|
dot->m_flag &= ~(MBOX|MREAD|MTOUCH); |
|
dot->m_flag |= MNEW|MSTATUS; |
|
} |
|
return(0); |
|
} |
|
|
|
/* |
* Preserve the named messages, so that they will be sent |
* Preserve the named messages, so that they will be sent |
* back to the system mailbox. |
* back to the system mailbox. |
*/ |
*/ |
|
|
unread(v) |
unread(v) |
void *v; |
void *v; |
{ |
{ |
int *msgvec = v; |
int *msgvec = v; |
int *ip; |
int *ip; |
|
|
for (ip = msgvec; *ip != NULL; ip++) { |
for (ip = msgvec; *ip != NULL; ip++) { |