summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/inspircd_win32wrapper.cpp66
-rw-r--r--win/inspircd_win32wrapper.h3
2 files changed, 0 insertions, 69 deletions
diff --git a/win/inspircd_win32wrapper.cpp b/win/inspircd_win32wrapper.cpp
index d2dcd7456..3a929d09e 100644
--- a/win/inspircd_win32wrapper.cpp
+++ b/win/inspircd_win32wrapper.cpp
@@ -197,72 +197,6 @@ const char * dlerror()
return errormessage;
}
-int printf_c(const char * format, ...)
-{
- // Better hope we're not multithreaded, otherwise we'll have chickens crossing the road other side to get the to :P
- static char message[500];
- static char temp[10];
- int color1, color2;
-
- /* parse arguments */
- va_list ap;
- va_start(ap, format);
- vsnprintf(message, 500, format, ap);
- va_end(ap);
-
- /* search for unix-style escape sequences */
- int t;
- int c = 0;
- const char * p = message;
- while(*p != 0)
- {
- if (*p == '\033')
- {
- // Escape sequence -> copy into the temp buffer, and parse the color.
- p++;
- t = 0;
- while(*p != 'm')
- {
- temp[t++] = *p;
- ++p;
- }
-
- temp[t] = 0;
- p++;
- if (!_stricmp(temp, "[0"))
- {
- // Returning to normal colour.
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
- }
- else if (sscanf(temp, "[%u;%u", &color1, &color2) == 2)
- {
- switch(color2)
- {
- case 32: // Green
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_INTENSITY);
- break;
-
- default: // Unknown
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY);
- break;
- }
- }
- else
- {
- char message[50];
- sprintf("Unknown color code: %s", temp);
- MessageBox(0, message, message, MB_OK);
- }
- }
-
- putchar(*p);
- ++c;
- ++p;
- }
-
- return c;
-}
-
int arg_counter = 1;
char optarg[514];
int getopt_long_only(int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind)
diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h
index 87baf9781..602ee1eee 100644
--- a/win/inspircd_win32wrapper.h
+++ b/win/inspircd_win32wrapper.h
@@ -100,9 +100,6 @@ CoreExport int inet_aton(const char *, struct in_addr *);
/* Unix-style get running user id */
CoreExport int geteuid();
-/* Handles colors in printf */
-CoreExport int printf_c(const char * format, ...);
-
/* getopt() wrapper */
# define no_argument 0
# define required_argument 1