unimportant change
This commit is contained in:
parent
04a8712b0f
commit
c85be15175
9
matrix.c
9
matrix.c
@ -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, ";,");
|
||||||
|
Loading…
Reference in New Issue
Block a user