mirror of
https://gitlab.kit.edu/kit/scc/sys/mail/exim-encrypt-dlfunc.git
synced 2025-12-06 09:43:55 +01:00
Added documentation and command help messages to decryption tools.
This commit is contained in:
@ -64,6 +64,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
// define arguments
|
||||
const char *shortargs = "s:p:S:P:f:nh";
|
||||
static struct option long_options[] = {
|
||||
{"secret-key", required_argument, NULL, 's'},
|
||||
{"public-key", required_argument, NULL, 'p'},
|
||||
@ -71,6 +72,7 @@ int main(int argc, char *argv[]) {
|
||||
{"public-key-file", required_argument, NULL, 'P'},
|
||||
{"infile", required_argument, NULL, 'f'},
|
||||
{"no-newline", required_argument, NULL, 'n'},
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
@ -96,7 +98,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
// parse arguments
|
||||
int long_index = 0;
|
||||
while ((opt = getopt_long(argc, argv, "s:p:S:P:f:n",
|
||||
while ((opt = getopt_long(argc, argv, shortargs,
|
||||
long_options, &long_index)) != -1) {
|
||||
switch (opt) {
|
||||
case 's':
|
||||
@ -128,6 +130,10 @@ int main(int argc, char *argv[]) {
|
||||
case 'n':
|
||||
add_newline = false;
|
||||
break;
|
||||
case 'h':
|
||||
print_usage(prog_basename);
|
||||
exit(EXIT_SUCCESS);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -53,11 +53,12 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
// define arguments
|
||||
const char *shortargs = "p:f:n";
|
||||
const char *shortargs = "p:f:nh";
|
||||
static struct option long_options[] = {
|
||||
{"password", required_argument, NULL, 'p'},
|
||||
{"infile", required_argument, NULL, 'f'},
|
||||
{"no-newline", no_argument, NULL, 'n'},
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
@ -87,6 +88,10 @@ int main(int argc, char *argv[]) {
|
||||
case 'n':
|
||||
add_newline = false;
|
||||
break;
|
||||
case 'h':
|
||||
print_usage(prog_basename);
|
||||
exit(EXIT_SUCCESS);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user