/*
//////////////////////////////////////////////////////////////////////////////////////////
// ///
// © Since 1996 up to 2026 BinaryWork Corp © /////
/// ///////
/// Author : Ricardo /////////
/// Author e-mails: amandaricardo300@gmail.com ///////////
/// ///////////
/// WWW : https://arsoftware.net.br/ ///////////
/////////////////////////////////////////////////////////////////////////////////////////
Thanks for your patience.
*/
/*
New Standard C ini handling routines to solve some
of the limitations of the windows ini apis
WritePrivateProfileString and GetPrivateProfileString
version 0.3.2
(Mon Jun 08 2026)
Performance optimization of string
replace functions:
- be_xml.c: replace_or_count_stringsensitive_arab()
and amandaricardo_pereira_koci_string_replace()
now use memcmp/memcpy instead of
char-by-char loops; integer math
instead of double+ceil; reduced
excessive allocation padding
- rspini.c: same optimizations to
replace_or_count_stringsensitive_arab()
Fixed resource leak:
- rspini.c: getfilesize_v2() now calls
fclose() before goto saida on
_fseeki64/_ftelli64 error
version 0.3.1
(Mon Jun 08 2026)
Fixed invalid XML output with
multiple root elements:
- be_xml.c: feline_write_xml() no
longer appends a new root when a
different root already exists;
now overwrites the file atomically
via temp file + rename
- be_xml.c: valid_position_feline == -1
path also uses temp file + rename now
- Removed dead ret_arp variable
version 0.3.0
(Sun Jun 07 2026)
Fixed concurrent read/write
data corruption:
- Added atomic write using
temp file + rename pattern
- rspini.c: internal_write_ini()
now writes to {file}.rsp.{PID}.tmp,
then atomically renames to
target via MoveFileExW / rename()
- be_xml.c: feline_write_xml()
5 write paths converted to temp
file + atomic rename via MoveFileExW
- Cross-platform: _WIN32 (MoveFileExW)
/ else (rename)
- Temp file cleaned up on error;
original file never truncated
replace WritePrivateProfileString and
GetPrivateProfileString with write_ini_xml and
read_ini_xml and call me in the morning
https://sourceforge.net/projects/rspini/
https://sourceforge.net/projects/impxmlv2/
*/
Copyright (C) 2020 BinaryWork Corp.
Our software is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free software Foundation, either version 3 of
the License, or by (at your option) any later version.
This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program. If not, see
http://www.gnu.org/licenses/.