Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
11dee2b1
Commit
11dee2b1
authored
Apr 16, 2000
by
Uwe Bonnes
Committed by
Alexandre Julliard
Apr 16, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fgets: Don't swallow \n, treat EOF
feof: Crude implementation signal: Return error
parent
fbca8fe5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
crtdll_main.c
dlls/crtdll/crtdll_main.c
+20
-5
No files found.
dlls/crtdll/crtdll_main.c
View file @
11dee2b1
...
...
@@ -5,7 +5,7 @@
*
* Copyright 1996,1998 Marcus Meissner
* Copyright 1996 Jukka Iivonen
* Copyright 1997 Uwe Bonnes
* Copyright 1997
,2000
Uwe Bonnes
*/
/*
...
...
@@ -19,6 +19,8 @@ Unresolved issues Uwe Bonnes 970904:
AJ 990101:
- needs a proper stdio emulation based on Win32 file handles
- should set CRTDLL errno from GetLastError() in every function
UB 000416:
- probably not thread safe
*/
/* NOTE: This file also implements the wcs* functions. They _ARE_ in
...
...
@@ -845,7 +847,11 @@ CHAR* __cdecl CRTDLL_fgets( LPSTR s, INT size, CRTDLL_FILE *file )
if
(
--
size
<=
0
)
break
;
*
s
++
=
(
char
)
cc
;
}
if
((
cc
==
EOF
)
&&
(
s
==
buf_start
))
/* If nothing read, return 0*/
return
0
;
if
(
cc
==
'\n'
)
if
(
--
size
>
0
)
*
s
++
=
'\n'
;
*
s
=
'\0'
;
TRACE
(
"got '%s'
\n
"
,
buf_start
);
...
...
@@ -1258,11 +1264,19 @@ INT __cdecl CRTDLL__close(HFILE fd)
/*********************************************************************
* feof (CRTDLL.363)
* FIXME: Care for large files
* FIXME: Check errors
*/
INT
__cdecl
CRTDLL_feof
(
CRTDLL_FILE
*
file
)
{
FIXME
(
"stub
\n
"
);
return
0
;
DWORD
curpos
=
SetFilePointer
(
file
->
handle
,
0
,
NULL
,
SEEK_CUR
);
DWORD
endpos
=
SetFilePointer
(
file
->
handle
,
0
,
NULL
,
FILE_END
);
if
(
curpos
==
endpos
)
return
TRUE
;
else
SetFilePointer
(
file
->
handle
,
curpos
,
0
,
FILE_BEGIN
);
return
FALSE
;
}
/*********************************************************************
...
...
@@ -1715,9 +1729,10 @@ typedef VOID (*sig_handler_type)(VOID);
/*********************************************************************
* signal (CRTDLL.455)
*/
VOID
__cdecl
CRTDLL_signal
(
int
sig
,
sig_handler_type
ptr
)
void
*
__cdecl
CRTDLL_signal
(
int
sig
,
sig_handler_type
ptr
)
{
FIXME
(
"(%d %p):stub.
\n
"
,
sig
,
ptr
);
return
(
void
*
)
-
1
;
}
/*********************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment