unimportant change

This commit is contained in:
AustrianToast 2024-10-04 01:04:47 +02:00
parent 04a8712b0f
commit c85be15175
Signed by: AustrianToast
GPG Key ID: 1B4D0AAF6E558816

View File

@ -40,15 +40,13 @@ int read_csv(const char *file_name, const uint64_t row_length, const uint64_t co
FILE *file_ptr; FILE *file_ptr;
uint32_t bufsize = row_length*2; // have to account for delimiters uint32_t bufsize = row_length*2; // have to account for delimiters
char file_line[bufsize]; char file_line[bufsize];
uint64_t row_index = 0;
uint64_t column_index = 0;
file_ptr = fopen(file_name, "r"); file_ptr = fopen(file_name, "r");
if (file_ptr == NULL) { if (file_ptr == NULL) {
printf("Unable to open csv\n"); printf("Unable to open csv\n");
return 1; return 1;
} }
for (column_index = 0; column_index < column_length; column_index++) { for (uint64_t column_index = 0; column_index < column_length; column_index++) {
printf("row_index: %lu\n", column_index); printf("row_index: %lu\n", column_index);
if (fgets(file_line, bufsize, file_ptr) == NULL) { if (fgets(file_line, bufsize, file_ptr) == NULL) {
@ -56,7 +54,7 @@ int read_csv(const char *file_name, const uint64_t row_length, const uint64_t co
} }
char *bruh = strtok(file_line, ";,"); char *bruh = strtok(file_line, ";,");
for(row_index = 0; row_index < row_length; row_index++) { for(uint64_t row_index = 0; row_index < row_length; row_index++) {
if (bruh == NULL) { if (bruh == NULL) {
printf("Fuck You!!!"); printf("Fuck You!!!");
continue; continue;
@ -67,7 +65,8 @@ int read_csv(const char *file_name, const uint64_t row_length, const uint64_t co
printf("\n"); printf("\n");
} }
// uint64_t row_index = 0;
// uint64_t column_index = 0;
// while (fgets(file_line, bufsize, file_ptr)) { // while (fgets(file_line, bufsize, file_ptr)) {
// row_index = 0; // row_index = 0;
// char *bruh = strtok(file_line, ";,"); // char *bruh = strtok(file_line, ";,");