Browse Source

removed printf wrapper (we only switch i/o mode while printing)

Nicolas Cannasse 6 years ago
parent
commit
47eb41b9a6
2 changed files with 0 additions and 19 deletions
  1. 0 4
      src/hl.h
  2. 0 15
      src/std/ucs2.c

+ 0 - 4
src/hl.h

@@ -223,10 +223,6 @@ typedef wchar_t	uchar;
 #	define uprintf		wprintf
 #	define ustrlen		wcslen
 #	define ustrdup		_wcsdup
-#	ifdef HL_WIN_DESKTOP
-#		define printf		hl_win_cprintf
-HL_API void hl_win_cprintf( const char *fmt, ... );
-#	endif
 HL_API int uvszprintf( uchar *out, int out_size, const uchar *fmt, va_list arglist );
 #	define utod(s,end)	wcstod(s,end)
 #	define utoi(s,end)	wcstol(s,end,10)

+ 0 - 15
src/std/ucs2.c

@@ -261,19 +261,4 @@ sprintf_add:
 	return 0;
 }
 
-#ifdef HL_WIN
-// we can no longer use basic printf after we changed the console output encoding
-HL_PRIM void hl_win_cprintf( const char *fmt, ... ) {
-	char buf[4096];
-	uchar ubuf[4096];
-	va_list args;
-	va_start(args, fmt);
-	vsprintf(buf, fmt, args);
-	va_end(args);
-	hl_from_utf8(ubuf,4096,buf);
-	wprintf(USTR("%s"),ubuf);
-	fflush(stdout);
-}
-#endif
-
 #endif