|
From: sfeam <sf...@us...> - 2016-01-11 02:00:16
|
On Sunday, 10 January 2016 02:56:46 PM Daniel J Sebald wrote: > I noticed that the subdirectory for the NeXT code has been removed. I > wouldn't classify NeXT computers as obsolete. There is still a bit of > activity surrounding them: > > http://www.nextcomputers.org/ > http://www.nextcomputers.org/forums/ > > Plus, NeXT is a classic. Sure. And MSDOS was a classic. And Version 7 unix was a classic. And Atari and Amiga were classics. But it's a good bet that no one is running the CVS development version of gnuplot on them. > I can understand not wanting to have bits of "ifdef NEXT" in the main > code, though. The NeXT conditionals in the core code were work-arounds for NeXT compiler (gcc 3.2) and library deficiencies at that time. From the comments, I bet they were already unneeded by 2003 (gcc 3.3) at the very latest. > Looking at what was removed, I see there is this > init_terminal() routine that has me wondering why there are so many > pre-process conditionals. > For example: > > #ifdef X11 > #ifdef QTTERM > #ifdef WXWIDGETS > > are not operating systems, they are basically terminals. > Can't these bits of code be placed in the associated terminal files? Um, no. This is the routine that determines the default terminal when the program is first entered. Obviously you can't call into that terminal before you have figured out what it is. And certainly you cannot call into it if it wasn't configured into the current binary. Ethan > All it would > take is to change the name of of init_terminal() to > init_terminal_common() and then each of the terminals would have > > init_terminal() > { > if (term_name == (char *) NULL) > term_name = "qt"; > > init_terminal_common(); > } > > or something similar. That's the same as an inheritance OOP concept. > > Dan |