projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
z8kgen: temp file to generate z8k-opc.h from
[deliverable/binutils-gdb.git]
/
gdb
/
ser-go32.c
diff --git
a/gdb/ser-go32.c
b/gdb/ser-go32.c
index 2a493bc53d80a8a3b84836df9e8138179e7c20da..3e446aa4f889c84b3e56ad244b876de1768772ed 100644
(file)
--- a/
gdb/ser-go32.c
+++ b/
gdb/ser-go32.c
@@
-1,7
+1,5
@@
-/* Remote serial interface for GO32
-
- Copyright 1992
- Free Software Foundation, Inc.
+/* Remote serial interface for GO32, for GDB, the GNU Debugger.
+ Copyright 1992 Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
@@
-19,12
+17,13
@@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-#include <stdio.h>
-#include <sys/dos.h>
+/* This file shows most of the obvious problems of code written for
+ the IBM PC. FIXME. -- gnu@cygnus.com, Sep92 */
#include "defs.h"
#include "serial.h"
#include "defs.h"
#include "serial.h"
+#include <sys/dos.h>
#define SIGNATURE 0x4154
#define VERSION 1
#define SIGNATURE 0x4154
#define VERSION 1
@@
-61,13
+60,17
@@
static int iov;
#define com_lsr iov+5
#define com_msr iov+6
#define com_lsr iov+5
#define com_msr iov+6
+static int fd;
+
+
#if MONO
#include <sys/pc.h>
static int mono_pos=0;
#define mono_rx 0x07
#define mono_tx 0x70
#if MONO
#include <sys/pc.h>
static int mono_pos=0;
#define mono_rx 0x07
#define mono_tx 0x70
-void mono_put(char byte, char attr)
+void
+mono_put(char byte, char attr)
{
ScreenSecondary[320+mono_pos+80] = 0x0720;
ScreenSecondary[320+mono_pos] = (attr<<8) | (byte&0xff);
{
ScreenSecondary[320+mono_pos+80] = 0x0720;
ScreenSecondary[320+mono_pos] = (attr<<8) | (byte&0xff);
@@
-76,7
+79,8
@@
void mono_put(char byte, char attr)
#endif
#endif
-static char far *aptr(short p)
+static char far *
+aptr(short p)
{
#ifdef __GNUC__
return (char *)((unsigned)async - OFFSET + p);
{
#ifdef __GNUC__
return (char *)((unsigned)async - OFFSET + p);
@@
-85,7
+89,8
@@
static char far *aptr(short p)
#endif
}
#endif
}
-static ASYNC_STRUCT far *getivec(int which)
+static ASYNC_STRUCT far *
+getivec(int which)
{
ASYNC_STRUCT far *a;
{
ASYNC_STRUCT far *a;
@@
-104,7
+109,8
@@
static ASYNC_STRUCT far *getivec(int which)
return a;
}
return a;
}
-int dos_async_init()
+int
+dos_async_init()
{
int i;
ASYNC_STRUCT far *a1;
{
int i;
ASYNC_STRUCT far *a1;
@@
-149,6
+155,7
@@
C> gdb \n");
return 2;
}
return 2;
}
+void
dos_async_tx(char c)
{
dprintf("dos_async_tx: enter %x - with IOV %x", c, com_lsr);
dos_async_tx(char c)
{
dprintf("dos_async_tx: enter %x - with IOV %x", c, com_lsr);
@@
-161,12
+168,14
@@
dos_async_tx(char c)
dprintf("exit\n");
}
dprintf("exit\n");
}
-int dos_async_ready()
+int
+dos_async_ready()
{
return (async->getp != async->putp);
}
{
return (async->getp != async->putp);
}
-int dos_async_rx()
+int
+dos_async_rx()
{
char rv;
dprintf("dos_async_rx: enter - ");
{
char rv;
dprintf("dos_async_rx: enter - ");
@@
-189,12
+198,14
@@
int dos_async_rx()
return rv;
}
return rv;
}
-int dos_kb_ready()
+int
+dos_kb_ready()
{
return (peek(0x40,0x1a) != peek(0x40,0x1c));
}
{
return (peek(0x40,0x1a) != peek(0x40,0x1c));
}
-int dos_kb_rx()
+int
+dos_kb_rx()
{
#ifdef __GNUC__
return getkey();
{
#ifdef __GNUC__
return getkey();
@@
-203,7
+214,8
@@
int dos_kb_rx()
#endif
}
#endif
}
-int dosasync_read(int fd, char *buffer, int length, int timeout)
+int
+dosasync_read (int fd, char *buffer, int length, int timeout)
{
long now, then;
int l = length;
{
long now, then;
int l = length;
@@
-230,7
+242,8
@@
int dosasync_read(int fd, char *buffer, int length, int timeout)
return length;
}
return length;
}
-int dosasync_write(int fd, CONST char *buffer, int length)
+int
+dosasync_write(int fd, const char *buffer, int length)
{
int l = length;
while (l--)
{
int l = length;
while (l--)
@@
-240,7
+253,8
@@
int dosasync_write(int fd, CONST char *buffer, int length)
-char *strlwr(char *s)
+char *
+strlwr(char *s)
{
char *p = s;
while (*s)
{
char *p = s;
while (*s)
@@
-252,30
+266,27
@@
char *strlwr(char *s)
return p;
}
return p;
}
-sigsetmask() {
+sigsetmask()
+{
}
}
-
-
-
-static int fd;
-
-CONST char *
-DEFUN_VOID(serial_default_name)
+
\f
+const char *
+serial_default_name ()
{
return "com1";
}
void
{
return "com1";
}
void
-
DEFUN_VOID(serial_raw
)
+
serial_raw (
)
{
{
-/* Always in raw mode */
+
/* Always in raw mode */
}
int
}
int
-DEFUN(serial_open,(name),
- CONST char *name)
+serial_open (name)
+ const char *name;
{
fd = dos_async_init();
if (fd) return 1;
{
fd = dos_async_init();
if (fd) return 1;
@@
-283,12
+294,12
@@
DEFUN(serial_open,(name),
}
int
}
int
-DEFUN(serial_timedreadchar,(to, ok),
- int to
AND
- int *ok
)
+serial_timedreadchar (to, ok)
+ int to
;
+ int *ok
;
{
char buf;
{
char buf;
- if (
dosasync_read(fd, &buf, 1, to))
+ if (dosasync_read(fd, &buf, 1, to))
{
*ok = 1;
}
{
*ok = 1;
}
@@
-300,31
+311,28
@@
DEFUN(serial_timedreadchar,(to, ok),
}
int
}
int
-DEFUN(serial_setbaudrate,(rate),
- int rate
)
+serial_setbaudrate (rate)
+ int rate
;
{
return 0;
}
int
{
return 0;
}
int
-DEFUN(serial_nextbaudrate,(rate),
- int rate
)
+serial_nextbaudrate (rate)
+ int rate
;
{
return 0;
}
int
{
return 0;
}
int
-DEFUN(serial_write,(str, len),
- CONST char *str AND
- int len
)
+serial_write (str, len)
+ const char *str;
+ int len
;
{
dosasync_write(fd, str, len);
}
int
{
dosasync_write(fd, str, len);
}
int
-
DEFUN_VOID(serial_close
)
+
serial_close (
)
{
{
-
-
}
}
-
This page took
0.02558 seconds
and
4
git commands to generate.