Simple and fast configuration file library (written in C99)

Features

  • Configuration file reading

Supported operating systems

  • Ubuntu
  • MacOS
  • Windows

Build requirements

Cloning

git clone https://github.com/cfnptr/conf
cd conf
git submodule update --init --recursive

Building

cmake -DCMAKE_BUILD_TYPE=Release -S . -B build/
cmake --build build/

Example conf file

# Conf comment syntax example
integerValue=123
NegativeOne=-1

# Supported floating values
FloatingPI=3.141
minus Infinity=-INF
Oh nooo=NaN

# Also some booleans
is.planet.round=true
caseSensitive=False

# And everything else is strings
hackingExploit=Hello world!
Not recommended key example?= Yes :)

Third-party

  • mpio (Apache-2.0 License)
Owner
Similar Resources

🏅State-of-the-art learned data structure that enables fast lookup, predecessor, range searches and updates in arrays of billions of items using orders of magnitude less space than traditional indexes

The Piecewise Geometric Model index (PGM-index) is a data structure that enables fast lookup, predecessor, range searches and updates in arrays of bil

Sep 21, 2022

C++ implementation of a fast hash map and hash set using robin hood hashing

A C++ implementation of a fast hash map and hash set using robin hood hashing The robin-map library is a C++ implementation of a fast hash map and has

Sep 21, 2022

A simple and easy-to-use library to build pipelines in C

A simple and easy-to-use library to build pipelines in C

A simple and easy-to-use library to build pipelines in C

Sep 28, 2022

A way to delete a locked file, or current running executable, on disk.

🗑️ delete-self-poc A way to delete a locked, or current running executable, on disk. This was originally found by Jonas Lykkegaard - I just wrote the

Sep 21, 2022

This is like Inverting Binary Tree, but instead of a Binary Tree it's a File Tree.

This is like Inverting Binary Tree, but instead of a Binary Tree it's a File Tree.

Invert File Tree in C++ This is like Inverting Binary Tree, but instead of the Binary Tree it's a File Tree. This is intended as a simple exercise to

Jun 18, 2021

A TreeSitter parser for the Neorg File Format

NFF TreeSitter Parser A TreeSitter grammar for Neorg. Available Commands Command Result yarn installs needed dependencies (only do if you don't have t

Sep 7, 2022

A fast hash map/hash table (whatever you want to call it) for the C programming language.

C HashMap A fast hash map/hash table (whatever you want to call it) for the C programming language. It can associate a key with a pointer or integer v

Sep 15, 2022

This project Orchid-Fst implements a fast text string dictionary search data structure: Finite state transducer (short for FST) in c++ language.This FST C++ open source project has much significant advantages.

This project Orchid-Fst implements a fast text string dictionary search data structure: Finite state transducer (short for FST) in c++ language.This FST C++ open source project has much significant advantages.

Orchid-Fst 1. Project Overview This project Orchid-Fst implements a fast text string dictionary search data structure: Finite state transducer , which

Jul 25, 2022

Another neofetch-like utility but this time it's fast.

SystemFetch Another neofetch-like utility but this time it's fast. Example Speed Here is a table of the time it took to execute all of these programs,

Jul 22, 2021
Comments
  • Memory leak: data

    Memory leak: data

    tests/test_writer.c,error at 90:return false;

    Memory should be freed before returning.

    69     char* data = malloc(
     70         sizeof(char) *(fileSize + 1));
     71 
     72     if (data == NULL)
     73     {
     74         printf("Failed to allocate read buffer.\n");
     75         closeFile(file);
     76         return false;
     77     }
     78 
     79     size_t readResult = fread(
     80         data,
     81         sizeof(char),
     82         fileSize,
     83         file);
     84 
     85     closeFile(file);
     86 
     87     if (readResult == 0)
     88     {
     89         printf("Failed to read test file.\n");
     90         return false;
     91     }
     92     
     93     data[readResult] = '\0';
     94     
     95     result = strcmp(
     96         confData,
     97         data);
     98 
     99     if (result != 0)
    100     {
    101         printf("Incorrect value: %s.\n", data);
    102         free(data);
    103         return false;
    104     }
    105     
    106     free(data);
    107     return true;
    108 }   
    

    And I fixed the bug by th patch: avoid-memory-leak.txt

A tree-sitter grammar for HCL (HashiCorp Configuration Language), used by projects such as Terraform.
A tree-sitter grammar for HCL (HashiCorp Configuration Language), used by projects such as Terraform.

tree-sitter-hcl tree-sitter grammar for HCL (HashiCorp Configuration Language) files. HCL is the configuration format used by projects such as Terrafo

Sep 15, 2022
Simple C++ code to benchmark fast division algorithms

fast_division Simple C++ code to benchmark fast division algorithms relying on constant divisors. The code is a companion to the paper Integer Divisio

Jul 31, 2022
ring-span lite - A C++yy-like ring_span type for C++98, C++11 and later in a single-file header-only library

ring-span lite: A circular buffer view for C++98 and later Contents Example usage In a nutshell Dependencies Installation Synopsis Reported to work wi

Aug 23, 2022
A fast and efficient non-iterating hashmap library

libhash: a fast and efficient non-iterating hashmap library Libhash is a fast and efficient non-iterating hashmap library Usage Usage is easy and simp

Aug 19, 2022
libsrt is a C library for writing fast and safe C code, faster.

libsrt is a C library for writing fast and safe C code, faster. It provides string, vector, bit set, set, map, hash set, and hash map handling. Suitable for soft and hard real-time. Allows both heap and stack allocation. *BETA* (API still can change: suggestions are welcome)

Sep 26, 2022
A fast Python Common substrings of multiple strings library with C++ implementation

A fast Python Common substrings of multiple strings library with C++ implementation Having a bunch of strings, can I print some substrings which appea

Aug 21, 2022
A family of header-only, very fast and memory-friendly hashmap and btree containers.
A family of header-only, very fast and memory-friendly hashmap and btree containers.

The Parallel Hashmap Overview This repository aims to provide a set of excellent hash map implementations, as well as a btree alternative to std::map

Sep 30, 2022
Generic single-file implementations of AVL tree in C and C++ suitable for deeply embedded systems
Generic single-file implementations of AVL tree in C and C++ suitable for deeply embedded systems

Cavl Generic single-file implementation of AVL tree suitable for deeply embedded systems. Simply copy cavl.h or cavl.hpp (depending on which language

Sep 20, 2022
C++ implementation of a fast hash map and hash set using hopscotch hashing

A C++ implementation of a fast hash map and hash set using hopscotch hashing The hopscotch-map library is a C++ implementation of a fast hash map and

Sep 20, 2022