* mpw-make.in (init.c): Don't try to do symbolic {o} in sed

command, not allowed by some version of MPW Make.
	* ser-mac.c (mac-setbaudrate): Make it actually set baud rates.
This commit is contained in:
Stan Shebs 1995-04-15 21:22:14 +00:00
parent b3636ee55e
commit 8befb59469
3 changed files with 52 additions and 2 deletions

View File

@ -1,3 +1,9 @@
Sat Apr 15 14:15:14 1995 Stan Shebs <shebs@andros.cygnus.com>
* mpw-make.in (init.c): Don't try to do symbolic {o} in sed
command, not allowed by some version of MPW Make.
* ser-mac.c (mac-setbaudrate): Make it actually set baud rates.
Sat Apr 15 14:05:09 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
* alpha-tdep.c (alpha_push_arguments): Fix typo (TYPE_VALUE ->

View File

@ -719,7 +719,17 @@ uninstall \Option-f force
# Formatting conventions: The name of the _initialize_* routines must start
# in column zero, and must not be inside #if.
# FIXME: the last sed substitution 's/^://' should really be 's/^{o}//',
# but only some versions of Make (like 4.0d2, but NOT 4.0b6) will make
# the substitution.
"{o}"init.c \Option-f {OBS} {TSOBS}
If "{o}" =~ /:/
Echo objdir is :
Else
Echo Aack, objdir is not :
Exit -5
End If
Echo Making "{o}"init.c
Delete -i -y "{o}"init.c init.c-tmp
Echo '/* Do not modify this file. */' >init.c-tmp
@ -740,7 +750,7 @@ uninstall \Option-f force
-e '/[a-z0-9A-Z_]*-exp.tab.c.o/d' \Option-d
-e 's/\.gc\.o/.c/' \Option-d
-e 's/\.c\.o/.c/' \Option-d
-e 's/^{o}//'`"
-e 's/^://'`"
If "{filename}" != ""
sed <"{s}""{filename}" >>init.c-tmp -n \Option-d
-e '/^_initialize_[a-z_0-9A-Z]* *(/s/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (); \1 ();}/p'

View File

@ -239,12 +239,46 @@ mac_print_tty_state (scb, ttystate)
return;
}
/* If there is a tricky formula to relate real baud rates
to what the serial driver wants, we should use it. Until
we get one, this table will have to do. */
static struct {
int real_rate;
int bits;
} mac_baud_rate_table[] = {
{ 57600, baud57600 },
{ 38400, 2 /* ??? */ },
{ 19200, baud19200 },
{ 9600, baud9600 },
{ 7200, baud7200 },
{ 4800, baud4800 },
{ 3600, baud3600 },
{ 2400, baud2400 },
{ 1800, baud1800 },
{ 1200, baud1200 },
{ 600, baud600 },
{ 300, baud300 },
{ 0, 0 }
};
static int
mac_set_baud_rate (scb, rate)
serial_t scb;
int rate;
{
return 0;
int i, bits;
for (i = 0; mac_baud_rate_table[i].real_rate != 0; ++i)
{
if (mac_baud_rate_table[i].real_rate == rate)
{
bits = mac_baud_rate_table[i].bits;
break;
}
}
SerReset (input_refnum, stop10|noParity|data8|bits);
SerReset (output_refnum, stop10|noParity|data8|bits);
}
static int