Commit graph

65 commits

Author SHA1 Message Date
Alibek Omarov
fa272d9d93 public: add optional feature for COM_ParseFileSafe to ignore shell like hash symbol prefixed comments 2024-11-18 14:14:49 +03:00
Alibek Omarov
721c8043f1 public: optimize COM_FileExtension 2024-11-17 06:20:52 +03:00
Alibek Omarov
b51d1a4e2e public: mark some functions as never returning nullptr 2024-11-07 16:11:40 +03:00
Alibek Omarov
422addcbb6 public: make Q_atoi_hex public, check for 0x prefix 2024-10-28 02:09:05 +03:00
Alibek Omarov
d903187eea public: make crc value init functions inline, move hex2char/ex2string to crclib and make them private to it 2024-10-14 04:13:10 +03:00
Alibek Omarov
a758dffbc1 public: avoid useless copy in Q_timestamp 2024-10-02 22:18:16 +03:00
Alibek Omarov
2f26fcdc2a public: disallow backslashes in COM_PathSlashFix 2024-07-30 15:25:20 +03:00
Alibek Omarov
bc32f37fce public: use Q_strchr in COM_FixSlashes 2024-07-04 06:42:49 +03:00
Alibek Omarov
59b9b31604 public: avoid useless copies in Q_pretifymem 2024-07-04 06:39:18 +03:00
Alibek Omarov
844af709c0 public: simplify Q_colorstr and Q_strnlwr 2024-07-04 06:38:50 +03:00
Alibek Omarov
6243dc7913 public: simplify Q_ato{i,f} implementation 2024-07-04 06:30:59 +03:00
Alibek Omarov
2ad6511c31 public: add Q_memor routine that binary OR's data from src to dst
Supposed to be compiled with optimizations enabled.
2024-05-29 05:41:33 +03:00
Alibek Omarov
758c908d5a public: add buffer size parameter to COM_RemoveLineFeed 2024-05-15 03:06:57 +03:00
Alibek Omarov
b78e9961c6 public: fix build on Windows
stristr doesn't exist actually
2024-05-03 15:30:42 +03:00
Alibek Omarov
af23b0c67b public: crtlib: refactoring with new macros, use system strlcpy/strlcat if possible 2024-04-30 02:20:14 +03:00
Alibek Omarov
7ccb0b5c02 public: make simple ctype functions inlined 2024-04-28 06:59:18 +03:00
Alibek Omarov
7f3e62e456 public: remove unneeded copy in Q_atov 2024-04-28 06:59:18 +03:00
Alibek Omarov
6c40104c66 public: better fix for ExtractFilePath 2023-10-28 19:31:17 +03:00
Alibek Omarov
fe407fbe00 public: workaround when empty string is passed to COM_ExtractFilePath (should make safe COM_ExtractFilePath) 2023-10-28 11:06:18 +03:00
Alibek Omarov
4031f5cb01 public: allow matching anything in matchpattern 2023-07-05 07:00:39 +03:00
Alibek Omarov
aee5e46516 public: rewrite Q_strncpy with standard C functions, make it inlined to allow compiler remove unneeded checks
So far, passes all tests.
2023-06-27 17:30:09 +03:00
Alibek Omarov
ff436ae100 public: crtlib: add safe COM_DefaultExtension and COM_ReplaceExtension 2023-04-26 05:20:45 +03:00
Alibek Omarov
ac39090f6e public: crtlib: add safe COM_FileBase implementation 2023-04-26 05:20:45 +03:00
Alibek Omarov
8f207362a5 public: remove Q_sprintf, and patch all code that used it to use Q_snprintf instead 2023-04-26 05:20:45 +03:00
Alibek Omarov
b16fa8eddc public: remove Q_strcat and Q_strcpy, and patch the code that uses it 2023-04-26 05:20:45 +03:00
Alibek Omarov
37e3cf7e86 public: crtlib: remove unused functions 2023-04-03 02:46:23 +03:00
Alibek Omarov
fb6e310eab public: move va() function back to engine, it's not recommended to use in shared modules 2023-03-13 02:44:59 +03:00
Alibek Omarov
3765686077 public: make va() buffer size public 2023-03-11 05:28:17 +03:00
Alibek Omarov
4684f174ee public: completely get rid of PATH_SEPARATOR macros 2023-01-05 06:06:07 +03:00
Alibek Omarov
75ccd2283b public: fix Q_memmem counting haystack size incorrectly 2023-01-04 17:17:18 +03:00
Alibek Omarov
07e622f224 public: add generic implementation for Q_memmem 2023-01-03 06:58:58 +03:00
Alibek Omarov
e1ea3387ee common: rename PATH_SPLITTER to PATH_SEPARATOR, change it's type to character 2022-12-27 02:31:46 +03:00
Alibek Omarov
071638794a public: redefine Q_strpbrk to C standard version, add Q_strchrnul 2022-12-27 02:31:46 +03:00
Andrey Akhmichin
3488d4e65f public: simplified strings operations. 2022-11-18 19:32:17 +03:00
Alibek Omarov
7f1bb9b4a6 public: introduce Q_strnicmpext function
The goal is to provide both string compare with fixed length and simple pattern match
2022-08-25 19:21:47 +03:00
Alibek Omarov
5e4fc64430 filesystem: introduce new module, based on engine filesystem.
The goal is to share filesystem code between engine and
utilities and provide C++ VFileSystem interface in the future
2022-07-28 18:56:02 +03:00
Alibek Omarov
5350d88f57 public: crtlib: add quotation mark support for ParseFile, required for filesystem_stdio 2022-07-26 03:17:11 +03:00
Alibek Omarov
fb43a5590f public: Q_strstr should return pointer to non-const data 2022-06-29 04:02:40 +03:00
Alibek Omarov
12815bfbf2 public: remove naive implementations of standard function, add them with standard C with few extensions 2022-06-29 02:42:47 +03:00
Alibek Omarov
ab6214142f public: remove custom str(r)chr functions 2022-06-14 03:23:46 +03:00
Velaron
15dc25d2cd engine: rename Q_cleanstr to something more meaningful 2022-06-13 23:36:13 +03:00
Velaron
568c7fd917 engine: strip color codes when writing to log 2022-06-13 23:36:13 +03:00
Alibek Omarov
ccf90beb7d public: crtlib: add Q_isspace function 2022-01-04 02:22:20 +03:00
Alibek Omarov
4f89288ccf common: cleanup port.h 2021-12-23 19:17:11 +03:00
Alibek Omarov
3771a1d6c5 public: replace our Q_strlen with standard strlen with nullptr check in macro 2021-12-03 09:44:51 +03:00
Alibek Omarov
378c4f30f3 public: ParseFile drops const qualifier, return -1 length on overflow
As we usually put allocated data to ParseFile, we don't need const qualifier
2021-10-08 17:31:32 +03:00
Alibek Omarov
9e5d5e0ea3 public: moved COM_ParseFileSafe to libpublic, added optional argument for length and overflow checking 2021-10-08 17:31:32 +03:00
Alibek Omarov
4723eb2586 public: crtlib: fix error in COM_SlashPathFix 2021-07-02 19:27:04 +03:00
Alibek Omarov
29902f48d5 public: oops, fix broken crtlib 2021-03-10 13:38:36 +03:00
Alibek Omarov
d25a661701 public: moar int to size_t for string length 2021-03-10 13:18:23 +03:00