diff options
author | John Gilmore <gnu@cygnus> | 1992-09-02 08:51:17 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1992-09-02 08:51:17 +0000 |
commit | b52373a2b12f6dfeda4d9b63b33458c8776c01ac (patch) | |
tree | a226394736904b7569d4ef79dede51b288a91cd8 /gdb/ser-termios.c | |
parent | e1313d24bc39a7854b88274d2a6700085d2723a4 (diff) | |
download | gdb-b52373a2b12f6dfeda4d9b63b33458c8776c01ac.zip gdb-b52373a2b12f6dfeda4d9b63b33458c8776c01ac.tar.gz gdb-b52373a2b12f6dfeda4d9b63b33458c8776c01ac.tar.bz2 |
* ser-termios.c, ser-go32.c: Remove DEFUN crap, clean up.
* serial.h (EXFUN): Remove all uses, convert to PARAMS.
* config/sun4os4.mh: Include ser-termios.o. FIXME, all .mh files
should include a ser-XXX.o module.
* dbxread.c (elfstab_build_psymtabs): Remove DEFUN crap.
* defs.h, i960-pinsn.c, remote-hms.c: Replace CONST with simple const.
* configure.in: Map unrecognized sun 68k's, sun sparcs, into
known suns in configure.in, rather than mapping them to unique
config files that happen to duplicate other config files.
* config/sun3.{mh,mt}: Remove (use identical sun3os4.*).
* config/sun4.{mh,mt}: Remove (use identical sun4os4.*).
Diffstat (limited to 'gdb/ser-termios.c')
-rw-r--r-- | gdb/ser-termios.c | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/gdb/ser-termios.c b/gdb/ser-termios.c index 3bf8f17..357c2e8 100644 --- a/gdb/ser-termios.c +++ b/gdb/ser-termios.c @@ -1,7 +1,5 @@ -/* Remote serial interface for OS's with termios - - Copyright 1992 - Free Software Foundation, Inc. +/* Remote serial interface for OS's with termios, for GDB. + Copyright 1992 Free Software Foundation, Inc. This file is part of GDB. @@ -25,26 +23,27 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <termios.h> #include <sys/time.h> +/* File descriptor used in termios routines to access serial line. */ static int desc; +/* Saved state about the terminal. */ +static struct termios otermios; +static int oflags; -CONST char * -DEFUN_VOID(serial_default_name) +const char * +serial_default_name () { return "/dev/ttya"; } void -DEFUN_VOID(serial_raw) +serial_raw () { /* Now happens inside of serial_open */ } -static struct termios otermios; -static int oflags; - void -DEFUN_VOID(serial_normal) +serial_normal () { fcntl(desc, oflags, 0); @@ -55,8 +54,8 @@ DEFUN_VOID(serial_normal) } int -DEFUN(serial_open,(name), - CONST char *name) +serial_open (name) + const char *name; { struct termios termios; @@ -88,9 +87,9 @@ DEFUN(serial_open,(name), } int -DEFUN(serial_timedreadchar,(timeout, ok), - int timeout AND - int *ok) +serial_timedreadchar (timeout, ok) + int timeout; + int *ok; { unsigned char buf; fd_set readfds; @@ -135,6 +134,7 @@ static struct {int rate, damn_b;} baudtab[] = { {9600, B9600}, {19200, B19200}, + {38400, B38400}, #if 0 {300, B300}, {1200, B1200}, @@ -145,8 +145,8 @@ static struct {int rate, damn_b;} baudtab[] = { }; static int -DEFUN(damn_b,(rate), - int rate) +damn_b (rate) + int rate; { int i; for (i = 0; baudtab[i].rate != -1; i++) @@ -160,7 +160,8 @@ DEFUN(damn_b,(rate), } int -DEFUN(serial_setbaudrate,(rate),int rate) +serial_setbaudrate (rate) + int rate; { struct termios termios; @@ -179,8 +180,8 @@ DEFUN(serial_setbaudrate,(rate),int rate) } int -DEFUN(serial_nextbaudrate,(rate), - int rate) +serial_nextbaudrate (rate) + int rate; { int lookup; lookup = damn_b(rate); @@ -193,16 +194,16 @@ DEFUN(serial_nextbaudrate,(rate), } int -DEFUN(serial_write,(str, len), - CONST char *str AND - int len) +serial_write (str, len) + const char *str; + int len; { return (write (desc, str, len)); } int -DEFUN_VOID(serial_close) +serial_close () { return (close(desc)); } |