2023-10-12 14:25:48 -07:00
|
|
|
#include "stdio.h"
|
|
|
|
#include "stdlib.h"
|
|
|
|
#include "string.h"
|
|
|
|
|
|
|
|
#include "node.h"
|
|
|
|
|
|
|
|
#ifndef CSV_PARSER
|
|
|
|
#define CSV_PARSER
|
|
|
|
|
|
|
|
|
|
|
|
struct csv {
|
|
|
|
char* title;
|
|
|
|
int year;
|
|
|
|
int numlang;
|
2023-10-13 00:55:11 -07:00
|
|
|
char** languages;
|
2023-10-12 14:25:48 -07:00
|
|
|
float rating;
|
|
|
|
struct node* node;
|
|
|
|
};
|
|
|
|
|
2023-10-13 01:39:26 -07:00
|
|
|
struct node* parse_csv(char*);
|
2023-10-12 14:25:48 -07:00
|
|
|
|
|
|
|
struct csv* parse_line(char*);
|
|
|
|
|
|
|
|
void print_movies(struct node*);
|
|
|
|
|
|
|
|
void print_line(struct csv*);
|
|
|
|
|
2023-10-13 00:55:11 -07:00
|
|
|
int count_char(char*, char);
|
|
|
|
|
2023-10-12 14:25:48 -07:00
|
|
|
#endif
|