From 148070c2bbe41ad925e5c30196339a151f9e6b4f Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Mon, 17 Oct 2022 16:38:28 +0200 Subject: [PATCH] created getter function for encryptionOperation_cb and also created encryptionOperation_type_cb cuz I didn't found any other way to make it work hehe --- src/lib/flags.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/flags.c b/src/lib/flags.c index 9c33f1c..fb691b8 100644 --- a/src/lib/flags.c +++ b/src/lib/flags.c @@ -11,7 +11,8 @@ int encryptionOperation(int text, int encryptedText); char encryptionSeparator = '.'; //NOPE > DO NOT TOUCH THIS, USE setEncryptionSeparator instead < unsigned long keyLength = 50; //LENGTH OF KEY > DO NOT TOUCH THIS, USE setKeyLength instead < inputFlags flags = DEFAULT_FLAGS; -int (*encryptionOperation_cb)(int, int) = encryptionOperation; +typedef int (*encryptionOperation_type_cb)(int, int); +encryptionOperation_type_cb encryptionOperation_cb = encryptionOperation; //GETTERS char getEncryptionSeparator() @@ -49,6 +50,11 @@ outputFlags noOutput(boolean exitCode) return (outputFlags) { emptyText, emptyKey, 0, 0, 0, exitCode }; } +encryptionOperation_type_cb getEncryptionOperation() +{ + return encryptionOperation_cb; +} + //SETTERS void setEncryptionSeparator(char encryptionSeparatorNew) {