|
YAZ 5.35.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 | |
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 19 of file atoin.c.
References yaz_isdigit.
Referenced by atoi_n_check(), 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 32 of file atoin.c.
References atoi_n(), and yaz_isdigit.
Referenced by 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().