@@ 12,7 12,7 @@
typedef struct Courses {
char code[10];
- char name[50];
+ char name[35];
unsigned int mystery; // TODO What is this? An ID?
unsigned int seats_total, seats_taken, seats_open;
char professor[25];
@@ 58,8 58,9 @@ int parse_csv(const char filename[], course_t courses[MAX_COURSES]) {
}
void print_course(course_t course) {
- printf("%-10s %36s\n", course.code, course.name);
- printf("%-3i %-7s %-8s %25s\n\n", course.seats_open, course.weekdays,
+ // Numbers are from max size of element + alignment factor
+ printf("%-36s %9s\n", course.name, course.code);
+ printf("%-3i %-7s %-9s %24s\n\n", course.seats_open, course.weekdays,
course.time, course.professor);
}