mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-14 00:40:55 +08:00
Merge branch 'gitee-master' into gitlab-upstream
This commit is contained in:
commit
b06d415305
25
README.md
25
README.md
@ -45,10 +45,9 @@ Architecture diagram:
|
|||||||
* [5. More about](#5-more-about)
|
* [5. More about](#5-more-about)
|
||||||
* [5.1. Samples](#51-samples)
|
* [5.1. Samples](#51-samples)
|
||||||
* [5.2. FAQ](#52-faq)
|
* [5.2. FAQ](#52-faq)
|
||||||
* [5.3. Who are using acl?](#53-who-are-using-acl)
|
* [5.3. License](#53-license)
|
||||||
* [5.4. License](#54-license)
|
* [5.4. Reference](#54-reference)
|
||||||
* [5.5. Reference](#55-reference)
|
* [5.5. Thanks](#55-thanks)
|
||||||
* [5.6. Thanks](#56-thanks)
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
@ -420,26 +419,16 @@ There are a lot of examples in the acl library for reference, please refer to: [
|
|||||||
## 5.2. FAQ
|
## 5.2. FAQ
|
||||||
If you have some questions when using Acl, please see [FAQ.md](FAQ.md).
|
If you have some questions when using Acl, please see [FAQ.md](FAQ.md).
|
||||||
|
|
||||||
## 5.3. Who are using acl?
|
## 5.3. License
|
||||||
[![iqiyi](res/logo/logo_iqiyi.png)](http://www.iqiyi.com/)
|
|
||||||
[![263](res/logo/logo_263.png)](http://www.263.net/)
|
|
||||||
[![hexun](res/logo/logo_hexun.png)](http://www.hexun.com/)
|
|
||||||
[![v1](res/logo/logo_v1.png)](http://www.v1.cn/)
|
|
||||||
[![ksyun](res/logo/logo_ksyun.png)](https://www.ksyun.com/)
|
|
||||||
[![weibangong](res/logo/logo_weibangong.png)](https://www.weibangong.com/)
|
|
||||||
[![xianyou](res/logo/logo_xianyou.png)](http://www.i3game.com/)
|
|
||||||
[![foundao](res/logo/logo_foundao.png)](http://www.foundao.com/)
|
|
||||||
|
|
||||||
## 5.4. License
|
|
||||||
- LGPL-v3 license (see [LICENSE.txt](LICENSE.txt) in the acl project)
|
- LGPL-v3 license (see [LICENSE.txt](LICENSE.txt) in the acl project)
|
||||||
|
|
||||||
## 5.5. Reference
|
## 5.4. Reference
|
||||||
- Web site: https://blog.csdn.net/zsxxsz
|
- Web site: https://blog.csdn.net/zsxxsz
|
||||||
- Github: https://github.com/acl-dev/acl
|
- Github: https://github.com/acl-dev/acl
|
||||||
- Gitee: https://gitee.com/acl-dev/acl
|
- Gitee: https://gitee.com/acl-dev/acl
|
||||||
- Weibo: http://weibo.com/zsxxsz
|
- Weibo: http://weibo.com/zsxxsz
|
||||||
- QQ Group: 705290654
|
- QQ Group: 705290654
|
||||||
|
|
||||||
## 5.6. Thanks
|
## 5.5. Thanks
|
||||||
|
|
||||||
Thanks <a href=https://jb.gg/OpenSourceSupport target=_blank><img widith=100 height=50 src=res/logo/clion_icon.png /> </a> for the supporting of Acl development.
|
Thanks <a href=https://jb.gg/OpenSourceSupport target=_blank><img widith=100 height=50 src=res/logo/clion_icon.png /> </a>.
|
||||||
|
19
README_CN.md
19
README_CN.md
@ -49,9 +49,8 @@
|
|||||||
* [3.5、图例](#35图例)
|
* [3.5、图例](#35图例)
|
||||||
* [3.6、acl 库中有大量示例可供参考,请参考:SAMPLES.md](#36acl-库中有大量示例可供参考请参考samplesmd)
|
* [3.6、acl 库中有大量示例可供参考,请参考:SAMPLES.md](#36acl-库中有大量示例可供参考请参考samplesmd)
|
||||||
* [3.7、acl 使用 FAQ](#37acl-使用-faq-参考-faqmd)
|
* [3.7、acl 使用 FAQ](#37acl-使用-faq-参考-faqmd)
|
||||||
* [四、谁在使用acl](#四谁在使用acl)
|
* [四、使用许可](#四使用许可)
|
||||||
* [五、使用许可](#五使用许可)
|
* [五、参考](#五参考)
|
||||||
* [六、参考](#六参考)
|
|
||||||
|
|
||||||
<!-- vim-markdown-toc -->
|
<!-- vim-markdown-toc -->
|
||||||
|
|
||||||
@ -305,20 +304,10 @@ acl 工程是一个跨平台(支持LINUX,WIN32,Solaris,MacOS,FreeBSD
|
|||||||
### 3.6、acl 库中有大量示例可供参考,请参考:[SAMPLES.md](SAMPLES.md)
|
### 3.6、acl 库中有大量示例可供参考,请参考:[SAMPLES.md](SAMPLES.md)
|
||||||
### 3.7、acl 使用 FAQ 参考 [FAQ.md](FAQ.md)
|
### 3.7、acl 使用 FAQ 参考 [FAQ.md](FAQ.md)
|
||||||
|
|
||||||
## 四、谁在使用acl
|
## 四、使用许可
|
||||||
[![iqiyi](res/logo/logo_iqiyi.png)](http://www.iqiyi.com/)
|
|
||||||
[![263](res/logo/logo_263.png)](http://www.263.net/)
|
|
||||||
[![hexun](res/logo/logo_hexun.png)](http://www.hexun.com/)
|
|
||||||
[![v1](res/logo/logo_v1.png)](http://www.v1.cn/)
|
|
||||||
[![ksyun](res/logo/logo_ksyun.png)](https://www.ksyun.com/)
|
|
||||||
[![weibangong](res/logo/logo_weibangong.png)](https://www.weibangong.com/)
|
|
||||||
[![xianyou](res/logo/logo_xianyou.png)](http://www.i3game.com/)
|
|
||||||
[![foundao](res/logo/logo_foundao.png)](http://www.foundao.com/)
|
|
||||||
|
|
||||||
## 五、使用许可
|
|
||||||
- LGPL-v3 license (see [LICENSE.txt](LICENSE.txt) in the acl project)
|
- LGPL-v3 license (see [LICENSE.txt](LICENSE.txt) in the acl project)
|
||||||
|
|
||||||
## 六、参考
|
## 五、参考
|
||||||
- WEB 站点: https://blog.csdn.net/zsxxsz
|
- WEB 站点: https://blog.csdn.net/zsxxsz
|
||||||
- Github: https://github.com/acl-dev/acl
|
- Github: https://github.com/acl-dev/acl
|
||||||
- Gitee: https://gitee.com/acl-dev/acl
|
- Gitee: https://gitee.com/acl-dev/acl
|
||||||
|
@ -72,11 +72,26 @@ static void crc32_encode(const char *ptr, size_t len)
|
|||||||
printf("hash result: %u\r\n", hash);
|
printf("hash result: %u\r\n", hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char *load_from(const char *filename)
|
||||||
|
{
|
||||||
|
char *data = acl_vstream_loadfile(filename);
|
||||||
|
char *ptr = strchr(data, '\r');
|
||||||
|
if (ptr == NULL) {
|
||||||
|
ptr = strchr(data, '\n');
|
||||||
|
}
|
||||||
|
if (ptr) {
|
||||||
|
*ptr = 0;
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
static void usage(const char *prog)
|
static void usage(const char *prog)
|
||||||
{
|
{
|
||||||
printf("usage: %s -s string\r\n"
|
printf("usage: %s -s string\r\n"
|
||||||
" -a action[default: encode, encode|decode]\r\n"
|
" -a action[default: encode, encode|decode]\r\n"
|
||||||
" -t type [default: base64, base64|bin|crc32]\r\n"
|
" -t type [default: base64, base64|bin|crc32]\r\n"
|
||||||
|
" -f filename\r\n"
|
||||||
|
" -s string\r\n"
|
||||||
" -V [verbose]\r\n"
|
" -V [verbose]\r\n"
|
||||||
" -h help]\n", prog);
|
" -h help]\n", prog);
|
||||||
}
|
}
|
||||||
@ -95,10 +110,13 @@ int main(int argc, char *argv[])
|
|||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "s:a:t:hV")) > 0) {
|
while ((ch = getopt(argc, argv, "s:f:a:t:hV")) > 0) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 's':
|
case 's':
|
||||||
buf = strdup(optarg);
|
buf = acl_mystrdup(optarg);
|
||||||
|
break;
|
||||||
|
case 'f':
|
||||||
|
buf = load_from(optarg);
|
||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
if (strcasecmp(optarg, "decode") == 0) {
|
if (strcasecmp(optarg, "decode") == 0) {
|
||||||
@ -153,7 +171,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (buf) {
|
if (buf) {
|
||||||
free(buf);
|
acl_myfree(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
Loading…
Reference in New Issue
Block a user