Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!news.uoregon.edu!arclight.uoregon.edu!news.sprintlink.net!news-peer.sprintlink.net!howland.erols.net!EU.net!news2.EUnet.fr!newsbr.eunet.fr!usenet From: Frederic.Marand@osinet.fr (Frederic MARAND) Newsgroups: comp.unix.bsd.freebsd.misc Subject: XTERM and other emulators source code Date: Thu, 17 Oct 1996 07:05:21 GMT Organization: Groupe SEDI / Agorus SA / OSI SARL Lines: 47 Message-ID: <544p3i$ro4@newsbr.eunet.fr> References: <52p8au$hl@newsbr.eunet.fr> <5364rp$ba@uriah.heep.sax.de> NNTP-Posting-Host: 193.107.196.155 X-Newsreader: Forte Free Agent 1.0.82 j@uriah.heep.sax.de (J Wunsch) wrote: >> The most interesting is probably XTERM, from the X-Window >> distribution. It's free, and graphics-based, which means you can port >> it to any other environment. >Ick. > Abandon All Hope, Ye Who Enter Here >This is undoubtedly the most ugly program in the distribution. It was one of >the first "serious" programs ported, and still has a lot of historical baggage. Remember I said it was the most interesting, not the easiest. We developed a graphics-based emulator in our company for a GUI called KAE, and it was fairly worse than xterm, but less powerful. >/* > * W A R N I N G > * > * If you think you know what all of this code is doing, you are > * probably very mistaken. There be serious and nasty dragons here. The warning is partly correct: this code does work. It is probably the most used of all X clients, and has had to prove its resilience for years. But there are indeed "serious and nasty dragons": writing a FAST terminal emulator is a serious challenge, not somehing you do casually. We found out at heavy cost : the optimization in our own emulator took about 2/3 of the total time we spent developing the emulator, and it made the code much more ugly than before optimization. It seems the same happened to Xterm developers, although I don't know its history. > * > * This client is *not* to be taken as an example of how to write X > * Toolkit applications. It is in need of a substantial rewrite, > * ideally to create a generic tty widget with several different parsing > * widgets so that you can plug 'em together any way you want. Don't > * hold your breath, though.... This part is correct: this is not how it should be done, writing by the book. But this is how it is done in the real world. >Try again. ;-) Also don't forget: authors of the X suite tend to exhibit their sense of humor. The code Is understandable, even if it is non-trivial. If you know X, then about two days of scanning the code should give you an idea of how it works. Frederic G. MARAND Agorus SA / OSI SARL Frederic.Marand@osinet.fr