Ignore:
Timestamp:
Oct 20, 2000, 1:46:48 PM (25 years ago)
Author:
sandervl
Message:

basic support for VIO console command line apps added + FormatMessage addition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/conbuffer.cpp

    r4467 r4502  
    1 /* $Id: conbuffer.cpp,v 1.12 2000-10-09 17:47:21 sandervl Exp $ */
     1/* $Id: conbuffer.cpp,v 1.13 2000-10-20 11:46:44 sandervl Exp $ */
    22
    33/*
     
    6262#define  INCL_VIO
    6363#define  INCL_AVIO
    64 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
     64#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    6565
    6666#include <win32api.h>
     
    7373#include "HMDevice.h"
    7474#include "ConBuffer.H"
     75#include "console.h"
    7576#include "Console2.h"
    7677#include <heapstring.h>
    7778
    78 #define DBG_LOCALLOG    DBG_conbuffer
     79#define DBG_LOCALLOG    DBG_conbuffer
    7980#include "dbglocal.h"
    8081
     
    256257                      /* check if we're called with non-existing line buffer */
    257258  if (pConsoleBuffer->ppszLine == NULL) {
    258         SetLastError(ERROR_OUTOFMEMORY_W);
    259         return FALSE;
     259    SetLastError(ERROR_OUTOFMEMORY_W);
     260    return FALSE;
    260261  }
    261262  for (ulCounter = 0;
     
    22662267  pConsoleBuffer->coordBufferSize.X = coordSize.X;
    22672268  pConsoleBuffer->coordBufferSize.Y = coordSize.Y;
    2268   pConsoleBuffer->coordCursorPosition.X = 0;
    2269   pConsoleBuffer->coordCursorPosition.Y = 0;
     2269  if (flVioConsole) {
     2270        USHORT Row = 0;
     2271        USHORT Column = 0;
     2272        APIRET rc;
     2273
     2274        rc = VioGetCurPos(&Row, &Column, 0);
     2275        dprintf(("Current cursor position (%d,%d)", Column, Row));
     2276        pConsoleBuffer->coordCursorPosition.Y = Row;
     2277        pConsoleBuffer->coordCursorPosition.X = Column;
     2278  }
     2279  else {
     2280        pConsoleBuffer->coordCursorPosition.X = 0;
     2281        pConsoleBuffer->coordCursorPosition.Y = 0;
     2282  }
    22702283
    22712284  /* @@@PH to be changed ! */
Note: See TracChangeset for help on using the changeset viewer.