]> diplodocus.org Git - nmh/blobdiff - h/prototypes.h
Treat %(myhost) failure to match canonical hostname as information.
[nmh] / h / prototypes.h
index c9bac8d8dc832448d6e0c65d4772f4a6e23e368f..92ed8ef56e88c4fa81fdf225251e6ace8d6dfe25 100644 (file)
@@ -7,7 +7,7 @@
 /*
  * prototype from config.h
  */
 /*
  * prototype from config.h
  */
-char *etcpath(char *);
+char *etcpath(char *) NONNULL(1);
 
 /*
  * prototypes from the nmh subroutine library
 
 /*
  * prototypes from the nmh subroutine library
@@ -16,18 +16,18 @@ char *etcpath(char *);
 struct msgs_array;
 
 void add_profile_entry (const char *, const char *);
 struct msgs_array;
 
 void add_profile_entry (const char *, const char *);
-void inform(char *fmt, ...);
-void adios (const char *, const char *, ...) NORETURN;
-void admonish (char *, char *, ...);
-void advertise (const char *, char *, const char *, va_list);
-void advise (const char *, const char *, ...);
-char **argsplit (char *, char **, int *);
-void argsplit_msgarg (struct msgs_array *, char *, char **);
-void argsplit_insert (struct msgs_array *, char *, char **);
+void inform(char *fmt, ...) CHECK_PRINTF(1, 2);
+void adios (const char *, const char *, ...) CHECK_PRINTF(2, 3) NORETURN;
+void admonish (char *, char *, ...) CHECK_PRINTF(2, 3);
+void advertise (const char *, char *, const char *, va_list) CHECK_PRINTF(3, 0);
+void advise (const char *, const char *, ...) CHECK_PRINTF(2, 3);
+char **argsplit (char *, char **, int *) NONNULL(1, 2);
+void argsplit_msgarg (struct msgs_array *, char *, char **) NONNULL(1, 2, 3);
+void argsplit_insert (struct msgs_array *, char *, char **) NONNULL(1, 2, 3);
 void arglist_free (char *, char **);
 void arglist_free (char *, char **);
-void ambigsw (const char *, const struct swit *);
-int atooi(char *);
-char **brkstring (char *, char *, char *);
+void ambigsw (const char *, const struct swit *) NONNULL(1, 2);
+int atooi(char *) NONNULL(1);
+char **brkstring (char *, char *, char *) NONNULL(1);
 
 /*
  * Check to see if we can display a given character set natively.
 
 /*
  * Check to see if we can display a given character set natively.
@@ -70,7 +70,7 @@ void discard (FILE *);
  *
  * Returns the decoded value, -1 if the conversion failed.
  */
  *
  * Returns the decoded value, -1 if the conversion failed.
  */
-int decode_qp(unsigned char byte1, unsigned char byte2);
+int decode_qp(unsigned char byte1, unsigned char byte2) CONST;
 
 int default_done (int);
 
 
 int default_done (int);
 
@@ -225,52 +225,19 @@ int m_atoi (char *);
 char *m_backup (const char *);
 int m_convert (struct msgs *, char *);
 char *m_draft (char *, char *, int, int *);
 char *m_backup (const char *);
 int m_convert (struct msgs *, char *);
 char *m_draft (char *, char *, int, int *);
+
+m_getfld_state_t m_getfld_state_init(FILE *iob);
 void m_getfld_state_reset (m_getfld_state_t *);
 void m_getfld_state_destroy (m_getfld_state_t *);
 void m_getfld_track_filepos (m_getfld_state_t *, FILE *);
 void m_getfld_state_reset (m_getfld_state_t *);
 void m_getfld_state_destroy (m_getfld_state_t *);
 void m_getfld_track_filepos (m_getfld_state_t *, FILE *);
+void m_getfld_track_filepos2(m_getfld_state_t *);
 int m_getfld (m_getfld_state_t *, char[NAMESZ], char *, int *, FILE *);
 int m_getfld (m_getfld_state_t *, char[NAMESZ], char *, int *, FILE *);
+int m_getfld2(m_getfld_state_t *, char[NAMESZ], char *, int *);
 int m_gmprot (void);
 char *m_name (int);
 
 int m_gmprot (void);
 char *m_name (int);
 
-/*
- * Create a subprocess and redirect our standard output to it.
- *
- * Arguments are:
- *
- * name                - Name of process to create
- * savestdout  - If true, will save the current stdout file descriptor and
- *               m_pclose() will close it at the appropriate time.
- */
-void m_popen(char *name, int savestdout);
-
-/*
- * Wait for the last process opened by m_popen().
- */
-void m_pclose(void);
-
 void m_unknown(m_getfld_state_t *, FILE *);
 void m_unknown(m_getfld_state_t *, FILE *);
-int makedir (const char *);
-char *message_id (time_t, int);
-
-/*
- * Return a MIME content-type string for the specified file.
- *
- * If the system supports it, will use the "file" command to determine
- * the appropriate content-type.  Otherwise it will try to determine the
- * content-type from the suffix.  If that fails, the file will be scanned
- * and either assigned a MIME type of text/plain or application/octet-stream
- * depending if binary content is present.
- *
- * Arguments:
- *
- * filename    - The name of the file to determine the MIME type of.
- *
- * Returns a pointer to a content-type string (which may include MIME
- * parameters, such as charset).  Returns a NULL if it cannot determine
- * the MIME type of the file.  Returns allocated storage that must be
- * free'd.
- */
-char *mime_type(const char *filename);
+void m_unknown2(m_getfld_state_t *);
 
 /*
  * Clear the screen, using the appropriate entry from the terminfo database
 
 /*
  * Clear the screen, using the appropriate entry from the terminfo database
@@ -383,22 +350,6 @@ int ssequal (const char *, const char *);
 int stringdex (char *, char *);
 char *trimcpy (char *);
 
 int stringdex (char *, char *);
 char *trimcpy (char *);
 
-/*
- * Remove quotes and quoted-pair sequences from RFC-5322 atoms.
- *
- * Currently the actual algorithm is simpler than it technically should
- * be: any quotes are simply eaten, unless they're preceded by the escape
- * character (\).  This seems to be sufficient for our needs for now.
- *
- * Arguments:
- *
- * input       - The input string
- * output      - The output string; is assumed to have at least as much
- *               room as the input string.  At worst the output string will
- *               be the same size as the input string; it might be smaller.
- *
- */
-void unquote_string(const char *input, char *output);
 int uprf (const char *, const char *);
 int vfgets (FILE *, char **);
 
 int uprf (const char *, const char *);
 int vfgets (FILE *, char **);
 
@@ -419,7 +370,7 @@ char *SystemName(void);
 /*
  * prototypes for some routines in uip
  */
 /*
  * prototypes for some routines in uip
  */
-int annotate (char *, char *, char *, int, int, int, int);
+int annotate (char *, char *, char *, bool, bool, int, bool);
 void annolist(char *, char *, char *, int);
 void annopreserve(int);
 void m_pclose(void);
 void annolist(char *, char *, char *, int);
 void annopreserve(int);
 void m_pclose(void);
@@ -434,10 +385,10 @@ int sc_width(void);
 int build_form (char *, char *, int *, char *, char *, char *, char *,
                char *, char *);
 int sendsbr (char **, int, char *, char *, struct stat *, int, const char *);
 int build_form (char *, char *, int *, char *, char *, char *, char *,
                char *, char *);
 int sendsbr (char **, int, char *, char *, struct stat *, int, const char *);
-int SOprintf (char *, ...);
+int SOprintf (char *, ...) CHECK_PRINTF(1, 2);
 int what_now (char *, int, int, char *, char *,
        int, struct msgs *, char *, int, char *, int);
 int what_now (char *, int, int, char *, char *,
        int, struct msgs *, char *, int, char *, int);
-int WhatNow(int, char **);
+int WhatNow(int, char **) NORETURN;
 
 /* Includes trailing NUL */
 
 
 /* Includes trailing NUL */