diff -Nru xnecview-1.35/config.h xnecview-1.36/config.h --- xnecview-1.35/config.h 2017-07-28 00:16:07.000000000 +0000 +++ xnecview-1.36/config.h 2002-07-20 22:00:40.000000000 +0000 @@ -57,6 +57,6 @@ #define XFONT "6x10" /* font for text in the on-screen drawing */ #define PSFONT "helvetica" /* font for postscript output (size is derived by scaling the X font) */ -#define DEFAULTR0 50.0 /* default reference impedance for SWR calculation */ +#define R0 50.0 /* default reference impedance for SWR calculation */ #define Polthr (M_SQRT2-1) /* threshold of axial ratio used in polarization-colouring */ diff -Nru xnecview-1.35/debian/changelog xnecview-1.36/debian/changelog --- xnecview-1.35/debian/changelog 2017-07-28 00:16:07.000000000 +0000 +++ xnecview-1.36/debian/changelog 2017-07-27 19:03:30.000000000 +0000 @@ -1,8 +1,24 @@ -xnecview (1.35-8build1) yakkety; urgency=medium +xnecview (1.36-1) unstable; urgency=medium - * No-change rebuild for libpng soname change. + * QA upload + * New upstream release (Closes: #675901) + * Switch to source format 3.0 (quilt) + - import modifications to upstream source as patch + - splitting those patches into logical units + * Add Homepage to d/control + * Drop README.debian + * Fix FTBFS that occured with hardening enabled (patch + 05_fix_ftbfs_hardening.diff) + * Switch to short debhelper format and set compat level 10 + - refactor d/rules + - remove d/dirs + - prerm no longer needed + - install manpages using d/manpages + - clean using d/clean + * Change d/copyright to machine-readable version + * Create Debian packaging repository on allioth, point VCS-* to it. - -- Matthias Klose Sat, 23 Apr 2016 00:33:46 +0000 + -- Tobias Frost Thu, 27 Jul 2017 21:03:30 +0200 xnecview (1.35-8) unstable; urgency=medium diff -Nru xnecview-1.35/debian/clean xnecview-1.36/debian/clean --- xnecview-1.35/debian/clean 1970-01-01 00:00:00.000000000 +0000 +++ xnecview-1.36/debian/clean 2017-07-27 18:20:56.000000000 +0000 @@ -0,0 +1,2 @@ +*.o +xnecview diff -Nru xnecview-1.35/debian/compat xnecview-1.36/debian/compat --- xnecview-1.35/debian/compat 2017-07-28 00:16:07.000000000 +0000 +++ xnecview-1.36/debian/compat 2017-07-27 18:02:22.000000000 +0000 @@ -1 +1 @@ -5 +10 diff -Nru xnecview-1.35/debian/control xnecview-1.36/debian/control --- xnecview-1.35/debian/control 2017-07-28 00:16:07.000000000 +0000 +++ xnecview-1.36/debian/control 2017-07-27 19:03:14.000000000 +0000 @@ -2,12 +2,15 @@ Section: hamradio Priority: extra Maintainer: Debian QA Group -Standards-Version: 3.8.2 -Build-Depends: debhelper(>=5.0), +Standards-Version: 4.0.0 +Homepage: https://www.cs.utwente.nl/~ptdeboer/ham/xnecview/ +Build-Depends: debhelper(>=10), libgtk2.0-dev, libpng-dev, libxaw7-dev, xutils-dev +VCS-Browser: https://anonscm.debian.org/git/collab-maint/xnecview.git +VCS-Git: https://anonscm.debian.org/git/collab-maint/xnecview.git Package: xnecview Architecture: any diff -Nru xnecview-1.35/debian/copyright xnecview-1.36/debian/copyright --- xnecview-1.35/debian/copyright 2017-07-28 00:16:07.000000000 +0000 +++ xnecview-1.36/debian/copyright 2017-07-27 19:03:14.000000000 +0000 @@ -1,36 +1,31 @@ -This package was originally debianized by afrb2@debian.org -Thu, 27 May 1999 16:53:48 +0100. +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: http://wwwhome.ewi.utwente.nl/~ptdeboer/ham/xnecview/ -The original version of this package was downloaded from - -ftp://ftp.qsl.net/pub/wb6tpu/NEC/xnecview-0.1.tar - -Later versions were downloaded from the xnecview homepage -http://www.cs.utwente.nl/~ptdeboer/ham/xnecview/ - -Copyright: - - -Copyright (C) 1998-2006, Pieter-Tjerk de Boer - ------------------------------------------------------------------------ -This program is free software; you can redistribute it and/or modify -it under the terms of version 2 of the GNU General Public License as -published by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -MA 02110-1301, USA. ------------------------------------------------------------------------ - -On Debian systems, the complete text of the GNU General Public -License, version 2, can be found in /usr/share/common-licenses/GPL-2. - -The Debian packaging is Copyright (C) 1999-2008 Alan Bain -and is licensed under the GPL-2, see above. +Files: * +Copyright: 1998-2006, 2011 Pieter-Tjerk de Boer +License: GPL-2.0 + +Files: debian/* +Copyright: 1999-2008 Alan Bain + 2005-2006 Luk Claes + 2009-2011 Evgeni Golov + 2016-2017 Tobisa Frost +License: GPL-2.0 + +License: GPL-2.0 + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License as + published by the Free Software Foundation. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301, USA. + . + On Debian systems, the complete text of the GNU General Public + License, version 2, can be found in /usr/share/common-licenses/GPL-2. diff -Nru xnecview-1.35/debian/dirs xnecview-1.36/debian/dirs --- xnecview-1.35/debian/dirs 2017-07-28 00:16:07.000000000 +0000 +++ xnecview-1.36/debian/dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -usr/bin -usr/share/man/man1 diff -Nru xnecview-1.35/debian/manpages xnecview-1.36/debian/manpages --- xnecview-1.35/debian/manpages 1970-01-01 00:00:00.000000000 +0000 +++ xnecview-1.36/debian/manpages 2017-07-27 19:03:14.000000000 +0000 @@ -0,0 +1 @@ +xnecview.1x diff -Nru xnecview-1.35/debian/patches/01_libpng16.diff xnecview-1.36/debian/patches/01_libpng16.diff --- xnecview-1.35/debian/patches/01_libpng16.diff 1970-01-01 00:00:00.000000000 +0000 +++ xnecview-1.36/debian/patches/01_libpng16.diff 2017-07-27 05:58:13.000000000 +0000 @@ -0,0 +1,30 @@ +Description: Patch to compile with libpng1.6 +Author: Tobias Frost +Bug-Debian: https://bugs.debian.org/662566 +Last-Update: 2017-07-26 + +--- a/xwin.c ++++ b/xwin.c +@@ -277,7 +279,12 @@ + fclose(f); + return 1; + } ++ ++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 ++ if (setjmp(png_jmpbuf(pp))) { ++#else + if (setjmp(pp->jmpbuf)) { ++#endif + png_destroy_write_struct(&pp,&ip); + fclose(f); + gdk_image_destroy(image); +--- a/Imakefile ++++ b/Imakefile +@@ -1,6 +1,6 @@ + SYS_LIBRARIES = `pkg-config gtk+-2.0 --libs` -lm -lpng + DEFINES = -DHAVE_LIBPNG +-INCLUDES = `pkg-config gtk+-2.0 --cflags` ++INCLUDES = `pkg-config gtk+-2.0 --cflags` -I/usr/include/libpng + SRCS = xnecview.h config.h xnecview.c xwin.c parse_input.c parse_output.c draw.c draw_opaque.c freqplot.c postscript.c + OBJS = xnecview.o xwin.o parse_input.o parse_output.o draw.o draw_opaque.o freqplot.o postscript.o + ComplexProgramTarget(xnecview) diff -Nru xnecview-1.35/debian/patches/02_ftbfs_armel.diff xnecview-1.36/debian/patches/02_ftbfs_armel.diff --- xnecview-1.35/debian/patches/02_ftbfs_armel.diff 1970-01-01 00:00:00.000000000 +0000 +++ xnecview-1.36/debian/patches/02_ftbfs_armel.diff 2017-07-27 05:53:12.000000000 +0000 @@ -0,0 +1,28 @@ +Description: Fix FTBFS on armel + R0 is already taken as a register name on armel, rename xnecview's constant to + DEFFAULTR0. +Author: Evgeni Golov +Bug-Debian: https://bugs.debian.org/621392 +Last-Update: 2017-07-26 + +--- a/config.h ++++ b/config.h +@@ -57,6 +57,6 @@ + #define XFONT "6x10" /* font for text in the on-screen drawing */ + #define PSFONT "helvetica" /* font for postscript output (size is derived by scaling the X font) */ + +-#define R0 50.0 /* default reference impedance for SWR calculation */ ++#define DEFAULTR0 50.0 /* default reference impedance for SWR calculation */ + + #define Polthr (M_SQRT2-1) /* threshold of axial ratio used in polarization-colouring */ +--- a/freqplot.c ++++ b/freqplot.c +@@ -28,7 +28,7 @@ + int plot2_z2=0; /* show the phi(z)/abs(z) graph? */ + int plot2_dir=0; /* show the direction-of-maximum-gain graph? */ + +-double r0=R0; /* reference impedance for SWR calculation */ ++double r0=DEFAULTR0; /* reference impedance for SWR calculation */ + + + diff -Nru xnecview-1.35/debian/patches/03_always_use_C_locale.diff xnecview-1.36/debian/patches/03_always_use_C_locale.diff --- xnecview-1.35/debian/patches/03_always_use_C_locale.diff 1970-01-01 00:00:00.000000000 +0000 +++ xnecview-1.36/debian/patches/03_always_use_C_locale.diff 2017-07-27 18:17:22.000000000 +0000 @@ -0,0 +1,28 @@ +Description: Always use C locale + Always use C locale to prevent issues with locales that have different (other + than '.') decimal-point chars. Thanks to Fernando M. Maresca for debugging and + testing. Closes: #511852. +Author: Evgeni Golov +Bug-Debian: https://bugs.debian.org/511852 +Last-Update: 2017-07-26 + +--- a/xnecview.c ++++ b/xnecview.c +@@ -16,6 +16,8 @@ + #include + #include + ++#include ++ + #ifndef NO_GETOPT + #include + #endif +@@ -376,6 +378,8 @@ + + setlocale(LC_NUMERIC,"C"); + ++ setlocale(LC_ALL, "C"); ++ + wires=mymalloc(maxwires*sizeof(Wire)); + surfaces=mymalloc(maxsurfaces*sizeof(Surface)); + excis=mymalloc(maxexcis*sizeof(Exci)); diff -Nru xnecview-1.35/debian/patches/04_fix_manpage.diff xnecview-1.36/debian/patches/04_fix_manpage.diff --- xnecview-1.35/debian/patches/04_fix_manpage.diff 1970-01-01 00:00:00.000000000 +0000 +++ xnecview-1.36/debian/patches/04_fix_manpage.diff 2017-07-27 06:06:12.000000000 +0000 @@ -0,0 +1,153 @@ +Description: Turn hypens into minus signs in man page +Author: Alan Bain +--- +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: + +Origin: , +Bug: +Bug-Debian: https://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: 2017-07-26 + +--- a/xnecview.1x ++++ b/xnecview.1x +@@ -122,7 +122,7 @@ + .TP + .B lin.P/lin.V/arrl/log + toggles gain scaling (linear in power, linear in voltage, ARRL-style, +-or logarithmic with -40 dB at the center). ++or logarithmic with \-40 dB at the center). + .TP + .B total/hor./vert./lhcp/rhcp/colour + determines the handling of radiation's polarization: +@@ -244,7 +244,7 @@ + The polarization actually used, is the one selected by the polarization + button in the top row; choosing "total" there (default), switches + the projection operation off, so 'raw' phases and magnitudes are used. +-If left- or right-hand circular polarization is selected, ++If left-hand or right-hand circular polarization is selected, + the projection is also not performed, but every current + gets an extra phase shift proportional to the angle its projection + perpendicular to the viewing direction makes with horizontal. +@@ -377,90 +377,90 @@ + + The following options are available: + .TP +-.B -h, --help ++.B \-h, \-\-help + show usage information + .TP +-.B --struct ++.B \-\-struct + set structure view to 'struct' + .TP +-.B --tags ++.B \-\-tags + set structure view to 'struct+tags' + .TP +-.B --currents ++.B \-\-currents + set structure view to 'currents' + .TP +-.B --animation ++.B \-\-animation + set structure view to 'animation' + .TP +-.B --slice ++.B \-\-slice + set radiation view to 'slice' + .TP +-.B --frame ++.B \-\-frame + set radiation view to 'frame' + .TP +-.B --opaque ++.B \-\-opaque + set radiation view to 'opaque' + .TP +-.B --near ++.B \-\-near + set radiation view to 'near field' + .TP +-.B --linpower ++.B \-\-linpower + set radiation scale linear in power + .TP +-.B --linvoltage ++.B \-\-linvoltage + set radiation scale linear in voltage + .TP +-.B --arrl ++.B \-\-arrl + set radiation scale to ARRL style + .TP +-.B --log ++.B \-\-log + set radiation scale to logarithmic + .TP +-.B --pol=x ++.B \-\-pol=x + choose polarization; x may be total, hor, vert, lhcp, rhcp or colour . + .TP +-.B --qscale num ++.B \-\-qscale num + set charges scale (animation) + .TP +-.B --iscale num ++.B \-\-iscale num + set currents scale (animation) + .TP +-.B --escale num ++.B \-\-escale num + set electric field scale + .TP +-.B --hscale num ++.B \-\-hscale num + set magnetic field scale + .TP +-.B --hidepoynting ++.B \-\-hidepoynting + hide Poynting vector in near field display + .TP +-.B --afreq num ++.B \-\-afreq num + set animation frequency (Hz) + .TP +-.B --aphase num ++.B \-\-aphase num + set animation phase (degrees) + .TP +-.B --aupdate num ++.B \-\-aupdate num + set animation update interval (milliseconds). Default is 100, + but on a slow computer and/or with a large data set + it may be useful to set the update interval higher. + Conversely, on a fast computer and with a simple data set, + a smaller setting provides smoother movement. + .TP +-.B --freq num ++.B \-\-freq num + set frequency (MHz) + .TP +-.B --z0 num ++.B \-\-z0 num + set reference impedance (ohm) + .TP +-.B --expeps filename ++.B \-\-expeps filename + no X11 display, just export picture to .eps-file + .TP +-.B --exppng ++.B \-\-exppng + no X11 display, just export picture to .png-file + (only available if linked against the libpng library) + .TP +-.B --view phi,theta,zoom,trx,try ++.B \-\-view phi,theta,zoom,trx,try + set viewing direction and zoom + .PP + Note: typing 'v' in window 1 writes the current values for diff -Nru xnecview-1.35/debian/patches/05_fix_ftbfs_hardening.diff xnecview-1.36/debian/patches/05_fix_ftbfs_hardening.diff --- xnecview-1.35/debian/patches/05_fix_ftbfs_hardening.diff 1970-01-01 00:00:00.000000000 +0000 +++ xnecview-1.36/debian/patches/05_fix_ftbfs_hardening.diff 2017-07-27 18:40:47.000000000 +0000 @@ -0,0 +1,16 @@ +Description: Fix FTBFS with enabled hardening +Author: Tobias Frost +Last-Update: 2017-07-27 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/freqplot.c ++++ b/freqplot.c +@@ -273,7 +273,7 @@ + if (i==ntx) { + int l; + l=strlen(s); +- sprintf(s," MHz"+(15-(l+1)/2)); ++ sprintf(s," MHz"); + DrawString(x,ybot+1,s,0,1); + } + } diff -Nru xnecview-1.35/debian/patches/series xnecview-1.36/debian/patches/series --- xnecview-1.35/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ xnecview-1.36/debian/patches/series 2017-07-27 18:22:37.000000000 +0000 @@ -0,0 +1,5 @@ +01_libpng16.diff +02_ftbfs_armel.diff +03_always_use_C_locale.diff +04_fix_manpage.diff +05_fix_ftbfs_hardening.diff diff -Nru xnecview-1.35/debian/prerm xnecview-1.36/debian/prerm --- xnecview-1.35/debian/prerm 2017-07-28 00:16:07.000000000 +0000 +++ xnecview-1.36/debian/prerm 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -#!/bin/sh -set -e -if [ \( "$1" = "upgrade" -o "$1"="remove" \) -a \ - -L /usr/doc/xnecview ]; then - rm -f /usr/doc/xnecview -fi diff -Nru xnecview-1.35/debian/README.debian xnecview-1.36/debian/README.debian --- xnecview-1.35/debian/README.debian 2017-07-28 00:16:07.000000000 +0000 +++ xnecview-1.36/debian/README.debian 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -xnecview for Debian ----------------------- - -This is built linked against libpng for fullest functionality, although this is -an option in the upstream source, obtained from -http://www.cs.utwente.nl/~ptdeboer/ham/xnecview/ - - Tue, 3, Jul 2001 15:00:00 +0000 - diff -Nru xnecview-1.35/debian/rules xnecview-1.36/debian/rules --- xnecview-1.35/debian/rules 2017-07-28 00:16:07.000000000 +0000 +++ xnecview-1.36/debian/rules 2017-07-27 18:44:01.000000000 +0000 @@ -1,77 +1,11 @@ #!/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=xnecview +export DEB_BUILD_MAINT_OPTIONS = hardening=+all -INSTALL = /usr/bin/install -INSTALL_PROGRAM = $(INSTALL) -o root -g root -m 0755 +%: + dh $@ -CDEBUGFLAGS = -g -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CDEBUGFLAGS += -O0 -else - CDEBUGFLAGS += -O2 -endif +override_dh_auto_build: + xmkmf + $(MAKE) CDEBUGFLAGS="${CFLAGS}" - - -build: - $(checkdir) - xmkmf - $(MAKE) CDEBUGFLAGS="$(CDEBUGFLAGS)" - touch build - -clean: - $(checkdir) - dh_clean build *.o xnecview *.bak *~ core Makefile \ - xnecview._man 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 - install -d debian/tmp/DEBIAN \ - -d debian/tmp/usr/share/doc/$(package) - install -m 755 debian/prerm debian/tmp/DEBIAN - cd debian/tmp && install -d `cat ../dirs` - $(INSTALL_PROGRAM) xnecview `pwd`/debian/tmp/usr/bin/xnecview -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - strip --remove-section=.comment --remove-section=.note `pwd`/debian/tmp/usr/bin/xnecview -endif - install -o root -g root -m 0644 xnecview.1x \ - `pwd`/debian/tmp/usr/share/man/man1/xnecview.1 - gzip -9n `pwd`/debian/tmp/usr/share/man/man1/xnecview.1 - cp debian/copyright debian/tmp/usr/share/doc/$(package)/. - - cp debian/changelog \ - debian/tmp/usr/share/doc/$(package)/changelog.Debian - cp README debian/tmp/usr/share/doc/$(package)/README - cp HISTORY debian/tmp/usr/share/doc/$(package)/changelog - - cd debian/tmp/usr/share/doc/$(package) && gzip -9nv changelog changelog.Debian README - - dpkg-shlibdeps $(package) - dpkg-gencontrol -isp - dh_md5sums --tmpdir=debian/tmp - 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 diff -Nru xnecview-1.35/debian/source/format xnecview-1.36/debian/source/format --- xnecview-1.35/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ xnecview-1.36/debian/source/format 2017-07-26 21:16:54.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru xnecview-1.35/freqplot.c xnecview-1.36/freqplot.c --- xnecview-1.35/freqplot.c 2017-07-28 00:16:07.000000000 +0000 +++ xnecview-1.36/freqplot.c 2006-03-27 20:37:53.000000000 +0000 @@ -28,7 +28,7 @@ int plot2_z2=0; /* show the phi(z)/abs(z) graph? */ int plot2_dir=0; /* show the direction-of-maximum-gain graph? */ -double r0=DEFAULTR0; /* reference impedance for SWR calculation */ +double r0=R0; /* reference impedance for SWR calculation */ diff -Nru xnecview-1.35/HISTORY xnecview-1.36/HISTORY --- xnecview-1.35/HISTORY 2008-04-27 14:47:14.000000000 +0000 +++ xnecview-1.36/HISTORY 2011-07-26 13:28:37.000000000 +0000 @@ -203,3 +203,13 @@ - bugfix: animation didn't work on some systems because do_animation() didn't have an explicit return value +Version 1.36, 2011-07-26 +- a few minor bugfixes: + - correct depth parameter in some gtk calls (tnx Alan Bain) + - set numeric locale to C for correct parsing of data files + - correct interpretation of last parameter in GM cards (float vs. int) (tnx + Graham Seale) +- support for NEC output files that do not contain 'input parameters' data + (practically speaking: structures that are excited by incoming fields) +- fixed a few compiler warnings + diff -Nru xnecview-1.35/icon.xbm xnecview-1.36/icon.xbm --- xnecview-1.35/icon.xbm 2008-04-25 21:59:30.000000000 +0000 +++ xnecview-1.36/icon.xbm 2011-07-25 22:00:05.000000000 +0000 @@ -1,6 +1,6 @@ #define icon_width 32 #define icon_height 32 -static unsigned char icon_bits[] = { +static char icon_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xc0, 0x0f, 0x40, 0x10, diff -Nru xnecview-1.35/Imakefile xnecview-1.36/Imakefile --- xnecview-1.35/Imakefile 2017-07-28 00:16:07.000000000 +0000 +++ xnecview-1.36/Imakefile 2006-03-27 20:38:55.000000000 +0000 @@ -1,6 +1,6 @@ SYS_LIBRARIES = `pkg-config gtk+-2.0 --libs` -lm -lpng DEFINES = -DHAVE_LIBPNG -INCLUDES = `pkg-config gtk+-2.0 --cflags` -I/usr/include/libpng +INCLUDES = `pkg-config gtk+-2.0 --cflags` SRCS = xnecview.h config.h xnecview.c xwin.c parse_input.c parse_output.c draw.c draw_opaque.c freqplot.c postscript.c OBJS = xnecview.o xwin.o parse_input.o parse_output.o draw.o draw_opaque.o freqplot.o postscript.o ComplexProgramTarget(xnecview) diff -Nru xnecview-1.35/parse_input.c xnecview-1.36/parse_input.c --- xnecview-1.35/parse_input.c 2008-04-27 14:47:14.000000000 +0000 +++ xnecview-1.36/parse_input.c 2011-07-25 22:03:51.000000000 +0000 @@ -1,6 +1,6 @@ /* XNECVIEW - a program for visualizing NEC2 input and output data * - * Copyright (C) 1998-2006, Pieter-Tjerk de Boer -- pa3fwm@amsat.org + * Copyright (C) 1998-2006,2011, Pieter-Tjerk de Boer -- pa3fwm@amsat.org * * Distributed on the conditions of version 2 of the GPL: see the files * README and COPYING, which accompany this source file. @@ -358,12 +358,15 @@ double co,si; Wire *w00,*w0,*w1,*wlast; Surface *s0,*s1; + double its_double; removecommas(s); rox=roy=roz=xs=ys=zs=its=0; - i=sscanf(s,"GM%d%d%lg%lg%lg%lg%lg%lg%d",&itsi,&nrpt,&rox,&roy,&roz,&xs,&ys,&zs,&its); + i=sscanf(s,"GM%d%d%lg%lg%lg%lg%lg%lg%lg",&itsi,&nrpt,&rox,&roy,&roz,&xs,&ys,&zs,&its_double); if (i<2) return Err_scan; + its = (int)(its_double+0.5); // round to double; the detour via double is needed because some programs write something like 1.1e1 instead of 11 in this field, and this is not forbidden according to the specification + rox*=M_PI/180.0; roy*=M_PI/180.0; roz*=M_PI/180.0; mat[0]=mat[4]=mat[8]=1; diff -Nru xnecview-1.35/parse_output.c xnecview-1.36/parse_output.c --- xnecview-1.35/parse_output.c 2008-04-27 14:47:14.000000000 +0000 +++ xnecview-1.36/parse_output.c 2011-07-26 13:20:00.000000000 +0000 @@ -1,6 +1,6 @@ /* XNECVIEW - a program for visualizing NEC2 input and output data * - * Copyright (C) 1998-2006, Pieter-Tjerk de Boer -- pa3fwm@amsat.org + * Copyright (C) 1998-2006,2011, Pieter-Tjerk de Boer -- pa3fwm@amsat.org * * Distributed on the conditions of version 2 of the GPL: see the files * README and COPYING, which accompany this source file. @@ -782,9 +782,15 @@ ne->d[neco_maxgain_vert]=-DBL_MAX; ne->d[neco_maxgain_lhcp]=-DBL_MAX; ne->d[neco_maxgain_rhcp]=-DBL_MAX; + ne->d[neco_zr]=0; + ne->d[neco_zi]=0; + ne->d[neco_swr]=0; + ne->d[neco_zphi]=0; + ne->d[neco_zabs]=0; } /* find and read the input impedance, and calculate the SWR */ +#if 0 do fgets(s,200,f); while (!feof(f) && !strstr(s,"ANTENNA INPUT PARAMETERS")); if (feof(f)) break; do { /* skip lines until a line starting with a digit is found */ @@ -798,8 +804,10 @@ ne->d[neco_zi]=zi; calcswr(ne); calcphiabs(ne); +#endif /* check whether radiation pattern data is included for this frequency, and if so, read it */ + /* check also whether input impedance data is included for this frequency, and if so, read it */ /* check also whether currents and/or charge data is included for this frequency, and if so, read it */ /* check also whether near field data is included for this frequency, and if so, read it */ do { @@ -831,6 +839,21 @@ if (!ne->rp) return 1; if (new_rp_index<0) new_rp_index=ne-neco; } + + if (strstr(s,"ANTENNA INPUT PARAMETERS")) { + do { /* skip lines until a line starting with a digit is found */ + fgets(s,200,f); + p=s; + while (*p==' ') p++; + } while (!feof(f) && !isdigit(*p)); + if ((p=strchr(s,'*'))) *p=' '; + if (sscanf(s,"%*i%*i%*g%*g%*g%*g%lg%lg",&zr,&zi)!=2) continue; + ne->d[neco_zr]=zr; + ne->d[neco_zi]=zi; + calcswr(ne); + calcphiabs(ne); + } + } while (!feof(f) && !strstr(s,"FREQUENCY")); if (ne->cu) normalize_currents(ne->cu); diff -Nru xnecview-1.35/README xnecview-1.36/README --- xnecview-1.35/README 2008-04-27 14:47:14.000000000 +0000 +++ xnecview-1.36/README 2011-07-26 13:29:16.000000000 +0000 @@ -2,7 +2,7 @@ --------------- A program for visualizing NEC2 input and output data (Unix/X-windows). -Copyright (C) 1998-2006, Pieter-Tjerk de Boer +Copyright (C) 1998-2011, Pieter-Tjerk de Boer ----------------------------------------------------------------------- This program is free software; you can redistribute it and/or modify @@ -44,7 +44,7 @@ And if you get an arror about drem(), uncomment the last line in xnecview.h and recompile. -Last but not least, note that xnecview needs version 1.2 or later of the +Last but not least, note that xnecview needs version 2.0 or later of the GTK+ libraries. USAGE: @@ -65,14 +65,10 @@ WHAT'S NEW: ----------- -This is version 1.35; changes compared to version 1.34 are: -- now supports for rectangular, triangular and quadrilateral surface - patches in NEC input. -- now understands the "other" output format that some versions of - NEC apparently produce. -- now compiles against GTK+-2 and later, rather than 1.2. -- graphs in window 2 now also have units printed at/near the axes. -- a few minor bugfixes (see the file HISTORY). +This is version 1.36; changes compared to version 1.35 are only a few +minor bugfixes (see the file HISTORY) and support for NEC output files +that do not have impedance data (practically speaking: structures that +are excited by an incoming field). HELP NEEDED: ------------ @@ -110,7 +106,5 @@ viewer-gain, and possibly others.) Contributions, comments and bug reports are welcome, please send them to -any of these addresses: - Internet e-mail: pa3fwm@amsat.org -Amateur packet-radio: PA3FWM @ PI8DAZ.#TWE.NLD.EU +pa3fwm@amsat.org . diff -Nru xnecview-1.35/xnecview.1x xnecview-1.36/xnecview.1x --- xnecview-1.35/xnecview.1x 2017-07-28 00:16:07.000000000 +0000 +++ xnecview-1.36/xnecview.1x 2011-07-25 22:12:16.000000000 +0000 @@ -1,4 +1,4 @@ -.\" Copyright (c) 1999-2002, Pieter Tjerk de Boer (pa3fwm@amsat.org) +.\" Copyright (c) 1999-2006, Pieter Tjerk de Boer (pa3fwm@amsat.org) .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -122,7 +122,7 @@ .TP .B lin.P/lin.V/arrl/log toggles gain scaling (linear in power, linear in voltage, ARRL-style, -or logarithmic with \-40 dB at the center). +or logarithmic with -40 dB at the center). .TP .B total/hor./vert./lhcp/rhcp/colour determines the handling of radiation's polarization: @@ -244,7 +244,7 @@ The polarization actually used, is the one selected by the polarization button in the top row; choosing "total" there (default), switches the projection operation off, so 'raw' phases and magnitudes are used. -If left-hand or right-hand circular polarization is selected, +If left- or right-hand circular polarization is selected, the projection is also not performed, but every current gets an extra phase shift proportional to the angle its projection perpendicular to the viewing direction makes with horizontal. @@ -377,90 +377,90 @@ The following options are available: .TP -.B \-h, \-\-help +.B -h, --help show usage information .TP -.B \-\-struct +.B --struct set structure view to 'struct' .TP -.B \-\-tags +.B --tags set structure view to 'struct+tags' .TP -.B \-\-currents +.B --currents set structure view to 'currents' .TP -.B \-\-animation +.B --animation set structure view to 'animation' .TP -.B \-\-slice +.B --slice set radiation view to 'slice' .TP -.B \-\-frame +.B --frame set radiation view to 'frame' .TP -.B \-\-opaque +.B --opaque set radiation view to 'opaque' .TP -.B \-\-near +.B --near set radiation view to 'near field' .TP -.B \-\-linpower +.B --linpower set radiation scale linear in power .TP -.B \-\-linvoltage +.B --linvoltage set radiation scale linear in voltage .TP -.B \-\-arrl +.B --arrl set radiation scale to ARRL style .TP -.B \-\-log +.B --log set radiation scale to logarithmic .TP -.B \-\-pol=x +.B --pol=x choose polarization; x may be total, hor, vert, lhcp, rhcp or colour . .TP -.B \-\-qscale num +.B --qscale num set charges scale (animation) .TP -.B \-\-iscale num +.B --iscale num set currents scale (animation) .TP -.B \-\-escale num +.B --escale num set electric field scale .TP -.B \-\-hscale num +.B --hscale num set magnetic field scale .TP -.B \-\-hidepoynting +.B --hidepoynting hide Poynting vector in near field display .TP -.B \-\-afreq num +.B --afreq num set animation frequency (Hz) .TP -.B \-\-aphase num +.B --aphase num set animation phase (degrees) .TP -.B \-\-aupdate num +.B --aupdate num set animation update interval (milliseconds). Default is 100, but on a slow computer and/or with a large data set it may be useful to set the update interval higher. Conversely, on a fast computer and with a simple data set, a smaller setting provides smoother movement. .TP -.B \-\-freq num +.B --freq num set frequency (MHz) .TP -.B \-\-z0 num +.B --z0 num set reference impedance (ohm) .TP -.B \-\-expeps filename +.B --expeps filename no X11 display, just export picture to .eps-file .TP -.B \-\-exppng +.B --exppng no X11 display, just export picture to .png-file (only available if linked against the libpng library) .TP -.B \-\-view phi,theta,zoom,trx,try +.B --view phi,theta,zoom,trx,try set viewing direction and zoom .PP Note: typing 'v' in window 1 writes the current values for diff -Nru xnecview-1.35/xnecview.c xnecview-1.36/xnecview.c --- xnecview-1.35/xnecview.c 2017-07-28 00:16:07.000000000 +0000 +++ xnecview-1.36/xnecview.c 2011-07-25 22:05:33.000000000 +0000 @@ -1,6 +1,6 @@ /* XNECVIEW - a program for visualizing NEC2 input and output data * - * Copyright (C) 1998-2006, Pieter-Tjerk de Boer -- pa3fwm@amsat.org + * Copyright (C) 1998-2006,2011, Pieter-Tjerk de Boer -- pa3fwm@amsat.org * * Distributed on the conditions of version 2 of the GPL: see the files * README and COPYING, which accompany this source file. @@ -14,7 +14,6 @@ #include #include #include - #include #ifndef NO_GETOPT @@ -375,7 +374,7 @@ initX(&argc,argv); inputfilename=NULL; - setlocale(LC_ALL, "C"); + setlocale(LC_NUMERIC,"C"); wires=mymalloc(maxwires*sizeof(Wire)); surfaces=mymalloc(maxsurfaces*sizeof(Surface)); diff -Nru xnecview-1.35/xnecview.h xnecview-1.36/xnecview.h --- xnecview-1.35/xnecview.h 2008-04-27 14:47:14.000000000 +0000 +++ xnecview-1.36/xnecview.h 2011-07-26 13:11:01.000000000 +0000 @@ -1,6 +1,6 @@ /* XNECVIEW - a program for visualizing NEC2 input and output data * - * Copyright (C) 1998-2006, Pieter-Tjerk de Boer -- pa3fwm@amsat.org + * Copyright (C) 1998-2011, Pieter-Tjerk de Boer -- pa3fwm@amsat.org * * Distributed on the conditions of version 2 of the GPL: see the files * README and COPYING, which accompany this source file. @@ -12,7 +12,7 @@ #include "config.h" /* file defining things like default colours etc. */ -#define VERSION "1.35" +#define VERSION "1.36" typedef struct { /* structure to describe a point in 3D space */ diff -Nru xnecview-1.35/xnecview.man xnecview-1.36/xnecview.man --- xnecview-1.35/xnecview.man 2017-07-28 00:16:07.000000000 +0000 +++ xnecview-1.36/xnecview.man 2011-07-25 22:12:16.000000000 +0000 @@ -1,4 +1,4 @@ -.\" Copyright (c) 1999-2002, Pieter Tjerk de Boer (pa3fwm@amsat.org) +.\" Copyright (c) 1999-2006, Pieter Tjerk de Boer (pa3fwm@amsat.org) .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as @@ -122,7 +122,7 @@ .TP .B lin.P/lin.V/arrl/log toggles gain scaling (linear in power, linear in voltage, ARRL-style, -or logarithmic with \-40 dB at the center). +or logarithmic with -40 dB at the center). .TP .B total/hor./vert./lhcp/rhcp/colour determines the handling of radiation's polarization: @@ -244,7 +244,7 @@ The polarization actually used, is the one selected by the polarization button in the top row; choosing "total" there (default), switches the projection operation off, so 'raw' phases and magnitudes are used. -If left-hand or right-hand circular polarization is selected, +If left- or right-hand circular polarization is selected, the projection is also not performed, but every current gets an extra phase shift proportional to the angle its projection perpendicular to the viewing direction makes with horizontal. @@ -377,90 +377,90 @@ The following options are available: .TP -.B \-h, \-\-help +.B -h, --help show usage information .TP -.B \-\-struct +.B --struct set structure view to 'struct' .TP -.B \-\-tags +.B --tags set structure view to 'struct+tags' .TP -.B \-\-currents +.B --currents set structure view to 'currents' .TP -.B \-\-animation +.B --animation set structure view to 'animation' .TP -.B \-\-slice +.B --slice set radiation view to 'slice' .TP -.B \-\-frame +.B --frame set radiation view to 'frame' .TP -.B \-\-opaque +.B --opaque set radiation view to 'opaque' .TP -.B \-\-near +.B --near set radiation view to 'near field' .TP -.B \-\-linpower +.B --linpower set radiation scale linear in power .TP -.B \-\-linvoltage +.B --linvoltage set radiation scale linear in voltage .TP -.B \-\-arrl +.B --arrl set radiation scale to ARRL style .TP -.B \-\-log +.B --log set radiation scale to logarithmic .TP -.B \-\-pol=x +.B --pol=x choose polarization; x may be total, hor, vert, lhcp, rhcp or colour . .TP -.B \-\-qscale num +.B --qscale num set charges scale (animation) .TP -.B \-\-iscale num +.B --iscale num set currents scale (animation) .TP -.B \-\-escale num +.B --escale num set electric field scale .TP -.B \-\-hscale num +.B --hscale num set magnetic field scale .TP -.B \-\-hidepoynting +.B --hidepoynting hide Poynting vector in near field display .TP -.B \-\-afreq num +.B --afreq num set animation frequency (Hz) .TP -.B \-\-aphase num +.B --aphase num set animation phase (degrees) .TP -.B \-\-aupdate num +.B --aupdate num set animation update interval (milliseconds). Default is 100, but on a slow computer and/or with a large data set it may be useful to set the update interval higher. Conversely, on a fast computer and with a simple data set, a smaller setting provides smoother movement. .TP -.B \-\-freq num +.B --freq num set frequency (MHz) .TP -.B \-\-z0 num +.B --z0 num set reference impedance (ohm) .TP -.B \-\-expeps filename +.B --expeps filename no X11 display, just export picture to .eps-file .TP -.B \-\-exppng +.B --exppng no X11 display, just export picture to .png-file (only available if linked against the libpng library) .TP -.B \-\-view phi,theta,zoom,trx,try +.B --view phi,theta,zoom,trx,try set viewing direction and zoom .PP Note: typing 'v' in window 1 writes the current values for diff -Nru xnecview-1.35/xwin.c xnecview-1.36/xwin.c --- xnecview-1.35/xwin.c 2017-07-28 00:16:07.000000000 +0000 +++ xnecview-1.36/xwin.c 2011-07-25 22:03:37.000000000 +0000 @@ -1,6 +1,6 @@ /* XNECVIEW - a program for visualizing NEC2 input and output data * - * Copyright (C) 1998-2006, Pieter-Tjerk de Boer -- pa3fwm@amsat.org + * Copyright (C) 1998-2006,2011, Pieter-Tjerk de Boer -- pa3fwm@amsat.org * * Distributed on the conditions of version 2 of the GPL: see the files * README and COPYING, which accompany this source file. @@ -244,7 +244,7 @@ int x,y; png_structp pp; png_infop ip; - char *buf; + unsigned char *buf; png_color pal[NC]; int i; @@ -277,12 +277,7 @@ fclose(f); return 1; } - -#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 - if (setjmp(png_jmpbuf(pp))) { -#else if (setjmp(pp->jmpbuf)) { -#endif png_destroy_write_struct(&pp,&ip); fclose(f); gdk_image_destroy(image);