CProxy/help.c

40 lines
1.1 KiB
C
Raw Normal View History

2020-01-21 19:48:05 +08:00
#include "help.h"
char help_information(void)
{
2020-01-21 19:48:05 +08:00
static const char name[] = "CProxy";
static const char subject[] = "proxy server";
static const struct {
2020-01-21 19:48:05 +08:00
const char *email;
} author = {
2020-01-21 19:48:05 +08:00
"aixiao@aixiao.me",
2019-12-16 19:27:36 +08:00
};
2020-01-21 19:48:05 +08:00
static const char usage[] = "Usage: [-?hpt] [-s signal] [-c filename]";
static const char *s_help[] = {
"",
"Options:",
2020-07-30 18:10:31 +08:00
" -p --process : process number",
" -t --timeout : timeout minute",
" -e --coding : ssl coding, [0-128]",
" -s --signal : send signal to a master process: stop, quit, restart, reload, status",
2020-03-24 14:15:15 +08:00
" -c --config : set configuration file, default: CProxy.conf",
" -? -h --? --help : help information",
"",
0
};
fprintf(stderr, "%s %s\n", name, subject);
2020-01-21 19:48:05 +08:00
fprintf(stderr, "Author: %s\n", author.email);
fprintf(stderr, "%s\n", usage);
int l;
for (l = 0; s_help[l]; l++) {
fprintf(stderr, "%s\n", s_help[l]);
}
BUILD("Compile、link.\n");
return 0;
}