Tree @master (Download .tar.gz)
- debian
- all_digitsA.c
- byteswap_nodestats.c
- die.c
- display_nbtstat.c
- dump_packet.c
- errors.c
- gen_perl.c
- hostname.c
- lookup_hostname.c
- makefile
- nbtdefs.h
- nbtscan.c
- nbtscan_common.h
- netbios_fixname.c
- netbios_name.c
- netbios_pack.c
- netbios_unpack.c
- netmasks.c
- nstrcpyA.c
- packetio.c
- parse_inaddr.c
- parse_nbtstat.c
- parse_target.c
- parse_target_cb.c
- penlib.h
- printable_NETBIOS_question_class.c
- printable_NETBIOS_question_type.c
- process_response.c
- README
- sleep_msecs.c
- stripA.c
- targets.c
- timeval_set_secs.c
- version.c
- win_sock.h
- winsock.c
all_digitsA.c @master — raw · history · blame
/*
* $Id: //devel/tools/main/nbtscan/all_digitsA.c#1 $
*
* written by : Stephen J. Friedl
* Software Consultant
* [email protected]
*
* Is the given string composed entirely of digits right up
* to the terminating NUL byte? We define an empty string as
* *not* all digits.
*/
#ifndef COMMONFILE
# define COMMONFILE "libcommon.h"
#endif
#include COMMONFILE
#include <ctype.h>
#include "penlib.h"
int __stdcall all_digitsA(const char *s, int *n)
{
const char *s_save = s;
assert(s != 0);
assert(n != 0);
*n = 0;
while ( isdigit(*s) )
*n = (*n * 10) + (*s++ - '0');
return (*s == 0) && (s > s_save);
}
|