mirror of
https://gitee.com/Lamdonn/varch.git
synced 2025-12-06 16:56:42 +08:00
Add install
This commit is contained in:
parent
0c6a112066
commit
81db585502
119
README.en.md
119
README.en.md
@ -12,61 +12,80 @@ It has the characteristics of **simplicity, universality, and efficiency**, with
|
||||
## Content
|
||||
|
||||
| module | version | usage | path | describe |
|
||||
|:-------------|:---------|:-----------------------------|:--------------------------------------|:--------------------------------------|
|
||||
| overall | 00.02.00 | [link](README.md) | ./ | Overall
|
||||
| init | 01.00.00 | [link](/doc/init.md) | ./source/00_application | Initialize export module
|
||||
| console | 01.00.00 | [link](/doc/console.md) | ./source/00_application/console | Console command input, combined with the 'command' module, parsing commands entered in the console
|
||||
| arg | 01.00.00 | [link](/doc/arg.md) | ./source/01_general | Indefinite parameters, obtain the number of indefinite parameters and specified parameters
|
||||
| calculate | 01.00.00 | [link](/doc/calculate.md) | ./source/01_general | Calculation module, input calculation expression to obtain calculation result
|
||||
| command | 01.00.00 | [link](/doc/command.md) | ./source/01_general | Command parsing module, input string commands (similar to shell commands), execute corresponding command functions
|
||||
| cPatten | 01.00.00 | [link](/doc/cPatten.md) | ./source/01_general | Artistic character patterns
|
||||
| cQueue | 01.00.00 | [link](/doc/cQueue.md) | ./source/01_general | Universal queue controller
|
||||
| dList | 01.00.00 | [link](/doc/dList.md) | ./source/01_general | Universal double-link list controller
|
||||
| fsm | 01.00.00 | [link](/doc/fsm.md) | ./source/01_general | Universal finite state machine module
|
||||
| kern | 01.00.00 | [link](/doc/kern.md) | ./source/01_general | The kernel module for scheduling periodic tasks is mostly used in varch testing
|
||||
| oscp | 01.00.00 | [link](/doc/oscp.md) | ./source/01_general | Analog oscilloscope module, can easily monitor the waveform of variable changes
|
||||
| sList | 01.00.00 | [link](/doc/sList.md) | ./source/01_general | Universal single-link list controller
|
||||
| tool | 01.00.00 | [link](/doc/tool.md) | ./source/01_general | General tools code
|
||||
| valloc | 01.00.00 | [link](/doc/valloc.md) | ./source/01_general | Dynamic memory usage testing tool
|
||||
| vlog | 01.01.00 | [link](/doc/vlog.md) | ./source/01_general | Log output module
|
||||
| intl | 01.00.00 | [link](/doc/intl.md) | ./source/01_general | Large integer arithmetic module
|
||||
| vctype | 01.00.00 | [link](/doc/vctype.md) | ./source/02_vstd | Similar to the C standard library ctype
|
||||
| vmath | 01.00.00 | [link](/doc/vmath.md) | ./source/02_vstd | Similar to the C standard library math
|
||||
| vmem | 01.00.00 | [link](/doc/vmem.md) | ./source/02_vstd | Simple implementation of memory pool
|
||||
| vstddef | 01.00.00 | [link](/doc/vstddef.md) | ./source/02_vstd | Similar to the C standard library stddef
|
||||
| vstdint | 01.00.00 | [link](/doc/vstdint.md) | ./source/02_vstd | Similar to the C standard library stdint
|
||||
| vstdlib | 01.00.00 | [link](/doc/vstdlib.md) | ./source/02_vstd | Similar to the C standard library stdlib
|
||||
| vstring | 01.00.00 | [link](/doc/vstring.md) | ./source/02_vstd | Similar to the C standard library string
|
||||
| deque | 01.00.00 | [link](/doc/deque.md) | ./source/03_container | Universal double-end queue container
|
||||
| dict | 01.00.00 | [link](/doc/dict.md) | ./source/03_container | Universal dictionarie container, implementation based on hash table
|
||||
| heap | 01.00.00 | [link](/doc/heap.md) | ./source/03_container | Universal heap container
|
||||
| list | 01.00.00 | [link](/doc/list.md) | ./source/03_container | Universal list container, single-link and internal iteration
|
||||
| map | 01.00.00 | [link](/doc/map.md) | ./source/03_container | Universal map container, implementation based on RB-tree
|
||||
| queue | 01.00.00 | [link](/doc/queue.md) | ./source/03_container | Universal queue container
|
||||
| set | 01.00.00 | [link](/doc/set.md) | ./source/03_container | Universal set container, implementation based on RB-tree
|
||||
| stack | 01.00.00 | [link](/doc/stack.md) | ./source/03_container | Universal stack container
|
||||
| str | 01.00.00 | [link](/doc/str.md) | ./source/03_container | String class
|
||||
| tree | 01.00.00 | [link](/doc/tree.md) | ./source/03_container | Universal tree container
|
||||
| vector | 01.00.00 | [link](/doc/vector.md) | ./source/03_container | Universal vector(array) container
|
||||
| graph | 01.00.00 | [link](/doc/graph.md) | ./source/03_container | Universal graph container
|
||||
| check | 01.00.00 | [link](/doc/check.md) | ./source/04_algorithm | Verification algorithm, sum check, parity check, XOR check, LRC check
|
||||
| crc | 01.00.00 | [link](/doc/check.md) | ./source/04_algorithm | Universal and standard CRC algorithms
|
||||
| encrypt | 01.00.00 | [link](/doc/encrypt.md) | ./source/04_algorithm | Encryption and decryption algorithms
|
||||
| filter | 01.00.00 | [link](/doc/filter.md) | ./source/04_algorithm | Filter algorithms, median, kalman, average
|
||||
| hash | 01.00.00 | [link](/doc/hash.md) | ./source/04_algorithm | Hash algorithms, bkdr, ap, djb, js, rs, sdbm, pjw, elf, dek, bp, fnv, jdk6
|
||||
| pid | 01.00.00 | [link](/doc/pid.md) | ./source/04_algorithm | PID control algorithm calculator
|
||||
| search | 01.00.00 | [link](/doc/search.md) | ./source/04_algorithm | Universal search algorithms, linear, binary
|
||||
| sort | 01.00.00 | [link](/doc/sort.md) | ./source/04_algorithm | Universal sorting algorithms (various data structures), bubble, select, insert, hill, quick, heap
|
||||
| csv | 01.00.00 | [link](/doc/csv.md) | ./source/05_parser | CSV file parsing generator
|
||||
| ini | 01.00.00 | [link](/doc/ini.md) | ./source/05_parser | INI configuration file parsing generator
|
||||
| json | 01.00.00 | [link](/doc/json.md) | ./source/05_parser | JSON file parsing generator
|
||||
| txls | 01.00.00 | [link](/doc/txls.md) | ./source/05_parser | TXLS file parsing generator
|
||||
| xml | 01.00.00 | [link](/doc/xml.md) | ./source/05_parser | XML file parsing generator
|
||||
|:-------------|:---------|:-----------------------------|:------------------------------------------|:--------------------------------------|
|
||||
| overall | 00.02.00 | [link](README.md) | [path](./) | Overall
|
||||
| init | 01.00.00 | [link](/doc/init.md) | [path](./source/00_application) | Initialize export module
|
||||
| console | 01.00.00 | [link](/doc/console.md) | [path](./source/00_application/console) | Console command input, combined with the 'command' module, parsing commands entered in the console
|
||||
| arg | 01.00.00 | [link](/doc/arg.md) | [path](./source/01_general) | Indefinite parameters, obtain the number of indefinite parameters and specified parameters
|
||||
| calculate | 01.00.00 | [link](/doc/calculate.md) | [path](./source/01_general) | Calculation module, input calculation expression to obtain calculation result
|
||||
| command | 01.00.00 | [link](/doc/command.md) | [path](./source/01_general) | Command parsing module, input string commands (similar to shell commands), execute corresponding command functions
|
||||
| cPatten | 01.00.00 | [link](/doc/cPatten.md) | [path](./source/01_general) | Artistic character patterns
|
||||
| cQueue | 01.00.00 | [link](/doc/cQueue.md) | [path](./source/01_general) | Universal queue controller
|
||||
| sList | 01.00.01 | [link](/doc/sList.md) | [path](./source/01_general) | Universal single-link list controller
|
||||
| dList | 01.00.01 | [link](/doc/dList.md) | [path](./source/01_general) | Universal double-link list controller
|
||||
| fsm | 01.00.00 | [link](/doc/fsm.md) | [path](./source/01_general) | Universal finite state machine module
|
||||
| kern | 01.00.00 | [link](/doc/kern.md) | [path](./source/01_general) | The kernel module for scheduling periodic tasks is mostly used in varch testing
|
||||
| oscp | 01.00.00 | [link](/doc/oscp.md) | [path](./source/01_general) | Analog oscilloscope module, can easily monitor the waveform of variable changes
|
||||
| tool | 01.00.00 | [link](/doc/tool.md) | [path](./source/01_general) | General tools code
|
||||
| valloc | 01.00.00 | [link](/doc/valloc.md) | [path](./source/01_general) | Dynamic memory usage testing tool
|
||||
| vlog | 01.01.00 | [link](/doc/vlog.md) | [path](./source/01_general) | Log output module
|
||||
| intl | 01.00.00 | [link](/doc/intl.md) | [path](./source/01_general) | Large integer arithmetic module
|
||||
| vctype | 01.00.00 | [link](/doc/vctype.md) | [path](./source/02_vstd) | Similar to the C standard library ctype
|
||||
| vmath | 01.00.00 | [link](/doc/vmath.md) | [path](./source/02_vstd) | Similar to the C standard library math
|
||||
| vmem | 01.00.00 | [link](/doc/vmem.md) | [path](./source/02_vstd) | Simple implementation of memory pool
|
||||
| vstddef | 01.00.00 | [link](/doc/vstddef.md) | [path](./source/02_vstd) | Similar to the C standard library stddef
|
||||
| vstdint | 01.00.00 | [link](/doc/vstdint.md) | [path](./source/02_vstd) | Similar to the C standard library stdint
|
||||
| vstdlib | 01.00.00 | [link](/doc/vstdlib.md) | [path](./source/02_vstd) | Similar to the C standard library stdlib
|
||||
| vstring | 01.00.00 | [link](/doc/vstring.md) | [path](./source/02_vstd) | Similar to the C standard library string
|
||||
| queue | 01.00.00 | [link](/doc/queue.md) | [path](./source/03_container) | Universal queue container
|
||||
| stack | 01.00.00 | [link](/doc/stack.md) | [path](./source/03_container) | Universal stack container
|
||||
| deque | 01.00.00 | [link](/doc/deque.md) | [path](./source/03_container) | Universal double-end queue container
|
||||
| list | 01.00.00 | [link](/doc/list.md) | [path](./source/03_container) | Universal list container, single-link and internal iteration
|
||||
| vector | 01.00.00 | [link](/doc/vector.md) | [path](./source/03_container) | Universal vector(array) container
|
||||
| str | 01.00.00 | [link](/doc/str.md) | [path](./source/03_container) | String class
|
||||
| dict | 01.00.00 | [link](/doc/dict.md) | [path](./source/03_container) | Universal dictionarie container, implementation based on hash table
|
||||
| heap | 01.00.00 | [link](/doc/heap.md) | [path](./source/03_container) | Universal heap container
|
||||
| set | 01.00.00 | [link](/doc/set.md) | [path](./source/03_container) | Universal set container, implementation based on RB-tree
|
||||
| map | 01.00.00 | [link](/doc/map.md) | [path](./source/03_container) | Universal map container, implementation based on RB-tree
|
||||
| tree | 01.00.00 | [link](/doc/tree.md) | [path](./source/03_container) | Universal tree container
|
||||
| graph | 01.00.00 | [link](/doc/graph.md) | [path](./source/03_container) | Universal graph container
|
||||
| check | 01.00.00 | [link](/doc/check.md) | [path](./source/04_algorithm) | Verification algorithm, sum check, parity check, XOR check, LRC check
|
||||
| crc | 01.00.00 | [link](/doc/check.md) | [path](./source/04_algorithm) | Universal and standard CRC algorithms
|
||||
| encrypt | 01.00.00 | [link](/doc/encrypt.md) | [path](./source/04_algorithm) | Encryption and decryption algorithms
|
||||
| filter | 01.00.00 | [link](/doc/filter.md) | [path](./source/04_algorithm) | Filter algorithms, median, kalman, average
|
||||
| hash | 01.00.00 | [link](/doc/hash.md) | [path](./source/04_algorithm) | Hash algorithms, bkdr, ap, djb, js, rs, sdbm, pjw, elf, dek, bp, fnv, jdk6
|
||||
| pid | 01.00.00 | [link](/doc/pid.md) | [path](./source/04_algorithm) | PID control algorithm calculator
|
||||
| search | 01.00.00 | [link](/doc/search.md) | [path](./source/04_algorithm) | Universal search algorithms, linear, binary
|
||||
| sort | 01.00.00 | [link](/doc/sort.md) | [path](./source/04_algorithm) | Universal sorting algorithms (various data structures), bubble, select, insert, hill, quick, heap
|
||||
| csv | 01.00.00 | [link](/doc/csv.md) | [path](./source/05_parser) | CSV file parsing generator
|
||||
| ini | 01.00.00 | [link](/doc/ini.md) | [path](./source/05_parser) | INI configuration file parsing generator
|
||||
| json | 01.00.00 | [link](/doc/json.md) | [path](./source/05_parser) | JSON file parsing generator
|
||||
| txls | 01.00.00 | [link](/doc/txls.md) | [path](./source/05_parser) | TXLS file parsing generator
|
||||
| xml | 01.00.00 | [link](/doc/xml.md) | [path](./source/05_parser) | XML file parsing generator
|
||||
|
||||
## Usage
|
||||
|
||||
The code is compiled and tested in a Linux environment. It can be compiled by configuring the files to be compiled in the `makefile` directory under the `build` directory, or by directly running the `run. sh` file to compile and run. The varch module should be kept as independent as possible, and in order to reduce dependence on other modules, most files can be directly extracted and used separately. If there are dependencies on other modules during compilation to solve dependency problems, but only data type dependencies, you can refer to defining the required types.
|
||||
|
||||
## Install
|
||||
|
||||
* linux
|
||||
|
||||
```
|
||||
make install
|
||||
```
|
||||
|
||||
* MinGW
|
||||
|
||||
```
|
||||
make install LIBP=<MinGW install path>
|
||||
```
|
||||
|
||||
demo:
|
||||
```
|
||||
make install LIBP=D:/MinGW
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
119
README.md
119
README.md
@ -12,61 +12,80 @@ varch(we-architecture,意为我们的框架库)是嵌入式C语言常用
|
||||
## 内容
|
||||
|
||||
| module | version | usage | path | describe |
|
||||
|:-------------|:---------|:-----------------------------|:--------------------------------------|:--------------------------------------|
|
||||
| overall | 00.02.00 | [link](README.md) | ./ | 整体
|
||||
| init | 01.00.00 | [link](/doc/init.md) | ./source/00_application | 初始化导出模块
|
||||
| console | 01.00.00 | [link](/doc/console.md) | ./source/00_application/console | 控制台命令输入,结合 `command` 模块,解析在控制台中输入的命令
|
||||
| arg | 01.00.00 | [link](/doc/arg.md) | ./source/01_general | 不定参数,获取不定参数和指定参数的个数
|
||||
| calculate | 01.00.00 | [link](/doc/calculate.md) | ./source/01_general | 计算模块,输入计算表达式,得到计算结果
|
||||
| command | 01.00.00 | [link](/doc/command.md) | ./source/01_general | 命令解析模块,输入字符串命令(类似于shell命令),执行相应的命令功能
|
||||
| cPatten | 01.00.00 | [link](/doc/cPatten.md) | ./source/01_general | 艺术图案字符
|
||||
| cQueue | 01.00.00 | [link](/doc/cQueue.md) | ./source/01_general | 通用队列控制器
|
||||
| dList | 01.00.01 | [link](/doc/dList.md) | ./source/01_general | 通用双链表控制器
|
||||
| fsm | 01.00.00 | [link](/doc/fsm.md) | ./source/01_general | 通用有限状态机模块
|
||||
| kern | 01.00.00 | [link](/doc/kern.md) | ./source/01_general | 用于调度周期性任务的内核模块主要用于varch测试
|
||||
| oscp | 01.00.00 | [link](/doc/oscp.md) | ./source/01_general | 模拟示波器模块,可以方便地监测波形的变量变化
|
||||
| sList | 01.00.01 | [link](/doc/sList.md) | ./source/01_general | 通用单链表控制器
|
||||
| tool | 01.00.00 | [link](/doc/tool.md) | ./source/01_general | 通用工具代码
|
||||
| valloc | 01.00.00 | [link](/doc/valloc.md) | ./source/01_general | 动态内存使用测试工具
|
||||
| vlog | 01.01.00 | [link](/doc/vlog.md) | ./source/01_general | 日志输出模块
|
||||
| intl | 01.00.00 | [link](/doc/intl.md) | ./source/01_general | 大型整数运算模块
|
||||
| vctype | 01.00.00 | [link](/doc/vctype.md) | ./source/02_vstd | 类似于C标准库ctype
|
||||
| vmath | 01.00.00 | [link](/doc/vmath.md) | ./source/02_vstd | 类似于C标准库math
|
||||
| vmem | 01.00.00 | [link](/doc/vmem.md) | ./source/02_vstd | 内存池的简单实现
|
||||
| vstddef | 01.00.00 | [link](/doc/vstddef.md) | ./source/02_vstd | 类似于C标准库stddef
|
||||
| vstdint | 01.00.00 | [link](/doc/vstdint.md) | ./source/02_vstd | 类似于C标准库stdint
|
||||
| vstdlib | 01.00.00 | [link](/doc/vstdlib.md) | ./source/02_vstd | 类似于C标准库stdlib
|
||||
| vstring | 01.00.00 | [link](/doc/vstring.md) | ./source/02_vstd | 类似于C标准库string
|
||||
| deque | 01.00.00 | [link](/doc/deque.md) | ./source/03_container | 通用双端队列容器
|
||||
| dict | 01.00.00 | [link](/doc/dict.md) | ./source/03_container | 通用字典容器,基于哈希表实现
|
||||
| heap | 01.00.00 | [link](/doc/heap.md) | ./source/03_container | 通用堆容器
|
||||
| list | 01.00.00 | [link](/doc/list.md) | ./source/03_container | 通用列表容器,单链接和支持内部迭代器
|
||||
| map | 01.00.00 | [link](/doc/map.md) | ./source/03_container | 通用映射容器,基于RB-tree实现
|
||||
| queue | 01.00.00 | [link](/doc/queue.md) | ./source/03_container | 通用队列容器
|
||||
| set | 01.00.00 | [link](/doc/set.md) | ./source/03_container | 通用集合容器,基于RB-tree实现
|
||||
| stack | 01.00.00 | [link](/doc/stack.md) | ./source/03_container | 通用栈式容器
|
||||
| str | 01.00.00 | [link](/doc/str.md) | ./source/03_container | 字符串类
|
||||
| tree | 01.00.00 | [link](/doc/tree.md) | ./source/03_container | 通用树容器
|
||||
| vector | 01.00.00 | [link](/doc/vector.md) | ./source/03_container | 通用向量(数组)容器
|
||||
| graph | 01.00.00 | [link](/doc/graph.md) | ./source/03_container | 通用图容器
|
||||
| check | 01.00.00 | [link](/doc/check.md) | ./source/04_algorithm | 校验算法,求和校验,奇偶校验,异或校验,LRC校验
|
||||
| crc | 01.00.00 | [link](/doc/check.md) | ./source/04_algorithm | 通用标准CRC算法
|
||||
| encrypt | 01.00.00 | [link](/doc/encrypt.md) | ./source/04_algorithm | 加密解密算法
|
||||
| filter | 01.00.00 | [link](/doc/filter.md) | ./source/04_algorithm | 滤波算法,中值,卡尔曼,平均值
|
||||
| hash | 01.00.00 | [link](/doc/hash.md) | ./source/04_algorithm | 哈希算法,bkdr、ap、djb、js、rs、sdbm、pjw、elf、dek、bp、fnv、jdk6
|
||||
| pid | 01.00.00 | [link](/doc/pid.md) | ./source/04_algorithm | PID控制算法计算器
|
||||
| search | 01.00.00 | [link](/doc/search.md) | ./source/04_algorithm | 通用搜索算法,线性,二进制
|
||||
| sort | 01.00.00 | [link](/doc/sort.md) | ./source/04_algorithm | 通用排序算法(各种数据结构),冒泡排序、选择排序、插入排序、希尔排序、快速排序、堆排序
|
||||
| csv | 01.00.00 | [link](/doc/csv.md) | ./source/05_parser | CSV文件解析生成器
|
||||
| ini | 01.00.00 | [link](/doc/ini.md) | ./source/05_parser | INI配置文件解析生成器
|
||||
| json | 01.00.00 | [link](/doc/json.md) | ./source/05_parser | JSON文件解析生成器
|
||||
| txls | 01.00.00 | [link](/doc/txls.md) | ./source/05_parser | TXLS文件解析生成器
|
||||
| xml | 01.00.00 | [link](/doc/xml.md) | ./source/05_parser | XML文件解析生成器
|
||||
|:-------------|:---------|:-----------------------------|:------------------------------------------|:--------------------------------------|
|
||||
| overall | 00.02.00 | [link](README.md) | [path](./) | 整体
|
||||
| init | 01.00.00 | [link](/doc/init.md) | [path](./source/00_application) | 初始化导出模块
|
||||
| console | 01.00.00 | [link](/doc/console.md) | [path](./source/00_application/console) | 控制台命令输入,结合 `command` 模块,解析在控制台中输入的命令
|
||||
| arg | 01.00.00 | [link](/doc/arg.md) | [path](./source/01_general) | 不定参数,获取不定参数和指定参数的个数
|
||||
| calculate | 01.00.00 | [link](/doc/calculate.md) | [path](./source/01_general) | 计算模块,输入计算表达式,得到计算结果
|
||||
| command | 01.00.00 | [link](/doc/command.md) | [path](./source/01_general) | 命令解析模块,输入字符串命令(类似于shell命令),执行相应的命令功能
|
||||
| cPatten | 01.00.00 | [link](/doc/cPatten.md) | [path](./source/01_general) | 艺术图案字符
|
||||
| cQueue | 01.00.00 | [link](/doc/cQueue.md) | [path](./source/01_general) | 通用队列控制器
|
||||
| sList | 01.00.01 | [link](/doc/sList.md) | [path](./source/01_general) | 通用单链表控制器
|
||||
| dList | 01.00.01 | [link](/doc/dList.md) | [path](./source/01_general) | 通用双链表控制器
|
||||
| fsm | 01.00.00 | [link](/doc/fsm.md) | [path](./source/01_general) | 通用有限状态机模块
|
||||
| kern | 01.00.00 | [link](/doc/kern.md) | [path](./source/01_general) | 用于调度周期性任务的内核模块主要用于varch测试
|
||||
| oscp | 01.00.00 | [link](/doc/oscp.md) | [path](./source/01_general) | 模拟示波器模块,可以方便地监测波形的变量变化
|
||||
| tool | 01.00.00 | [link](/doc/tool.md) | [path](./source/01_general) | 通用工具代码
|
||||
| valloc | 01.00.00 | [link](/doc/valloc.md) | [path](./source/01_general) | 动态内存使用测试工具
|
||||
| vlog | 01.01.00 | [link](/doc/vlog.md) | [path](./source/01_general) | 日志输出模块
|
||||
| intl | 01.00.00 | [link](/doc/intl.md) | [path](./source/01_general) | 大型整数运算模块
|
||||
| vctype | 01.00.00 | [link](/doc/vctype.md) | [path](./source/02_vstd) | 类似于C标准库ctype
|
||||
| vmath | 01.00.00 | [link](/doc/vmath.md) | [path](./source/02_vstd) | 类似于C标准库math
|
||||
| vmem | 01.00.00 | [link](/doc/vmem.md) | [path](./source/02_vstd) | 内存池的简单实现
|
||||
| vstddef | 01.00.00 | [link](/doc/vstddef.md) | [path](./source/02_vstd) | 类似于C标准库stddef
|
||||
| vstdint | 01.00.00 | [link](/doc/vstdint.md) | [path](./source/02_vstd) | 类似于C标准库stdint
|
||||
| vstdlib | 01.00.00 | [link](/doc/vstdlib.md) | [path](./source/02_vstd) | 类似于C标准库stdlib
|
||||
| vstring | 01.00.00 | [link](/doc/vstring.md) | [path](./source/02_vstd) | 类似于C标准库string
|
||||
| queue | 01.00.00 | [link](/doc/queue.md) | [path](./source/03_container) | 通用队列容器
|
||||
| stack | 01.00.00 | [link](/doc/stack.md) | [path](./source/03_container) | 通用栈式容器
|
||||
| deque | 01.00.00 | [link](/doc/deque.md) | [path](./source/03_container) | 通用双端队列容器
|
||||
| list | 01.00.00 | [link](/doc/list.md) | [path](./source/03_container) | 通用列表容器,单链接和支持内部迭代器
|
||||
| vector | 01.00.00 | [link](/doc/vector.md) | [path](./source/03_container) | 通用向量(数组)容器
|
||||
| str | 01.00.00 | [link](/doc/str.md) | [path](./source/03_container) | 字符串类
|
||||
| dict | 01.00.00 | [link](/doc/dict.md) | [path](./source/03_container) | 通用字典容器,基于哈希表实现
|
||||
| heap | 01.00.00 | [link](/doc/heap.md) | [path](./source/03_container) | 通用堆容器
|
||||
| set | 01.00.00 | [link](/doc/set.md) | [path](./source/03_container) | 通用集合容器,基于RB-tree实现
|
||||
| map | 01.00.00 | [link](/doc/map.md) | [path](./source/03_container) | 通用映射容器,基于RB-tree实现
|
||||
| tree | 01.00.00 | [link](/doc/tree.md) | [path](./source/03_container) | 通用树容器
|
||||
| graph | 01.00.00 | [link](/doc/graph.md) | [path](./source/03_container) | 通用图容器
|
||||
| check | 01.00.00 | [link](/doc/check.md) | [path](./source/04_algorithm) | 校验算法,求和校验,奇偶校验,异或校验,LRC校验
|
||||
| crc | 01.00.00 | [link](/doc/check.md) | [path](./source/04_algorithm) | 通用标准CRC算法
|
||||
| encrypt | 01.00.00 | [link](/doc/encrypt.md) | [path](./source/04_algorithm) | 加密解密算法
|
||||
| filter | 01.00.00 | [link](/doc/filter.md) | [path](./source/04_algorithm) | 滤波算法,中值,卡尔曼,平均值
|
||||
| hash | 01.00.00 | [link](/doc/hash.md) | [path](./source/04_algorithm) | 哈希算法,bkdr、ap、djb、js、rs、sdbm、pjw、elf、dek、bp、fnv、jdk6
|
||||
| pid | 01.00.00 | [link](/doc/pid.md) | [path](./source/04_algorithm) | PID控制算法计算器
|
||||
| search | 01.00.00 | [link](/doc/search.md) | [path](./source/04_algorithm) | 通用搜索算法,线性,二进制
|
||||
| sort | 01.00.00 | [link](/doc/sort.md) | [path](./source/04_algorithm) | 通用排序算法(各种数据结构),冒泡排序、选择排序、插入排序、希尔排序、快速排序、堆排序
|
||||
| csv | 01.00.00 | [link](/doc/csv.md) | [path](./source/05_parser) | CSV文件解析生成器
|
||||
| ini | 01.00.00 | [link](/doc/ini.md) | [path](./source/05_parser) | INI配置文件解析生成器
|
||||
| json | 01.00.00 | [link](/doc/json.md) | [path](./source/05_parser) | JSON文件解析生成器
|
||||
| txls | 01.00.00 | [link](/doc/txls.md) | [path](./source/05_parser) | TXLS文件解析生成器
|
||||
| xml | 01.00.00 | [link](/doc/xml.md) | [path](./source/05_parser) | XML文件解析生成器
|
||||
|
||||
## 使用说明
|
||||
|
||||
代码在linux环境下编写编译测试,在`built`目录下的`makefile`配置需要编译的文件进行编译即可,也可以直接运行`run.sh`文件编译加运行。varch模块尽可能的保持独立,为了减少对其他模块的依赖,大部分的文件是可以直接单独拎出来就可以直接使用。如果编译存在对其他模块的依赖解决依赖问题,只是数据类型依赖的问题,完全可以参考定义所需类型即可。
|
||||
|
||||
## 安装
|
||||
|
||||
* linux
|
||||
|
||||
```
|
||||
make install
|
||||
```
|
||||
|
||||
* MinGW
|
||||
|
||||
```
|
||||
make install LIBP=<MinGW install path>
|
||||
```
|
||||
|
||||
例子:
|
||||
```
|
||||
make install LIBP=D:/MinGW
|
||||
```
|
||||
|
||||
## 开源协议
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
85
makefile
85
makefile
@ -2,8 +2,10 @@
|
||||
### config
|
||||
##################################################################################
|
||||
CC = gcc
|
||||
AR = ar
|
||||
BUILT_DIR = built
|
||||
TARGET = app
|
||||
LIB = varch
|
||||
|
||||
##################################################################################
|
||||
### source locations
|
||||
@ -22,47 +24,74 @@ PARSER_PATH = $(WORKSPACE)/05_parser
|
||||
##################################################################################
|
||||
include $(TESTSPACE)/test.mk
|
||||
|
||||
INCLUDE += -I $(APPLICATION_PATH)
|
||||
INCLUDE += -I $(GENDATA_PATH)
|
||||
INCLUDE += -I $(VSTD_PATH)
|
||||
INCLUDE += -I $(CONTAINER_PATH)
|
||||
INCLUDE += -I $(ALGORITHM_PATH)
|
||||
INCLUDE += -I $(PARSER_PATH)
|
||||
INCLUDE += $(APPLICATION_PATH)
|
||||
INCLUDE += $(GENDATA_PATH)
|
||||
INCLUDE += $(VSTD_PATH)
|
||||
INCLUDE += $(CONTAINER_PATH)
|
||||
INCLUDE += $(ALGORITHM_PATH)
|
||||
INCLUDE += $(PARSER_PATH)
|
||||
|
||||
SOURCES += $(APPLICATION_PATH)/init.c
|
||||
SOURCES += $(APPLICATION_PATH)/main.c
|
||||
SOURCES += $(wildcard $(APPLICATION_PATH)/console/*.c)
|
||||
SOURCES += $(wildcard $(GENDATA_PATH)/*.c)
|
||||
SOURCES += $(wildcard $(VSTD_PATH)/*.c)
|
||||
SOURCES += $(wildcard $(CONTAINER_PATH)/*.c)
|
||||
SOURCES += $(wildcard $(ALGORITHM_PATH)/*.c)
|
||||
SOURCES += $(wildcard $(PARSER_PATH)/*.c)
|
||||
SOURCES += $(TEST_SRC)
|
||||
LIBSRCS += $(APPLICATION_PATH)/init.c
|
||||
LIBSRCS += $(wildcard $(APPLICATION_PATH)/console/*.c)
|
||||
LIBSRCS += $(wildcard $(GENDATA_PATH)/*.c)
|
||||
LIBSRCS += $(wildcard $(VSTD_PATH)/*.c)
|
||||
LIBSRCS += $(wildcard $(CONTAINER_PATH)/*.c)
|
||||
LIBSRCS += $(wildcard $(ALGORITHM_PATH)/*.c)
|
||||
LIBSRCS += $(wildcard $(PARSER_PATH)/*.c)
|
||||
|
||||
TESTSRC += $(APPLICATION_PATH)/main.c
|
||||
TESTSRC += $(TEST_SRC)
|
||||
|
||||
##################################################################################
|
||||
### targets and recipes
|
||||
##################################################################################
|
||||
OBJ_PATH = $(BUILT_DIR)/obj
|
||||
BIN_PATH = $(BUILT_DIR)/bin
|
||||
OBJS = $(patsubst %.c, $(OBJ_PATH)/%.o, $(SOURCES))
|
||||
TAR_PATH = $(BIN_PATH)/$(TARGET)
|
||||
INCS = $(addprefix -I,$(INCLUDE))
|
||||
OBJP = $(BUILT_DIR)/obj
|
||||
BINP = $(BUILT_DIR)/bin
|
||||
LIBO = $(patsubst %.c, $(OBJP)/%.o, $(LIBSRCS))
|
||||
TSTO = $(patsubst %.c, $(OBJP)/%.o, $(TESTSRC))
|
||||
OBJS = $(LIBO) $(TSTO)
|
||||
TARP = $(BINP)/$(TARGET)
|
||||
LIBN = lib$(LIB)
|
||||
LIBA = $(BUILT_DIR)/$(LIBN).a
|
||||
LIBP ?= /usr
|
||||
|
||||
# link
|
||||
${TAR_PATH}:$(OBJS)
|
||||
$(shell mkdir -p $(dir $@))
|
||||
# @ $(CC) $(OBJS) -o $(TAR_PATH) -lm -lX11 -lpthread
|
||||
@ $(CC) $(CFLAG) $(OBJS) -o $(TAR_PATH) -lm -lpthread
|
||||
${TARP}:$(OBJS)
|
||||
mkdir -p $(dir $@)
|
||||
# @ $(CC) $(OBJS) -o $(TARP) -lm -lX11 -lpthread
|
||||
@ $(CC) $(CFLAG) $(OBJS) -o $(TARP) -lm -lpthread
|
||||
|
||||
# compile
|
||||
$(OBJ_PATH)/%.o:%.c
|
||||
$(shell mkdir -p $(dir $@))
|
||||
$(OBJP)/%.o:%.c
|
||||
@ mkdir -p $(dir $@)
|
||||
@ echo "compiling $(notdir $<)"
|
||||
@ $(CC) $(CFLAG) $(INCLUDE) -c $< -o $@
|
||||
@ $(CC) $(CFLAG) $(INCS) -c $< -o $@
|
||||
|
||||
.PHONY:clean
|
||||
clean:
|
||||
@echo "remove app and objs files ..."
|
||||
$(shell rm $(BUILT_DIR)/$(WORKSPACE) -rf)
|
||||
$(shell rm $(BUILT_DIR)/* -rf)
|
||||
@ rm $(BUILT_DIR)/$(WORKSPACE) -rf
|
||||
@ rm $(BUILT_DIR)/* -rf
|
||||
|
||||
.PHONY:install
|
||||
install:$(LIBO)
|
||||
@ $(AR) -crv $(LIBA) $(LIBO)
|
||||
@ mkdir -p $(LIBP)/include/$(LIB)
|
||||
@ find $(INCLUDE) -name "*.h" -exec cp {} $(LIBP)/include/$(LIB) \;
|
||||
@ mv -f $(LIBA) $(LIBP)/lib \
|
||||
&& ( echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" && \
|
||||
echo "[INFO] varch install success !!!" && \
|
||||
echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") \
|
||||
|| ( echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" && \
|
||||
echo "[ERROR] varch install fail !!!" && \
|
||||
echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" && \
|
||||
rm $(LIBP)/include/$(LIB) -rf )
|
||||
# @ ldconfig
|
||||
|
||||
.PHONY:uninstall
|
||||
uninstall:
|
||||
@ rm $(BUILT_DIR)/$(LIB) -rf
|
||||
@ rm $(LIBP)/lib/$(LIBN).a
|
||||
@ rm $(LIBP)/include/$(LIB) -rf
|
||||
# @ ldconfig
|
||||
|
||||
31
test/test_install.c
Normal file
31
test/test_install.c
Normal file
@ -0,0 +1,31 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <varch/set.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
set_t set = set(int);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 100; i++)
|
||||
{
|
||||
set_insert(set, i, &i);
|
||||
}
|
||||
printf("size = %d, data size = %d\r\n", set_size(set), set_dsize(set));
|
||||
|
||||
i = -100; set_insert(set, i, &i);
|
||||
i = 1024; set_insert(set, i, &i);
|
||||
|
||||
printf("set[6] = %d\r\n", set_at(set, int, 6));
|
||||
printf("set[-100] = %d\r\n", set_at(set, int, -100));
|
||||
printf("set[1024] = %d\r\n", set_at(set, int, 1024));
|
||||
|
||||
set_at(set, int, 6) = 11111;
|
||||
printf("set[6] = %d\r\n", set_at(set, int, 6));
|
||||
|
||||
_set(set);
|
||||
}
|
||||
|
||||
// gcc ./test/test_install.c -o ./built/bin/app -lvarch
|
||||
// ./built/bin/app
|
||||
Loading…
x
Reference in New Issue
Block a user