X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/ee9fb87fde55c25f9ab1df2cbcc6e9d21d53b235..50c8114d791602fcc427c6dc94b55f3226e8a21d:/h/prototypes.h diff --git a/h/prototypes.h b/h/prototypes.h index 57e51d7b..6db99958 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -212,6 +212,23 @@ int ssequal (char *, char *); int stringdex (char *, char *); char *trimcpy (char *); int unputenv (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 (char *, char *); int vfgets (FILE *, char **); char *write_charset_8bit (void);