2 * Copyright notice from original mutt:
3 * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
4 * Copyright (C) 1999-2000 Thomas Roessler <roessler@does-not-exist.org>
6 * This file is part of mutt-ng, see http://www.muttng.org/.
7 * It's licensed under the GNU General Public License,
8 * please see the file GPL in the top level source directory.
11 /* mutt functions which are generally useful. */
19 # include <unistd.h> /* needed for SEEK_SET */
21 # include <sys/types.h>
22 # include <sys/stat.h>
28 # ifndef _POSIX_PATH_MAX
29 # include <posix1_lim.h>
37 # define MAX(a,b) ((a) < (b) ? (b) : (a))
38 # define MIN(a,b) ((a) < (b) ? (a) : (b))
40 #define FOREVER while (1)
44 /* Exit values used in send_msg() */
48 /* The actual library functions. */
50 FILE *safe_fopen (const char *, const char *);
52 char *mutt_concat_path (char *, const char *, const char *, size_t);
53 char *mutt_read_line (char *, size_t *, FILE *, int *);
55 const char *mutt_basename (const char *);
57 int mutt_copy_stream (FILE *, FILE *);
58 int mutt_copy_bytes (FILE *, FILE *, size_t);
59 int mutt_rx_sanitize_string (char *, size_t, const char *);
61 int safe_open (const char *, int);
62 int safe_symlink (const char *, const char *);
63 int safe_rename (const char *, const char *);
64 int safe_fclose (FILE **);
66 size_t mutt_quote_filename (char *, size_t, const char *);
68 void mutt_nocurses_error (const char *, ...);
69 void mutt_sanitize_filename (char *, short);
70 void mutt_unlink (const char *);
72 const char *mutt_strsysexit(int e);