update for HEAD-2003021201
[reactos.git] / lib / msvcrt / stdio / fdopen.c
index a9f70cc..3005552 100644 (file)
@@ -1,11 +1,12 @@
 #include <msvcrt/stdio.h>
 #include <msvcrt/internal/file.h>
 
-FILE * __alloc_file(void);
+FILE* __alloc_file(void);
 
-FILE *_fdopen(int handle, char *mode)
+
+FILE* _fdopen(int handle, char* mode)
 {
-  FILE *file;
+  FILEfile;
   int rw;
 
   if (handle == 0)
@@ -51,52 +52,3 @@ FILE *_fdopen(int handle, char *mode)
 
   return file;
 }
-
-FILE *_wfdopen(int handle, wchar_t *mode)
-{
-  FILE *file;
-  int rw;
-
-  if (handle == 0)
-    return stdin;
-
-  if (handle == 1)
-    return stdout;
-
-  if (handle == 2)
-    return stderr;
-
-  if (handle == 3)
-    return stdaux;
-
-  if (handle == 4)
-    return stdprn;
-
-  file = __alloc_file();
-  if (file == NULL)
-    return NULL;
-  file->_file = handle;
-
-  rw = (mode[1] == L'+') || (mode[1] && (mode[2] == L'+'));
-
-  if (*mode == L'a')
-    _lseek(handle, 0, SEEK_END);
-
-  file->_cnt = 0;
-  file->_file = handle;
-  file->_bufsiz = 0;
-
-// The mode of the stream must be compatible with the mode of the file descriptor.
-// this should be checked.
-
-  if (rw)
-    file->_flag = _IOREAD | _IOWRT;
-  else if (*mode == L'r')
-    file->_flag = _IOREAD;
-  else
-    file->_flag = _IOWRT;
-
-  file->_base = file->_ptr = NULL;
-
-  return file;
-}