nicer comments for me

This commit is contained in:
SowinskiBraeden committed 2024-09-29 00:22:21 -07:00
1 parent ee0cf4e19f
commit 1a0333bf1f
1 file changed
+12 -9
+12 -9
View File
@@ -4,9 +4,11 @@
#include <stdbool.h> #include <stdbool.h>
/* /*
We use define the constants here so the the processor We define the constants here so the the processor
replaces the var name with the actual value to prevent replaces the var name with the actual value to prevent
Variable modified error during compile "Variable modified error during compile"
- give me a break I am learning and need this note to
tell me why I am doing this
*/ */
#define MAX_COURSE_DES_LEN 50 #define MAX_COURSE_DES_LEN 50
#define MAX_COURSE_NO_LEN 20 #define MAX_COURSE_NO_LEN 20
@@ -20,7 +22,7 @@
#define MAX_CHAR 85 // MAX_PUPIL_NUM_LEN + ',' + MAX_COURSE_NO_LEN + ',' + MAX_COURSE_DES_LEN, + ',' + 5 (5 is the number of characters in the word "FALSE") #define MAX_CHAR 85 // MAX_PUPIL_NUM_LEN + ',' + MAX_COURSE_NO_LEN + ',' + MAX_COURSE_DES_LEN, + ',' + 5 (5 is the number of characters in the word "FALSE")
/*** DEFINE CSV READER FUNCTIONS ***/ /*** DEFINE CSV READER FUNCTIONS & DATASTRUCTURES ***/
typedef struct { typedef struct {
char pupilNum[MAX_PUPIL_NUM_LEN]; char pupilNum[MAX_PUPIL_NUM_LEN];
@@ -89,14 +91,16 @@ CSV_LINE *csvReader(char data_dir[]) {
return lines; return lines;
} }
/*** DEFINE STUDENT DATA STRUCTURES ***/ /*** DEFINE STUDENT DATA STRUCTURES & COURSE DATA STRUCTURES***/
// REQUEST
typedef struct { typedef struct {
char crsNo[MAX_COURSE_NO_LEN]; char crsNo[MAX_COURSE_NO_LEN];
char description[MAX_COURSE_DES_LEN]; char description[MAX_COURSE_DES_LEN];
bool alt; bool alt;
} REQUEST; } REQUEST;
// STUDENT
typedef struct { typedef struct {
char pupilNum[MAX_PUPIL_NUM_LEN]; char pupilNum[MAX_PUPIL_NUM_LEN];
REQUEST request[TOTAL_BLOCKS + MAX_REQUEST_ALTS]; REQUEST request[TOTAL_BLOCKS + MAX_REQUEST_ALTS];
@@ -107,8 +111,7 @@ typedef struct {
short studentIndex; short studentIndex;
} STUDENT; } STUDENT;
/*** DEFINE COURSE DATA STRUCTURE ***/ // COURSE
typedef struct { typedef struct {
char crsNo[MAX_COURSE_NO_LEN]; char crsNo[MAX_COURSE_NO_LEN];
short requests; short requests;
@@ -120,12 +123,12 @@ typedef struct {
/*** DEFINE GET FUNCTIONS FOR STUDENTS & COURSES FROM CSV ***/ /*** DEFINE GET FUNCTIONS FOR STUDENTS & COURSES FROM CSV ***/
STUDENT *getStudents(char *data_dir, int total_blocks) { STUDENT *getStudents(CSV_LINE *lines, int total_blocks) {
return NULL; return NULL;
} }
void getCourses() { COURSE *getCourses(CSV_LINE *lines) {
return; return NULL;
} }
int main(int argc, char **argv) { int main(int argc, char **argv) {