* 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.
* 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.
static void
cptrimmed(char **dest, char *str, unsigned int wid, char fill, size_t n) {
int remaining; /* remaining output width available */
static void
cptrimmed(char **dest, char *str, unsigned int wid, char fill, size_t n) {
int remaining; /* remaining output width available */
- snprintf (buffer, buffer_len, "%*.*s", cp - mbox, cp - mbox, mbox);
+ snprintf (buffer, buffer_len, "%*.*s", (int)(cp - mbox), (int)(cp - mbox), mbox);
return 1;
}
struct format *
fmt_scan (struct format *format, char *scanl, int width, int *dat)
{
return 1;
}
struct format *
fmt_scan (struct format *format, char *scanl, int width, int *dat)
{
case FT_STRF:
cptrimmed (&cp, str, fmt->f_width, fmt->f_fill, ep - cp);
break;
case FT_STRF:
cptrimmed (&cp, str, fmt->f_width, fmt->f_fill, ep - cp);
break;
case FT_STRFW:
adios (NULL, "internal error (FT_STRFW)");
case FT_NUM:
n = snprintf(cp, ep - cp + 1, "%d", value);
case FT_STRFW:
adios (NULL, "internal error (FT_STRFW)");
case FT_NUM:
n = snprintf(cp, ep - cp + 1, "%d", value);
break;
case FT_NUMF:
cpnumber (&cp, value, fmt->f_width, fmt->f_fill, ep - cp);
break;
case FT_NUMF:
cpnumber (&cp, value, fmt->f_width, fmt->f_fill, ep - cp);
strncpy(buffer, str, sizeof(buffer));
buffer[sizeof(buffer)-1] = '\0';
strncpy(buffer, str, sizeof(buffer));
buffer[sizeof(buffer)-1] = '\0';
case FT_PUTADDR:
/* output the str register as an address component,
* splitting it into multiple lines if necessary. The
case FT_PUTADDR:
/* output the str register as an address component,
* splitting it into multiple lines if necessary. The