This commit is contained in:
overcuriousity 2025-05-12 23:23:41 +02:00
parent 82bec39a32
commit 536dcc8c6b
2 changed files with 9 additions and 0 deletions

BIN
bin/main

Binary file not shown.

View File

@ -16,6 +16,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#define BUF 1024
#define DEBUG true
@ -57,6 +58,13 @@ struct errorLogEntry_t parseLogline(char *logLine) {
return logEntry;
};
uint32_t my_strlen(char *s) {
uint32_t counter = 0;
while (s[counter] != '\0') {
counter++;
}
return counter;
}
int main(int argc, char *argv[]) {
debugmsg("START OF PROGRAM");
@ -71,6 +79,7 @@ int main(int argc, char *argv[]) {
char *filepath = argv[1];
FILE *fp = fopen(filepath, "r");
if(fp == NULL) {
perror("fopen");
printf("Scheisse gelaufen mit der Datei...\n");
return -1;
}else{