From 953265745565c9e73bd63e2dc7d469932a8ee307 Mon Sep 17 00:00:00 2001 From: stmctommyau Date: Mon, 11 Sep 2023 17:56:26 +0800 Subject: [PATCH] minor bug fixes --- admin_user.h | 1 + main.c | 1 + normal_user.h | 7 +------ role_control.h | 4 ++-- user_control.h | 2 ++ 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/admin_user.h b/admin_user.h index 7672002..93b3fda 100644 --- a/admin_user.h +++ b/admin_user.h @@ -12,6 +12,7 @@ #ifndef Utils #define Utils +#include "sorting.h" #include "utils.h" #endif // !Utils //list of functions diff --git a/main.c b/main.c index c58526b..f6fff8a 100644 --- a/main.c +++ b/main.c @@ -19,6 +19,7 @@ #include "normal_user.h" #ifndef Utils #define Utils +#include "sorting.h" #include "utils.h" #endif // !Utils diff --git a/normal_user.h b/normal_user.h index d94e319..dc01536 100644 --- a/normal_user.h +++ b/normal_user.h @@ -10,14 +10,9 @@ #include #endif - - -#ifndef SORT_H -#define SORT_H -#include "sorting.h" -#endif // !SORT_H #ifndef Utils #define Utils +#include "sorting.h" #include "utils.h" #endif // !Utils //fucntions for menu diff --git a/role_control.h b/role_control.h index 7fa9c0b..6ce4744 100644 --- a/role_control.h +++ b/role_control.h @@ -27,8 +27,8 @@ void role_control(){ "role", }; void * list = getLinkedList(role_list_db(),0); - lister(list,NULL,sizeofLinkedlist(list),"Role",SortItems,2,print_role,sortRole,showRole); - list_role(); + // lister(list,NULL,sizeofLinkedlist(list),"Role",SortItems,2,print_role,sortRole,showRole); + list_role(db); break; default: break; diff --git a/user_control.h b/user_control.h index c522ea9..ec97eda 100644 --- a/user_control.h +++ b/user_control.h @@ -1,5 +1,7 @@ //user control struct user add_user(struct user db); +struct user edit_user(struct user db,int index); +struct user delete_user(struct user db,int index); void * showUser(void * ddb,int index); struct Map* SortUser(void * ddb,int choice); void print_user(void * ddb, int cur, int end,struct Map* map);