to simpler code.
bk: 4f8e4b0eM-Ud6xQn229JAhqlBZ7JaQ
extern int hextoint (const char *, u_long *);
extern char * humanlogtime (void);
extern char * humantime (time_t);
-extern char * inttoa (long);
extern char * mfptoa (u_int32, u_int32, short);
extern char * mfptoms (u_int32, u_int32, short);
extern const char * modetoa (int);
extern u_long ranp2 (int);
extern const char *refnumtoa (sockaddr_u *);
extern const char *refid_str (u_int32, int);
-extern char * uinttoa (u_long);
extern int decodenetnum (const char *, sockaddr_u *);
hextolfp.c \
humandate.c \
icom.c \
- inttoa.c \
iosignal.c \
lib_strbuf.c \
machines.c \
timetoa.c \
timevalops.c \
uglydate.c \
- uinttoa.c \
work_fork.c \
work_thread.c \
ymd2yd.c \
+++ /dev/null
-/*
- * inttoa - return an asciized signed integer
- */
-#include <config.h>
-#include <stdio.h>
-
-#include "lib_strbuf.h"
-#include "ntp_stdlib.h"
-
-char *
-inttoa(
- long val
- )
-{
- register char *buf;
-
- LIB_GETBUF(buf);
- snprintf(buf, LIB_BUFLENGTH, "%ld", val);
-
- return buf;
-}
+++ /dev/null
-/*
- * uinttoa - return an asciized unsigned integer
- */
-#include <config.h>
-#include <stdio.h>
-
-#include "lib_strbuf.h"
-#include "ntp_stdlib.h"
-
-char *
-uinttoa(
- u_long uval
- )
-{
- register char *buf;
-
- LIB_GETBUF(buf);
- snprintf(buf, LIB_BUFLENGTH, "%lu", uval);
-
- return buf;
-}
const char *auth;
const char *condition = "";
const char *last_event;
- const char *cnt;
char buf[128];
if (numassoc == 0) {
last_event = "";
break;
}
- cnt = uinttoa(event_count);
snprintf(buf, sizeof(buf),
- "%3d %5u %04x %3.3s %4s %4.4s %9.9s %11s %2s",
+ "%3d %5u %04x %3.3s %4s %4.4s %9.9s %11s %2lu",
i + 1, assoc_cache[i].assid,
assoc_cache[i].status, conf, reach, auth,
- condition, last_event, cnt);
+ condition, last_event, event_count);
bp = buf + strlen(buf);
while (bp > buf && ' ' == bp[-1])
--bp;
RelativePath="..\..\..\lib\isc\win32\interfaceiter.c"
>
</File>
- <File
- RelativePath="..\..\..\libntp\inttoa.c"
- >
- </File>
<File
RelativePath="..\..\..\libntp\iosignal.c"
>
RelativePath="..\..\..\libntp\uglydate.c"
>
</File>
- <File
- RelativePath="..\..\..\libntp\uinttoa.c"
- >
- </File>
<File
RelativePath="..\libntp\util_clockstuff.c"
>
RelativePath="..\..\..\..\lib\isc\win32\interfaceiter.c"
>
</File>
- <File
- RelativePath="..\..\..\..\libntp\inttoa.c"
- >
- </File>
<File
RelativePath="..\..\..\..\libntp\iosignal.c"
>
RelativePath="..\..\..\..\libntp\uglydate.c"
>
</File>
- <File
- RelativePath="..\..\..\..\libntp\uinttoa.c"
- >
- </File>
<File
RelativePath="..\..\libntp\util_clockstuff.c"
>
>
</File>
<File
- RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
+ RelativePath="..\..\include\sys\time.h"
>
</File>
<File
- RelativePath="..\..\include\sys\time.h"
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
>
</File>
<File
hextoint.cpp \
hextolfp.cpp \
humandate.cpp \
- inttoa.cpp \
lfptostr.cpp \
modetoa.cpp \
msyslog.cpp \
tstotv.cpp \
tvtots.cpp \
uglydate.cpp \
- uinttoa.cpp \
ymd2yd.cpp \
$(NULL)
+++ /dev/null
-#include "libntptest.h"
-
-class inttoaTest : public libntptest {
-};
-
-TEST_F(inttoaTest, RegularNumber) {
- EXPECT_STREQ("42", inttoa(42));
-}
-
-TEST_F(inttoaTest, NegativeNumber) {
- EXPECT_STREQ("-3", inttoa(-3));
-}
-
-/* Bug 1575 start */
-TEST_F(inttoaTest, BigPositiveNumber) {
- EXPECT_STREQ("2147483647", inttoa(2147483647L));
-}
-
-TEST_F(inttoaTest, BigNegativeNumber) {
- EXPECT_STREQ("-2147483648", inttoa(-2147483647L - 1L));
-}
-
-TEST_F(inttoaTest, MediumNumber) {
- EXPECT_STREQ("20000001", inttoa(20000001));
-}
-/* Bug 1575 end */
+++ /dev/null
-#include "libntptest.h"
-
-class uinttoaTest : public libntptest {
-};
-
-TEST_F(uinttoaTest, RegularNumber) {
- EXPECT_STREQ("39", uinttoa(39UL));
-}
-
-TEST_F(uinttoaTest, BiggestULong) {
- EXPECT_STREQ("4294967295", uinttoa(4294967295UL));
-}