From owner-freebsd-questions Fri Apr 12 09:44:04 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA17046 for questions-outgoing; Fri, 12 Apr 1996 09:44:04 -0700 (PDT) Received: from becker1.u.washington.edu (spaz@becker1.u.washington.edu [140.142.12.67]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id JAA17003 for ; Fri, 12 Apr 1996 09:44:00 -0700 (PDT) Received: from localhost by becker1.u.washington.edu (5.65+UW96.04/UW-NDC Revision: 2.33 ) id AA30997; Fri, 12 Apr 96 09:43:58 -0700 Date: Fri, 12 Apr 1996 09:43:58 -0700 (PDT) From: John Utz To: questions@freebsd.org Subject: What is the FreeBSD equiv of CBAUD? Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hello All; I am attempting to port x48, the hp-48g/x calculator emulator to freebsd. The job is almost finished, excepting one line of code, that pertains to the serial port. ( For those who may not know, the hp48 has a serial port built in, and uses kermit to control it. really. ) The line is this: ttybuf.c_cflag &= ~CBAUD; in this snippet of code from a file called serial.c struct termios ttybuf; ... ttybuf.c_cflag &= ~CBAUD; baud &= 0x7; switch (baud) { case 0: /* 1200 */ ttybuf.c_cflag |= B1200; break; case 1: /* 1920 */ #ifdef B1920 ttybuf.c_cflag |= B1920; #endif break; case 2: /* 2400 */ ttybuf.c_cflag |= B2400; break; ... This case set ( it goes on much further then this, but that didnt help my point.. ) sets the serial port baud rate, i assume. I further assume that the CBAUD that allows one to change the baud rate. Given the ifdefs in the code previous to this point, it appears that this is supported by both sysV ( linux, irix, hpux, solaris ) boxes and sunos ( gee, only one bsd box... urp! ) Is this a "permission vector" that our paradigm does not make use of? Can I just #ifndef(__FreeBSD__) around it? Or is there some moral equivalent in our tty flag structure that i have missed out on in my perusings of the various tty related include files? tnx! ******************************************************************************* John Utz spaz@u.washington.edu idiocy is the impulse function in the convolution of life