Added binary and unicode file i/o support to msvcrt.
[reactos.git] / reactos / lib / msvcrt / conio / getch.c
index 2378551..59d1803 100644 (file)
 
 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);
-
-  return c;
+    if (c == 10)
+        c = 13;
+    putchar(c);
+    return c;
 }
 
 #if 0