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
11776c1f
Commit
11776c1f
authored
Oct 13, 2000
by
Mike McCormack
Committed by
Alexandre Julliard
Oct 13, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved comm.c into kernel32.
parent
eec9cbbe
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
55 additions
and
70 deletions
+55
-70
Makefile.in
dlls/kernel/Makefile.in
+1
-0
comm.c
dlls/kernel/comm.c
+24
-31
kernel_main.c
dlls/kernel/kernel_main.c
+1
-1
dos_fs.c
files/dos_fs.c
+28
-2
comm.h
include/comm.h
+0
-30
msdos.h
include/msdos.h
+0
-4
Makefile.in
misc/Makefile.in
+0
-1
int11.c
msdos/int11.c
+1
-1
No files found.
dlls/kernel/Makefile.in
View file @
11776c1f
...
...
@@ -7,6 +7,7 @@ SOVERSION = 1.0
ALTNAMES
=
comm
kernel stress system toolhelp windebug win87em wprocs
C_SRCS
=
\
comm.c
\
debugger.c
\
format_msg.c
\
kernel_main.c
\
...
...
misc
/comm.c
→
dlls/kernel
/comm.c
View file @
11776c1f
...
...
@@ -52,7 +52,6 @@
#include <unistd.h>
#include "windef.h"
#include "comm.h"
#ifdef HAVE_SYS_MODEM_H
# include <sys/modem.h>
#endif
...
...
@@ -90,10 +89,31 @@ DEFAULT_DEBUG_CHANNEL(comm);
#define CMSPAR 0x40000000
/* stick parity */
#endif
struct
DosDeviceStruct
COM
[
MAX_PORTS
];
struct
DosDeviceStruct
LPT
[
MAX_PORTS
];
#define MAX_PORTS 9
struct
DosDeviceStruct
{
char
*
devicename
;
/* /dev/cua1 */
int
fd
;
int
suspended
;
int
unget
,
xmit
;
int
baudrate
;
int
evtchar
;
/* events */
int
commerror
,
eventmask
;
/* buffers */
char
*
inbuf
,
*
outbuf
;
unsigned
ibuf_size
,
ibuf_head
,
ibuf_tail
;
unsigned
obuf_size
,
obuf_head
,
obuf_tail
;
/* notifications */
int
wnd
,
n_read
,
n_write
;
HANDLE
s_read
,
s_write
;
};
static
struct
DosDeviceStruct
COM
[
MAX_PORTS
];
static
struct
DosDeviceStruct
LPT
[
MAX_PORTS
];
/* pointers to unknown(==undocumented) comm structure */
LPCVOID
*
unknown
[
MAX_PORTS
];
static
LPCVOID
*
unknown
[
MAX_PORTS
];
/* save terminal states */
static
struct
termios
m_stat
[
MAX_PORTS
];
...
...
@@ -2844,30 +2864,3 @@ BOOL WINAPI GetDefaultCommConfigW( LPCWSTR lpszName,LPCOMMCONFIG lpCC,
return
ret
;
}
/**************************************************************************
* COMM_CreatePort INTERNAL
*/
HANDLE
COMM_CreatePort
(
LPCSTR
name
,
DWORD
access
)
{
struct
create_serial_request
*
req
=
get_req_buffer
();
DWORD
r
;
char
devname
[
40
];
TRACE
(
"%s %lx
\n
"
,
name
,
access
);
PROFILE_GetWineIniString
(
"serialports"
,
name
,
""
,
devname
,
sizeof
devname
);
if
(
!
devname
[
0
])
return
0
;
TRACE
(
"opening %s as %s
\n
"
,
devname
,
name
);
req
->
handle
=
0
;
req
->
access
=
access
;
req
->
sharing
=
FILE_SHARE_READ
|
FILE_SHARE_WRITE
;
lstrcpynA
(
req
->
name
,
devname
,
server_remaining
(
req
->
name
)
);
SetLastError
(
0
);
r
=
server_call
(
REQ_CREATE_SERIAL
);
TRACE
(
"create_port_request return %08lX handle = %08X
\n
"
,
r
,
req
->
handle
);
return
req
->
handle
;
}
dlls/kernel/kernel_main.c
View file @
11776c1f
...
...
@@ -10,13 +10,13 @@
#include "neexe.h"
#include "module.h"
#include "task.h"
#include "comm.h"
#include "selectors.h"
#include "miscemu.h"
#include "global.h"
extern
void
CODEPAGE_Init
(
void
);
extern
BOOL
THUNK_Init
(
void
);
extern
void
COMM_Init
(
void
);
/***********************************************************************
...
...
files/dos_fs.c
View file @
11776c1f
...
...
@@ -29,7 +29,6 @@
#include "winerror.h"
#include "drive.h"
#include "file.h"
#include "comm.h"
#include "heap.h"
#include "msdos.h"
#include "syslevel.h"
...
...
@@ -694,6 +693,33 @@ const DOS_DEVICE *DOSFS_GetDeviceByHandle( HFILE hFile )
}
/**************************************************************************
* DOSFS_CreateCommPort
*/
static
HANDLE
DOSFS_CreateCommPort
(
LPCSTR
name
,
DWORD
access
)
{
struct
create_serial_request
*
req
=
get_req_buffer
();
DWORD
r
;
char
devname
[
40
];
TRACE
(
"%s %lx
\n
"
,
name
,
access
);
PROFILE_GetWineIniString
(
"serialports"
,
name
,
""
,
devname
,
sizeof
devname
);
if
(
!
devname
[
0
])
return
0
;
TRACE
(
"opening %s as %s
\n
"
,
devname
,
name
);
req
->
handle
=
0
;
req
->
access
=
access
;
req
->
sharing
=
FILE_SHARE_READ
|
FILE_SHARE_WRITE
;
lstrcpynA
(
req
->
name
,
devname
,
server_remaining
(
req
->
name
)
);
SetLastError
(
0
);
r
=
server_call
(
REQ_CREATE_SERIAL
);
TRACE
(
"create_port_request return %08lX handle = %08X
\n
"
,
r
,
req
->
handle
);
return
req
->
handle
;
}
/***********************************************************************
* DOSFS_OpenDevice
*
...
...
@@ -746,7 +772,7 @@ HFILE DOSFS_OpenDevice( const char *name, DWORD access )
return
FILE_CreateDevice
(
i
,
access
,
NULL
);
}
if
(
(
handle
=
COMM_Create
Port
(
name
,
access
))
)
if
(
(
handle
=
DOSFS_CreateComm
Port
(
name
,
access
))
)
return
handle
;
FIXME
(
"device open %s not supported (yet)
\n
"
,
DOSFS_Devices
[
i
].
name
);
...
...
include/comm.h
deleted
100644 → 0
View file @
eec9cbbe
#ifndef __WINE_COMM_H
#define __WINE_COMM_H
#include "windef.h"
#include "winbase.h"
#define MAX_PORTS 9
struct
DosDeviceStruct
{
char
*
devicename
;
/* /dev/cua1 */
int
fd
;
int
suspended
;
int
unget
,
xmit
;
int
baudrate
;
int
evtchar
;
/* events */
int
commerror
,
eventmask
;
/* buffers */
char
*
inbuf
,
*
outbuf
;
unsigned
ibuf_size
,
ibuf_head
,
ibuf_tail
;
unsigned
obuf_size
,
obuf_head
,
obuf_tail
;
/* notifications */
int
wnd
,
n_read
,
n_write
;
HANDLE
s_read
,
s_write
;
};
extern
void
COMM_Init
(
void
);
extern
HANDLE
COMM_CreatePort
(
LPCSTR
name
,
DWORD
access
);
#endif
/* __WINE_COMM_H */
include/msdos.h
View file @
11776c1f
...
...
@@ -2,7 +2,6 @@
#define __WINE_MSDOS_H
#include "winnt.h"
#include "comm.h"
struct
fcb
{
BYTE
drive
;
...
...
@@ -100,9 +99,6 @@ typedef struct _DOS_LISTOFLISTS
#define MAX_DOS_DRIVES 26
extern
struct
DosDeviceStruct
COM
[
MAX_PORTS
];
extern
struct
DosDeviceStruct
LPT
[
MAX_PORTS
];
#define setword(a,b) do { *(BYTE*)(a) = (b) & 0xff; \
*((BYTE*)((a)+1)) = ((b)>>8) & 0xff;\
} while(0)
...
...
misc/Makefile.in
View file @
11776c1f
...
...
@@ -8,7 +8,6 @@ MODULE = misc
C_SRCS
=
\
cdrom.c
\
comm.c
\
cpu.c
\
debugstr.c
\
error.c
\
...
...
msdos/int11.c
View file @
11776c1f
...
...
@@ -52,7 +52,7 @@ void WINAPI INT_Int11Handler( CONTEXT86 *context )
if
(
DRIVE_IsValid
(
1
))
diskdrives
++
;
if
(
diskdrives
)
diskdrives
--
;
for
(
x
=
0
;
x
!=
MAX_PORTS
;
x
++
)
for
(
x
=
0
;
x
<
9
;
x
++
)
{
char
temp
[
16
],
name
[
16
];
...
...
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