ss1us - Scan an unsigned short from a string
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
const char *input_str,
unsigned short *ushort_ptr
This routine reads an unsigned short from a string with more sophisticated
error reporting that available using scanf. If the contents of "str" is
exactly one number which will fit into an unsigned short it sets *unsigned
short_ptr to that number and returns NO_ERROR. Otherwise and error message is
set, and ERROR is returned. The contents of *unsigned short_ptr are only
changed on success.
If "str" represents a valid short, 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.
For successful return, "str" cannot contain two numbers. For example, it
can't be something like "1 2".
ss1u64, ss1u32, ss1u16
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.
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.