renamed noUpdate flag to update & swapped its value everywhere

it was kinda annoying when you were trying to disable it with positive value :DD
This commit is contained in:
Václav Šmejkal 2022-07-10 17:51:31 +02:00
parent 71865826fa
commit 212f0205c5
No known key found for this signature in database
GPG Key ID: FD749A97DF2D5E19
5 changed files with 5 additions and 5 deletions

View File

@ -31,7 +31,7 @@ typedef struct
{
unsigned char noCheck; //BOOLEAN FOR SKIPPING VERSION CHECK
unsigned char noOutput; //BOOLEAN FOR NOT PRINTING OUTPUT WHEN ENCRYPTING/DECRYPTING
unsigned char noUpdate; //BOOLEAN FOR NOT UPDATING YOUR WHY VERSION IF OLD IS USED
unsigned char update; //BOOLEAN FOR UPDATING YOUR WHY VERSION IF OLD IS USED
} inputFlags;
typedef struct

View File

@ -5,7 +5,7 @@
int main(void)
{
//RUN ENCRYPTION WITH TEXT_TO_ENCRYPT, GENERATE NEW KEY AND DO NOT CHECK FOR ACTIVE VERSION & PREVENT ANY OUTPUT
outputFlags encryptedText = encryptText(TEXT_TO_ENCRYPT, NULL, (inputFlags) {1, 1, 1});
outputFlags encryptedText = encryptText(TEXT_TO_ENCRYPT, NULL, (inputFlags) {1, 1, 0});
//SIMPLE TEXT
printf

View File

@ -19,7 +19,7 @@ unsigned long getKeyLength()
inputFlags defaultFlags()
{
return (inputFlags) {0, 0, 1};
return (inputFlags) { 0, 0, 0 };
}
outputFlags noOutput(unsigned char exitCode)

View File

@ -145,7 +145,7 @@ unsigned char checkVersion(inputFlags flags)
if (strcmp(VERSION, json_object_get_string(active)) != 0)
{
//UPDATE
if (!flags.noUpdate)
if (flags.update)
{
//CHECK FOR ROOT PERMISSIONS
if (getuid() != 0)

View File

@ -17,7 +17,7 @@ int main(void)
{
0, //SKIP CHECK
0, //NO OUTPUT
1 //NO UPDATE
0 //UPDATE
};
//SET KEY_LENGTH TO 100