Shared code used by several utilities written by Jody Bruchon
 
 
 
 
 
Go to file
Jody Bruchon ce2b08f1e9 jodyhash SSE2/AVX2 improvements 2023-12-03 23:28:07 -05:00
helper_code
.gitignore Improvements for Windows, basic MSVC++ build batch file 2023-10-09 15:19:53 -04:00
CHANGES.txt
LICENSE.txt
Makefile libjodycode Makefile: fix parallel install 2023-11-19 17:34:19 +00:00
README.md
access.c
alarm.c Make alarm and fopen compile with MSVC++ 2023-10-09 13:51:03 -04:00
build_msvc.bat Build .lib instead of .a 2023-10-12 13:19:57 -04:00
cacheinfo.c
chroot_build.sh
closedir.c Fixes for non-Windows compilation 2023-10-14 12:43:00 -04:00
error.c
fopen.c Fix fopen() for non-Unicode Windows 2023-10-11 18:52:37 -04:00
generate_packages.sh
getcwd.c Improvements for Windows, basic MSVC++ build batch file 2023-10-09 15:19:53 -04:00
jc_block_hash.c
jc_fwprint.c Improvements for Windows, basic MSVC++ build batch file 2023-10-09 15:19:53 -04:00
jc_numstrcmp.c
jc_string.c Cosmetic changes 2023-12-03 18:01:14 -05:00
jc_time.c
jody_hash.c
jody_hash.h
jody_hash_avx2.c jodyhash SSE2/AVX2 improvements 2023-12-03 23:28:07 -05:00
jody_hash_simd.c
jody_hash_simd.h
jody_hash_sse2.c jodyhash SSE2/AVX2 improvements 2023-12-03 23:28:07 -05:00
libjodycode.7
libjodycode.h Fix invalid flexible array warning 2023-10-11 22:40:01 -04:00
likely_unlikely.h
link.c
oom.c
opendir.c Finish opendir() for Windows 2023-10-11 11:18:35 -04:00
paths.c Improvements for Windows, basic MSVC++ build batch file 2023-10-09 15:19:53 -04:00
readdir.c Fixes for non-Windows compilation 2023-10-14 12:43:00 -04:00
remove.c
rename.c
size_suffix.c
stat.c
test.sh
tune_winres.sh
version.c
win_unicode.c Implement closedir(), fixes for readdir() 2023-10-11 18:53:15 -04:00
winres.manifest.xml
winres.rc
winres_xp.rc

README.md

Introduction

libjodycode is a software code library containing code shared among several of the programs written by Jody Bruchon such as imagepile, jdupes, winregfs, and zeromerge. These shared pieces of code were copied between each program as they were updated. As the number of programs increased and keeping these pieces of code synced became more annoying, the decision was made to combine all of them into a single reusable shared library.

Please consider financially supporting continued development of libjodycode using the links on my home page (Ko-fi, PayPal, SubscribeStar, etc.):

https://www.jodybruchon.com/

Version compatibility

libjodycode 3.0 introduced a new "feature level" number which changes on every revision to the public API. Programs can check this number against the number that corresponds to the newest library interface that they use. Whenever any function or variable is added to the public API this number will increase. To find the number your program should store and check against this number, find every interface you use documented in FEATURELEVELS.txt and choose the highest feature level number out of those.

In libjodycode 2.0 a new version table was introduced that maintains a separate version number for each logical section of the library; this table was removed in libjodycode 4.0 in favor of the feature level number.

Programs can use the libjodycode_check.c/.h helper code provided to check for linking against an incompatible version of libjodycode. Copy the files to the program's code base, add #include "libjodycode_check.h" to the main C file, and add

if (libjodycode_version_check(verbose, bail) != 0) failure_action();

somewhere early in main(). Set verbose to 1 to output detailed error info via fprintf(stderr, ...) if a bad version is found. Set bail to 1 to have the check code immediately exit if a bad version is found instead of returning to the caller with a non-zero return value.

Contact information

General information, help, and tech info: https://www.jdupes.com/

Development, source code, releases: https://codeberg.org/jbruchon/libjodycode

Have a bug report or questions? contact Jody Bruchon jody@jodybruchon.com

libjodycode is Copyright (C) 2014-2023 by Jody Bruchon jody@jodybruchon.com

The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.