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
d5240f13
Commit
d5240f13
authored
Apr 03, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mask off unsupported attributes in _lcreat (bug reported by Andreas Mohr).
Moved _lcreat16_uniq to int21.c
parent
734247b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
22 deletions
+16
-22
file.c
files/file.c
+5
-16
file.h
include/file.h
+0
-1
int21.c
msdos/int21.c
+11
-5
No files found.
files/file.c
View file @
d5240f13
...
...
@@ -1196,32 +1196,21 @@ UINT16 WINAPI _lread16( HFILE16 hFile, LPVOID buffer, UINT16 count )
*/
HFILE16
WINAPI
_lcreat16
(
LPCSTR
path
,
INT16
attr
)
{
TRACE
(
file
,
"%s %02x
\n
"
,
path
,
attr
);
return
FILE_AllocDosHandle
(
_lcreat
(
path
,
attr
)
);
}
/***********************************************************************
* _lcreat
32
(KERNEL32.593)
* _lcreat (KERNEL32.593)
*/
HFILE
WINAPI
_lcreat
(
LPCSTR
path
,
INT
attr
)
{
/* Mask off all flags not explicitly allowed by the doc */
attr
&=
FILE_ATTRIBUTE_READONLY
|
FILE_ATTRIBUTE_HIDDEN
|
FILE_ATTRIBUTE_SYSTEM
;
TRACE
(
file
,
"%s %02x
\n
"
,
path
,
attr
);
return
CreateFileA
(
path
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
CREATE_ALWAYS
,
attr
,
-
1
);
}
/***********************************************************************
* _lcreat16_uniq (Not a Windows API)
*/
HFILE16
_lcreat16_uniq
(
LPCSTR
path
,
INT
attr
)
{
TRACE
(
file
,
"%s %02x
\n
"
,
path
,
attr
);
return
FILE_AllocDosHandle
(
CreateFileA
(
path
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
CREATE_NEW
,
attr
,
-
1
));
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
CREATE_ALWAYS
,
attr
,
-
1
);
}
...
...
include/file.h
View file @
d5240f13
...
...
@@ -48,7 +48,6 @@ extern int FILE_munmap( LPVOID start, DWORD size_high, DWORD size_low );
extern
HFILE16
FILE_AllocDosHandle
(
HANDLE
handle
);
extern
BOOL
FILE_InitProcessDosHandles
(
void
);
extern
HANDLE
FILE_GetHandle
(
HFILE16
hfile
);
extern
HFILE16
_lcreat16_uniq
(
LPCSTR
path
,
INT
attr
);
/* files/directory.c */
extern
int
DIR_Init
(
void
);
...
...
msdos/int21.c
View file @
d5240f13
...
...
@@ -429,6 +429,14 @@ static BOOL INT21_CreateFile( CONTEXT *context )
return
(
AX_reg
(
context
)
==
(
WORD
)
HFILE_ERROR16
);
}
static
HFILE16
_lcreat16_uniq
(
LPCSTR
path
,
INT
attr
)
{
/* Mask off all flags not explicitly allowed by the doc */
attr
&=
FILE_ATTRIBUTE_READONLY
|
FILE_ATTRIBUTE_HIDDEN
|
FILE_ATTRIBUTE_SYSTEM
;
return
FILE_AllocDosHandle
(
CreateFileA
(
path
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
CREATE_NEW
,
attr
,
-
1
));
}
static
void
OpenExistingFile
(
CONTEXT
*
context
)
{
...
...
@@ -1524,9 +1532,7 @@ void WINAPI DOS3Call( CONTEXT *context )
case
0x3c
:
/* "CREAT" - CREATE OR TRUNCATE FILE */
TRACE
(
int21
,
"CREAT flag 0x%02x %s
\n
"
,
CX_reg
(
context
),
(
LPCSTR
)
CTX_SEG_OFF_TO_LIN
(
context
,
DS_reg
(
context
),
EDX_reg
(
context
)));
AX_reg
(
context
)
=
_lcreat16
(
CTX_SEG_OFF_TO_LIN
(
context
,
DS_reg
(
context
),
EDX_reg
(
context
)
),
CX_reg
(
context
)
);
bSetDOSExtendedError
=
(
AX_reg
(
context
)
==
(
WORD
)
HFILE_ERROR16
);
bSetDOSExtendedError
=
INT21_CreateFile
(
context
);
break
;
case
0x3d
:
/* "OPEN" - OPEN EXISTING FILE */
...
...
@@ -1973,8 +1979,8 @@ void WINAPI DOS3Call( CONTEXT *context )
TRACE
(
int21
,
"CREATE NEW FILE 0x%02x for %s
\n
"
,
CX_reg
(
context
),
(
LPCSTR
)
CTX_SEG_OFF_TO_LIN
(
context
,
DS_reg
(
context
),
EDX_reg
(
context
)));
bSetDOSExtendedError
=
((
AX_reg
(
context
)
=
_lcreat16_uniq
(
CTX_SEG_OFF_TO_LIN
(
context
,
DS_reg
(
context
),
EDX_reg
(
context
)),
0
))
==
(
WORD
)
HFILE_ERROR16
);
_lcreat16_uniq
(
CTX_SEG_OFF_TO_LIN
(
context
,
DS_reg
(
context
),
EDX_reg
(
context
)),
CX_reg
(
context
)
))
==
(
WORD
)
HFILE_ERROR16
);
break
;
case
0x5d
:
/* NETWORK */
...
...
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