Commit graph

35 commits

Author SHA1 Message Date
kcgen
5206544010 Standardize argument ordering in starts_with call 2023-06-04 08:17:57 -07:00
kcgen
4d4b6af2c0 Migrate string-to-float to string_view 2023-06-04 08:17:57 -07:00
kcgen
fb87740760 Migrate start_with and ends_with to string_view 2023-06-04 08:17:57 -07:00
MeAreJeenius
ce237fe5ea Change the argument for split() to a string_view
Gives a significant performance boost when optimizations
are enabled in the build.

Allows string_view and char* arguments to be used directly.
2023-05-21 13:13:57 -07:00
FeralChild64
608ca8fb78 Add non-normalized input and bidirectional conversion support to UTF-8 engine 2023-04-23 11:15:07 -07:00
kcgen
d8f58b84ad Format mount status with source followed by drive
Co-authored-by: Robert de Rooy <robert.de.rooy@gmail.com>
Co-authored-by: FeralChild64 <FeralChild64@users.noreply.github.com>
Co-authored-by: kcgen <kcgen@users.noreply.github.com>
2023-02-10 08:54:54 -08:00
kcgen
f69dcf121f Improve the logging of disk images when mounting
Includes:
 - Uses more readable comma-separated format
 - Adds the filenames to the console log messages
2023-02-10 08:54:54 -08:00
kcgen
50cda06f8c Sort imgmount's file args when using wildcards
Also tidies up superfluous path specifications to reduce
visual clutter in screen and log output.
2023-02-10 08:54:54 -08:00
kcgen
74c184ec75 Support more types in case-insensitive string compare 2023-02-04 14:01:04 -08:00
kcgen
1bfee8b865
Bump copyright dates for files changed in 2023 2023-01-17 12:26:43 -08:00
kcgen
50cff73527
Add and use upper ASCII utility functions 2023-01-16 13:40:38 -08:00
kcgen
e129b0a45a Add ASCII character utility functions 2023-01-05 12:25:43 -08:00
FeralChild64
a73a5a9c3b Add missing Windows 11 features to MORE command 2022-12-24 09:15:28 -08:00
kcgen
cab7dd12d7 Add value and percentage parsing helpers 2022-10-13 19:18:46 -07:00
kcgen
facf2095f6
Shorten case-insensitive char and string equality functions 2022-10-12 08:50:55 -07:00
kcgen
dda2be5068 Add character and string case-insensitive comparison functions 2022-10-06 15:59:35 -07:00
FeralChild64
485e385360 Return operation status after UTF8 string conversion 2022-10-02 10:10:53 -07:00
FeralChild64
3151751c42 Handle UTF8 locale support review remarks and compilation warnings 2022-10-02 10:10:53 -07:00
FeralChild64
6491c88547 Add support for UTF-8 locale 2022-10-02 10:10:53 -07:00
kcgen
1866fb2740 Move OS-specific language function to cross sources 2022-08-30 08:14:41 -07:00
John Novak
a41d831348 Move most math stuff from support.h into math_utils.h
This is part of larger piece of work of getting rid of "kitchen sink"
style utility/helper files.
2022-08-15 10:01:46 +10:00
John Novak
8194165bb5 Remove conv_hex_word 2022-08-15 10:01:46 +10:00
John Novak
c7479df9c5 Normalise casing and remove unused functions 2022-08-15 10:01:46 +10:00
John Novak
369d65a7b2 Move most string util functions into string_utils.cpp from support.cpp 2022-08-15 10:01:46 +10:00
John Novak
c71719932f Move is_digits & is_hex_digits to string_utils 2022-08-15 10:01:46 +10:00
Patryk Obara
6ca8d635c7 Adjust copyright dates for 2022 2022-05-15 17:32:28 -07:00
kcgen
1d69dc7bdc Add a safe C-string reset utility function 2022-01-06 11:29:08 +13:00
kcgen
7d5b8d06d5 Use safe_sprintf in safe_strcpy 2021-10-21 18:31:09 -07:00
kcgen
933de5a593 Add a case-insensitive string search 2021-09-18 10:25:51 -07:00
kcgen
98c6591fa2 Add a safe strlen utility function 2021-08-24 09:34:47 -07:00
kcgen
30e5788c75 Add ends_with string utils support function 2021-07-23 21:23:12 -07:00
Patryk Obara
082393e01d Move safe_strcpy and safe_strcat to string_utils
These functions fit better into more specialized header rather than
generic "support".

It also prevents a number of false-positive warnings when compiling with
MSVC compiler (because MSVC generates warning per included header, with
different message each time - so it cannot be easily filtered-out after
compilation).
2021-01-17 00:43:40 +01:00
Patryk Obara
0a36c37328 Adjust copyright statements for 2021
- Update DOSBox Staging Team copyright span to year 2021 (DOSBox Team
  copyrights left untouched).
- Add DOSBox Staging Team copyright line to files we extensively
  modified throughout 2020 (we add our copyright lines when number of
  non-trivially modified lines gets close to 50%).
- Change "dosbox-staging team" to "DOSBox Staging Team", in line with
  updated branding.
- Change MAME license identifiers to SPDX license identifiers.
- Cleanup some excessive whitespace around copyright statements.
- Do few adjustments to include order.
- Add few missing copyright identifiers (GPL-2.0-or-later,
  LGPL-2.1-or-later, BSD-3-Clause) as appropriate for specific file.
- Move SPDX identifiers to the top in scripts for consistency with other
  source files.
- Remove old copy of GPL2 license in italian from old translations.
2021-01-01 00:12:05 +01:00
Patryk Obara
fa4b74c760 Add safe wrapper macro for sprintf 2020-12-11 07:12:58 +01:00
Patryk Obara
a8d7a4da63 Move starts_with function to a new header
New header is introduced to gradually move our new string-related helper
functions in there (out of support header).

Rewrite starts_with function, as it was triggering debug assertion
in MSVC: "Expression: cannot seek string iterator after end" (when
calling starts_with("opengl", "auto").

Limit starts_with interface only to our actual usecases, such as:

    starts_with("prefix", text)

This way we can save time on calculating string length of hardcoded
prefix.

Drop ends_with function, as we don't use it any more - the code using it
was refactored some time ago.
2020-11-14 17:33:03 +01:00