2020-01-21 19:48:05 +08:00
|
|
|
#include "help.h"
|
2019-02-07 17:26:48 +08:00
|
|
|
|
|
|
|
char help_information(void)
|
|
|
|
{
|
2020-01-21 19:48:05 +08:00
|
|
|
static const char name[] = "CProxy";
|
2019-02-07 17:26:48 +08:00
|
|
|
static const char subject[] = "proxy server";
|
|
|
|
static const struct {
|
2020-01-21 19:48:05 +08:00
|
|
|
const char *email;
|
2019-02-07 17:26:48 +08:00
|
|
|
} author = {
|
2020-01-21 19:48:05 +08:00
|
|
|
"aixiao@aixiao.me",
|
2019-12-16 19:27:36 +08:00
|
|
|
};
|
2019-02-07 17:26:48 +08:00
|
|
|
|
2020-01-21 19:48:05 +08:00
|
|
|
static const char usage[] = "Usage: [-?hpt] [-s signal] [-c filename]";
|
2019-02-07 17:26:48 +08:00
|
|
|
static const char *s_help[] = {
|
2019-05-09 18:25:42 +08:00
|
|
|
"",
|
|
|
|
"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",
|
2019-02-07 17:26:48 +08:00
|
|
|
"",
|
|
|
|
0
|
|
|
|
};
|
|
|
|
|
|
|
|
fprintf(stderr, "%s %s\n", name, subject);
|
2020-01-21 19:48:05 +08:00
|
|
|
fprintf(stderr, "Author: %s\n", author.email);
|
2019-05-09 18:25:42 +08:00
|
|
|
fprintf(stderr, "%s\n", usage);
|
2019-02-07 17:26:48 +08:00
|
|
|
|
|
|
|
int l;
|
|
|
|
for (l = 0; s_help[l]; l++) {
|
|
|
|
fprintf(stderr, "%s\n", s_help[l]);
|
|
|
|
}
|
|
|
|
|
|
|
|
BUILD("Compile、link.\n");
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|