OCT 1. 更新Argtables库到最新版本

2. 更新系统依赖库安装命令
This commit is contained in:
huangxin 2023-02-09 14:31:12 +08:00
parent cbe672c073
commit 342741d175
4 changed files with 328 additions and 277 deletions

View File

@ -21,7 +21,7 @@ FUNCTION(LINUX_INSTALL_SYSTEM_PACKAGE)
IF (${OS_DISTRIB_NAME} MATCHES "CentOS") IF (${OS_DISTRIB_NAME} MATCHES "CentOS")
MESSAGE(FATAL_ERROR "$sudo yum -y install libcurl-devel czmq-devel openssl-devel") MESSAGE(FATAL_ERROR "$sudo yum -y install libcurl-devel czmq-devel openssl-devel")
ELSEIF (${OS_DISTRIB_NAME} MATCHES "Ubuntu") ELSEIF (${OS_DISTRIB_NAME} MATCHES "Ubuntu")
MESSAGE(FATAL_ERROR "$sudo -S apt -y install libcurl4-openssl-dev libczmq-dev libssl-dev") MESSAGE(FATAL_ERROR "$sudo apt -y install libcurl4-openssl-dev libczmq-dev libssl-dev")
ENDIF () ENDIF ()
ELSE () ELSE ()
MESSAGE(FATAL_ERROR "Run command to install system dependencies libraries [libcurl,libssl,libcrypto,libzmq] by yourself") MESSAGE(FATAL_ERROR "Run command to install system dependencies libraries [libcurl,libssl,libcrypto,libzmq] by yourself")

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,6 @@ extern "C" {
#define ARG_DSTR_SIZE 200 #define ARG_DSTR_SIZE 200
#define ARG_CMD_NAME_LEN 100 #define ARG_CMD_NAME_LEN 100
#define ARG_CMD_DESCRIPTION_LEN 256 #define ARG_CMD_DESCRIPTION_LEN 256
#define ARG_MAX_FLAG (0x0000FFAA)
#ifndef ARG_REPLACE_GETOPT #ifndef ARG_REPLACE_GETOPT
#define ARG_REPLACE_GETOPT 1 /* use the embedded getopt as the system getopt(3) */ #define ARG_REPLACE_GETOPT 1 /* use the embedded getopt as the system getopt(3) */
@ -102,7 +101,8 @@ typedef struct arg_hdr {
const char *shortopts; /* String defining the short options */ const char *shortopts; /* String defining the short options */
const char *longopts; /* String defiing the long options */ const char *longopts; /* String defiing the long options */
const char *datatype; /* Description of the argument data type */ const char *datatype; /* Description of the argument data type */
const char *glossary; /* Description of the option as shown by arg_print_glossary function */ const char *glossary; /* Description of the option as shown by
arg_print_glossary function */
int mincount; /* Minimum number of occurences of this option accepted */ int mincount; /* Minimum number of occurences of this option accepted */
int maxcount; /* Maximum number of occurences if this option accepted */ int maxcount; /* Maximum number of occurences if this option accepted */
void *parent; /* Pointer to parent arg_xxx struct */ void *parent; /* Pointer to parent arg_xxx struct */
@ -168,6 +168,7 @@ enum {
ARG_ELONGOPT, ARG_ELONGOPT,
ARG_EMISSARG ARG_EMISSARG
}; };
typedef struct arg_end { typedef struct arg_end {
struct arg_hdr hdr; /* The mandatory argtable header struct */ struct arg_hdr hdr; /* The mandatory argtable header struct */
int count; /* Number of errors encountered */ int count; /* Number of errors encountered */
@ -293,7 +294,7 @@ ARG_EXTERN struct arg_date *arg_daten(const char *shortopts,
int maxcount, int maxcount,
const char *glossary); const char *glossary);
ARG_EXTERN struct arg_end *arg_end(int maxerrors); ARG_EXTERN struct arg_end *arg_end(int maxcount);
#define ARG_DSTR_STATIC ((arg_dstr_freefn *)0) #define ARG_DSTR_STATIC ((arg_dstr_freefn *)0)
#define ARG_DSTR_VOLATILE ((arg_dstr_freefn *)1) #define ARG_DSTR_VOLATILE ((arg_dstr_freefn *)1)

View File

@ -501,7 +501,7 @@ int menu_run(int argc, char **argv) {
int errCode2 = 0; int errCode2 = 0;
arg_rex_t *cmd3 = arg_rex1(NULL, NULL, "base64", NULL, REG_ICASE, NULL); arg_rex_t *cmd3 = arg_rex1(NULL, NULL, "base64", NULL, REG_ICASE, NULL);
arg_lit_t *operate3 = arg_litn("o", "operate", 0, ARG_MAX_FLAG, "\tBase64 decode, otherwise mean base64 encode"); arg_lit_t *operate3 = arg_litn("o", "operate", 0, 1, "\tBase64 decode, otherwise mean base64 encode");
arg_str_t *value3 = arg_str0(NULL, NULL, "<base64 string>", NULL); arg_str_t *value3 = arg_str0(NULL, NULL, "<base64 string>", NULL);
arg_lit_t *helpCmd3 = arg_lit0("h", "help", NULL); arg_lit_t *helpCmd3 = arg_lit0("h", "help", NULL);
arg_end_t *end3 = arg_end(20); arg_end_t *end3 = arg_end(20);
@ -525,7 +525,7 @@ int menu_run(int argc, char **argv) {
int errCode4 = 0; int errCode4 = 0;
arg_rex_t *cmd5 = arg_rex1(NULL, NULL, "cipher", NULL, REG_ICASE, NULL); arg_rex_t *cmd5 = arg_rex1(NULL, NULL, "cipher", NULL, REG_ICASE, NULL);
arg_lit_t *operate5 = arg_litn("e", "encrypt", 0, ARG_MAX_FLAG, "\tEncryption, Ignore means decryption."); arg_lit_t *operate5 = arg_litn("e", "encrypt", 0, 1, "\tEncryption, Ignore means decryption.");
arg_str_t *alg5 = arg_str0("a", "algorithms", "algorithms", "\tChose \033[1;7mCryptography\033[0m algorithms."); arg_str_t *alg5 = arg_str0("a", "algorithms", "algorithms", "\tChose \033[1;7mCryptography\033[0m algorithms.");
arg_str_t *key5 = arg_str0("k", "key", "Key", "\tCryptographic key"); arg_str_t *key5 = arg_str0("k", "key", "Key", "\tCryptographic key");
arg_str_t *value5 = arg_str0(NULL, NULL, "<AES string>", NULL); arg_str_t *value5 = arg_str0(NULL, NULL, "<AES string>", NULL);