| 1 |
This is librepfunc - a collection of functions, classes and so on, |
| 2 |
which i use often. |
| 3 |
|
| 4 |
|
| 5 |
Written by: Winfried Koehler <nvdec A.T. quantentunnel D.O.T. de > |
| 6 |
Project's homepage: https://github.com/wirbel-at-vdr-portal/librepfunc |
| 7 |
Latest version available at: see homepage |
| 8 |
License: GPL v2 |
| 9 |
|
| 10 |
|
| 11 |
This library is free software; you can redistribute it and/or modify |
| 12 |
it under the terms of the GNU General Public License version 2 as |
| 13 |
published by the Free Software Foundation. |
| 14 |
See the file COPYING for more information. |
| 15 |
|
| 16 |
-------------------------------------------------------------------------------- |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
-------------------------------------------------------------------------------- |
| 21 |
- About this library - |
| 22 |
-------------------------------------------------------------------------------- |
| 23 |
This is a collection is utilities and functions, which i personally use in my |
| 24 |
projects, shifting them into a lib helps me not reinvent the wheel every time. |
| 25 |
|
| 26 |
string related: |
| 27 |
* LowerCase and UpperCase |
| 28 |
* LeftTrim and RightTrim and Trim |
| 29 |
* FrontFill and BackFill |
| 30 |
* ReplaceAll |
| 31 |
|
| 32 |
vector of string related: |
| 33 |
* SplitStr |
| 34 |
|
| 35 |
number conversion to string or vice versa |
| 36 |
* IntToStr |
| 37 |
* FloatToStr |
| 38 |
* ExpToStr |
| 39 |
* StrToInt |
| 40 |
+ StrToFloat |
| 41 |
|
| 42 |
print time |
| 43 |
* TimeStr |
| 44 |
|
| 45 |
other conversions |
| 46 |
* BCDtoDecimal |
| 47 |
|
| 48 |
sleep threads |
| 49 |
* Sleep, mSleep, uSleep |
| 50 |
|
| 51 |
print hex data |
| 52 |
* HexDump |
| 53 |
|
| 54 |
files and directories |
| 55 |
* FileExists |
| 56 |
* cFileList |
| 57 |
* ReadFileToStream |
| 58 |
* ReadFile |
| 59 |
* WriteStreamToFile |
| 60 |
* WriteFile |
| 61 |
|
| 62 |
start/stop threads from main thread |
| 63 |
* ThreadBase |
| 64 |
|
| 65 |
(..) |
| 66 |
|
| 67 |
|
| 68 |
-------------------------------------------------------------------------------- |
| 69 |
- About Library Versioning - |
| 70 |
-------------------------------------------------------------------------------- |
| 71 |
This library uses a three number version numbering, following to what i under- |
| 72 |
stand as "reasonable versioning rules". |
| 73 |
The rule of thumb is here: |
| 74 |
|
| 75 |
version = MAJOR.MINOR.PATCH |
| 76 |
|
| 77 |
example: 1.0.0 |
| 78 |
|
| 79 |
|
| 80 |
MAJOR increased -> an API-incompatible change was introduced. Installing the lib |
| 81 |
may break installed packages using the old lib. |
| 82 |
|
| 83 |
MINOR increased -> an API-compatible, new functionality was added. It's safe to |
| 84 |
replace any older version of this lib with a newer one. |
| 85 |
|
| 86 |
PATCH increased -> the API is untouched. An inprovement or bug fix was done. It |
| 87 |
is recommended to replace older libs with same MAJOR.MINOR. |
| 88 |
|
| 89 |
-------------------------------------------------------------------------------- |
| 90 |
- Library Compat - |
| 91 |
-------------------------------------------------------------------------------- |
| 92 |
- 1.0.0 first version, for VDR wirbelscan-Plugin 2021.10.xx, LFS parser, |
| 93 |
Sat Table Generator for wirbelscan. |
| 94 |
|
| 95 |
- 1.1.0 adds ExpToStr() for w_scan_cpp > 20211009, which in turn uses the |
| 96 |
VDR wirbelscan-Plugin above. |
| 97 |
|
| 98 |
- 1.1.1 merge pull request "Create relative symbolic links for shared library" |
| 99 |
to improve ubuntu build system compat |
| 100 |
|
| 101 |
- 1.1.2 add 'make dll' target to support mingw64 from msys2. |
| 102 |
This allows to use the lib on WIN32. |
| 103 |
|
| 104 |
-------------------------------------------------------------------------------- |
| 105 |
- Library Compat - |
| 106 |
-------------------------------------------------------------------------------- |
| 107 |
Installation: |
| 108 |
make -j8 |
| 109 |
sudo make install |
| 110 |
|
| 111 |
If you - by mistake - installed this lib and may want to completely remove it |
| 112 |
from your system: |
| 113 |
sudo make uninstall |
| 114 |
|
| 115 |
NOTE: this will remove exactly the files and links this package installed, |
| 116 |
not those from newer or older versions. |
| 117 |
However, this may break links overwritten by 'make install' of any other |
| 118 |
version of this lib. |
| 119 |
|
| 120 |
|
| 121 |
Library update: |
| 122 |
Find the very last installed source of this lib and execute 'make uninstall'. |
| 123 |
Continue with Installation Process of the newer lib. |
| 124 |
|
| 125 |
It's possible to build a static version of librepfunc (librepfunc.a): |
| 126 |
make -j8 librepfunc.a |
| 127 |
sudo make install-static |
| 128 |
|
| 129 |
|
| 130 |
-------------------------------------------------------------------------------- |
| 131 |
- mingw64 on WIN32 - |
| 132 |
-------------------------------------------------------------------------------- |
| 133 |
Installation (in mingw64 window): |
| 134 |
make dll |
| 135 |
|
| 136 |
After that, you copy the dll and header to their destinations. Suggestion for |
| 137 |
a possible 'make install-dll' target where to put the dll and header are welcome. |
| 138 |
|
| 139 |
Linking to the lib is done by adding |
| 140 |
-l:librepfunc.dll |
| 141 |
to your programs Makefile. |
| 142 |
|
| 143 |
|
| 144 |
have phun, |
| 145 |
Winfried |