From 1c343584e9e58ddfbe8f57b7bb7b5d81eece9f97 Mon Sep 17 00:00:00 2001 From: Alessandro De Laurenzis Date: Tue, 25 Oct 2022 05:51:50 +0200 Subject: [PATCH] graphics/grTkCommon.c: remove OGL includes No references to OpenGL here, so headers not needed. While there, replace panic() with TxError() + MainExit (+ include utils/main.h for C99 compat). --- graphics/grTkCommon.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/graphics/grTkCommon.c b/graphics/grTkCommon.c index 182c3a02..5a174249 100644 --- a/graphics/grTkCommon.c +++ b/graphics/grTkCommon.c @@ -16,6 +16,7 @@ #include "tcltk/tclmagic.h" #include "utils/magic.h" +#include "utils/main.h" #include "utils/styles.h" #include "utils/geometry.h" #include "utils/hash.h" @@ -32,14 +33,6 @@ #include "graphics/grTkCommon.h" #include "graphics/glyphs.h" -/* C99 compat - * GL headers must be included after graphics/grTOGLInt.h - */ -#include -#include -#include -#include /* Needed to define panic */ - #include "textio/textio.h" /* Variables declared by grClip.c */ @@ -1260,7 +1253,8 @@ ImgLayerCmd(clientData, interp, objc, objv) return code; } default: { - panic("bad const entries to layerOptions in ImgLayerCmd"); + TxError("bad const entries to layerOptions in ImgLayerCmd\n"); + MainExit(1); } } return TCL_OK; @@ -1462,7 +1456,8 @@ ImgLayerDelete(masterData) LayerMaster *masterPtr = (LayerMaster *) masterData; if (masterPtr->instancePtr != NULL) { - panic("tried to delete layer image when instances still exist"); + TxError("tried to delete layer image when instances still exist\n"); + MainExit(1); } masterPtr->tkMaster = NULL; if (masterPtr->imageCmd != NULL) {