Ignore:
Timestamp:
Apr 10, 2003, 12:28:07 PM (22 years ago)
Author:
sandervl
Message:

PF: MSVCRT update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/msvcrt/console.c

    r9633 r10005  
    2929#include "mtdll.h"
    3030
     31#include <stdio.h>
     32#include <string.h>
     33
    3134#include "wine/debug.h"
    3235
     36
    3337WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
    34 
    3538
    3639
     
    7477 *              _cputs (MSVCRT.@)
    7578 */
    76 int _cputs(const char* str)
     79int MSVCRT__cputs(const char* str)
    7780{
    7881  DWORD count;
     
    9093 *              _getch (MSVCRT.@)
    9194 */
    92 int _getch(void)
     95int MSVCRT__getch(void)
    9396{
    9497  int retval = MSVCRT_EOF;
     
    135138 *              _putch (MSVCRT.@)
    136139 */
    137 int _putch(int c)
     140int MSVCRT__putch(int c)
    138141{
    139142  int retval = MSVCRT_EOF;
     
    149152 *              _getche (MSVCRT.@)
    150153 */
    151 int _getche(void)
     154int MSVCRT__getche(void)
    152155{
    153156  int retval;
    154157  LOCK_CONSOLE;
    155   retval = _getch();
     158  retval = MSVCRT__getch();
    156159  if (retval != MSVCRT_EOF)
    157     retval = _putch(retval);
     160    retval = MSVCRT__putch(retval);
    158161  UNLOCK_CONSOLE;
    159162  return retval;
     
    163166 *              _cgets (MSVCRT.@)
    164167 */
    165 char* _cgets(char* str)
     168char* MSVCRT__cgets(char* str)
    166169{
    167170  char *buf = str + 2;
    168171  int c;
    169172  str[1] = 0; /* Length */
     173  dprintf(("MSVCRT: _cgets")); 
    170174  /* FIXME: No editing of string supported */
    171175  LOCK_CONSOLE;
    172176  do
    173177  {
    174     if (str[1] >= str[0] || (str[1]++, c = _getche()) == MSVCRT_EOF || c == '\n')
     178    if (str[1] >= str[0] || (str[1]++, c = MSVCRT__getche()) == MSVCRT_EOF || c == '\n')
    175179      break;
    176180    *buf++ = c & 0xff;
     
    184188 *              _ungetch (MSVCRT.@)
    185189 */
    186 int _ungetch(int c)
     190int MSVCRT__ungetch(int c)
    187191{
    188192  int retval = MSVCRT_EOF;
     
    197201 *              _kbhit (MSVCRT.@)
    198202 */
    199 int _kbhit(void)
     203int MSVCRT__kbhit(void)
    200204{
    201205  int retval = 0;
    202 
     206  dprintf(("MSVCRT: kbhit()"));
    203207  LOCK_CONSOLE;
    204208  if (__MSVCRT_console_buffer != MSVCRT_EOF)
     
    235239 *              _cprintf (MSVCRT.@)
    236240 */
    237 int _cprintf(const char* format, ...)
     241int MSVCRT__cprintf(const char* format, ...)
    238242{
    239243  char buf[2048], *mem = buf;
    240244  int written, resize = sizeof(buf), retval;
    241245  va_list valist;
    242 
     246  dprintf(("MSVCRT: _cprintf %s",format));
    243247  va_start( valist, format );
    244248  /* There are two conventions for snprintf failing:
     
    259263  va_end(valist);
    260264  LOCK_CONSOLE;
    261   retval = _cputs( mem );
     265  retval = MSVCRT__cputs( mem );
    262266  UNLOCK_CONSOLE;
    263267  if (mem != buf)
Note: See TracChangeset for help on using the changeset viewer.