cfnptr / conf Goto Github PK
View Code? Open in Web Editor NEWSimple and fast multi-platform configuration file library (similar to .ini)
License: Apache License 2.0
Simple and fast multi-platform configuration file library (similar to .ini)
License: Apache License 2.0
Possibly use this kind of syntax:
someKey[]=1 2 3
Separate elements by the spaces
There is Conf file writer already, but plain string writer might be useful too.
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
errno is not resetting automatically.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.