96 #ifdef STRCASECMP_IN_STRINGS_H
144 static int level_map(
char *
name)
146 struct level_table *t;
148 for (t = level_table; t->
name; t++)
156 static void log_argv(
int level,
char **argv)
171 static void log_stream(
int level,
VSTREAM *fp)
184 int main(
int argc,
char **argv)
209 for (fd = 0; fd < 3; fd++)
210 if (
fstat(fd, &st) == -1
211 && (close(fd), open(
"/dev/null", O_RDWR, 0)) != fd)
218 if (isatty(STDERR_FILENO))
231 while ((ch =
GETOPT(argc, argv,
"c:ip:t:v")) > 0) {
234 msg_fatal(
"usage: %s [-c config_dir] [-i] [-p priority] [-t tag] [-v] [text]", argv[0]);
241 log_flags |= LOG_PID;
244 level = level_map(optarg);
271 if (isatty(STDERR_FILENO))
279 log_argv(level, argv + optind);
const char * mail_task(const char *argv0)
char * var_import_environ
int vstring_get_nonl(VSTRING *vp, VSTREAM *fp)
ARGV * argv_free(ARGV *argvp)
#define VAR_IMPORT_ENVIRON
void msg_text(int level, const char *text)
void mail_conf_read(void)
ARGV * mail_parm_split(const char *name, const char *value)
VSTRING * vstring_alloc(ssize_t len)
#define MAIL_VERSION_STAMP_ALLOCATE
NORETURN msg_fatal(const char *fmt,...)
#define MAIL_VERSION_CHECK
void update_env(char **preserve_list)
#define GETOPT(argc, argv, str)
void msg_syslog_init(const char *name, int logopt, int facility)
MAIL_VERSION_STAMP_DECLARE
int strcasecmp(const char *s1, const char *s2)
VSTRING * vstring_free(VSTRING *vp)
void msg_vstream_init(const char *name, VSTREAM *vp)
int main(int argc, char **argv)
VSTRING * vstring_strcat(VSTRING *vp, const char *src)