|
@ -31,10 +31,14 @@ void collectCustomerProperties() |
|
|
} |
|
|
} |
|
|
if(inputTooLong){ |
|
|
if(inputTooLong){ |
|
|
errorMessage(-7); |
|
|
errorMessage(-7); |
|
|
}else{ |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
else{ |
|
|
*(instance.forename+letterCounter) = '\0'; |
|
|
*(instance.forename+letterCounter) = '\0'; |
|
|
letterCounter = 0; |
|
|
letterCounter = 0; |
|
|
} |
|
|
} |
|
|
|
|
|
if(!isLetterOfAlphabet(instance.forename)){ |
|
|
|
|
|
errorMessage(-10); |
|
|
|
|
|
} |
|
|
printf("Enter surname (max. 15 letters):\n"); |
|
|
printf("Enter surname (max. 15 letters):\n"); |
|
|
while(letterCounter<letterMaximum && (userInput=getchar())!='\n'){ |
|
|
while(letterCounter<letterMaximum && (userInput=getchar())!='\n'){ |
|
|
*(instance.surname+letterCounter) = userInput; |
|
|
*(instance.surname+letterCounter) = userInput; |
|
@ -50,6 +54,9 @@ void collectCustomerProperties() |
|
|
*(instance.surname+letterCounter) = '\0'; |
|
|
*(instance.surname+letterCounter) = '\0'; |
|
|
letterCounter = 0; |
|
|
letterCounter = 0; |
|
|
} |
|
|
} |
|
|
|
|
|
if(!isLetterOfAlphabet(instance.surname)){ |
|
|
|
|
|
errorMessage(-11); |
|
|
|
|
|
} |
|
|
printf("Enter password (max. 20 letters):\n"); |
|
|
printf("Enter password (max. 20 letters):\n"); |
|
|
while(letterCounter<letterMaximum && (userInput=getchar())!='\n'){ |
|
|
while(letterCounter<letterMaximum && (userInput=getchar())!='\n'){ |
|
|
*(instance.password+letterCounter) = userInput; |
|
|
*(instance.password+letterCounter) = userInput; |
|
|