mcpp index

compat.iniparser

#include

iniParser — stand-alone ini file parsing library in ANSI C

#include <iniparser.h>
mcpp add compat.iniparser@4.3.2

Usage

From this repository's own test project — built and run by CI, not written for the website.

#include <cmath>
#include <cstdio>
#include <filesystem>
#include <fstream>
#include <string>

#include <iniparser.h>

static_assert(INIPARSER_VERSION_MAJOR == 4, "expected iniparser 4.x version.h");
static_assert(INIPARSER_VERSION_MINOR >= 3, "expected iniparser 4.3+ version.h");

int main() {
    bool ok = true;

    const std::filesystem::path tmp_ini =
        std::filesystem::temp_directory_path() / "mcpp_iniparser_test.ini";
    {
        std::ofstream ofs(tmp_ini);
        ofs << "[server]\n"
            << "host = localhost\n"
            << "port = 8080\n"
            << "ratio = 0.75\n"
// …

tests/examples/iniparser/tests/test_iniparser.cpp · project tests/examples/iniparser

Build

targets
iniparser (lib)
language
c++23
C standard
c99
import std
no
include dirs
*/src, mcpp_generated

Sources (2)

  • */src/dictionary.c
  • */src/iniparser.c

Generated files

  • mcpp_generated/version.h

Versions

VersionPlatforms Mirrorssha256
4.3.2 latest LinuxWindowsmacOS CN GLOBAL e9eb6be555c3…