On Thu, Jan 28, 2016 at 10:37:15AM -0600, Chris Bennett wrote:
> No need for bauds structure, since handled by cfsetspeed
> 

Since this has been #ifdef'ed out for nearly 20 years, I suppose this
can go.  Any objections?

> 
> Index: printjob.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/lpr/lpd/printjob.c,v
> retrieving revision 1.56
> diff -u -p -r1.56 printjob.c
> --- printjob.c        12 Jan 2016 23:35:13 -0000      1.56
> +++ printjob.c        28 Jan 2016 16:29:44 -0000
> @@ -1516,32 +1516,6 @@ alarmer(int s)
>       /* nothing */
>  }
>  
> -#if !defined(__NetBSD__) && !defined(__OpenBSD__)
> -struct bauds {
> -     int     baud;
> -     int     speed;
> -} bauds[] = {
> -     50,     B50,
> -     75,     B75,
> -     110,    B110,
> -     134,    B134,
> -     150,    B150,
> -     200,    B200,
> -     300,    B300,
> -     600,    B600,
> -     1200,   B1200,
> -     1800,   B1800,
> -     2400,   B2400,
> -     4800,   B4800,
> -     9600,   B9600,
> -     19200,  B19200,
> -     38400,  B38400,
> -     57600,  B57600,
> -     115200, B115200,
> -     0,      0
> -};
> -#endif
> -
>  /*
>   * setup tty lines.
>   */
> @@ -1562,19 +1536,7 @@ setty(void)
>               exit(1);
>       }
>       if (BR > 0) {
> -#if defined(__NetBSD__) || defined(__OpenBSD__)
>               cfsetspeed(&i.t, BR);
> -#else
> -             struct bauds *bp;
> -             for (bp = bauds; bp->baud; bp++)
> -                     if (BR == bp->baud)
> -                             break;
> -             if (!bp->baud) {
> -                     syslog(LOG_ERR, "%s: illegal baud rate %d", printer, 
> BR);
> -                     exit(1);
> -             }
> -             cfsetspeed(&i.t, bp->speed);
> -#endif
>               i.set = 1;
>       }
>       if (MS) {
> 

Reply via email to