/*
- * fmt_scan.c -- format string interpretation
- *
- * This code is Copyright (c) 2002, by the authors of nmh. See the
- * COPYRIGHT file in the root directory of the nmh distribution for
- * complete copyright information.
- */
+** fmt_scan.c -- format string interpretation
+**
+** This code is Copyright (c) 2002, by the authors of nmh. See the
+** COPYRIGHT file in the root directory of the nmh distribution for
+** complete copyright information.
+*/
#include <h/mh.h>
#include <h/addrsbr.h>
struct mailname fmt_mnull;
/*
- * static prototypes
- */
+** static prototypes
+*/
static int match (char *, char *);
static char *get_x400_friendly (char *, char *, int);
static int get_x400_comp (char *, char *, char *, int);
/*
- * test if string "sub" appears anywhere in
- * string "str" (case insensitive).
- */
+** test if string "sub" appears anywhere in
+** string "str" (case insensitive).
+*/
static int
match (char *str, char *sub)
}
/*
- * copy a number to the destination subject to a maximum width
- */
+** copy a number to the destination subject to a maximum width
+*/
static void
cpnumber(char **dest, int num, unsigned int wid, char fill, size_t n) {
int i, c;
}
/*
- * copy string from str to dest padding with the fill character to a size
- * of wid characters. if wid is negative, the string is right aligned
- * no more than n bytes are copied
- */
+** copy string from str to dest padding with the fill character to a size
+** of wid characters. if wid is negative, the string is right aligned
+** no more than n bytes are copied
+*/
static void
cptrimmed(char **dest, char *str, unsigned int wid, char fill, size_t n) {
int remaining; /* remaining output width available */
break;
case FT_FORMATADDR:
- /* hook for custom address list formatting (see replsbr.c) */
+ /*
+ ** hook for custom address list formatting
+ ** (see replsbr.c)
+ */
str = formataddr (savestr, str);
break;
case FT_PUTADDR:
- /* output the str register as an address component,
- * splitting it into multiple lines if necessary. The
- * value reg. contains the max line length. The lit.
- * field may contain a string to prepend to the result
- * (e.g., "To: ")
- */
+ /*
+ ** output the str register as an address component,
+ ** splitting it into multiple lines if necessary. The
+ ** value reg. contains the max line length. The lit.
+ ** field may contain a string to prepend to the result
+ ** (e.g., "To: ")
+ */
{
unsigned char *lp;
char *lastb;
case FT_MYMBOX:
/*
- * if there's no component, we say true. Otherwise we
- * say "true" only if we can parse the address and it
- * matches one of our addresses.
- */
+ ** if there's no component, we say true. Otherwise we
+ ** say "true" only if we can parse the address and it
+ ** matches one of our addresses.
+ */
comp = fmt->f_comp;
if (comp->c_mn != &fmt_mnull)
mnfree (comp->c_mn);
case FT_ADDTOSEQ:
#ifdef LBL
- /* If we're working on a folder (as opposed to a file), add the
- * current msg to sequence given in literal field. Don't
- * disturb string or value registers.
- */
+ /*
+ ** If we're working on a folder (as opposed to a
+ ** file), add the current msg to sequence given
+ ** in literal field. Don't disturb string or
+ ** value registers.
+ */
if (fmt_current_folder)
seq_addmsg(fmt_current_folder, fmt->f_text, dat[0], -1);
#endif