apocelipes
4868517d53
optimize(IO): reduce memory usage during reading data from files to FFstrbufs
...
Avoid unnecessary calls of ffStrbufEnsureFree and only allocate
necessary memory.
In most cases, this will save 30% ~ 50% of memory used by ffAppendFDBuffer.
2023-12-03 19:57:49 +08:00
李通洲
b29b78b321
NetUsage: finish module
2023-09-26 23:00:31 +08:00
李通洲
e4c1ec916b
FFstrbuf: change ffStrbufToUInt16 to more general function ffStrbufToUInt
2023-09-26 09:52:10 +08:00
李通洲
0d5cf52f08
FFstrbuf: add ffStrbufAppendNC
2023-09-15 10:35:12 +08:00
李通洲
09f73235aa
FFstrbuf: add ffStrbufUpperCase and ffStrbufLowerCase
2023-07-29 21:18:26 +08:00
李通洲
7abf91aa7f
Host (Android): better host detection
2023-07-27 22:43:47 +08:00
李通洲
309d1d2130
FFstrbuf: add ffStrbufCreateStatic
2023-07-25 17:35:09 +08:00
李通洲
e685a00a4b
FFstrbuf: remove ffStrbufRemoveStringsV; rename ffStrbufRemoveStringsA to ffStrbufRemoveStrings
2023-07-25 17:35:09 +08:00
李通洲
74e61369f2
FFlist / FFstrbuf: add InitMove functions
2023-06-12 11:30:04 +08:00
李通洲
6d002c175f
FFstrbuf: fix building on Windows
2023-06-10 09:15:15 +08:00
李通洲
c7119498a3
Global: major FFstrbuf related code refactor
2023-06-10 09:15:15 +08:00
李通洲
94e6f4040d
Network (macOS): init
2023-04-18 17:29:48 +08:00
李通洲
0e9d48fff0
FFstrbuf: remove FF_STRBUF_CREATE macro
2023-04-15 12:27:51 +08:00
李通洲
725d2f2612
Windows: fix <Windows.h> header mess
2023-03-25 00:50:40 +08:00
李通洲
b15e68658f
FFstrbuf: make ffStrbufInit inlinable; add ffStrbufInitMove
2023-03-22 15:35:22 +08:00
Linus Dierheimer
a063cd4feb
Correctly handle zfs pools
...
#413
2023-02-01 15:56:25 +01:00
Linus Dierheimer
a1d8e3e598
Introduce FFPlatform
2023-01-15 15:57:26 +01:00
李通洲
ccdb5c54d0
Linux: enable FF_*_AUTO_DESTROY
...
They have been on Windows and macOS for sometime and worked well.
2023-01-11 13:55:06 +08:00
李通洲
822496808d
Windows: look for config files in $LOCALAPPDATA
2023-01-02 16:34:57 +08:00
李通洲
5efd7b9ac4
FFstrbuf: add ffStrbufContainC
2022-12-29 11:03:33 +08:00
李通洲
983bd50a09
FFstrbuf: improve performance of InitF
2022-12-06 16:27:00 +08:00
李通洲
e8e586ce7c
Windows / macOS: simplify code
...
1. simplify resource management by using C++ RAII like GCC attribute extension `cleanup`
2. simplify HEKY reading
Actually `__attribute__((__cleanup__(cleanupFn)))` is supported on all major C compiler ( gcc, clang and icc ) except MSVC I only used it on Windows and macOS for now. Let's see if the project author like it.
2022-11-17 19:54:36 +08:00
Linus Dierheimer
19a9b18c69
Disk: Linux impl working
2022-10-17 13:19:48 +02:00
李通洲
b042b90d9b
TerminalShell: improve shell detection on Windows
2022-10-15 11:36:24 +08:00
李通洲
4f67ed2b77
TerminalShell: add some pretty names
2022-10-14 19:16:55 +08:00
李通洲
3cc6611614
Windows: support native Windows
2022-10-13 23:49:09 +08:00
Linus Dierheimer
d54f14a14c
ffStrbufLastIndexC: account for empty strings
...
#285
2022-10-11 12:37:54 +02:00
李通洲
e7c9b80d85
Fix building on Linux
...
It seems that glibc doesn't support strnstr, and strcasestr requires
_GNU_SOURCE to be defined
2022-09-29 18:33:37 +08:00
李通洲
db6ad5a268
CpuUsage: improve performance
...
by moving the first `/proc/stat` query earlier
2022-09-27 23:41:39 +08:00
李通洲
47a0b8969f
FFstrbuf: more inline fns and more tests
2022-09-26 14:57:54 +08:00
李通洲
737b36e799
FFstrbuf / FFlist: add some improvements
...
1. make some short fns inlinable
2. simplify implementation
3. fix possible crashes with non-allocated strbuf
4. make the default init fn allocates no memory
5. add more tests
2022-09-24 22:18:48 +08:00
Linus Dierheimer
d337126c80
Fix possible crash in strbuf
2022-09-24 00:43:55 +02:00
Linus Dierheimer
007ded2883
Revert "Don't inline strbuf methods on macos"
...
This reverts commit c32f2f2f2b .
2022-09-23 12:11:04 +02:00
Linus Dierheimer
c32f2f2f2b
Don't inline strbuf methods on macos
2022-09-23 12:05:07 +02:00
Linus Dierheimer
8f30d0cdd8
Move inline functions to end of header
2022-09-23 01:27:25 +02:00
Linus Dierheimer
80f18e2473
Don't force inline
2022-09-23 00:49:43 +02:00
Linus Dierheimer
1700d23c26
Always inline some strbuf methods
2022-09-23 00:10:48 +02:00
李通洲
254c4e5f50
WMTheme: support macOS
2022-09-20 21:49:11 +08:00
李通洲
9eeb216b70
util: add check macros to avoid possible mistakes
2022-09-16 23:43:08 +08:00
Linus Dierheimer
ea60fd0a0d
Separate cpu detection and printing logic
2022-09-04 22:20:12 +02:00
Linus Dierheimer
d387800bda
Separate host detection and printing logic
2022-09-04 12:43:30 +02:00
Linus Dierheimer
c440fdfca8
Uses instance->state.configDirs consistenlty (in particular thread save) troughout the project
2022-06-22 20:14:10 +02:00
Linus Dierheimer
5e96ba8384
Fix cpu temp detection the second
2022-06-16 14:55:02 +02:00
Linus Dierheimer
22a8cfdcfe
Remove obsolete strbuf function
2022-06-08 17:14:11 +02:00
Linus Dierheimer
572d4ec8e9
NixOS support
2022-04-21 17:59:26 +02:00
Linus Dierheimer
f21013f646
Use same variable name in definition and declaration
2022-01-12 01:33:03 +01:00
Linus Dierheimer
33127388f0
refactored FFstrbuf
2022-01-12 01:02:14 +01:00
Linus Dierheimer
816d86aee8
Public IP module
2022-01-10 20:20:18 +01:00
Linus Dierheimer
f73137aef8
Better filtering of batteries
2021-12-31 14:12:44 +01:00
Linus Dierheimer
7ced537e59
FFstrbuf is now always null terminated
2021-11-17 10:59:31 +01:00