From: Ralph Corderoy Date: Thu, 16 Nov 2017 00:02:00 +0000 (+0000) Subject: fmt_addr.c: Move interface to own file. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/e99caef6d3e09d481849d3bdc51871f4c7bb574a?ds=inline;hp=6878389db379ef72839a7729e1aff79eafcf4976 fmt_addr.c: Move interface to own file. --- diff --git a/Makefile.am b/Makefile.am index 4efbe364..865b70a6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -386,6 +386,7 @@ noinst_HEADERS = \ sbr/escape_addresses.h \ sbr/ext_hook.h \ sbr/fdcompare.h \ + sbr/fmt_addr.h \ sbr/fmt_rfc2047.h \ sbr/folder_addmsg.h \ sbr/folder_delmsgs.h \ diff --git a/h/fmt_scan.h b/h/fmt_scan.h index 2574c579..dc945ef3 100644 --- a/h/fmt_scan.h +++ b/h/fmt_scan.h @@ -289,25 +289,3 @@ void fmt_appendcomp(int bucket, char *component, char *text); */ struct comp *fmt_nextcomp(struct comp *comp, unsigned int *bucket); - -/* - * The implementation of the %(formataddr) function. This is available for - * programs to provide their own local implementation if they wish to do - * special processing (see uip/replsbr.c for an example). Arguments are: - * - * orig - Existing list of addresses - * str - New address(es) to append to list. - * - * This function returns an allocated string containing the new list of - * addresses. - */ - -char *formataddr(char *orig, char *str); - -/* - * The implementation of the %(concataddr) function. Arguments and behavior - * are the same as %(formataddr). Again, see uip/replsbr.c to see how you - * can override this behavior. - */ - -char *concataddr(char *orig, char *str); diff --git a/sbr/fmt_addr.c b/sbr/fmt_addr.c index fc9c4db0..6d580619 100644 --- a/sbr/fmt_addr.c +++ b/sbr/fmt_addr.c @@ -6,6 +6,7 @@ */ #include "h/mh.h" +#include "fmt_addr.h" #include "h/addrsbr.h" #include "h/fmt_scan.h" #include "h/utils.h" diff --git a/sbr/fmt_addr.h b/sbr/fmt_addr.h new file mode 100644 index 00000000..2a7c5128 --- /dev/null +++ b/sbr/fmt_addr.h @@ -0,0 +1,25 @@ +/* fmt_addr.h -- format an address field (from fmt_scan) + * + * This code is Copyright (c) 2017, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. */ + +/* + * The implementation of the %(formataddr) function. This is available for + * programs to provide their own local implementation if they wish to do + * special processing (see uip/replsbr.c for an example). Arguments are: + * + * orig - Existing list of addresses + * str - New address(es) to append to list. + * + * This function returns an allocated string containing the new list of + * addresses. + */ +char *formataddr(char *, char *); + +/* + * The implementation of the %(concataddr) function. Arguments and behavior + * are the same as %(formataddr). Again, see uip/replsbr.c to see how you + * can override this behavior. + */ +char *concataddr(char *, char *); diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index 869a278e..9ae100c9 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -9,6 +9,7 @@ */ #include "h/mh.h" +#include "fmt_addr.h" #include "dtime.h" #include "strindex.h" #include "fmt_rfc2047.h"