resolved conflict
This commit is contained in:
commit
15f5dfbd40
BIN
Start_Linux/game.o
Normal file
BIN
Start_Linux/game.o
Normal file
Binary file not shown.
@ -10,17 +10,21 @@ char* readWord(FILE *file)
|
||||
int index = 0; // Position im Puffer
|
||||
int c; // Variable für jedes gelesene Zeichen
|
||||
|
||||
// Whitespace überspringen
|
||||
while(isspace(c = fgetc(file))); //isspace checkt ob gelesenes Zeichen whitespace ist, wenn ja 1 wenn nein 0
|
||||
// Whitespace und Delimiters überspringen
|
||||
while((c = fgetc(file)) != EOF && (isspace(c) || c == ',' || c == ';' || c == '.'));
|
||||
|
||||
// Buchstaben einlesen bis nächstes whitespace/EOF
|
||||
while(c != EOF && !isspace(c) && index < MAX_WORD_LEN - 1) // -1 wegen Nullterminator
|
||||
// Buchstaben einlesen bis nächstes whitespace/Delimiter/EOF
|
||||
while(c != EOF && !isspace(c) && c != ',' && c != ';' && c != '.' && index < MAX_WORD_LEN - 1) //-1 wegen Nullterminator
|
||||
{
|
||||
word[index++] = (char)c;
|
||||
word[index++] = (char)toupper(c); // Konvertiere zu Großbuchstaben
|
||||
c = fgetc(file);
|
||||
}
|
||||
word[index] = '\0'; // Nullterminator (= Ende String)
|
||||
|
||||
// Leere überspringen
|
||||
if(index == 0)
|
||||
return NULL;
|
||||
|
||||
return strdup(word); // Rückgabe string, dynamisch allokiert da Zeiger auf lokalen Puffer zurückgegeben
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@ -9,8 +9,8 @@ unityfolder = ./unity
|
||||
# --------------------------
|
||||
# initiales Spiel bauen
|
||||
# --------------------------
|
||||
wordsalad_initial:
|
||||
$(CC) -o wordsalad_ourversion -L. $(BINARIES)/libwordsalad_complete.a $(BINARIES)/libraylib.a $(LDFLAGS)
|
||||
wordsalad_ourversion:
|
||||
$(CC) -o wordsalad_ourversion -L. $(BINARIES)/libwordsalad.a $(BINARIES)/libraylib.a $(LDFLAGS)
|
||||
|
||||
# --------------------------
|
||||
# Normales Spiel bauen
|
||||
|
||||
BIN
Start_Linux/runTests
Executable file
BIN
Start_Linux/runTests
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user