... we just don't use wchar_t in FRR, no point in having this enabled.
Signed-off-by: David Lamparter <equinox@diac24.net>
return (0);
}
+#ifdef WCHAR_SUPPORT
static inline int
addwaster(struct typetable *types, wchar_t **fmtp)
{
}
return (0);
}
+#endif /* WCHAR_SUPPORT */
/*
* Find all arguments when a positional parameter is encountered. Returns a
return (error || *argtable == NULL);
}
+#ifdef WCHAR_SUPPORT
/* wchar version of __find_arguments. */
int
__find_warguments (const wchar_t *fmt0, va_list ap, union arg **argtable)
freetypes(&types);
return (error || *argtable == NULL);
}
+#endif /* WCHAR_SUPPORT */
/*
* Increase the size of the type table. Returns 0 on success.
/* Handle positional parameters. */
int __find_arguments(const char *, va_list, union arg **);
+#ifdef WCHAR_SUPPORT
int __find_warguments(const wchar_t *, va_list, union arg **);
+#endif
#include "printflocal.h"
-static char *__wcsconv(wchar_t *, int);
-
#define CHAR char
#include "printfcommon.h"
+#ifdef WCHAR_SUPPORT
/*
* Convert a wide character string argument for the %ls format to a multibyte
* string representation. If not -1, prec specifies the maximum number of
convbuf[nbytes] = '\0';
return (convbuf);
}
+#endif /* WCHAR_SUPPORT */
/*
* The size of the buffer we use as scratch space for integer
flags |= LONGINT;
/*FALLTHROUGH*/
case 'c':
+#ifdef WCHAR_SUPPORT
if (flags & LONGINT) {
static const mbstate_t initial;
mbstate_t mbs;
goto error;
}
size = (int)mbseqlen;
- } else {
+ } else
+#endif /* WCHAR_SUPPORT */
+ {
*(cp = buf) = GETARG(int);
size = 1;
}
flags |= LONGINT;
/*FALLTHROUGH*/
case 's':
+#ifdef WCHAR_SUPPORT
if (flags & LONGINT) {
wchar_t *wcp;
}
cp = convbuf;
}
- } else if ((cp = GETARG(char *)) == NULL)
+ } else
+#endif
+ if ((cp = GETARG(char *)) == NULL)
cp = "(null)";
size = (prec >= 0) ? strnlen(cp, prec) : strlen(cp);
sign = '\0';