使用ini文件在Linux下C [英] Use ini file in c on Linux

查看:96
本文介绍了使用ini文件在Linux下C的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有阅读一种像使用C Linux的INI文件配置的任何标准的方式?我工作的一个基于Linux的手持和写C code。

Is there any standard way of reading a kind of configuration like ini files for linux using c? I am working on a Linux based hand held and writing code in c.

另外,我想知道的任何替代方案。

Otherwise, I shall like to know about any alternatives.

最后更新:

我已经探索了,甚至用LibConfig。但占用高,我的使用过于简单。因此,减少占地面积,我都推出了自己的实现。实施是不是太普通,其实相当加之截至目前。配置文件在启动所述应用程序的时间解析一次,并设置为一些全局变量

I have explored and even used LibConfig. But the footprint is high and my usage is too simple. So, to reduce the footprint, I have rolled out my own implementation. The implementation is not too generic, in fact quite coupled as of now. The config file is parsed once at the time of starting the application and set to some global variables.

推荐答案

尝试libconfig: http://www.hyperrealm.com/libconfig /

try libconfig: http://www.hyperrealm.com/libconfig/

这篇关于使用ini文件在Linux下C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆