From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9051 invoked by alias); 5 Sep 2003 04:54:18 -0000 Mailing-List: contact xconq7-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: xconq7-owner@sources.redhat.com Received: (qmail 9041 invoked from network); 5 Sep 2003 04:54:17 -0000 Received: from unknown (HELO smtp1.fre.skanova.net) (195.67.227.94) by sources.redhat.com with SMTP; 5 Sep 2003 04:54:17 -0000 Received: from [212.181.162.155] (h155n1fls20o913.bredband.comhem.se [212.181.162.155]) by smtp1.fre.skanova.net (8.12.9/8.12.9) with ESMTP id h854sBiu010583; Fri, 5 Sep 2003 06:54:12 +0200 (CEST) X-Sender: u22611592@m1.226.telia.com Message-Id: In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Fri, 05 Sep 2003 15:06:00 -0000 To: Eric McDonald From: Hans Ronne Subject: Re: Tcl/Tk Interface Unification (was Re: New Xconq Windows Executable) Cc: xconq7@sources.redhat.com, Juergen Ruehle X-SW-Source: 2003/txt/msg00404.txt.bz2 >Pieces of the X11 Tcl/Tk app are actually built in the x11 >directory rather than the tcltk directory. If we really want to >be consistent, then we would also need to move the X11 Tcl/Tk >stuff into the tcltk directory, not just the Win32 Tcl/Tk stuff. That's right. The tcltk app (xconq) is built in the x11 directory for purely historical reasons, as well as the sdl app (sdlconq). However, neither of these apps use any of the x11 code. Nor does the x11 app (xtconq) use the single source file shared by xconq and sdlconq (xconq.c, which contains the main function) since it has its own main function in xtconq.c. So the code is already completely separated between the x11 and tcltk/sdl interfaces. What remains to do is to untangle it further by giving each of the latter its own main function file which lives in the tcltk or sdl directory, respectively, instead of in the x11 directory. I would suggest doing this in two steps. First, we should copy xconq.c to the tcltk directory (and rename it to tkunix.c if we want to be really consistent with how the tcltk mac and win32 source files are named). After this, it is easy to rearrange the Makefiles so that we have a single Makefile for the tcltk apps in the tcltk directory. The sdl-specific hacks such as using_sdl can of course be removed from tkunix.c at this point. A second step would be to do exactly the same thing with the sdl code, i.e. copy xconq.c to a new file sdlunix.c in the sdl directory and change the Makefiles so that sdlconq builds there instead of in the x11 directory. Once this has been done, the old x11/xconq.c can be retired. We also have the tcltk app ximfapp. It's main function file, ximfapp.c is not used by the sdl interface (or by the x11 interface) so in this case we can just move it to the tcltk directory (and rename it iappunix.c for consistency). The Makefiles would of course have to be updated, too. The other utility programs are all true x11 apps and should be left to build in the x11 directory together with xtconq. The advantage of these rearrangements are two-fold. First, it will be easier keep track of what files belong to what interfaces. Second, one would no longer need hacks supporting several different interfaces within the same source file, as is now the case for xconq.c. The only disadvantage is the slight code duplication. However, I think we can live with this. The entire xconq.c is only 241 lines including the comments. Hans