ANSI C fixes.
Removed warnings.
Made the include files self-sufficient.
Some Solaris fixes.
diff --git a/misc/comm.c b/misc/comm.c
index b8cee05..73b67db 100644
--- a/misc/comm.c
+++ b/misc/comm.c
@@ -145,21 +145,7 @@
}
-struct DosDeviceStruct *GetDeviceStruct_fd(int fd)
-{
- int x;
-
- for (x=0; x!=MAX_PORTS; x++) {
- if (COM[x].fd == fd)
- return &COM[x];
- if (LPT[x].fd == fd)
- return &LPT[x];
- }
-
- return NULL;
-}
-
-struct DosDeviceStruct *GetDeviceStruct(int fd)
+static struct DosDeviceStruct *GetDeviceStruct(int fd)
{
if ((fd&0x7F)<=MAX_PORTS) {
if (!(fd&FLAG_LPT)) {
@@ -174,7 +160,7 @@
return NULL;
}
-int GetCommPort_fd(int fd)
+static int GetCommPort_fd(int fd)
{
int x;
@@ -186,17 +172,17 @@
return -1;
}
-int ValidCOMPort(int x)
+static int ValidCOMPort(int x)
{
return(x < MAX_PORTS ? (int) COM[x].devicename : 0);
}
-int ValidLPTPort(int x)
+static int ValidLPTPort(int x)
{
return(x < MAX_PORTS ? (int) LPT[x].devicename : 0);
}
-int WinError(void)
+static int WinError(void)
{
TRACE(comm, "errno = %d\n", errno);
switch (errno) {