From b19cd251b907f4e087264dd0342aefe864d54145 Mon Sep 17 00:00:00 2001 From: myT Date: Thu, 1 Jun 2017 20:49:52 +0200 Subject: [PATCH] removed some dead code --- code/qcommon/qcommon.h | 1 - code/unix/unix_main.cpp | 1 - code/unix/unix_shared.cpp | 11 ----------- code/win32/win_shared.cpp | 6 ------ code/win32/win_syscon.cpp | 7 +------ 5 files changed, 1 insertion(+), 25 deletions(-) diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h index a6f0d5d..1f5d25d 100644 --- a/code/qcommon/qcommon.h +++ b/code/qcommon/qcommon.h @@ -967,7 +967,6 @@ void Sys_ShowIP(); void Sys_Mkdir( const char* path ); const char* Sys_Cwd(); -const char* Sys_GetCurrentUser(); const char* Sys_DefaultHomePath(); char** Sys_ListFiles( const char *directory, const char *extension, const char *filter, int *numfiles, qbool wantsubs ); diff --git a/code/unix/unix_main.cpp b/code/unix/unix_main.cpp index ab25e07..edd20e9 100644 --- a/code/unix/unix_main.cpp +++ b/code/unix/unix_main.cpp @@ -804,7 +804,6 @@ void Sys_Init() Cmd_AddCommand( "in_restart", Sys_In_Restart_f ); #endif Cvar_Set( "arch", OS_STRING " " ARCH_STRING ); - Cvar_Set( "username", Sys_GetCurrentUser() ); } diff --git a/code/unix/unix_shared.cpp b/code/unix/unix_shared.cpp index 487a910..e537921 100644 --- a/code/unix/unix_shared.cpp +++ b/code/unix/unix_shared.cpp @@ -261,14 +261,3 @@ const char* Sys_DefaultHomePath() void Sys_ShowConsole( int visLevel, qboolean quitOnClose ) { } - - -const char* Sys_GetCurrentUser() -{ - const struct passwd* p; - - if (!(p = getpwuid(getuid()))) - return "player"; - - return p->pw_name; -} diff --git a/code/win32/win_shared.cpp b/code/win32/win_shared.cpp index 505fabe..cc7ad4c 100644 --- a/code/win32/win_shared.cpp +++ b/code/win32/win_shared.cpp @@ -36,12 +36,6 @@ int Sys_Milliseconds() } -const char* Sys_GetCurrentUser() -{ - return "player"; -} - - const char* Sys_DefaultHomePath() { return NULL; diff --git a/code/win32/win_syscon.cpp b/code/win32/win_syscon.cpp index 6f45cdf..ed96942 100644 --- a/code/win32/win_syscon.cpp +++ b/code/win32/win_syscon.cpp @@ -41,8 +41,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define EDIT_ID 100 #define INPUT_ID 101 -#define CONSOLE_WIDTH 78 - typedef struct { HWND hWnd; @@ -501,11 +499,8 @@ void Sys_CreateConsole( void ) SetForegroundWindow( s_wcd.hWnd ); SetFocus( s_wcd.hwndInputLine ); - for ( int i = 0; i < COMMAND_HISTORY; ++i ) { + for ( int i = 0; i < COMMAND_HISTORY; ++i ) Field_Clear( &s_wcd.historyEditLines[i] ); - s_wcd.historyEditLines[i].widthInChars = CONSOLE_WIDTH; - } - s_wcd.historyLine = 0; s_wcd.nextHistoryLine = 0;