Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main函数形式和普通C函数形式合并的思路 #27

Open
mojinpan opened this issue Dec 27, 2019 · 2 comments
Open

main函数形式和普通C函数形式合并的思路 #27

mojinpan opened this issue Dec 27, 2019 · 2 comments

Comments

@mojinpan
Copy link

建议普通C函数形式main函数形式和普通C函数形式合并,大体思路如下:
1.参照导出变量的方式在在导出的结构体上增加传参模式的参数选项
2.参照变量的结构体封装方式,让用户在导出命令时直接就选择好函数形式即可,比如main函数的用SHELL_EXPORT_CMD(XXX),C函数的用SHELL_EXPORT_CMD_EX(XXX)

@NevermindZZT
Copy link
Owner

不止导出命令,是需要增加标志才能确定命令解析方式的,两种命令解析方式同时支持,这个是有计划的

@mojinpan
Copy link
Author

处理的方式应该和shell变量一样的,增加一个参数即可,封装后,给用户体现出来的就是导出命令不同

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants