diff options
| author | Ben Winston | 2024-05-11 15:08:00 -0400 |
|---|---|---|
| committer | Ben Winston | 2024-05-11 15:08:00 -0400 |
| commit | fa82dab8db28b3d479698a49bea037f3bf31f82b (patch) | |
| tree | 85a7a0a4cedf218a94928a74b1882bd30ebf4d71 | |
| parent | aee9bc91b51c34a96acbcd1d36c1374bf3ec8312 (diff) | |
add isbn and translator
| -rw-r--r-- | booki.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -116,6 +116,14 @@ struct Book parse_book(char* current_pos) { struct es language = parse_string(current_pos, &new_pos); book.language = language; current_pos = new_pos; + } else if (strncmp(attr, "isbn", 4) == 0) { + struct es isbn = parse_string(current_pos, &new_pos); + book.isbn = isbn; + current_pos = new_pos; + } else if (strncmp(attr, "translator", 10) == 0) { + struct es translator = parse_string(current_pos, &new_pos); + book.translator = translator; + current_pos = new_pos; } // go to (and then past) the newline |
