Kp
0ebcc64ac5
Test whether change_filename_extension succeeded before using its output
2022-10-09 23:15:20 +00:00
Kp
b0ebe3b82c
Tighten change_filename_extension handling of overflow
2022-10-09 23:15:20 +00:00
Kp
a9142bb65a
Use std::span for change_filename_extension arguments
2022-10-09 23:15:20 +00:00
Kp
38adcc7729
Simplify change_filename_extension
...
The called function skipped over a leading dot in the extension. Remove
that logic and change all callers not to supply a leading dot.
2022-10-09 23:15:20 +00:00
Kp
9c4c49fe5e
Return std::unique_ptr from d_strdup
2022-10-09 23:15:20 +00:00
Kp
522c696af0
Remove unnecessary members in splitpath_t
...
splitpath_t is designed for MS-DOS paths, even though Rebirth now runs
on many platforms that never used DOS conventions. Most of the members
of splitpath_t are unused on all platforms. Remove them, and switch to
returning an initialized version of the structure.
2022-06-11 15:00:02 +00:00
Kp
1c2e1c6946
Tighten type info for d_strdup
...
The allocated block is part of the dmem subsystem, so return a type that
reflects that.
2022-04-24 20:42:01 +00:00
Kp
b05905ab4d
Delegate score comma handling to std::locale
2021-09-19 10:53:48 +00:00
Kp
079602b91a
Inline string_array_t::tidy comparator
...
There is only one call, so the target can be moved into the
implementation. This removes use of a call-by-pointer.
2020-12-27 22:03:09 +00:00
Kp
7fb4f7b396
Use std::array for editor mine filename
2020-10-12 03:28:25 +00:00
Kp
59ca93f219
Simplify copy+uppercase pattern in editor code
...
Change d_strupr to both copy and uppercase, instead of using strcpy to
copy and then a separate phase to rewrite the text as uppercase.
2020-09-28 03:32:15 +00:00
Kp
53761500f1
Qualify uses of std::array
2020-05-02 21:18:42 +00:00
Kp
047ddaf9ea
Prevent buffer overrun in removeext
2018-08-26 18:10:36 +00:00
Kp
4293227a54
Move strutil qsort comparator casts into function
2016-09-04 19:10:42 +00:00
Kp
dc8c0323d8
Uninline namespace dcx
2015-12-13 18:00:49 +00:00
Kp
5b9e50a815
Use inline namespace dcx for common/misc
2015-12-05 22:57:24 +00:00
Kp
dad504cfef
Fix some -Wshadow warnings
2015-11-26 02:56:54 +00:00
Kp
64ee9e0047
Improve memdebug d_strdup trace
2015-06-11 03:06:58 +00:00
Kp
b3050a8aa1
Fix adding string to empty string_array_t
2015-01-17 18:31:42 +00:00
Kp
484a2a705d
Use strcasecmp when available
2015-01-12 00:26:03 +00:00
Kp
205b533c67
Fix d_strnicmp with zero length input
2015-01-11 05:08:30 +00:00
Kp
2b2da39d84
Fix unique invocation in string_array_t tidy
2014-12-20 04:36:11 +00:00
Kp
2ad59572e0
Use vector to manage string array memory
2014-09-29 00:02:43 +00:00
zico
ad7cb106bc
Changed custom D1X license to GPLv3
2014-06-01 19:55:23 +02:00
Kp
03821fab0d
Rely on libc strdup if DEBUG_MEMORY_ALLOCATIONS is unset
...
If !DEBUG_MEMORY_ALLOCATIONS, our strdup is not special. Rely on the
compiler one, which might be.
2013-12-19 03:31:24 +00:00
Kp
7412f0bfc1
Move common/misc/strutil.c -> common/misc/strutil.cpp
2013-08-04 17:56:21 +00:00