debian/0000775000000000000000000000000012267034524007175 5ustar debian/rules.old0000664000000000000000000001036310456230553011030 0ustar #!/usr/bin/make -f # Made with the aid of debmake, by Christoph Lameter, # based on the sample debian/rules file for GNU hello by Ian Jackson. package=pgplot npackage=pgplot5 version=$(shell expr `pwd` : '.*-\([0-9.]*\)') version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*') vm=$(version_major) curdir=$(shell pwd) bdir=debian/builddir # Construct the library dependency entry for shlibs # shl1=lib$(package) $(vm) pgplot5 (>= $(version)) build: $(checkdir) # create the build directory and copy configuration files to it. install -d $(bdir) cp debian/drivers.list.debian $(bdir)/drivers.list cp sys_linux/g77_elf.conf sys_linux/g77_elf.conf.orig cp debian/g77_elf.conf.debian sys_linux/g77_elf.conf cd $(bdir); $(curdir)/makemake $(curdir) linux g77_elf debian/changeperl cd $(bdir);make;make clean;make cpg;make pgplot.html;make pgplot-routines.tex -cd $(bdir); rm *.o cd $(bdir) ; make FFLAGC="-u -Wall -O2 -fPIC" CFLAGC="-Wall -fPIC -DPG_PPU -O3" \ VM=$(version_major) shared touch build clean: $(checkdir) -rm -rf static shared -rm -f build -rm -rf $(bdir) # -make clean -rm -f `find . -name "*~"` -rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core -rm -f debian/*substvars binary-indep: checkroot build $(checkdir) # There are no architecture-independent files to be uploaded # generated by this package. If there were any they would be # made here. binary-arch: checkroot build $(checkdir) -rm -rf debian/tmp install -d debian/tmp/DEBIAN # Insert appropriate lines into shlibs file # echo -e '$(shl1)\n' >debian/tmp/DEBIAN/shlibs install -d debian/tmp/usr/doc/$(npackage)/examples install -d debian/tmp/usr/lib/$(npackage) install -d debian/tmp/usr/bin cd debian/tmp && install -d `cat ../dirs` install -m644 $(bdir)/libpgplot.a debian/tmp/usr/lib/ strip --strip-unneeded $(bdir)/libpgplot.so install -m644 $(bdir)/libpgplot.so debian/tmp/usr/lib/libpgplot.so.$(version) install -m644 $(bdir)/libcpgplot.a debian/tmp/usr/lib/ install -m644 $(bdir)/cpgplot.h debian/tmp/usr/include/ install -m644 $(bdir)/pgplot.doc debian/tmp/usr/doc/$(npackage) cp pgdispd/aaaread.me debian/tmp/usr/doc/$(npackage)/pgdisp.txt install -m644 $(bdir)/drivers.list debian/tmp/usr/doc/$(npackage) install -m644 $(bdir)/pgplot-routines.tex debian/tmp/usr/doc/$(npackage) install -m644 $(bdir)/pgplot.html debian/tmp/usr/doc/$(npackage) install -m644 cpg/cpgplot.doc debian/tmp/usr/doc/$(npackage) install -m644 cpg/cpgdemo.c debian/tmp/usr/doc/$(npackage)/examples install $(bdir)/pgdisp debian/tmp/usr/bin/ # install $(bdir)/pgbind debian/tmp/usr/bin/ install $(bdir)/pgxwin_server debian/tmp/usr/bin/ cd debian/tmp/usr/bin ; strip --strip-unneeded pgdisp pgxwin_server install -m644 $(bdir)/grexec.f debian/tmp/usr/lib/$(npackage) install -m644 $(bdir)/grfont.dat debian/tmp/usr/lib/$(npackage) install -m644 $(bdir)/grexec.f debian/tmp/usr/lib/$(npackage) install -m644 $(bdir)/rgb.txt debian/tmp/usr/lib/$(npackage) install -m644 $(bdir)/grpckg1.inc debian/tmp/usr/lib/$(npackage) install -m644 debian/pgplot.3x debian/tmp/usr/man/man3 gzip -9v debian/tmp/usr/man/man3/* install -m644 aaaread.me debian/tmp/usr/doc/$(npackage) install -m644 install-unix.txt debian/tmp/usr/doc/$(npackage) install -m644 ver5*.txt debian/tmp/usr/doc/$(npackage) cp examples/* debian/tmp/usr/doc/$(npackage)/examples cd debian/tmp/usr/lib/; ln -s lib$(package).so.$(version) lib$(package).so.$(version_major) cd debian/tmp/usr/lib/; ln -s lib$(package).so.$(version_major) lib$(package).so chmod 644 debian/tmp/usr/lib/$(npackage)/* # Install installation scripts # cp debian/postinst debian/tmp/DEBIAN/. chmod +x debian/tmp/DEBIAN/postinst cp debian/README.debian debian/tmp/usr/doc/$(npackage) cp debian/changelog debian/tmp/usr/doc/$(npackage)/changelog.Debian gzip -9v debian/tmp/usr/doc/$(npackage)/changelog.Debian cp debian/copyright debian/tmp/usr/doc/$(npackage) dpkg-shlibdeps debian/tmp/usr/lib/libpgplot.so.$(version) dpkg-gencontrol chown -R root.root debian/tmp chmod -R go=rX debian/tmp dpkg --build debian/tmp .. define checkdir test -f debian/rules endef binary: binary-indep binary-arch checkroot: $(checkdir) test root = "`whoami`" .PHONY: binary binary-arch binary-indep clean checkroot debian/copyright0000664000000000000000000000612610671106026011127 0ustar Below is a verbatim copy of the PGPLOT library copyright. The Debian package was first made by John Lapeyre and is now updated and maintained by Carlo Segre / This package may be autobuilt as it is permitted to distribute both source and binaries. The source was obtained from http://astro.caltech.edu/~tjp/pgplot/ . More information can be obtained at this site. *********************************************************************** * PGPLOT Fortran Graphics Subroutine Library * * Version 5.2.2 * *********************************************************************** *********************************************************************** * * * Copyright (c) 1983-2001 by the California Institute of Technology. * * All rights reserved. * * * * For further information, contact: * * Dr. T. J. Pearson * * 105-24 California Institute of Technology, * * Pasadena, California 91125, USA * * * * tjp@astro.caltech.edu * * * * The PGPLOT library, both binary and source, and the PGPLOT manual * * `PGPLOT Graphics Subroutine Library' are copyrighted, but available * * without fee for education, academic research and non-commercial * * purposes. Ownership of the software remains with the California * * Institute of Technology. Users may distribute the binary and * * source code to third parties provided that the copyright notice and * * this statement appears on all copies and that no charge is made for * * such copies. Any entity wishing to integrate all or part of the * * source code into a product for commercial use or resale should * * contact the author at the above address. * * * * THE CALIFORNIA INSTITUTE OF TECHNOLOGY MAKES NO REPRESENTATIONS * * ABOUT THE SUITABILITY OF THE SOFTWARE FOR ANY PURPOSE. IT IS * * PROVIDED `AS IS' WITHOUT EXPRESS OR IMPLIED WARRANTY. THE * * CALIFORNIA INSTITUTE OF TECHNOLOGY SHALL NOT BE LIABLE FOR ANY * * DAMAGES SUFFERED BY THE USER OF THIS SOFTWARE. * * * * The software may have been developed under agreements between the * * California Institute of Technology and the Federal Government which * * entitle the Government to certain rights. * * * *********************************************************************** debian/buildnotes0000664000000000000000000000032110456230553011262 0ustar Strange ... On version pgplot (5.2-5) egcc -c *.c in builddir gives "Aborted" (or gcc as well) but compiling them one at a time is apparantly ok... Changed src/grgfil.f to reflect debian installation dirs. debian/pgxwin_server.10000664000000000000000000000474610456230553012172 0ustar .TH PGXWIN_SERVER 1 "Apr 18 2001" .\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection .\" other parms are allowed: see man(7), man(1) .SH NAME pgxwin_server \- X-window sever for pgplot plotting subroutine library .SH "DESCRIPTION" This manual page documents briefly the .BR pgxwin_server command. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. .PP .B pgplot is a large collection of plotting routines callable from C, as well as FORTRAN (also perl, see below). Many drivers are included to render the plots on devices. To use PGPLOT, you must set the environment variable, PGPLOT_DIR to "/usr/lib/pgplot". That is , under csh, type setenv PGPLOT_DIR /usr/lib/pgplot . Under bash, type PGPLOT_DIR="/usr/lib/pgplot";export PGPLOT_DIR; .PP The default device to be used for the plots can be specified by the PGPLOT_DEV environment variable. .PP .B pgxwin_server is the sever program for the /xwindow and /xserve devices for pgplot. .B pgxwin_server is automatically started by the /xw and /xs driver when first called upon. pgxwin_server then continues to serve windows to subsequent PGPLOT programs and remains running indefinitely. In order that it be possible to kill the server, an icon window for it is displayed. Window managers generally provide a way to interactively kill windows, and if this is applied to the server window, then the server will close any inactive /xserve windows, and if no active /xw or /xs windows remain, then the server will shut itself down cleanly. Note that inactive windows are distinguishable from active windows by the appearance of a skull-and-crossbones cursor. .PP If your default display is correctly set then simply typing: .PP pgxwin_server .PP with no arguments should start the server, and the server icon should appear on the display. If an alternate display is desired then the default display can be overridden with the -display argument. Other options to override selected X resources from the command-line are also available. To see them type: .PP pgxwin_server -help .PP .SH "SEE ALSO" Documentation on the library can be found in the directory, .B /usr/doc/pgplot . There exists a perl interface to pgplot, pgperl, also available for Debian. Extensive documentation can be found at .B http://astro.caltech.edu/~tjp/pgplot/ .SH AUTHOR This manual page was written by Gopal Narayanan for the Debian GNU/Linux system (but may be used by others). debian/overrides0000664000000000000000000000026610612453001011111 0ustar # The name PGPLOT in the debian/copyright file causes lintian to assume that # this package has a GPL license. pgplot5 binary: copyright-should-refer-to-common-license-file-for-gpl debian/ppdriv_64.f0000664000000000000000000004021711365057620011165 0ustar C*PPDRIV -- PGPLOT PPM drivers C+ SUBROUTINE PPDRIV (IFUNC, RBUF, NBUF, CHR, LCHR, MODE) INTEGER IFUNC, NBUF, LCHR, MODE REAL RBUF(*) CHARACTER*(*) CHR * * PGPLOT driver for Portable Pixel Map (PPM) files with 'true color' * capability. * * Supported device: PPM (P6) file format * * Device type codes: /PPM or /VPPM * * Default device name: pgplot.ppm. * * If you have more than one image to plot (i.e. use PGPAGE) with this * device, subsequent pages will be named: pgplot2.ppm, pgplot3.ppm, * etc, disrespective of the device name you specified. * You can however bypass this by specifying a device name including a * number sign (#), which will henceforth be replaced by the pagenumber. * Example: page#.ppm will produce files page1.ppm, page2.ppm, etc. * * Default view surface dimensions are: * - PPM : 850 x 680 pixels * - VPPM : 680 x 850 pixels * Default width and height can be overriden by specifying environment * variables * PGPLOT_PPM_WIDTH (default 850) * PGPLOT_PPM_HEIGHT (default 680) * The nominal scale is 85 pixels per inch. * * Color capability: * Indices 0 to 255 are supported. * Default colors for indices 0 to 15 are implemented. * Color representation can be changed with PGSCR; color changes * affect subsequently drawn pixels only, not previously drawn * pixels. Thus the image is not limited to 256 different colors. * * Obtaining hardcopy: Use a PPM viewer or converter. *= * 9-Aug-1993 - Created by Remko Scharroo * 6-Jul-1994 - Adapted to new PGPLOT version 4.9h * 4-Aug-1994 - Use FASTIO. * 9-Aug-1994 - New scheme for line plotting * 16-Aug-1994 - Provide multi-image plotting. * 16-Nov-1994 - Revised (T. Pearson). * 28-Dec-1995 - Prevent concurrent access [TJP]. * 29-Apr-1996 - Use GRCTOI to decode environment variables [TJP]. *----------------------------------------------------------------------- CHARACTER*(*) LTYPE, PTYPE, DEFNAM INTEGER DWD, DHT PARAMETER ( 1 LTYPE= 'PPM (Portable Pixel Map file, landscape orientation)', 2 PTYPE= 'VPPM (Portable Pixel Map file, portrait orientation)') PARAMETER (DEFNAM='pgplot.ppm') PARAMETER (DWD=850, DHT=680) REAL XRES, YRES PARAMETER (XRES=85., YRES=XRES) C INTEGER UNIT, IC, CVAL, CTABLE(3,0:255), IER, I, L, LL, NPICT INTEGER BX, BY, IX0, IY0, IX1, IY1, R, G, B, STATE, USERH, USERW INTEGER CDEFLT(3,0:15), JUNK INTEGER GRGMEM, GRFMEM, GROFIL, GRCFIL, GRCTOI CHARACTER*80 MSG, INSTR, FILENM C C Note: for 64-bit operating systems, change the following C declaration to INTEGER*8: C INTEGER*8 PIXMAP C SAVE UNIT, IC, CVAL, CTABLE, BX, BY, PIXMAP, NPICT, CDEFLT SAVE STATE DATA CDEFLT /000,000,000, 255,255,255, 255,000,000, 000,255,000, 1 000,000,255, 000,255,255, 255,000,255, 255,255,000, 2 255,128,000, 128,255,000, 000,255,128, 000,128,255, 3 128,000,255, 255,000,128, 085,085,085, 170,170,170/ DATA STATE /0/ C----------------------------------------------------------------------- C GOTO( 10, 20, 30, 40, 50, 60, 70, 80, 90,100, 1 110,120,130,140,150,160,170,180,190,200, 2 210,220,230,240,250,260,270,280,290), IFUNC 900 WRITE (MSG,'(I10)') IFUNC CALL GRWARN('Unimplemented function in PPM device driver:' 1 //MSG) NBUF = -1 RETURN C C--- IFUNC = 1, Return device name ------------------------------------- C 10 IF (MODE.EQ.1) THEN CHR = LTYPE LCHR = LEN(LTYPE) ELSE IF (MODE.EQ.2) THEN CHR = PTYPE LCHR = LEN(PTYPE) ELSE CALL GRWARN('Requested MODE not implemented in PPM driver') ENDIF RETURN C C--- IFUNC = 2, Return physical min and max for plot device, and range C of color indices --------------------------------------- C 20 RBUF(1) = 0 RBUF(2) = -1 RBUF(3) = 0 RBUF(4) = -1 RBUF(5) = 0 RBUF(6) = 255 NBUF = 6 RETURN C C--- IFUNC = 3, Return device resolution ------------------------------- C 30 RBUF(1) = XRES RBUF(2) = YRES RBUF(3) = 1 NBUF = 3 RETURN C C--- IFUNC = 4, Return misc device info -------------------------------- C (This device is Hardcopy, supports rectangle fill, pixel C primitives, and query color rep.) C 40 CHR = 'HNNNNRPNYN' LCHR = 10 RETURN C C--- IFUNC = 5, Return default file name ------------------------------- C 50 CHR = DEFNAM LCHR = LEN(DEFNAM) RETURN C C--- IFUNC = 6, Return default physical size of plot ------------------- C 60 RBUF(1) = 0 RBUF(2) = BX-1 RBUF(3) = 0 RBUF(4) = BY-1 NBUF = 4 RETURN C C--- IFUNC = 7, Return misc defaults ----------------------------------- C 70 RBUF(1) = 1 NBUF=1 RETURN C C--- IFUNC = 8, Select plot -------------------------------------------- C 80 CONTINUE RETURN C C--- IFUNC = 9, Open workstation --------------------------------------- C 90 CONTINUE C -- check for concurrent access IF (STATE.EQ.1) THEN CALL GRWARN('a PGPLOT PPM file is already open') RBUF(1) = 0 RBUF(2) = 0 RETURN END IF C -- dimensions of plot buffer USERW = 0 USERH = 0 CALL GRGENV('PPM_WIDTH', INSTR, L) LL = 1 IF (L.GT.0) USERW = GRCTOI(INSTR(:L),LL) CALL GRGENV('PPM_HEIGHT', INSTR, L) LL = 1 IF (L.GT.0) USERH = GRCTOI(INSTR(:L),LL) IF (MODE.EQ.1) THEN * -- Landscape BX = DWD IF (USERW.GE.8) BX = USERW BY = DHT IF (USERH.GE.8) BY = USERH ELSE * -- Portrait BX = DHT IF (USERH.GE.8) BX = USERH BY = DWD IF (USERW.GE.8) BY = USERW END IF NPICT=1 * -- Initialize color table DO 95 I=0,15 CTABLE(1,I) = CDEFLT(1,I) CTABLE(2,I) = CDEFLT(2,I) CTABLE(3,I) = CDEFLT(3,I) 95 CONTINUE DO 96 I=16,255 CTABLE(1,I) = 128 CTABLE(2,I) = 128 CTABLE(3,I) = 128 96 CONTINUE * FILENM = CHR(:LCHR) CALL GRPP10 (FILENM, NPICT, MSG) UNIT = GROFIL (MSG) RBUF(1) = UNIT IF (UNIT.LT.0) THEN CALL GRWARN('Cannot open output file for PPM plot') RBUF(2) = 0 ELSE RBUF(2) = 1 STATE = 1 END IF RETURN C C--- IFUNC=10, Close workstation --------------------------------------- C 100 CONTINUE STATE = 0 RETURN C C--- IFUNC=11, Begin picture ------------------------------------------- C 110 CONTINUE BX = NINT(RBUF(1))+1 BY = NINT(RBUF(2))+1 C -- allocate buffer with 4 bytes per pixel IER = GRGMEM(4*BX*BY, PIXMAP) IF (IER.NE.1) THEN CALL GRGMSG(IER) CALL GRWARN('Failed to allocate plot buffer.') BX = 0 BY = 0 PIXMAP = 0 END IF C -- initialize to zero (background color) IF (PIXMAP.NE.0) : CALL GRPP03(1, 1, BX, BY, 0, BX, BY, %VAL(PIXMAP)) C -- open new file if necessary IF (NPICT.GT.1) THEN CALL GRPP10 (FILENM, NPICT, MSG) UNIT = GROFIL (MSG) IF (UNIT.LT.0) : CALL GRWARN('Cannot open output file for PPM plot') C -- no way to return error status! END IF RETURN C C--- IFUNC=12, Draw line ----------------------------------------------- C 120 CONTINUE IX0=NINT(RBUF(1))+1 IX1=NINT(RBUF(3))+1 IY0=BY-NINT(RBUF(2)) IY1=BY-NINT(RBUF(4)) IF (PIXMAP.NE.0) : CALL GRPP01(IX0, IY0, IX1, IY1, CVAL, BX, BY, %VAL(PIXMAP)) RETURN C C--- IFUNC=13, Draw dot ------------------------------------------------ C 130 CONTINUE IX0=NINT(RBUF(1))+1 IY0=BY-NINT(RBUF(2)) IF (PIXMAP.NE.0) : CALL GRPP01(IX0, IY0, IX0, IY0, CVAL, BX, BY, %VAL(PIXMAP)) RETURN C C--- IFUNC=14, End picture --------------------------------------------- C 140 CONTINUE IF (PIXMAP.NE.0) THEN CALL GRPP02(UNIT, BX, BY, %VAL(PIXMAP)) IF (UNIT.GE.0) JUNK = GRCFIL(UNIT) NPICT = NPICT+1 IER = GRFMEM(4*BX*BY, PIXMAP) IF (IER.NE.1) THEN CALL GRGMSG(IER) CALL GRWARN('Failed to deallocate plot buffer.') END IF END IF RETURN C C--- IFUNC=15, Select color index -------------------------------------- C 150 CONTINUE IC = NINT(RBUF(1)) IF (IC.LT.0 .OR. IC.GT.255) IC = 1 R = CTABLE(1,IC) G = CTABLE(2,IC) B = CTABLE(3,IC) CVAL = R + 256*(G + 256*B) RETURN C C--- IFUNC=16, Flush buffer. ------------------------------------------- C (Not used.) C 160 CONTINUE RETURN C C--- IFUNC=17, Read cursor. -------------------------------------------- C (Not implemented: should not be called) C 170 CONTINUE GOTO 900 C C--- IFUNC=18, Erase alpha screen. ------------------------------------- C (Not implemented: no alpha screen) C 180 CONTINUE RETURN C C--- IFUNC=19, Set line style. ----------------------------------------- C (Not implemented: should not be called) C 190 CONTINUE GOTO 900 C C--- IFUNC=20, Polygon fill. ------------------------------------------- C (Not implemented: should not be called) C 200 CONTINUE GOTO 900 C C--- IFUNC=21, Set color representation. ------------------------------- C 210 CONTINUE I = NINT(RBUF(1)) IF (I.GE.0 .AND. I.LE.255) THEN CTABLE(1, I) = NINT(RBUF(2)*255) CTABLE(2, I) = NINT(RBUF(3)*255) CTABLE(3, I) = NINT(RBUF(4)*255) END IF RETURN C C--- IFUNC=22, Set line width. ----------------------------------------- C (Not implemented: should not be called) C 220 CONTINUE GOTO 900 C C--- IFUNC=23, Escape -------------------------------------------------- C (Not implemented: ignored) C 230 CONTINUE RETURN C C--- IFUNC=24, Rectangle fill ------------------------------------------ C 240 CONTINUE IX0=NINT(RBUF(1))+1 IX1=NINT(RBUF(3))+1 IY1=BY-NINT(RBUF(2)) IY0=BY-NINT(RBUF(4)) IF (PIXMAP.NE.0) : CALL GRPP03(IX0, IY0, IX1, IY1, CVAL, BX, BY, %VAL(PIXMAP)) RETURN C C--- IFUNC=25, Not implemented ----------------------------------------- C 250 CONTINUE RETURN C C--- IFUNC=26, Line of pixels ------------------------------------------ C 260 CONTINUE IF (PIXMAP.NE.0) : CALL GRPP04(NBUF, RBUF, BX, BY, %VAL(PIXMAP), CTABLE) RETURN C C--- IFUNC=27, Not implemented ----------------------------------------- C 270 CONTINUE RETURN C C--- IFUNC=28, Not implemented ----------------------------------------- C 280 CONTINUE RETURN C C--- IFUNC=29, Query color representation. ----------------------------- C 290 CONTINUE I = RBUF(1) RBUF(2) = CTABLE(1,I)/255.0 RBUF(3) = CTABLE(2,I)/255.0 RBUF(4) = CTABLE(3,I)/255.0 NBUF = 4 RETURN C----------------------------------------------------------------------- END **GRPP01 -- PGPLOT PPM driver, draw line *+ SUBROUTINE GRPP01 (IX0, IY0, IX1, IY1, ICOL, BX, BY, PIXMAP) INTEGER IX0, IY0, IX1, IY1 INTEGER ICOL, BX, BY, PIXMAP(BX,BY) * * Draw a straight-line segment from absolute pixel coordinates * (IX0, IY0) to (IX1, IY1). * * Arguments: * IX0, IY0 (input): Starting point of line. * IX1, IY1 (input): End point of line. * ICOL (input): Color value. * BX, BY (input): dimensions of PIXMAP. * PIXMAP (input/output): The image data buffer. *- * 9-Aug-1994 - Recreated by Remko Scharroo from GRGI01 by Ge van Geldorp * Improved algorithm. *----------------------------------------------------------------------- INTEGER IX, IY, IS REAL D C IF (IX0.EQ.IX1 .AND. IY0.EQ.IY1) THEN PIXMAP(IX0,IY0)=ICOL ELSE IF (ABS(IY1-IY0).GT.ABS(IX1-IX0)) THEN D=(IX1-IX0)/REAL(IY1-IY0) IS=1 IF (IY1.LT.IY0) IS=-1 DO 10 IY=IY0,IY1,IS IX=NINT(IX0+(IY-IY0)*D) PIXMAP(IX,IY)=ICOL 10 CONTINUE ELSE D=(IY1-IY0)/REAL(IX1-IX0) IS=1 IF (IX1.LT.IX0) IS=-1 DO 20 IX=IX0,IX1,IS IY=NINT(IY0+(IX-IX0)*D) PIXMAP(IX,IY)=ICOL 20 CONTINUE ENDIF END **GRPP02 -- PGPLOT PPM driver, write PPM image *+ SUBROUTINE GRPP02 (UNIT, BX, BY, PIXMAP) INTEGER UNIT, BX, BY, PIXMAP(*) * * This routine copies the image buffer to an output buffer. A PPM image * header and the output buffer are written to UNIT. * * Arguments: * UNIT (input): Output unit * BX, BY (input): Image size * PIXMAP (input): Image data *- * 10-Aug-1993 - Created by Remko Scharroo * 16-Nov-1994 - Rewritten by T. Pearson *----------------------------------------------------------------------- * BUFSIZ must be a multiple of 3 (and not larger than 500 for * portability to AIX) INTEGER BUFSIZ PARAMETER (BUFSIZ=498) INTEGER I, N, IER, IBUF, L1, L2 INTEGER GRTRIM, GRWFCH CHARACTER*128 HEAD CHARACTER*20 USER CHARACTER*20 TODAY CHARACTER*(BUFSIZ) BUF LOGICAL BAD * * Write the header (magic number = P6) * CALL GRUSER(USER,L1) CALL GRDATE(TODAY,L2) WRITE (HEAD, 1000) USER(:L1), TODAY(:L2),CHAR(10), : BX, BY, CHAR(10), 255, CHAR(10) 1000 FORMAT ('P6 # PGPLOT PPM image ',A,1X,A,A1, I5,1X,I5,A1, I3,A1) N = GRTRIM(HEAD) IER = GRWFCH(UNIT, HEAD(1:N)) IF (IER.NE.N) CALL GRWARN('Failed writing PPM header') * * Write the pixel data as R,G,B components * N=BX*BY IBUF=0 BAD = .FALSE. DO 10 I=1,N BUF(IBUF+1:IBUF+1) = CHAR(MOD(PIXMAP(I),256)) BUF(IBUF+2:IBUF+2) = CHAR(MOD(PIXMAP(I)/256,256)) BUF(IBUF+3:IBUF+3) = CHAR(PIXMAP(I)/(256*256)) IBUF = IBUF+3 IF (IBUF.GE.BUFSIZ) THEN IER = GRWFCH(UNIT, BUF) IF (IER.NE.IBUF) BAD = .TRUE. IBUF = 0 END IF 10 CONTINUE IF (IBUF.GT.0) THEN IER = GRWFCH(UNIT, BUF(:IBUF)) IF (IER.NE.IBUF) BAD = .TRUE. IBUF = 0 END IF IF (BAD) CALL GRWARN('Failed writing PPM data') END **GRPP03 -- PGPLOT PPM driver, fill rectangle *+ SUBROUTINE GRPP03 (IX0, IY0, IX1, IY1, ICOL, BX, BY, PIXMAP) INTEGER IX0, IY0, IX1, IY1 INTEGER ICOL, BX, BY, PIXMAP(BX,BY) * * Arguments: * IX0, IY0 (input): Lower left corner. * IX1, IY1 (input): Upper right corner. * ICOL (input): Color value. * BX, BY (input): dimensions of PIXMAP. * PIXMAP (input/output): The image data buffer. *----------------------------------------------------------------------- INTEGER IX, IY C DO 20 IY=IY0,IY1 DO 10 IX=IX0,IX1 PIXMAP(IX,IY) = ICOL 10 CONTINUE 20 CONTINUE END **GRPP04 -- PGPLOT PPM driver, fill image line *+ SUBROUTINE GRPP04(NBUF,RBUF,BX,BY,PIXMAP,CTABLE) INTEGER I,J,NBUF,BX,BY,N,IC REAL RBUF(NBUF) INTEGER PIXMAP(BX,BY) INTEGER CTABLE(3,0:255) INTEGER R, G, B *- I = NINT(RBUF(1))+1 J = BY-NINT(RBUF(2)) DO 10 N=3,NBUF IC=RBUF(N) R = CTABLE(1,IC) G = CTABLE(2,IC) B = CTABLE(3,IC) PIXMAP(I+N-3,J) = R + 256*(G + 256*B) 10 CONTINUE END **GRPP10 -- Replace # in filename by picture number * SUBROUTINE GRPP10 (NAME1, NP, NAME2) CHARACTER*(*) NAME1 CHARACTER*(*) NAME2 CHARACTER*80 TMP INTEGER GRTRIM INTEGER NP, IDX, L, LN LN = GRTRIM(NAME1) IDX = INDEX(NAME1,'#') IF (IDX.GT.0) THEN C -- if the supplied name contains a #-character, replace C it with the page number CALL GRFAO(NAME1, L, TMP, NP, 0, 0, 0) ELSE IF (NP.EQ.1) THEN C -- if this is the first page, use the supplied name NAME2 = NAME1 RETURN ELSE IF (LN+2.LE.LEN(NAME1)) THEN C -- append an underscore and the page number to the supplied C name NAME1(LN+1:LN+2) = '_#' CALL GRFAO(NAME1, L, TMP, NP, 0, 0, 0) ELSE C -- last resort: invent a new name CALL GRFAO('pgplot#.ppm', L, TMP, NP, 0, 0, 0) END IF CALL GRWARN ('Writing new PPM image as: '//TMP(:L)) NAME2 = TMP(:L) END debian/g77_gcc.conf.debian0000664000000000000000000001060111661641571012506 0ustar # The GNU gfortran FORTRAN compiler and Gnu gcc C compiler on an elf-system. #----------------------------------------------------------------------- # Optional: Needed by XWDRIV (/xwindow and /xserve) and # X2DRIV (/xdisp and /figdisp). # The arguments needed by the C compiler to locate X-window include files. XINCL="-I/usr/X11R6/include" # Optional: Needed by XMDRIV (/xmotif). # The arguments needed by the C compiler to locate Motif, Xt and # X-window include files. MOTIF_INCL="$XINCL" # Optional: Needed by XADRIV (/xathena). # The arguments needed by the C compiler to locate Xaw, Xt and # X-window include files. ATHENA_INCL="$XINCL" # Optional: Needed by TKDRIV (/xtk). # The arguments needed by the C compiler to locate Tcl, Tk and # X-window include files. TK_INCL="-I/usr/include $XINCL" # Optional: Needed by RVDRIV (/xrv). # The arguments needed by the C compiler to locate Rivet, Tcl, Tk and # X-window include files. RV_INCL="" # Mandatory. # The FORTRAN compiler to use. FCOMPL="gfortran" # Mandatory. # The FORTRAN compiler flags to use when compiling the pgplot library. # (NB. makemake prepends -c to $FFLAGC where needed) FFLAGC="-u -Wall -fPIC -O3" # Mandatory. # The FORTRAN compiler flags to use when compiling fortran demo programs. # This may need to include a flag to tell the compiler not to treat # backslash characters as C-style escape sequences FFLAGD="-fno-backslash" # Mandatory. # The C compiler to use. CCOMPL="gcc" # Mandatory. # The C compiler flags to use when compiling the pgplot library. CFLAGC="-Wall -fPIC -DPG_PPU -O3" # Mandatory. # The C compiler flags to use when compiling C demo programs. CFLAGD="-Wall -O3" # Optional: Only needed if the cpgplot library is to be compiled. # The flags to use when running pgbind to create the C pgplot wrapper # library. (See pgplot/cpg/pgbind.usage) PGBIND_FLAGS="bsd" # Mandatory. # The library-specification flags to use when linking normal pgplot # demo programs. LIBS="-L/usr/X11R6/lib -lX11" # Optional: Needed by XMDRIV (/xmotif). # The library-specification flags to use when linking motif # demo programs. MOTIF_LIBS="-lXm -lXt $LIBS" # Optional: Needed by XADRIV (/xathena). # The library-specification flags to use when linking athena # demo programs. ATHENA_LIBS="-lXaw -lXt -lXmu -lXext $LIBS" # Optional: Needed by TKDRIV (/xtk). # The library-specification flags to use when linking Tk demo programs. # Note that you may need to append version numbers to -ltk and -ltcl. TK_LIBS="-L/usr/lib -ltk -ltcl $LIBS -ldl" # Mandatory. # On systems that have a ranlib utility, put "ranlib" here. On other # systems put ":" here (Colon is the Bourne-shell do-nothing command). RANLIB="ranlib" # Optional: Needed on systems that support shared libraries. # The name to give the shared pgplot library. SHARED_LIB="libpgplot.so" # Optional: Needed if SHARED_LIB is set. # How to create a shared library from a trailing list of object files. SHARED_LD_PGPLOT_OPTS="-o $SHARED_LIB -Wl,-soname,libpgplot.so.\$(VM)" SHARED_LD_CPGPLOT_OPTS="-o libcpgplot.so -Wl,-soname,libcpgplot.so.\$(VM)" SHARED_LD="gfortran -shared" # Optional: # On systems such as Solaris 2.x, that allow specification of the # libraries that a shared library needs to be linked with when a # program that uses it is run, this variable should contain the # library-specification flags used to specify these libraries to # $SHARED_LD SHARED_LIB_LIBS="-L/usr/X11R6/lib -lX11 -lpng -lc -lgfortran" SHARED_LIB_CPGPLOT_LIBS="-L. -lpgplot" # Optional: # Compiler name used on Next systems to compile objective-C files. MCOMPL="" # Optional: # Compiler flags used with MCOMPL when compiling objective-C files. MFLAGC="" # Optional: (Actually mandatory, but already defined by makemake). # Where to look for any system-specific versions of the files in # pgplot/sys. Before evaluating this script, makemake sets SYSDIR to # /wherever/pgplot/sys_$OS, where $OS is the operating-system name # given by the second command-line argument of makemake. If the # present configuration is one of many for this OS, and it needs # different modifications to files in pgplot/sys than the other # configurations, then you should create a subdirectory of SYSDIR, # place the modified files in it and change the following line to # $SYSDIR="$SYSDIR/subdirectory_name". SYSDIR="$SYSDIR" debian/changelog0000664000000000000000000002357512267034266011066 0ustar pgplot5 (5.2.2-19ubuntu1) trusty; urgency=low * Use multiarch lib path for linker target modification. -- Daniel T Chen Sun, 19 Jan 2014 15:41:57 -0500 pgplot5 (5.2.2-19) unstable; urgency=low * Change Suggests to libpng-dev instead of libpng12-dev. -- Carlo Segre Sun, 04 Mar 2012 22:47:21 -0600 pgplot5 (5.2.2-18) unstable; urgency=low * [Colin Watson] Fix link order so that inter-library linkage of libpgplot.so and libcpgplot.so is recorded correctly with 'ld --as-needed' (Closes: #648950). * Changed to source format 3.0 (quilt) * Add targets for build-indep and build-arch. * Change Build-Depends to unversioned libpng-dev * Upgrade to Standards-Version 3.9.2 (no changes) -- Carlo Segre Tue, 22 Nov 2011 00:18:34 -0600 pgplot5 (5.2.2-17) unstable; urgency=low * Apply patches when building on 64-bit systems (Closes: #577815) -- Carlo Segre Sun, 25 Apr 2010 10:34:46 -0500 pgplot5 (5.2.2-16) unstable; urgency=low * Add debian/source/format file * Remove dh_undocumnted call in debian/rules * Add ${misc:Depends} to debian/control * Change doc-base section to Science/Data Analysis * upgrade to Standards-Version 3.8.4 (no changes) -- Carlo Segre Fri, 23 Apr 2010 23:24:00 -0500 pgplot5 (5.2.2-15) unstable; urgency=low * Removed Gopal Narayanan from Uploaders upon request of MIA team (Closes: #503490). * Replaced Depends on x-dev with x11proto-core-dev * Upgraded to Standards-Version 3.8.1 (no changes required). -- Carlo Segre Sun, 10 May 2009 13:14:34 -0500 pgplot5 (5.2.2-14) unstable; urgency=low * Remove debian/shlibs.local which was causing the insertion of the pgplot dependency (thanks to Raphael Hertzog). -- Carlo Segre Tue, 25 Mar 2008 13:59:46 -0500 pgplot5 (5.2.2-13) unstable; urgency=low * Insert static library dependencies to avoid pgplot dependency being inserted. This is only a temporary fix! (Closes: #472617) * Revert the Provides: pgplot to Replaces/Conflicts. -- Carlo Segre Tue, 25 Mar 2008 09:30:02 -0500 pgplot5 (5.2.2-12) unstable; urgency=low * Change Build-Depends and Suggests in debian/control because of libungif4 -> libgif transition. * Replace Conflicts/Replaces: pgplot with Provides: pgplot since debhelper is now inserting dependency on pgplot. * Update to Standards-Verison 3.7.3 (no changes). -- Carlo Segre Mon, 24 Mar 2008 22:03:25 -0500 pgplot5 (5.2.2-11) unstable; urgency=low * Properly link libpng (Closes: #422365) -- Carlo Segre Mon, 10 Sep 2007 12:25:12 -0500 pgplot5 (5.2.2-10) unstable; urgency=low * Courtesy of Niko Tyni: - Remove unneeded debian/compc, a "hack to get around a strange makefile problem" that was ignoring compiler flags. - Include a shared version of the C binding library, needed by the Perl bindings. (Closes: #407462) * Transition to gfortran since g77 is being removed for lenny -- Carlo Segre Sun, 09 Sep 2007 19:07:26 -0500 pgplot5 (5.2.2-9) unstable; urgency=low * Changing Maintainer field upon request of mia@qa.debian.org * Designating package as autobuildable -- Carlo Segre Sat, 21 Apr 2007 12:44:09 -0500 pgplot5 (5.2.2-8) unstable; urgency=low * Adding co-maintainer: Carlo Segre * Applying NMU patches, thanks to Matej Vela : libxaw-dev (Closes: #375459) dh_installdocs (Closes: #376822) -- Carlo Segre Sat, 15 Jul 2006 16:18:41 -0500 pgplot5 (5.2.2-7.1) unstable; urgency=medium * Non-maintainer upload. * Build against libxaw7. Closes: #375459. * debian/rules: Remove duplicate invocation of dh_installdocs that was causing warnings from install-docs on removal. Closes: #376822. -- Matej Vela Thu, 13 Jul 2006 07:32:39 +0200 pgplot5 (5.2.2-7) unstable; urgency=low * Closing NMU bug for build-depends on png library. Closes: #328345 * Fixed libpgplot.so is not linked against -lX11 bug. Thanks Achim Bohnet for the patch. Closes: #281832 * Closes bug relating to NMU patch for build-depends. Thanks Steinar H. Gunderson . Closes: #349385 * Allowing GIF output since Unisys LZW patent has long expired. Thanks Achim Bohnet . Closes: #281882 * Closes fixed FTBFS bug from NMU. Closes: #346934 -- Gopal Narayanan Fri, 16 Jun 2006 10:43:17 -0400 pgplot5 (5.2.2-6.2) unstable; urgency=low * Non-maintainer upload. * Replace build-dependency on xlibs-dev with an explicit build-dependency on each required package. -- Steinar H. Gunderson Sun, 22 Jan 2006 18:34:29 +0100 pgplot5 (5.2.2-6.1) unstable; urgency=low * NMU * Update Build-Depend for libpng12 (Closes: #328345) -- Anand Kumria Sat, 29 Oct 2005 16:55:13 +1000 pgplot5 (5.2.2-6) unstable; urgency=low * Removed PIC compilation for static library. Closes: #146077 * Remove old dh_dhelp and use dh_installdocs instead. Closes: #248551 -- Gopal Narayanan Wed, 9 Jun 2004 09:45:59 -0400 pgplot5 (5.2.2-5) unstable; urgency=low * Added Versaterm Pro for terminal emulation for Macs. Thanks John Howe . Closes: #162198 -- Gopal Narayanan Tue, 24 Sep 2002 19:11:11 -0400 pgplot5 (5.2.2-4) unstable; urgency=low * Added xlibs-dev to Build-Depends * Added note to README.Debian about needing other dev packages if one wants to develop with pgplot5. Also added Suggests field. Thanks TANAKA Atushi . Closes: #133382 -- Gopal Narayanan Thu, 21 Mar 2002 10:03:35 -0500 pgplot5 (5.2.2-3) unstable; urgency=low * Fixed typo in debian/g77_gcc.conf.debian tp remove reference to f2c. Thanks Sergio Gelato . Closes: #138897 * Corrected the long description line problem. Thanks Yotam Rubin . Closes: #130982 * Some lintian-induced cleanups * Added doc-base entry for dhelp -- Gopal Narayanan Mon, 18 Mar 2002 14:11:15 -0500 pgplot5 (5.2.2-2) unstable; urgency=low * Make packages compiled against pgplot be version dependent on this version; added -V to dh_makeshlibdeps; this will fix problems in packages such as pgperl, wip, etc -- Gopal Narayanan Tue, 25 Sep 2001 09:40:39 -0400 pgplot5 (5.2.2-1) unstable; urgency=low * New upstream release * Added CGM drivers, removed GIF drivers (possible Unisys patent problem) * Added new PNG drivers * Updated README.Debian with compilation directions -- Gopal Narayanan Fri, 6 Jul 2001 13:31:52 -0400 pgplot5 (5.2-16) unstable; urgency=low * Added dhelp to Build-Depends. Closes: #102793 -- Gopal Narayanan Thu, 5 Jul 2001 10:24:13 -0400 pgplot5 (5.2-15) unstable; urgency=low * Added manpage for pgxwin_server * Upgraded standards version * g77 added to Build-Depends. Closes: #94527 -- Gopal Narayanan Thu, 19 Apr 2001 14:17:55 -0400 pgplot5 (5.2-14) unstable; urgency=low * Modified permissions for two maintainer perl scripts to be able to better compile from source -- Gopal Narayanan Wed, 19 Jul 2000 13:27:42 -0400 pgplot5 (5.2-13) unstable frozen; urgency=low * Fixes can't build from source. Closes: #57226,#59499 -- Gopal Narayanan Sun, 5 Mar 2000 18:49:12 -0500 pgplot5 (5.2-12) unstable frozen; urgency=low * Add pgplot.html to dhelp system. Closes: #58628 * Turned off unsupported X2DRIV driver for pgdisp -- Gopal Narayanan Wed, 23 Feb 2000 10:38:06 -0500 pgplot5 (5.2-11) unstable frozen; urgency=low * Fixed executable permission errors in two binaries -- Gopal Narayanan Mon, 10 Jan 2000 17:20:24 -0500 pgplot5 (5.2-10) unstable frozen; urgency=low * New maintainer * can not be built from freshly unpacked source Closes: #46669 * Fixed numerous lintian complaints * Upgrade to use debhelper commands -- Gopal Narayanan Thu, 30 Dec 1999 13:02:18 -0500 pgplot5 (5.2-9) unstable frozen; urgency=low * Rebuild for potato -- John Lapeyre Sat, 19 Jun 1999 15:55:43 -0700 pgplot5 (5.2-8) unstable frozen; urgency=low * recompile with libc6 2.0.7u-6 -- John Lapeyre Thu, 3 Dec 1998 01:54:50 -0700 pgplot5 (5.2-7) unstable; urgency=low * fix shared lib name and links * add major version to package name * remove some i386-centrisms -- John Lapeyre Wed, 7 Oct 1998 02:19:44 -0700 pgplot (5.2-6) unstable; urgency=low * build shared with fPIC, static without * fix permissions and a few other details -- John Lapeyre Tue, 4 Aug 1998 16:34:33 -0700 pgplot (5.2-5) unstable; urgency=low * Fix description, and spelling and some other things * Compile with egcc. -- John Lapeyre Thu, 30 Jul 1998 14:11:32 -0700 pgplot (5.2-4) unstable; urgency=low * Trying to get section and distribution right. -- John Lapeyre Wed, 25 Mar 1998 03:44:24 -0700 pgplot (5.2-3) non-free; urgency=low * Changed section to math * Changed distribution to non-free * Something in compiler changed so fPIC option won't work. no good for .so libraries anyway. Took it out. * Added symlink libpgplot.so.5 to libpgplot.so -- John Lapeyre Sat, 31 Jan 1998 23:02:05 -0700 pgplot (5.2-2) unstable; urgency=low * Initial Release. * 5.2-1 never made it to the distribution, but some have it. -- John Lapeyre Fri, 16 Jan 1998 12:49:09 -0700 debian/manpages0000664000000000000000000000002710762301525010706 0ustar debian/pgxwin_server.1 debian/dirs0000664000000000000000000000014010612453367010056 0ustar usr/lib usr/lib/pgplot5 usr/bin usr/include usr/share/doc/pgplot5 usr/share/lintian/overrides/ debian/gidriv_64.f0000664000000000000000000004732511365057610011153 0ustar C*GIDRIV -- PGPLOT GIF drivers C+ SUBROUTINE GIDRIV (IFUNC, RBUF, NBUF, CHR, LCHR, MODE) INTEGER IFUNC, NBUF, LCHR, MODE REAL RBUF(*) CHARACTER*(*) CHR * * PGPLOT driver for Graphics Interchange Format (GIF) files. * ************************************************************************ * CAUTION * * * * The GIF specification incorporates the Lempel-Zev-Welch (LZW) * * compression technology which is the subject of a patent awarded to * * Unisys. Use of this technology, and in particular creation of GIF * * format files using this PGPLOT device driver, may require a license * * from Unisys. * ************************************************************************ * * Supported device: GIF87a file format * * Device type codes: /GIF or /VGIF * * Default device name: pgplot.gif. * * If you have more than one image to plot (i.e. use PGPAGE) with this * device, subsequent pages will be named: pgplot2.gif, pgplot3.gif, * etc, disrespective of the device name you specified. * You can however bypass this by specifying a device name including a * number sign (#), which will henceforth be replaced by the pagenumber. * Example: page#.gif will produce files page1.gif, page2.gif, ..., * page234.gif, etc. * * Default view surface dimensions are: * - GIF : 850 x 680 pixels (translates to 10.0 x 8.0 inch). * - VGIF : 680 x 850 pixels (translates to 8.0 x 10.0 inch). * with an assumed scale of 85 pixels/inch. * Default width and height can be overridden by specifying environment * variables * PGPLOT_GIF_WIDTH (default 850) * PGPLOT_GIF_HEIGHT (default 680) * * Color capability: * Indices 0 to 255 are supported. Each of these indices can be assigned * one color. Default colors for indices 0 to 15 are implemented. * * Obtaining hardcopy: Use a GIF viewer or converter. *= * 1-Aug-1994 - Created by Remko Scharroo * 9-Aug-1994 - New scheme for line plotting * 16-Aug-1994 - Provide multi-image plotting. * 8-Sep-1994 - Add opcode 29 [TJP]. * 5-Nov-1994 - Adjust size of bitmap if necessary [TJP]. * 18-Jan-1995 - Attempt to prevent integer overflow on systems where * BYTE is signed [TJP]. * 28-Dec-1995 - prevent concurrent access [TJP]. * 29-Apr-1996 - use GRCTOI to decode environment variables [TJP]. * 2-Sep-1997 - correct a byte overflow problem *----------------------------------------------------------------------- CHARACTER*(*) LTYPE, PTYPE, DEFNAM INTEGER DWD, DHT, BX, BY PARAMETER (LTYPE= 1'GIF (Graphics Interchange Format file, landscape orientation)', 2 PTYPE= 3'VGIF (Graphics Interchange Format file, portrait orientation)') PARAMETER (DEFNAM='pgplot.gif') PARAMETER (DWD=850, DHT=680) REAL XRES, YRES PARAMETER (XRES=85., YRES=XRES) C INTEGER UNIT, IC, NPICT, MAXIDX, STATE INTEGER CTABLE(3,0:255), CDEFLT(3,0:15) INTEGER IER, I, L, LL, IX0, IY0, IX1, IY1, USERW, USERH, JUNK INTEGER GRGMEM, GRFMEM, GROFIL, GRCFIL, GRCTOI CHARACTER*80 MSG, INSTR, FILENM C C Note: for 64-bit operating systems, change the following C declaration to INTEGER*8: C INTEGER*8 PIXMAP, WORK C SAVE UNIT, IC, CTABLE, NPICT, MAXIDX, BX, BY, PIXMAP, FILENM SAVE CDEFLT, STATE DATA CDEFLT /000,000,000, 255,255,255, 255,000,000, 000,255,000, 1 000,000,255, 000,255,255, 255,000,255, 255,255,000, 2 255,128,000, 128,255,000, 000,255,128, 000,128,255, 3 128,000,255, 255,000,128, 085,085,085, 170,170,170/ DATA STATE /0/ C----------------------------------------------------------------------- C GOTO( 10, 20, 30, 40, 50, 60, 70, 80, 90,100, 1 110,120,130,140,150,160,170,180,190,200, 2 210,220,230,240,250,260,270,280,290), IFUNC 900 WRITE (MSG,'(I10)') IFUNC CALL GRWARN('Unimplemented function in GIF device driver:' 1 //MSG) NBUF = -1 RETURN C C--- IFUNC = 1, Return device name ------------------------------------- C 10 IF (MODE.EQ.1) THEN CHR = LTYPE LCHR = LEN(LTYPE) ELSE IF (MODE.EQ.2) THEN CHR = PTYPE LCHR = LEN(PTYPE) ELSE CALL GRWARN('Requested MODE not implemented in GIF driver') END IF RETURN C C--- IFUNC = 2, Return physical min and max for plot device, and range C of color indices --------------------------------------- C (Maximum size is set by GIF format to 2**16 pixels) 20 RBUF(1) = 0 RBUF(2) = 65536 RBUF(3) = 0 RBUF(4) = 65536 RBUF(5) = 0 RBUF(6) = 255 NBUF = 6 RETURN C C--- IFUNC = 3, Return device resolution ------------------------------- C 30 RBUF(1) = XRES RBUF(2) = YRES RBUF(3) = 1 NBUF = 3 RETURN C C--- IFUNC = 4, Return misc device info -------------------------------- C (This device is Hardcopy, supports rectangle fill, pixel C primitives, and query color rep.) C 40 CHR = 'HNNNNRPNYN' LCHR = 10 RETURN C C--- IFUNC = 5, Return default file name ------------------------------- C 50 CHR = DEFNAM LCHR = LEN(DEFNAM) RETURN C C--- IFUNC = 6, Return default physical size of plot ------------------- C 60 RBUF(1) = 0 RBUF(2) = BX-1 RBUF(3) = 0 RBUF(4) = BY-1 NBUF = 4 RETURN C C--- IFUNC = 7, Return misc defaults ----------------------------------- C 70 RBUF(1) = 1 NBUF=1 RETURN C C--- IFUNC = 8, Select plot -------------------------------------------- C 80 CONTINUE RETURN C C--- IFUNC = 9, Open workstation --------------------------------------- C 90 CONTINUE C -- check for concurrent access IF (STATE.EQ.1) THEN CALL GRWARN('a PGPLOT GIF file is already open') RBUF(1) = 0 RBUF(2) = 0 RETURN END IF C -- dimensions of plot buffer USERW = 0 USERH = 0 CALL GRGENV('GIF_WIDTH', INSTR, L) LL = 1 IF (L.GT.0) USERW = GRCTOI(INSTR(:L),LL) CALL GRGENV('GIF_HEIGHT', INSTR, L) LL = 1 IF (L.GT.0) USERH = GRCTOI(INSTR(:L),LL) IF (MODE.EQ.1) THEN * -- Landscape BX = DWD IF (USERW.GE.8) BX = USERW BY = DHT IF (USERH.GE.8) BY = USERH ELSE * -- Portrait BX = DHT IF (USERH.GE.8) BX = USERH BY = DWD IF (USERW.GE.8) BY = USERW END IF NPICT=1 MAXIDX=0 * -- Initialize color table DO 95 I=0,15 CTABLE(1,I) = CDEFLT(1,I) CTABLE(2,I) = CDEFLT(2,I) CTABLE(3,I) = CDEFLT(3,I) 95 CONTINUE DO 96 I=16,255 CTABLE(1,I) = 128 CTABLE(2,I) = 128 CTABLE(3,I) = 128 96 CONTINUE * FILENM = CHR(:LCHR) CALL GRGI10 (FILENM, NPICT, MSG) UNIT = GROFIL (MSG) RBUF(1) = UNIT IF (UNIT.LT.0) THEN CALL GRWARN('Cannot open output file for GIF plot') RBUF(2) = 0 ELSE RBUF(2) = 1 STATE = 1 END IF RETURN C C--- IFUNC=10, Close workstation --------------------------------------- C 100 CONTINUE STATE = 0 RETURN C C--- IFUNC=11, Begin picture ------------------------------------------- C 110 CONTINUE BX = NINT(RBUF(1))+1 BY = NINT(RBUF(2))+1 IER = GRGMEM(BX*BY, PIXMAP) IF (IER.NE.1) THEN CALL GRGMSG(IER) CALL GRWARN('Failed to allocate plot buffer.') BX = 0 BY = 0 PIXMAP = 0 END IF C -- initialize to zero (background color) IF (PIXMAP.NE.0) : CALL GRGI03(1, 1, BX, BY, 0, BX, BY, %VAL(PIXMAP)) IF (NPICT.GT.1) THEN CALL GRGI10 (FILENM, NPICT, MSG) UNIT = GROFIL(MSG) IF (UNIT.LT.0) THEN CALL GRWARN('Cannot open output file for GIF plot') END IF END IF RETURN C C--- IFUNC=12, Draw line ----------------------------------------------- C 120 CONTINUE IX0=NINT(RBUF(1))+1 IX1=NINT(RBUF(3))+1 IY0=BY-NINT(RBUF(2)) IY1=BY-NINT(RBUF(4)) IF (PIXMAP.NE.0) : CALL GRGI01(IX0, IY0, IX1, IY1, IC, BX, BY, %VAL(PIXMAP)) RETURN C C--- IFUNC=13, Draw dot ------------------------------------------------ C 130 CONTINUE IX0=NINT(RBUF(1))+1 IY0=BY-NINT(RBUF(2)) IF (PIXMAP.NE.0) : CALL GRGI01(IX0, IY0, IX0, IY0, IC, BX, BY, %VAL(PIXMAP)) RETURN C C--- IFUNC=14, End picture --------------------------------------------- C 140 CONTINUE IF (UNIT.GE.0) THEN IER = GRGMEM(2*256*4098, WORK) IF (IER.NE.1) THEN CALL GRGMSG(IER) CALL GRWARN('Failed to allocate work array.') ELSE CALL GRGI06(UNIT, BX, BY, CTABLE, %VAL(PIXMAP), MAXIDX, : %VAL(WORK)) END IF JUNK = GRCFIL(UNIT) IER = GRFMEM(2*256*4098, WORK) END IF NPICT = NPICT+1 IER = GRFMEM(BX*BY, PIXMAP) IF (IER.NE.1) THEN CALL GRGMSG(IER) CALL GRWARN('Failed to deallocate plot buffer.') END IF RETURN C C--- IFUNC=15, Select color index -------------------------------------- C 150 CONTINUE IC = RBUF(1) MAXIDX = MAX(MAXIDX, IC) RETURN C C--- IFUNC=16, Flush buffer. ------------------------------------------- C (Not used.) C 160 CONTINUE RETURN C C--- IFUNC=17, Read cursor. -------------------------------------------- C (Not implemented: should not be called) C 170 CONTINUE GOTO 900 C C--- IFUNC=18, Erase alpha screen. ------------------------------------- C (Not implemented: no alpha screen) C 180 CONTINUE RETURN C C--- IFUNC=19, Set line style. ----------------------------------------- C (Not implemented: should not be called) C 190 CONTINUE GOTO 900 C C--- IFUNC=20, Polygon fill. ------------------------------------------- C (Not implemented: should not be called) C 200 CONTINUE GOTO 900 C C--- IFUNC=21, Set color representation. ------------------------------- C 210 CONTINUE I = RBUF(1) CTABLE(1, I) = NINT(RBUF(2)*255) CTABLE(2, I) = NINT(RBUF(3)*255) CTABLE(3, I) = NINT(RBUF(4)*255) RETURN C C--- IFUNC=22, Set line width. ----------------------------------------- C (Not implemented: should not be called) C 220 CONTINUE GOTO 900 C C--- IFUNC=23, Escape -------------------------------------------------- C (Not implemented: ignored) C 230 CONTINUE RETURN C C--- IFUNC=24, Rectangle fill ------------------------------------------ C 240 CONTINUE IX0=NINT(RBUF(1))+1 IX1=NINT(RBUF(3))+1 IY1=BY-NINT(RBUF(2)) IY0=BY-NINT(RBUF(4)) IF (PIXMAP.NE.0) : CALL GRGI03(IX0, IY0, IX1, IY1, IC, BX, BY, %VAL(PIXMAP)) RETURN C C--- IFUNC=25, Not implemented ----------------------------------------- C 250 CONTINUE RETURN C C--- IFUNC=26, Line of pixels ------------------------------------------ C 260 CONTINUE CALL GRGI04(NBUF, RBUF, BX, BY, %VAL(PIXMAP), MAXIDX) RETURN C C--- IFUNC=27, Not implemented ----------------------------------------- C 270 CONTINUE RETURN C C--- IFUNC=28, Not implemented ----------------------------------------- C 280 CONTINUE RETURN C C--- IFUNC=29, Query color representation. ----------------------------- C 290 CONTINUE I = RBUF(1) RBUF(2) = CTABLE(1,I)/255.0 RBUF(3) = CTABLE(2,I)/255.0 RBUF(4) = CTABLE(3,I)/255.0 NBUF = 4 RETURN C----------------------------------------------------------------------- END **GRGI01 -- PGPLOT GIF driver, draw line *+ SUBROUTINE GRGI01 (IX0, IY0, IX1, IY1, ICOL, BX, BY, PIXMAP) INTEGER IX0, IY0, IX1, IY1 INTEGER ICOL, BX, BY BYTE PIXMAP(BX,BY) * * Draw a straight-line segment from absolute pixel coordinates * (IX0, IY0) to (IX1, IY1). * * Arguments: * ICOL (input): Color index * PIXMAP (input/output): The image data buffer. *----------------------------------------------------------------------- INTEGER IX, IY, IS REAL D BYTE VAL * IF (ICOL.GT.127) THEN VAL = ICOL-256 ELSE VAL = ICOL END IF IF (IX0.EQ.IX1 .AND. IY0.EQ.IY1) THEN PIXMAP(IX0,IY0)=VAL ELSE IF (ABS(IY1-IY0).GT.ABS(IX1-IX0)) THEN D=(IX1-IX0)/REAL(IY1-IY0) IS=1 IF (IY1.LT.IY0) IS=-1 DO 10 IY=IY0,IY1,IS IX=NINT(IX0+(IY-IY0)*D) PIXMAP(IX,IY)=VAL 10 CONTINUE ELSE D=(IY1-IY0)/REAL(IX1-IX0) IS=1 IF (IX1.LT.IX0) IS=-1 DO 20 IX=IX0,IX1,IS IY=NINT(IY0+(IX-IX0)*D) PIXMAP(IX,IY)=VAL 20 CONTINUE END IF END **GRGI03 -- PGPLOT GIF driver, fill rectangle *+ SUBROUTINE GRGI03 (IX0, IY0, IX1, IY1, ICOL, BX, BY, PIXMAP) INTEGER IX0, IY0, IX1, IY1 INTEGER ICOL, BX, BY BYTE PIXMAP(BX,BY) * * Arguments: * IX0, IY0 (input): Lower left corner. * IX1, IY1 (input): Upper right corner. * ICOL (input): Color value. * BX, BY (input): dimensions of PIXMAP. * PIXMAP (input/output): The image data buffer. *----------------------------------------------------------------------- INTEGER IX, IY BYTE VAL C IF (ICOL.GT.127) THEN VAL = ICOL-256 ELSE VAL = ICOL END IF DO 20 IY=IY0,IY1 DO 10 IX=IX0,IX1 PIXMAP(IX,IY) = VAL 10 CONTINUE 20 CONTINUE END **GRGI04 -- PGPLOT GIF driver, fill image line *+ SUBROUTINE GRGI04(NBUF,RBUF,BX,BY,PIXMAP,MAXIDX) INTEGER I,J,NBUF,BX,BY,N,IC,MAXIDX REAL RBUF(NBUF) BYTE PIXMAP(BX,BY) *- I = NINT(RBUF(1))+1 J = BY-NINT(RBUF(2)) DO 10 N=3,NBUF IC=RBUF(N) MAXIDX=MAX(MAXIDX,IC) IF (IC.GT.127) IC = IC-256 PIXMAP(I+N-3,J)=IC 10 CONTINUE END **GRGI06 -- PGPLOT GIF driver, write GIF image *+ SUBROUTINE GRGI06 (UNIT, BX, BY, CTABLE, PIXMAP, MAXIDX, CODE) INTEGER UNIT, BX, BY, MAXIDX INTEGER CTABLE(3,0:255) BYTE PIXMAP(BX * BY) INTEGER*2 CODE(0:4097,0:255) * * Write GIF image to UNIT. * * Arguments: * UNIT (input): Output unit * BX,BY (input): `Screen' size * CTABLE (input): Color map * PIXMAP (input): Image data * MAXIDX (input): maximum color index used. *-- * 16-Nov-94: fixed bug (BYTE is signed) *----------------------------------------------------------------------- CHARACTER GIF1*6, GIF2*7, GIF3*3, GIF4*10 CHARACTER*2 GRGI09 INTEGER BMAX, BMULT, BREST, BOUT INTEGER PIXEL, I, J, K, M, CLEAR, EOI, TABLE, IN, TOTAL, PRE, EXT INTEGER OLDPRE, BITS INTEGER GRWFCH, GRWFIL BYTE BLKOUT(0:254) COMMON /GRGICO/ BMAX, BMULT, BREST, BOUT, BLKOUT BITS = 1 10 IF (MAXIDX .LT. 2**BITS) GOTO 20 BITS = BITS + 1 GOTO 10 20 CONTINUE * * Write Header. * GIF1 = 'GIF87a' I = GRWFCH(UNIT, GIF1) IF (I.NE.6) CALL GRWARN ('Error writing GIF header') * * Write Logical Screen Descriptor (screen width, screen height, * color data, background color index [0], pixel aspect ratio [0]). * GIF2(1:2) = GRGI09(BX) GIF2(3:4) = GRGI09(BY) GIF2(5:5) = CHAR(128 + 17 * (BITS - 1)) GIF2(6:6) = CHAR(0) GIF2(7:7) = CHAR(0) I = GRWFCH(UNIT, GIF2) * * Write Global Color Table. * DO 30 J=0,2**BITS-1 GIF3(1:1) = CHAR(CTABLE(1,J)) GIF3(2:2) = CHAR(CTABLE(2,J)) GIF3(3:3) = CHAR(CTABLE(3,J)) I = GRWFCH(UNIT, GIF3) 30 CONTINUE * PIXEL = MAX(BITS, 2) * * Write Image Descriptor. * GIF4(1:1) = ',' GIF4(2:3) = GRGI09(0) GIF4(4:5) = GRGI09(0) GIF4(6:7) = GRGI09(BX) GIF4(8:9) = GRGI09(BY) GIF4(10:10) = CHAR(0) I = GRWFCH(UNIT, GIF4) * * Write Table Based Image Data, in sub-blocks of up to 255 bytes. * I = GRWFCH(UNIT, CHAR(PIXEL)) C C LZW-compression; initialize counters; define clear code and EOI code. C Start packing variable-size codes into 8-bit bytes. C Push a clear code first. C `Read' first character. C DO 100 M=0,255 DO 100 K=0,4095 100 CODE(K,M)=0 CLEAR=2**PIXEL EOI=CLEAR + 1 BREST=0 BOUT=0 BMULT=1 BMAX=CLEAR*2 CALL GRGI07(UNIT, CLEAR) IN=1 TOTAL=BX*BY PRE=PIXMAP(IN) IF (PRE.LT.0) PRE = PRE+256 * * Start new data stream at line 310: * 2**n-1 (n+1)-bit codes * 2*2**n (n+2)-bit codes * 4*2**n (n+3)-bit codes * . . . * 1024 11-bit codes * 2048 12-bit codes (incl. one clear code) * 310 TABLE=EOI BMAX=CLEAR*2 * * `Read' next character; check if combination prefix&extension occurred earlier * 320 IF (IN.GE.TOTAL) GOTO 350 IN=IN+1 EXT=PIXMAP(IN) IF (EXT.LT.0) EXT = EXT+256 OLDPRE=PRE PRE=CODE(PRE,EXT) IF (PRE.GT.0) GOTO 320 * * If no earlier occurrence add combination to table * TABLE=TABLE+1 CALL GRGI07(UNIT, OLDPRE) CODE(OLDPRE,EXT)=TABLE PRE=EXT IF (TABLE.EQ.BMAX) BMAX=BMAX*2 IF (TABLE.LT.4095) GOTO 320 CALL GRGI07(UNIT, CLEAR) DO 330 M=0,255 DO 330 K=0,4095 330 CODE(K,M)=0 GOTO 310 * * Last character * 350 CALL GRGI07(UNIT, PRE) CALL GRGI07(UNIT, EOI) IF (BMULT.GT.1) CALL GRGI08(UNIT, BREST) IF (BOUT.GT.0) THEN IF (BOUT.GT.127) THEN BLKOUT(0) = BOUT-256 ELSE BLKOUT(0) = BOUT END IF I = GRWFIL (UNIT, BOUT+1, BLKOUT(0)) BOUT = 0 END IF BLKOUT(0) = 0 I = GRWFIL (UNIT, 1, BLKOUT(0)) * * Write GIF Trailer. * I = GRWFCH (UNIT, ';') END **GRGI07 -- Compile GIF output code * SUBROUTINE GRGI07(UNIT, INCODE) INTEGER UNIT, INCODE INTEGER BMAX, BMULT, BREST, BOUT BYTE BLKOUT(0:254) COMMON /GRGICO/ BMAX, BMULT, BREST, BOUT, BLKOUT C BREST = BREST + BMULT * INCODE BMULT = BMULT * BMAX C 10 IF (BMULT .LT. 256) RETURN CALL GRGI08(UNIT, BREST) BREST = BREST / 256 BMULT = BMULT / 256 GOTO 10 C END **GRGI08 -- Compile and write GIF output buffer * SUBROUTINE GRGI08(UNIT, INCODE) INTEGER UNIT, INCODE, I, J, GRWFIL INTEGER BMAX, BMULT, BREST, BOUT BYTE BLKOUT(0:254) COMMON /GRGICO/ BMAX, BMULT, BREST, BOUT, BLKOUT C BOUT = BOUT + 1 J = MOD(INCODE,256) IF (J.GT.127) J = J-256 BLKOUT(BOUT) = J IF (BOUT .LT. 254) RETURN C! changed 1997-Sep-2 BLKOUT(0) = 254-256 I = GRWFIL(UNIT, 255, BLKOUT(0)) BOUT = 0 END **GRGI09 -- Encode integer in 2-char string * CHARACTER*2 FUNCTION GRGI09(I) INTEGER I INTEGER I1, I2 * I1 = MOD(I,256) I2 = MOD(I/256,256) GRGI09(1:1) = CHAR(I1) GRGI09(2:2) = CHAR(I2) END **GRGI10 -- Replace # in filename by picture number * SUBROUTINE GRGI10 (NAME1, NP, NAME2) CHARACTER*(*) NAME1 CHARACTER*(*) NAME2 CHARACTER*80 TMP INTEGER GRTRIM INTEGER NP, IDX, L, LN LN = GRTRIM(NAME1) IDX = INDEX(NAME1,'#') IF (IDX.GT.0) THEN C -- if the supplied name contains a #-character, replace C it with the page number CALL GRFAO(NAME1, L, TMP, NP, 0, 0, 0) ELSE IF (NP.EQ.1) THEN C -- if this is the first page, use the supplied name NAME2 = NAME1 RETURN ELSE IF (LN+2.LE.LEN(NAME1)) THEN C -- append an underscore and the page number to the supplied C name NAME1(LN+1:LN+2) = '_#' CALL GRFAO(NAME1, L, TMP, NP, 0, 0, 0) ELSE C -- last resort: invent a new name CALL GRFAO('pgplot#.gif', L, TMP, NP, 0, 0, 0) END IF CALL GRWARN ('Writing new GIF image as: '//TMP(:L)) NAME2 = TMP(:L) END debian/patches/0000775000000000000000000000000012267034506010624 5ustar debian/patches/correct-path-locations0000664000000000000000000000227211661635316015141 0ustar Description: move files from /usr/local This patch set moves files from /usr/local to the standard Debian location in /usr. --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Last-Update: 2011-11-18 --- pgplot5-5.2.2.orig/makehtml +++ pgplot5-5.2.2/makehtml @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!/usr/bin/perl $, = ' '; # set output field separator $\ = "\n"; # set output record separator --- pgplot5-5.2.2.orig/maketex +++ pgplot5-5.2.2/maketex @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!/usr/bin/perl $, = ' '; # set output field separator $\ = "\n"; # set output record separator --- pgplot5-5.2.2.orig/src/grgfil.f +++ pgplot5-5.2.2/src/grgfil.f @@ -26,7 +26,7 @@ C-- C 2-Dec-1994 - new routine [TJP]. C----------------------------------------------------------------------- CHARACTER*(*) DEFDIR, DEFFNT, DEFRGB - PARAMETER (DEFDIR='/usr/local/pgplot/') + PARAMETER (DEFDIR='/usr/lib/pgplot5/') PARAMETER (DEFFNT='grfont.dat') PARAMETER (DEFRGB='rgb.txt') CHARACTER*255 FF debian/patches/compiler-specific-changes0000664000000000000000000000410711661642317015556 0ustar Description: correct compiler and flags This patch set selects the proper fortran compiler and flags. --- Last-Update: 2011-11-18 --- a/sys_linux/g77_gcc.conf +++ b/sys_linux/g77_gcc.conf @@ -1,4 +1,4 @@ -# The GNU g77 FORTRAN compiler and Gnu gcc C compiler on an elf-system. +# The GNU gfortran FORTRAN compiler and Gnu gcc C compiler on an elf-system. #----------------------------------------------------------------------- # Optional: Needed by XWDRIV (/xwindow and /xserve) and @@ -34,13 +34,13 @@ # Mandatory. # The FORTRAN compiler to use. - FCOMPL="g77" + FCOMPL="gfortran" # Mandatory. # The FORTRAN compiler flags to use when compiling the pgplot library. # (NB. makemake prepends -c to $FFLAGC where needed) - FFLAGC="-u -Wall -fPIC -O" + FFLAGC="-u -Wall -fPIC -O3" # Mandatory. # The FORTRAN compiler flags to use when compiling fortran demo programs. @@ -57,12 +57,12 @@ # Mandatory. # The C compiler flags to use when compiling the pgplot library. - CFLAGC="-Wall -fPIC -DPG_PPU -O" + CFLAGC="-Wall -fPIC -DPG_PPU -O3" # Mandatory. # The C compiler flags to use when compiling C demo programs. - CFLAGD="-Wall -O" + CFLAGD="-Wall -O3" # Optional: Only needed if the cpgplot library is to be compiled. # The flags to use when running pgbind to create the C pgplot wrapper @@ -108,7 +108,11 @@ # Optional: Needed if SHARED_LIB is set. # How to create a shared library from a trailing list of object files. - SHARED_LD="gcc -shared -o $SHARED_LIB" + SHARED_LD_PGPLOT_OPTS="-o $SHARED_LIB -Wl,-soname,libpgplot.so.\$(VM)" + + SHARED_LD_CPGPLOT_OPTS="-o libcpgplot.so -Wl,-soname,libcpgplot.so.\$(VM)" + + SHARED_LD="gfortran -shared" # Optional: # On systems such as Solaris 2.x, that allow specification of the @@ -117,7 +121,9 @@ # library-specification flags used to specify these libraries to # $SHARED_LD - SHARED_LIB_LIBS="" + SHARED_LIB_LIBS="-L/usr/X11R6/lib -lX11 -lpng -lc -lgfortran" + + SHARED_LIB_CPGPLOT_LIBS="-L. -lpgplot" # Optional: # Compiler name used on Next systems to compile objective-C files. debian/patches/series0000664000000000000000000000011111661635305012033 0ustar correct-path-locations compiler-specific-changes linker-specific-changes debian/patches/linker-specific-changes0000664000000000000000000000602612267034506015230 0ustar Description: correct linker variables This patch set sets all the linker-specific variables correctly --- Last-Update: 2011-11-18 Index: pgplot5-5.2.2/makemake =================================================================== --- pgplot5-5.2.2.orig/makemake 2014-01-19 15:42:40.207154628 -0500 +++ pgplot5-5.2.2/makemake 2014-01-19 15:44:51.948034455 -0500 @@ -658,6 +658,8 @@ # SHARED_LIB=$SHARED_LIB SHARED_LD=$SHARED_LD +SHARED_LD_PGPLOT_OPTS=$SHARED_LD_PGPLOT_OPTS +SHARED_LD_CPGPLOT_OPTS=$SHARED_LD_CPGPLOT_OPTS # # The libraries that the shared PGPLOT library depends upon. # This is for systems that allow one to specify what libraries @@ -667,6 +669,7 @@ # libraries when they link their executables. # SHARED_LIB_LIBS=$SHARED_LIB_LIBS +SHARED_LIB_CPGPLOT_LIBS=$SHARED_LIB_CPGPLOT_LIBS # # Ranlib command if required # @@ -806,7 +809,8 @@ # libraries. #----------------------------------------------------------------------- -lib : libpgplot.a $(SHARED_LIB) +#lib : libpgplot.a $(SHARED_LIB) +lib : libpgplot.a libpgplot.a : $(PG_ROUTINES) $(PG_NON_STANDARD) $(GR_ROUTINES) \ $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES) @@ -816,6 +820,16 @@ $(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq` $(RANLIB) libpgplot.a +#shared: $(PG_ROUTINES) $(PG_NON_STANDARD) $(GR_ROUTINES) \ +# $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES) +# $(SHARED_LD) + +shared: $(PG_ROUTINES) $(PG_NON_STANDARD) \ + $(GR_ROUTINES) $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES) + $(SHARED_LD) $(SHARED_LD_PGPLOT_OPTS) `ls $(PG_ROUTINES) \ + $(PG_NON_STANDARD) $(GR_ROUTINES) $(DISPATCH_ROUTINE) \ + $(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq` $(SHARED_LIB_LIBS) + EOD # Emit the shared library dependency if requested. @@ -824,7 +838,7 @@ cat >> makefile << \EOD $(SHARED_LIB): $(PG_ROUTINES) $(PG_NON_STANDARD) \ $(GR_ROUTINES) $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES) - $(SHARED_LD) `ls $(PG_ROUTINES) \ + $(SHARED_LD) $(SHARED_LD_PGPLOT_OPTS) `ls $(PG_ROUTINES) \ $(PG_NON_STANDARD) $(GR_ROUTINES) $(DISPATCH_ROUTINE) \ $(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq` $(SHARED_LIB_LIBS) EOD @@ -1025,7 +1039,7 @@ grivas.o : $(DRVDIR)/gadef.h grtv00.o : $(DRVDIR)/imdef.h pgxwin.o : $(DRVDIR)/pgxwin.h -pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h +pndriv.o : /usr/include/png.h /usr/include/pngconf.h /usr/include/zlib.h /usr/include/$(DEB_HOST_MULTIARCH)/zconf.h x2driv.o figdisp_comm.o: $(DRVDIR)/commands.h @@ -1039,6 +1053,8 @@ @echo 'will be needed.' @echo ' ' +cpg-shared: libcpgplot.so + pgbind: $(SRC)/cpg/pgbind.c $(CCOMPL) $(CFLAGC) $(SRC)/cpg/pgbind.c -o pgbind @@ -1050,6 +1066,13 @@ $(RANLIB) libcpgplot.a rm -f cpg*.o +libcpgplot.so: $(PG_SOURCE) pgbind + ./pgbind $(PGBIND_FLAGS) -w $(PG_SOURCE) + $(CCOMPL) -c $(CFLAGC) cpg*.c + rm -f cpg*.c + $(SHARED_LD) $(SHARED_LD_CPGPLOT_OPTS) cpg*.o $(SHARED_LIB_CPGPLOT_LIBS) + rm -f cpg*.o + cpgdemo: cpgplot.h $(SRC)/cpg/cpgdemo.c libcpgplot.a $(CCOMPL) $(CFLAGD) -c -I. $(SRC)/cpg/cpgdemo.c $(FCOMPL) -o cpgdemo cpgdemo.o $(CPGPLOT_LIB) $(LIBS) debian/compc0000664000000000000000000000024110456230553010214 0ustar #!/usr/bin/perl print "This is a hack to get around a strange makefile problem\n"; while (<>) { $com = "cc -c $_"; print "$com"; system $com; } 1; #OK debian/drivers.list.debian0000664000000000000000000001504710456230553012776 0ustar ! PGPLOT drivers. !------------------------------------------------------------------------------ ! To configure PGPLOT, ensure that drivers you do not want are ! commented out (place ! in column 1). N.B. Many device-drivers are ! available on selected operating systems only. ! Modified by Gopal Narayanan for debian Jul 6, 2001 !------------------------------------------------------------------------------ ! File Code Description Restrictions ! BCDRIV 0 /BCANON Canon Laser printer (bitmap version), landscape CADRIV 0 /CANON Canon Laser printer, LBP-8/A2, landscape ! CCDRIV 0 /CCP DEC LJ250 Color Companion printer CGDRIV 1 /CGM CGM metafile, indexed colour selection C CGDRIV 2 /CGMD CGM metafile, direct colour selection C CWDRIV 0 /CW6320 Gould/Bryans Colourwriter 6320 pen plotter Std F77 ! EPDRIV 0 /EPSON Epson FX100 dot matrix printer ! EXDRIV 1 /EXCL Talaris/EXCL printers, landscape ! EXDRIV 2 /EXCL Talaris/EXCL printers, portrait ! GCDRIV 0 /GENICOM Genicom 4410 dot-matrix printer, landscape ! Caution: use of GIDRIV may require a license from Unisys: ! Since Unisys patent has expired allowing now. GIDRIV 1 /GIF GIF-format file, landscape GIDRIV 2 /VGIF GIF-format file, portrait GLDRIV 1 /HPGL Hewlett-Packard HP-GL plotters, landscape Std F77 GLDRIV 2 /VHPGL Hewlett-Packard HP-GL plotters, portrait Std F77 ! GODRIV 0 /GOC GOC Sigma T5670 terminal VMS ! GVDRIV 0 /GVENICOM Genicom 4410 dot-matrix printer, portrait HGDRIV 0 /HPGL2 Hewlett-Packard graphics language ! HIDRIV 0 /HIDMP Houston Instruments HIDMP pen plotter ! HJDRIV 0 /HJ Hewlett-Packard Desk/Laserjet printer HPDRIV 0 /HP7221 Hewlett-Packard HP7221 pen plotter Std F77 ! LADRIV 0 /LA50 Dec LA50 and other sixel printers ! LJDRIV 0 /LJ Hewlett-Packard LaserJet printers VMS LSDRIV 1 /LIPS2 Canon LaserShot printer (landscape) LSDRIV 2 /VLIPS2 Canon LaserShot printer (portrait) ! LNDRIV 0 /LN03 Dec LN03-PLUS Laser printer (landscape) VMS ! LVDRIV 0 /LVN03 Dec LN03-PLUS Laser printer (portrait) VMS LXDRIV 0 /LATEX LaTeX picture environment ! MFDRIV 0 /FILE PGPLOT graphics metafile ! NEDRIV 0 /NEXT Computers running NeXTstep operating system NUDRIV 0 /NULL Null device (no output) Std F77 PGDRIV 0 /PGMF PGPLOT metafile (new format, experimental) Std F77 PNDRIV 1 /PNG Portable Network Graphics file C PNDRIV 2 /TPNG Portable Network Graphics file - transparent background C ! PPDRIV 1 /PPM Portable Pixel Map file, landscape ! PPDRIV 2 /VPPM Portable PIxel Map file, portrait PSDRIV 1 /PS PostScript printers, monochrome, landscape Std F77 PSDRIV 2 /VPS Postscript printers, monochrome, portrait Std F77 PSDRIV 3 /CPS PostScript printers, color, landscape Std F77 PSDRIV 4 /VCPS PostScript printers, color, portrait Std F77 ! PXDRIV 0 /PRINTRONI Printronix P300 or P600 dot-matrix printer QMDRIV 1 /QMS QUIC devices (QMS and Talaris), landscape Std F77 QMDRIV 2 /VQMS QUIC devices (QMS and Talaris), portrait Std F77 ! TFDRIV 0 /TFILE Tektronix-format disk file VMS ! TODRIV 0 /TOSHIBA Toshiba "3-in-one" printer, model P351 TTDRIV 1 /TEK4010 Tektronix 4006/4010 storage-tube terminal Std F77 TTDRIV 2 /GF GraphOn terminal Std F77 TTDRIV 3 /RETRO RetroGraphics terminal Std F77 TTDRIV 4 /GTERM GTERM Tektronix terminal emulator Std F77 TTDRIV 5 /XTERM XTERM Tektronix terminal emulator Std F77 TTDRIV 6 /ZSTEM ZSTEM terminal emulator Std F77 ! TTDRIV 7 /V603 Visual 603 terminal Std F77 ! TTDRIV 8 /KRM3 Kermit 3 on IBM-PC Std F77 TTDRIV 9 /TK4100 Tektronix 4100-series terminals Std F77 TTDRIV 10 /VMAC Macintosh VersaTerm-PRO Tektronix-4105 emulator Std F77 ! TXDRIV 0 /TX TeX PK Font Output files ! VADRIV 0 /VCANON Canon Laser printer, LBP-8/A2, portrait ! VBDRIV 0 /VBCANON Canon Laser printer (bitmap version), portrait ! VTDRIV 0 /VT125 Dec Regis terminals (VT125 etc.) Std F77 WDDRIV 1 /WD X Window dump file, landscape WDDRIV 2 /VWD X Window dump file, portrait ! WSDRIV 0 /WS VAX workstations running VWS software VMS ! X2DRIV 0 /XDISP PGDISP or FIGDISP server for X workstations C XWDRIV 1 /XWINDOW Workstations running X Window System C XWDRIV 2 /XSERVE Persistent window on X Window System C ! ZEDRIV 0 /ZETA Zeta 8 Digital Plotter ! ! The following drivers can only be used in PGPLOT installations on MS-DOS ! systems with appropriate hardware and software. Do not select these ! on UNIX or VMS systems. ! ! LHDRIV 0 /LH IBM PCs and clones, Lahey F77 32-bit Fortran v5.0 ! MSDRIV 0 /MSOFT IBM PCs and clones running Microsoft Fortran 5.0 ! SSDRIV 0 /SS IBM PCs and clones, MS-DOS, Salford Software FTN ! ! The following driver can only be used in PGPLOT installations on Acorn ! Archimedes systems with appropriate hardware and software. ! ! ACDRIV 0 /ARC Acorn Archimedes computer ! ! Selection of the XMOTIF driver causes a stub driver to be placed in ! the main PGPLOT library. The real driver is placed in libXmPgplot.a. ! Applications that need the Motif driver should link with libXmPgplot.a ! before the PGPLOT library. This treatment means that only Motif ! applications have to be linked with Motif libraries. ! ! XMDRIV 0 /XMOTIF Motif applications containing XmPgplot widgets. C ! ! Selection of the XATHENA driver causes a stub driver to be placed in ! the main PGPLOT library. The real driver is placed in libXawPgplot.a. ! Applications that need the Athena driver should link with libXawPgplot.a ! before the PGPLOT library. This treatment means that only Athena ! applications have to be linked with Xaw libraries. ! ! XADRIV 0 /XATHENA Motif applications containing XaPgplot widgets. C ! ! Selection of the TK driver causes a stub driver to be placed in ! the main PGPLOT library. The real driver is placed in libtkpgplot.a. ! Applications that need the Tk driver should link with libtkpgplot.a ! before the PGPLOT library. This treatment means that only Tcl/Tk ! applications have to be linked with the Tcl and Tk libraries. ! ! TKDRIV 0 /XTK X-window Tcl/Tk programs with pgplot widgets. C ! ! The following driver is included solely for use by the aips++ team. ! ! RVDRIV 0 /XRV X-window Rivet/Tk programs with pgplot widgets. C debian/drivers.list.debian.old0000664000000000000000000001344410456230553013552 0ustar ! PGPLOT drivers. !------------------------------------------------------------------------------ ! To configure PGPLOT, ensure that drivers you do not want are ! commented out (place ! in column 1). N.B. Many device-drivers are ! available on selected operating systems only. !------------------------------------------------------------------------------ ! File Code Description Restrictions ! Lapeyre: Two !! means g77 failed to compile this driver . !! BCDRIV 0 /BCANON Canon Laser printer (bitmap version), landscape CADRIV 0 /CANON Canon Laser printer, LBP-8/A2, landscape !! CCDRIV 0 /CCP DEC LJ250 Color Companion printer CWDRIV 0 /CW6320 Gould/Bryans Colourwriter 6320 pen plotter Std F77 !! EPDRIV 0 /EPSON Epson FX100 dot matrix printer !! EXDRIV 1 /EXCL Talaris/EXCL printers, landscape !! EXDRIV 2 /EXCL Talaris/EXCL printers, portrait !! GCDRIV 0 /GENICOM Genicom 4410 dot-matrix printer, landscape ! Caution: use of GIDRIV may require a license from Unisys: GIDRIV 1 /GIF GIF-format file, landscape GIDRIV 2 /VGIF GIF-format file, portrait GLDRIV 1 /HPGL Hewlett-Packard HP-GL plotters, landscape Std F77 GLDRIV 2 /VHPGL Hewlett-Packard HP-GL plotters, portrait Std F77 !! GODRIV 0 /GOC GOC Sigma T5670 terminal VMS !! GVDRIV 0 /GVENICOM Genicom 4410 dot-matrix printer, portrait HGDRIV 0 /HPGL2 Hewlett-Packard graphics language HIDRIV 0 /HIDMP Houston Instruments HIDMP pen plotter !! HJDRIV 0 /HJ Hewlett-Packard Desk/Laserjet printer HPDRIV 0 /HP7221 Hewlett-Packard HP7221 pen plotter Std F77 !! LADRIV 0 /LA50 Dec LA50 and other sixel printers !! LJDRIV 0 /LJ Hewlett-Packard LaserJet printers LSDRIV 1 /LIPS2 Canon LaserShot printer (landscape) LSDRIV 2 /VLIPS2 Canon LaserShot printer (portrait) !! LNDRIV 0 /LN03 Dec LN03-PLUS Laser printer (landscape) VMS !! LVDRIV 0 /LVN03 Dec LN03-PLUS Laser printer (portrait) VMS LXDRIV 0 /LATEX LaTeX picture environment !! MFDRIV 0 /FILE PGPLOT graphics metafile ! NEDRIV 0 /NEXT Computers running NeXTstep operating system NUDRIV 0 /NULL Null device (no output) Std F77 PGDRIV 0 /PGMF PGPLOT metafile (new format, experimental) Std F77 PPDRIV 1 /PPM Portable Pixel Map file, landscape PPDRIV 2 /VPPM Portable PIxel Map file, portrait PSDRIV 1 /PS PostScript printers, monochrome, landscape Std F77 PSDRIV 2 /VPS Postscript printers, monochrome, portrait Std F77 PSDRIV 3 /CPS PostScript printers, color, landscape Std F77 PSDRIV 4 /VCPS PostScript printers, color, portrait Std F77 !! PXDRIV 0 /PRINTRONI Printronix P300 or P600 dot-matrix printer QMDRIV 1 /QMS QUIC devices (QMS and Talaris), landscape Std F77 QMDRIV 2 /VQMS QUIC devices (QMS and Talaris), portrait Std F77 ! TFDRIV 0 /TFILE Tektronix-format disk file VMS !! TODRIV 0 /TOSHIBA Toshiba "3-in-one" printer, model P351 TTDRIV 1 /TEK4010 Tektronix 4006/4010 storage-tube terminal Std F77 TTDRIV 2 /GF GraphOn terminal Std F77 TTDRIV 3 /RETRO RetroGraphics terminal Std F77 TTDRIV 4 /GTERM GTERM Tektronix terminal emulator Std F77 TTDRIV 5 /XTERM XTERM Tektronix terminal emulator Std F77 TTDRIV 6 /ZSTEM ZSTEM terminal emulator Std F77 TTDRIV 7 /V603 Visual 603 terminal Std F77 ! TTDRIV 8 /KRM3 Kermit 3 on IBM-PC Std F77 TTDRIV 9 /TK4100 Tektronix 4100-series terminals Std F77 !! TXDRIV 0 /TX TeX PK Font Output files VADRIV 0 /VCANON Canon Laser printer, LBP-8/A2, portrait ! VBDRIV compiles but leaves undefined symbol !! VBDRIV 0 /VBCANON Canon Laser printer (bitmap version), portrait VTDRIV 0 /VT125 Dec Regis terminals (VT125 etc.) Std F77 WDDRIV 1 /WD X Window dump file, landscape WDDRIV 2 /VWD X Window dump file, portrait ! WSDRIV 0 /WS VAX workstations running VWS software VMS ! X2DRIV 0 /XDISP PGDISP or FIGDISP server for X workstations C XWDRIV 1 /XWINDOW Workstations running X Window System C XWDRIV 2 /XSERVE Persistent window on X Window System C ! ZEDRIV compiles , but leave undefined symbol !! ZEDRIV 0 /ZETA Zeta 8 Digital Plotter ! ! The following drivers can only be used in PGPLOT installations on MS-DOS ! systems with appropriate hardware and software. Do not select these ! on UNIX or VMS systems. ! ! LHDRIV 0 /LH IBM PCs and clones, Lahey F77 32-bit Fortran v5.0 ! MSDRIV 0 /MSOFT IBM PCs and clones running Microsoft Fortran 5.0 ! SSDRIV 0 /SS IBM PCs and clones, MS-DOS, Salford Software FTN ! ! The following driver can only be used in PGPLOT installations on Acorn ! Archimedes systems with appropriate hardware and software. ! ! ACDRIV 0 /ARC Acorn Archimedes computer ! ! Selection of the XMOTIF driver causes a stub driver to be placed in ! the main PGPLOT library. The real driver is placed in libXmPgplot.a. ! Applications that need the Motif driver should link with libXmPgplot.a ! before the PGPLOT library. This treatment means that only Motif ! applications have to be linked with Motif libraries. ! ! XMDRIV 0 /XMOTIF Motif applications containing XmPgplot widgets. C ! ! Selection of the TK driver causes a stub driver to be placed in ! the main PGPLOT library. The real driver is placed in libtkpgplot.a. ! Applications that need the Tk driver should link with libtkpgplot.a ! before the PGPLOT library. This treatment means that only Tcl/Tk ! applications have to be linked with the Tcl and Tk libraries. ! ! Some problems compiling !! TKDRIV 0 /XTK X-window Tcl/Tk programs with pgplot widgets. C ! ! The following driver is included solely for use by the aips++ team. ! ! RVDRIV 0 /XRV X-window Rivet/Tk programs with pgplot widgets. C debian/g77_elf.conf.debian0000664000000000000000000000765710650573021012530 0ustar # Modified by Lapeyre # The GNU gfortran FORTRAN compiler and Gnu gcc C compiler on an elf-system. # From K-G Adams, 24-Jun-96. #----------------------------------------------------------------------- # Optional: Needed by XWDRIV (/xwindow and /xserve) and # X2DRIV (/xdisp and /figdisp). # The arguments needed by the C compiler to locate X-window include files. XINCL="-I/usr/X11R6/include" # Optional: Needed by XMDRIV (/xmotif). # The arguments needed by the C compiler to locate Motif, Xt and # X-window include files. MOTIF_INCL="$XINCL" # Optional: Needed by TKDRIV (/xtk). # The arguments needed by the C compiler to locate Tcl, Tk and # X-window include files. TK_INCL="-I/usr/local/include " # Optional: Needed by RVDRIV (/xrv). # The arguments needed by the C compiler to locate Rivet, Tcl, Tk and # X-window include files. RV_INCL="" # Mandatory. # The FORTRAN compiler to use. FCOMPL="gfortran" # Mandatory. # The FORTRAN compiler flags to use when compiling the pgplot library. # (NB. makemake prepends -c to $FFLAGC where needed) FFLAGC="-u -g -Wall -O3" # Mandatory. # The FORTRAN compiler flags to use when compiling fortran demo programs. # This may need to include a flag to tell the compiler not to treat # backslash characters as C-style escape sequences FFLAGD="-fno-backslash" # Mandatory. # The C compiler to use. CCOMPL="cc" # Mandatory. # The C compiler flags to use when compiling the pgplot library. CFLAGC="-Wall -g -DPG_PPU -O3" # Mandatory. # The C compiler flags to use when compiling C demo programs. CFLAGD="-Wall -O3" # Optional: Only needed if the cpgplot library is to be compiled. # The flags to use when running pgbind to create the C pgplot wrapper # library. (See pgplot/cpg/pgbind.usage) PGBIND_FLAGS="bsd" # Mandatory. # The library-specification flags to use when linking normal pgplot # demo programs. LIBS="-L/usr/X11R6/lib -lX11" # Optional: Needed by XMDRIV (/xmotif). # The library-specification flags to use when linking motif # demo programs. MOTIF_LIBS="-lXm -lXt -lX11" # Optional: Needed by TKDRIV (/xtk). # The library-specification flags to use when linking Tk demo programs. # Note that you may need to append version numbers to -ltk and -ltcl. TK_LIBS="-L/usr/local/lib -ltk -ltcl -ldl" # Mandatory. # On systems that have a ranlib utility, put "ranlib" here. On other # systems put ":" here (Colon is the Bourne-shell do-nothing command). RANLIB="ranlib" # Optional: Needed on systems that support shared libraries. # The name to give the shared pgplot library. SHARED_LIB="libpgplot.so" # Optional: Needed if SHARED_LIB is set. # How to create a shared library from a trailing list of object files. SHARED_LD="gfortran -shared -o $SHARED_LIB -Wl,-soname,libpgplot.so.\$(VM) -lc -f2c" # Optional: # On systems such as Solaris 2.x, that allow specification of the # libraries that a shared library needs to be linked with when a # program that uses it is run, this variable should contain the # library-specification flags used to specify these libraries to # $SHARED_LD SHARED_LIB_LIBS="" # Optional: # Compiler name used on Next systems to compile objective-C files. MCOMPL="" # Optional: # Compiler flags used with MCOMPL when compiling objective-C files. MFLAGC="" # Optional: (Actually mandatory, but already defined by makemake). # Where to look for any system-specific versions of the files in # pgplot/sys. Before evaluating this script, makemake sets SYSDIR to # /wherever/pgplot/sys_$OS, where $OS is the operating-system name # given by the second command-line argument of makemake. If the # present configuration is one of many for this OS, and it needs # different modifications to files in pgplot/sys than the other # configurations, then you should create a subdirectory of SYSDIR, # place the modified files in it and change the following line to # $SYSDIR="$SYSDIR/subdirectory_name". SYSDIR="$SYSDIR" debian/changeperl0000664000000000000000000000111710456230553011226 0ustar #!/usr/bin/perl # Just change /usr/local/bin/perl to /usr/bin/perl # pretty big script. @files = qw( makehtml maketex ); foreach $infile (@files) { open IH,"<$infile" or die "Can't open $infile"; $outfile = $infile . ".new"; open OH,">$outfile" or die "Can't open $outfile"; while ($line = ) { if ($line =~ m|^#!/usr/local/bin/perl|) { print OH "#!/usr/bin/perl\n"; } else { print OH $line; } } close IH; close OH; system "cp $infile $infile.orig" unless -e "$infile.orig"; system "mv $outfile $infile"; system "chmod +x $infile"; } debian/README.debian0000664000000000000000000000271510456230553011301 0ustar pgplot for DEBIAN ---------------------- As of version 5.2.1, pgplot has support for PNG format output. The debian package has been compiled with support for PNG output turned on by default. Compilation of programs using the pgplot library should be linked with "-lpng -lz" in addition to the normal linking with -lpgplot -lX11. To compile the fortran examples in the examples subdirectory, do the following: g77 -fno-backslash foo.f -o foo -lpgplot -L/usr/X11R6/lib -lX11 -lpng -lz -lm The -fno-backslash specifies that `\' is not to be specially interpreted in character and Hollerith constants, which are often used in pgplot labels. To compile the C example in the examples subdirectory, do the following: gcc -c cpgdemo.c g77 cpgdemo.o -o cpgdemo -lcpgplot -lpgplot -L/usr/X11R6/lib -lX11 -lpng -lz -lm If you want to use this package to compile programs based on the pgplot library, you will also need to install the following debian packages - g77, libpng2-dev, zlib1g-dev, libc6-dev, and xlibs-dev. These are already listed in the package Suggests field, but in case you missed it, please make sure you install these packages to develop with pgplot. Gopal Narayanan , Fri Jul 6 13:23:59 EDT 2001 This is the pgplot graphics subroutine library, packaged for Debian. The fortran and c versions of the routines are available. Try 'man pgplot' for more information. John Lapeyre , Fri, 16 Jan 1998 12:49:09 -0700 debian/pgplot5.doc-base0000664000000000000000000000100611364471107012162 0ustar Document: pgplot5 Title: PGPLOT Subroutine Descriptions Author: Dr. Tim Pearson Abstract: This document includes a list of all the PGPLOT subroutines, and then gives detailed instructions for the use of each routine in Fortran programs. The subroutine descriptions are in alphabetical order. PGPLOT is a large subroutine library for plotting scientific data. Section: Science/Data Analysis Format: HTML Files: /usr/share/doc/pgplot5/pgplot.html Index: /usr/share/doc/pgplot5/pgplot.html debian/postinst0000664000000000000000000000071410456230553011003 0ustar #!/bin/sh set -e #DEBHELPER# # Automatically added by dh_installdocs if [ "$1" = "configure" ]; then # if [ -d /usr/doc -a ! -e /usr/doc/pgplot5 -a -d /usr/share/doc/pgplot5 ]; then # ln -sf ../share/doc/pgplot5 /usr/doc/pgplot5 # fi ldconfig fi # End automatically added section # Automatically added by dh_installmenu # if test -x /usr/bin/update-menus ; then update-menus ; fi # End automatically added section debian/prerm0000664000000000000000000000033110456230553010240 0ustar #!/bin/sh set -e #DEBHELPER# # Automatically added by dh_installdocs if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/pgplot5 ]; then rm -f /usr/doc/pgplot5 fi # End automatically added section debian/dhelp.old0000664000000000000000000000016610671147071010773 0ustar math pgplot pgplot.html Pgplot Online Help debian/control0000664000000000000000000000217412267034017010601 0ustar Source: pgplot5 Section: non-free/math Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Carlo Segre XS-Autobuild: yes Build-Depends: debhelper (>= 5.0), gfortran, libpng-dev, zlib1g-dev, perl, libx11-dev, libxaw7-dev, libxt-dev, x11proto-core-dev, libgif-dev , dpkg-dev (>= 1.16.0~) Homepage: http://www.astro.caltech.edu/~tjp/pgplot/ Standards-Version: 3.9.2 Package: pgplot5 Architecture: any Depends: ${shlibs:Depends}, zlib1g, ${misc:Depends} Suggests: gfortran, libpng-dev, zlib1g-dev, libx11-dev, libxaw7-dev, libxt-dev, x11proto-core-dev, libgif-dev Replaces: pgplot Conflicts: pgplot Description: large subroutine library for plotting scientific data This package contains both runtime and development libraries. Many routines are included in pgplot for viewing scientific data. Many (about 70) output devices are supported. 2-D , 3-D , contour, image manipulation, etc. are well supported. Interactive routines are included. Both a C and a FORTRAN library are present. See http://astro.caltech.edu/~tjp/pgplot/ for documentation. debian/source/0000775000000000000000000000000011661632616010500 5ustar debian/source/format0000664000000000000000000000001411661632616011706 0ustar 3.0 (quilt) debian/TODO0000664000000000000000000000031010671147066007662 0ustar Need to split the package into -dev and library packages (maybe post-woody?) Gopal (Thu Mar 21 10:04:39 EST 2002) need to build some of the other utilities included. get bounding box fixer installed. debian/compat0000664000000000000000000000000210456230553010371 0ustar 5 debian/g77_gcc.conf.debian.old0000664000000000000000000001030310650573052013255 0ustar # The GNU gfortran FORTRAN compiler and Gnu gcc C compiler on an elf-system. #----------------------------------------------------------------------- # Optional: Needed by XWDRIV (/xwindow and /xserve) and # X2DRIV (/xdisp and /figdisp). # The arguments needed by the C compiler to locate X-window include files. XINCL="-I/usr/X11R6/include" # Optional: Needed by XMDRIV (/xmotif). # The arguments needed by the C compiler to locate Motif, Xt and # X-window include files. MOTIF_INCL="$XINCL" # Optional: Needed by XADRIV (/xathena). # The arguments needed by the C compiler to locate Xaw, Xt and # X-window include files. ATHENA_INCL="$XINCL" # Optional: Needed by TKDRIV (/xtk). # The arguments needed by the C compiler to locate Tcl, Tk and # X-window include files. TK_INCL="-I/usr/include $XINCL" # Optional: Needed by RVDRIV (/xrv). # The arguments needed by the C compiler to locate Rivet, Tcl, Tk and # X-window include files. RV_INCL="" # Mandatory. # The FORTRAN compiler to use. FCOMPL="gfortran" # Mandatory. # The FORTRAN compiler flags to use when compiling the pgplot library. # (NB. makemake prepends -c to $FFLAGC where needed) FFLAGC="-u -Wall -fPIC -O3" # Mandatory. # The FORTRAN compiler flags to use when compiling fortran demo programs. # This may need to include a flag to tell the compiler not to treat # backslash characters as C-style escape sequences FFLAGD="-fno-backslash" # Mandatory. # The C compiler to use. CCOMPL="gcc" # Mandatory. # The C compiler flags to use when compiling the pgplot library. CFLAGC="-Wall -fPIC -DPG_PPU -O3" # Mandatory. # The C compiler flags to use when compiling C demo programs. CFLAGD="-Wall -O3" # Optional: Only needed if the cpgplot library is to be compiled. # The flags to use when running pgbind to create the C pgplot wrapper # library. (See pgplot/cpg/pgbind.usage) PGBIND_FLAGS="bsd" # Mandatory. # The library-specification flags to use when linking normal pgplot # demo programs. LIBS="-L/usr/X11R6/lib -lX11" # Optional: Needed by XMDRIV (/xmotif). # The library-specification flags to use when linking motif # demo programs. MOTIF_LIBS="-lXm -lXt $LIBS" # Optional: Needed by XADRIV (/xathena). # The library-specification flags to use when linking athena # demo programs. ATHENA_LIBS="-lXaw -lXt -lXmu -lXext $LIBS" # Optional: Needed by TKDRIV (/xtk). # The library-specification flags to use when linking Tk demo programs. # Note that you may need to append version numbers to -ltk and -ltcl. TK_LIBS="-L/usr/lib -ltk -ltcl $LIBS -ldl" # Mandatory. # On systems that have a ranlib utility, put "ranlib" here. On other # systems put ":" here (Colon is the Bourne-shell do-nothing command). RANLIB="ranlib" # Optional: Needed on systems that support shared libraries. # The name to give the shared pgplot library. SHARED_LIB="libpgplot.so" # Optional: Needed if SHARED_LIB is set. # How to create a shared library from a trailing list of object files. SHARED_LD="gcc -shared -o $SHARED_LIB -Wl,-soname,libpgplot.so.\$(VM) -lc -f2c" # Optional: # On systems such as Solaris 2.x, that allow specification of the # libraries that a shared library needs to be linked with when a # program that uses it is run, this variable should contain the # library-specification flags used to specify these libraries to # $SHARED_LD SHARED_LIB_LIBS="" # Optional: # Compiler name used on Next systems to compile objective-C files. MCOMPL="" # Optional: # Compiler flags used with MCOMPL when compiling objective-C files. MFLAGC="" # Optional: (Actually mandatory, but already defined by makemake). # Where to look for any system-specific versions of the files in # pgplot/sys. Before evaluating this script, makemake sets SYSDIR to # /wherever/pgplot/sys_$OS, where $OS is the operating-system name # given by the second command-line argument of makemake. If the # present configuration is one of many for this OS, and it needs # different modifications to files in pgplot/sys than the other # configurations, then you should create a subdirectory of SYSDIR, # place the modified files in it and change the following line to # $SYSDIR="$SYSDIR/subdirectory_name". SYSDIR="$SYSDIR" debian/rules0000775000000000000000000001705112267034122010253 0ustar #!/usr/bin/make -f # Made with the aid of debmake, by Christoph Lameter, # based on the sample debian/rules file for GNU hello by Ian Jackson. # modified by Gopal Narayanan to use # debhelper commands export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) package=pgplot npackage=pgplot5 version=$(shell expr `pwd` : '.*-\([0-9.]*\)') version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*') vm=$(version_major) curdir=$(shell pwd) bdir=debian/builddir packagedir=debian/$(npackage) INSTALL =/usr/bin/install GZIP =/bin/gzip INSTALL_DATA =$(INSTALL) -m644 -o root -g root INSTALL_STRIP =$(INSTALL) -m755 -o root -g root -s GZIP_DATA =$(GZIP) -9 INSTALL_DIR = $(INSTALL) -d -m755 -o root -g root # Decide if changes for 64 bit systems need to be made # 64-BIT_BUILD_STAMP = 64-BIT_CLEAN_STAMP = ifeq (64,$(shell dpkg-architecture -qDEB_BUILD_ARCH_BITS)) 64-BIT_BUILD_STAMP = 64-bit-patch-stamp 64-BIT_CLEAN_STAMP = 64-bit-clean-stamp endif # Construct the library dependency entry for shlibs # shl1=lib$(package) $(vm) pgplot5 (>= $(version)) # Restore 32-bit files # 64-bit-clean-stamp: mv debian/gidriv.f drivers/gidriv.f mv debian/ppdriv.f drivers/ppdriv.f mv debian/wddriv.f drivers/wddriv.f rm 64-bit-patch-stamp # Move 64-bit-safe files into position # 64-bit-patch-stamp: mv drivers/gidriv.f debian/gidriv.f cp debian/gidriv_64.f drivers/gidriv.f mv drivers/ppdriv.f debian/ppdriv.f cp debian/ppdriv_64.f drivers/ppdriv.f mv drivers/wddriv.f debian/wddriv.f cp debian/wddriv_64.f drivers/wddriv.f touch 64-bit-patch-stamp build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: $(64-BIT_BUILD_STAMP) dh_testdir # create the build directory and copy configuration files to it. install -d $(bdir) cp debian/drivers.list.debian $(bdir)/drivers.list cp sys_linux/g77_gcc.conf sys_linux/g77_gcc.conf.orig cp debian/g77_gcc.conf.debian sys_linux/g77_gcc.conf cd $(bdir); $(curdir)/makemake $(curdir) linux g77_gcc # changeperl no longer necessary - upstream uses /usr/bin/perl now # perl debian/changeperl cd $(bdir);make FFLAGC="-u -Wall -O2" CFLAGC="-Wall -DPG_PPU -O3" all;make clean;make FFLAGC="-u -Wall -O2" CFLAGC="-Wall -DPG_PPU -O3" cpg;make pgplot.html;make pgplot-routines.tex # -cd $(bdir); rm *.o cd $(bdir) ; make clean; make FFLAGC="-u -Wall -O2 -fPIC" CFLAGC="-Wall -fPIC -D_REENTRANT -DPG_PPU -O3" VM="$(version_major)" shared cpg-shared touch build-stamp clean: dh_testdir dh_testroot -rm -rf static shared -rm -f build-stamp install-stamp -rm -rf $(bdir) # -make clean # -rm -f `find . -name "*~"` # -rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core -rm -f debian/*substvars dh_clean install: install-stamp install-stamp: build-stamp $(64-BIT_CLEAN_STAMP) dh_testdir dh_testroot dh_clean -k dh_installdirs $(INSTALL_DATA) $(bdir)/libpgplot.a $(packagedir)/usr/lib/ $(INSTALL_DATA) $(bdir)/libcpgplot.a $(packagedir)/usr/lib/ $(INSTALL_DATA) $(bdir)/libpgplot.so $(packagedir)/usr/lib/libpgplot.so.$(version) $(INSTALL_DATA) $(bdir)/libcpgplot.so $(packagedir)/usr/lib/libcpgplot.so.$(version) strip --strip-unneeded $(packagedir)/usr/lib/libpgplot.so.$(version) strip --strip-unneeded $(packagedir)/usr/lib/libcpgplot.so.$(version) ln -s lib$(package).so.$(version) $(packagedir)/usr/lib/lib$(package).so.$(version_major) ln -s libcpgplot.so.$(version) $(packagedir)/usr/lib/libcpgplot.so.$(version_major) ln -s lib$(package).so.$(version_major) $(packagedir)/usr/lib/lib$(package).so ln -s libcpgplot.so.$(version_major) $(packagedir)/usr/lib/libcpgplot.so # chmod 644 $(packagedir)/usr/lib/$(npackage)/* $(INSTALL_DATA) $(bdir)/cpgplot.h $(packagedir)/usr/include/ # $(INSTALL_STRIP) $(bdir)/pgdisp $(packagedir)/usr/bin/ # install $(bdir)/pgbind $(packagedir)/usr/bin/ $(INSTALL_STRIP) $(bdir)/pgxwin_server $(packagedir)/usr/bin/ # cd $(packagedir)/usr/bin ; strip --strip-unneeded pgdisp pgxwin_server $(INSTALL_DATA) $(bdir)/grexec.f $(packagedir)/usr/lib/$(npackage) $(INSTALL_DATA) $(bdir)/grfont.dat $(packagedir)/usr/lib/$(npackage) $(INSTALL_DATA) $(bdir)/grexec.f $(packagedir)/usr/lib/$(npackage) $(INSTALL_DATA) $(bdir)/rgb.txt $(packagedir)/usr/lib/$(npackage) $(INSTALL_DATA) $(bdir)/grpckg1.inc $(packagedir)/usr/lib/$(npackage) # Install the overrides file for lintian cp -a debian/overrides $(packagedir)/usr/share/lintian/overrides/pgplot5 #dh_movefiles touch install-stamp binary-indep: build install # $(checkdir) # There are no architecture-independent files to be uploaded # generated by this package. If there were any they would be # made here. binary-arch: build install # dh_testversion dh_testdir -a dh_testroot -a # -rm -rf $(packagedir) # install -d $(packagedir)/DEBIAN # Insert appropriate lines into shlibs file # # echo -e '$(shl1)\n' >$(packagedir)/DEBIAN/shlibs # install -d $(packagedir)/usr/doc/$(npackage)/examples # install -d $(packagedir)/usr/lib/$(npackage) # install -d $(packagedir)/usr/bin # cd $(packagedir) && install -d `cat ../dirs` $(INSTALL_DATA) $(bdir)/pgplot.doc $(packagedir)/usr/share/doc/$(npackage) $(GZIP_DATA) $(packagedir)/usr/share/doc/$(npackage)/pgplot.doc # cp pgdispd/aaaread.me $(packagedir)/usr/share/doc/$(npackage)/pgdisp.txt # $(GZIP_DATA) $(packagedir)/usr/share/doc/$(npackage)/pgdisp.txt $(INSTALL_DATA) $(bdir)/drivers.list $(packagedir)/usr/share/doc/$(npackage) $(GZIP_DATA) $(packagedir)/usr/share/doc/$(npackage)/drivers.list $(INSTALL_DATA) $(bdir)/pgplot-routines.tex $(packagedir)/usr/share/doc/$(npackage) $(GZIP_DATA) $(packagedir)/usr/share/doc/$(npackage)/pgplot-routines.tex $(INSTALL_DATA) $(bdir)/pgplot.html $(packagedir)/usr/share/doc/$(npackage) $(INSTALL_DATA) cpg/cpgplot.doc $(packagedir)/usr/share/doc/$(npackage) $(GZIP_DATA) $(packagedir)/usr/share/doc/$(npackage)/cpgplot.doc # $(INSTALL_DATA) cpg/cpgdemo.c $(packagedir)/usr/share/doc/$(npackage)/examples # $(INSTALL_DATA) debian/pgplot.3x $(packagedir)/usr/man/man3 # gzip -9v $(packagedir)/usr/man/man3/* dh_installman dh_installdocs $(INSTALL_DATA) aaaread.me $(packagedir)/usr/share/doc/$(npackage) # $(INSTALL_DATA) install-unix.txt $(packagedir)/usr/share/doc/$(npackage) $(INSTALL_DATA) ver5*.txt $(packagedir)/usr/share/doc/$(npackage) dh_installexamples examples/*.f dh_installexamples cpg/cpgdemo.c # cp examples/* $(packagedir)/usr/share/doc/$(npackage)/examples # Install installation scripts # # cp debian/postinst $(packagedir)/DEBIAN/. # chmod +x $(packagedir)/DEBIAN/postinst dh_installchangelogs $(INSTALL_DATA) debian/copyright $(packagedir)/usr/share/doc/$(npackage) $(INSTALL_DATA) debian/changelog $(packagedir)/usr/share/doc/$(npackage)/changelog.Debian $(GZIP_DATA) $(packagedir)/usr/share/doc/$(npackage)/changelog.Debian dh_strip -a $(packagedir)/usr/bin/* dh_makeshlibs -a dh_link -a # dh_dhelp dh_compress -a dh_fixperms -a # dh_suidregister -a dh_installdeb -a dh_shlibdeps -a dh_gencontrol -a dh_md5sums -a dh_builddeb -a # cp debian/README.debian $(packagedir)/usr/doc/$(npackage) # cp debian/changelog $(packagedir)/usr/doc/$(npackage)/changelog.Debian # gzip -9v $(packagedir)/usr/doc/$(npackage)/changelog.Debian # cp debian/copyright $(packagedir)/usr/doc/$(npackage) # dpkg-shlibdeps $(packagedir)/usr/lib/libpgplot.so.$(version) # dpkg-gencontrol # chown -R root.root $(packagedir) # chmod -R go=rX $(packagedir) # dpkg --build $(packagedir) .. #define checkdir # test -f debian/rules #endef binary: binary-indep binary-arch #checkroot: # $(checkdir) # test root = "`whoami`" .PHONY: build clean binary-indep binary-arch binary install debian/wddriv_64.f0000664000000000000000000004062711365057627011174 0ustar C*WDDRIV -- PGPLOT XWD drivers C+ SUBROUTINE WDDRIV (IFUNC, RBUF, NBUF, CHR, LCHR, MODE) INTEGER IFUNC, NBUF, LCHR, MODE REAL RBUF(*) CHARACTER*(*) CHR * * PGPLOT driver for X Window Dump (XWD) files. * * Supported device: XWD format * * Device type codes: /WD or /VWD * * Default device name: pgplot.xwd. * * If you have more than one image to plot (i.e. use PGPAGE) with this * device, subsequent pages will be named: pgplot2.xwd, pgplot3.xwd, * etc, disrespective of the device name you specified. * You can however bypass this by specifying a device name including a * number sign (#), which will henceforth be replaced by the pagenumber. * Example: page#.xwd will produce files page1.xwd, page2.xwd, ..., * page234.xwd, etc. * * Default view surface dimensions are: * - WD : 850 x 680 pixels (translates to 10.0 x 8.0 inch). * - VWD : 680 x 850 pixels (translates to 8.0 x 10.0 inch). * with an assumed scale of 85 pixels/inch. * Default width and height can be overridden by specifying environment * variables * PGPLOT_WD_WIDTH (default 850) * PGPLOT_WD_HEIGHT (default 680) * * Color capability: * Indices 0 to 255 are supported. Each of these indices can be assigned * one color. Default colors for indices 0 to 15 are implemented. * * Obtaining hardcopy: Use an XWD viewer (xwud) or converter. *= * 23-Jan-1995 - Steal GIDRIV.F code and bash appropriately [SCA]. * 28-Dec-1995 - Prevent concurrent access [TJP]. * 29-Apr-1996 - Use GRCTOI to decode environment variables [TJP]. *----------------------------------------------------------------------- CHARACTER*(*) LTYPE, PTYPE, DEFNAM INTEGER DWD, DHT, BX, BY PARAMETER (LTYPE= 1'WD (X Window Dump file, landscape orientation)', 2 PTYPE= 3'VWD (X Window Dump file, portrait orientation)') PARAMETER (DEFNAM='pgplot.xwd') PARAMETER (DWD=850, DHT=680) REAL XRES, YRES PARAMETER (XRES=85., YRES=XRES) C INTEGER UNIT, IC, NPICT, MAXIDX, STATE INTEGER CTABLE(3,0:255), CDEFLT(3,0:15) INTEGER IER, I, L, LL, IX0, IY0, IX1, IY1, USERH, USERW, JUNK INTEGER GRGMEM, GRFMEM, GROFIL, GRCFIL, GRCTOI CHARACTER*80 MSG, INSTR, FILENM C C Note: for 64-bit operating systems, change the following C declaration to INTEGER*8: C INTEGER*8 PIXMAP C SAVE UNIT, IC, CTABLE, NPICT, MAXIDX, BX, BY, PIXMAP, FILENM SAVE CDEFLT, STATE DATA CDEFLT /000,000,000, 255,255,255, 255,000,000, 000,255,000, 1 000,000,255, 000,255,255, 255,000,255, 255,255,000, 2 255,128,000, 128,255,000, 000,255,128, 000,128,255, 3 128,000,255, 255,000,128, 085,085,085, 170,170,170/ DATA STATE /0/ C----------------------------------------------------------------------- C GOTO( 10, 20, 30, 40, 50, 60, 70, 80, 90,100, 1 110,120,130,140,150,160,170,180,190,200, 2 210,220,230,240,250,260,270,280,290), IFUNC 900 WRITE (MSG,'(I10)') IFUNC CALL GRWARN('Unimplemented function in WD device driver:' 1 //MSG) NBUF = -1 RETURN C C--- IFUNC = 1, Return device name ------------------------------------- C 10 IF (MODE.EQ.1) THEN CHR = LTYPE LCHR = LEN(LTYPE) ELSE IF (MODE.EQ.2) THEN CHR = PTYPE LCHR = LEN(PTYPE) ELSE CALL GRWARN('Requested MODE not implemented in WD driver') END IF RETURN C C--- IFUNC = 2, Return physical min and max for plot device, and range C of color indices --------------------------------------- C (Maximum size is set by XWD format to 2**16 - 1 pixels) 20 RBUF(1) = 0 RBUF(2) = 65535 RBUF(3) = 0 RBUF(4) = 65535 RBUF(5) = 0 RBUF(6) = 255 NBUF = 6 RETURN C C--- IFUNC = 3, Return device resolution ------------------------------- C 30 RBUF(1) = XRES RBUF(2) = YRES RBUF(3) = 1 NBUF = 3 RETURN C C--- IFUNC = 4, Return misc device info -------------------------------- C (This device is Hardcopy, supports rectangle fill, pixel C primitives, and query color rep.) C 40 CHR = 'HNNNNRPNYN' LCHR = 10 RETURN C C--- IFUNC = 5, Return default file name ------------------------------- C 50 CHR = DEFNAM LCHR = LEN(DEFNAM) RETURN C C--- IFUNC = 6, Return default physical size of plot ------------------- C 60 RBUF(1) = 0 RBUF(2) = BX-1 RBUF(3) = 0 RBUF(4) = BY-1 NBUF = 4 RETURN C C--- IFUNC = 7, Return misc defaults ----------------------------------- C 70 RBUF(1) = 1 NBUF=1 RETURN C C--- IFUNC = 8, Select plot -------------------------------------------- C 80 CONTINUE RETURN C C--- IFUNC = 9, Open workstation --------------------------------------- C 90 CONTINUE C -- check for concurrent access IF (STATE.EQ.1) THEN CALL GRWARN('a PGPLOT XWD file is already open') RBUF(1) = 0 RBUF(2) = 0 RETURN END IF C -- dimensions of plot buffer USERW = 0 USERH = 0 CALL GRGENV('WD_WIDTH', INSTR, L) LL = 1 IF (L.GT.0) USERW = GRCTOI(INSTR(:L),LL) CALL GRGENV('WD_HEIGHT', INSTR, L) LL = 1 IF (L.GT.0) USERH = GRCTOI(INSTR(:L),LL) IF (MODE.EQ.1) THEN * -- Landscape BX = DWD IF (USERW.GE.8) BX = USERW BY = DHT IF (USERH.GE.8) BY = USERH ELSE * -- Portrait BX = DHT IF (USERH.GE.8) BX = USERH BY = DWD IF (USERW.GE.8) BY = USERW END IF NPICT=1 MAXIDX=0 * -- Initialize color table DO 95 I=0,15 CTABLE(1,I) = CDEFLT(1,I) CTABLE(2,I) = CDEFLT(2,I) CTABLE(3,I) = CDEFLT(3,I) 95 CONTINUE DO 96 I=16,255 CTABLE(1,I) = 128 CTABLE(2,I) = 128 CTABLE(3,I) = 128 96 CONTINUE * FILENM = CHR(:LCHR) CALL GRWD05 (FILENM, NPICT, MSG) UNIT = GROFIL (MSG) RBUF(1) = UNIT IF (UNIT.LT.0) THEN CALL GRWARN('Cannot open output file for WD plot') RBUF(2) = 0 ELSE RBUF(2) = 1 STATE = 1 END IF RETURN C C--- IFUNC=10, Close workstation --------------------------------------- C 100 CONTINUE STATE = 0 RETURN C C--- IFUNC=11, Begin picture ------------------------------------------- C 110 CONTINUE BX = NINT(RBUF(1))+1 BY = NINT(RBUF(2))+1 IER = GRGMEM(BX*BY, PIXMAP) IF (IER.NE.1) THEN CALL GRGMSG(IER) CALL GRWARN('Failed to allocate plot buffer.') BX = 0 BY = 0 PIXMAP = 0 END IF C -- initialize to zero (background color) IF (PIXMAP.NE.0) : CALL GRWD03(1, 1, BX, BY, 0, BX, BY, %VAL(PIXMAP)) IF (NPICT.GT.1) THEN CALL GRWD05 (FILENM, NPICT, MSG) UNIT = GROFIL(MSG) IF (UNIT.LT.0) THEN CALL GRWARN('Cannot open output file for WD plot') END IF END IF RETURN C C--- IFUNC=12, Draw line ----------------------------------------------- C 120 CONTINUE IX0=NINT(RBUF(1))+1 IX1=NINT(RBUF(3))+1 IY0=BY-NINT(RBUF(2)) IY1=BY-NINT(RBUF(4)) IF (PIXMAP.NE.0) : CALL GRWD01(IX0, IY0, IX1, IY1, IC, BX, BY, %VAL(PIXMAP)) RETURN C C--- IFUNC=13, Draw dot ------------------------------------------------ C 130 CONTINUE IX0=NINT(RBUF(1))+1 IY0=BY-NINT(RBUF(2)) IF (PIXMAP.NE.0) : CALL GRWD01(IX0, IY0, IX0, IY0, IC, BX, BY, %VAL(PIXMAP)) RETURN C C--- IFUNC=14, End picture --------------------------------------------- C 140 CONTINUE IF (UNIT.GE.0) THEN CALL GRWD06(UNIT, BX, BY, CTABLE, %VAL(PIXMAP), MAXIDX) JUNK = GRCFIL(UNIT) END IF NPICT = NPICT+1 IER = GRFMEM(BX*BY, PIXMAP) IF (IER.NE.1) THEN CALL GRGMSG(IER) CALL GRWARN('Failed to deallocate plot buffer.') END IF RETURN C C--- IFUNC=15, Select color index -------------------------------------- C 150 CONTINUE IC = RBUF(1) MAXIDX = MAX(MAXIDX, IC) RETURN C C--- IFUNC=16, Flush buffer. ------------------------------------------- C (Not used.) C 160 CONTINUE RETURN C C--- IFUNC=17, Read cursor. -------------------------------------------- C (Not implemented: should not be called) C 170 CONTINUE GOTO 900 C C--- IFUNC=18, Erase alpha screen. ------------------------------------- C (Not implemented: no alpha screen) C 180 CONTINUE RETURN C C--- IFUNC=19, Set line style. ----------------------------------------- C (Not implemented: should not be called) C 190 CONTINUE GOTO 900 C C--- IFUNC=20, Polygon fill. ------------------------------------------- C (Not implemented: should not be called) C 200 CONTINUE GOTO 900 C C--- IFUNC=21, Set color representation. ------------------------------- C 210 CONTINUE I = RBUF(1) CTABLE(1, I) = NINT(RBUF(2)*255) CTABLE(2, I) = NINT(RBUF(3)*255) CTABLE(3, I) = NINT(RBUF(4)*255) RETURN C C--- IFUNC=22, Set line width. ----------------------------------------- C (Not implemented: should not be called) C 220 CONTINUE GOTO 900 C C--- IFUNC=23, Escape -------------------------------------------------- C (Not implemented: ignored) C 230 CONTINUE RETURN C C--- IFUNC=24, Rectangle fill ------------------------------------------ C 240 CONTINUE IX0=NINT(RBUF(1))+1 IX1=NINT(RBUF(3))+1 IY1=BY-NINT(RBUF(2)) IY0=BY-NINT(RBUF(4)) IF (PIXMAP.NE.0) : CALL GRWD03(IX0, IY0, IX1, IY1, IC, BX, BY, %VAL(PIXMAP)) RETURN C C--- IFUNC=25, Not implemented ----------------------------------------- C 250 CONTINUE RETURN C C--- IFUNC=26, Line of pixels ------------------------------------------ C 260 CONTINUE CALL GRWD04(NBUF, RBUF, BX, BY, %VAL(PIXMAP), MAXIDX) RETURN C C--- IFUNC=27, Not implemented ----------------------------------------- C 270 CONTINUE RETURN C C--- IFUNC=28, Not implemented ----------------------------------------- C 280 CONTINUE RETURN C C--- IFUNC=29, Query color representation. ----------------------------- C 290 CONTINUE I = RBUF(1) RBUF(2) = CTABLE(1,I)/255.0 RBUF(3) = CTABLE(2,I)/255.0 RBUF(4) = CTABLE(3,I)/255.0 NBUF = 4 RETURN C----------------------------------------------------------------------- END **GRWD01 -- PGPLOT WD driver, draw line *+ SUBROUTINE GRWD01 (IX0, IY0, IX1, IY1, ICOL, BX, BY, PIXMAP) INTEGER IX0, IY0, IX1, IY1 INTEGER ICOL, BX, BY BYTE PIXMAP(BX,BY) * * Draw a straight-line segment from absolute pixel coordinates * (IX0, IY0) to (IX1, IY1). * * Arguments: * ICOL (input): Color index * PIXMAP (input/output): The image data buffer. *----------------------------------------------------------------------- INTEGER IX, IY, IS REAL D BYTE VAL C IF (ICOL .GT. 127) THEN VAL = ICOL - 256 ELSE VAL = ICOL END IF C IF (IX0.EQ.IX1 .AND. IY0.EQ.IY1) THEN PIXMAP(IX0,IY0)=VAL ELSE IF (ABS(IY1-IY0).GT.ABS(IX1-IX0)) THEN D=(IX1-IX0)/REAL(IY1-IY0) IS=1 IF (IY1.LT.IY0) IS=-1 DO 10 IY=IY0,IY1,IS IX=NINT(IX0+(IY-IY0)*D) PIXMAP(IX,IY)=VAL 10 CONTINUE ELSE D=(IY1-IY0)/REAL(IX1-IX0) IS=1 IF (IX1.LT.IX0) IS=-1 DO 20 IX=IX0,IX1,IS IY=NINT(IY0+(IX-IX0)*D) PIXMAP(IX,IY)=VAL 20 CONTINUE END IF END **GRWD02 -- Store unsigned 16-bit integer in host independent format *+ SUBROUTINE GRWD02(I, ARR) BYTE ARR(2) INTEGER I, TMP * TMP = MOD(I/256,256) IF (TMP .GT. 127) THEN ARR(1) = TMP - 256 ELSE ARR(1) = TMP END IF TMP = MOD(I,256) IF (TMP .GT. 127) THEN ARR(2) = TMP - 256 ELSE ARR(2) = TMP END IF END **GRWD03 -- PGPLOT WD driver, fill rectangle *+ SUBROUTINE GRWD03 (IX0, IY0, IX1, IY1, ICOL, BX, BY, PIXMAP) INTEGER IX0, IY0, IX1, IY1 INTEGER ICOL, BX, BY BYTE PIXMAP(BX,BY) * * Arguments: * IX0, IY0 (input): Lower left corner. * IX1, IY1 (input): Upper right corner. * ICOL (input): Color value. * BX, BY (input): dimensions of PIXMAP. * PIXMAP (input/output): The image data buffer. *----------------------------------------------------------------------- INTEGER IX, IY BYTE VAL * IF (ICOL .GT. 127) THEN VAL = ICOL - 256 ELSE VAL = ICOL END IF DO 20 IY=IY0,IY1 DO 10 IX=IX0,IX1 PIXMAP(IX,IY) = VAL 10 CONTINUE 20 CONTINUE END **GRWD04 -- PGPLOT WD driver, fill image line *+ SUBROUTINE GRWD04(NBUF,RBUF,BX,BY,PIXMAP,MAXIDX) INTEGER I,J,NBUF,BX,BY,N,IC,MAXIDX REAL RBUF(NBUF) BYTE PIXMAP(BX,BY) *- I = NINT(RBUF(1))+1 J = BY-NINT(RBUF(2)) DO 10 N=3,NBUF IC=RBUF(N) IF (IC .GT. 127) THEN PIXMAP(I+N-3,J)=IC - 256 ELSE PIXMAP(I+N-3,J)=IC END IF MAXIDX=MAX(MAXIDX,IC) 10 CONTINUE END **GRWD05 -- Replace # in filename by picture number *+ SUBROUTINE GRWD05 (NAME1, NP, NAME2) CHARACTER*(*) NAME1 CHARACTER*(*) NAME2 CHARACTER*80 TMP INTEGER GRTRIM INTEGER NP, IDX, L, LN LN = GRTRIM(NAME1) IDX = INDEX(NAME1,'#') IF (IDX.GT.0) THEN C -- if the supplied name contains a #-character, replace C it with the page number CALL GRFAO(NAME1, L, TMP, NP, 0, 0, 0) ELSE IF (NP.EQ.1) THEN C -- if this is the first page, use the supplied name NAME2 = NAME1 RETURN ELSE IF (LN+2.LE.LEN(NAME1)) THEN C -- append an underscore and the page number to the supplied C name NAME1(LN+1:LN+2) = '_#' CALL GRFAO(NAME1, L, TMP, NP, 0, 0, 0) ELSE C -- last resort: invent a new name CALL GRFAO('pgplot#.xwd', L, TMP, NP, 0, 0, 0) END IF CALL GRWARN ('Writing new XWD image as: '//TMP(:L)) NAME2 = TMP(:L) END **GRWD06 -- PGPLOT WD driver, write XWD image *+ SUBROUTINE GRWD06 (UNIT, BX, BY, CTABLE, PIXMAP, MAXIDX) INTEGER UNIT, BX, BY, MAXIDX INTEGER CTABLE(3,0:255) BYTE PIXMAP(BX * BY) * * Write XWD image to UNIT. * * Arguments: * UNIT (input): Output unit * BX,BY (input): Image size * CTABLE (input): Color map * PIXMAP (input): Image data * MAXIDX (input): Maximum color index used. *-- * 23-Jan-1995 - New routine [SCA] *----------------------------------------------------------------------- BYTE COLOR(12), HEAD(107) INTEGER I, J, IER INTEGER GRWFIL DATA COLOR /0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0/ DATA HEAD / 0, 0, 0, 107, 0, 0, 0, 7, 1 0, 0, 0, 2, 0, 0, 0, 8, 2 0, 0, 0, 0, 0, 0, 0, 0, 3 0, 0, 0, 0, 0, 0, 0, 1, 4 0, 0, 0, 8, 0, 0, 0, 1, 5 0, 0, 0, 8, 0, 0, 0, 8, 6 0, 0, 0, 0, 0, 0, 0, 3, 7 0, 0, 0, 0, 0, 0, 0, 0, 8 0, 0, 0, 0, 0, 0, 0, 8, 9 0, 0, 1, 0, 0, 0, 0, 0, A 0, 0, 0, 0, 0, 0, 0, 0, B 0, 0, 0, 0, 0, 0, 0, 0, C 0, 0, 0, 0, 80, 71, 80, 76, D 79, 84, 0/ * * Write image width into Header. * CALL GRWD02 (BX, HEAD(19)) CALL GRWD02 (BX, HEAD(51)) CALL GRWD02 (BX, HEAD(83)) * * Write image height into Header. * CALL GRWD02 (BY, HEAD(23)) CALL GRWD02 (BY, HEAD(87)) * * Write number of colors into Header. * CALL GRWD02 (MAXIDX + 1, HEAD(79)) * * Write Header. * IER = GRWFIL (UNIT, 107, HEAD) IF (IER .NE. 107) CALL GRWARN ('Error writing XWD header') * * Write out the color table. * DO J = 0, MAXIDX CALL GRWD02 (J, COLOR(3)) DO I = 1, 3 IF (CTABLE(I,J) .GT. 127) THEN COLOR(3 + I * 2) = CTABLE(I,J) - 256 ELSE COLOR(3 + I * 2) = CTABLE(I,J) END IF COLOR(4 + I * 2) = COLOR(3 + I * 2) END DO IER = GRWFIL (UNIT, 12, COLOR) END DO * * Write out the bitmap. * IER = GRWFIL (UNIT, BX * BY, PIXMAP) END