CProxy/help.c

39 lines
1.0 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:",
2019-06-20 09:39:31 +08:00
" -?,-h : help information",
2020-01-21 19:48:05 +08:00
" -p : process number, default 2 process",
" -t : timeout minute, default is no timeout",
2019-12-16 19:27:36 +08:00
" -s signal : send signal to a master process: stop, quit, restart, reload, status",
2020-01-21 19:48:05 +08:00
" -c filename : set configuration file, default CProxy.ini",
"",
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;
}