projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed the whom program, which relayed on post(8) functionality.
[mmh]
/
sbr
/
snprintf.c
diff --git
a/sbr/snprintf.c
b/sbr/snprintf.c
index
9bc163a
..
2b19881
100644
(file)
--- a/
sbr/snprintf.c
+++ b/
sbr/snprintf.c
@@
-135,7
+135,8
@@
typedef int bool_int;
#define NDIG 80
/* buf must have at least NDIG bytes */
#define NDIG 80
/* buf must have at least NDIG bytes */
-static char *ap_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag, char *buf)
+static char *
+ap_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag, char *buf)
{
register int r2;
double fi, fj;
{
register int r2;
double fi, fj;
@@
-207,12
+208,14
@@
static char *ap_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag, c
return (buf);
}
return (buf);
}
-static char *ap_ecvt(double arg, int ndigits, int *decpt, int *sign, char *buf)
+static char *
+ap_ecvt(double arg, int ndigits, int *decpt, int *sign, char *buf)
{
return (ap_cvt(arg, ndigits, decpt, sign, 1, buf));
}
{
return (ap_cvt(arg, ndigits, decpt, sign, 1, buf));
}
-static char *ap_fcvt(double arg, int ndigits, int *decpt, int *sign, char *buf)
+static char *
+ap_fcvt(double arg, int ndigits, int *decpt, int *sign, char *buf)
{
return (ap_cvt(arg, ndigits, decpt, sign, 0, buf));
}
{
return (ap_cvt(arg, ndigits, decpt, sign, 0, buf));
}
@@
-222,7
+225,8
@@
static char *ap_fcvt(double arg, int ndigits, int *decpt, int *sign, char *buf)
* minimal length string
*/
* minimal length string
*/
-static char *ap_gcvt(double number, int ndigit, char *buf, boolean_e altform)
+static char *
+ap_gcvt(double number, int ndigit, char *buf, boolean_e altform)
{
int sign, decpt;
register char *p1, *p2;
{
int sign, decpt;
register char *p1, *p2;
@@
-357,7
+361,8
@@
static char *ap_gcvt(double number, int ndigit, char *buf, boolean_e altform)
* which is a pointer to the END of the buffer + 1 (i.e. if the buffer
* is declared as buf[ 100 ], buf_end should be &buf[ 100 ])
*/
* which is a pointer to the END of the buffer + 1 (i.e. if the buffer
* is declared as buf[ 100 ], buf_end should be &buf[ 100 ])
*/
-static char *conv_10(register wide_int num, register bool_int is_unsigned,
+static char *
+conv_10(register wide_int num, register bool_int is_unsigned,
register bool_int *is_negative, char *buf_end,
register int *len)
{
register bool_int *is_negative, char *buf_end,
register int *len)
{
@@
-404,7
+409,8
@@
static char *conv_10(register wide_int num, register bool_int is_unsigned,
-static char *conv_in_addr(struct in_addr *ia, char *buf_end, int *len)
+static char *
+conv_in_addr(struct in_addr *ia, char *buf_end, int *len)
{
unsigned addr = ntohl(ia->s_addr);
char *p = buf_end;
{
unsigned addr = ntohl(ia->s_addr);
char *p = buf_end;
@@
-425,7
+431,8
@@
static char *conv_in_addr(struct in_addr *ia, char *buf_end, int *len)
-static char *conv_sockaddr_in(struct sockaddr_in *si, char *buf_end, int *len)
+static char *
+conv_sockaddr_in(struct sockaddr_in *si, char *buf_end, int *len)
{
char *p = buf_end;
bool_int is_negative;
{
char *p = buf_end;
bool_int is_negative;
@@
-447,7
+454,8
@@
static char *conv_sockaddr_in(struct sockaddr_in *si, char *buf_end, int *len)
* The sign is returned in the is_negative argument (and is not placed
* in buf).
*/
* The sign is returned in the is_negative argument (and is not placed
* in buf).
*/
-static char *conv_fp(register char format, register double num,
+static char *
+conv_fp(register char format, register double num,
boolean_e add_dp, int precision, bool_int *is_negative,
char *buf, int *len)
{
boolean_e add_dp, int precision, bool_int *is_negative,
char *buf, int *len)
{
@@
-539,7
+547,8
@@
static char *conv_fp(register char format, register double num,
* which is a pointer to the END of the buffer + 1 (i.e. if the buffer
* is declared as buf[ 100 ], buf_end should be &buf[ 100 ])
*/
* which is a pointer to the END of the buffer + 1 (i.e. if the buffer
* is declared as buf[ 100 ], buf_end should be &buf[ 100 ])
*/
-static char *conv_p2(register u_wide_int num, register int nbits,
+static char *
+conv_p2(register u_wide_int num, register int nbits,
char format, char *buf_end, register int *len)
{
register int mask = (1 << nbits) - 1;
char format, char *buf_end, register int *len)
{
register int mask = (1 << nbits) - 1;
@@
-562,7
+571,8
@@
static char *conv_p2(register u_wide_int num, register int nbits,
/*
* Do format conversion placing the output in buffer
*/
/*
* Do format conversion placing the output in buffer
*/
-int ap_vformatter(int (*flush_func)(ap_vformatter_buff *),
+static int
+ap_vformatter(int (*flush_func)(ap_vformatter_buff *),
ap_vformatter_buff *vbuff, const char *fmt, va_list ap)
{
register char *sp;
ap_vformatter_buff *vbuff, const char *fmt, va_list ap)
{
register char *sp;
@@
-983,7
+993,8
@@
int ap_vformatter(int (*flush_func)(ap_vformatter_buff *),
}
}
-static int snprintf_flush(ap_vformatter_buff *vbuff)
+static int
+snprintf_flush(ap_vformatter_buff *vbuff)
{
/* if the buffer fills we have to abort immediately, there is no way
* to "flush" a snprintf... there's nowhere to flush it to.
{
/* if the buffer fills we have to abort immediately, there is no way
* to "flush" a snprintf... there's nowhere to flush it to.
@@
-992,7
+1003,8
@@
static int snprintf_flush(ap_vformatter_buff *vbuff)
}
}
-int snprintf(char *buf, size_t len, const char *format,...)
+int
+snprintf(char *buf, size_t len, const char *format,...)
{
int cc;
va_list ap;
{
int cc;
va_list ap;
@@
-1012,7
+1024,8
@@
int snprintf(char *buf, size_t len, const char *format,...)
}
}
-int vsnprintf(char *buf, size_t len, const char *format, va_list ap)
+int
+vsnprintf(char *buf, size_t len, const char *format, va_list ap)
{
int cc;
ap_vformatter_buff vbuff;
{
int cc;
ap_vformatter_buff vbuff;