Version of strncpy that ensures dest (size bytes) is null-terminated. */
| 63 | |
| 64 | /* Version of strncpy that ensures dest (size bytes) is null-terminated. */ |
| 65 | static char* strncpy0(char* dest, const char* src, size_t size) |
| 66 | { |
| 67 | strncpy(dest, src, size - 1); |
| 68 | dest[size - 1] = '\0'; |
| 69 | return dest; |
| 70 | } |
| 71 | |
| 72 | /* See documentation in header file. */ |
| 73 | int ini_parse_stream(ini_reader reader, void* stream, ini_handler handler, |