summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorrjohnson <rjohnson>1998-09-30 19:01:19 (GMT)
committerrjohnson <rjohnson>1998-09-30 19:01:19 (GMT)
commit482d5ce35c802162132e4eee4a59ff453f45f531 (patch)
treee8f9ce0fdf1594b3d40b87fa21119fb159b1e874 /generic
parent068cb6c58c21179128dd33d86208e199e83e4d64 (diff)
downloadtk-482d5ce35c802162132e4eee4a59ff453f45f531.zip
tk-482d5ce35c802162132e4eee4a59ff453f45f531.tar.gz
tk-482d5ce35c802162132e4eee4a59ff453f45f531.tar.bz2
Removed old/unused function declarations
removed unused file on Mac implementation made bell cmd an obj cmd - improved it's test suite
Diffstat (limited to 'generic')
-rw-r--r--generic/tk.h18
-rw-r--r--generic/tkCmds.c33
-rw-r--r--generic/tkImgPhoto.c6
-rw-r--r--generic/tkInt.h22
-rw-r--r--generic/tkWindow.c4
5 files changed, 28 insertions, 55 deletions
diff --git a/generic/tk.h b/generic/tk.h
index 6fcff0b..ddfd176 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -7,11 +7,12 @@
* Copyright (c) 1989-1994 The Regents of the University of California.
* Copyright (c) 1994 The Australian National University.
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
+ * Copyright (c) 1998 by Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tk.h,v 1.12 1998/09/14 18:23:02 stanton Exp $
+ * RCS: @(#) $Id: tk.h,v 1.13 1998/09/30 19:01:19 rjohnson Exp $
*/
#ifndef _TK
@@ -1008,13 +1009,11 @@ struct Tk_PhotoImageFormat {
#define Tk_DoWhenIdle Tcl_DoWhenIdle
#define Tk_Sleep Tcl_Sleep
-/* Additional stuff that has moved to Tcl: */
-
-#define Tk_AfterCmd Tcl_AfterCmd
#define Tk_EventuallyFree Tcl_EventuallyFree
#define Tk_FreeProc Tcl_FreeProc
#define Tk_Preserve Tcl_Preserve
#define Tk_Release Tcl_Release
+#define Tk_FileeventCmd Tcl_FileEventCmd
/*
*--------------------------------------------------------------
@@ -1456,10 +1455,9 @@ EXTERN void Tk_UpdatePointer _ANSI_ARGS_((Tk_Window tkwin,
* Tcl commands exported by Tk:
*/
-EXTERN int Tk_AfterCmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, int argc, char **argv));
-EXTERN int Tk_BellCmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, int argc, char **argv));
+EXTERN int Tk_BellObjCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
EXTERN int Tk_BindCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int argc, char **argv));
EXTERN int Tk_BindtagsCmd _ANSI_ARGS_((ClientData clientData,
@@ -1474,16 +1472,12 @@ EXTERN int Tk_ClipboardCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int argc, char **argv));
EXTERN int Tk_ChooseColorCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int argc, char **argv));
-EXTERN int Tk_ChooseFontCmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, int argc, char **argv));
EXTERN int Tk_DestroyCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int argc, char **argv));
EXTERN int Tk_EntryCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int argc, char **argv));
EXTERN int Tk_EventCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int argc, char **argv));
-EXTERN int Tk_FileeventCmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, int argc, char **argv));
EXTERN int Tk_FrameCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int argc, char **argv));
EXTERN int Tk_FocusCmd _ANSI_ARGS_((ClientData clientData,
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 28f3202..e16b490 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -6,11 +6,12 @@
*
* Copyright (c) 1990-1994 The Regents of the University of California.
* Copyright (c) 1994-1996 Sun Microsystems, Inc.
+ * Copyright (c) 1998 by Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCmds.c,v 1.3 1998/09/14 18:23:08 stanton Exp $
+ * RCS: @(#) $Id: tkCmds.c,v 1.4 1998/09/30 19:01:19 rjohnson Exp $
*/
#include "tkPort.h"
@@ -33,7 +34,7 @@ static void WaitWindowProc _ANSI_ARGS_((ClientData clientData,
/*
*----------------------------------------------------------------------
*
- * Tk_BellCmd --
+ * Tk_BellObjCmd --
*
* This procedure is invoked to process the "bell" Tcl command.
* See the user documentation for details on what it does.
@@ -48,29 +49,31 @@ static void WaitWindowProc _ANSI_ARGS_((ClientData clientData,
*/
int
-Tk_BellCmd(clientData, interp, argc, argv)
+Tk_BellObjCmd(clientData, interp, objc, objv)
ClientData clientData; /* Main window associated with interpreter. */
Tcl_Interp *interp; /* Current interpreter. */
- int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+ int objc; /* Number of arguments. */
+ Tcl_Obj *CONST objv[]; /* Argument objects. */
{
Tk_Window tkwin = (Tk_Window) clientData;
- size_t length;
+ int index;
+ char *string;
+ static char *optionStrings[] = {
+ "-displayof", NULL
+ };
- if ((argc != 1) && (argc != 3)) {
- Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
- " ?-displayof window?\"", (char *) NULL);
+ if ((objc != 1) && (objc != 3)) {
+ Tcl_WrongNumArgs(interp, 1, objv, "?-displayof window?");
return TCL_ERROR;
}
- if (argc == 3) {
- length = strlen(argv[1]);
- if ((length < 2) || (strncmp(argv[1], "-displayof", length) != 0)) {
- Tcl_AppendResult(interp, "bad option \"", argv[1],
- "\": must be -displayof", (char *) NULL);
+ if (objc == 3) {
+ if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings, "option", 0,
+ &index) != TCL_OK) {
return TCL_ERROR;
}
- tkwin = Tk_NameToWindow(interp, argv[2], tkwin);
+ string = Tcl_GetStringFromObj(objv[2], NULL);
+ tkwin = Tk_NameToWindow(interp, string, tkwin);
if (tkwin == NULL) {
return TCL_ERROR;
}
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 1f3aaea..c4d1768 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -11,11 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * Author: Paul Mackerras (paulus@cs.anu.edu.au),
- * Department of Computer Science,
- * Australian National University.
- *
- * RCS: @(#) $Id: tkImgPhoto.c,v 1.2 1998/09/14 18:23:13 stanton Exp $
+ * RCS: @(#) $Id: tkImgPhoto.c,v 1.3 1998/09/30 19:01:20 rjohnson Exp $
*/
#include "tkInt.h"
diff --git a/generic/tkInt.h b/generic/tkInt.h
index d07155f..fd26ad9 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: $Id: tkInt.h,v 1.7 1998/09/14 18:23:13 stanton Exp $
+ * RCS: $Id: tkInt.h,v 1.8 1998/09/30 19:01:20 rjohnson Exp $
*/
#ifndef _TKINT
@@ -711,8 +711,6 @@ EXTERN char * TkAlignImageData _ANSI_ARGS_((XImage *image,
int alignment, int bitOrder));
EXTERN TkWindow * TkAllocWindow _ANSI_ARGS_((TkDisplay *dispPtr,
int screenNum, TkWindow *parentPtr));
-EXTERN int TkAreaToPolygon _ANSI_ARGS_((double *polyPtr,
- int numPoints, double *rectPtr));
EXTERN void TkBezierPoints _ANSI_ARGS_((double control[],
int numSteps, double *coordPtr));
EXTERN void TkBezierScreenPoints _ANSI_ARGS_((Tk_Canvas canvas,
@@ -742,9 +740,6 @@ EXTERN unsigned long TkCreateBindingProcedure _ANSI_ARGS_((
ClientData object, char *eventString,
TkBindEvalProc *evalProc, TkBindFreeProc *freeProc,
ClientData clientData));
-EXTERN Pixmap TkCreateBitmapFromData _ANSI_ARGS_((Display* display,
- Drawable d, CONST char* data,
- unsigned int width, unsigned int height));
EXTERN TkCursor * TkCreateCursorFromData _ANSI_ARGS_((Tk_Window tkwin,
char *source, char *mask, int width, int height,
int xHot, int yHot, XColor fg, XColor bg));
@@ -767,8 +762,6 @@ EXTERN void TkDoConfigureNotify _ANSI_ARGS_((TkWindow *winPtr));
EXTERN void TkDrawInsetFocusHighlight _ANSI_ARGS_((
Tk_Window tkwin, GC gc, int width,
Drawable drawable, int padding));
-EXTERN void TkEventCleanupProc _ANSI_ARGS_((
- ClientData clientData, Tcl_Interp *interp));
EXTERN void TkEventDeadWindow _ANSI_ARGS_((TkWindow *winPtr));
EXTERN void TkFillPolygon _ANSI_ARGS_((Tk_Canvas canvas,
double *coordPtr, int numPoints, Display *display,
@@ -811,9 +804,6 @@ EXTERN int TkGetInterpNames _ANSI_ARGS_((Tcl_Interp *interp,
EXTERN int TkGetMiterPoints _ANSI_ARGS_((double p1[], double p2[],
double p3[], double width, double m1[],
double m2[]));
-#ifndef TkGetNativeProlog
-EXTERN int TkGetNativeProlog _ANSI_ARGS_((Tcl_Interp *interp));
-#endif
EXTERN void TkGetPointerCoords _ANSI_ARGS_((Tk_Window tkwin,
int *xPtr, int *yPtr));
EXTERN int TkGetProlog _ANSI_ARGS_((Tcl_Interp *interp));
@@ -821,8 +811,6 @@ EXTERN void TkGetServerInfo _ANSI_ARGS_((Tcl_Interp *interp,
Tk_Window tkwin));
EXTERN void TkGrabDeadWindow _ANSI_ARGS_((TkWindow *winPtr));
EXTERN int TkGrabState _ANSI_ARGS_((TkWindow *winPtr));
-EXTERN TkWindow * TkIDToWindow _ANSI_ARGS_((Window window,
- TkDisplay *display));
EXTERN void TkIncludePoint _ANSI_ARGS_((Tk_Item *itemPtr,
double *pointPtr));
EXTERN void TkInitXId _ANSI_ARGS_((TkDisplay *dispPtr));
@@ -840,12 +828,6 @@ EXTERN int TkLineToArea _ANSI_ARGS_((double end1Ptr[2],
double end2Ptr[2], double rectPtr[4]));
EXTERN double TkLineToPoint _ANSI_ARGS_((double end1Ptr[2],
double end2Ptr[2], double pointPtr[2]));
-EXTERN int TkListAppend _ANSI_ARGS_((void **headPtrPtr,
- void *itemPtr, size_t size));
-EXTERN int TkListDelete _ANSI_ARGS_((void **headPtrPtr,
- void *itemPtr, size_t size));
-EXTERN void * TkListFind _ANSI_ARGS_((void *headPtr, void *itemPtr,
- size_t size));
EXTERN int TkMakeBezierCurve _ANSI_ARGS_((Tk_Canvas canvas,
double *pointPtr, int numPoints, int numSteps,
XPoint xPoints[], double dblPoints[]));
@@ -993,8 +975,6 @@ EXTERN void TkWmRestackToplevel _ANSI_ARGS_((TkWindow *winPtr,
int aboveBelow, TkWindow *otherPtr));
EXTERN void TkWmSetClass _ANSI_ARGS_((TkWindow *winPtr));
EXTERN void TkWmUnmapWindow _ANSI_ARGS_((TkWindow *winPtr));
-EXTERN int TkXFileProc _ANSI_ARGS_((ClientData clientData,
- int mask, int flags));
/*
* Unsupported commands.
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 6b294e4..64b06a8 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWindow.c,v 1.3 1998/09/14 18:23:20 stanton Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.4 1998/09/30 19:01:20 rjohnson Exp $
*/
#include "tkPort.h"
@@ -101,7 +101,7 @@ static TkCmd commands[] = {
* Commands that are part of the intrinsics:
*/
- {"bell", Tk_BellCmd, NULL, 0},
+ {"bell", NULL, Tk_BellObjCmd, 0},
{"bind", Tk_BindCmd, NULL, 1},
{"bindtags", Tk_BindtagsCmd, NULL, 1},
{"clipboard", Tk_ClipboardCmd, NULL, 0},