1
0
mirror of https://github.com/benhoyt/inih.git synced 2025-01-28 22:52:54 +08:00

30 Commits

Author SHA1 Message Date
jcormier
683babb8e3
Added a GetUnsigned function for getting unsigned integer values. (#147)
Allow getting unsigned integers without losing precision.
2022-11-28 19:25:32 +00:00
Migos
03c604adb1
Fix MSVC warning C4244: conversion from 'int' to 'char' (#142)
- ::tolower returns int
- MSVC throws the warning C4244: conversion from 'int' to 'char'
- this lambda static casts the return value back to char
2022-11-10 22:54:13 +00:00
Andrea Pappacoda
5a31af99c4
Add visibility symbols (#134)
They are required to properly build DLLs on Windows, and improve the
quality of shared objects on Linux.
See https://gcc.gnu.org/wiki/Visibility for details.

This issue was first discovered here:
https://github.com/mesonbuild/wrapdb/pull/340#issuecomment-1075102565
2022-03-24 08:30:27 +13:00
Ben Hoyt
d3eda4f60b Don't use __ reserved identifiers (fixes issue #111) 2020-07-19 14:57:51 +12:00
Stephan Lachnit
351217124d
r48 release (#100)
* Bump copyright to 2020
* Remove makefile for static library
* meson: version 48

Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-03-01 19:31:28 +13:00
Ben Hoyt
75fe6b1a03 Make INIReader not crash when INI_CALL_HANDLER_ON_NEW_SECTION enabled (name NULL) 2019-12-13 21:45:53 -05:00
Ben Hoyt
1e7a61d696 Make INIReader not crash when INI_ALLOW_NO_VALUE enabled (with value NULL) 2019-12-13 21:41:12 -05:00
Jan Lepper
d0a152d531 INIReader: add constructor accepting a buffer (#92) 2019-12-11 08:47:41 -05:00
Andreas Metzler
307f59404c 2019 07 add copyright and spdx (#85) 2019-07-29 13:40:02 -04:00
Ben Hoyt
b1dbff4b0b Tweaks and basics tests for C++ version 2019-05-24 00:55:02 -07:00
evorw
63112f237a Add HasSection to C++ API (#81) 2019-05-24 00:41:21 -07:00
NeatNit
2023872dff Add INIReader::GetString to get nicer default_value behavior (#72)
* add INIReader::GetString

Same as INIReader::Get, but returns default_value if the value is an empty string, which provides functionality similar to GetInteger and the others

* clarify GetString description comment
2018-10-12 09:58:40 -04:00
Ben Hoyt
0ee2bf26ab Fix HasValue compile error 2018-09-10 09:19:19 -04:00
Jesse van Rhijn
e0a31533b5 Add HasValue method to INIReader (#69)
* Add HasValue method to INIReader
2018-09-04 18:51:41 -04:00
Fredrik Blix
5b0e675a4d Fixed cppcheck warnings (#65)
* Fixed cppcheck warnings

* Update from feedback

Update from feedback
2018-07-10 08:32:03 -04:00
Justin White
60b5ad398a Move INIReaderTest.cpp to examples/ for consistency (#54) 2016-09-15 13:23:49 -04:00
TheVice
c4c1f31b9d [INIReader] according to comment https://github.com/benhoyt/inih/pull/53#issuecomment-246465765 Get method should not return constant reference to std::sting storage in the class. 2016-09-12 23:50:11 +03:00
TheVice
0d0f0182b3 [INIReader] class now using constant reference as method arguments instead of using direct type for non primitive type string.
Return of Get method can be safe switch to constant reference.
2016-09-10 18:50:29 +03:00
Jinqiang He
716cc04ca1 Update INIReader.cpp file
update to compatible solution to replace std::map::at, which is not available until c++11
2016-06-17 14:18:55 +08:00
Jinqiang He
159f2784dc Update INIReader.cpp file
added an validated solution to replace std::map::at method, which is not available until c++11.
2016-06-15 10:47:27 +08:00
Artem Shelest
ccd77e50db Make INIReader const correct. 2016-04-17 08:33:48 +03:00
Ben Hoyt
a67bf227c1 Add license and project link 2015-03-21 20:04:19 -04:00
Ben Hoyt
f8a5d9fe3d Update project link 2015-03-21 20:04:00 -04:00
benhoyt@gmail.com
02f386a0ff Issue 30: Change MakeKey separator from "." to "=" as section names/keys can contain dots (but not equals signs). 2014-08-19 16:18:42 +00:00
benhoyt@gmail.com
111c3ec086 Added GetReal() to parse a floating point number (double) in C++ INIReader interface.
See: http://blog.brush.co.nz/2009/02/inih/#comment-160441
2013-08-14 21:58:41 +00:00
benhoyt
ff894434f9 Issue 18: Fixed multi-line handling in C++ wrapper, per jeffhawke77. 2012-03-07 02:02:37 +00:00
benhoyt@gmail.com
9ec69b2a1d Added GetBoolean() to C++ API.
Used std::transform() to convert strings to lower instead of for loop.
2011-06-24 18:23:13 +00:00
benhoyt
232b1d01eb Fixed Issue 3: INIReader::GetInteger() was buggy because the scope of the string Get() returned was too temporary for how I was using it's c_str(). Thanks, dreamer.dead for the bug report.
Included <cstdlib> in INIReader.cpp to get strtol().
Make ini.h have extern "C" wrapper in it so it's easier to include from C++ code (gcc seemed to do this automagically, but MSVC not so much).
2009-09-30 09:10:38 +00:00
benhoyt
37732b84a8 Added X-Macros example.
Simplified INIReaderTest.cpp.
2009-08-20 23:32:33 +00:00
benhoyt
4d08274b35 Moved examples to their own examples/ dir.
Only define INI_ALLOW_MULTILINE if it's not already defined.
Added C++ INIReader class.
Moved license into LICENSE.txt, added README.txt.
Added unit tests and checked in baseline files.
Made line lengths < 80 chars.
2009-08-20 21:59:32 +00:00