WHY2/src/lib/flags.c

28 lines
448 B
C
Raw Normal View History

#include <why2/flags.h>
#include <stdlib.h>
2022-05-29 17:45:34 +02:00
unsigned long getKeyLength()
{
return keyLength;
}
2022-05-27 17:25:02 +02:00
inputFlags noFlags()
{
2022-06-11 18:53:25 +02:00
return (inputFlags) {0, 0, 1};
2022-05-27 17:25:02 +02:00
}
outputFlags noOutput(unsigned char exitCode)
{
char *empty1 = malloc(1);
char *empty2 = malloc(1);
empty1[0] = '\0';
empty2[0] = '\0';
return (outputFlags) { empty1, empty2, 0, 0, exitCode };
}
void setKeyLength(int keyLengthNew)
{
keyLength = keyLengthNew;
}