Commit Graph

84 Commits

Author SHA1 Message Date
759263042e Return ENOENT rather than EBADF from MSVCRT_fopen() when file doesn't
exist.
2005-05-05 16:48:28 +00:00
Hans Leidekker a19bf290f0 Implement and test _chsize. 2005-03-31 19:06:10 +00:00
Jason Edmeades 9b527d4953 Make msvcrt printf use the internal routines which understand %S and
%C.
2005-03-07 11:00:46 +00:00
Francois Gouget fbb3343547 Assorted spelling fixes. 2005-03-02 13:53:50 +00:00
Bill Medland 1953a1ed2d Only report the unsupported flags.
Keep quiet about hints.
2005-01-10 14:28:21 +00:00
Lionel Ulmer 66725349d5 Handle buffering in fgetpos / fsetpos. 2005-01-04 20:37:54 +00:00
Juan Lang 9b6c0eff37 - make file functions (mostly) thread-safe
- update a couple traces
2004-12-14 11:59:43 +00:00
Rein Klazes 03d9cf286e - implement __pioinfo, __badioinfo and _adjust_fdiv
- remove all stubs of data item from the spec file, those actually may
  hide problems.
2004-12-10 15:28:25 +00:00
Juan Lang 1e23777ae5 - implement _dup, _dup2, and _pipe
- make max file descriptors 2048 to match MS
- increase max file streams to match
2004-12-09 16:51:26 +00:00
Juan Lang b100339e2f Flush file in fputc when character is '\n'. 2004-12-07 17:05:08 +00:00
Juan Lang 4120647ae7 Set st_mode bits in _fstati64. 2004-12-06 16:14:09 +00:00
Tony Lambregts 2dec525020 Fix up init_fp test for freopen. 2004-11-03 22:17:05 +00:00
Hans Leidekker 9ec800fd6d Prefix _fsopen with MSVCRT_ to avoid collision with MinGW header.
Typo fix.
2004-10-14 00:26:39 +00:00
Hans Leidekker fe442b21f7 Fix signed/unsigned comparison warnings. 2004-09-08 01:23:57 +00:00
Eric Pouech 0bfb1cbc6b - msvcrt: the file descriptors are now inherited between parent/child
processes
- kernel32.CreateProcess: make use of the *reserved2 fields for
  C-RunTime data inheritance
2004-09-03 01:05:30 +00:00
Dimitrie O. Paun 0377462460 Split the MSVCRT implementation headers from the public headers.
Fix some naming conventions aberrations.
Add tests to ensure consistency between the two sets of symbols.
2004-06-25 01:19:15 +00:00
Uwe Bonnes f7e9e5b788 Fixed typo. 2004-05-27 20:01:34 +00:00
Alexandre Julliard adc86dccaa Fixed copy/paste bug in previous change. 2004-05-13 00:23:25 +00:00
Eric Pouech bcc2a5c540 - rewrote the file code so that streams manage low level file desc
(the code was written the other way around)
- reworked the flag handling code (now the stream._flag is closer to
  what MS does)
- simplified temp files handling by using FILE_FLAG_DELETE_ON_CLOSE in
  CreateFile
- fixed a couple of bugs
2004-05-12 00:12:26 +00:00
Hans Leidekker 821f4775a3 - Prefix many more functions, types, structs, etc. with MSVCRT_.
- Correct prototypes for _memccpy()/_memicmp().
- "define before use" reordering in file.c.
- Use the new math.h/float.h.
2004-03-16 19:17:11 +00:00
Alexandre Julliard c042e13ef6 Fixed varargs handling in the scanf functions (spotted by Eric
Pouech).
2004-02-19 01:13:12 +00:00
Alfons Hoogervorst bfc4044511 Fix infinite loop in _flushall. 2004-02-09 20:49:34 +00:00
Alexandre Julliard dec198afe0 Implemented the remaining 64-bit file functions, and added a few other
functions and exported variables.
Removed the almost empty lconv.c file.
2004-01-13 05:45:05 +00:00
Francois Gouget 640cc3f3e1 Assorted spelling fixes. 2004-01-06 22:08:33 +00:00
Ulrich Czekalla 736d96b5b3 Duplicate stdin/stdout handles to avoid closing them when library is
unloaded.
2003-10-31 04:17:45 +00:00
Pavel Roskin 6d6d06a8dc Make MSVCRT__sopen() complain louder about unknown oflags, but not
about _O_WRONLY.
MSVCRT_fopen() should pass third argument to _open() because it may
set _O_CREAT.
2003-10-24 04:21:09 +00:00
Pavel Roskin 9661d05b4e MSVCRT_tmpnam(): complete rewrite. Use the same names as the native
version.  Use the caller-supplied buffer if possible.
2003-10-24 00:23:51 +00:00
Rolf Kalbermatter 76f13deb26 Use INVALID_FILE_ATTRIBUTES to test for failure of
GetFileAttributesA/W and not -1 or 0xFFFFFFFF.
2003-10-16 19:12:49 +00:00
Daniel Marmier f95be92d24 Fixed warnings with gcc option "-Wwrite-strings". 2003-10-15 03:35:54 +00:00
Uwe Bonnes 7b8b62e61a fget(w)s(): Don't drop characters when buffer is not large enough. 2003-10-07 05:22:04 +00:00
Uwe Bonnes 16fa009085 _write(): Don't fragment WriteFile() for TEXT mode write. 2003-10-07 04:01:28 +00:00
Uwe Bonnes 6fbcacbb92 _read(): In _O_TEXT mode make Readfile calls in chunks as big as
possible.
2003-10-07 03:33:58 +00:00
Alexandre Julliard 2470af6213 _tempnam and _wtempnam should not create the temp file (reported by
Wim Vanderbauwhede).
2003-09-27 02:45:39 +00:00
Alexandre Julliard e37c6e18d0 Fixed header dependencies to be fully compatible with the Windows
headers (with help from Dimitrie O. Paun).
2003-09-05 23:08:26 +00:00
Adam Gundy 9ea3c2d3ee _open_osfhandle is expected to take the absence of either _O_TEXT or
_O_BINARY to mean _O_BINARY.
2003-05-08 21:02:31 +00:00
Andreas Mohr 51c38cc729 Fix blatantly wrong SetFilePointer() calls. 2003-04-14 21:33:49 +00:00
Adam Gundy 2f5e5f3d29 MSVCRT_fclose() mustn't use the _flag field from the file structure
after _close() has been called.
When _open_osfhandle() is used by MFC's CStdioFile, it expects write
access even though it doesn't set the necessary flag bit.
2003-03-30 03:06:30 +00:00
Uwe Bonnes f540ea642e Rough implementation of _O_TEXT/_O_BINARY translation by doing single
byte read/writes in _O_TEXT mode and CR/LR handling.
fput/getwc must read multibyte characters in _O_TEXT.
Added test cases for _O_TEXT/_O_BINARY file handling and fgetws.
2003-02-19 22:09:33 +00:00
Dimitrie O. Paun 13098ea188 Create stubs for chsize, dup, and dup2. 2003-01-11 21:01:04 +00:00
Alexandre Julliard 5f31b32946 Use MSVCRT_wchar_t instead of WCHAR so that the implementation matches
the prototypes.
2002-12-19 04:21:30 +00:00
Alexandre Julliard 3f5ff2fba2 Avoid including other headers from the msvcrt headers, duplicate some
definitions instead like Windows does.
Always define wchar_t (suggested by Dimitrie O. Paun), and use wchar_t
everywhere instead of WCHAR to avoid depending on Windows headers.
2002-12-18 20:17:20 +00:00
Bill Currie c78902221f fdopen: don't rewind the file after creating the FILE* handle. Added
unit test for that.
2002-12-17 04:18:07 +00:00
Stefan Leichter a5d7fbfb10 Converted implementation of _lseek to _lseeki64, implemented _lseek by
calling _lseeki64.
2002-11-25 20:50:01 +00:00
Stefan Leichter b88a9d5399 Converted implementation of _stat and _fstat to _stati64 and
_fstati64.
Implemented _stat/_fstat by calling _stati64/_fstati64.
2002-11-25 02:44:34 +00:00
Michael Stefaniuc 789b4b4204 Compile the msvcrt dll with -DSTRICT. 2002-10-25 03:12:01 +00:00
Martin Wilck 94638aa276 MSVCRT needs a public errno.h file. 2002-09-17 18:32:53 +00:00
Martin Wilck 27a91c782e Fix MoveFileEx() flags in MSVCRT rename()/_wrename(). 2002-09-16 22:39:50 +00:00
Alexandre Julliard 1668870f38 Fixed warnings caused by new winternl.h. 2002-09-12 22:28:01 +00:00
Patrik Stridvall 9c1de6de30 Moved all the content of the DDK files ntdef.h and ntddk.h to
winternl.h.
2002-09-12 22:07:02 +00:00
Daniel Gudbjartsson 42c74d6454 Combined the implementation of all the scanf's in a single place.
Added implementations of fwscanf, swscanf, wscanf and sscanf.
Corrected the declaration of swscanf.
Added implementation of the l, h, L and w prefixes.
Added implementation of the c, C, s, S and n types.
2002-08-17 01:22:00 +00:00