Skip to content

Commit

Permalink
Update tabgen.c
Browse files Browse the repository at this point in the history
  • Loading branch information
akscholar committed Oct 24, 2024
1 parent ce752b7 commit 76aea70
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions src/kernel/tab/tabgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,40 +68,6 @@ string add_header(int nc, string header)

}

string add_header(string header)
{
char *token;
char *result = malloc(100);
result[0] = '\0';
int first = 1;
int arr_len = 0;

token = strtok(header, ",");

strcat(result, "| ");
while (token != NULL) {
if (!first) {
strcat(result, " | ");
}
strcat(result, token);
first = 0;
arr_len++;
token = strtok(NULL, ",");
}

strcat(result, " |");
strcat(result, "\n");
strcat(result, "| double");

for (int i = 1; i < arr_len; i++) {
strcat(result, " | double");
}

strcat(result, " |");

return result;
}

void nemo_main()
{
stream ostr = stropen(getparam("out"),"w");
Expand Down

0 comments on commit 76aea70

Please sign in to comment.