From 555980d86ad477c0c4f158f881c51a0289dc371a Mon Sep 17 00:00:00 2001 From: fdai7207 Date: Fri, 10 Feb 2023 13:53:03 +0100 Subject: [PATCH] solve merge conflicts. --- build-project.sh | 41 +++++++++++++++++++- src/createEmployeeAccount.c | 15 +------- src/employeeLogin.c | 4 +- src/employeesCredentialsList.txt | 26 +++++++++++++ src/employeesData.txt | 58 ----------------------------- src/error.c | 26 ++++++------- src/main | Bin 35568 -> 0 bytes src/mainMenu.c | 4 +- tests/test_createEmployeeAccount.c | 3 -- tests/test_mainMenu.c | 8 ++++ 10 files changed, 92 insertions(+), 93 deletions(-) delete mode 100755 src/main diff --git a/build-project.sh b/build-project.sh index 98b90d6..f89e14e 100755 --- a/build-project.sh +++ b/build-project.sh @@ -1,5 +1,16 @@ +trap 'echo "Interrupted"; + rm main; + cp employeeLogin.c.bak employeeLogin.c; + cp mainMenu.c.bak mainMenu.c; + cp createEmployeeAccount.c.bak createEmployeeAccount.c; + rm employeeLogin.c.bak; + rm mainMenu.c.bak; + rm createEmployeeAccount.c.bak; + cd ..; + rm -r build; exit' SIGINT + clear -ceedling test:all +ceedling test:all rm -r build/ @@ -11,8 +22,36 @@ mv temp.txt employeesCredentialsList.txt sed '/Name : John/,$d' employeesData.txt > temp.txt mv temp.txt employeesData.txt +# backup files +for file in employeeLogin.c mainMenu.c createEmployeeAccount.c; do + cp "$file" "$file.bak" +done + +# replace .c with .h in respective files +#sed -i 's/createEmployeeAccount.c/createEmployeeAccount.h/g' mainMenu.c +#sed -i 's/showGeneralInfoEmployee.c/showGeneralInfoEmployee.h/g' employeeLogin.c +#sed -i 's/mainMenu.c/mainMenu.h/g' employeeLogin.c +#sed -i 's/employeeLogin.c/employeeLogin.h/g' createEmployeeAccount.c + +# remove 'src/' +for file in employeeLogin.c createEmployeeAccount.c; do + sed -i 's/src\///g' "$file" +done + + gcc mainMenu.c error.c createEmployeeAccount.c showGeneralInfoEmployee.c employeeLogin.c createCustomer.c helperFunctions.c loginCustomer.c customerMenu.c main.c -o main ./main rm main +# restore backups +for file in employeeLogin.c mainMenu.c createEmployeeAccount.c; do + cp "$file.bak" "$file" +done + +# remove backups +for file in employeeLogin.c.bak mainMenu.c.bak createEmployeeAccount.c.bak; do + rm "$file" +done + + cd .. diff --git a/src/createEmployeeAccount.c b/src/createEmployeeAccount.c index ac429e6..db75883 100644 --- a/src/createEmployeeAccount.c +++ b/src/createEmployeeAccount.c @@ -1,5 +1,6 @@ #include "createEmployeeAccount.h" +#include "employeeLogin.h" bool isValidEmployeeID(const char* employeeId,const int maximumStringLength) @@ -200,19 +201,7 @@ void getNewEmployeeCredentials() if(isValidName(data->firstName,minimumNameLength) && isValidName(data->lastName,minimumNameLength)) { printf("\n\nplease enter your adress\n"); - scanf(" %[^\n]s",street); - strcat(data->address,street); - - scanf(" %[^\n]s",city); - strcat(data->address,city); - - scanf("%d",houseNumber); - sprintf(houseNumberString,"%d",houseNumber); - strcat(data->address,houseNumberString); - - scanf("%s",postalCode); - sprintf(postalCodeString,"%d",postalCode); - strcat(data->address,postalCodeString); + scanf(" %[^\n]s",data->address); printf("\n\nplease enter your Phone number\n"); scanf(" %[^\n]s",data->phoneNumber); diff --git a/src/employeeLogin.c b/src/employeeLogin.c index 7c58fcf..3d70358 100644 --- a/src/employeeLogin.c +++ b/src/employeeLogin.c @@ -1,5 +1,5 @@ +#include "mainMenu.h" #include "employeeLogin.h" -//#include "createEmployeeAccount.h" #include "showGeneralInfoEmployee.h" @@ -16,7 +16,7 @@ int checkEmployeeCredentials(char *inputUsername, char *inputPassword) char* listUsername = malloc(credentialLength * sizeof(char*)); char* listPassword = malloc(credentialLength * sizeof(char*)); - FILE* employeeList = fopen("employeesCredentialsList.txt","r"); + FILE* employeeList = fopen("src/employeesCredentialsList.txt","r"); if(employeeList == NULL ) { diff --git a/src/employeesCredentialsList.txt b/src/employeesCredentialsList.txt index 3f2c0bf..e8b6ffb 100644 --- a/src/employeesCredentialsList.txt +++ b/src/employeesCredentialsList.txt @@ -39,3 +39,29 @@ Shivam Schivam007fdlt3781 + + + + + + + + + + + + + + + + + + + + + + + + +210960 fdai7207. + diff --git a/src/employeesData.txt b/src/employeesData.txt index cf51135..8c5d3ff 100644 --- a/src/employeesData.txt +++ b/src/employeesData.txt @@ -34,61 +34,3 @@ Adress : Fulda,leipzigerstrasse,6 Phone number : +4918756871384 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/error.c b/src/error.c index 481d268..1e41a8c 100644 --- a/src/error.c +++ b/src/error.c @@ -5,55 +5,55 @@ int errorMessage(int errorCode) int returnValue=0; switch(errorCode){ case -1: - puts("Login not successful."); + //puts("Login not successful."); returnValue = -1; break; case -2: - puts("Maximum number of attempts reached."); + //puts("Maximum number of attempts reached."); returnValue = -2; break; case -3: - puts("No menu entry available for this number."); + //puts("No menu entry available for this number."); returnValue = -3; break; case -4: - puts("CustomerData.* not found. Make sure that you've created an user account before logging in for the first time. Without users there is no file. Aborting!"); + //puts("CustomerData.* not found. Make sure that you've created an user account before logging in for the first time. Without users there is no file. Aborting!"); returnValue = -4; break; case -5: - puts("You should be at least 18 years old to create a bank account!"); + //puts("You should be at least 18 years old to create a bank account!"); returnValue = -5; break; case -6: - puts("Error when trying to open a file to create a customer account."); + // puts("Error when trying to open a file to create a customer account."); returnValue = -6; break; case -7: - puts("Forename too long. (length > 15 characters) Aborting!"); + // puts("Forename too long. (length > 15 characters) Aborting!"); returnValue = -7; break; case -8: - puts("Surname too long. (length > 15 characters) Aborting!"); + // puts("Surname too long. (length > 15 characters) Aborting!"); returnValue = -8; break; case -9: - puts("Password too long. (length > 20 characters) Aboring!"); + // puts("Password too long. (length > 20 characters) Aboring!"); returnValue = -9; break; case -10: - puts("You have entered an invalid character [ä,ö,ü, special characters] for your forename. This is not allowed. Aborting!"); + // puts("You have entered an invalid character [ä,ö,ü, special characters] for your forename. This is not allowed. Aborting!"); returnValue = -10; break; case -11: - puts("You have entered an invalid character [ä,ö,ü, special characters] for your surname. This is not allowed. Aborting!"); + // puts("You have entered an invalid character [ä,ö,ü, special characters] for your surname. This is not allowed. Aborting!"); returnValue = -11; break; case -12: - puts("You entered too many digits."); + // puts("You entered too many digits."); returnValue = -12; break; default: - puts("Error code unknown."); + // puts("Error code unknown."); } return returnValue; } diff --git a/src/main b/src/main deleted file mode 100755 index dae05f4865179a2691c12f44370f8541d55f565f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35568 zcmeHwePC48weOxl_=rk^f}*x^P*G4B6XYAw1Tr|GL=h525yv4jAyX$a>C71*mLL*P z#u!U&Z%cjFQth+0rIu?gqSs0gOQ>2Ky;@^S+q{bHiJ>*Mh*6PwzqR+;XU?I?Vg46^IR^Wk3r%JLD;sDic-pq;$}VpC>1lrDfk{M&Jja^ z50*5=FI50sb#&%s!eLAw1W0;g=wtx+IYky4Y7YsLUe4nr=4e=?aMH`CQ^vEQ>mrt8 zsQGq!rHXH7jPcjTD!PVFJ&H|7z2axXUXDv2L#;2^4j%PMB zz@x*E-$G>TEoHrISkCeqQW|tDdD{$pmh={}o>;2vWW#$nUmEK4u7w`O<M8Ar7Z(jgf-NM2V7!s+~Md`L#+ z{|=lf8o^hBFLO;Htp7ner}igH-v^>!mqY#t=*9qcR^^ZX0o48BX`#?5)N8%Sv@;|=SiH{o6JPxXx{N{M zkBleI3Js_9-vLgC?l<-Lv7ReaC-*{{Udr@c)F5$ay2jh0icb9#4?U8w-$AGTQ6C)+ zy3PynIvsTCTlCT8pi}>8AMDRi5K!gqW0-^P?0<_KbUA-ujWG^7n)Iq1VtPih)ezGP4E^^RO@bJw>s!&IOy9P^fMjwM;-LD9P|^X zCn9hn0w*Hy-!%f>=0n50E&0Fj3E|z;X6B_jyv@%K+iQm-HT4CsQsZC3cj4GloDp6} z{O+z4j`7bCPD5#Ths2*IoQBZuHi`A5?^q$5Vc!?%cJD470Fj__9p-2Z9dq$sLE5)R`N@4 z>zwfuP$;8Q%Y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>v`C0Oq)@K~Fu5#+@eKHM= z3~Acq$vmzHdIWo-+JC)Itf5XH(=T~s`|k&p_K3B<-bdDO8#Bm9ik;Ty>7xjNMp@SS zdS6;Yy$=l$d1S}`OQ6!8uh!T5yc+6tgZ5v`X}Avhw1=#5y^pNnB9*L+vD1Ghi&mUa zOtrq=$JVfo1$Fw_`Tr*C&t1yiEEPZ|5M8n}) zkYRTIpJ9Dnexj5GHPjWA$=Yv5#q&6!_}ThPnZr=8XSIBG`mbi`Z{dw64a@C+2deq~PG7_D_e_ z)8+Uh&`3nhC`t2)Yto48frha8Lg-B zlc7vB+y4f|(d*`Hc}mN9jO6r-okW~#ef(}^#-a6{(5`z9$u9O|5ns^zJa{zLX@7LJ lruLzIcc_cvFDvX|R{hiIYFTRT1L=?2pd`-9QpiHZ{|0PPvCjYi diff --git a/src/mainMenu.c b/src/mainMenu.c index e1a16f8..0bbf39f 100644 --- a/src/mainMenu.c +++ b/src/mainMenu.c @@ -3,7 +3,7 @@ #include "createEmployeeAccount.h" #include "createCustomer.h" #include "error.h" -#include "showGeneralInfoEmployee.h" + @@ -122,9 +122,7 @@ void menuInput() break; case 4 : getNewEmployeeCredentials(); - printf("\nsee you next time !\n\n"); break; - case 5 : printf("\e[1;1H\e[2J"); printf("\nsee you next time !\n\n"); break; diff --git a/tests/test_createEmployeeAccount.c b/tests/test_createEmployeeAccount.c index b42ac75..410b0d9 100644 --- a/tests/test_createEmployeeAccount.c +++ b/tests/test_createEmployeeAccount.c @@ -1,4 +1,3 @@ -#ifdef TEST #include "unity.h" @@ -303,5 +302,3 @@ void test_invalidPhoneNumber(void) } - -#endif // TEST diff --git a/tests/test_mainMenu.c b/tests/test_mainMenu.c index 5ae1670..9bbaebe 100644 --- a/tests/test_mainMenu.c +++ b/tests/test_mainMenu.c @@ -3,6 +3,14 @@ #include "unity.h" #include "../src/mainMenu.c" +#include "../src/error.c" +#include "../src/loginCustomer.c" +#include "../src/helperFunctions.c" +#include "../src/createCustomer.c" +#include "../src/employeeLogin.c" +#include "../src/createEmployeeAccount.c" +#include "../src/customerMenu.c" +#include "../src/showGeneralInfoEmployee.c" void setUp(void) {