[teklib-general] teklib: fixed freepen and vis_plot bugs
Franciska Schulze
fschulze at neoscientists.org
Thu May 15 21:52:53 CEST 2008
details: http://hg.teklib.org/teklib/rev/2b246e5f6959
changeset: 186:2b246e5f6959
user: Franciska Schulze <fschulze at neoscientists.org>
date: Thu May 15 14:53:14 2008 +0000
description:
fixed freepen and vis_plot bugs
diffs (56 lines):
diff -r 18c49b195598 -r 2b246e5f6959 src/display_x11/display_x11_inst.c
--- a/src/display_x11/display_x11_inst.c Thu May 15 14:47:10 2008 +0000
+++ b/src/display_x11/display_x11_inst.c Thu May 15 14:53:14 2008 +0000
@@ -322,7 +322,7 @@ x11_docmd(TMOD_X11 *inst, struct TVReque
x11_allocpen(inst, req);
break;
case TVCMD_FREEPEN:
- x11_allocpen(inst, req);
+ x11_freepen(inst, req);
break;
case TVCMD_SETFONT:
x11_setfont(inst, req);
diff -r 18c49b195598 -r 2b246e5f6959 src/display_x11/display_x11_mod.h
--- a/src/display_x11/display_x11_mod.h Thu May 15 14:47:10 2008 +0000
+++ b/src/display_x11/display_x11_mod.h Thu May 15 14:53:14 2008 +0000
@@ -327,6 +327,7 @@ LOCAL void x11_closevisual(TMOD_X11 *mod
LOCAL void x11_closevisual(TMOD_X11 *mod, struct TVRequest *req);
LOCAL void x11_setinput(TMOD_X11 *mod, struct TVRequest *req);
LOCAL void x11_allocpen(TMOD_X11 *mod, struct TVRequest *req);
+LOCAL void x11_freepen(TMOD_X11 *mod, struct TVRequest *req);
LOCAL void x11_frect(TMOD_X11 *mod, struct TVRequest *req);
LOCAL void x11_rect(TMOD_X11 *mod, struct TVRequest *req);
LOCAL void x11_line(TMOD_X11 *mod, struct TVRequest *req);
diff -r 18c49b195598 -r 2b246e5f6959 src/visual/visual_api.c
--- a/src/visual/visual_api.c Thu May 15 14:47:10 2008 +0000
+++ b/src/visual/visual_api.c Thu May 15 14:53:14 2008 +0000
@@ -341,7 +341,7 @@ EXPORT TVPEN vis_allocpen(TMOD_VIS *inst
EXPORT void vis_freepen(TMOD_VIS *inst, TVPEN pen)
{
- struct TVRequest *req = visi_getreq(inst, TVCMD_ALLOCPEN,
+ struct TVRequest *req = visi_getreq(inst, TVCMD_FREEPEN,
inst->vis_Display, TNULL);
req->tvr_Op.FreePen.Instance = inst->vis_Visual;
req->tvr_Op.FreePen.Pen = pen;
@@ -428,7 +428,7 @@ EXPORT void vis_plot(TMOD_VIS *inst, TIN
req->tvr_Op.Plot.Instance = inst->vis_Visual;
req->tvr_Op.Plot.Rect[0] = x;
req->tvr_Op.Plot.Rect[1] = y;
- req->tvr_Op.Rect.Pen = pen;
+ req->tvr_Op.Plot.Pen = pen;
visi_doasync(inst, req);
}
@@ -595,9 +595,11 @@ EXPORT TAPTR vis_opendisplay(TMOD_VIS *m
else
{
/* try to open named display: */
+ TDBPRINTF(TDB_WARN,("loading module %s\n", name));
display = TExecOpenModule(mod->vis_ExecBase, name, 0, TNULL);
if (display)
{
+ TDBPRINTF(TDB_WARN,("loading module %s succeeded\n", name));
/* store display in hash: */
TExecLock(mod->vis_ExecBase, mod->vis_Lock);
success = vis_puthash(mod, mod->vis_Displays, name, (TTAG) display);
More information about the teklib-general
mailing list