diff --git a/main.c b/cmd-split.c similarity index 78% rename from main.c rename to cmd-split.c index caf4d2d..a79273a 100644 --- a/main.c +++ b/cmd-split.c @@ -5,9 +5,10 @@ #define STRLEN strlen #endif +#define WIN32_LEAN_AND_MEAN #include #include "buffer.h" -#include "cmd.h" +#include "dialogs.c" #include "cmd_win.c" #include "buffer.c" diff --git a/cmd-split.exe b/cmd-split.exe new file mode 100644 index 0000000..651ec50 Binary files /dev/null and b/cmd-split.exe differ diff --git a/cmd_win.c b/cmd_win.c index 7041a30..a561b1f 100644 --- a/cmd_win.c +++ b/cmd_win.c @@ -48,13 +48,6 @@ Dimensions OutputBoxDimensions() } - -int InfoBox(HWND hwnd, TCHAR *text, TCHAR *title) -{ - MessageBox(hwnd, text, title, MB_OK | MB_ICONERROR); - return 0; -} - unsigned short number_of_columns; unsigned short number_of_lines_to_draw; // keep this global so we can see if it changes in WM_SIZE event diff --git a/cmd.h b/dialogs.c similarity index 75% rename from cmd.h rename to dialogs.c index 1c3b524..f17b00f 100644 --- a/cmd.h +++ b/dialogs.c @@ -5,7 +5,7 @@ void DisplayValue(unsigned int value){ MessageBox(NULL, str, TEXT("Value"), MB_OK | MB_ICONERROR); } -int ErrorCode(TCHAR *title, int value){ +void ErrorCode(TCHAR *title, int value){ char str[snprintf(NULL, 0,"%d",value)+1]; sprintf(str, "%d", value); MessageBox(NULL, str, title, MB_OK | MB_ICONERROR); @@ -16,4 +16,10 @@ void DisplayPointer(void *value){ sprintf(str, "%p", value); MessageBox(NULL, str, TEXT("Value"), MB_OK | MB_ICONERROR); +} + +int InfoBox(HWND hwnd, TCHAR *text, TCHAR *title) +{ + MessageBox(hwnd, text, title, MB_OK | MB_ICONERROR); + return 0; } \ No newline at end of file