From: Fred T. Hamster Date: Wed, 18 Feb 2026 21:53:50 +0000 (-0500) Subject: upgraded to feisty, still working on compiling X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=47b196174ebd0133ef2d8cee20218cfa893a2e1a;p=feisty_meow.git upgraded to feisty, still working on compiling --- diff --git a/nucleus/library/tests_processes/find_window.cpp b/nucleus/library/tests_processes/find_window.cpp index b94df20c..3c5fc27b 100644 --- a/nucleus/library/tests_processes/find_window.cpp +++ b/nucleus/library/tests_processes/find_window.cpp @@ -17,19 +17,26 @@ * Please send any updates to: fred@gruntose.com * \*****************************************************************************/ -#include +#include +#include +#include #include -#include -#include -#include +#include #include -#include -#include +#include -HOOPLE_STARTUP_CODE; +using namespace application; +using namespace basis; +using namespace filesystem; +using namespace loggers; +using namespace structures; +//using namespace timely; -window_handle matching_window = NIL; -istring window_name_sought; +#undef LOG +#define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s) + +window_handle matching_window = NULL_POINTER; +astring window_name_sought; BOOL CALLBACK zingers_enum_proc(window_handle hwnd, LPARAM lParam) { @@ -38,7 +45,7 @@ BOOL CALLBACK zingers_enum_proc(window_handle hwnd, LPARAM lParam) int chars = GetWindowText(hwnd, win_name, MAX_TITLE - 1); if (chars > 0) { // see if the current window matches what we're looking for. - if (istring(from_unicode_temp(win_name)).ifind(window_name_sought) >= 0) { + if (astring(from_unicode_temp(win_name)).ifind(window_name_sought) >= 0) { matching_window = hwnd; return false; // don't keep going. } @@ -58,8 +65,8 @@ int main(int argc, char *argv[]) "window is found, its window handle is displayed."); return 1; } - istring title = cmds.get(0).text(); - matching_window = NIL; // reset our match first. + astring title = cmds.get(0).text(); + matching_window = NULL_POINTER; // reset our match first. window_name_sought = title; // enumerate the windows looking for a match. EnumWindows(zingers_enum_proc, 0); @@ -70,10 +77,10 @@ int main(int argc, char *argv[]) //out.log("found matching window handle..."); if (matching_window) - out.log(isprintf("window handle is 0x%lx (or %ld) for ", matching_window, + out.log(a_sprintf("window handle is 0x%lx (or %ld) for ", matching_window, matching_window) + title + "."); else - out.log(istring("no window found for ") + title + "."); + out.log(astring("no window found for ") + title + "."); return 0; } @@ -82,54 +89,54 @@ int main(int argc, char *argv[]) #include #include #include - #include + #include #include #include #include - #include + #include #include #include #include - #include + #include #include #include #include #include - #include + #include #include #include #include #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include #include #include #include #include #include - #include - #include + #include + #include #include - #include - #include - #include + #include + #include + #include #include - #include - #include - #include + #include + #include + #include #include #include - #include + #include #endif // __BUILD_STATIC_APPLICATION__ diff --git a/nucleus/library/tests_processes/makefile.shutdowner b/nucleus/library/tests_processes/makefile.shutdowner index c937eda7..eba80213 100644 --- a/nucleus/library/tests_processes/makefile.shutdowner +++ b/nucleus/library/tests_processes/makefile.shutdowner @@ -2,11 +2,12 @@ CONSOLE_MODE = t include cpp/variables.def -PROJECT = t_shutdown_alerter +PROJECT = test_shutdown_alerter TYPE = test -TARGETS = t_shutdown_alerter.exe -LOCAL_LIBS_USED = basis i_library -RUN_TARGETS = +TARGETS = test_shutdown_alerter.exe +LOCAL_LIBS_USED = basis +##i_library +RUN_TARGETS = $(ACTUAL_TARGETS) include cpp/rules.def diff --git a/nucleus/library/tests_processes/t_shutdown_alerter.cpp b/nucleus/library/tests_processes/t_shutdown_alerter.cpp deleted file mode 100644 index 05d6d291..00000000 --- a/nucleus/library/tests_processes/t_shutdown_alerter.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/*****************************************************************************\ -* * -* Name : t_shutdown_alerter * -* Author : Chris Koeritz * -* * -* Purpose: * -* * -* An example of using the shutdown_alerter object to manage the runtime * -* of a program. * -* * -******************************************************************************* -* Copyright (c) 2005-$now By Author. This program is free software; you can * -* redistribute it and/or modify it under the terms of the GNU General Public * -* License as published by the Free Software Foundation; either version 2 of * -* the License or (at your option) any later version. This is online at: * -* http://www.fsf.org/copyleft/gpl.html * -* Please send any updates to: fred@gruntose.com * -\*****************************************************************************/ - -#include -#include -#include -#include -#include - -HOOPLE_STARTUP_CODE; - -#define BASE_LOG(s) STAMPED_EMERGENCY_LOG(program_wide_logger(), s) -#define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger(), s) - -const int TIMING_CYCLE = 1408; - // how frequently timer should be hit. - -class my_anchor : public shutdown_alerter -{ -public: - virtual void handle_startup() { BASE_LOG("into startup..."); } - virtual void handle_shutdown() { BASE_LOG("into shutdown..."); } - virtual void handle_timer() { BASE_LOG("into timer..."); } -}; - -int main(int formal(argc), char *formal(argv)[]) -{ - my_anchor w; - BASE_LOG(isprintf("timer will hit every %d ms.", TIMING_CYCLE)); - shutdown_alerter::launch_console(w, - filename(portable::application_name()).basename(), TIMING_CYCLE); - return 0; -} - diff --git a/nucleus/library/tests_processes/test_shutdown_alerter.cpp b/nucleus/library/tests_processes/test_shutdown_alerter.cpp new file mode 100644 index 00000000..d7c5b112 --- /dev/null +++ b/nucleus/library/tests_processes/test_shutdown_alerter.cpp @@ -0,0 +1,50 @@ +/*****************************************************************************\ +* * +* Name : t_shutdown_alerter * +* Author : Chris Koeritz * +* * +* Purpose: * +* * +* An example of using the shutdown_alerter object to manage the runtime * +* of a program. * +* * +******************************************************************************* +* Copyright (c) 2005-$now By Author. This program is free software; you can * +* redistribute it and/or modify it under the terms of the GNU General Public * +* License as published by the Free Software Foundation; either version 2 of * +* the License or (at your option) any later version. This is online at: * +* http://www.fsf.org/copyleft/gpl.html * +* Please send any updates to: fred@gruntose.com * +\*****************************************************************************/ + +#include + +#include +#include +#include + +HOOPLE_STARTUP_CODE; + +#define BASE_LOG(s) STAMPED_EMERGENCY_LOG(program_wide_logger::get(), s) +#define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s) + +const int TIMING_CYCLE = 1408; + // how frequently timer should be hit. + +class my_anchor : public shutdown_alerter +{ +public: + virtual void handle_startup() { BASE_LOG("into startup..."); } + virtual void handle_shutdown() { BASE_LOG("into shutdown..."); } + virtual void handle_timer() { BASE_LOG("into timer..."); } +}; + +int main(int formal(argc), char *formal(argv)[]) +{ + my_anchor w; + BASE_LOG(a_sprintf("timer will hit every %d ms.", TIMING_CYCLE)); + shutdown_alerter::launch_console(w, + filename(application_configuration::application_name()).basename(), TIMING_CYCLE); + return 0; +} + diff --git a/nucleus/library/tests_processes/zing_window.cpp b/nucleus/library/tests_processes/zing_window.cpp index 592b4a2b..78fda90d 100644 --- a/nucleus/library/tests_processes/zing_window.cpp +++ b/nucleus/library/tests_processes/zing_window.cpp @@ -22,21 +22,21 @@ * Please send any updates to: fred@gruntose.com * \*****************************************************************************/ -#include +#include #include -#include -#include -#include +#include + +#include #include -#include -#include +#include +#include #include HOOPLE_STARTUP_CODE; -window_handle matching_window = NIL; -istring window_name_sought; +window_handle matching_window = NULL_POINTER; +astring window_name_sought; BOOL CALLBACK zingers_enum_proc(window_handle hwnd, LPARAM lParam) { @@ -45,7 +45,7 @@ BOOL CALLBACK zingers_enum_proc(window_handle hwnd, LPARAM lParam) int chars = GetWindowText(hwnd, win_name, MAX_TITLE - 1); if (chars > 0) { // see if the current window matches what we're looking for. - if (istring(from_unicode_temp(win_name)).ifind(window_name_sought) >= 0) { + if (astring(from_unicode_temp(win_name)).ifind(window_name_sought) >= 0) { matching_window = hwnd; return false; // don't keep going. } @@ -68,12 +68,12 @@ int main(int argc, char *argv[]) "message chosen, the window will behave in various different ways.\n" "If there are a third or fourth parameter, then these are taken as\n" "the extra data to send in the PostMessage call for zinging."); - out.log(isprintf("\nExample windows message values:\n\t" + out.log(a_sprintf("\nExample windows message values:\n\t" "WM_CLOSE = %d\n\tWM_PAINT = %d", WM_CLOSE, WM_PAINT)); return 1; } - istring junk_text = cmds.get(0).text(); + astring junk_text = cmds.get(0).text(); bool saw_hex_code = false; if (junk_text.begins("0x")) { // we have a hex code. we will key off of that, which assumes that there @@ -106,7 +106,7 @@ int main(int argc, char *argv[]) } if (has_alpha) { // reset our match first. - matching_window = NIL; + matching_window = NULL_POINTER; window_name_sought = junk_text; //out.log("saw non-numbers in handle, trying as name."); // enumerate the windows looking for a match. @@ -139,7 +139,7 @@ int main(int argc, char *argv[]) PostMessage(handle, event, p1, p2); - out.log(isprintf("posted at 0x%lx the zing (%u %u %u)", handle, event, + out.log(a_sprintf("posted at 0x%lx the zing (%u %u %u)", handle, event, p1, p2)); return 0; @@ -149,54 +149,54 @@ int main(int argc, char *argv[]) // static dependencies found by buildor_gen_deps.sh: #include #include - #include + #include #include #include #include - #include + #include #include #include #include - #include + #include #include #include #include #include - #include + #include #include #include #include #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include #include #include #include #include #include - #include - #include + #include + #include #include - #include - #include - #include + #include + #include + #include #include - #include - #include - #include + #include + #include + #include #include #include - #include + #include #endif // __BUILD_STATIC_APPLICATION__