]> diplodocus.org Git - nmh/blob - docs/historical/mh-jun-1982/subs/m_send.c
Create new mh-format function %(ordinal)
[nmh] / docs / historical / mh-jun-1982 / subs / m_send.c
1 #ifdef COMMENT
2 Proprietary Rand Corporation, 1981.
3 Further distribution of this software
4 subject to the terms of the Rand
5 license agreement.
6 #endif
7
8 #include "../mh.h"
9 #include <stdio.h>
10
11 m_send(arg, file)
12 char **arg, *file;
13 {
14 char *vec[15];
15 int ivec;
16
17 ivec = 0;
18 vec[ivec++] = "send";
19 vec[ivec++] = file;
20 if(**arg == 'v')
21 vec[ivec++] = "-verbose";
22 else if(*arg) {
23 do
24 vec[ivec++] = *arg++;
25 while(*arg);
26 }
27 vec[ivec++] = 0;
28 m_update();
29 VOID fflush(stdout);
30 execv(sendproc, vec);
31 fprintf(stderr, "Can't exec %s.\n", sendproc);
32 return(0);
33
34 }