From: Paul Harness Pp-Warning: Illegal Via field on preceding line Subject: Re: gnu-plot To: kuku AT acds DOT physik DOT rwth-aachen DOT de (Christoph Kukulies) Date: Mon, 29 Nov 1993 10:43:25 +0000 (GMT) Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp) > Could someone give me the coordinates of how to get gnu-plot for > djgpp running quickly? Does it run under grx? I saw some messages about > gnu-plot pass by recently but didn't pay much attention to it. > I found it best to use LIBGRX graphics which allows more use of higher resolution graphics modes. To do this, the file DJSVGA.TRM needs modifying. I've attached my version of DJSVGA.TRM as well as a modified MAKEFILE.DJG. gnuplot should compile ok using these and go32 1.10a. The only problem is that signal() does not work under DJGPP and gnuplot crashes for floating point exceptions. Also, I have a uuencoded zip file of the gnuplot executable compiled with DJGPP if anyone wants a copy. -- Paul Harness, | Internet: gapa83 AT udcf DOT gla DOT ac DOT uk Department of Physics and Astronomy, | University of Glasgow, | Tel +44-41-339-8855 ext 8359 Glasgow, G12 8QQ, SCOTLAND. | Fax +44-41-334-9029 #__________________________makefile.djg_________________________________ # make file for DJGPP using LIBGRX graphics and ndmake 4.5 # problem using DJGPP 1.10a as at 22 Nov 1993 # signal(SIGFPE,...) not working. # floating point exceptions TERMINATE gnuplot. # This is because signal is defined as signal(){} !!! # Because of a bug in DJGPP 1.10, a fixed version (1.10a) is required # in order to use any graphics. This can be found in the file # csdpmit1.zip in .../pub/msdos/djgpp/pub at omnigate.clarkson.edu # this problem should be fixed in version 1.11 # where to place gnuplot.gih helpfile HELPFILE = gnuplot.gih # compiler CC = gcc CFLAGS = -DMSDOS -DDJGPP -DREADLINE TERMFLAGS = -DDJSVGA LINKOPT = -lm -lpc -lgrx CSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm term/atari.trm \ term/bigfig.trm term/cgi.trm term/djsvga.trm term/dumb.trm \ term/dxf.trm term/dxy.trm \ term/debug.trm term/eepic.trm term/epson.trm term/fig.trm \ term/hp26.trm term/hp2648.trm term/hpgl.trm \ term/hpljii.trm term/metafont.trm\ term/apollo.trm term/gpr.trm term/hppj.trm term/compact.c CSOURCE6 = term/impcodes.h term/imagen.trm term/next.trm term/object.h \ term/iris4d.trm term/kyo.trm term/latex.trm term/mif.trm \ term/pbm.trm term/pc.trm CSOURCE7 = term/post.trm term/qms.trm term/regis.trm term/sun.trm \ term/t410x.trm term/tek.trm term/texdraw.trm term/unixpc.trm \ term/unixplot.trm term/v384.trm term/vws.trm term/x11.trm term/xlib.trm OBJ1 = bitmap.o command.o contour.o eval.o graphics.o graph3d.o OBJ2 = help.o internal.o misc.o parse.o plot.o readline.o OBJ3 = scanner.o setshow.o specfun.o standard.o term.o util.o OBJ4 = version.o gnubin.o binary.o OBJS = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) .c.o: $(CC) -c $(CFLAGS) $< all: gp35.exe $(HELPFILE) gp35.exe : $(OBJS) @>gcclink.rsp $(OBJS) $(CC) -o gp35 @gcclink.rsp $(LINKOPT) aout2exe gp35 command.o: command.c plot.h setshow.h help.h $(CC) -c $(CFLAGS) -DHELPFILE=\"$(HELPFILE)\" command.c term.o: term.c term.h plot.h setshow.c bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7) $(CC) -c $(CFLAGS) $(TERMFLAGS) -Iterm term.c $(OBJS): plot.h command.o help.o misc.o: help.h command.o graphics.o graph3d.o misc.o plot.o setshow.o term.o: setshow.h bitmap.o term.o: bitmap.h # convert gnuplot.doc to gnuplot.gih $(HELPFILE): doc2gih.exe docs\gnuplot.doc doc2gih docs\gnuplot.doc $(HELPFILE) doc2gih.exe: docs\doc2gih.c $(CC) $(CFLAGS) -o doc2gih docs/doc2gih.c aout2exe doc2gih # clean target - remove all temp files, but leave executable intact # needed when changing configuration (model or overlaying) clean: del *.o del gp35 del doc2gih # realclean target - remove all files created by the makefile realclean: clean del gp35.exe del doc2gih.exe del gnuplot.gih #_____________________________________________________________________ /***********************DJSVGA.TRM**************************************/ /* * $Id: djsvga.trm%v 3.50 1993/07/09 05:35:24 woo Exp $ */ /* GNUPLOT - djsvga.trm */ /* * Copyright (C) 1992 * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. * * Permission to modify the software is granted, but not the right to * distribute the modified code. Modifications are to be distributed * as patches to released version. * * This software is provided "as is" without express or implied warranty. * * This file is included by ../term.c. * * This terminal driver supports: * svga * * AUTHORS * Russell Lang * Modified for LIBGRX 16 colour mode by Paul Harness(gapa83 AT udcf DOT gla DOT ac DOT uk) * * * send your comments or suggestions to (info-gnuplot AT dartmouth DOT edu). * */ /* SVGA driver using DJGPP and LIBGRX */ #include #include int dj_startx, dj_starty; int dj_xlast, dj_ylast; int dj_color; #define DJSVGA_XMAX 640 #define DJSVGA_YMAX 480 #define DJSVGA_XLAST (DJSVGA_XMAX - 1) #define DJSVGA_YLAST (DJSVGA_YMAX - 1) #define DJSVGA_VCHAR 16 #define DJSVGA_HCHAR 8 #define DJSVGA_VTIC 4 #define DJSVGA_HTIC 4 #define DJNUMCOLOR 15 static int dj_colors[DJNUMCOLOR] = {7,8,2,3,4,5,9,14,12,15,13,10,11,1,6}; DJSVGA_init() { /* Get the screen size: */ GrSetMode(GR_default_graphics); /* */ dj_xlast = GrMaxX(); term_tbl[term].xmax = dj_xlast + 1; dj_ylast = GrMaxY(); term_tbl[term].ymax = dj_ylast + 1; GrSetMode(GR_default_text); /* */ } DJSVGA_graphics() { GrSetMode(GR_default_graphics); } DJSVGA_text() { (void)getkey(); GrSetMode(GR_default_text); } DJSVGA_reset() { /* not needed with 16 colour LIBGRX graphics mode */ } DJSVGA_linetype(linetype) int linetype; { if (linetype >= 13) linetype %= 13; dj_color = dj_colors[linetype+2]; } DJSVGA_move(x,y) unsigned int x,y; { dj_startx = x; dj_starty = y; } DJSVGA_vector(x,y) unsigned int x,y; { GrLine(dj_startx,dj_ylast-dj_starty,x,dj_ylast-y,dj_color); dj_startx = x; dj_starty = y; } DJSVGA_put_text(x,y,str) unsigned int x, y; char *str; { GrTextXY(x,dj_ylast-y-DJSVGA_VCHAR/2,str,dj_color,GrNOCOLOR); } /********************************************************************/