home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!ornl!rsg1.er.usgs.gov!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsi!cbnewsh!att-out!cbfsb!mmc
- From: mmc@att.com (Michael J. McLennan)
- Subject: PATCH for dragdrop-1.0
- Message-ID: <1992Nov19.170137.10338@cbfsb.cb.att.com>
- Originator: news@cbnewsg.cb.att.com
- Sender: news@cbfsb.cb.att.com
- Nntp-Posting-Host: gewurtz.cnet.att.com
- Reply-To: michael.mclennan@att.com
- Organization: AT&T Bell Laboratories
- X-Newsreader: TIN [version 1.1 PL6]
- Date: Thu, 19 Nov 1992 17:01:37 GMT
- Lines: 209
-
- I apologize for any grief people may have had trying to compile the
- dragdrop-1.0 distribution. Unfortunately, I overlooked my use of
- the TclFindCmd() that George Howlett has proposed as an extension of
- the usual TCL core. (Obviously, it is a useful extension. Any chance
- that it will be adopted by TCL 7.0?)
-
- I have updated the distribution to include the source for this function.
- You may either obtain a new distribution (which should compile this time!),
- or add/replace files in the distribution according to the instructions
- below.
-
- Again, sorry for the inconvenience.
- --Michael
-
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Michael J. McLennan 2C-226 [ [ [ [ [[ E-mail: alux2!mmc@att.com
- AT&T Bell Laboratories [[ [[ [[ [[ [ Phone: (215) 770-2842
- 1247 S Cedar Crest Blvd [[ [ [ [ [ [ [ [[[ FAX: (215) 770-3843
- Allentown, PA 18103 [ [ [ [
- vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-
-
- PATCHES:
-
- 1) Replace the "dragdrop-1.0/Makefile" with...
-
- ----------- cut ----------- cut ----------- cut ----------- cut -----------
- # Indicate the correct paths for each of the following libraries
- #
- # XLIB Your X11 (R4 or R5) library.
- # TCLLIB Tcl Version 6.1 library.
- # TKLIB Tk Version 2.3 library.
- # TCLSRC Tcl Version 6.1 source directory.
- # TKSRC Tk Version 2.3 source directory.
- #
- XLIB=-L/usr/X11/lib -lX11
- TCLLIB=-L/usr/X11/lib -ltcl
- TKLIB=-L/usr/X11/lib -ltk
- TCLSRC=-I/usr/local/src/X11/local/lib/tk2.3/tcl
- TKSRC=-I/usr/local/src/X11/local/lib/tk2.3
- #
- INCLUDES=-I. -I/usr/X11/include $(TCLSRC) $(TKSRC)
- CDEBUGFLAGS=-O
- LIBS=$(TKLIB) $(TCLLIB) $(XLIB) -lm
- CFLAGS= $(CDEBUGFLAGS) $(INCLUDES) $(DEFINES)
-
- SRCS= main.c tkDragDrop.c tclCmdQuery.c
- OBJS= main.o tkDragDrop.o tclCmdQuery.o
-
- CC = cc
-
- dish: $(OBJS)
- rm -f dish
- $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o dish
-
- $(OBJS):$(HDRS)
-
- clean:
- rm -f $(OBJS) dish core
-
- lint:
- lint $(INCLUDES) $(SRCS)
- ----------- cut ----------- cut ----------- cut ----------- cut -----------
-
-
- 2) Add the following file as "dragdrop-1.0/tclCmdQuery.c"
-
- ----------- cut ----------- cut ----------- cut ----------- cut -----------
- /*
- * ------------------------------------------------------------------------
- * FILE: tclCmdQuery.c
- * PURPOSE: query info about registered TCL commands
- *
- * The following set of routines are proposed as useful additions
- * to the core TCL capability. They allow the developer to query
- * information about commands that have been previously registered
- * via the usual Tcl_CreateCommand().
- *
- * ------------------------------------------------------------------------
- * AUTHOR: George A. Howlett
- * AT&T Bell Laboratories
- *
- * SCCS: %W% (%G%)
- * ========================================================================
- * Copyright (c) 1992 AT&T Bell Laboratories
- * ========================================================================
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that the copyright notice and warranty disclaimer appear in
- * supporting documentation, and that the names of AT&T Bell Laboratories
- * any of their entities not be used in advertising or publicity
- * pertaining to distribution of the software without specific, written
- * prior permission.
- *
- * AT&T disclaims all warranties with regard to this software, including
- * all implied warranties of merchantability and fitness. In no event
- * shall AT&T be liable for any special, indirect or consequential
- * damages or any damages whatsoever resulting from loss of use, data or
- * profits, whether in an action of contract, negligence or other
- * tortuous action, arising out of or in connection with the use or
- * performance of this software.
- * ========================================================================
- */
- #include <tcl.h>
- #include <tclInt.h>
-
- /*
- *----------------------------------------------------------------------
- *
- * TclFindCmd --
- *
- * Given the name of a command, return a pointer to the
- * structure describing the command.
- *
- * Results:
- * NULL is returned if the name doesn't correspond to any
- * command. Otherwise the return value is a pointer to
- * the command's structure.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
- Command *
- TclFindCmd(iPtr, cmdName)
- Interp *iPtr; /* Interpreter in which to look. */
- char *cmdName; /* Name of desired command. */
- {
- Tcl_HashEntry *entryPtr;
- Command *cmdPtr;
-
- entryPtr = Tcl_FindHashEntry(&iPtr->commandTable, cmdName);
- if (entryPtr == NULL) {
- return (NULL);
- }
- cmdPtr = (Command *) Tcl_GetHashValue(entryPtr);
- return (cmdPtr);
- }
-
- /*
- *----------------------------------------------------------------------
- *
- * TclClientData --
- *
- * Given the command pointer, return the clientData field.
- *
- * Results:
- * Returns the clientData field of the command structure.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
- ClientData
- TclClientData (cmdPtr)
- Command *cmdPtr;
- {
- return (cmdPtr->clientData);
- }
-
- /*
- *----------------------------------------------------------------------
- *
- * TclDeleteProc --
- *
- * Given the command pointer, return the delete proc field.
- *
- * Results:
- * Returns the deleteProc field of the command structure.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
- Tcl_CmdDeleteProc *
- TclDeleteProc (cmdPtr)
- Command *cmdPtr;
- {
- return (cmdPtr->deleteProc);
- }
-
- /*
- *----------------------------------------------------------------------
- *
- * TclCmdProc --
- *
- * Given the command pointer, return the cmd proc field.
- *
- * Results:
- * Returns the proc field of the command structure.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
- Tcl_CmdProc *
- TclCmdProc (cmdPtr)
- Command *cmdPtr;
- {
- return (cmdPtr->proc);
- }
- ----------- cut ----------- cut ----------- cut ----------- cut -----------
-
- 3) Type "make" as usual (it should compile this time!)
-