diff --git a/Start_Windows/input.c b/Start_Windows/input.c index 67084e8..673ae1c 100644 --- a/Start_Windows/input.c +++ b/Start_Windows/input.c @@ -13,7 +13,7 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount) char *token; file = fopen("words.txt", "r"); - if(file == NULL) + if (file == NULL) { printf("\nNot able to open file.\n"); fclose(file); @@ -29,14 +29,21 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount) while (token != NULL) { strncpy(words[n], token, MAX_WORD_LEN); + + char *s = words[n]; + while (*s) + { + *s = toupper((unsigned char)*s); + s++; + } + // printf("Einzelwort: %s\n", words[n]); token = strtok(NULL, teiler); n++; } - } - + fclose(file); - return 0; + return n; } \ No newline at end of file