inih | Simple .INI file parser in C , good for embedded systems | Parser library

 by   benhoyt C Version: r56 License: Non-SPDX

kandi X-RAY | inih Summary

kandi X-RAY | inih Summary

inih is a C library typically used in Utilities, Parser applications. inih has no bugs, it has no vulnerabilities and it has medium support. However inih has a Non-SPDX License. You can download it from GitHub.

inih (INI Not Invented Here) is a simple .INI file parser written in C. It's only a couple of pages of code, and it was designed to be small and simple, so it's good for embedded systems. It's also more or less compatible with Python's ConfigParser style of .INI files, including RFC 822-style multi-line syntax and name: value entries. To use it, just give ini_parse() an INI file, and it will call a callback for every name=value pair parsed, giving you strings for the section, name, and value. It's done this way ("SAX style") because it works well on low-memory embedded systems, but also because it makes for a KISS implementation. You can also call ini_parse_file() to parse directly from a FILE* object, ini_parse_string() to parse data from a string, or ini_parse_stream() to parse using a custom fgets-style reader function for custom I/O. Download a release, browse the source, or read about how to use inih in a DRY style with X-Macros.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              inih has a medium active ecosystem.
              It has 2055 star(s) with 435 fork(s). There are 96 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 1 open issues and 78 have been closed. On average issues are closed in 6 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of inih is r56

            kandi-Quality Quality

              inih has 0 bugs and 0 code smells.

            kandi-Security Security

              inih has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              inih code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              inih has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              inih releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of inih
            Get all kandi verified functions for this library.

            inih Key Features

            No Key Features are available at this moment for inih.

            inih Examples and Code Snippets

            No Code Snippets are available at this moment for inih.

            Community Discussions

            QUESTION

            How to include library with meson?
            Asked 2022-Apr-03 at 09:57

            I want to add the INHI library (which use meson too) to my project but I don't know how to.

            The project tree :

            ...

            ANSWER

            Answered 2022-Apr-03 at 09:57

            Meson has a concept of subprojects.

            1. Create a subprojects directory on the top level of your project (The same level where you have meson.build).
            2. Create a wrap file for your dependency inside the subprojects directory and name it inih.wrap with content:

            Source https://stackoverflow.com/questions/71699938

            QUESTION

            stellarium web js compilation failing
            Asked 2021-Jan-09 at 08:47

            I have been trying to get stellarium-web running (https://github.com/Stellarium/stellarium-web-engine).

            With a clean Ubuntu 18.04 install, after installing scons and emscripten the "make js" command still fails, with some (at least for me) unreadable error as seen below:

            ...

            ANSWER

            Answered 2021-Jan-09 at 08:47

            I think I found the solution: Downgrading emsdk from 2.x to 1.40.1 seems to have solved this. Thanks :-)

            Source https://stackoverflow.com/questions/65635815

            QUESTION

            I don't understand how inih works
            Asked 2020-Dec-20 at 16:09

            I've been trying to read an ini file with inih lib since a few hours, and I still don't totally understand this code, especially configuration* pconfig = (configuration*)user;, and what are the handler function parameters for ?

            ...

            ANSWER

            Answered 2020-Dec-20 at 16:08

            user is a "generic pointer", or "untyped pointer".

            Dereferencing that pointer would give you a value of type void which isn't possible.

            Therefore you must cast the pointer to the correct type to be able to use it.

            As for the arguments and what they're used for you could read the source.

            But with a little knowledge of INI files it should be easy to deduce that the section argument is the name of a section in the file, while name is the current value name, and value is the value itself.

            So assuming a section and value like

            Source https://stackoverflow.com/questions/65381845

            QUESTION

            How to download, compile and link a library as external project in CMake?
            Asked 2020-Nov-29 at 15:09

            I am trying to use the ExternalProject_Add framework in CMake to automatically download, compile and link a static library. You can find the library here, however the question can be applied to any external CMake project.

            Here are the boundary conditions of my question:

            1. The external project is CMake compatible
            2. The external project provides a static or dynamic library to be linked to a target of the main project
            3. The ExternalProject_Add framework is to be used
            4. UNIX (Linux and MacOS) portability is enough
            5. Modern CMake is available (CMake 3.14+)

            I was able to get it working by hardcoding a lot of stuff, but I am pretty positive that my solution is not elegant or portable.

            Here is my project structure

            ...

            ANSWER

            Answered 2020-Nov-29 at 15:09

            Thanks to the comments from Tsyvarev, I was able to achieve the same goal with a much cleaner and more robust code:

            • root/CMakeList.txt

            Source https://stackoverflow.com/questions/64999518

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install inih

            You can download it from GitHub.

            Support

            Conan package for inih (Conan is a C/C++ package manager)
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Parser Libraries

            marked

            by markedjs

            swc

            by swc-project

            es6tutorial

            by ruanyf

            PHP-Parser

            by nikic

            Try Top Libraries by benhoyt

            goawk

            by benhoytGo

            scandir

            by benhoytPython

            dhash

            by benhoytPython

            pygit

            by benhoytPython

            countwords

            by benhoytRust