Current Path : /usr/src/contrib/ntp/libntp/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/src/contrib/ntp/libntp/numtoa.c |
/* * numtoa - return asciized network numbers store in local array space */ #include <stdio.h> #include "ntp_fp.h" #include "lib_strbuf.h" #include "ntp_stdlib.h" char * numtoa( u_int32 num ) { register u_int32 netnum; register char *buf; netnum = ntohl(num); LIB_GETBUF(buf); (void) sprintf(buf, "%lu.%lu.%lu.%lu", ((u_long)netnum >> 24) & 0xff, ((u_long)netnum >> 16) & 0xff, ((u_long)netnum >> 8) & 0xff, (u_long)netnum & 0xff); return buf; }