summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2021-05-01 13:11:49 +0200
committerDr. David von Oheimb <dev@ddvo.net>2021-05-01 13:11:49 +0200
commitf4407385f58242dcc6ae95a60c2a3dc8782bee42 (patch)
tree7b89ff8ead447d4d0bb3812e5d9c1fc36f32d526 /apps
parentUse OCSP-specific error code for clarity (diff)
downloadopenssl-f4407385f58242dcc6ae95a60c2a3dc8782bee42.tar.xz
openssl-f4407385f58242dcc6ae95a60c2a3dc8782bee42.zip
APPS: Document the core of the opt_ API
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/14995)
Diffstat (limited to 'apps')
-rw-r--r--apps/include/fmt.h3
-rw-r--r--apps/include/opt.h3
-rw-r--r--apps/lib/opt.c6
3 files changed, 5 insertions, 7 deletions
diff --git a/apps/include/fmt.h b/apps/include/fmt.h
index c9edd4707e..f235899bf8 100644
--- a/apps/include/fmt.h
+++ b/apps/include/fmt.h
@@ -17,7 +17,8 @@
#ifndef OSSL_APPS_FMT_H
#define OSSL_APPS_FMT_H
-/* On some platforms, it's important to distinguish between text and binary
+/*
+ * On some platforms, it's important to distinguish between text and binary
* files. On some, there might even be specific file formats for different
* contents. The FORMAT_xxx macros are meant to express an intent with the
* file being read or created.
diff --git a/apps/include/opt.h b/apps/include/opt.h
index f9ac5accae..f22e9af05e 100644
--- a/apps/include/opt.h
+++ b/apps/include/opt.h
@@ -349,7 +349,6 @@ char *opt_init(int ac, char **av, const OPTIONS * o);
int opt_next(void);
void opt_begin(void);
int opt_format(const char *s, unsigned long flags, int *result);
-const char *format2str(int format);
int opt_int(const char *arg, int *result);
int opt_int_arg(void);
int opt_ulong(const char *arg, unsigned long *result);
@@ -381,8 +380,6 @@ int opt_verify(int i, X509_VERIFY_PARAM *vpm);
int opt_rand(int i);
int opt_provider(int i);
void opt_help(const OPTIONS * list);
-void opt_print(const OPTIONS * opt, int doingparams, int width);
-int opt_format_error(const char *s, unsigned long flags);
void print_format_error(int format, unsigned long flags);
int opt_isdir(const char *name);
int opt_printf_stderr(const char *fmt, ...);
diff --git a/apps/lib/opt.c b/apps/lib/opt.c
index 83ae28cdc1..a6b6f7ce4f 100644
--- a/apps/lib/opt.c
+++ b/apps/lib/opt.c
@@ -227,7 +227,7 @@ static OPT_PAIR formats[] = {
};
/* Print an error message about a failed format parse. */
-int opt_format_error(const char *s, unsigned long flags)
+static int opt_format_error(const char *s, unsigned long flags)
{
OPT_PAIR *ap;
@@ -325,7 +325,7 @@ int opt_format(const char *s, unsigned long flags, int *result)
}
/* Return string representing the given format. */
-const char *format2str(int format)
+static const char *format2str(int format)
{
switch (format) {
default:
@@ -973,7 +973,7 @@ static const char *valtype2param(const OPTIONS *o)
return "parm";
}
-void opt_print(const OPTIONS *o, int doingparams, int width)
+static void opt_print(const OPTIONS *o, int doingparams, int width)
{
const char* help;
char start[80 + 1];