|
YAZ 5.38.1
|
Implements atoi_n function. More...
Go to the source code of this file.
Functions | |
| int | atoi_n (const char *buf, int len) |
| like atoi(3) except that it reads exactly len characters | |
| int | atoi_n_check (const char *buf, int size, int *val) |
| like atoi_n but checks for proper formatting | |
| int | yaz_atoi (int base, const char *ptr, int len, int *val) |
| string to int conversion, with base | |
| int | yaz_atoul (int base, const char *ptr, int len, unsigned long *val) |
| string to unsigned long conversion, with base | |
Implements atoi_n function.
Definition in file atoin.c.
| int atoi_n | ( | const char * | buf, |
| int | len ) |
like atoi(3) except that it reads exactly len characters
| buf | buffer to read |
| len | number of bytes to consider (being digits) |
Definition at line 20 of file atoin.c.
References atoi_n(), and atoi_n_check().
Referenced by atoi_n(), and yaz_marc_read_iso2709().
| int atoi_n_check | ( | const char * | buf, |
| int | size, | ||
| int * | val ) |
like atoi_n but checks for proper formatting
| buf | buffer to read values from |
| size | size of buffer |
| val | value of decimal number (if successful) |
| 0 | no value found (non-digits found) |
| 1 | value found and *val holds value |
Definition at line 27 of file atoin.c.
References atoi_n_check(), and yaz_atoi().
Referenced by atoi_n(), atoi_n_check(), convert_solrmarc(), replace_node(), yaz_marc_read_iso2709(), yaz_marc_read_line(), yaz_marc_set_leader(), yaz_marc_write_check(), yaz_marc_write_iso2709(), yaz_marc_write_json(), yaz_marc_write_line(), yaz_marc_write_marcxml_wrbuf(), yaz_marc_write_xml(), and yaz_marc_write_xml_turbo_xml().
| int yaz_atoi | ( | int | base, |
| const char * | ptr, | ||
| int | len, | ||
| int * | val ) |
string to int conversion, with base
| base | numerical base (2-36) |
| ptr | buffer to read |
| len | number of bytes to consider (being digits) |
| val | value of decimal number (if successful) |
Definition at line 33 of file atoin.c.
References yaz_atoi(), and yaz_atoul().
Referenced by atoi_n_check(), cs_complete_http(), yaz_atoi(), and yaz_http_parse_chunks().
| int yaz_atoul | ( | int | base, |
| const char * | ptr, | ||
| int | len, | ||
| unsigned long * | val ) |
string to unsigned long conversion, with base
| base | numerical base (2-36) |
| ptr | buffer to read |
| len | maximum number of bytes to read |
| val | value of number (if successful) |
Definition at line 45 of file atoin.c.
References yaz_atoul(), yaz_isdigit, yaz_islower, and yaz_isupper.
Referenced by yaz_atoi(), and yaz_atoul().