Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 307 of file tnmain.cpp.
{ CONSOLE_SCREEN_BUFFER_INFO ConsoleScreenBufferInfo; GetConsoleScreenBufferInfo( GetStdHandle(STD_OUTPUT_HANDLE), &ConsoleScreenBufferInfo ); char *k; char startdir[MAX_PATH*2]; char exename[MAX_PATH]; // strncpy(startdir, ArgV[0],MAX_PATH); // This should be more accurate than using argv[0] (Paul Brannan 9/16/98) GetModuleFileName(NULL, startdir, sizeof(startdir)); // Get the current console title so it can be set later // ("Pedro A. Aranda Gutiérrez" <paag@coppi.tid.es>) TCHAR ConsoleTitle[255]; GetConsoleTitle(ConsoleTitle, sizeof(ConsoleTitle)); k = strrchr(startdir, '\\'); if (k == NULL){ // if the \ character is not found... strcpy(exename, startdir); strcpy(startdir,""); // set the path to nothing } else { // end the string after the last '\' to get rid of the file name strcpy(exename, k+1); k[1] = 0; } printm(0, FALSE, MSG_COPYRIGHT); printm(0, FALSE, MSG_COPYRIGHT_1); // set up the ini class ini.init(startdir, exename); // Process the command line arguments and connect to a host if necessary if(ini.Process_Params(ArgC, ArgV)) { const char *szHost = ini.get_host(); const char *strPort = ini.get_port(); if(!*szHost) { Telnet MyConnection; while(telCommandLine(MyConnection)); } else { Telnet MyConnection; if(MyConnection.Open(szHost, strPort) == TNPROMPT) { // still connected printit("\n"); telCommandLine(MyConnection); } } } if(ini.get_term_width() != -1 || ini.get_term_height() != -1) { SetConsoleScreenBufferSize( GetStdHandle(STD_OUTPUT_HANDLE), // handle of console screen buffer ConsoleScreenBufferInfo.dwSize // new size in character rows and cols. ); SetConsoleWindowInfo( GetStdHandle(STD_OUTPUT_HANDLE), // handle of console screen buffer TRUE, // coordinate type flag &ConsoleScreenBufferInfo.srWindow // address of new window rectangle ); } SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), // handle of console screen buffer ConsoleScreenBufferInfo.wAttributes // text and background colors ); // Restore the original console title // ("Pedro A. Aranda Gutiérrez" <paag@coppi.tid.es>) SetConsoleTitle(ConsoleTitle); return 0; }