knutson6@auscso.UUCP (John Knutson) (07/13/87)
I have tried to compile cent on both SysV (v3) and SCO Xenix sys V, and both told me that TIOCOUTQ was undefined. How is it defined? I am sure there's something like it for SysV and Xenix, but I don't know what it is. Also, on xenix, while compiling rand.c it gives me the following error: ... ftime not a function (somewhere around line 22) SysV tells me that millitm isn't defined. I would guess this has something to do with timeb.h and the timeb struct. Any ideas? -- John Knutson {ihnp4,allegra,ut-sally}!ut-ngp!auscso!knutson6 Fix the mail maps!
dml@rabbit1.UUCP (David Langdon) (07/17/87)
in article <85@auscso.UUCP>, knutson6@auscso.UUCP (John Knutson) says: > > I have tried to compile cent on both SysV (v3) and SCO Xenix sys V, and both > told me that TIOCOUTQ was undefined. How is it defined? I am sure there's ^^^^^^^^ Use TIONREAD in place of the TIOCOUTQ define. > SysV tells me that millitm isn't defined. I would guess this has something > to do with timeb.h and the timeb struct. Any ideas? You just have to munge the time processing since SYSV does not support time resolution finer than seconds. Since this is used for random number generation, you may just want to install your own random number seed function. > -- > John Knutson {ihnp4,allegra,ut-sally}!ut-ngp!auscso!knutson6 > Fix the mail maps! -- David Langdon Rabbit Software Corp. (215) 647-0440 7 Great Valley Parkway East Malvern PA 19355 ...!ihnp4!{cbmvax,cuuxb}!hutch!dml ...!psuvax1!burdvax!hutch!dml
guy%gorodish@Sun.COM (Guy Harris) (07/23/87)
> > I have tried to compile cent on both SysV (v3) and SCO Xenix sys V, and > > both told me that TIOCOUTQ was undefined. How is it defined? I am sure > > there's > Use TIONREAD in place of the TIOCOUTQ define. Not unless TIONREAD, despite its name, tells you how many characters are buffered for output, rather than telling you how many are buffered for input. Furthermore, under vanilla S5, neither TIONREAD nor TIOCOUTQ are defined at all. > > SysV tells me that millitm isn't defined. I would guess this has something > > to do with timeb.h and the timeb struct. Any ideas? > > You just have to munge the time processing since SYSV does not support time > resolution finer than seconds. Since this is used for random number > generation, you may just want to install your own random number seed > function. Actually, S5 does support time resolution finer than seconds, to some degree; see TIMES(2). However, I've seen few game programs using any finer-resolution time to seed random number generators, so it's probably sufficient to use the result of "time". Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com
knutson6@auscso.UUCP (John Knutson) (07/23/87)
I did manage to get cent to compile w/o errors (with a patch that someone mailed to me), but it would lock out input on my line after 1 move of the centipede. If lint doesn't help any on this, the entire thing is going to be deleted. Too bad bsd and sysV don't get along so well..... -- John Knutson {ihnp4,allegra,ut-sally}!ut-ngp!auscso!knutson6
dml@rabbit1.UUCP (David Langdon) (07/24/87)
in article <24033@sun.uucp>, guy%gorodish@Sun.COM (Guy Harris) says: > >> > I have tried to compile cent on both SysV (v3) and SCO Xenix sys V, and >> > both told me that TIOCOUTQ was undefined. How is it defined? I am sure >> > there's > >> Use TIONREAD in place of the TIOCOUTQ define. > > Not unless TIONREAD, despite its name, tells you how many characters are > buffered for output, rather than telling you how many are buffered > for input. > > Furthermore, under vanilla S5, neither TIONREAD nor TIOCOUTQ are > defined at all. > > Guy Harris > {ihnp4, decvax, seismo, decwrl, ...}!sun!guy > guy@sun.com My system has TIONREAD defined as being usable against any file descripter and can be used against input as well as output. True, it may not be available on many UN*Xes, my version (AIX - a collection of many dialects) does. -- David Langdon Rabbit Software Corp. (215) 647-0440 7 Great Valley Parkway East Malvern PA 19355 ...!ihnp4!{cbmvax,cuuxb}!hutch!dml ...!psuvax1!burdvax!hutch!dml
guy%gorodish@Sun.COM (Guy Harris) (07/28/87)
> My system has TIONREAD defined as being usable against any file descripter > and can be used against input as well as output. True, it may not be > available on many UN*Xes, my version (AIX - a collection of many dialects) > does. It is probably not available on *most* UNIXes; it is not in V7, 4BSD, nor S3/S5. Most likely, it is an AIXism. It also has a truly stupid name, if it can be used against output; with a name like "TIONREAD", it makes sense that it can be used against input, but unless somebody from IBM is thinking of the old IBM 1130 printer that permitted you to "read" which character was under the print hammers it doesn't make sense to ask how many characters can be "read" from an output device. Furthermore, if you have a single descriptor open for reading from and writing to a terminal, will it tell you how many characters can be read without blocking, or will it tell you how many characters are queued up to be transmitted (the latter is what TIOCOUTQ tells you)? (And if it is usable against any file descriptor, why does it begin with "T" rather than "F"? The "TIO" hints that it is for terminals....) Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com