]>
diplodocus.org Git - nmh/blob - h/prototypes.h
970cd21008b39eeb93cb725d0e48f97bc1d2e39a
1 /* prototypes.h -- various prototypes
3 * If you modify functions here, please document their current behavior
4 * as much as practical.
8 * prototype from config.h
10 char *etcpath(char *) NONNULL(1);
13 * prototypes from the nmh subroutine library
19 * Print null-terminated PROMPT to and flush standard output. Read answers from
20 * standard input until one matches an entry in SWITCHES. When one matches,
21 * return its swret field. Return 0 on EOF.
23 int read_switch(const char *PROMPT
, const struct swit
*SWITCHES
);
26 * If standard input is not a tty, return 1 without printing anything. Else,
27 * print null-terminated PROMPT to and flush standard output. Read answers from
28 * standard input until one is "yes" or "no", returning 1 for "yes" and 0 for
29 * "no". Also return 0 on EOF.
31 int read_yes_or_no_if_tty(const char *PROMPT
);
34 * Print null-terminated PROMPT to and flush standard output. Read multi-word
35 * answers from standard input until a first word matches an entry in SWITCHES.
36 * When one matches, return a pointer to an array of pointers to the words.
37 * Return NULL on EOF, interrupt, or other error.
39 char **read_switch_multiword(const char *PROMPT
, const struct swit
*SWITCHES
);
42 * Same as read_switch_multiword but using readline(3) for input.
44 #ifdef READLINE_SUPPORT
45 char **read_switch_multiword_via_readline (char *, struct swit
*);
46 #endif /* READLINE_SUPPORT */
48 char **getarguments (char *, int, char **, int);
50 m_getfld_state_t
m_getfld_state_init(FILE *iob
);
51 void m_getfld_state_reset (m_getfld_state_t
*);
52 void m_getfld_state_destroy (m_getfld_state_t
*);
53 void m_getfld_track_filepos (m_getfld_state_t
*, FILE *);
54 void m_getfld_track_filepos2(m_getfld_state_t
*);
55 int m_getfld (m_getfld_state_t
*, char[NAMESZ
], char *, int *, FILE *);
56 int m_getfld2(m_getfld_state_t
*, char[NAMESZ
], char *, int *);
57 int m_gmprot (void) PURE
;
60 void m_unknown(m_getfld_state_t
*, FILE *);
61 void m_unknown2(m_getfld_state_t
*);
63 int pidwait (pid_t
, int);
65 void scan_detect_mbox_style (FILE *);
66 void scan_finished(void);
69 * prototypes for some routines in uip
71 int annotate (char *, char *, char *, bool, bool, int, bool);
72 void annolist(char *, char *, char *, int);
73 void annopreserve(int);
74 int mhl(int, char **);
75 int mhlsbr(int, char **, FILE *(*)(char *));
76 int distout (char *, char *, char *);
77 int sendsbr (char **, int, char *, char *, struct stat
*, int, const char *);
78 int what_now (char *, int, int, char *, char *,
79 int, struct msgs
*, char *, int, char *, int);
80 int WhatNow(int, char **) NORETURN
;