unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Status of MAC/W32/X consolidation and some questions.
@ 2003-03-10 12:13 Kim F. Storm
  2003-03-10 17:00 ` Andrew Choi
                   ` (5 more replies)
  0 siblings, 6 replies; 38+ messages in thread
From: Kim F. Storm @ 2003-03-10 12:13 UTC (permalink / raw)



[There are a couple of MAC and W32 specific questions in this mail.
Those who know these ports well, please take a look at them.]


As you may have seen on emacs-devel, I'm in the process of
consolidating the various ports of CVS emacs for X, W32, and MAC.

Most of this work is to identify (and merge) code which basically only
differs in "names" rather than "structure", e.g. by using FRAME_X_P in
the X version, and FRAME_MAC_P in the MAC version, but otherwise is
identical.

AFAICS, the best option for maximum code sharing is to extend the
current approach in the MAC and W32 ports of using part of the X port
name space, e.g. by defining a partial x_output structure to satisfy
the needs of the basic code which expects an x_output structure to
exist, or by defining some of the FRAME_X_* macros to point to the
output_data.mac structure.

Now, what I'm currently working on is to replace all mac* and w32*
specific names with the corresponding x* names, e.g. FRAME_MAC_WINDOW
is replaced by FRAME_X_WINDOW, mac_output is replaced by x_output,
f->output_data.mac becomes f->output_data.x, etc. etc.

As I progress in this regard, the amount of code which can then be
shared directly between the ports gets larger and larger.

One major drawback of this approach is that while the current
"overloading of the X* specific names makes it difficult to make a
version which supports both MAC and X simultaneously (i.e. in the same
executable), extending this "overloading" to cover all the MAC and W32
specific code makes it practically impossible to support such
cross-GUI systems that later on.

However, I got the message from RMS, that this limitation was
acceptable (and I agree), so I'm doing just that, as it gives the
maximum benefits with the least amount of work (still it *is* a lot of
tedious work :-)

However, one of the "merged" macros is giving me problems: FRAME_MAC_P
and FRAME_W32_P cannot simply be merged into FRAME_X_P (for various
reasons), but I'll find a way :-)


On W32, FRAME_W32_P seems to be true even when HAVE_NTGUI is not
defined (at lease Fframe_parameter in frame.c seems to assume this),
so while FRAME_X_P and FRAME_MAC_P means that the output is to a
GUI, FRAME_W32_P only means that output is to a w32 system as such.

So my questions to the W32 experts are: 

* Does it make sense to build NTemacs without HAVE_NTGUI defined?
  Is it possible to do that?

* Does the W32 version support -nw?
  If so, is FRAME_W32_P still true when specified?


On MAC, I noticed two places in macterm.c where FRAME_X_P is tested
rather than FRAME_MAC_P, which basically means that the corresponding
code _IS_NOT_ executed:

 * In x_flush, the call to XFlush is conditioned by FRAME_X_P

 * In XTframe_up_to_date, the entire code is conditioned by FRAME_X_P.

Could a MAC expect please check these two strange-looking cases for
me, thanks!

Also on MAC, there are quite a number of TODO items, meaning that some
section of more-or-less unmodified X or W32 code is commented out with
#if 0...  #endif.  In the cases where the code is to be "consolidated",
I would prefer to leave a TODO note in the mac* file and simply delete
the code from the file.  Then in the consolidated code file, I will
put a #ifndef MAC_OS around the consolidated code to indicate that it
is not used on MAC_OS (yet).   Is that an acceptable approach?



Since I'm working on this right now, I would advise everyone to commit
any major changes that you may have in your local checkout, as
the structure of the code is going to change quite a lot due to
my work (the consolidated code is going to be moved out of the
mac* specific files).

Also, since I cannot really test the changes on MAC and W32, I do
expect that I'm going to make a few mistakes in the consolidation,
resulting in non-functional MAC and W32 versions on the CVS head,
which I hope some of you will assist me in solving (I hope/expect it
is just a matter of fixing some trivial compilation errors).


-- 
Kim F. Storm  http://www.cua.dk

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2004-07-22 21:40 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-10 12:13 Status of MAC/W32/X consolidation and some questions Kim F. Storm
2003-03-10 17:00 ` Andrew Choi
2003-03-11  1:06   ` Kim F. Storm
2003-03-11 15:31     ` Andrew Choi
2003-03-10 17:09 ` Andrew Choi
2003-03-11  1:04   ` Kim F. Storm
2003-03-11 15:40     ` Andrew Choi
2003-03-10 17:23 ` Benjamin Riefenstahl
2003-03-11  1:01   ` Kim F. Storm
2003-03-11  0:19     ` Juanma Barranquero
2003-03-11 10:35       ` Kim F. Storm
2003-03-11 10:07     ` Jason Rumney
2003-03-11 11:09       ` Kim F. Storm
2003-03-12  4:47       ` Miles Bader
2003-03-11  0:03 ` Jason Rumney
2003-03-11  1:47 ` Miles Bader
2003-03-11 19:03   ` Stefan Monnier
2003-03-12  4:44     ` Miles Bader
2004-07-22 15:11   ` Kim F. Storm
2004-07-22 21:40     ` Miles Bader
2003-03-11 14:19 ` Kim F. Storm
2003-03-12 19:27   ` Eli Zaretskii
2003-03-12 23:01     ` Kim F. Storm
2003-03-16 22:00   ` Status of MAC/W32/X consolidation -- first major patch committed Kim F. Storm
2003-03-16 22:27     ` Jason Rumney
2003-03-16 23:59       ` Kim F. Storm
2003-03-17  8:56         ` Jason Rumney
2003-03-17 11:40           ` Kim F. Storm
2003-03-17 14:56     ` Benjamin Riefenstahl
     [not found]       ` <1047913554.3e75e4529bc88@webmail.freedom2surf.net>
2003-03-17 16:43         ` Benjamin Riefenstahl
2003-03-17 19:01       ` Juanma Barranquero
2003-03-21 15:10     ` Status of MAC/W32/X consolidation -- second " Kim F. Storm
2003-03-21 16:46       ` Juanma Barranquero
2003-03-21 22:48         ` Kim F. Storm
2003-03-24 20:07       ` Andrew Choi
2003-03-31 22:16       ` Status of MAC/W32/X consolidation -- third " Kim F. Storm
2003-04-01  1:13         ` Andrew Choi
2003-04-01  9:27           ` Kim F. Storm

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).