Changeset 10005 for trunk/src/msvcrt/console.c
- Timestamp:
- Apr 10, 2003, 12:28:07 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/msvcrt/console.c
r9633 r10005 29 29 #include "mtdll.h" 30 30 31 #include <stdio.h> 32 #include <string.h> 33 31 34 #include "wine/debug.h" 32 35 36 33 37 WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); 34 35 38 36 39 … … 74 77 * _cputs (MSVCRT.@) 75 78 */ 76 int _cputs(const char* str)79 int MSVCRT__cputs(const char* str) 77 80 { 78 81 DWORD count; … … 90 93 * _getch (MSVCRT.@) 91 94 */ 92 int _getch(void)95 int MSVCRT__getch(void) 93 96 { 94 97 int retval = MSVCRT_EOF; … … 135 138 * _putch (MSVCRT.@) 136 139 */ 137 int _putch(int c)140 int MSVCRT__putch(int c) 138 141 { 139 142 int retval = MSVCRT_EOF; … … 149 152 * _getche (MSVCRT.@) 150 153 */ 151 int _getche(void)154 int MSVCRT__getche(void) 152 155 { 153 156 int retval; 154 157 LOCK_CONSOLE; 155 retval = _getch();158 retval = MSVCRT__getch(); 156 159 if (retval != MSVCRT_EOF) 157 retval = _putch(retval);160 retval = MSVCRT__putch(retval); 158 161 UNLOCK_CONSOLE; 159 162 return retval; … … 163 166 * _cgets (MSVCRT.@) 164 167 */ 165 char* _cgets(char* str)168 char* MSVCRT__cgets(char* str) 166 169 { 167 170 char *buf = str + 2; 168 171 int c; 169 172 str[1] = 0; /* Length */ 173 dprintf(("MSVCRT: _cgets")); 170 174 /* FIXME: No editing of string supported */ 171 175 LOCK_CONSOLE; 172 176 do 173 177 { 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') 175 179 break; 176 180 *buf++ = c & 0xff; … … 184 188 * _ungetch (MSVCRT.@) 185 189 */ 186 int _ungetch(int c)190 int MSVCRT__ungetch(int c) 187 191 { 188 192 int retval = MSVCRT_EOF; … … 197 201 * _kbhit (MSVCRT.@) 198 202 */ 199 int _kbhit(void)203 int MSVCRT__kbhit(void) 200 204 { 201 205 int retval = 0; 202 206 dprintf(("MSVCRT: kbhit()")); 203 207 LOCK_CONSOLE; 204 208 if (__MSVCRT_console_buffer != MSVCRT_EOF) … … 235 239 * _cprintf (MSVCRT.@) 236 240 */ 237 int _cprintf(const char* format, ...)241 int MSVCRT__cprintf(const char* format, ...) 238 242 { 239 243 char buf[2048], *mem = buf; 240 244 int written, resize = sizeof(buf), retval; 241 245 va_list valist; 242 246 dprintf(("MSVCRT: _cprintf %s",format)); 243 247 va_start( valist, format ); 244 248 /* There are two conventions for snprintf failing: … … 259 263 va_end(valist); 260 264 LOCK_CONSOLE; 261 retval = _cputs( mem );265 retval = MSVCRT__cputs( mem ); 262 266 UNLOCK_CONSOLE; 263 267 if (mem != buf)
Note:
See TracChangeset
for help on using the changeset viewer.