Date: Fri, 12 Apr 1996 09:43:58 -0700 (PDT) From: John Utz <spaz@u.washington.edu> To: questions@freebsd.org Subject: What is the FreeBSD equiv of CBAUD? Message-ID: <Pine.OSF.3.92a.960412092804.23619A-100000@becker1.u.washington.edu>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.92a.960412092804.23619A-100000>