diff --git a/.gitignore b/.gitignore index 8044a1f..bdf4f1c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ *.so # ignore .a files *.a +# ignore .dll files +*.dll # also explicitly ignore our executable for good measure demo # also explicitly ignore our windows executable for good measure diff --git a/Makefile.am b/Makefile.am index 093436d..502511b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -57,7 +57,7 @@ libkoliseo.o: $(lib_SOURCES) $(CCOMP) -c $(CFLAGS) $(AM_CFLAGS) -fPIC $< -o $@ @echo -e "\033[1;33mDone.\e[0m" -libkoliseo.so: libkoliseo.o +$(SHARED_LIB): libkoliseo.o @echo -e "\033[1;35m[Makefile]\e[0m Building \"$@\":" @echo -e " \033[1;35mAM_CFLAGS\e[0m: [ \"\033[1;34m$(AM_CFLAGS)\e[0m\" ]" @echo -e " \033[1;35mCFLAGS\e[0m: [ \"\033[1;34m$(CFLAGS)\e[0m\" ]" @@ -73,7 +73,7 @@ libkoliseo.a: libkoliseo.o %.o: %.c $(CCOMP) -c $(CFLAGS) $(AM_CFLAGS) $< -o $@ -install: libkoliseo.so doc +install: $(SHARED_LIB) doc @echo -en "Installing koliseo lib $(VERSION): " ./installer-sh "-i" $(VERSION) $(TARGET_INSTALL_DIR) $(SOURCE_INSTALL_DIR) $(INSTALLER_LOG_FILE) ldconfig @@ -121,20 +121,26 @@ clean: -rm $(TARGET) -rm ./*.o -rm ./*.so + -rm ./*.dll -rm src/*.o -rm src/*.so + -rm src/*.dll -rm static/*.o -rm static/*.so + -rm static/*.dll @echo -e "\033[1;33mDone.\e[0m" cleanob: @echo -en "Cleaning object build artifacts: " -rm ./*.o -rm ./*.so + -rm ./*.dll -rm src/*.o -rm src/*.so + -rm src/*.dll -rm static/*.o -rm static/*.so + -rm static/*.dll @echo -e "\033[1;33mDone.\e[0m" bad_size.k: @@ -216,7 +222,9 @@ pack: rebuild @echo -e "\033[1;32m[TREE] Done.\e[0m" @echo -e "\033[1;35m[PACK] Installing:\e[0m" install $(TARGET) ~/koliseo-local/share/$(PACK_NAME) + install $(SHARED_LIB) ~/koliseo-local/share/$(PACK_NAME) install README.md ~/koliseo-local/share/$(PACK_NAME) + install LICENSE ~/koliseo-local/share/$(PACK_NAME) install ./src/koliseo.c ~/koliseo-local/share/$(PACK_NAME)/src install ./src/koliseo.h ~/koliseo-local/share/$(PACK_NAME)/src @@ -230,7 +238,7 @@ pack: rebuild @echo -e "\033[1;33mDone.\e[0m" # Default target (builds everything) -all: $(TARGET) libkoliseo.so libkoliseo.a +all: $(TARGET) $(SHARED_LIB) libkoliseo.a # Target to clean and rebuild rebuild: clean all diff --git a/amboso b/amboso index 3649108..7fe6db6 160000 --- a/amboso +++ b/amboso @@ -1 +1 @@ -Subproject commit 3649108fedf1419c72a984daa9607a62da6f6f7a +Subproject commit 7fe6db6b426204bc69dc53c105018c26184563e6 diff --git a/bin/stego.lock b/bin/stego.lock index fbf51e1..9065753 100644 --- a/bin/stego.lock +++ b/bin/stego.lock @@ -54,3 +54,4 @@ testsdir = "ok" "0.3.17" = "Global lib install, config options, invil 0.1.5" "0.3.18" = "invil 0.1.6, fixes broken ./anvil -i" "0.3.19" = "Add .a rule, bump invil" +"0.3.20" = "Improve configure.ac, refactor MINGW32_BUILD, add SHARED_LIB define" diff --git a/bin/v0.3.20/.gitignore b/bin/v0.3.20/.gitignore new file mode 100644 index 0000000..f915d8e --- /dev/null +++ b/bin/v0.3.20/.gitignore @@ -0,0 +1,4 @@ +#amboso compliant version folder, will ignore everything inside BUT the gitignore, to keep the clean dir +* +!.gitignore +!static diff --git a/bin/v0.3.20/static b/bin/v0.3.20/static new file mode 120000 index 0000000..382349a --- /dev/null +++ b/bin/v0.3.20/static @@ -0,0 +1 @@ +../../static/ \ No newline at end of file diff --git a/configure.ac b/configure.ac index 4260cf9..f1d8c83 100644 --- a/configure.ac +++ b/configure.ac @@ -1,15 +1,16 @@ # Define the package name and version -AC_INIT([koliseo], [0.3.19], [jgabaut@github.com]) +AC_INIT([koliseo], [0.3.20], [jgabaut@github.com]) # Verify automake version and enable foreign option AM_INIT_AUTOMAKE([foreign -Wall]) # Detect the host system and set PACK_PREFIX accordingly AC_CANONICAL_HOST +build_linux=no +build_windows=no +build_mac=no echo "Host os: $host_os" -AM_CONDITIONAL([OS_DARWIN], [test "$host_os" = "darwin"]) -AM_CONDITIONAL([MINGW32_BUILD], [test "$host_os" = "mingw32"]) -# + AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [Enable debug build])], [enable_debug=$enableval], @@ -27,53 +28,68 @@ AM_CONDITIONAL([CURSES_BUILD], [test "$enable_curses" = "yes"]) AM_CONDITIONAL([GULP_BUILD], [test "$enable_gulp" = "yes"]) # Define the include and library paths based on the host system -if test "$host_os" = "mingw32"; then - echo "Building for mingw32: [$host_cpu-$host_vendor-$host_os]" - # mingw32 specific flags - if test "$enable_curses" = "yes"; then - echo "Building with curses header" - AC_SUBST([KOLISEO_CFLAGS], ["-I/usr/x86_64-w64-mingw32/include -static -fstack-protector -DMINGW32_BUILD -DNCURSES_STATIC"]) - AC_SUBST([KOLISEO_LDFLAGS], ["-L/usr/x86_64-w64-mingw32/lib -lncursesw"]) - else - AC_SUBST([KOLISEO_CFLAGS], ["-I/usr/x86_64-w64-mingw32/include -static -fstack-protector -DMINGW32_BUILD"]) - AC_SUBST([KOLISEO_LDFLAGS], ["-L/usr/x86_64-w64-mingw32/lib"]) - fi - AC_SUBST([CCOMP], ["/usr/bin/x86_64-w64-mingw32-gcc"]) - AC_SUBST([OS], ["w64-mingw32"]) - AC_SUBST([TARGET], ["demo.exe"]) -fi -if test "$host_os" = "darwin"; then - echo "Building for macos: [$host_cpu-$host_vendor-$host_os]" - # macOS specific flags - if test "$enable_curses" = "yes"; then - echo "Building with curses header" - AC_SUBST([KOLISEO_LDFLAGS], ["-L/opt/homebrew/opt/ncurses/lib -lncurses"]) - AC_SUBST([KOLISEO_CFLAGS], ["-I/opt/homebrew/opt/ncurses/include"]) - else - AC_SUBST([KOLISEO_LDFLAGS], [""]) - AC_SUBST([KOLISEO_CFLAGS], [""]) - fi - AC_SUBST([OS], ["darwin"]) - AC_SUBST([TARGET], ["demo"]) -fi -if test "$host_os" = "linux-gnu"; then - echo "Building for Linux: [$host_cpu-$host_vendor-$host_os]" - # Linux specific flags - if test "$enable_curses" = "yes"; then - echo "Building with curses header" - AC_SUBST([KOLISEO_LDFLAGS], ["-lncurses"]) - else - AC_SUBST([KOLISEO_LDFLAGS], [""]) - fi - AC_SUBST([KOLISEO_CFLAGS], [""]) - AC_SUBST([OS], ["Linux"]) - AC_SUBST([TARGET], ["demo"]) -fi +case "${host_os}" in + mingw*) + echo "Building for mingw32: [$host_cpu-$host_vendor-$host_os]" + # mingw32 specific flags + if test "$enable_curses" = "yes"; then + echo "Building with curses header" + build_windows=yes + AC_SUBST([KOLISEO_CFLAGS], ["-I/usr/x86_64-w64-mingw32/include -static -fstack-protector -DWINDOWS_BUILD -DNCURSES_STATIC"]) + AC_SUBST([KOLISEO_LDFLAGS], ["-L/usr/x86_64-w64-mingw32/lib -lncursesw"]) + else + AC_SUBST([KOLISEO_CFLAGS], ["-I/usr/x86_64-w64-mingw32/include -static -fstack-protector -DWINDOWS_BUILD"]) + AC_SUBST([KOLISEO_LDFLAGS], ["-L/usr/x86_64-w64-mingw32/lib"]) + fi + AC_SUBST([CCOMP], ["/usr/bin/x86_64-w64-mingw32-gcc"]) + AC_SUBST([OS], ["w64-mingw32"]) + AC_SUBST([TARGET], ["demo.exe"]) + AC_SUBST([SHARED_LIB], ["libkoliseo.dll"]) + ;; + darwin*) + echo "Building for macos: [$host_cpu-$host_vendor-$host_os]" + build_mac=yes + # macOS specific flags + if test "$enable_curses" = "yes"; then + echo "Building with curses header" + AC_SUBST([KOLISEO_LDFLAGS], ["-L/opt/homebrew/opt/ncurses/lib -lncurses"]) + AC_SUBST([KOLISEO_CFLAGS], ["-I/opt/homebrew/opt/ncurses/include"]) + else + AC_SUBST([KOLISEO_LDFLAGS], [""]) + AC_SUBST([KOLISEO_CFLAGS], [""]) + fi + AC_SUBST([OS], ["darwin"]) + AC_SUBST([TARGET], ["demo"]) + AC_SUBST([SHARED_LIB], ["libkoliseo.so"]) + ;; + linux*) + echo "Building for Linux: [$host_cpu-$host_vendor-$host_os]" + build_linux=yes + # Linux specific flags + if test "$enable_curses" = "yes"; then + echo "Building with curses header" + AC_SUBST([KOLISEO_LDFLAGS], ["-lncurses"]) + else + AC_SUBST([KOLISEO_LDFLAGS], [""]) + fi + AC_SUBST([KOLISEO_CFLAGS], [""]) + AC_SUBST([OS], ["Linux"]) + AC_SUBST([TARGET], ["demo"]) + AC_SUBST([SHARED_LIB], ["libkoliseo.so"]) + ;; + *) + AC_MSG_ERROR(["OS $host_os is not supported"]) + ;; +esac + +AM_CONDITIONAL([WINDOWS_BUILD], [test "$build_windows" = "yes"]) +AM_CONDITIONAL([DARWIN_BUILD], [test "$build_mac" = "yes"]) +AM_CONDITIONAL([LINUX_BUILD], [test "$build_linux" = "yes"]) # Set a default version number if not specified externally AC_ARG_VAR([VERSION], [Version number]) if test -z "$VERSION"; then - VERSION="0.3.19" + VERSION="0.3.20" fi # Output variables to the config.h header diff --git a/docs/koliseo.doxyfile b/docs/koliseo.doxyfile index e0b3951..1b25bd5 100644 --- a/docs/koliseo.doxyfile +++ b/docs/koliseo.doxyfile @@ -48,7 +48,7 @@ PROJECT_NAME = "koliseo" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "0.3.19" +PROJECT_NUMBER = "0.3.20" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/invil b/invil index f88f0e8..e28d2e4 160000 --- a/invil +++ b/invil @@ -1 +1 @@ -Subproject commit f88f0e82645f7b38d939603947bb7490651c3bed +Subproject commit e28d2e43f5fe539adb7b5469ac9b1f8c8893399e diff --git a/src/koliseo.c b/src/koliseo.c index edb0e90..854e85a 100644 --- a/src/koliseo.c +++ b/src/koliseo.c @@ -704,7 +704,7 @@ void *kls_push(Koliseo *kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count) ptrdiff_t padding = -kls->offset & (align - 1); if (count > PTRDIFF_MAX / size || available - padding < size * count) { if (count > PTRDIFF_MAX / size) { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] count [%li] was bigger than PTRDIFF_MAX/size [%li].\n", count, PTRDIFF_MAX / size); @@ -714,7 +714,7 @@ void *kls_push(Koliseo *kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t count) count, PTRDIFF_MAX / size); #endif } else { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] Out of memory. size*count [%li] was bigger than available-padding [%li].\n", size * count, available - padding); @@ -798,7 +798,7 @@ void *kls_push_zero(Koliseo *kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t padding = -kls->offset & (align - 1); if (count > PTRDIFF_MAX / size || (available - padding) < (size * count)) { if (count > PTRDIFF_MAX / size) { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] count [%li] was bigger than PTRDIFF_MAX/size [%li].\n", count, PTRDIFF_MAX / size); @@ -808,7 +808,7 @@ void *kls_push_zero(Koliseo *kls, ptrdiff_t size, ptrdiff_t align, count, PTRDIFF_MAX / size); #endif } else { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] Out of memory. size*count [%li] was bigger than available-padding [%li].\n", size * count, available - padding); @@ -896,7 +896,7 @@ void *kls_push_zero_AR(Koliseo *kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t padding = -kls->offset & (align - 1); if (count > PTRDIFF_MAX / size || (available - padding) < (size * count)) { if (count > PTRDIFF_MAX / size) { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] count [%li] was bigger than PTRDIFF_MAX/size [%li].\n", count, PTRDIFF_MAX / size); @@ -906,7 +906,7 @@ void *kls_push_zero_AR(Koliseo *kls, ptrdiff_t size, ptrdiff_t align, count, PTRDIFF_MAX / size); #endif } else { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] Out of memory. size*count [%li] was bigger than available-padding [%li].\n", size * count, available - padding); @@ -1058,7 +1058,7 @@ void *kls_temp_push_zero_AR(Koliseo_Temp *t_kls, ptrdiff_t size, ptrdiff_t padding = -kls->offset & (align - 1); if (count > PTRDIFF_MAX / size || (available - padding) < (size * count)) { if (count > PTRDIFF_MAX / size) { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] count [%li] was bigger than PTRDIFF_MAX/size [%li].\n", count, PTRDIFF_MAX / size); @@ -1068,7 +1068,7 @@ void *kls_temp_push_zero_AR(Koliseo_Temp *t_kls, ptrdiff_t size, count, PTRDIFF_MAX / size); #endif } else { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] Out of memory. size*count [%li] was bigger than available-padding [%li].\n", size * count, available - padding); @@ -1218,7 +1218,7 @@ void *kls_push_zero_named(Koliseo *kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t padding = -kls->offset & (align - 1); if (count > PTRDIFF_MAX / size || (available - padding) < (size * count)) { if (count > PTRDIFF_MAX / size) { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] count [%li] was bigger than PTRDIFF_MAX/size [%li].\n", count, PTRDIFF_MAX / size); @@ -1228,7 +1228,7 @@ void *kls_push_zero_named(Koliseo *kls, ptrdiff_t size, ptrdiff_t align, count, PTRDIFF_MAX / size); #endif } else { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] Out of memory. size*count [%li] was bigger than available-padding [%li].\n", size * count, available - padding); @@ -1386,7 +1386,7 @@ void *kls_temp_push_zero_named(Koliseo_Temp *t_kls, ptrdiff_t size, ptrdiff_t padding = -kls->offset & (align - 1); if (count > PTRDIFF_MAX / size || (available - padding) < (size * count)) { if (count > PTRDIFF_MAX / size) { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] count [%li] was bigger than PTRDIFF_MAX/size [%li].\n", count, PTRDIFF_MAX / size); @@ -1396,7 +1396,7 @@ void *kls_temp_push_zero_named(Koliseo_Temp *t_kls, ptrdiff_t size, count, PTRDIFF_MAX / size); #endif } else { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] Out of memory. size*count [%li] was bigger than available-padding [%li].\n", size * count, available - padding); @@ -1545,7 +1545,7 @@ void *kls_push_zero_typed(Koliseo *kls, ptrdiff_t size, ptrdiff_t align, ptrdiff_t padding = -kls->offset & (align - 1); if (count > PTRDIFF_MAX / size || (available - padding) < (size * count)) { if (count > PTRDIFF_MAX / size) { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] count [%li] was bigger than PTRDIFF_MAX/size [%li].\n", count, PTRDIFF_MAX / size); @@ -1555,7 +1555,7 @@ void *kls_push_zero_typed(Koliseo *kls, ptrdiff_t size, ptrdiff_t align, count, PTRDIFF_MAX / size); #endif } else { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] Out of memory. size*count [%li] was bigger than available-padding [%li].\n", size * count, available - padding); @@ -1712,7 +1712,7 @@ void *kls_temp_push_zero_typed(Koliseo_Temp *t_kls, ptrdiff_t size, ptrdiff_t padding = -kls->offset & (align - 1); if (count > PTRDIFF_MAX / size || (available - padding) < (size * count)) { if (count > PTRDIFF_MAX / size) { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] count [%li] was bigger than PTRDIFF_MAX/size [%li].\n", count, PTRDIFF_MAX / size); @@ -1722,7 +1722,7 @@ void *kls_temp_push_zero_typed(Koliseo_Temp *t_kls, ptrdiff_t size, count, PTRDIFF_MAX / size); #endif } else { -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(stderr, "[KLS] Out of memory. size*count [%li] was bigger than available-padding [%li].\n", size * count, available - padding); @@ -1857,7 +1857,7 @@ void print_kls_2file(FILE *fp, Koliseo *kls) KLS_Conf_Arg(kls->conf)); fprintf(fp, "\n[INFO] Stats: { " KLS_Stats_Fmt " }\n", KLS_Stats_Arg(kls->stats)); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(fp, "\n[KLS] Size: { %li }\n", kls->size); #else fprintf(fp, "\n[KLS] Size: { %lli }\n", kls->size); @@ -1868,7 +1868,7 @@ void print_kls_2file(FILE *fp, Koliseo *kls) fprintf(fp, "[KLS] Size (Human): { %s }\n", human_size); kls_formatSize(kls->offset, curr_size, sizeof(curr_size)); fprintf(fp, "[KLS] Used (Human): { %s }\n", curr_size); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(fp, "[KLS] Offset: { %li }\n", kls->offset); fprintf(fp, "[KLS] Prev_Offset: { %li }\n", kls->prev_offset); #else @@ -1914,7 +1914,7 @@ void print_temp_kls_2file(FILE *fp, Koliseo_Temp *t_kls) } else { Koliseo *kls = t_kls->kls; fprintf(fp, "\n[KLS_T] API Level: { %i }\n", int_koliseo_version()); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(fp, "\n[KLS_T] Temp Size: { %li }\n", kls->size - t_kls->offset); fprintf(fp, "\n[KLS_T] Refer Size: { %li }\n", kls->size); @@ -1934,14 +1934,14 @@ void print_temp_kls_2file(FILE *fp, Koliseo_Temp *t_kls) fprintf(fp, "[KLS_T] Inner Used (Human): { %s }\n", curr_size); kls_formatSize(t_kls->offset, curr_size, sizeof(curr_size)); fprintf(fp, "[KLS_T] Temp Used (Human): { %s }\n", curr_size); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(fp, "[KLS_T] Inner Offset: { %li }\n", kls->offset); fprintf(fp, "[KLS_T] Temp Offset: { %li }\n", t_kls->offset); #else fprintf(fp, "[KLS_T] Inner Offset: { %lli }\n", kls->offset); fprintf(fp, "[KLS_T] Temp Offset: { %lli }\n", t_kls->offset); #endif -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(fp, "[KLS_T] Inner Prev_Offset: { %li }\n", kls->prev_offset); fprintf(fp, "[KLS_T] Temp Prev_Offset: { %li }\n\n", t_kls->prev_offset); @@ -2013,7 +2013,7 @@ void kls_show_toWin(Koliseo *kls, WINDOW *win) int x = 2; mvwprintw(win, y++, x, "Koliseo data:"); mvwprintw(win, y++, x, "API Level: { %i }", int_koliseo_version()); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD mvwprintw(win, y++, x, "Size: { %li }", kls->size); #else mvwprintw(win, y++, x, "Size: { %lli }", kls->size); @@ -2024,12 +2024,12 @@ void kls_show_toWin(Koliseo *kls, WINDOW *win) char curr_size[200]; kls_formatSize(kls->offset, curr_size, sizeof(curr_size)); mvwprintw(win, y++, x, "Used (Human): { %s }", curr_size); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD mvwprintw(win, y++, x, "Offset: { %li }", kls->offset); #else mvwprintw(win, y++, x, "Offset: { %lli }", kls->offset); #endif -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD mvwprintw(win, y++, x, "Prev_Offset: { %li }", kls->prev_offset); #else mvwprintw(win, y++, x, "Prev_Offset: { %lli }", kls->prev_offset); @@ -2098,7 +2098,7 @@ void kls_temp_show_toWin(Koliseo_Temp *t_kls, WINDOW *win) int x = 2; mvwprintw(win, y++, x, "Koliseo_Temp data:"); mvwprintw(win, y++, x, "API Level: { %i }", int_koliseo_version()); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD mvwprintw(win, y++, x, "Temp Size: { %li }", kls->size - t_kls->offset); mvwprintw(win, y++, x, "Refer Size: { %li }", kls->size); #else @@ -2115,14 +2115,14 @@ void kls_temp_show_toWin(Koliseo_Temp *t_kls, WINDOW *win) mvwprintw(win, y++, x, "Inner Used (Human): { %s }", curr_size); kls_formatSize(t_kls->offset, curr_size, sizeof(curr_size)); mvwprintw(win, y++, x, "Temp Used (Human): { %s }", curr_size); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD mvwprintw(win, y++, x, "Inner Offset: { %li }", kls->offset); mvwprintw(win, y++, x, "Temp Offset: { %li }", t_kls->offset); #else mvwprintw(win, y++, x, "Inner Offset: { %lli }", kls->offset); mvwprintw(win, y++, x, "Temp Offset: { %lli }", t_kls->offset); #endif -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD mvwprintw(win, y++, x, "Inner Prev_Offset: { %li }", kls->prev_offset); mvwprintw(win, y++, x, "Temp Prev_Offset: { %li }", t_kls->prev_offset); #else @@ -2198,7 +2198,7 @@ void kls_showList_toWin(Koliseo *kls, WINDOW *win) KLS_list_element e = kls_head(rl); mvwprintw(win, y++, x, "Name: { %s }", e->name); mvwprintw(win, y++, x, "Desc: { %s }", e->desc); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD mvwprintw(win, y++, x, "Offsets: { %li } -> { %li }", e->begin_offset, e->end_offset); mvwprintw(win, y++, x, "Size: { %li }", e->size); @@ -2293,7 +2293,7 @@ void kls_temp_showList_toWin(Koliseo_Temp *t_kls, WINDOW *win) KLS_list_element e = kls_head(rl); mvwprintw(win, y++, x, "Name: { %s }", e->name); mvwprintw(win, y++, x, "Desc: { %s }", e->desc); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD mvwprintw(win, y++, x, "Offsets: { %li } -> { %li }", e->begin_offset, e->end_offset); mvwprintw(win, y++, x, "Size: { %li }", e->size); @@ -2801,7 +2801,7 @@ void kls_showList_toFile(KLS_Region_List l, FILE *fp) while (!kls_empty(l)) { fprintf(fp, "\n{ %s }, { %s } ", kls_head(l)->name, kls_head(l)->desc); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD fprintf(fp, "{ %li } -> { %li }", kls_head(l)->begin_offset, kls_head(l)->end_offset); #else diff --git a/src/koliseo.h b/src/koliseo.h index 5c532a2..21b0063 100644 --- a/src/koliseo.h +++ b/src/koliseo.h @@ -45,7 +45,7 @@ #define KLS_MAJOR 0 /**< Represents current major release.*/ #define KLS_MINOR 3 /**< Represents current minor release.*/ -#define KLS_PATCH 19 /**< Represents current patch release.*/ +#define KLS_PATCH 20 /**< Represents current patch release.*/ /*! \mainpage Koliseo index page * @@ -183,7 +183,7 @@ static const int KOLISEO_API_VERSION_INT = /** * Defines current API version string. */ -static const char KOLISEO_API_VERSION_STRING[] = "0.3.19"; /**< Represents current version with MAJOR.MINOR.PATCH format.*/ +static const char KOLISEO_API_VERSION_STRING[] = "0.3.20"; /**< Represents current version with MAJOR.MINOR.PATCH format.*/ /** * Returns current koliseo version as a string. @@ -380,11 +380,11 @@ void kls_formatSize(ptrdiff_t size, char *outputBuffer, size_t bufferSize); #ifndef KOLISEO_CURSES_H_ #define KOLISEO_CURSES_H_ -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD #include "ncurses.h" #else #include -#endif //MINGW32_BUILD +#endif //WINDOWS_BUILD void kls_show_toWin(Koliseo * kls, WINDOW * win); void kls_showList_toWin(Koliseo * kls, WINDOW * win); diff --git a/static/demo.c b/static/demo.c index fc60b39..0b3bd03 100644 --- a/static/demo.c +++ b/static/demo.c @@ -65,7 +65,7 @@ int main(int argc, char **argv) printf(KLS_Conf_Fmt "\n", KLS_Conf_Arg(kls->conf)); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD printf("[Current position in Koliseo] [pos: %li]\n", kls_get_pos(kls)); #else printf("[Current position in Koliseo] [pos: %lli]\n", kls_get_pos(kls)); @@ -73,7 +73,7 @@ int main(int argc, char **argv) print_dbg_kls(kls); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD printf("[Show Region list for Koliseo] [pos: %li]\n", kls_get_pos(kls)); #else printf("[Show Region list for Koliseo] [pos: %lli]\n", kls_get_pos(kls)); @@ -84,7 +84,7 @@ int main(int argc, char **argv) Koliseo_Temp *temp_kls = kls_temp_start(kls); //temp_kls->conf.kls_autoset_regions = 1; TODO why does this crash? -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD printf("[Started Koliseo_Temp] [pos: %li]\n", kls_get_pos(temp_kls->kls)); #else printf("[Started Koliseo_Temp] [pos: %lli]\n", kls_get_pos(temp_kls->kls)); @@ -100,7 +100,7 @@ int main(int argc, char **argv) printf("\n*p2 is [%i] before KLS_PUSH_T\n", *p2); printf("\n*p3 is [%i] before KLS_PUSH_T\n", *p3); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD printf("[KLS_PUSH for a int to Koliseo] [size: %li]\n", sizeof(int)); #else printf("[KLS_PUSH for a int to Koliseo] [size: %lli]\n", sizeof(int)); @@ -110,7 +110,7 @@ int main(int argc, char **argv) ("[This handles the Koliseo directly while we have an open Koliseo_Temp.]\n"); p = (int *)KLS_PUSH(kls, int, 1); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD printf("[KLS_PUSH_T_NAMED for a int to Koliseo_Temp] [size: %li]\n", sizeof(int)); #else @@ -119,7 +119,7 @@ int main(int argc, char **argv) #endif p2 = (int *)KLS_PUSH_T_NAMED(temp_kls, int, 1, "int", "Another int"); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD printf("[KLS_PUSH_T for a int to Koliseo_Temp] [size: %li]\n", sizeof(int)); #else printf("[KLS_PUSH_T for a int to Koliseo_Temp] [size: %lli]\n", @@ -127,13 +127,13 @@ int main(int argc, char **argv) #endif p3 = (int *)KLS_PUSH_T(temp_kls, int, 1); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD printf("[Current position in Koliseo] [pos: %li]\n", kls_get_pos(kls)); #else printf("[Current position in Koliseo] [pos: %lli]\n", kls_get_pos(kls)); #endif -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD printf("[Current position in Koliseo_Temp] [pos: %li]\n", temp_kls->offset); #else printf("[Current position in Koliseo_Temp] [pos: %lli]\n", @@ -149,7 +149,7 @@ int main(int argc, char **argv) *p2 = 3; printf("\n*p3 is [%i] after KLS_PUSH\n", *p3); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD printf("[Show Region list for Koliseo] [pos: %li]\n", kls_get_pos(kls)); #else printf("[Show Region list for Koliseo] [pos: %lli]\n", kls_get_pos(kls)); @@ -193,7 +193,7 @@ int main(int argc, char **argv) int *z = &minusone; printf("\n*z is [%i] before KLS_POP\n", *z); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD printf("[KLS_POP a int from Koliseo] [size: %li]\n", sizeof(int)); #else printf("[KLS_POP a int from Koliseo] [size: %lli]\n", sizeof(int)); @@ -203,7 +203,7 @@ int main(int argc, char **argv) printf("\n*z is [%i] after KLS_POP\n", *z); -#ifndef MINGW32_BUILD +#ifndef WINDOWS_BUILD printf("[Current position in Koliseo] [pos: %li]\n", kls_get_pos(kls)); #else printf("[Current position in Koliseo] [pos: %lli]\n", kls_get_pos(kls));