ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

screen.c
Go to the documentation of this file.
00001 /*
00002  * SCREEN.C - screen internal command.
00003  *
00004  * clone from 4nt msgbox command
00005  *
00006  * 30 Aug 1999
00007  *     started - Paolo Pantaleo <paolopan@freemail.it>
00008  *
00009  *    30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
00010  *        Remove all hardcode string to En.rc
00011  *
00012  */
00013 
00014 #include <precomp.h>
00015 
00016 #ifdef INCLUDE_CMD_SCREEN
00017 
00018 
00019 INT CommandScreen (LPTSTR param)
00020 {
00021     SHORT x,y;
00022     BOOL bSkipText = FALSE;
00023 
00024     if (_tcsncmp (param, _T("/?"), 2) == 0)
00025     {
00026         ConOutResPaging(TRUE,STRING_SCREEN_HELP);
00027         return 0;
00028     }
00029 
00030     nErrorLevel = 0;
00031 
00032     //get row
00033     while(_istspace(*param))
00034         param++;
00035 
00036     if(!(*param))
00037     {
00038         error_req_param_missing ();
00039         return 1;
00040     }
00041 
00042     y = _ttoi(param);
00043     if (y<0 || y>(maxy-1))
00044     {
00045         ConOutResPuts(STRING_SCREEN_ROW);
00046 
00047         return 1;
00048     }
00049 
00050     //get col
00051     if(!(param = _tcschr(param,_T(' '))))
00052     {
00053         error_req_param_missing ();
00054         return 1;
00055     }
00056 
00057     while(_istspace(*param))
00058         param++;
00059 
00060     if(!(*param))
00061     {
00062         error_req_param_missing ();
00063         return 1;
00064     }
00065 
00066     x = _ttoi(param);
00067     if (x<0 || x>(maxx-1))
00068     {
00069         ConErrResPuts(STRING_SCREEN_COL);
00070         return 1;
00071     }
00072 
00073     //get text
00074     if(!(param = _tcschr(param,_T(' '))))
00075     {
00076         bSkipText = TRUE;
00077     }
00078     else
00079     {
00080         while(_istspace(*param))
00081             param++;
00082 
00083         if(!(*param))
00084         {
00085             bSkipText = TRUE;
00086         }
00087     }
00088 
00089     bIgnoreEcho = TRUE;
00090 
00091     if(bSkipText)
00092         x=0;
00093 
00094 
00095     SetCursorXY(x,y);
00096 
00097     if(!(bSkipText))
00098         ConOutPuts(param);
00099 
00100     return 0;
00101 }
00102 
00103 #endif /* INCLUDE_CMD_SCREEN */

Generated on Sun May 27 2012 04:18:15 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.