parse use input, add finish test screen

This commit is contained in:
Aidan Haas
2022-11-16 17:27:44 -05:00
committed by GitHub
parent b6fac567ee
commit d5cfab9c4c
5 changed files with 61 additions and 11 deletions
+14
View File
@@ -73,4 +73,18 @@ int parse_words_file(FILE *words_file, Word_array *words) {
fclose(words_file);
return SUCCESS;
}
/* Appends first parameter to the end of end of the second parameter
(Does not change size of the target, assumes there is space) */
void append_line(char *source, char *target) {
int length = strlen(target) + strlen(source);
int i, cursor = 0;
for (i = strlen(target); i < length; i++) {
target[i] = source[cursor];
cursor++;
}
target[i] = '\0'; /* End string */
}