update for HEAD-2003021201
[reactos.git] / lib / msvcrt / conio / getch.c
index 15d2eb6..59d1803 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * COPYRIGHT:   See COPYING in the top level directory
  * PROJECT:     ReactOS system libraries
- * FILE:        lib/crtdll/conio/getch.c
+ * FILE:        lib/msvcrt/conio/getch.c
  * PURPOSE:     Writes a character to stdout
  * PROGRAMER:   Boudewijn Dekker
  * UPDATE HISTORY:
 
 int _getch(void)
 {
-  DWORD  NumberOfCharsRead = 0;
-  char c;
-
-  if (char_avail)
-    {
-      c = ungot_char;
-      char_avail = 0;
-    }
-  else
-    {
-      ReadConsoleA(_get_osfhandle(stdin->_file),
-                  &c,
-                  1,
-                  &NumberOfCharsRead,
-                  NULL);
+    DWORD  NumberOfCharsRead = 0;
+    char c;
+    if (char_avail) {
+        c = ungot_char;
+        char_avail = 0;
+    } else {
+        ReadConsoleA(_get_osfhandle(stdin->_file),
+                            &c,
+                            1,
+                            &NumberOfCharsRead,
+                            NULL);
     }
-  if (c == 10)
-    c = 13;
-  putchar(c);
+    if (c == 10)
+        c = 13;
+    putchar(c);
+    return c;
+}
+
+#if 0
+int _getche(void)
+{
+    int c;
+
+    c = _getch();
+    _putch(c);
 
-  return c;
+    return c;
 }
+#endif