NAME
ss1pi - Scan a positive int from a string
SYNOPSIS
#include "l/l_sys_scan.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int ss1pi
(
const char *input_str,
int *int_ptr
);
DESCRIPTION
This routine is similar to ss1i, except now we insist that the contents of
"str" represent a positive number (still restricted to the INT_MAX in
magnitude).
RETURNS
If "str" represents a valid positive integer, then NO_ERROR is returned.
Otherwise the problem with "str" is reported in the set error message, and
ERRROR is returned. The problem with "str" can be printed with
kjb_print_error.
RELATED
Use ss1ui() if what you really want is an unsigned int. Use ss1pi() if 0
is considered negative.
MACROS
ss1pi64, ss1pi32, ss1pi16
These macros can be used to force scanning of a certain integer size. The
argument of these is normally a pointer to kjb_int64, kjb_int32, or
kjb_int16 as appropriate.
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTER
Kobus Barnard
SEE ALSO
ss1ul
,
ss1l
,
ss1spl
,
ss1pl
,
ss1pl_2
,
ss1ui
,
ss1i
,
ss1spi
,
ss1pi_2
,
ss1us
,
ss1s
,
ss1sps
,
ss1ps
,
ss1ps_2
,
ss1f
,
ss1snf
,
ss1d
,
ss1snd