diff -Naur wfdb-10.1.5/MANIFEST wfdb-10.1.6/MANIFEST --- wfdb-10.1.5/MANIFEST Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.6/MANIFEST Sat Jul 28 13:25:22 2001 @@ -0,0 +1,526 @@ +wfdb-10.1.6/ +wfdb-10.1.6/app/ +wfdb-10.1.6/app/12lead.pro +wfdb-10.1.6/app/ann2rr.c +wfdb-10.1.6/app/bxb.c +wfdb-10.1.6/app/calsig.c +wfdb-10.1.6/app/cshsetwfdb +wfdb-10.1.6/app/ecgeval.c +wfdb-10.1.6/app/epic.c +wfdb-10.1.6/app/fir.c +wfdb-10.1.6/app/ihr.c +wfdb-10.1.6/app/Makefile +wfdb-10.1.6/app/Makefile.dos +wfdb-10.1.6/app/Makefile-dos-gcc +wfdb-10.1.6/app/Makefile.top +wfdb-10.1.6/app/Makefile.tpl +wfdb-10.1.6/app/mfilt.c +wfdb-10.1.6/app/mrgann.c +wfdb-10.1.6/app/mxm.c +wfdb-10.1.6/app/nst.c +wfdb-10.1.6/app/plotstm.c +wfdb-10.1.6/app/pscgen.c +wfdb-10.1.6/app/pschart.c +wfdb-10.1.6/app/pschart.pro +wfdb-10.1.6/app/psfd.c +wfdb-10.1.6/app/psfd.pro +wfdb-10.1.6/app/rdann.c +wfdb-10.1.6/app/rdsamp.c +wfdb-10.1.6/app/README +wfdb-10.1.6/app/rr2ann.c +wfdb-10.1.6/app/rxr.c +wfdb-10.1.6/app/sampfreq.c +wfdb-10.1.6/app/sample8.hea +wfdb-10.1.6/app/sample.c +wfdb-10.1.6/app/setwfdb +wfdb-10.1.6/app/setwfdb.bat +wfdb-10.1.6/app/sigamp.c +wfdb-10.1.6/app/skewedit.c +wfdb-10.1.6/app/snip.c +wfdb-10.1.6/app/sortann.c +wfdb-10.1.6/app/sqrs125.c +wfdb-10.1.6/app/sqrs.c +wfdb-10.1.6/app/sumann.c +wfdb-10.1.6/app/sumstats.c +wfdb-10.1.6/app/tach.c +wfdb-10.1.6/app/view.c +wfdb-10.1.6/app/vsetup.c +wfdb-10.1.6/app/wfdbcat.c +wfdb-10.1.6/app/wfdbcollate.c +wfdb-10.1.6/app/wfdbdesc.c +wfdb-10.1.6/app/wfdbwhich.c +wfdb-10.1.6/app/wrann.c +wfdb-10.1.6/app/wrsamp.c +wfdb-10.1.6/app/wvscript.c +wfdb-10.1.6/app/xform.c +wfdb-10.1.6/check-manifest +wfdb-10.1.6/conf/ +wfdb-10.1.6/conf/cygwin.def +wfdb-10.1.6/conf/exestrip +wfdb-10.1.6/conf/generic.def +wfdb-10.1.6/conf/generic-slib.def +wfdb-10.1.6/conf/hpux.def +wfdb-10.1.6/conf/hpux-slib.def +wfdb-10.1.6/configure +wfdb-10.1.6/conf/linux.def +wfdb-10.1.6/conf/linux-slib.def +wfdb-10.1.6/conf/solaris.def +wfdb-10.1.6/conf/solaris-slib.def +wfdb-10.1.6/conf/version.def +wfdb-10.1.6/convert/ +wfdb-10.1.6/convert/a2m.c +wfdb-10.1.6/convert/ad2m.c +wfdb-10.1.6/convert/edf2mit.c +wfdb-10.1.6/convert/m2a.c +wfdb-10.1.6/convert/Makefile +wfdb-10.1.6/convert/Makefile.dos +wfdb-10.1.6/convert/Makefile-dos-gcc +wfdb-10.1.6/convert/Makefile.top +wfdb-10.1.6/convert/Makefile.tpl +wfdb-10.1.6/convert/makeid.c +wfdb-10.1.6/convert/md2a.c +wfdb-10.1.6/convert/readid.c +wfdb-10.1.6/convert/README +wfdb-10.1.6/convert/revise.c +wfdb-10.1.6/COPYING +wfdb-10.1.6/data/ +wfdb-10.1.6/data/100s.atr +wfdb-10.1.6/data/100s.dat +wfdb-10.1.6/data/100s.hea +wfdb-10.1.6/data/16.hea +wfdb-10.1.6/data/16l.hea +wfdb-10.1.6/data/16x10.hea +wfdb-10.1.6/data/16x11.hea +wfdb-10.1.6/data/16x12.hea +wfdb-10.1.6/data/16x13.hea +wfdb-10.1.6/data/16x14.hea +wfdb-10.1.6/data/16x15.hea +wfdb-10.1.6/data/16x16.hea +wfdb-10.1.6/data/16x1.hea +wfdb-10.1.6/data/16x2.hea +wfdb-10.1.6/data/16x3.hea +wfdb-10.1.6/data/16x4.hea +wfdb-10.1.6/data/16x5.hea +wfdb-10.1.6/data/16x6.hea +wfdb-10.1.6/data/16x7.hea +wfdb-10.1.6/data/16x8.hea +wfdb-10.1.6/data/16x9.hea +wfdb-10.1.6/data/8.hea +wfdb-10.1.6/data/8l.hea +wfdb-10.1.6/data/8x10.hea +wfdb-10.1.6/data/8x11.hea +wfdb-10.1.6/data/8x12.hea +wfdb-10.1.6/data/8x13.hea +wfdb-10.1.6/data/8x14.hea +wfdb-10.1.6/data/8x15.hea +wfdb-10.1.6/data/8x16.hea +wfdb-10.1.6/data/8x1.hea +wfdb-10.1.6/data/8x2.hea +wfdb-10.1.6/data/8x3.hea +wfdb-10.1.6/data/8x4.hea +wfdb-10.1.6/data/8x5.hea +wfdb-10.1.6/data/8x6.hea +wfdb-10.1.6/data/8x7.hea +wfdb-10.1.6/data/8x8.hea +wfdb-10.1.6/data/8x9.hea +wfdb-10.1.6/data/ahalist +wfdb-10.1.6/data/ahatape.hea +wfdb-10.1.6/data/ahaxlist +wfdb-10.1.6/data/b.hea +wfdb-10.1.6/data/culist +wfdb-10.1.6/data/dblist +wfdb-10.1.6/data/esclist +wfdb-10.1.6/data/Makefile +wfdb-10.1.6/data/Makefile.dos +wfdb-10.1.6/data/Makefile-dos-gcc +wfdb-10.1.6/data/Makefile.top +wfdb-10.1.6/data/Makefile.tpl +wfdb-10.1.6/data/mitlist +wfdb-10.1.6/data/mittape.hea +wfdb-10.1.6/data/mitxlist +wfdb-10.1.6/data/multi.hea +wfdb-10.1.6/data/nstlist +wfdb-10.1.6/data/null.hea +wfdb-10.1.6/data/README +wfdb-10.1.6/data/t10240.hea +wfdb-10.1.6/data/t1024.hea +wfdb-10.1.6/data/t4096.hea +wfdb-10.1.6/data/t512.hea +wfdb-10.1.6/data/wfdbcal +wfdb-10.1.6/data/wfdbpath.mac +wfdb-10.1.6/doc/ +wfdb-10.1.6/doc/a2m.1 +wfdb-10.1.6/doc/ann2rr.1 +wfdb-10.1.6/doc/annot.5 +wfdb-10.1.6/doc/appguide.int +wfdb-10.1.6/doc/bxb.1 +wfdb-10.1.6/doc/calsig.1 +wfdb-10.1.6/doc/coherence.1 +wfdb-10.1.6/doc/cover.ag +wfdb-10.1.6/doc/cover.pg +wfdb-10.1.6/doc/dbag.ht0 +wfdb-10.1.6/doc/dbag.tex +wfdb-10.1.6/doc/dbu.hlp +wfdb-10.1.6/doc/dbu.ht0 +wfdb-10.1.6/doc/dbu.tex +wfdb-10.1.6/doc/dir.db +wfdb-10.1.6/doc/dir.top +wfdb-10.1.6/doc/ecgeval.1 +wfdb-10.1.6/doc/epic.1 +wfdb-10.1.6/doc/eval.tex +wfdb-10.1.6/doc/fft.1 +wfdb-10.1.6/doc/fir.1 +wfdb-10.1.6/doc/fixag.sed +wfdb-10.1.6/doc/fixag.sh +wfdb-10.1.6/doc/fixpg.sed +wfdb-10.1.6/doc/fixpg.sh +wfdb-10.1.6/doc/foot.ht0 +wfdb-10.1.6/doc/header.5 +wfdb-10.1.6/doc/hrfft.1 +wfdb-10.1.6/doc/icons/ +wfdb-10.1.6/doc/icons/contents.png +wfdb-10.1.6/doc/icons/cross_ref.png +wfdb-10.1.6/doc/icons/foot.png +wfdb-10.1.6/doc/icons/next_gr.png +wfdb-10.1.6/doc/icons/next.png +wfdb-10.1.6/doc/icons/prev_gr.png +wfdb-10.1.6/doc/icons/previous.png +wfdb-10.1.6/doc/icons/up_gr.png +wfdb-10.1.6/doc/icons/up.png +wfdb-10.1.6/doc/ihr.1 +wfdb-10.1.6/doc/index.ht0 +wfdb-10.1.6/doc/install.tex +wfdb-10.1.6/doc/intro.ht0 +wfdb-10.1.6/doc/.latex2html-init +wfdb-10.1.6/doc/log10.1 +wfdb-10.1.6/doc/lomb.1 +wfdb-10.1.6/doc/Makefile +wfdb-10.1.6/doc/Makefile.top +wfdb-10.1.6/doc/Makefile.tpl +wfdb-10.1.6/doc/makeinfo.sh +wfdb-10.1.6/doc/manhtml.sh +wfdb-10.1.6/doc/maninst.sh +wfdb-10.1.6/doc/memse.1 +wfdb-10.1.6/doc/mfilt.1 +wfdb-10.1.6/doc/mrgann.1 +wfdb-10.1.6/doc/mxm.1 +wfdb-10.1.6/doc/nst.1 +wfdb-10.1.6/doc/plot2d.1 +wfdb-10.1.6/doc/plotstm.1 +wfdb-10.1.6/doc/pschart.1 +wfdb-10.1.6/doc/psfd.1 +wfdb-10.1.6/doc/rdann.1 +wfdb-10.1.6/doc/rdsamp.1 +wfdb-10.1.6/doc/README +wfdb-10.1.6/doc/rxr.1 +wfdb-10.1.6/doc/sampfreq.1 +wfdb-10.1.6/doc/sample.1 +wfdb-10.1.6/doc/setwfdb.1 +wfdb-10.1.6/doc/sigamp.1 +wfdb-10.1.6/doc/signal.5 +wfdb-10.1.6/doc/skewedit.1 +wfdb-10.1.6/doc/snip.1 +wfdb-10.1.6/doc/sortann.1 +wfdb-10.1.6/doc/sqrs.1 +wfdb-10.1.6/doc/sumann.1 +wfdb-10.1.6/doc/sumstats.1 +wfdb-10.1.6/doc/tach.1 +wfdb-10.1.6/doc/texi2html +wfdb-10.1.6/doc/texindex.c +wfdb-10.1.6/doc/tmac.dif +wfdb-10.1.6/doc/view.1 +wfdb-10.1.6/doc/wave.1 +wfdb-10.1.6/doc/wfdb.3 +wfdb-10.1.6/doc/wfdbcal.5 +wfdb-10.1.6/doc/wfdbcat.1 +wfdb-10.1.6/doc/wfdbcollate.1 +wfdb-10.1.6/doc/wfdbdesc.1 +wfdb-10.1.6/doc/wfdbwhich.1 +wfdb-10.1.6/doc/wrann.1 +wfdb-10.1.6/doc/wrsamp.1 +wfdb-10.1.6/doc/wview.1 +wfdb-10.1.6/doc/xform.1 +wfdb-10.1.6/examples/ +wfdb-10.1.6/examples/dblibver.c +wfdb-10.1.6/examples/example10.c +wfdb-10.1.6/examples/example1.c +wfdb-10.1.6/examples/example2.c +wfdb-10.1.6/examples/example3.c +wfdb-10.1.6/examples/example4.c +wfdb-10.1.6/examples/example5.c +wfdb-10.1.6/examples/example6.c +wfdb-10.1.6/examples/example7.c +wfdb-10.1.6/examples/example8.c +wfdb-10.1.6/examples/example9.c +wfdb-10.1.6/examples/exannstr.c +wfdb-10.1.6/examples/exgetvec.c +wfdb-10.1.6/examples/exputvec.c +wfdb-10.1.6/examples/Makefile +wfdb-10.1.6/examples/Makefile.dos +wfdb-10.1.6/examples/Makefile-dos-gcc +wfdb-10.1.6/examples/Makefile.top +wfdb-10.1.6/examples/Makefile.tpl +wfdb-10.1.6/examples/psamples.c +wfdb-10.1.6/examples/README +wfdb-10.1.6/examples/refhr.c +wfdb-10.1.6/fortran/ +wfdb-10.1.6/fortran/example.f +wfdb-10.1.6/fortran/Makefile +wfdb-10.1.6/fortran/README +wfdb-10.1.6/fortran/wfdbf.c +wfdb-10.1.6/INSTALL +wfdb-10.1.6/install.sh +wfdb-10.1.6/lib/ +wfdb-10.1.6/lib/annot.c +wfdb-10.1.6/lib/calib.c +wfdb-10.1.6/lib/COPYING.LIB +wfdb-10.1.6/lib/db.h +wfdb-10.1.6/lib/ecgcodes.h +wfdb-10.1.6/lib/ecgmap.h +wfdb-10.1.6/lib/Makefile +wfdb-10.1.6/lib/Makefile.dos +wfdb-10.1.6/lib/Makefile-dos-gcc +wfdb-10.1.6/lib/Makefile.top +wfdb-10.1.6/lib/Makefile.tpl +wfdb-10.1.6/lib/makelib +wfdb-10.1.6/lib/README +wfdb-10.1.6/lib/signal.c +wfdb-10.1.6/lib/twfdbdll.def +wfdb-10.1.6/lib/wfdbdll.def +wfdb-10.1.6/lib/wfdb.h +wfdb-10.1.6/lib/wfdbinit.c +wfdb-10.1.6/lib/wfdbio.c +wfdb-10.1.6/lib/wfdblib.h +wfdb-10.1.6/Makefile +wfdb-10.1.6/Makefile.top +wfdb-10.1.6/Makefile.tpl +wfdb-10.1.6/MANIFEST +wfdb-10.1.6/psd/ +wfdb-10.1.6/psd/coherence.c +wfdb-10.1.6/psd/fft.c +wfdb-10.1.6/psd/hrfft +wfdb-10.1.6/psd/hrlomb +wfdb-10.1.6/psd/hrmem +wfdb-10.1.6/psd/hrplot +wfdb-10.1.6/psd/log10.c +wfdb-10.1.6/psd/lomb.c +wfdb-10.1.6/psd/Makefile +wfdb-10.1.6/psd/Makefile.dos +wfdb-10.1.6/psd/Makefile-dos-gcc +wfdb-10.1.6/psd/Makefile.top +wfdb-10.1.6/psd/Makefile.tpl +wfdb-10.1.6/psd/memse.c +wfdb-10.1.6/psd/plot2d +wfdb-10.1.6/psd/plot3d +wfdb-10.1.6/psd/README +wfdb-10.1.6/README +wfdb-10.1.6/README.NETFILES +wfdb-10.1.6/uninstall.sh +wfdb-10.1.6/wave/ +wfdb-10.1.6/wave/analysis.hlp +wfdb-10.1.6/wave/analyze.c +wfdb-10.1.6/wave/annot.c +wfdb-10.1.6/wave/annpan.c +wfdb-10.1.6/wave/anntab +wfdb-10.1.6/wave/bitmaps.h +wfdb-10.1.6/wave/buttons.hlp +wfdb-10.1.6/wave/demo.txt +wfdb-10.1.6/wave-doc/ +wfdb-10.1.6/wave-doc/color/ +wfdb-10.1.6/wave-doc/color/allow-edit.ps +wfdb-10.1.6/wave-doc/color/calibrate.ps +wfdb-10.1.6/wave-doc/color/file-analyze.ps +wfdb-10.1.6/wave-doc/color/file-load.ps +wfdb-10.1.6/wave-doc/color/file-print.ps +wfdb-10.1.6/wave-doc/color/file-save.ps +wfdb-10.1.6/wave-doc/color/find-window.ps +wfdb-10.1.6/wave-doc/color/help-topics.ps +wfdb-10.1.6/wave-doc/color/level-window.ps +wfdb-10.1.6/wave-doc/color/main-control-panel.ps +wfdb-10.1.6/wave-doc/color/main-window.ps +wfdb-10.1.6/wave-doc/color/main-with-hr.ps +wfdb-10.1.6/wave-doc/color/main-with-markers.ps +wfdb-10.1.6/wave-doc/color/Makefile +wfdb-10.1.6/wave-doc/color/mimic.ps +wfdb-10.1.6/wave-doc/color/netscape-new-helper.ps +wfdb-10.1.6/wave-doc/color/print-setup-window.ps +wfdb-10.1.6/wave-doc/color/scope-window.ps +wfdb-10.1.6/wave-doc/color/search-template.ps +wfdb-10.1.6/wave-doc/color/stdev.ps +wfdb-10.1.6/wave-doc/color/titlebar.ps +wfdb-10.1.6/wave-doc/color/title-with-parens.ps +wfdb-10.1.6/wave-doc/color/type-menu.ps +wfdb-10.1.6/wave-doc/color/wave-icon.ps +wfdb-10.1.6/wave-doc/color/wave-menu.ps +wfdb-10.1.6/wave-doc/grey/ +wfdb-10.1.6/wave-doc/grey/allow-edit.ps +wfdb-10.1.6/wave-doc/grey/analysis-commands.ps +wfdb-10.1.6/wave-doc/grey/analyze-window.ps +wfdb-10.1.6/wave-doc/grey/annotation-template.ps +wfdb-10.1.6/wave-doc/grey/attach-to-signals.ps +wfdb-10.1.6/wave-doc/grey/calibrate.ps +wfdb-10.1.6/wave-doc/grey/chart1.ps +wfdb-10.1.6/wave-doc/grey/chart2.ps +wfdb-10.1.6/wave-doc/grey/file-analyze.ps +wfdb-10.1.6/wave-doc/grey/file-load.ps +wfdb-10.1.6/wave-doc/grey/file-print.ps +wfdb-10.1.6/wave-doc/grey/file-save.ps +wfdb-10.1.6/wave-doc/grey/find-window.ps +wfdb-10.1.6/wave-doc/grey/fulldisc.ps +wfdb-10.1.6/wave-doc/grey/help-intro.ps +wfdb-10.1.6/wave-doc/grey/help-topics.ps +wfdb-10.1.6/wave-doc/grey/level-window.ps +wfdb-10.1.6/wave-doc/grey/load-window.ps +wfdb-10.1.6/wave-doc/grey/log-window.ps +wfdb-10.1.6/wave-doc/grey/main-control-panel.ps +wfdb-10.1.6/wave-doc/grey/main-window.ps +wfdb-10.1.6/wave-doc/grey/main-with-hr.ps +wfdb-10.1.6/wave-doc/grey/main-with-markers.ps +wfdb-10.1.6/wave-doc/grey/Makefile +wfdb-10.1.6/wave-doc/grey/mimic.ps +wfdb-10.1.6/wave-doc/grey/netscape-new-helper.ps +wfdb-10.1.6/wave-doc/grey/noedit.ps +wfdb-10.1.6/wave-doc/grey/nomatch.ps +wfdb-10.1.6/wave-doc/grey/notice-quit.ps +wfdb-10.1.6/wave-doc/grey/print-setup-window.ps +wfdb-10.1.6/wave-doc/grey/scope-window.ps +wfdb-10.1.6/wave-doc/grey/search-template.ps +wfdb-10.1.6/wave-doc/grey/spot-help.ps +wfdb-10.1.6/wave-doc/grey/stdev.ps +wfdb-10.1.6/wave-doc/grey/system-menu.ps +wfdb-10.1.6/wave-doc/grey/titlebar.ps +wfdb-10.1.6/wave-doc/grey/title-with-parens.ps +wfdb-10.1.6/wave-doc/grey/type-menu.ps +wfdb-10.1.6/wave-doc/grey/view-window.ps +wfdb-10.1.6/wave-doc/grey/wave-icon.ps +wfdb-10.1.6/wave-doc/grey/wave-menu.ps +wfdb-10.1.6/wave-doc/guide/ +wfdb-10.1.6/wave-doc/guide/chart2.png +wfdb-10.1.6/wave-doc/guide/cover.wug +wfdb-10.1.6/wave-doc/guide/dossify-html +wfdb-10.1.6/wave-doc/guide/example.xws +wfdb-10.1.6/wave-doc/guide/fancybox.perl +wfdb-10.1.6/wave-doc/guide/fixindex +wfdb-10.1.6/wave-doc/guide/fixinfo +wfdb-10.1.6/wave-doc/guide/fixlinks +wfdb-10.1.6/wave-doc/guide/fulldisc.png +wfdb-10.1.6/wave-doc/guide/html.sty +wfdb-10.1.6/wave-doc/guide/icons/ +wfdb-10.1.6/wave-doc/guide/icons/contents.png +wfdb-10.1.6/wave-doc/guide/icons/cross_ref.png +wfdb-10.1.6/wave-doc/guide/icons/foot.png +wfdb-10.1.6/wave-doc/guide/icons/index.png +wfdb-10.1.6/wave-doc/guide/icons/next_gr.png +wfdb-10.1.6/wave-doc/guide/icons/next.png +wfdb-10.1.6/wave-doc/guide/icons/prev_gr.png +wfdb-10.1.6/wave-doc/guide/icons/previous.png +wfdb-10.1.6/wave-doc/guide/icons/up_gr.png +wfdb-10.1.6/wave-doc/guide/icons/up.png +wfdb-10.1.6/wave-doc/guide/icons/wave.png +wfdb-10.1.6/wave-doc/guide/.latex2html-init +wfdb-10.1.6/wave-doc/guide/Makefile +wfdb-10.1.6/wave-doc/guide/manhtml +wfdb-10.1.6/wave-doc/guide/saveroot +wfdb-10.1.6/wave-doc/guide/savewin +wfdb-10.1.6/wave-doc/guide/stdev.c +wfdb-10.1.6/wave-doc/guide/wave2d +wfdb-10.1.6/wave-doc/guide/wug.tex +wfdb-10.1.6/wave-doc/guide/xview.7 +wfdb-10.1.6/wave-doc/guide/xwdtops +wfdb-10.1.6/wave-doc/guide/xwdtops-grey +wfdb-10.1.6/wave-doc/Makefile +wfdb-10.1.6/wave-doc/ppm/ +wfdb-10.1.6/wave-doc/ppm/allow-edit.ppm.gz +wfdb-10.1.6/wave-doc/ppm/attach-to-signals.ppm.gz +wfdb-10.1.6/wave-doc/ppm/calibrate.ppm.gz +wfdb-10.1.6/wave-doc/ppm/file-analyze.ppm.gz +wfdb-10.1.6/wave-doc/ppm/file-load.ppm.gz +wfdb-10.1.6/wave-doc/ppm/file-print.ppm.gz +wfdb-10.1.6/wave-doc/ppm/file-save.ppm.gz +wfdb-10.1.6/wave-doc/ppm/find-window.ppm.gz +wfdb-10.1.6/wave-doc/ppm/help-topics.ppm.gz +wfdb-10.1.6/wave-doc/ppm/level-window.ppm.gz +wfdb-10.1.6/wave-doc/ppm/log-window.ppm.gz +wfdb-10.1.6/wave-doc/ppm/main-control-panel.ppm.gz +wfdb-10.1.6/wave-doc/ppm/main-window.ppm.gz +wfdb-10.1.6/wave-doc/ppm/main-with-markers.ppm.gz +wfdb-10.1.6/wave-doc/ppm/Makefile +wfdb-10.1.6/wave-doc/ppm/mimic.ppm.gz +wfdb-10.1.6/wave-doc/ppm/netscape-new-helper.ppm.gz +wfdb-10.1.6/wave-doc/ppm/print-setup-window.ppm.gz +wfdb-10.1.6/wave-doc/ppm/scope-window.ppm.gz +wfdb-10.1.6/wave-doc/ppm/search-template.ppm.gz +wfdb-10.1.6/wave-doc/ppm/stdev.ppm.gz +wfdb-10.1.6/wave-doc/ppm/titlebar.ppm.gz +wfdb-10.1.6/wave-doc/ppm/title-with-parens.ppm.gz +wfdb-10.1.6/wave-doc/ppm/type-menu.ppm.gz +wfdb-10.1.6/wave-doc/ppm/wave-icon.ppm.gz +wfdb-10.1.6/wave-doc/ppm/wave-menu.ppm.gz +wfdb-10.1.6/wave/edit.c +wfdb-10.1.6/wave/editing.hlp +wfdb-10.1.6/wave/faq.hlp +wfdb-10.1.6/wave/gcc-patches +wfdb-10.1.6/wave/grid.c +wfdb-10.1.6/wave/help.c +wfdb-10.1.6/wave/helppan.c +wfdb-10.1.6/wave/init.c +wfdb-10.1.6/wave/intro.hlp +wfdb-10.1.6/wave/log.hlp +wfdb-10.1.6/wave/logpan.c +wfdb-10.1.6/wave/mainpan.c +wfdb-10.1.6/wave/Makefile +wfdb-10.1.6/wave/Makefile.top +wfdb-10.1.6/wave/Makefile.tpl +wfdb-10.1.6/wave/makewave +wfdb-10.1.6/wave/mglass_mask.xbm +wfdb-10.1.6/wave/mglass.xbm +wfdb-10.1.6/wave/modepan.c +wfdb-10.1.6/wave/nomake +wfdb-10.1.6/wave/printing.hlp +wfdb-10.1.6/waverc/ +wfdb-10.1.6/waverc/Makefile +wfdb-10.1.6/waverc/Makefile.top +wfdb-10.1.6/waverc/Makefile.tpl +wfdb-10.1.6/waverc/urlvhead +wfdb-10.1.6/waverc/wave-remote.c +wfdb-10.1.6/waverc/wave-remote-test.c +wfdb-10.1.6/waverc/wavescript.c +wfdb-10.1.6/wave/README +wfdb-10.1.6/wave/resource.hlp +wfdb-10.1.6/wave/scope.c +wfdb-10.1.6/wave/search.c +wfdb-10.1.6/wave/sig.c +wfdb-10.1.6/wave/soelim.c +wfdb-10.1.6/wave/wave.c +wfdb-10.1.6/wave/wave.h +wfdb-10.1.6/wave/wave.hl0 +wfdb-10.1.6/wave/wave.inf +wfdb-10.1.6/wave/wave.info +wfdb-10.1.6/wave/wavemenu.def +wfdb-10.1.6/wave/wave.prf +wfdb-10.1.6/wave/Wave.res +wfdb-10.1.6/wave/wave.xbm +wfdb-10.1.6/wave/xvwave.c +wfdb-10.1.6/wave/xvwave.h +wfdb-10.1.6/wview/ +wfdb-10.1.6/wview/clean +wfdb-10.1.6/wview/ecg.ico +wfdb-10.1.6/wview/html/ +wfdb-10.1.6/wview/html/addnft1.png +wfdb-10.1.6/wview/html/addnft2.png +wfdb-10.1.6/wview/html/addnft3.png +wfdb-10.1.6/wview/html/addnft4.png +wfdb-10.1.6/wview/html/addnft5.png +wfdb-10.1.6/wview/html/addnft6.png +wfdb-10.1.6/wview/html/example.xws +wfdb-10.1.6/wview/html/wave.png +wfdb-10.1.6/wview/html/wvsetup.ht0 +wfdb-10.1.6/wview/makefile +wfdb-10.1.6/wview/wview.c +wfdb-10.1.6/wview/wview.def +wfdb-10.1.6/wview/wview.h +wfdb-10.1.6/wview/wview.hlp +wfdb-10.1.6/wview/wview.hpj +wfdb-10.1.6/wview/wview.rc +wfdb-10.1.6/wview/wview.rtf +wfdb-10.1.6/wview/wvscript.c diff -Naur wfdb-10.1.5/Makefile wfdb-10.1.6/Makefile --- wfdb-10.1.5/Makefile Wed Jun 7 00:12:25 2000 +++ wfdb-10.1.6/Makefile Wed Aug 1 10:28:34 2001 @@ -1,10 +1,10 @@ # file: Makefile G. Moody 5 September 1990 -# Last revised: 23 May 2000 Version 10.1.4 +# Last revised: 28 February 2001 Version 10.1.6 # UNIX 'make' description file for the WFDB software package # # ----------------------------------------------------------------------------- # WFDB software for creating & using annotated waveform (time series) databases -# Copyright (C) 2000 George B. Moody +# Copyright (C) 2001 George B. Moody # # These programs are free software; you can redistribute them and/or modify # them under the terms of the GNU General Public License as published by the @@ -39,12 +39,12 @@ # create source archives, type `make tarballs'; or to make a binary archive, # type `make bin-tarball'. Making archives requires PGP, gzip, and GNU tar). # file: version.def G. Moody 24 May 2000 -# Last revised: 6 June 2000 +# Last revised: 28 February 2001 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 1 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # VDEFS is the set of C compiler options needed to set version number variables @@ -52,6 +52,7 @@ VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) # _____________________________________________________________________________ +PACKAGE=wfdb-10.1.6 # file: linux.def G. Moody 31 May 2000 # Last revised: 5 June 2000 # 'make' definitions for compiling the WFDB Software Package under Linux @@ -166,7 +167,7 @@ echo "Nothing to be done for lib-post-uninstall" # _____________________________________________________________________________ # file: Makefile.tpl G. Moody 24 May 2000 -# +# Last revised: 30 May 2001 # This section of the Makefile should not need to be changed. # ARCH specifies the type of CPU and the operating system (e.g., 'i686-Linux'). @@ -203,7 +204,7 @@ cd psd; $(MAKE) uninstall cd convert; $(MAKE) uninstall cd data; $(MAKE) uninstall - ./uninstall $(WFDBROOT) + ./uninstall.sh $(WFDBROOT) # 'make clean': remove binaries, other cruft from source directories clean: @@ -219,7 +220,7 @@ cd wave-doc; $(MAKE) clean cd waverc; $(MAKE) clean cd wview; $(MAKE) -f clean - rm -f *~ conf/*~ config.cache + rm -f *~ conf/*~ config.cache */*.exe # 'make config.cache': check configuration config.cache: @@ -262,18 +263,18 @@ # 'make tarballs': clean up the source directories, then make a pair of gzipped # tar source archives of the WFDB software package (with and without the -# documentation), and generate PGP signature blocks for the archives +# documentation), and check that the MANIFEST (list of files in the package) +# is correct. tarballs: clean - cd ..; tar --create --file wfdb-$(VERSION).tar.gz --verbose --gzip \ - '--exclude=wfdb-$(VERSION)/*CVS' wfdb-$(VERSION) - cd ..; tar --create --file wfdb-no-docs-$(VERSION).tar.gz \ - --verbose --gzip \ - '--exclude=wfdb-$(VERSION)/*doc' \ - '--exclude=wfdb-$(VERSION)/*CVS' wfdb-$(VERSION) - cd ..; pgps -b wfdb-$(VERSION).tar.gz wfdb-no-docs-$(VERSION).tar.gz + cd ..; tar --create --file $(PACKAGE).tar.gz --verbose --gzip \ + '--exclude=$(PACKAGE)/*CVS' $(PACKAGE) | tee $(PACKAGE)-MANIFEST + cd ..; tar --create --file $(PACKAGE)-no-docs.tar.gz \ + --verbose --gzip \ + '--exclude=$(PACKAGE)/*doc' \ + '--exclude=$(PACKAGE)/*CVS' $(PACKAGE) + ./check-manifest $(PACKAGE) # 'make bin-tarball': make a gzipped tar archive of the WFDB software package # binaries and other installed files bin-tarball: test-install - cd $(HOME)/wfdb-test; tar cfvz ../wfdb-$(VERSION)-$(ARCH).tar.gz . - cd ..; pgps -b wfdb-$(VERSION)-$(ARCH).tar.gz + cd $(HOME)/wfdb-test; tar cfvz ../$(PACKAGE)-$(ARCH).tar.gz . diff -Naur wfdb-10.1.5/Makefile.top wfdb-10.1.6/Makefile.top --- wfdb-10.1.5/Makefile.top Tue May 23 22:03:07 2000 +++ wfdb-10.1.6/Makefile.top Wed Feb 28 13:18:10 2001 @@ -1,10 +1,10 @@ # file: Makefile G. Moody 5 September 1990 -# Last revised: 23 May 2000 Version 10.1.4 +# Last revised: 28 February 2001 Version 10.1.6 # UNIX 'make' description file for the WFDB software package # # ----------------------------------------------------------------------------- # WFDB software for creating & using annotated waveform (time series) databases -# Copyright (C) 2000 George B. Moody +# Copyright (C) 2001 George B. Moody # # These programs are free software; you can redistribute them and/or modify # them under the terms of the GNU General Public License as published by the diff -Naur wfdb-10.1.5/Makefile.tpl wfdb-10.1.6/Makefile.tpl --- wfdb-10.1.5/Makefile.tpl Thu Jun 8 00:40:40 2000 +++ wfdb-10.1.6/Makefile.tpl Wed May 30 12:44:09 2001 @@ -1,5 +1,5 @@ # file: Makefile.tpl G. Moody 24 May 2000 -# Last revised: 8 June 2000 +# Last revised: 30 May 2001 # This section of the Makefile should not need to be changed. # ARCH specifies the type of CPU and the operating system (e.g., 'i686-Linux'). @@ -95,18 +95,18 @@ # 'make tarballs': clean up the source directories, then make a pair of gzipped # tar source archives of the WFDB software package (with and without the -# documentation), and generate PGP signature blocks for the archives +# documentation), and check that the MANIFEST (list of files in the package) +# is correct. tarballs: clean - cd ..; tar --create --file wfdb-$(VERSION).tar.gz --verbose --gzip \ - '--exclude=wfdb-$(VERSION)/*CVS' wfdb-$(VERSION) - cd ..; tar --create --file wfdb-no-docs-$(VERSION).tar.gz \ - --verbose --gzip \ - '--exclude=wfdb-$(VERSION)/*doc' \ - '--exclude=wfdb-$(VERSION)/*CVS' wfdb-$(VERSION) - cd ..; pgps -b wfdb-$(VERSION).tar.gz wfdb-no-docs-$(VERSION).tar.gz + cd ..; tar --create --file $(PACKAGE).tar.gz --verbose --gzip \ + '--exclude=$(PACKAGE)/*CVS' $(PACKAGE) | tee $(PACKAGE)-MANIFEST + cd ..; tar --create --file $(PACKAGE)-no-docs.tar.gz \ + --verbose --gzip \ + '--exclude=$(PACKAGE)/*doc' \ + '--exclude=$(PACKAGE)/*CVS' $(PACKAGE) + ./check-manifest $(PACKAGE) # 'make bin-tarball': make a gzipped tar archive of the WFDB software package # binaries and other installed files bin-tarball: test-install - cd $(HOME)/wfdb-test; tar cfvz ../wfdb-$(VERSION)-$(ARCH).tar.gz . - cd ..; pgps -b wfdb-$(VERSION)-$(ARCH).tar.gz + cd $(HOME)/wfdb-test; tar cfvz ../$(PACKAGE)-$(ARCH).tar.gz . diff -Naur wfdb-10.1.5/app/12lead.pro wfdb-10.1.6/app/12lead.pro --- wfdb-10.1.5/app/12lead.pro Sat May 20 22:10:48 2000 +++ wfdb-10.1.6/app/12lead.pro Sat Oct 7 13:59:55 2000 @@ -1,4 +1,5 @@ % file: 12lead.pro G. Moody 20 May 2000 +% Last revised: 7 October 2000 % ----------------------------------------------------------------------------- % prolog for pschart output of 12-lead ECGs (based on pschart.pro) @@ -64,44 +65,54 @@ % x0 y0 x1 y1 xtick ytick grid: print a grid with the lower corner at (x0, y0), % the upper corner at (x1, y1), and ticks at intervals of xtick and ytick (in % mm); the units of x0, y0, x1, and y1 are printer coordinates. -% This function is the only one from pschart.pro that is modified. This -% version prints a 1 mv (10 yticks) x 200 ms (5 xticks) "calibration pulse" at +/grid { newpath 0 setlinecap + /dy1 exch dpi 25.4 div mul def /dy2 dy1 5 mul def + /dx1 exch dpi 25.4 div mul def /dx2 dx1 5 mul def + /y1 exch def /x1 exch def /y0 exch def /x0 exch def + dpi 100 idiv setlinewidth x0 y0 moveto x1 y0 lineto x1 y1 lineto x0 y1 lineto + closepath stroke lw setlinewidth + y0 dy2 add dy2 y1 {newpath dup x0 exch moveto x1 exch lineto stroke}for + x0 dx2 add dx2 x1 {newpath dup y0 moveto y1 lineto stroke }for + [ lw dx1 lw sub lw dx1 2 mul lw sub lw dx1 lw sub lw dx1 lw sub ] dx1 2 mul + setdash + y0 dy1 add dy1 y1 {newpath dup x0 exch moveto x1 exch lineto stroke}for + [] 0 setdash +}bind def + +% alternate grid +% prints a 1 mv (10 yticks) x 200 ms (5 xticks) "calibration pulse" at % the beginning of each trace, and also prints marker bars at the times when % the signals change. -/grid { newpath 0 setlinecap - /dy1 exch dpi 25.4 div mul lw sub def /dy2 dy1 lw add 5 mul def - /dx1 exch dpi 25.4 div mul lw sub def /dx2 dx1 lw add 5 mul def +/Grid { newpath 0 setlinecap + /dy1 exch dpi 25.4 div mul def /dy2 dy1 5 mul def + /dx1 exch dpi 25.4 div mul def /dx2 dx1 5 mul def /y1 exch def /x1 exch def /y0 exch def /x0 exch def -% dpi 100 idiv setlinewidth x0 y0 moveto x1 y0 lineto x1 y1 lineto x0 y1 lineto -% closepath stroke lw setlinewidth [lw dx1] 0 setdash -% y0 dy2 add dy2 y1 {newpath dup x0 exch moveto x1 exch lineto stroke}for -% [lw dy1] 0 setdash -% x0 dx2 add dx2 x1 {newpath dup y0 moveto y1 lineto stroke }for -% [] 0 setdash - /dx3 dx1 5 mul def /dx4 dx2 12.5 mul def - /dy3 y1 y0 sub 8 div def /dy4 dy1 10 mul def - /x2 x0 dx3 sub def /x3 x2 dx1 sub def /x4 x0 dx4 add def - /y2 y0 dy3 add def /y3 y2 dy4 add def - newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto - stroke - /y2 y2 dy3 dup add add def /y3 y2 dy4 add def /y4 y2 dy4 sub def - newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto - x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def - x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def - x4 y3 moveto x4 y4 lineto /x4 x0 dx4 add def - stroke - /y2 y2 dy3 dup add add def /y3 y2 dy4 add def /y4 y2 dy4 sub def - newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto - x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def - x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def - x4 y3 moveto x4 y4 lineto /x4 x0 dx4 add def - stroke - /y2 y2 dy3 dup add add def /y3 y2 dy4 add def /y4 y2 dy4 sub def - newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto - x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def - x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def - x4 y3 moveto x4 y4 lineto - stroke + /dx3 dx1 5 mul def /dx4 dx2 12.5 mul def + /dy3 y1 y0 sub 8 div def /dy4 dy1 10 mul def + /x2 x0 dx3 sub def /x3 x2 dx1 sub def /x4 x0 dx4 add def + /y2 y0 dy3 add def /y3 y2 dy4 add def + lw 5 mul setlinewidth + newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto + stroke + /y2 y2 dy3 dup add add def /y3 y2 dy4 add def /y4 y2 dy4 sub def + newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto + x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def + x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def + x4 y3 moveto x4 y4 lineto /x4 x0 dx4 add def + stroke + /y2 y2 dy3 dup add add def /y3 y2 dy4 add def /y4 y2 dy4 sub def + newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto + x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def + x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def + x4 y3 moveto x4 y4 lineto /x4 x0 dx4 add def + stroke + /y2 y2 dy3 dup add add def /y3 y2 dy4 add def /y4 y2 dy4 sub def + newpath x3 y2 moveto x2 y2 lineto x2 y3 lineto x0 y3 lineto x0 y2 lineto + x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def + x4 y3 moveto x4 y4 lineto /x4 x4 dx4 add def + x4 y3 moveto x4 y4 lineto + stroke + lw 2 mul setlinewidth }bind def % pn x y prpn: print page number, pn, centered on (x, y) (in mm). @@ -155,19 +166,16 @@ /yb 0 def /yc 0 def /yd 0 def -/ye 0 def % ya yb yc yd sb: set ordinates for marker bars -/sb {/yd exch def /yc exch def /yb exch def /ya exch def - /ye dpi 50.8 div lw sub def}def +/sb {/yd exch def /yc exch def /yb exch def /ya exch def}def % ya yb Sb: set ordinates for short marker bars -/Sb {/yb exch def /ya exch def /yc yb def /yd yb def - /ye dpi 50.8 div lw sub def}def +/Sb {/yb exch def /ya exch def /yc yb def /yd yb def}def % x mb: draw marker bars at x /mb { dup ya newpath moveto dup yb lineto dup yc moveto yd lineto -[lw ye] 0 setdash stroke [] 0 setdash}bind def +stroke}bind def % str x a: plot str at (x, ay), with marker bars if defined /a {ya yb ne {dup mb}if ay m t}bind def diff -Naur wfdb-10.1.5/app/Makefile wfdb-10.1.6/app/Makefile --- wfdb-10.1.5/app/Makefile Wed Jun 7 00:12:25 2000 +++ wfdb-10.1.6/app/Makefile Wed Aug 1 10:28:34 2001 @@ -33,12 +33,12 @@ # type `make listing'. # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 6 June 2000 +# Last revised: 28 February 2001 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 1 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # VDEFS is the set of C compiler options needed to set version number variables @@ -46,6 +46,7 @@ VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) # _____________________________________________________________________________ +PACKAGE=wfdb-10.1.6 # file: linux.def G. Moody 31 May 2000 # Last revised: 5 June 2000 # 'make' definitions for compiling the WFDB Software Package under Linux @@ -160,19 +161,19 @@ echo "Nothing to be done for lib-post-uninstall" # _____________________________________________________________________________ # file: Makefile.tpl G. Moody 23 May 2000 -# +# Last revised: 6 December 2000 # This section of the Makefile should not need to be changed. -CFILES = bxb.c calsig.c ecgeval.c epic.c fir.c ihr.c mfilt.c mrgann.c \ - mxm.c nst.c plotstm.c pschart.c psfd.c rdann.c rdsamp.c rxr.c sampfreq.c \ - sample.c sigamp.c skewedit.c snip.c sortann.c sqrs.c sqrs125.c sumann.c \ - sumstats.c tach.c view.c vsetup.c wfdbcat.c wfdbcollate.c wfdbdesc.c \ - wfdbwhich.c wrann.c wrsamp.c wvscript.c xform.c -XFILES = bxb calsig ecgeval epic fir ihr mfilt mrgann \ - mxm nst plotstm pschart psfd rdann rdsamp rxr sampfreq \ - sigamp skewedit snip sortann sqrs sqrs125 sumann \ - sumstats tach wfdbcat wfdbcollate wfdbdesc \ - wfdbwhich wrann wrsamp xform +CFILES = ann2rr.c bxb.c calsig.c ecgeval.c epic.c fir.c ihr.c mfilt.c \ + mrgann.c mxm.c nst.c plotstm.c pscgen.c pschart.c psfd.c rdann.c rdsamp.c \ + rr2ann.c rxr.c sampfreq.c sample.c sigamp.c skewedit.c snip.c sortann.c \ + sqrs.c sqrs125.c sumann.c sumstats.c tach.c view.c vsetup.c wfdbcat.c \ + wfdbcollate.c wfdbdesc.c wfdbwhich.c wrann.c wrsamp.c wvscript.c xform.c +XFILES = ann2rr bxb calsig ecgeval epic fir ihr mfilt \ + mrgann mxm nst plotstm pscgen pschart psfd rdann rdsamp \ + rr2ann rxr sampfreq sigamp skewedit snip sortann \ + sqrs sqrs125 sumann sumstats tach wfdbcat \ + wfdbcollate wfdbdesc wfdbwhich wrann wrsamp xform SCRIPTS = cshsetwfdb setwfdb PSFILES = pschart.pro psfd.pro 12lead.pro OTHERFILES = cshsetwfdb setwfdb setwfdb.bat sample8.hea @@ -190,8 +191,8 @@ # `make' or `make install': build and install applications, clean up install: all $(BINDIR) $(PSPDIR) scripts - cp $(XFILES) $(BINDIR) - cd $(BINDIR); $(SETXPERMISSIONS) $(XFILES) + $(SETXPERMISSIONS) $(XFILES) + ../install.sh $(BINDIR) $(XFILES) cp $(PSFILES) $(PSPDIR) cd $(PSPDIR); $(SETPERMISSIONS) $(PSFILES) $(MAKE) clean @@ -203,9 +204,9 @@ $(SETPERMISSIONS) $(SCRIPTS) uninstall: - ../uninstall $(PSPDIR) $(PSFILES) - ../uninstall $(BINDIR) $(XFILES) $(SCRIPTS) - ../uninstall $(LIBDIR) + ../uninstall.sh $(PSPDIR) $(PSFILES) + ../uninstall.sh $(BINDIR) $(XFILES) $(SCRIPTS) + ../uninstall.sh $(LIBDIR) # Create directories for installation if necessary. $(BINDIR): diff -Naur wfdb-10.1.5/app/Makefile.tpl wfdb-10.1.6/app/Makefile.tpl --- wfdb-10.1.5/app/Makefile.tpl Wed Jun 7 18:30:53 2000 +++ wfdb-10.1.6/app/Makefile.tpl Wed Dec 6 16:32:12 2000 @@ -1,17 +1,17 @@ # file: Makefile.tpl G. Moody 23 May 2000 -# +# Last revised: 6 December 2000 # This section of the Makefile should not need to be changed. -CFILES = bxb.c calsig.c ecgeval.c epic.c fir.c ihr.c mfilt.c mrgann.c \ - mxm.c nst.c plotstm.c pschart.c psfd.c rdann.c rdsamp.c rxr.c sampfreq.c \ - sample.c sigamp.c skewedit.c snip.c sortann.c sqrs.c sqrs125.c sumann.c \ - sumstats.c tach.c view.c vsetup.c wfdbcat.c wfdbcollate.c wfdbdesc.c \ - wfdbwhich.c wrann.c wrsamp.c wvscript.c xform.c -XFILES = bxb calsig ecgeval epic fir ihr mfilt mrgann \ - mxm nst plotstm pschart psfd rdann rdsamp rxr sampfreq \ - sigamp skewedit snip sortann sqrs sqrs125 sumann \ - sumstats tach wfdbcat wfdbcollate wfdbdesc \ - wfdbwhich wrann wrsamp xform +CFILES = ann2rr.c bxb.c calsig.c ecgeval.c epic.c fir.c ihr.c mfilt.c \ + mrgann.c mxm.c nst.c plotstm.c pscgen.c pschart.c psfd.c rdann.c rdsamp.c \ + rr2ann.c rxr.c sampfreq.c sample.c sigamp.c skewedit.c snip.c sortann.c \ + sqrs.c sqrs125.c sumann.c sumstats.c tach.c view.c vsetup.c wfdbcat.c \ + wfdbcollate.c wfdbdesc.c wfdbwhich.c wrann.c wrsamp.c wvscript.c xform.c +XFILES = ann2rr bxb calsig ecgeval epic fir ihr mfilt \ + mrgann mxm nst plotstm pscgen pschart psfd rdann rdsamp \ + rr2ann rxr sampfreq sigamp skewedit snip sortann \ + sqrs sqrs125 sumann sumstats tach wfdbcat \ + wfdbcollate wfdbdesc wfdbwhich wrann wrsamp xform SCRIPTS = cshsetwfdb setwfdb PSFILES = pschart.pro psfd.pro 12lead.pro OTHERFILES = cshsetwfdb setwfdb setwfdb.bat sample8.hea diff -Naur wfdb-10.1.5/app/ann2rr.c wfdb-10.1.6/app/ann2rr.c --- wfdb-10.1.5/app/ann2rr.c Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.6/app/ann2rr.c Mon Feb 19 12:45:51 2001 @@ -0,0 +1,247 @@ +/* file: ann2rr.c G. Moody 16 May 1995 + Last revised: 19 February 2001 +------------------------------------------------------------------------------- +ann2rr: Calculate RR intervals from an annotation file +Copyright (C) 2000 George B. Moody + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 2 of the License, or (at your option) any later +version. + +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., 59 Temple +Place - Suite 330, Boston, MA 02111-1307, USA. + +You may contact the author by e-mail (george@mit.edu) or postal mail +(MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +please visit PhysioNet (http://www.physionet.org/). +_______________________________________________________________________________ +*/ + +#include +#ifndef __STDC__ +extern void exit(); +#endif + +#include +#define map1 +#define map2 +#define ammap +#define mamap +#define annpos +#include + +char *pname; + +main(argc, argv) +int argc; +char *argv[]; +{ + char *record = NULL, *prog_name(); + double sps, spm, sph, rrsec; + int cflag=0, i, j, pflag=0, previous_annot_valid=0, vflag=0, xflag=0; + long beat_number = 0L, from = 0L, to = 0L, rr, tp = 0L, atol(); + static char flag[ACMAX+1]; + static WFDB_Anninfo ai; + static WFDB_Annotation annot; + void help(); + + pname = prog_name(argv[0]); + + /* Interpret command-line options. */ + for (i = flag[0] = 1; i < argc; i++) { + if (*argv[i] == '-') switch (*(argv[i]+1)) { + case 'a': /* annotator follows */ + if (++i >= argc) { + (void)fprintf(stderr, "%s: annotator must follow -a\n", + pname); + exit(1); + } + ai.name = argv[i]; + break; + case 'c': /* print intervals between consecutive valid + annotations only */ + cflag = 1; + break; + case 'f': /* starting time follows */ + if (++i >= argc) { + (void)fprintf(stderr, "%s: starting time must follow -f\n", + pname); + exit(1); + } + from = i; /* to be converted to sample intervals below */ + break; + case 'h': /* print usage summary and quit */ + help(); + exit(0); + break; + case 'p': /* annotation mnemonic(s) follow */ + if (++i >= argc || !isann(j = strann(argv[i]))) { + (void)fprintf(stderr, + "%s: annotation mnemonic(s) must follow -p\n", + pname); + exit(1); + } + flag[j] = 1; + /* The code above not only checks that there is a mnemonic where + there should be one, but also allows for the possibility that + there might be a (user-defined) mnemonic beginning with `-'. + The following lines pick up any other mnemonics, but assume + that arguments beginning with `-' are options, not mnemonics. */ + while (++i < argc && argv[i][0] != '-') + if (isann(j = strann(argv[i]))) flag[j] = 1; + if (i == argc || argv[i][0] == '-') i--; + flag[0] = 0; + break; + case 'r': /* input record name follows */ + if (++i >= argc) { + (void)fprintf(stderr, + "%s: input record name must follow -r\n", + pname); + exit(1); + } + record = argv[i]; + break; + case 't': /* ending time follows */ + if (++i >= argc) { + (void)fprintf(stderr, "%s: end time must follow -t\n", pname); + exit(1); + } + to = i; + break; + case 'v': /* verbose mode: include time as well as RR */ + vflag = 1; + break; + case 'x': /* use alternate time format */ + switch (*(argv[i]+2)) { + case 'h': xflag = 3; break; + case 'm': xflag = 2; break; + case 's': + default: xflag = 1; break; + } + break; + default: + (void)fprintf(stderr, "%s: unrecognized option %s\n", + pname, argv[i]); + exit(1); + } + else { + (void)fprintf(stderr, "%s: unrecognized argument %s\n", + pname, argv[i]); + exit(1); + } + } + if (record == NULL || ai.name == NULL) { + help(); + exit(1); + } + + if ((sps = sampfreq(record)) < 0.) + (void)setsampfreq(sps = WFDB_DEFFREQ); + spm = 60.0*sps; + sph = 60.0*spm; + + ai.stat = WFDB_READ; + if (annopen(record, &ai, 1) < 0) /* open annotation file */ + exit(2); + + if (from) { + if (*argv[(int)from] == '#') { + if ((beat_number = atol(argv[(int)from]+1)) < 0L) beat_number = 0L; + while (beat_number > 0L && getann(0, &annot) == 0) + if (isqrs(annot.anntyp)) beat_number--; + if (beat_number > 0L) exit(2); + } + else if (iannsettime(strtim(argv[(int)from])) < 0) exit(2); + } + if (to) { + if (*argv[(int)to] == '#') { + if ((beat_number = atol(argv[(int)to]+1)) < 1L) beat_number = 1L; + to = 0L; + } + else { + beat_number = -1L; + to = strtim(argv[(int)to]); + } + } + + tp = from; + while (getann(0, &annot) == 0 && (to == 0L || annot.time <= to)) { + if (!isann(annot.anntyp)) continue; + if ((flag[0] && isqrs(annot.anntyp)) || flag[annot.anntyp]) { + if (cflag == 0 || previous_annot_valid == 1) { + rr = annot.time - tp; + if (vflag) { /* print elapsed time */ + switch (xflag) { + default: + case 0: (void)printf("%ld\t", annot.time); break; + case 1: (void)printf("%.3lf\t", annot.time/sps); break; + case 2: (void)printf("%.3lf\t", annot.time/spm); break; + case 3: (void)printf("%.3lf\t", annot.time/sph); break; + } + } + /* print RR interval */ + if (xflag) (void)printf("%.3lf\n", rr/sps); + else (void)printf("%ld\n", rr); + } + tp = annot.time; + previous_annot_valid = 1; + } + else if (cflag) + previous_annot_valid = 0; + if (beat_number > 0L && isqrs(annot.anntyp) && --beat_number == 0L) + break; + } + exit(0); /*NOTREACHED*/ +} + +char *prog_name(s) +char *s; +{ + char *p = s + strlen(s); + +#ifdef MSDOS + while (p >= s && *p != '\\' && *p != ':') { + if (*p == '.') + *p = '\0'; /* strip off extension */ + if ('A' <= *p && *p <= 'Z') + *p += 'a' - 'A'; /* convert to lower case */ + p--; + } +#else + while (p >= s && *p != '/') + p--; +#endif + return (p+1); +} + +static char *help_strings[] = { + "usage: %s -r RECORD -a ANNOTATOR [OPTIONS ...]\n", + "where RECORD and ANNOTATOR specify the input, and OPTIONS may include:", + " -c print intervals between consecutive valid annotations only", + " -f TIME start at specified TIME", + " -h print this usage summary", + " -p TYPE [TYPE ...] print intervals between annotations of specified TYPEs", + " only", + " -t TIME stop at specified TIME", + " -v print elapsed times as well as RR intervals", + " -x use alternate format (times and RR intervals in seconds)", + " -xh use alternate format (times in hours, RR intervals in seconds)", + " -xm use alternate format (times in minutes, RR intervals in seconds)", + " -xs same as -x", +NULL +}; + +void help() +{ + int i; + + (void)fprintf(stderr, help_strings[0], pname); + for (i = 1; help_strings[i] != NULL; i++) + (void)fprintf(stderr, "%s\n", help_strings[i]); +} diff -Naur wfdb-10.1.5/app/epic.c wfdb-10.1.6/app/epic.c --- wfdb-10.1.5/app/epic.c Sun Jan 30 04:13:16 2000 +++ wfdb-10.1.6/app/epic.c Wed Mar 21 12:27:13 2001 @@ -24,14 +24,16 @@ _______________________________________________________________________________ This program implements the VF, AF, and ST episode-by-episode comparison -algorithms described in ANSI/AAMI EC38-1994, the American National Standard for -ambulatory ECGs (available from AAMI, Suite 400, 3330 Washington Blvd., -Arlington, VA 22201 USA).. The relevant provisions of the standard are -described in file `eval.doc'. Information about using this program is -contained in file `epic.1'. +algorithms described in ANSI/AAMI EC38:1998, the American National Standard for +Ambulatory electrocardiographs and ANSI/AAMI EC57:1998, the American National +Standard for Testing and reporting performance results of cardiac rhythm and +ST segment measurement algorithms (both available from AAMI, Suite 400, 3330 +Washington Blvd., Arlington, VA 22201 USA). The relevant provisions of these +standards are described in file `eval.doc'. Information about using this +program is contained in file `epic.1'. The -f and -t options modify the comparison algorithm used by epic in ways -not permitted by EC38-1994. These options are provided for the use of +not permitted by these standards. These options are provided for the use of developers, who may find them useful for obtaining a more detailed understanding of algorithm errors. */ diff -Naur wfdb-10.1.5/app/pschart.c wfdb-10.1.6/app/pschart.c --- wfdb-10.1.5/app/pschart.c Sat May 20 21:55:00 2000 +++ wfdb-10.1.6/app/pschart.c Wed Jan 10 12:36:46 2001 @@ -1,5 +1,5 @@ /* file: pschart.c G. Moody 15 March 1988 - Last revised: 20 May 2000 + Last revised: 10 January 2001 ------------------------------------------------------------------------------- pschart: Produce annotated `chart recordings' on a PostScript device @@ -110,6 +110,10 @@ #define T_SEP 1.0 /* distance from bottom of title to top of grid (mm) */ #define V_SEP 5.0 /* vertical space between strips (mm) */ +#define FS_ANN 12.0 /* font size (in PostScript points) for + annotations */ +#define FS_LABEL 10.0 /* font size for labels */ +#define FS_TITLE 12.0 /* font size for title */ #ifndef PTYPE #define PTYPE "letter" /* default page type */ @@ -139,12 +143,14 @@ double boff = 0.; /* binding offset (mm) */ char *copyright; /* copyright notice string */ char *defpagetitle; /* default page title */ +char *footer = NULL; /* footer string */ char *rdpagetitle; /* page title based on recording date */ double dpi = DPI; /* pixels per inch */ int Cflag = 0; /* if non-zero, produce color output */ int eflag = 0; /* if non-zero, do even/odd page handling */ int Eflag = 0; /* generate EPSF */ int gflag = 0; /* if non-zero, plot grid */ +int Gflag = 0; /* if non-zero, plot alternate grid */ int lflag = 0; /* if non-zero, label signals */ int Lflag = 0; /* if non-zero, use landscape orientation */ double lwmm = 0.; /* line width (mm); 0 is narrowest possible */ @@ -191,19 +197,24 @@ double t_sep = T_SEP; /* distance from bottom of title to top of grid (mm) */ double v_sep = V_SEP; /* vertical space between strips (mm) */ +double fs_ann = FS_ANN; /* font size (in PostScript points) for + annotations */ +double fs_label = FS_LABEL; /* font size for labels */ +double fs_title = FS_TITLE; /* font size for titles */ /* Color definitions. */ struct pscolor { float red, green, blue; }; -struct pscolor ac = { 0.5, 0.5, 1.0 }; /* annotations: light blue */ -struct pscolor gc = { 1.0, 0.0, 0.0 }; /* grid: red */ +struct pscolor ac = { 0.0, 0.0, 1.0 }; /* annotations: blue */ +struct pscolor gc = { 1.0, 0.5, 0.5 }; /* grid: light red */ +struct pscolor Gc = { 0.2, 0.2, 0.2 }; /* alternate grid: dark grey */ struct pscolor lc = { 0.0, 0.0, 0.0 }; /* labels: black */ -struct pscolor sc = { 0.0, 0.0, 0.5 }; /* signals: dark blue */ +struct pscolor sc = { 0.0, 0.0, 0.3 }; /* signals: dark blue */ char *prog_name(); int printstrip(), setpagedim(), setpagetitle(); -void append_scale(), cont(), ejectpage(), flush_cont(), grid(), help(), +void append_scale(), cont(), ejectpage(), flush_cont(), grid(), Grid(), help(), label(), larger(), move(), newpage(), plabel(), process(), rlabel(), rtlabel(), setbar1(), setbar2(), setcourier(), setitalic(), setmargins(), setrgbcolor(), setroman(), smaller(), tlabel(); @@ -256,7 +267,11 @@ if (p = getenv("L_SEP")) l_sep = atof(p); if (p = getenv("T_SEP")) t_sep = atof(p); if (p = getenv("V_SEP")) v_sep = atof(p); + if ((p = getenv("FS_ANN")) && (fs_ann = atof(p)) <= 0.0) fs_ann = FS_ANN; + if ((p = getenv("FS_LABEL"))&&(fs_label=atof(p)) <= 0.0) fs_label=FS_LABEL; + if ((p = getenv("FS_TITLE"))&&(fs_title=atof(p)) <= 0.0) fs_title=FS_TITLE; if (p = getenv("PTYPE")) ptype = p; + if (p = getenv("FOOTER")) footer = p; /* Check for buggy TranScript software. */ if (getenv("TRANSCRIPTBUG")) uflag = 1; @@ -312,6 +327,7 @@ switch (argv[i][2]) { case 'a': colorp = ∾ break; case 'g': colorp = &gc; break; + case 'G': colorp = &Gc; break; case 'l': colorp = &lc; break; case 's': colorp = ≻ break; case '\0': break; @@ -355,6 +371,9 @@ case 'g': /* enable grid printing */ gflag = 1; break; + case 'G': /* enable alternate grid printing */ + Gflag = 1; + break; case 'h': /* print usage summary and quit */ help(); exit(0); @@ -404,7 +423,7 @@ if (Mflag < 0 || Mflag > 3) { (void)fprintf(stderr, "%s: incorrect format (%d) specified after -M\n", - pname); + pname, Mflag); exit(1); } } @@ -559,7 +578,7 @@ int aflag = 0; /* if non-zero, plot annotations */ unsigned int nann = 0; /* number of annotation files to be plotted (0-2) */ char *scales; /* string which describes time and voltage scales */ -char record[20]; /* current record name */ +char record[80]; /* current record name */ int usflag = 0; /* if non-zero, uncalibrated signals were plotted */ /* The rhpage() macro is true for all right-hand pages (normally the odd- @@ -611,13 +630,13 @@ } else { tokptr = strtok(combuf, " \t"); - if (tokptr) (void)strncpy(record, tokptr, 19); + if (tokptr) (void)strncpy(record, tokptr, sizeof(record)-1); tstring = strtok((char *)NULL, " \t\n"); title = strtok((char *)NULL, "\n"); for (i = 0; i < nisig; i++) uncal[siglist[i]] = 0; if (tokptr == NULL || tstring == NULL || - (nisig = isigopen(record, s, WFDB_MAXSIG)) < 1) continue; + (nisig = isigopen(record, s, WFDB_MAXSIG)) < 0) continue; (void)setpagetitle(0L); if (nosiglist) { for (i = 0; i < nisig; i++) @@ -715,10 +734,11 @@ } } - /* Fill the buffers. */ - if (isigsettime(t0) < 0) return (0); if ((jmax = (int)(t1 - t0)) > nsamp) jmax = nsamp; - for (j = 0; j < jmax && getvec(v) == nisig; j++) { + if (nsig > 0) { + /* Fill the buffers. */ + if (isigsettime(t0) < 0) return (0); + for (j = 0; j < jmax && getvec(v) == nisig; j++) { for (i = 0; i < nsig; i++) { int sig = siglist[i], vtmp; @@ -727,13 +747,12 @@ else if (vtmp < vmin[sig]) vmin[sig] = vtmp; vsum[sig] += vtmp; } - } - if (j == 0) return (0); - jmax = j; - t1 = t0 + jmax; + } + if (j == 0) return (0); + jmax = j; - /* Calculate the midranges. */ - for (i = 0; i < nsig; i++) { + /* Calculate the midranges. */ + for (i = 0; i < nsig; i++) { int sig = siglist[i], vb, vm, vs; double w; @@ -743,13 +762,15 @@ else if (vb < vs) w = (vs - vb)/(vs - vmin[sig]); else w = 0.0; vbase[sig] = vs + ((double)vb-vs)*w; + } } - + t1 = t0 + jmax; + /* Determine the width and height of the strip. Allow the greater of 4 mV or 20 mm per trace if possible. If n strips won't fit on the page (even if the allowance per trace is decreased moderately), the allowance is adjusted so that n-1 strips fill the page (for n = 2, 3, and 4). */ - s_width = j*tscale/sps; + s_width = jmax*tscale/sps; if (vscale >= 5.) s_height = 4. * vscale * nsig; else s_height = 20. * nsig; if (1.5 * (s_height+v_sep) > p_height - (tmargin+bmargin)) @@ -779,30 +800,23 @@ if (!pflag) s_left = lmargin + (s_defwidth - s_width)/2; s_right = s_left + s_width; - /* Draw the grid and print the title, scales, and time markers. */ + /* Draw the grid and print the title and time markers. */ if (gflag) { setrgbcolor(&gc); - grid(mm(s_left), mm(s_bot), mm(s_right), mm(s_top), t_tick, v_tick); + if (Gflag) + grid(mm(s_left-10.0),mm(s_bot),mm(s_right),mm(s_top),t_tick,v_tick); + else + grid(mm(s_left), mm(s_bot), mm(s_right), mm(s_top), t_tick, v_tick); + } + if (Gflag) { + setrgbcolor(&Gc); + Grid(mm(s_left), mm(s_bot), mm(s_right), mm(s_top), t_tick, v_tick); } setrgbcolor(&lc); - setroman(8.); + setroman(fs_title); move(mm(s_left), mm(s_top + t_sep)); if (rflag) { label("Record "); label(record); label(" "); } if (title) label(title); - if (smode == 3 || smode == 4) { - double a = s_width; - - /* Estimate the space available for printing the scales above the - strip (1 printer's em in 8-point type is about 1 mm). */ - if (rflag) a -= 9. + (double)strlen(record); - if (title) a -= (double)strlen(title); - if (a >= (double)strlen(scales) + 10.) - move(mm(s_left + s_width), mm(s_top + t_sep)); rlabel(scales); - } - else if ((smode == 5 || smode == 6) && - s_width >= (double)strlen(scales) + 10.) { - move(mm(s_right - l_sep), mm(s_bot + t_sep)); rlabel(scales); - } /* If side-by-side strip printing is enabled, print the time markers within the strip at the upper corners; in this case, if the strip is less than 30 mm wide, only the starting time marker is printed. Otherwise, if @@ -895,7 +909,7 @@ /* Draw the signals. */ x0 = mm(s_left); if (lflag) { - setitalic(8.); + setitalic(fs_label); /* If side-by-side printing and signal label printing are both enabled, print the signal labels in the left margin only. */ if (pflag && s_left == lmargin) @@ -960,7 +974,7 @@ char lbuf[20]; int yt, yi = pt(3.); - setroman(6.); + setroman(fs_label*0.75); (void)sprintf(lbuf, "%g", ptick * (n-1)); yt = y0 - adu(ytick); move(mm(s_left - 1.5*l_sep), yt - yi); rlabel(lbuf); @@ -973,7 +987,7 @@ move(mm(s_left - l_sep), yt); cont(mm(s_left), yt); move(mm(s_right + 1.5*l_sep), yt - yi); label(lbuf); move(mm(s_right + l_sep), yt); cont(mm(s_right), yt); - setitalic(8.); + setitalic(fs_label); } } y0 -= adu(vbase[sig]); @@ -983,7 +997,7 @@ for (j = 1; j < jmax; j++) cont(x0 + si(j), y0 + adu(*vp++)); } - if (lflag) setroman(8.); + if (lflag) setroman(fs_label); else flush_cont(); /* Print the annotations; ya[0] and ya[1] are the baseline ordinates (in @@ -1003,10 +1017,10 @@ The scheme on the left is used for records with only one signal, and that on the right is used in other cases. */ - if (nsig < 2) ya[0] = mm(s_top - 5.0) - pt(4.); - else ya[0] = mm(s_top - t_height) - pt(4.); - if (nsig < 3) ya[1] = mm(s_bot + 5.0) - pt(4.); - else ya[1] = mm(s_top - 2*t_height) - pt(4.); + if (nsig < 2) ya[0] = mm(s_top - 5.0) - pt(fs_ann/2.); + else ya[0] = mm(s_top - t_height) - pt(fs_ann/2.); + if (nsig < 3) ya[1] = mm(s_bot + 5.0) - pt(fs_ann/2.); + else ya[1] = mm(s_top - 2*t_height) - pt(fs_ann/2.); if (Mflag) setbar1(mm(s_top), mm(s_bot)); /* Set s_top (and s_left, if side-by-side strip printing is enabled) @@ -1019,7 +1033,7 @@ if (s_left + tscale > lmargin + s_defwidth) { if (lflag) { setrgbcolor(&lc); - setitalic(8.); + setitalic(fs_label); for (i = 0; i < nsig; i++) { char *d = s[siglist[i]].desc, *t; @@ -1030,7 +1044,7 @@ label(d); if (uncal[siglist[i]]) label(" *"); } - setroman(8.); + setroman(fs_label); } s_left = lmargin; s_top -= (s_height + v_sep); @@ -1047,6 +1061,7 @@ if (iannsettime(t0) < 0 && nann == 1) return (1); setrgbcolor(&ac); + setroman(fs_ann); for (ia = 0; ia < nann; ia++) { if (Mflag <= 2) (void)printf("%d Ay\n", y = ya[ia]); @@ -1065,7 +1080,7 @@ x = (int)(annot.time - t0); switch (annot.anntyp) { case NOISE: - move(x0 + si(x), ya[ia] + pt(9.)); + move(x0 + si(x), ya[ia] + pt(fs_ann+1.0)); if (annot.subtyp == -1) { label("U"); break; } /* The existing scheme is good for up to 4 signals; it can be easily extended to 8 or 12 signals using the chan and @@ -1130,6 +1145,24 @@ } } } + if (smode == 3 || smode == 4) { + double a = s_width; + + setrgbcolor(&lc); + /* Estimate the space available for printing the scales above the + strip (1 printer's em in 8-point type is about 1 mm). */ + if (rflag) a -= 9. + (double)strlen(record); + if (title) a -= (double)strlen(title); + if (a >= (double)strlen(scales) + 10.) { + move(mm(s_left + s_width), mm(s_top + t_sep)); rlabel(scales); + } + } + else if ((smode == 5 || smode == 6) && + s_width >= (double)strlen(scales) + 10.) { + setrgbcolor(&lc); + move(mm(s_right - l_sep), mm(s_bot + t_sep)); + rlabel(scales); + } return (2); } @@ -1167,6 +1200,10 @@ p_width = 208.62; p_height = 271.61; } + else if (strcmp(ptype, "rletter") == 0) { /* rotated letter (11x8.5) */ + p_width = 271.61; + p_height = 208.62; + } else if (strcmp(ptype, "lwletter") == 0) { /* Apple LaserWriter letter */ p_width = 203.20; p_height = 277.37; @@ -1274,6 +1311,14 @@ (void)printf("%d %d %d %d %g %g grid\n", x0, y0, x1, y1, xtick, ytick); } +/* As above, but print the alternate grid. */ +void Grid(x0, y0, x1, y1, xtick, ytick) +int x0, y0, x1, y1; +double xtick, ytick; +{ + (void)printf("%d %d %d %d %g %g Grid\n", x0, y0, x1, y1, xtick, ytick); +} + /* Start a new page by invoking the PostScript `newpage' procedure. This is a little kludgy -- it should be necessary to send the prolog only once, but (with some PostScript printers, at least) pages get @@ -1353,7 +1398,7 @@ flush_cont(); if (s_top != -9999.) { setrgbcolor(&lc); - setroman(10.); + setroman(fs_title); if (Rflag) { if (rhpage()) { move(mm(p_width - rmargin), mm(title_y)); @@ -1368,8 +1413,9 @@ } if (infofile) { static char tstr[256]; - double yt = mm(title_y) + mm(20.0); + double yt = mm(title_y) + mm(30.0); + if (Rflag) yt -= mm(10.0); setcourier(10.0); while (fgets(tstr, sizeof(tstr), infofile)) { move(mm(lmargin), (int)(yt -= pt(10))); @@ -1395,12 +1441,12 @@ } } if (lflag && usflag) { - setroman(6.); + setroman(fs_label*0.75); move(mm(p_width - rmargin), mm(bmargin) - pt(7.5)); rlabel("* uncalibrated signal"); } if (smode == 1 || smode == 2) { - setroman(6.); + setroman(fs_label*0.75); if (scales) { /* 1 em at 6 points is about 1 mm. Decide whether to try to fit the scales on the same line as the copyright @@ -1411,6 +1457,10 @@ else move(mm(p_width - rmargin), mm(footer_y) + pt(7.5)); rlabel(scales); + if (footer) { + move(mm(lmargin), mm(footer_y)); + label(footer); + } /* reset scales for next page */ if (smode == 1) (void)sprintf(scales, "%g mm/sec", tscale); else (void)sprintf(scales, "Grid intervals: %g sec", 5.0/tps); @@ -1697,6 +1747,7 @@ " -e even/odd processing for two-sided printing", " -E generate EPSF", " -g print grids", + " -G print alternate grids", " -h print this usage summary", " -H use high-resolution mode for multi-frequency records", " -i FILE print (as text) contents of FILE in title area of first page", @@ -1782,6 +1833,16 @@ " [] 0 setdash", "}bind def", +"/Grid { newpath 0 setlinecap", +" /dy1 exch dpi 25.4 div mul lw sub def /dy2 dy1 lw add 5 mul def", +" /dx1 exch dpi 25.4 div mul lw sub def /dx2 dx1 lw add 5 mul def", +" /y1 exch def /x1 exch def /y0 exch def /x0 exch def", +" dpi 100 idiv setlinewidth x0 y0 moveto x1 y0 lineto x1 y1 lineto x0 y1 lineto", +" closepath stroke lw setlinewidth", +" y0 dy2 add dy2 y1 {newpath dup x0 exch moveto x1 exch lineto stroke}for", +" x0 dx2 add dx2 x1 {newpath dup y0 moveto y1 lineto stroke }for", +"}bind def", + "/prpn { mm exch mm exch moveto 10 R /pn exch def /str 10 string def", " pn str cvs stringwidth exch -.5 mul exch rmoveto", " (- ) stringwidth exch neg exch rmoveto", @@ -1791,7 +1852,7 @@ "/prco { mm exch mm exch moveto", " 6 R (Copyright ) show", -" /Symbol findfont 6 scalefont setfont (\323) show", +" /Symbol findfont 6 scalefont setfont (\\323) show", " 6 R show } def", "/newpage {/dpi exch def tm setmatrix newpath [] 0 setdash", @@ -1817,15 +1878,12 @@ "/yb 0 def", "/yc 0 def", "/yd 0 def", -"/ye 0 def", -"/sb {/yd exch def /yc exch def /yb exch def /ya exch def", -" /ye dpi 50.8 div lw sub def}def", -"/Sb {/yb exch def /ya exch def /yc yb def /yd yb def", -" /ye dpi 50.8 div lw sub def}def", +"/sb {/yd exch def /yc exch def /yb exch def /ya exch def}def", +"/Sb {/yb exch def /ya exch def /yc yb def /yd yb def}def", "/mb { dup ya newpath moveto dup yb lineto dup yc moveto yd lineto", -"[lw ye] 0 setdash stroke [] 0 setdash}bind def", +"stroke}bind def", "/a {ya yb ne {dup mb}if ay m t}bind def", -"/A {ya yb ne {dup mb}if ay m (\267) t}bind def", +"/A {ya yb ne {dup mb}if ay m (\\267) t}bind def", "/endpschart {cleartomark showpage pschart end restore}def", NULL }; diff -Naur wfdb-10.1.5/app/pschart.pro wfdb-10.1.6/app/pschart.pro --- wfdb-10.1.5/app/pschart.pro Sat May 20 22:07:41 2000 +++ wfdb-10.1.6/app/pschart.pro Sat Oct 7 13:59:52 2000 @@ -1,9 +1,9 @@ % file: pschart.pro G. Moody 27 May 1988 -% Last revised: 20 May 2000 +% Last revised: 7 October 2000 % ----------------------------------------------------------------------------- % prolog for pschart output -% Copyright (C) 1999 George B. Moody +% Copyright (C) 2000 George B. Moody % This program is free software; you can redistribute it and/or modify it under % the terms of the GNU General Public License as published by the Free Software @@ -77,6 +77,17 @@ [] 0 setdash }bind def +% alternate grid +/Grid { newpath 0 setlinecap + /dy1 exch dpi 25.4 div mul lw sub def /dy2 dy1 lw add 5 mul def + /dx1 exch dpi 25.4 div mul lw sub def /dx2 dx1 lw add 5 mul def + /y1 exch def /x1 exch def /y0 exch def /x0 exch def + dpi 100 idiv setlinewidth x0 y0 moveto x1 y0 lineto x1 y1 lineto x0 y1 lineto + closepath stroke lw setlinewidth + y0 dy2 add dy2 y1 {newpath dup x0 exch moveto x1 exch lineto stroke}for + x0 dx2 add dx2 x1 {newpath dup y0 moveto y1 lineto stroke }for +}bind def + % pn x y prpn: print page number, pn, centered on (x, y) (in mm). /prpn { mm exch mm exch moveto 10 R /pn exch def /str 10 string def pn str cvs stringwidth exch -.5 mul exch rmoveto @@ -128,19 +139,16 @@ /yb 0 def /yc 0 def /yd 0 def -/ye 0 def % ya yb yc yd sb: set ordinates for marker bars -/sb {/yd exch def /yc exch def /yb exch def /ya exch def - /ye dpi 50.8 div lw sub def}def +/sb {/yd exch def /yc exch def /yb exch def /ya exch def}def % ya yb Sb: set ordinates for short marker bars -/Sb {/yb exch def /ya exch def /yc yb def /yd yb def - /ye dpi 50.8 div lw sub def}def +/Sb {/yb exch def /ya exch def /yc yb def /yd yb def}def % x mb: draw marker bars at x /mb { dup ya newpath moveto dup yb lineto dup yc moveto yd lineto -[lw ye] 0 setdash stroke [] 0 setdash}bind def +stroke}bind def % str x a: plot str at (x, ay), with marker bars if defined /a {ya yb ne {dup mb}if ay m t}bind def diff -Naur wfdb-10.1.5/app/rdann.c wfdb-10.1.6/app/rdann.c --- wfdb-10.1.5/app/rdann.c Sun Jan 30 04:13:16 2000 +++ wfdb-10.1.6/app/rdann.c Mon Feb 26 12:31:54 2001 @@ -1,5 +1,5 @@ /* file rdann.c T. Baker and G. Moody 27 July 1981 - Last revised: 13 May 1999 + Last revised: 26 February 2001 ------------------------------------------------------------------------------- rdann: Print an annotation file in ASCII form @@ -69,7 +69,7 @@ char *record = NULL, *prog_name(); signed char cflag = 0, chanmatch, nflag = 0, nummatch, sflag = 0, submatch; double sps, spm, sph; - int i, j, xflag = 0; + int eflag = 0, i, j, xflag = 0; long beat_number = 0L, from = 0L, to = 0L, atol(); static char flag[ACMAX+1]; static WFDB_Anninfo ai; @@ -121,6 +121,10 @@ chanmatch = atoi(argv[i]); cflag = 1; break; + case 'e': /* show elapsed time */ + eflag = 1; + xflag = 0; + break; case 'f': /* starting time follows */ if (++i >= argc) { (void)fprintf(stderr, "%s: starting time must follow -f\n", @@ -189,6 +193,7 @@ break; case 'x': /* use alternate time format */ xflag = 1; + eflag = 0; break; default: (void)fprintf(stderr, "%s: unrecognized option %s\n", @@ -240,11 +245,13 @@ (cflag == 0 || annot.chan == chanmatch) && (nflag == 0 || annot.num == nummatch) && (sflag == 0 || annot.subtyp == submatch)) { - if (!xflag) - (void)printf("%s %7ld", mstimstr(-annot.time), annot.time); - else + if (eflag) + (void)printf("%s %7ld", mstimstr(annot.time), annot.time); + else if (xflag) (void)printf("%.3lf %.5lf %.7lf", annot.time/sps, annot.time/spm, annot.time/sph); + else + (void)printf("%s %7ld", mstimstr(-annot.time), annot.time); (void)printf("%6s%5d%5d%5d", annstr(annot.anntyp), annot.subtyp, annot.chan, annot.num); if (annot.aux != NULL) (void)printf("\t%s", annot.aux + 1); @@ -280,13 +287,15 @@ "usage: %s -r RECORD -a ANNOTATOR [OPTIONS ...]\n", "where RECORD and ANNOTATOR specify the input, and OPTIONS may include:", " -c CHAN print annotations with specified CHAN only", + " -e * show annotation times as elapsed times", " -f TIME start at specified TIME", " -h print this usage summary", " -n NUM print annotations with specified NUM only", " -p TYPE [TYPE ...] print annotations of specified TYPEs only", " -s SUBTYPE print annotations with specified SUBTYPE only", " -t TIME stop at specified TIME", - " -x use alternate time format (seconds, minutes, hours)", + " -x * use alternate time format (seconds, minutes, hours)", + "* Only one of -e and -x can be used.", NULL }; diff -Naur wfdb-10.1.5/app/rr2ann.c wfdb-10.1.6/app/rr2ann.c --- wfdb-10.1.5/app/rr2ann.c Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.6/app/rr2ann.c Wed Dec 6 16:29:42 2000 @@ -0,0 +1,214 @@ +/* file rr2ann.c G. Moody 29 November 1999 + Last revised: 6 December 2000 +------------------------------------------------------------------------------- +rr2ann: Generate an annotation file from a text file of RR intervals +Copyright (C) 2000 George B. Moody + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 2 of the License, or (at your option) any later +version. + +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., 59 Temple +Place - Suite 330, Boston, MA 02111-1307, USA. + +You may contact the author by e-mail (george@mit.edu) or postal mail +(MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +please visit PhysioNet (http://www.physionet.org/). +_______________________________________________________________________________ + +The input to this program should contain a set of RR (beat-to-beat) intervals +in text format, one per line. The first token on each line is taken to be +an RR interval; any additional tokens on the same line are ignored. Empty +lines and lines beginning with '#' are also ignored. The units of the RR +intervals are sample intervals by default; use the '-x' option to specify +a factor by which to multiply the given intervals in order to obtain sample +intervals. The output of this program is an annotation file in which all +beats are marked NORMAL. The first annotation is placed at the sample that +corresponds to the end of the first interval (in other words, as if there +were a beat at sample 0, but no annotation is placed at sample 0). +If a header file does not exist for the specified record, this program will +create one; in this case, you may use the '-F' option to specify the sampling +frequency if the default (WFDB_DEFFREQ) is incorrect. +*/ + +#include +#ifndef __STDC__ +extern void exit(); +#endif + +#define MAXLINELEN 1024 /* longer input lines will be silently split */ + +#include +#include + +char *pname; + +main(argc, argv) +int argc; +char *argv[]; +{ + static WFDB_Anninfo ai; + static WFDB_Annotation annot; + WFDB_Frequency sps = 0.0; + double rr, t = 0.0, xfactor = 1.0; + static char line[MAXLINELEN]; + char annstr[10], *p, *record = NULL, *prog_name(); + int i, Tflag = 0; + void help(); + extern double atof(); + + pname = prog_name(argv[0]); + + /* Interpret command-line options. */ + for (i = 1; i < argc; i++) { + if (*argv[i] == '-') switch (*(argv[i]+1)) { + case 'a': /* annotator follows */ + if (++i >= argc) { + (void)fprintf(stderr, "%s: annotator must follow -a\n", + pname); + exit(1); + } + ai.name = argv[i]; + break; + case 'F': /* sampling frequency in Hz */ + if (++i >= argc || (sps = (WFDB_Frequency)atof(argv[i])) <= 0.0) { + (void)fprintf(stderr, + "%s: sampling frequency (> 0) must follow -F\n", + pname); + exit(1); + } + break; + case 'h': /* print usage summary and quit */ + help(); + exit(0); + break; + case 'r': /* record name follows */ + if (++i >= argc) { + (void)fprintf(stderr, + "%s: record name must follow -r\n", + pname); + exit(1); + } + record = argv[i]; + break; + case 'T': /* data are times of occurrence, not RR intervals */ + Tflag = 1; + break; + case 'x': /* multiplier to convert input to sample intervals */ + if (++i >= argc || (xfactor = atof(argv[i])) <= 0.0) { + (void)fprintf(stderr, + "%s: an input multiplier (> 0) must follow -x\n", + pname); + exit(1); + } + break; + default: + (void)fprintf(stderr, "%s: unrecognized option %s\n", + pname, argv[i]); + exit(1); + } + else { + (void)fprintf(stderr, "%s: unrecognized argument %s\n", + pname, argv[i]); + exit(1); + } + } + if (record == NULL || ai.name == NULL) { + help(); + exit(1); + } + + /* sampfreq is likely to fail, since the header probably doesn't exist. + Suppress its error message. */ + wfdbquiet(); + if (sampfreq(record) <= 0.0) { + wfdbverbose(); /* re-enable error reporting */ + if (sps == 0.0) sps = WFDB_DEFFREQ; + setsampfreq(sps); + if (newheader(record) < 0) + exit(2); + } + else { + wfdbverbose(); /* re-enable error reporting */ + if (sps != 0.0) + fprintf(stderr, + "%s (warning): -F option ignored (using %g for sampling frequency)\n", + pname, sampfreq(NULL)); + } + + ai.stat = WFDB_WRITE; + if (annopen(record, &ai, 1) < 0) /* open annotation file */ + exit(3); + annot.anntyp = NORMAL; + + /* Read input, write an annotation for each line beginning with a positive + number. */ + while (fgets(line, sizeof(line), stdin) != NULL) { + if (sscanf(line, "%lf", &rr) == 0) continue; + if (rr <= 0.0) continue; + else if (Tflag) t = rr * xfactor; + else t += rr * xfactor; + annot.time = (WFDB_Time)(t + 0.5); + (void)putann(0, &annot); + } + + /* Flush buffered output. */ + wfdbquit(); + exit(0); +} + +char *prog_name(s) +char *s; +{ + char *p = s + strlen(s); + +#ifdef MSDOS + while (p >= s && *p != '\\' && *p != ':') { + if (*p == '.') + *p = '\0'; /* strip off extension */ + if ('A' <= *p && *p <= 'Z') + *p += 'a' - 'A'; /* convert to lower case */ + p--; + } +#else + while (p >= s && *p != '/') + p--; +#endif + return (p+1); +} + +static char *help_strings[] = { + "usage: %s -r RECORD -a ANNOTATOR [OPTIONS ...] #include +#include #define MAXR 100 @@ -66,7 +67,7 @@ { static WFDB_Anninfo ai; WFDB_Annotation annot; - int i, rhythm = 0, noise = 2; + int i, rhythm = 0, noise = 2, qflag = 0; static long tab[64], rtab[MAXR], ntab[6]; static long rtime[MAXR], ntime[6], r0, n0, from_time, to_time; char *record = NULL, *prog_name(); @@ -106,6 +107,9 @@ help(); exit(0); break; + case 'q': /* list only QRS annotations in event table */ + qflag = 1; + break; case 'r': /* input record name follows */ if (++i >= argc) { (void)fprintf(stderr, @@ -235,7 +239,7 @@ ntime[noise] += to_time - n0; } for (i = 0; i < 64; i++) - if (tab[i] != 0L) + if (tab[i] != 0L && (qflag == 0 || isqrs(i))) (void)printf("%s\t%6ld\n", annstr(i), tab[i]); (void)printf("\n"); for (i = 1; i <= MAXR; i++) @@ -277,6 +281,7 @@ "where RECORD and ANNOTATOR specify the input, and OPTIONS may include:", " -f TIME start at specified TIME", " -h print this usage summary", + " -q list only QRS annotations in the event table", " -t TIME stop at specified TIME", NULL }; diff -Naur wfdb-10.1.5/app/xform.c wfdb-10.1.6/app/xform.c --- wfdb-10.1.5/app/xform.c Mon Apr 10 09:22:27 2000 +++ wfdb-10.1.6/app/xform.c Mon Feb 26 14:04:09 2001 @@ -1,5 +1,5 @@ /* file: xform.c G. Moody 8 December 1983 - Last revised: 10 April 2000 + Last revised: 26 February 2001 ------------------------------------------------------------------------------- xform: Sampling frequency, amplitude, and format conversion for WFDB records @@ -543,21 +543,8 @@ the changes effective, the output signals must be (re)opened using osigfopen. */ if (nrec && use_irec_desc) { - char *p; - - for (i = 0; i < nosig; i++) { + for (i = 0; i < nosig; i++) dfout[i].desc = dfin[siglist[i]].desc; - /* If the filenames were obtained from osigopen, they must be - copied (since osigfopen returns the storage allocated for them - by osigopen to the heap). */ - if ((p = (char *)malloc((unsigned)strlen(dfout[i].fname)+1)) == - (char *)NULL) { - (void)fprintf(stderr, "%s: out of memory\n", pname); - exit(2); - } - (void)strcpy(p, dfout[i].fname); - dfout[i].fname = p; - } reopen = 1; } @@ -619,8 +606,40 @@ } /* Reopen output signals if necessary. */ - if (reopen && osigfopen(dfout, (unsigned)nosig) != nosig) + if (reopen) { + /* Copy all strings that may be deallocated by osigfopen. */ + for (i = 0; i < nosig; i++) { + char *p; + + if ((p = (char *)malloc((unsigned)strlen(dfout[i].fname)+1)) == + (char *)NULL) { + (void)fprintf(stderr, "%s: out of memory\n", pname); + exit(2); + } + (void)strcpy(p, dfout[i].fname); + dfout[i].fname = p; + if (dfout[i].units) { + if ((p = (char *)malloc((unsigned)strlen(dfout[i].units)+1)) == + (char *)NULL) { + (void)fprintf(stderr, "%s: out of memory\n", pname); + exit(2); + } + (void)strcpy(p, dfout[i].units); + dfout[i].units = p; + } + if (dfout[i].desc) { + if ((p = (char *)malloc((unsigned)strlen(dfout[i].desc)+1)) == + (char *)NULL) { + (void)fprintf(stderr, "%s: out of memory\n", pname); + exit(2); + } + (void)strcpy(p, dfout[i].desc); + dfout[i].desc = p; + } + } + if (osigfopen(dfout, (unsigned)nosig) != nosig) exit(2); + } /* Determine the legal range of sample values for each output signal. */ for (i = 0; i < nosig; i++) { diff -Naur wfdb-10.1.5/check-manifest wfdb-10.1.6/check-manifest --- wfdb-10.1.5/check-manifest Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.6/check-manifest Tue Jul 17 11:40:25 2001 @@ -0,0 +1,36 @@ +#!/bin/sh + +PACKAGE=$1 +sort <../${PACKAGE}-MANIFEST >../sort.$$ +mv ../sort.$$ ../${PACKAGE}-MANIFEST +if diff MANIFEST ../${PACKAGE}-MANIFEST +then + cat <&1 | grep "no " >/dev/null ) +if ( which gcc 2>&1 | grep "no \|not " >/dev/null ) then - if (which cc 2>&1 | grep "no " >/dev/null ) + if (which cc 2>&1 | grep "no \|not " >/dev/null ) then echo "The WFDB software cannot be compiled, because there does not" echo "appear to be a C compiler installed on this system. Please" @@ -148,7 +151,7 @@ echo echo "Looking for libwww ..." -if ( which libwww-config 2>&1 | grep "no " >/dev/null ) +if ( which libwww-config 2>&1 | grep "no \|not " >/dev/null ) then echo "The WFDB software will be compiled without NETFILES access, because" echo "libwww does not appear to be installed on this system." @@ -197,7 +200,18 @@ echo echo "Looking for the XView libraries ..." -if ( which textedit 2>&1 | grep "no " >/dev/null ) +if [ -d /usr/openwin -o -d /usr/local/openwin -o -d /opt/openwin ] +then + WAVE=1; +else + if ( which textedit 2>&1 | grep "no \|not " >/dev/null ) + then + WAVE=0; + else + WAVE=1; + fi +fi +if [ $WAVE = 0 ] then echo "WAVE will not be compiled, because the XView libraries do not" echo "appear to be installed on this system." @@ -212,7 +226,7 @@ echo echo "Looking for perl ..." -if ( which perl 2>&1 | grep "no " >/dev/null ) +if ( which perl 2>&1 | grep "no \|not " >/dev/null ) then echo "The texi2html utility, which can be used to prepare some on-line" echo "documentation in HTML form, requires perl, which does not appear" diff -Naur wfdb-10.1.5/convert/Makefile wfdb-10.1.6/convert/Makefile --- wfdb-10.1.5/convert/Makefile Wed Jun 7 00:12:25 2000 +++ wfdb-10.1.6/convert/Makefile Wed Aug 1 10:28:34 2001 @@ -33,12 +33,12 @@ # type `make listing'. # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 6 June 2000 +# Last revised: 28 February 2001 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 1 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # VDEFS is the set of C compiler options needed to set version number variables @@ -46,6 +46,7 @@ VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) # _____________________________________________________________________________ +PACKAGE=wfdb-10.1.6 # file: linux.def G. Moody 31 May 2000 # Last revised: 5 June 2000 # 'make' definitions for compiling the WFDB Software Package under Linux @@ -179,12 +180,12 @@ # `make' or `make install': build and install applications, clean up install: $(BINDIR) all - cp $(XFILES) $(BINDIR) - cd $(BINDIR); $(SETXPERMISSIONS) $(XFILES) + $(SETXPERMISSIONS) $(XFILES) + ../install.sh $(BINDIR) $(XFILES) $(MAKE) clean uninstall: - ../uninstall $(BINDIR) $(XFILES) + ../uninstall.sh $(BINDIR) $(XFILES) # `make clean': remove intermediate and backup files clean: diff -Naur wfdb-10.1.5/convert/a2m.c wfdb-10.1.6/convert/a2m.c --- wfdb-10.1.5/convert/a2m.c Sun Jan 30 04:13:17 2000 +++ wfdb-10.1.6/convert/a2m.c Tue Feb 13 13:40:23 2001 @@ -1,5 +1,5 @@ /* file: a2m.c G. Moody 9 June 1983 - Last revised: 17 June 1999 + Last revised: 13 February 2001 ------------------------------------------------------------------------------- a2m: Convert an AHA format annotation file to MIT format @@ -81,7 +81,7 @@ long offset = 0L; unsigned int nann = 2; WFDB_Anninfo afarray[2]; - WFDB_Annotation annot; + static WFDB_Annotation annot; void help(); /* Read and interpret command-line arguments. */ diff -Naur wfdb-10.1.5/convert/edf2mit.c wfdb-10.1.6/convert/edf2mit.c --- wfdb-10.1.5/convert/edf2mit.c Sun Jan 30 04:13:17 2000 +++ wfdb-10.1.6/convert/edf2mit.c Sun Jul 29 16:37:17 2001 @@ -1,9 +1,9 @@ /* file: edf2mit.c G. Moody 16 October 1996 - Last revised: 7 May 1999 + Last revised: 29 July 2001 ------------------------------------------------------------------------------- Convert EDF (European Data Format) file to MIT format header and signal files -Copyright (C) 1999 George B. Moody +Copyright (C) 2001 George B. Moody This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -36,26 +36,30 @@ { static FILE *ifile; static char buf[81], record[20]; - int fpb, h, i, j, k, l, nsig, nosig = 0, siglist[WFDB_MAXSIG], spr, - spb[WFDB_MAXSIG], tspb = 0, tspf = 0, vflag = 0; + int big_endian = 0, fpb, h, i, j, k, l, nsig, nosig = 0, + siglist[WFDB_MAXSIG], spb[WFDB_MAXSIG], tspb = 0, tspf = 0, + vflag = 0; char **vi, **vin; WFDB_Sample *vo, *vout; int day, month, year, hour, minute, second; long adcrange, sigdmax[WFDB_MAXSIG], sigdmin[WFDB_MAXSIG]; double sigpmax[WFDB_MAXSIG], sigpmin[WFDB_MAXSIG], sampfreq[WFDB_MAXSIG], - sps; + spr, sps; static WFDB_Siginfo si[WFDB_MAXSIG], so[WFDB_MAXSIG]; void help(); pname = argv[0]; for (i = 1; i < argc; i++) { if (*argv[i] == '-') switch (argv[i][1]) { + case 'b': /* input is in big-endian byte order */ + big_endian = 1; + break; case 'h': /* show usage and quit */ help(); exit(0); case 'i': /* file name follows */ if (++i < argc) { - if (strcmp(argv[i], "-")) + if (!strcmp(argv[i], "-")) ifile = stdin; else { ifile = fopen(argv[i], "rb"); @@ -152,8 +156,8 @@ for (j = 8; j >= 0 && buf[j] == ' '; j--) buf[j] = '\0'; if (vflag) printf("Duration of each data record in seconds: '%s'\n", buf); - sscanf(buf, "%d", &spr); - if (spr < 1) spr = 1; + sscanf(buf, "%lf", &spr); + if (spr <= 0.0) spr = 1.0; fread(buf, 1, 4, ifile); buf[4] = ' '; @@ -307,6 +311,36 @@ so[i] = si[siglist[i]]; } + if (vflag) + printf("\nOUTPUT:\nBase sampling frequency: %g Hz\n", sps); + + for (i = j = k = 0; i < nosig; i++) { + if ((j = si[siglist[i]].spf) > k) + k = j; + if (vflag) + printf(" Signal %d samples per second: %g (%d sample%s per frame)\n", + i, sampfreq[siglist[i]], j, j > 1 ? "s" : ""); + } + if (k > WFDB_MAXSPF) { + fprintf(stderr, "%s: too many samples of signal %d per frame\n\n", + pname, i); + fprintf(stderr, +" There can be at most %d samples per signal per frame, and you would need\n", + WFDB_MAXSPF); + fprintf(stderr, +" at least %d samples per signal per frame in order to convert this record.\n", + k); + fprintf(stderr, +"\n You may avoid this problem by using the '-s' option to exclude one or\n"); + fprintf(stderr, +" more signals, or you can change WFDB_MAXSPF to a value of %d or more\n", k); + fprintf(stderr, +" in wfdb.h, and then recompile the WFDB library and any applications\n"); + fprintf(stderr, +" that depend on WFDB_MAXSPF, including this one.\n\n"); + exit(2); + } + vin = (char **)malloc(nsig * sizeof(char *)); vi = (char **)malloc(nsig * sizeof(char *)); for (i = 0; i < nsig; i++) { @@ -325,8 +359,14 @@ vo = vout; for (j = 0; j < nosig; j++) for (k = 0; k < so[j].spf; k++) { - h = *vi[siglist[j]]++; /* high byte first */ - l = *vi[siglist[j]]++; /* then low byte */ + if (big_endian) { + h = *vi[siglist[j]]++; /* high byte first */ + l = *vi[siglist[j]]++; /* then low byte */ + } + else { + l = *vi[siglist[j]]++; /* low byte first */ + h = *vi[siglist[j]]++; /* then high byte */ + } /* If a short int is not 16 bits, it may be necessary to modify the next line for proper sign extension. */ *vo++ = ((int)((short)((h << 8) | (l &0xff)))); @@ -343,6 +383,7 @@ static char *help_strings[] = { "usage: %s [OPTIONS ...]\n", "where OPTIONS may include:", + " -b input is in big-endian byte order (default: little-endian)", " -h print this usage summary", " -i EDFILE read the specified European Data Format file", " -r RECORD create the specified RECORD (default: use patient id)", diff -Naur wfdb-10.1.5/convert/m2a.c wfdb-10.1.6/convert/m2a.c --- wfdb-10.1.5/convert/m2a.c Sun Jan 30 04:13:17 2000 +++ wfdb-10.1.6/convert/m2a.c Thu Apr 26 12:46:06 2001 @@ -1,9 +1,9 @@ /* file: m2a.c G. Moody 9 June 1983 - Last revised: 7 May 1999 + Last revised: 26 April 2001 ------------------------------------------------------------------------------- m2a: Convert MIT format annotation files to AHA DB distribution tape format -Copyright (C) 1999 George B. Moody +Copyright (C) 2001 George B. Moody This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -106,7 +106,7 @@ afarray[0].name = ianame; afarray[0].stat = WFDB_READ; afarray[1].name = oaname; afarray[1].stat = WFDB_AHA_WRITE; - if (annopen(argv[1], afarray, 2) < 0) /* open files */ + if (annopen(record, afarray, 2) < 0) /* open files */ exit(2); if (shift == NULL) while (getann(0, &annot) >= 0) /* copy annotations to end of data */ diff -Naur wfdb-10.1.5/convert/md2a.c wfdb-10.1.6/convert/md2a.c --- wfdb-10.1.5/convert/md2a.c Sun Jan 30 04:13:17 2000 +++ wfdb-10.1.6/convert/md2a.c Thu Apr 26 12:46:10 2001 @@ -1,9 +1,9 @@ /* file: md2a.c G. Moody 19 July 1983 - Last revised: 7 May 1999 + Last revised: 26 April 2001 ------------------------------------------------------------------------------- md2a: Convert MIT format signal file(s) to AHA DB distribution tape format -Copyright (C) 1999 George B. Moody +Copyright (C) 2001 George B. Moody This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -107,7 +107,7 @@ } /* Give up unless at least one input signal is readable. */ - if ((nsig = isigopen(argv[1], s, WFDB_MAXSIG)) < 1) + if ((nsig = isigopen(record, s, WFDB_MAXSIG)) < 1) exit(2); /* Check that the new record name is legal before proceeding. Note that @@ -131,7 +131,7 @@ ; /* Write the new header file if requested. */ - if (nrec) (void)newheader(argv[3]); + if (nrec) (void)newheader(nrec); /* Write the end-of-data marker. */ for (i = 0; i < nsig; i++) diff -Naur wfdb-10.1.5/data/Makefile wfdb-10.1.6/data/Makefile --- wfdb-10.1.5/data/Makefile Wed Jun 7 00:12:25 2000 +++ wfdb-10.1.6/data/Makefile Wed Aug 1 10:28:34 2001 @@ -33,12 +33,12 @@ # listing'. # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 6 June 2000 +# Last revised: 28 February 2001 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 1 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # VDEFS is the set of C compiler options needed to set version number variables @@ -46,6 +46,7 @@ VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) # _____________________________________________________________________________ +PACKAGE=wfdb-10.1.6 # file: linux.def G. Moody 31 May 2000 # Last revised: 5 June 2000 # 'make' definitions for compiling the WFDB Software Package under Linux @@ -174,7 +175,7 @@ -cd $(DBDIR); ln -sf wfdbcal dbcal uninstall: - ../uninstall $(DBDIR) $(DBFILES) dbcal + ../uninstall.sh $(DBDIR) $(DBFILES) dbcal $(DBDIR): mkdir $(DBDIR); $(SETDPERMISSIONS) $(DBDIR) diff -Naur wfdb-10.1.5/doc/Makefile wfdb-10.1.6/doc/Makefile --- wfdb-10.1.5/doc/Makefile Wed Jun 7 00:12:25 2000 +++ wfdb-10.1.6/doc/Makefile Wed Aug 1 10:28:34 2001 @@ -101,12 +101,12 @@ # all freely available (see `../SOURCES'). # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 6 June 2000 +# Last revised: 28 February 2001 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 1 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # VDEFS is the set of C compiler options needed to set version number variables @@ -114,6 +114,7 @@ VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) # _____________________________________________________________________________ +PACKAGE=wfdb-10.1.6 # file: linux.def G. Moody 31 May 2000 # Last revised: 5 June 2000 # 'make' definitions for compiling the WFDB Software Package under Linux @@ -227,8 +228,8 @@ lib-post-uninstall: echo "Nothing to be done for lib-post-uninstall" # _____________________________________________________________________________ -# file: Makefile.tpl G. Moody 24 May 2000 -# Last revised: 5 June 2000 +# file: Makefile.tpl G. Moody 24 May 2000 +# Last revised: 12 December 2000 # Change the settings below as appropriate for your setup. # DOSCHK is a command for checking file and directory names within the current @@ -239,7 +240,7 @@ # DOSCHK = # D2PARGS is a list of options for dvips. Uncomment one of these to set the -# paper size: +# paper size ("a4" is most common except in the US and Canada): # D2PARGS = -t a4 D2PARGS = -t letter @@ -264,8 +265,10 @@ # via the name given in its second argument. If your system supports symbolic # links, uncomment the next line. LN = ln -s -# Otherwise uncomment the next line. +# Otherwise uncomment the next line if your system supports hard links. # LN = ln +# If your system doesn't support links at all, copy files instead. +# LN = cp # If you wish to install the info (GNU hypertext documentation) files from this # package, specify the command needed to format them from the texinfo source @@ -338,6 +341,7 @@ $(LN) $(MAN1)/a2m.1 $(MAN1)/ad2m.1 $(LN) $(MAN1)/a2m.1 $(MAN1)/m2a.1 $(LN) $(MAN1)/a2m.1 $(MAN1)/md2a.1 + $(LN) $(MAN1)/ann2rr.1 $(MAN1)/rr2ann.1 $(LN) $(MAN1)/hrfft.1 $(MAN1)/hrlomb.1 $(LN) $(MAN1)/hrfft.1 $(MAN1)/hrmem.1 $(LN) $(MAN1)/hrfft.1 $(MAN1)/hrplot.1 @@ -346,10 +350,10 @@ $(LN) $(MAN1)/view.1 $(MAN1)/vsetup.1 uninstall: - ../uninstall $(MAN1) *.1 ad2m.1 m2a.1 md2a.1 hrlomb.1 hrmem.1 \ - hrplot.1 plot3d.1 cshsetwfdb.1 vsetup.1 - ../uninstall $(MAN3) *.3 - ../uninstall $(MAN5) *.5 + ../uninstall.sh $(MAN1) *.1 ad2m.1 ann2rr.1 m2a.1 md2a.1 hrlomb.1 \ + hrmem.1 hrplot.1 plot3d.1 cshsetwfdb.1 vsetup.1 + ../uninstall.sh $(MAN3) *.3 + ../uninstall.sh $(MAN5) *.5 # Create directories for installation if necessary. $(MAN1): diff -Naur wfdb-10.1.5/doc/Makefile.tpl wfdb-10.1.6/doc/Makefile.tpl --- wfdb-10.1.5/doc/Makefile.tpl Wed Jun 7 16:48:52 2000 +++ wfdb-10.1.6/doc/Makefile.tpl Tue Dec 12 13:15:59 2000 @@ -1,5 +1,5 @@ -# file: Makefile.tpl G. Moody 24 May 2000 -# Last revised: 5 June 2000 +# file: Makefile.tpl G. Moody 24 May 2000 +# Last revised: 12 December 2000 # Change the settings below as appropriate for your setup. # DOSCHK is a command for checking file and directory names within the current @@ -10,7 +10,7 @@ # DOSCHK = # D2PARGS is a list of options for dvips. Uncomment one of these to set the -# paper size: +# paper size ("a4" is most common except in the US and Canada): # D2PARGS = -t a4 D2PARGS = -t letter @@ -35,8 +35,10 @@ # via the name given in its second argument. If your system supports symbolic # links, uncomment the next line. LN = ln -s -# Otherwise uncomment the next line. +# Otherwise uncomment the next line if your system supports hard links. # LN = ln +# If your system doesn't support links at all, copy files instead. +# LN = cp # If you wish to install the info (GNU hypertext documentation) files from this # package, specify the command needed to format them from the texinfo source @@ -109,6 +111,7 @@ $(LN) $(MAN1)/a2m.1 $(MAN1)/ad2m.1 $(LN) $(MAN1)/a2m.1 $(MAN1)/m2a.1 $(LN) $(MAN1)/a2m.1 $(MAN1)/md2a.1 + $(LN) $(MAN1)/ann2rr.1 $(MAN1)/rr2ann.1 $(LN) $(MAN1)/hrfft.1 $(MAN1)/hrlomb.1 $(LN) $(MAN1)/hrfft.1 $(MAN1)/hrmem.1 $(LN) $(MAN1)/hrfft.1 $(MAN1)/hrplot.1 @@ -117,8 +120,8 @@ $(LN) $(MAN1)/view.1 $(MAN1)/vsetup.1 uninstall: - ../uninstall.sh $(MAN1) *.1 ad2m.1 m2a.1 md2a.1 hrlomb.1 hrmem.1 \ - hrplot.1 plot3d.1 cshsetwfdb.1 vsetup.1 + ../uninstall.sh $(MAN1) *.1 ad2m.1 ann2rr.1 m2a.1 md2a.1 hrlomb.1 \ + hrmem.1 hrplot.1 plot3d.1 cshsetwfdb.1 vsetup.1 ../uninstall.sh $(MAN3) *.3 ../uninstall.sh $(MAN5) *.5 diff -Naur wfdb-10.1.5/doc/ann2rr.1 wfdb-10.1.6/doc/ann2rr.1 --- wfdb-10.1.5/doc/ann2rr.1 Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.6/doc/ann2rr.1 Mon Feb 19 12:41:45 2001 @@ -0,0 +1,114 @@ +.TH ANN2RR 1 "19 February 2001" "WFDB software 10.2" "WFDB applications" +.SH NAME +ann2rr, rr2ann \- convert annotation files to interval lists and vice versa +.SH SYNOPSIS +\fBann2rr -r \fIrecord\fB -a \fIannotator\fR [ \fIoptions\fR ... ] +.br +\fBrr2ann -r \fIrecord\fB -a \fIannotator\fR [ \fIoptions\fR ... ] +.SH DESCRIPTION +These programs are typically used to obtain RR interval series from ECG +annotation files, or to create an annotation file from such a series, but +they have a wider range of uses. +.PP +Use \fBann2rr\fR to extract a list of intervals, in text format, from an +annotation file. By default, the intervals are listed in units of sample +intervals (use \fBsampfreq\fR(1) to determine the sampling frequency of the +input record if necessary). Options for \fBann2rr\fR include: +.TP +\fB-c\fR +Print intervals between consecutive valid annotations only. (See discussion +below). +.TP +\fB-f\fI time\fR +Begin at the specified \fItime\fR. By default, \fIann2rr\fR starts at the +beginning of the record. +.TP +\fB-h\fR +Print a usage summary. +.TP +\fB-p\fI type\fR [ \fItype\fR ... ] +Print intervals between annotations of the specified \fItypes\fR only. +The \fItype\fR arguments should be annotation mnemonics (e.g., \fBN\fR), +as normally printed by \fIrdann\fR(1) in the third column. More than one +\fB-p\fR option may be used in a single command, and each \fB-p\fR option may +have more than one \fItype\fR argument following it. If \fItype\fR begins +with ``-'', however, it must immediately follow \fB-p\fR (standard annotation +mnemonics do not begin with ``-'', but modification labels in an annotation +file may define such mnemonics). +.TP +\fB-t\fI time\fR +Stop at the specified \fItime\fR. +.TP +\fB-v\fR +Print elapsed times as well as intervals. +.TP +\fB-x\fR +.TP +\fB-xs\fR +Use an alternate time format for output (times and intervals in seconds +rather than sample intervals). +.TP +\fB-xh\fR +Use a different alternate format (times in hours, intervals in seconds). +.TP +\fB-xm\fR +Use a different alternate format (times in minutes, intervals in seconds). + + +.PP +The \fB-c\fR option, used without the \fB-p\fR option, causes \fBann2rr\fR to +filter out intervals between beats that have intervening non-beat annotations, +such as rhythm or signal quality change annotations. Used with the \fB-p\fR +option, the \fB-c\fR option causes \fBann2rr\fR to reject intervals between +annotations of the type(s) specified by \fB-p\fR if there are annotations of +any other types intervening; thus, for example, the combination of \fB-c\fR +and \fB-p N\fR would yield only intervals between consecutive normal beats, +and intervals between pairs of normal beats surrounding an ectopic beat would +be discarded from the output. +.PP +Use \fBrr2ann\fR to create an annotation file from the standard input, which +should usually be a list of intervals in the format produced by \fBann2rr\fR. +(For exceptions, see \fB-T\fR and \fB-x\fR below.) Only +the first token on each line is taken as an interval; anything else on the +same line is ignored, as are empty lines, spaces and tabs at the beginning of +a line, non-numeric tokens and anything following them on the same line, negative +intervals, and zero intervals. The output consists of a binary annotation +file (\fIrecord\fR.\fIannotator\fR), and (if it does not exist already, a text +header file (\fIrecord\fR.hea). Options for \fBrr2ann\fR include: +.TP +\fB-F\fI frequency\fR +Assume the specified sampling \fIfrequency\fR. This option has no effect unless +it is necessary for \fBrr2ann\fR to create a header file; in this case, a sampling +frequency of 250 Hz is assumed if the \fB-F\fB option is omitted. +.TP +\fB-h\fR +Print a usage summary. +.TP +\fB-T\fR +Interpret the input as times of occurrence, rather than as intervals. +.TP +\fB-x\fI n\fR +Multiply input by \fIn\fR to obtain intervals (or, if \fB-T\fR is also used, +times of occurrence) in units of sample intervals). Default: \fIn\fR = 1. +.PP +Note that \fBwrann\fR(1) also provides a way to generate an annotation file from +text. Unlike that of \fBrr2ann\fR, \fBwrann\fR's input format permits specifying +annotation types and other fields in addition to the times of occurrence. +.PP +The shell variable \fBWFDB\fR should be set and exported (see +\fIsetwfdb\fR(1)). +.SH FILES +.TP 22 +\fIrecord\fR.hea +header file +.TP 22 +\fIrecord\fR.\fIannotator\fR +annotation file +.SH SEE ALSO +rdann(1), sampfreq(1), setwfdb(1), wrann(1) +.SH AUTHOR +George B. Moody (george@mit.edu) +.SH SOURCE +http://www.physionet.org/physiotools/wfdb/app/ann2rr.c +.br +http://www.physionet.org/physiotools/wfdb/app/rr2ann.c diff -Naur wfdb-10.1.5/doc/appguide.int wfdb-10.1.6/doc/appguide.int --- wfdb-10.1.5/doc/appguide.int Wed May 24 16:33:52 2000 +++ wfdb-10.1.6/doc/appguide.int Tue Dec 12 13:38:03 2000 @@ -1,5 +1,5 @@ \" file: appguide.int G. Moody July 1989 -\" Last revised: 24 May 2000 +\" Last revised: 12 December 2000 \" Table of contents and introduction to the WFDB Applications Guide. \" \" To print this document using GNU groff, use: @@ -31,65 +31,67 @@ \fBSection 1: Applications\fP a2m, ad2m, m2a, md2a utilities for converting between MIT and AHA DB formats 1 -bxb ANSI/AAMI-standard beat-by-beat annotation comparator 4 -calsig calibrate signals of a DB record 6 -coherence estimate coherence and cross-spectrum of two time series 8 -ecgeval generate and run ECG analyzer evaluation script 9 -epic ANSI/AAMI-standard episode-by-episode annotation comparator 10 -fft fast Fourier transform 12 -fir general-purpose FIR filter for WFDB records 14 -hrfft, hrlomb, hrmem, hrplot calculate and plot heart rate power spectra 16 -ihr calculate instantaneous heart rate 18 -log10 calculate common logarithms of two-column data 19 -lomb estimate power spectrum using the Lomb periodogram method 20 -memse estimate power spectrum using maximum entropy (all poles) method 21 -mfilt general-purpose median filter for WFDB records 23 -mrgann merge annotation files 24 -mxm ANSI/AAMI-standard measurement-by-measurement comparator 26 -nst noise stress test for ECG analysis programs 28 -plot2d, plot3d make 2-D or 3-D plots from text files of data, using \fIgnuplot\fR 31 -plotstm produce scatter plot of ST measurement errors on a PostScript device 33 -pschart produce annotated `chart recordings' on a PostScript device 34 -psfd produce annotated `full-disclosure' plots on a PostScript device 38 -rdann read a WFDB annotation file 42 -rdsamp read WFDB signal files 44 -rxr ANSI/AAMI-standard run-by-run annotation comparator 45 -sample digitize and replay analog signals (MS-DOS only) 47 -setwfdb, cshsetwfdb set WFDB environment variables 51 -sigamp measure signal amplitudes of a WFDB record 53 -skewedit edit skew fields of header file(s) 54 -snip copy an excerpt of a WFDB record 55 -sortann rearrange annotations in canonical order 56 -sqrs single-channel QRS detector 58 -sumann summarize the contents of a WFDB annotation file 60 -sumstats derive aggregate statistics from bxb, rxr, etc., line-format output 61 -tach heart rate tachometer 62 -view, vsetup WFDB browser for MS-DOS 64 -wave waveform analyzer, viewer, and editor for the X Window System 67 -wfdbcat copy WFDB records to standard output 77 -wfdbcollate collate WFDB records into a multi-segment record 78 -wfdbdesc read signal specifications 80 -wfdbwhich find a WFDB file and print its pathname 81 -wrann write a WFDB annotation file 82 -wrsamp write WFDB signal files 83 -wview WFDB browser for MS Windows 85 -xform sampling frequency, amplitude, and format conversion for WFDB records 89 +ann2rr, rr2aaann convert annotation files to interval lists and vice versa 4 +bxb ANSI/AAMI-standard beat-by-beat annotation comparator 6 +calsig calibrate signals of a DB record 8 +coherence estimate coherence and cross-spectrum of two time series 10 +ecgeval generate and run ECG analyzer evaluation script 11 +epic ANSI/AAMI-standard episode-by-episode annotation comparator 12 +fft fast Fourier transform 14 +fir general-purpose FIR filter for WFDB records 16 +hrfft, hrlomb, hrmem, hrplot calculate and plot heart rate power spectra 18 +ihr calculate instantaneous heart rate 20 +log10 calculate common logarithms of two-column data 21 +lomb estimate power spectrum using the Lomb periodogram method 22 +memse estimate power spectrum using maximum entropy (all poles) method 23 +mfilt general-purpose median filter for WFDB records 25 +mrgann merge annotation files 26 +mxm ANSI/AAMI-standard measurement-by-measurement comparator 28 +nst noise stress test for ECG analysis programs 30 +plot2d, plot3d make 2-D or 3-D plots from text files of data, using \fIgnuplot\fR 33 +plotstm produce scatter plot of ST measurement errors on a PostScript device 35 +pschart produce annotated `chart recordings' on a PostScript device 36 +psfd produce annotated `full-disclosure' plots on a PostScript device 40 +rdann read a WFDB annotation file 44 +rdsamp read WFDB signal files 46 +rxr ANSI/AAMI-standard run-by-run annotation comparator 47 +sampfreq show sampling frequency for a record 49 +sample digitize and replay analog signals (MS-DOS only) 50 +setwfdb, cshsetwfdb set WFDB environment variables 54 +sigamp measure signal amplitudes of a WFDB record 56 +skewedit edit skew fields of header file(s) 57 +snip copy an excerpt of a WFDB record 58 +sortann rearrange annotations in canonical order 59 +sqrs single-channel QRS detector 61 +sumann summarize the contents of a WFDB annotation file 63 +sumstats derive aggregate statistics from bxb, rxr, etc., line-format output 64 +tach heart rate tachometer 65 +view, vsetup WFDB browser for MS-DOS 67 +wave waveform analyzer, viewer, and editor for the X Window System 70 +wfdbcat copy WFDB records to standard output 80 +wfdbcollate collate WFDB records into a multi-segment record 81 +wfdbdesc read signal specifications 83 +wfdbwhich find a WFDB file and print its pathname 84 +wrann write a WFDB annotation file 85 +wrsamp write WFDB signal files 86 +wview WFDB browser for MS Windows 87 +xform sampling frequency, amplitude, and format conversion for WFDB records 92 \fBSection 3: WFDB library\fP -wfdb Waveform Database library 91 +wfdb Waveform Database library 94 \fBSection 5: WFDB file formats\fP -annot WFDB annotation file formats 94 -header WFDB header file format 95 -signal WFDB signal file formats 102 -wfdbcal WFDB calibration file format 104 +annot WFDB annotation file formats 97 +header WFDB header file format 98 +signal WFDB signal file formats 105 +wfdbcal WFDB calibration file format 107 \fBAppendices\fP - \fIInstalling the WFDB Software Package\fP 106 - \fIEvaluating ECG Analyzers\fP 109 + \fIInstalling the WFDB Software Package\fP 109 + \fIEvaluating ECG Analyzers\fP 112 .TE .LP diff -Naur wfdb-10.1.5/doc/dbag.ht0 wfdb-10.1.6/doc/dbag.ht0 --- wfdb-10.1.5/doc/dbag.ht0 Wed Aug 16 16:15:41 2000 +++ wfdb-10.1.6/doc/dbag.ht0 Tue Dec 12 13:19:50 2000 @@ -57,6 +57,8 @@
  • a2m, ad2m, m2a, md2a: utilities for converting between MIT and AHA DB formats +
  • ann2rr, rr2ann: convert annotation files to + interval lists and vice versa
  • bxb: ANSI/AAMI-standard beat-by-beat annotation comparator
  • calsig: calibrate signals of a WFDB record @@ -95,6 +97,7 @@
  • rdsamp: read WFDB signal files
  • rxr: ANSI/AAMI-standard run-by-run annotation comparator +
  • sampfreq: show sampling frequency for a record
  • sample: digitize and replay analog signals (MS-DOS only)
  • setwfdb, cshsetwfdb: set WFDB environment diff -Naur wfdb-10.1.5/doc/dbu.tex wfdb-10.1.6/doc/dbu.tex --- wfdb-10.1.5/doc/dbu.tex Wed May 24 16:32:43 2000 +++ wfdb-10.1.6/doc/dbu.tex Tue Dec 19 08:22:18 2000 @@ -4363,7 +4363,7 @@ @t{NESC j } Nodal (junctional) escape beat @t{SVESC n } Supraventricular escape beat (atrial or nodal) [1] @t{VESC E } Ventricular escape beat -@t{PACE P } Paced beat +@t{PACE / } Paced beat @t{PFUS f } Fusion of paced and normal beat @t{UNKNOWN Q } Unclassifiable beat @t{LEARN ? } Beat not classified during learning @@ -4655,7 +4655,7 @@ (@pxref{WFDB_Calinfo structures}). @end ifinfo The WFDB Software Package includes a standard calibration file, -@file{wfdbcal}, in the @file{udb} directory. +@file{wfdbcal}, in the @file{data} directory. @node AHA Format Files, Standard I/O, Calibration Files, Database Files @unnumberedsubsec AHA Format Files diff -Naur wfdb-10.1.5/doc/eval.tex wfdb-10.1.6/doc/eval.tex --- wfdb-10.1.5/doc/eval.tex Sat Mar 11 21:16:58 2000 +++ wfdb-10.1.6/doc/eval.tex Tue Dec 12 13:38:00 2000 @@ -9,7 +9,7 @@ \date{} \begin{document} -\setcounter{page}{109} +\setcounter{page}{112} \maketitle diff -Naur wfdb-10.1.5/doc/install.tex wfdb-10.1.6/doc/install.tex --- wfdb-10.1.5/doc/install.tex Sat Mar 11 21:17:11 2000 +++ wfdb-10.1.6/doc/install.tex Tue Dec 12 13:37:42 2000 @@ -9,7 +9,7 @@ \date{} \begin{document} -\setcounter{page}{106} +\setcounter{page}{109} \maketitle diff -Naur wfdb-10.1.5/doc/pschart.1 wfdb-10.1.6/doc/pschart.1 --- wfdb-10.1.5/doc/pschart.1 Sat May 20 22:21:59 2000 +++ wfdb-10.1.6/doc/pschart.1 Sat Jun 17 17:43:08 2000 @@ -1,4 +1,4 @@ -.TH PSCHART 1 "20 May 2000" "WFDB software 10.1.3" "WFDB applications" +.TH PSCHART 1 "17 June 2000" "WFDB software 10.1.5" "WFDB applications" .SH NAME pschart \- produce annotated `chart recordings' on a PostScript device .SH SYNOPSIS @@ -79,7 +79,14 @@ inclusion in another PostScript file. .TP \fB-g\fR -Print a 0.5 mV x 0.2 sec grid under each strip (default: no grid). +Print a 0.5 mV x 0.2 sec grid with 0.1 mV x 0.04 sec subticks under each strip +(default: no grid). This grid is drawn using the \fBgrid\fR procedure in +the prolog file (see \fBENVIRONMENT\fR below). +.TP +\fB-G\fR +Print a 0.5 mV x 0.2 sec grid without subticks under each strip +(default: no grid). This grid is drawn using the \fBGrid\fR procedure in +the prolog file (see \fBENVIRONMENT\fR below). .TP \fB-h\fR Print a usage summary. @@ -251,7 +258,8 @@ \fI/usr/local/lib/ps/12lead.pro\fR alternative PostScript prolog file, suitable for printing standard 12-lead diagnostic ECGs (10 seconds, 4 traces, with the top three traces divided into -2.5 second segments by marker bars). +2.5 second segments by marker bars). This file redefines the grid drawn by +the \fB-G\fR option (see the \fIGrid\fR procedure for details). .SH BUGS .PP High quality takes time. A full page, with grids and default scales, typically diff -Naur wfdb-10.1.5/doc/rdann.1 wfdb-10.1.6/doc/rdann.1 --- wfdb-10.1.5/doc/rdann.1 Sun Jan 30 04:13:18 2000 +++ wfdb-10.1.6/doc/rdann.1 Mon Feb 26 12:35:51 2001 @@ -1,4 +1,4 @@ -.TH RDANN 1 "11 January 2000" "WFDB software 10.0" "WFDB applications" +.TH RDANN 1 "26 February 2001" "WFDB software 10.1" "WFDB applications" .SH NAME rdann \- read a WFDB annotation file .SH SYNOPSIS @@ -18,6 +18,12 @@ \fB-c\fI chan\fR Print only those annotations with \fBchan\fR fields that match \fIchan\fR. .TP +\fB-e\fR +Print annotation times as elapsed times from the beginning of the record +(default: \fIrdann\rR prints absolute times if the absolute time of the +beginning of the record is defined, and elapsed times otherwise, unless +the \fB-x\fR option has been given). +.TP \fB-f\fI time\fR Begin at the specified \fItime\fR. By default, \fIrdann\fR starts at the beginning of the record; if modification labels are present, they are not @@ -64,6 +70,9 @@ is taken as the number of QRS annotations to be processed; note that not all of those processed will necessarily be printed, if the \fB-p\fR option is used to select only a subset of annotation types to be printed. +.PP +Note that the \fB-e\fR and \fB-x\fR options are mutually exclusive; if both +are given, only the last one is effective. .PP The shell variable \fBWFDB\fR should be set and exported (see \fIsetwfdb\fR(1)). diff -Naur wfdb-10.1.5/doc/sampfreq.1 wfdb-10.1.6/doc/sampfreq.1 --- wfdb-10.1.5/doc/sampfreq.1 Wed Dec 31 19:00:00 1969 +++ wfdb-10.1.6/doc/sampfreq.1 Tue Dec 12 12:40:59 2000 @@ -0,0 +1,24 @@ +.TH SAMPFREQ 1 "12 December 2000" "WFDB software 10.2" "WFDB applications" +.SH NAME +sampfreq \- show sampling frequency for a record +.SH SYNOPSIS +\fBsampfreq\fR [ \fB-H\fR ] \fIrecord \fR +.SH DESCRIPTION +This program shows the sampling frequency for the specified \fIrecord\fR. +By default, \fBsampfreq\fR shows the base sampling frequency (frame rate) +for multi-frequency records; if the \fB-H\fR option is present, +\fBsampfreq\fR shows the highest sampling frequency used for any signal +in a multi-frequency record. +.PP +The shell variable \fBWFDB\fR should be set and exported (see +\fIsetwfdb\fR(1)). +.SH FILES +.TP 22 +\fIrecord\fR.hea +header file +.SH SEE ALSO +setwfdb(1) +.SH AUTHOR +George B. Moody (george@mit.edu) +.SH SOURCE +http://www.physionet.org/physiotools/wfdb/app/sampfreq.c diff -Naur wfdb-10.1.5/doc/sumann.1 wfdb-10.1.6/doc/sumann.1 --- wfdb-10.1.5/doc/sumann.1 Sun Jan 30 04:13:19 2000 +++ wfdb-10.1.6/doc/sumann.1 Tue Dec 12 12:39:45 2000 @@ -1,4 +1,4 @@ -.TH SUMANN 1 "11 January 2000" "WFDB software 10.0" "WFDB applications" +.TH SUMANN 1 "12 December 2000" "WFDB software 10.2" "WFDB applications" .SH NAME sumann \- summarize the contents of a WFDB annotation file .SH SYNOPSIS @@ -16,6 +16,9 @@ .TP \fB-h\fR Print a usage summary. +.TP +\fB-q\fR +Summarize QRS annotations only. .TP \fB-t\fI time\fR Stop at the specified \fItime\fR. diff -Naur wfdb-10.1.5/examples/Makefile wfdb-10.1.6/examples/Makefile --- wfdb-10.1.5/examples/Makefile Wed Jun 7 00:12:25 2000 +++ wfdb-10.1.6/examples/Makefile Wed Aug 1 10:28:34 2001 @@ -34,12 +34,12 @@ # `make clean' to remove them. # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 6 June 2000 +# Last revised: 28 February 2001 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 1 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # VDEFS is the set of C compiler options needed to set version number variables @@ -47,6 +47,7 @@ VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) # _____________________________________________________________________________ +PACKAGE=wfdb-10.1.6 # file: linux.def G. Moody 31 May 2000 # Last revised: 5 June 2000 # 'make' definitions for compiling the WFDB Software Package under Linux diff -Naur wfdb-10.1.5/lib/Makefile wfdb-10.1.6/lib/Makefile --- wfdb-10.1.5/lib/Makefile Wed Jun 7 00:12:25 2000 +++ wfdb-10.1.6/lib/Makefile Wed Aug 1 10:28:34 2001 @@ -33,12 +33,12 @@ # type `make slib'. # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 6 June 2000 +# Last revised: 28 February 2001 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 1 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # VDEFS is the set of C compiler options needed to set version number variables @@ -172,11 +172,11 @@ $(MAKE) lib-post-install uninstall: - ../uninstall $(INCDIR)/wfdb $(HFILES) - ../uninstall $(INCDIR) - ../uninstall $(LIBDIR) $(WFDBLIB) + ../uninstall.sh $(INCDIR)/wfdb $(HFILES) + ../uninstall.sh $(INCDIR) + ../uninstall.sh $(LIBDIR) $(WFDBLIB) $(MAKE) lib-post-uninstall - ../uninstall $(LIBDIR) + ../uninstall.sh $(LIBDIR) # `make compat': install the includes needed for source compatibility with # applications written for pre-version 10.0.0 versions of this library diff -Naur wfdb-10.1.5/lib/signal.c wfdb-10.1.6/lib/signal.c --- wfdb-10.1.5/lib/signal.c Sun Jan 30 04:13:20 2000 +++ wfdb-10.1.6/lib/signal.c Tue Jul 17 11:09:21 2001 @@ -1,5 +1,5 @@ /* file: signal.c G. Moody 13 April 1989 - Last revised: 19 January 2000 wfdblib 10.1.1 + Last revised: 17 July 2001 wfdblib 10.1.6 WFDB library functions for signals _______________________________________________________________________________ @@ -242,11 +242,29 @@ segments = atoi(q+1); *q = '\0'; } + + /* For local files, be sure that the name (p) within the header file + matches the name (record) provided as an argument to this function -- + if not, the header file may have been renamed in error or its contents + may be corrupted. The requirement for a match is waived for remote + files since the user may not be able to make any corrections to them. */ if (iheader->type == WFDB_LOCAL && iheader->fp != stdin && strcmp(p, record) != 0) { - wfdb_error("init: record name in record %s header is incorrect\n", - record); - return (-2); + /* If there is a mismatch, check to see if the record argument includes + a directory separator (whether valid or not for this OS); if so, + compare only the final portion of the argument against the name in + the header file. */ + char *r, *s; + + for (r = record, s = r + strlen(r) - 1; r != s; s--) + if (*s == '/' || *s == '\\' || *s == ':') + break; + + if (r > s || strcmp(p, s+1) != 0) { + wfdb_error("init: record name in record %s header is incorrect\n", + record); + return (-2); + } } /* Identify which type of header file is being read by trying to get @@ -1705,7 +1723,7 @@ return (-1); /* Try to create the header file. */ - if ((oheader = wfdb_open("header", record, WFDB_WRITE)) == NULL) { + if ((oheader = wfdb_open("hea", record, WFDB_WRITE)) == NULL) { wfdb_error("newheader: can't create header for record %s\n", record); return (-1); } diff -Naur wfdb-10.1.5/lib/wfdb.h wfdb-10.1.6/lib/wfdb.h --- wfdb-10.1.5/lib/wfdb.h Wed Jun 7 00:12:25 2000 +++ wfdb-10.1.6/lib/wfdb.h Wed Aug 1 10:28:34 2001 @@ -1,10 +1,10 @@ /* file: wfdb.h G. Moody 13 June 1983 - Last revised: 6 June 2000 wfdblib 10.1.5 + Last revised: 28 February 2001 wfdblib 10.1.6 WFDB library type, constant, structure, and function interface definitions _______________________________________________________________________________ wfdb: a library for reading and writing annotated waveforms (time series data) -Copyright (C) 2000 George B. Moody +Copyright (C) 2001 George B. Moody This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free @@ -33,7 +33,7 @@ /* WFDB library version. */ #define WFDB_MAJOR 10 #define WFDB_MINOR 1 -#define WFDB_RELEASE 5 +#define WFDB_RELEASE 6 #define WFDB_NETFILES 1 /* if 1, library includes code for HTTP, FTP clients */ /* Determine what type of compiler is being used. */ diff -Naur wfdb-10.1.5/lib/wfdbio.c wfdb-10.1.6/lib/wfdbio.c --- wfdb-10.1.5/lib/wfdbio.c Tue May 23 01:25:15 2000 +++ wfdb-10.1.6/lib/wfdbio.c Sat Jul 28 13:45:15 2001 @@ -1,10 +1,10 @@ /* file: wfdbio.c G. Moody 18 November 1988 - Last revised: 19 January 2000 wfdblib 10.1.1 + Last revised: 19 July 2001 wfdblib 10.1.6 Low-level I/O functions for the WFDB library _______________________________________________________________________________ wfdb: a library for reading and writing annotated waveforms (time series data) -Copyright (C) 2000 George B. Moody +Copyright (C) 2001 George B. Moody This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free @@ -513,15 +513,17 @@ if (s == NULL || *s == '\0') return; /* Start at the end of the string and search backwards for a directory - separator. */ - for (p = s + strlen(s) - 1; p >= s && *p != DSEP; p--) + separator (accept any of the possible separators). */ + for (p = s + strlen(s) - 1; p >= s && + *p != '/' && *p != '\\' && *p != ':'; p--) ; /* A path component specifying the root directory must be treated as a special case; normally the trailing directory separator is not included in the path component, but in this case there is nothing else to include. */ - if (p == s && *p == DSEP) p++; + + if (p == s && (*p == '/' || *p == '\\' || *p == ';')) p++; if (p < s) return; /* argument did not contain a path component */ @@ -1005,6 +1007,9 @@ HTCacheInit(cachedir, cachesize); HTCacheMode_setMaxCacheEntrySize(entrysize); #endif + /* HTHost_setMaxPipelinedRequests(1); */ + HTEventInit(); /* added 19 July 2001 -- necessary for use with + WINSOCK, seems to be harmless otherwise */ atexit(wfdb_wwwquit); www_done_init = TRUE; } diff -Naur wfdb-10.1.5/psd/Makefile wfdb-10.1.6/psd/Makefile --- wfdb-10.1.5/psd/Makefile Wed Jun 7 00:12:25 2000 +++ wfdb-10.1.6/psd/Makefile Wed Aug 1 10:28:34 2001 @@ -32,12 +32,12 @@ # directory). # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 6 June 2000 +# Last revised: 28 February 2001 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 1 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # VDEFS is the set of C compiler options needed to set version number variables @@ -45,6 +45,7 @@ VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) # _____________________________________________________________________________ +PACKAGE=wfdb-10.1.6 # file: linux.def G. Moody 31 May 2000 # Last revised: 5 June 2000 # 'make' definitions for compiling the WFDB Software Package under Linux @@ -174,8 +175,8 @@ # `make' or `make install': build and install applications, clean up install: $(BINDIR) all scripts - cp $(XFILES) $(BINDIR) - cd $(BINDIR); $(SETXPERMISSIONS) $(XFILES) + $(SETXPERMISSIONS) $(XFILES) + ../install.sh $(BINDIR) $(XFILES) $(MAKE) clean # `make scripts': customize and install scripts @@ -188,7 +189,7 @@ $(SETXPERMISSIONS) $(SCRIPTS) uninstall: - ../uninstall $(BINDIR) $(XFILES) $(SCRIPTS) + ../uninstall.sh $(BINDIR) $(XFILES) $(SCRIPTS) coherence: coherence.c $(CC) -o coherence -O coherence.c -lm diff -Naur wfdb-10.1.5/wave/Makefile wfdb-10.1.6/wave/Makefile --- wfdb-10.1.5/wave/Makefile Mon Jun 5 23:31:48 2000 +++ wfdb-10.1.6/wave/Makefile Wed Aug 1 10:28:34 2001 @@ -1,19 +1,377 @@ -# file: nomake G. Moody 30 January 2000 -# Last revised: 5 June 2000 -# If renamed as 'Makefile', this file prevents WAVE from being compiled -# on systems that don't have XView installed. +# file: Makefile G. Moody 1 May 1990 +# Last revised: 23 May 2000 WAVE 6.3 +# `make' description file for WAVE +# +# ----------------------------------------------------------------------------- +# WAVE: Waveform analyzer, viewer, and editor +# Copyright (C) 2000 George B. Moody +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# 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., 59 Temple +# Place - Suite 330, Boston, MA 02111-1307, USA. +# +# You may contact the author by e-mail (george@mit.edu) or postal mail +# (MIT Room E25-505A, Cambridge, MA 02139 USA). For updates to this software, +# please visit PhysioNet (http://www.physionet.org/). +# _____________________________________________________________________________ +# +# This file is used with the UNIX `make' command to compile and install WAVE. +# WAVE can be compiled and run only on UNIX systems, although any networked +# system with an X11 server can be used to view its output; suitable servers +# are available for MS-DOS, the Macintosh, and VAX VMS as well as UNIX. +# In order to compile WAVE, you must have already installed the X11 Xlib +# (libX11.a), XView (libxview.a), and WFDB (libwfdb.a) libraries, and their +# associated header files (in /usr/include/X11, /usr/include/xview, and +# /usr/include/ecg respectively). The WFDB library source is included with the +# WAVE distribution (in the `lib' directory at the same level as this one). +# Xlib and XView are freely available by anonymous FTP as parts of the X11R4 +# distribution from expo.lcs.mit.edu and other sites, or from the MIT Software +# Distribution Center, MIT Room E32-300, Cambridge, MA 02139 USA; telephone +# +1-617-253-6966. See the main help file (wave.hl0, in this directory) for +# further information. +# +# Before using this file for the first time, check that the site-specific +# variables below are appropriate for your system. To build and install WAVE, +# just type `make' (from within this directory). +# _____________________________________________________________________________ +# file: version.def G. Moody 24 May 2000 +# Last revised: 28 February 2001 +# Each release of the WFDB Software Package is identified by a three-part +# version number, defined here: +MAJOR = 10 +MINOR = 1 +RELEASE = 6 +VERSION = $(MAJOR).$(MINOR).$(RELEASE) -all: - @echo "Skipping compilation of WAVE (XView required)." +# VDEFS is the set of C compiler options needed to set version number variables +# while compiling the WFDB Software Package. +VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) +# _____________________________________________________________________________ -wave: - @echo "Skipping compilation of WAVE (XView required)." +PACKAGE=wfdb-10.1.6 +# file: linux.def G. Moody 31 May 2000 +# Last revised: 5 June 2000 +# 'make' definitions for compiling the WFDB Software Package under Linux -install: - @echo "Skipping installation of WAVE (XView required)." +# Choose a value for WFDBROOT to determine where the WFDB Software Package will +# be installed. One of the following is usually a reasonable choice. +# Installing in /usr generally requires root permissions, but will be easiest +# for future software development (no special -I or -L options will be needed +# to compile software with the WFDB library, since the *.h files and the +# library will be installed in the standard directories). +WFDBROOT = /usr +# Installing in /usr/local usually requires root permissions. On a multi-user +# system where it is desirable to keep the OS vendor's software separate from +# other software, this is a good choice. Another common choice in such cases +# is /opt . +# WFDBROOT = /usr/local +# To install without root permissions, a good choice is to set WFDBROOT to the +# name of your home directory, as in the example below (change as needed). +# WFDBROOT = /home/frodo + +# If the W3C's libwww library of HTTP and FTP client code is available, and +# you wish to compile a WFDB library with NETFILES support, set LWC to +# 'libwww-config' (a utility supplied with libwww). Otherwise set LWC to ':' +# (a program that does nothing, successfully). +LWC = libwww-config + +# LDLIBWWW, which is appended to LDFLAGS below, is the set of options needed +# to link with libwww. If libwww is not installed, or if libwfdb is a shared +# library, LDLIBWWW can be empty (if there is a '#' immediately after the '=' +# below, the remainder of the line is ignored, so LDLIBWWW is empty in this +# case). Otherwise, it is generated from the output of LWC. Note that up to +# three passes through the option list are necessary to satisfy all +# dependencies when linking to the static libwww libraries. +LDLIBWWW = # `$(LWC) --libs` `$(LWC) --libs` `$(LWC) --libs` + +# BINDIR specifies the directory in which the applications will be installed; +# it should be a directory in the PATH of those who will use the applications. +BINDIR = $(WFDBROOT)/bin + +# DBDIR specifies the name of a directory in which to install the contents +# of the `data' directory. +DBDIR = $(WFDBROOT)/database + +# INCDIR specifies the name of a directory in which to install the WFDB +# library's #include <...> files. +INCDIR = $(WFDBROOT)/include + +# LIBDIR specifies the name of a directory in which to install the WFDB +# library. +LIBDIR = $(WFDBROOT)/lib + +# PSPDIR specifies the name of a directory in which to install the PostScript +# prolog (*.pro) files from the 'app' directory. +PSPDIR = $(WFDBROOT)/lib/ps + +# CC is the name of your C compiler. +CC = gcc + +# CFLAGS is the set of C compiler options. CFLAGS should always include +# VDEFS. +CFLAGS = -g -O $(VDEFS) `$(LWC) --cflags` -I$(INCDIR) + +# LDFLAGS is appended to the C compiler command line to specify loading the +# WFDB library. +LDFLAGS = -L$(LIBDIR) -lwfdb $(LDLIBWWW) + +# WFDBLIB is the name of the standard WFDB library. In order to access it via +# `-lwfdb', WFDBLIB should be `libwfdb.a'. +WFDBLIB = libwfdb.a + +# BUILDLIB is the command that creates the static WFDB library once its +# components have been compiled separately; the list of *.o files that +# make up the library will be appended to BUILDLIB. +BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) + +# PRINT is the name of the program used to produce listings (including any +# options for the desired formatting). +PRINT = lpr + +# SETPERMISSIONS is the command needed to make the installed files accessible +# to those who will use them. The value given below makes them readable by +# everyone, and writeable by the owner only. (If you perform the installation +# as `root', `root' is the owner of the installed files.) +SETPERMISSIONS = chmod 644 + +# SETDPERMISSIONS is similarly used to make directories created during the +# installation accessible. +SETDPERMISSIONS = chmod 755 + +# SETLPERMISSIONS is the command needed to make the WFDB library usable by +# programs linked to it. +SETLPERMISSIONS = chmod 644 + +# SETXPERMISSIONS is the command needed to make the applications accessible. +SETXPERMISSIONS = chmod 755 + +# STRIP is the command used to compact the compiled binaries by removing their +# symbol tables. +STRIP = strip +# To retain the symbol tables for debugging, comment out the previous line, and +# uncomment the next line. +# STRIP = : + +# `make' (with no target specified) will be equivalent to `make all'. +make-all: all + +# `make lib-post-install' should be run after installing the WFDB library. +lib-post-install: + ranlib $(LIBDIR)/$(WFDBLIB) + +lib-post-uninstall: + echo "Nothing to be done for lib-post-uninstall" +# _____________________________________________________________________________ +# file: Makefile.tpl G. Moody 31 May 2000 +# Last revised: 29 May 2001 +# Change the settings below as appropriate for your setup. + +# WAVEVERSION is the WAVE version number. +WAVEVERSION = 6.4 + +# Choose directories in which to install WAVE and its ancillary files by +# editing the variables below. You will need write permission in all of them +# in order to install WAVE successfully, and WAVE users will need read +# permission in all of them. If the directories don't exist already, they +# will be created with appropriate permissions by the installation procedure. + +# This section of site-dependent variables specifies the locations in your +# file system where the WAVE software and data files will be installed. +# You may choose a different set of locations if you prefer, but documentation +# included in this package generally assumes that you have used the defaults +# given here. You will need write permission in all of the directories named +# in this section, and users of the software will need read permission in all +# of these directories. Generally, you will need `root' permissions in order +# to install the software in the standard places. + +# HELPDIR specifies the directory in which the on-line help files are kept. +# The installation procedure creates a subdirectory, `wave', in HELPDIR, and +# installs several files there. +HELPDIR = $(WFDBROOT)/help + +# MENUDIR specifies the directory in which the default analysis menu file is +# kept. +MENUDIR = $(WFDBROOT)/lib + +# RESDIR specifies the directory in which X11 client resource files are kept. +RESDIR = $(WFDBROOT)/lib/X11/app-defaults + +# OPENWINHOME specifies the root directory of the OpenWindows hierarchy. +# This is usually /usr/openwin. +OPENWINHOME = /usr/openwin + +# OWINCDIR is the directory in which the `xview' directory containing XView +# *.h files is found. +OWINCDIR = $(OPENWINHOME)/include + +# OWLIBDIR is the directory in which the XView library is found. +OWLIBDIR = $(OPENWINHOME)/lib + +# WCFLAGS is the set of C compiler options. +WCFLAGS = $(CFLAGS) -I$(OWINCDIR) + +# HELPOBJ can be set to "help.o" if you wish to recompile the XView spot help +# functions in "help.c" (recommended under Linux). +HELPOBJ = help.o +# Otherwise, use the version in libxview by uncommenting the next line: +# HELPOBJ = + +# WLDFLAGS is the set of loader options appended to the C compiler command line +# to specify loading the WFDB, XView, and Xlib libraries. +WLDFLAGS = $(LDFLAGS) -L$(OWLIBDIR) -L/usr/X11R6/lib -lxview -lolgx -lX11 +# Users of Red Hat Linux 5.0 or 5.1 (not later versions), use this instead: +# WLDFLAGS = $(LDFLAGS) -L$(OWLIBDIR) -L/usr/X11R6/lib \ +# /usr/openwin/lib/libxview.a /usr/openwin/lib/libolgx.a -lX11 +# This setting avoids incompatibilities with the shared (dynamic) libraries. +# If you use another version of Linux, or another OS, and have difficulty +# related to WAVE's Analysis commands window, try this workaround, and let +# me know if it works (or if it doesn't work). + +# It should not be necessary to modify anything below this line. +# ----------------------------------------------------------------------------- + +HFILES = wave.h bitmaps.h xvwave.h +CFILES = wave.c init.c mainpan.c modepan.c helppan.c logpan.c annpan.c edit.c \ + grid.c sig.c annot.c analyze.c scope.c search.c xvwave.c help.c +OFILES = wave.o init.o mainpan.o modepan.o helppan.o logpan.o annpan.o edit.o \ + grid.o sig.o annot.o analyze.o scope.o search.o xvwave.o $(HELPOBJ) +HELPFILES = analysis.hlp buttons.hlp editing.hlp faq.hlp intro.hlp log.hlp \ + printing.hlp resource.hlp +OTHERFILES = wave.hl0 wave.info wave.pro demo.txt Wave.res wavemenu.def \ + Makefile + +all: wave + +# `make install': compile and install WAVE and its help files +install: $(BINDIR) $(HELPDIR)/wave $(MENUDIR) $(RESDIR) wave wave.hlp + sed s/WAVEVERSION/$(WAVEVERSION)/ wave.pro + $(STRIP) wave; $(SETXPERMISSIONS) wave; ../install.sh $(BINDIR) wave + cp $(HELPFILES) wave.hlp wave.info wave.pro demo.txt $(HELPDIR)/wave + -ln -s $(HELPDIR)/wave/wave.pro $(HELPDIR)/wave/news.hlp + cd $(HELPDIR)/wave; $(SETPERMISSIONS) $(HELPFILES) news.hlp wave.info \ + wave.pro demo.txt + -cp wavemenu.def $(MENUDIR) && \ + $(SETPERMISSIONS) $(MENUDIR)/wavemenu.def + -cp Wave.res $(RESDIR)/Wave && $(SETPERMISSIONS) $(RESDIR)/Wave uninstall: - @echo "Nothing to uninstall from wave" + ../uninstall.sh $(BINDIR) wave + ../uninstall.sh $(HELPDIR)/wave $(HELPFILES) wave.hlp wave.info wave.pro \ + demo.txt news.hlp + rmdir $(HELPDIR) || echo "(Ignored)" + ../uninstall.sh $(MENUDIR) wavemenu.def + ../uninstall.sh $(RESDIR) Wave + ../uninstall.sh $(LIBDIR)/X11 + ../uninstall.sh $(LIBDIR) +wave: $(OFILES) + $(CC) -o wave $(OFILES) $(WLDFLAGS) + +# `make help': show help text +help: + @echo "*************************************************************" + @echo "To print the WAVE manual, type 'make manual'." + @echo "If you have a PostScript Printer, you may also wish to print" + @echo "the WAVE User's Guide, by typing 'make guide'." + @echo "*************************************************************" + @echo + @echo -n "Press to view the manual on-screen: " + @read x + @echo + @soelim wave.hl0 | more + @echo + @echo "*************************************************************" + @echo "To print the WAVE manual, type 'make manual'." + @echo "If you have a PostScript Printer, you may also wish to print" + @echo "the WAVE User's Guide, by typing 'make guide'." + @echo "*************************************************************" + +wave-static: $(OFILES) + $(CC) -o wave-static $(OFILES) -static $(LDFLAGS) + +soelim: soelim.c + $(CC) -o soelim -O soelim.c + +wave.hlp: soelim wave.hl0 $(HELPFILES) + ./soelim wave.hl0 >wave.hlp + +wave.pro: + sed s/WAVEVERSION/$(WAVEVERSION)/ wave.pro + +# `make manual': print the on-line manual +manual: + ./soelim wave.hl0 | $(PRINT) + +# `make guide': print the WAVE User's Guide +guide: + cd ../../manuals/wavguide; make guide + +# `make TAGS': make an `emacs' TAGS file +TAGS: $(HFILES) $(CFILES) + @etags $(HFILES) $(CFILES) + +# `make clean': remove intermediate and backup files clean: rm -f soelim wave wave-static *.o *~ wave.hlp wave.pro + +# `make listing': print a listing of WAVE sources +listing: wave.hlp wave.pro + $(PRINT) README REGCARD $(HFILES) $(CFILES) $(HELPFILES) $(OTHERFILES) + +# Dependencies and special rules for compilation of the modules of `wave' +wave.o: wave.h wave.c + $(CC) -c $(WCFLAGS) -DHELPDIR=\"$(HELPDIR)\" wave.c +init.o: wave.h xvwave.h init.c + $(CC) -c $(WCFLAGS) init.c +mainpan.o: wave.h xvwave.h mainpan.c Makefile + $(CC) -c $(WCFLAGS) -DWAVEVERSION=\"$(WAVEVERSION)\" mainpan.c +modepan.o: wave.h xvwave.h modepan.c + $(CC) -c $(WCFLAGS) modepan.c +helppan.o: wave.h xvwave.h helppan.c + $(CC) -c $(WCFLAGS) -DWAVEVERSION=\"$(WAVEVERSION)\" helppan.c +logpan.o: wave.h xvwave.h logpan.c + $(CC) -c $(WCFLAGS) logpan.c +annpan.o: wave.h xvwave.h annpan.c + $(CC) -c $(WCFLAGS) annpan.c +edit.o: wave.h xvwave.h edit.c + $(CC) -c $(WCFLAGS) edit.c +grid.o: wave.h xvwave.h grid.c + $(CC) -c $(WCFLAGS) grid.c +search.o: wave.h xvwave.h search.c + $(CC) -c $(WCFLAGS) search.c +sig.o: wave.h xvwave.h sig.c + $(CC) -c $(WCFLAGS) sig.c +annot.o: wave.h xvwave.h annot.c + $(CC) -c $(WCFLAGS) -DWAVEVERSION=\"$(WAVEVERSION)\" annot.c +analyze.o: wave.h xvwave.h analyze.c + $(CC) -c $(WCFLAGS) -DMENUDIR=\"$(MENUDIR)\" analyze.c +scope.o: wave.h xvwave.h scope.c + $(CC) -c $(WCFLAGS) scope.c +xvwave.o: wave.h xvwave.h bitmaps.h xvwave.c + $(CC) -c $(WCFLAGS) -DRESDIR=\"$(RESDIR)\" xvwave.c +help.o: help.c + $(CC) -c $(WCFLAGS) -w help.c + +# Create directories for installation if necessary. +$(BINDIR): + mkdir -p $(BINDIR); $(SETDPERMISSIONS) $(BINDIR) +$(HELPDIR): + mkdir -p $(HELPDIR); $(SETDPERMISSIONS) $(HELPDIR) +$(HELPDIR)/wave: + mkdir -p $(HELPDIR)/wave; $(SETDPERMISSIONS) $(HELPDIR)/wave +$(MENUDIR): + mkdir -p $(MENUDIR); $(SETDPERMISSIONS) $(MENUDIR) +$(RESDIR): + mkdir -p $(RESDIR); $(SETDPERMISSIONS) $(RESDIR) diff -Naur wfdb-10.1.5/wave/Makefile.tpl wfdb-10.1.6/wave/Makefile.tpl --- wfdb-10.1.5/wave/Makefile.tpl Wed Jun 7 18:28:03 2000 +++ wfdb-10.1.6/wave/Makefile.tpl Tue May 29 16:27:26 2001 @@ -1,9 +1,9 @@ # file: Makefile.tpl G. Moody 31 May 2000 -# Last revised: 5 June 2000 +# Last revised: 29 May 2001 # Change the settings below as appropriate for your setup. # WAVEVERSION is the WAVE version number. -WAVEVERSION = 6.3 +WAVEVERSION = 6.4 # Choose directories in which to install WAVE and its ancillary files by # editing the variables below. You will need write permission in all of them diff -Naur wfdb-10.1.5/wave/analyze.c wfdb-10.1.6/wave/analyze.c --- wfdb-10.1.5/wave/analyze.c Sun Jan 30 04:13:20 2000 +++ wfdb-10.1.6/wave/analyze.c Tue May 29 12:29:21 2001 @@ -1,10 +1,10 @@ /* file: analyze.c G. Moody 10 August 1990 - Last revised: 6 January 2000 + Last revised: 29 May 2001 Functions for the analysis panel of WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 2000 George B. Moody +Copyright (C) 2001 George B. Moody This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -44,8 +44,8 @@ file including continuation lines */ void do_analysis(), edit_menu_file(), set_signal(), set_start(), set_stop(), - set_back(), set_ahead(), set_siglist(), show_command_window(), - add_signal_choice(), delete_signal_choice(); + set_back(), set_ahead(), set_siglist(), set_siglist_from_string(), + show_command_window(), add_signal_choice(), delete_signal_choice(); char *wavemenu; Frame analyze_frame, tty_frame; Panel analyze_panel; @@ -91,7 +91,7 @@ if (menu_read == 0) read_menu(); if (open_url_command == NULL) { - sprintf(default_open_url_command, "urlview $URL\n"); + sprintf(default_open_url_command, "url_view $URL\n"); open_url_command = default_open_url_command; } do_command(open_url_command); @@ -542,8 +542,12 @@ void set_siglist() { - char *s = (char *)xv_get(siglist_item, PANEL_VALUE); + set_siglist_from_string((char *)xv_get(siglist_item, PANEL_VALUE)); +} +void set_siglist_from_string(s) +char *s; +{ siglistlen = 0; while (*s == ' ' || *s == '\t') s++; diff -Naur wfdb-10.1.5/wave/edit.c wfdb-10.1.6/wave/edit.c --- wfdb-10.1.5/wave/edit.c Sun Jan 30 04:13:21 2000 +++ wfdb-10.1.6/wave/edit.c Wed May 30 11:49:45 2001 @@ -1,10 +1,10 @@ /* file: edit.c G. Moody 1 May 1990 - Last revised: 4 May 1999 + Last revised: 30 May 2001 Annotation-editing functions for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 1999 George B. Moody +Copyright (C) 2001 George B. Moody This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -29,7 +29,7 @@ #include "wave.h" #include "xvwave.h" #include /* getcwd */ -#include +#include #include #include diff -Naur wfdb-10.1.5/wave/init.c wfdb-10.1.6/wave/init.c --- wfdb-10.1.5/wave/init.c Sun Jan 30 04:13:21 2000 +++ wfdb-10.1.6/wave/init.c Sat Jul 28 13:09:42 2001 @@ -1,10 +1,10 @@ /* file: init.c G. Moody 1 May 1990 - Last revised: 29 April 1999 + Last revised: 28 July 2001 Initialization functions for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 1999 George B. Moody +Copyright (C) 2001 George B. Moody This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -47,9 +47,15 @@ if (post_changes() == 0) return (0); - /* Check to see if the signal list must be rebuilt. */ - rebuild_list = (siglistlen == 0) | strcmp(record, s); - + /* Check to see if the signal list must be rebuilt. Normally, this is + done whenever the signal list is empty or if the record name has + changed, but accept_remote_command (see xvwave.c) can force record_init + not to rebuild the signal list by setting freeze_siglist. */ + if (freeze_siglist) + freeze_siglist = rebuild_list = 0; + else + rebuild_list = (siglistlen == 0) | strcmp(record, s); + /* Save the name of the new record in local storage. */ strncpy(record, s, RNLMAX); diff -Naur wfdb-10.1.5/wave/wave.c wfdb-10.1.6/wave/wave.c --- wfdb-10.1.5/wave/wave.c Sat Apr 1 07:57:53 2000 +++ wfdb-10.1.6/wave/wave.c Tue May 29 16:25:43 2001 @@ -1,10 +1,10 @@ /* file: wave.c G. Moody 27 April 1990 - Last revised: 5 March 2000 + Last revised: 29 May 2001 main() function for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 2000 George B. Moody +Copyright (C) 2001 George B. Moody This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -227,6 +227,8 @@ pname); exit(1); } + sig_mode = 1; /* display listed signals only (may be + overridden using -VS 0) */ break; case 'S': /* use shared color map only */ mode |= MODE_SHARED; diff -Naur wfdb-10.1.5/wave/wave.h wfdb-10.1.6/wave/wave.h --- wfdb-10.1.5/wave/wave.h Sun Jan 30 04:13:21 2000 +++ wfdb-10.1.6/wave/wave.h Sat Jul 28 12:46:07 2001 @@ -1,10 +1,10 @@ /* file: wave.h G. Moody 26 April 1990 - Last revised: 21 January 2000 + Last revised: 28 July 2001 Constants, macros, global variables, and function prototypes for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 2000 George B. Moody +Copyright (C) 2001 George B. Moody This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -216,6 +216,7 @@ COMMON int siglist[WFDB_MAXSIG]; /* signals to be analyzed (from analyze panel) */ COMMON int siglistlen; /* number of valid siglist entries */ +COMMON int freeze_siglist; /* 1: don't rebuild in record_init */ COMMON int scan_active; /* 1: scope display is running */ COMMON char psprint[80]; /* command used to print PostScript */ @@ -321,6 +322,7 @@ extern void open_url(void); /* in analyze.c */ extern void do_command(char *command); /* in analyze.c */ extern void set_signal_choice(int sig); /* in analyze.c */ +extern void set_siglist_from_string(char *s); /* in analyze.c */ extern void add_signal_choice(void); /* in analyze.c */ extern void delete_signal_choice(void); /* in analyze.c */ extern void print_proc(void); /* in analyze.c */ @@ -356,8 +358,8 @@ change_annotations(), check_post_update(), set_frame_title(), analyze_proc(), reset_start(), reset_stop(), reset_maxsig(), reset_siglist(), open_url(), do_command(), set_signal_choice(), - add_signal_choice(), delete_signal_choice(), print_proc(), - save_scope_params(), show_scope_window(), strip_x_args(), hide_grid(), - unhide_grid(), display_and_process_events(), quit_proc(), + set_siglist_from_string(), add_signal_choice(), delete_signal_choice(), + print_proc(), save_scope_params(), show_scope_window(), strip_x_args(), + hide_grid(), unhide_grid(), display_and_process_events(), quit_proc(), sync_other_wave_processes(), reset_ref(), recreate_level_popup(); #endif diff -Naur wfdb-10.1.5/wave/wave.info wfdb-10.1.6/wave/wave.info --- wfdb-10.1.5/wave/wave.info Sun Jan 30 04:13:21 2000 +++ wfdb-10.1.6/wave/wave.info Mon Jun 19 15:08:11 2000 @@ -1,5 +1,5 @@ # file: wave.info G. Moody 21 August 1990 -# Last revised: 7 September 1999 WAVE 6.3 +# Last revised: 19 June 2000 WAVE 6.3 # XView spot help file for `wave' # # ----------------------------------------------------------------------------- @@ -25,13 +25,13 @@ # please visit PhysioNet (http://www.physionet.org/). # _____________________________________________________________________________ -:file:urlview /usr/local/help/html/wug/ +:file:url_view /usr/local/help/html/wug/ This button opens a pull-down menu containing selections for loading, saving, printing, analyzing, and logging database files. # -:file.load:urlview /usr/local/help/html/wug/ +:file.load:url_view /usr/local/help/html/wug/ This selection pops up a window in which you can enter a new record or annotator name, or change the name of the WFDB calibration @@ -97,7 +97,7 @@ edits. # -:file.print:urlview /usr/local/help/html/wug/ +:file.print:url_view /usr/local/help/html/wug/ This selection prints the contents of the signal window on paper. The output is made from the original signal files, and therefore is of better @@ -106,7 +106,7 @@ output reflects any changes you have made. # -:file.printsetup:urlview /usr/local/help/html/wug/ +:file.printsetup:url_view /usr/local/help/html/wug/ This selection pops up a panel that shows the commands WAVE uses to print PostScript and text data from the standard input. You may change @@ -131,7 +131,7 @@ example, to specify use of a different printer). # -:file.analyze:urlview /usr/local/help/html/wug/ +:file.analyze:url_view /usr/local/help/html/wug/ This selection pops up a panel containing a set of buttons, and a terminal emulator window. The names of the buttons and their assigned actions @@ -269,13 +269,13 @@ signal from the list), and click left. # -:file.analyze.show_scope_window:urlview /usr/local/help/html/wug/ +:file.analyze.show_scope_window:url_view /usr/local/help/html/wug/ This button pops up WAVE's Scope window, which can be used to display a signal in `oscilloscope' mode. # -:file.analyze.show_command_window:urlview /usr/local/help/html/wug/ +:file.analyze.show_command_window:url_view /usr/local/help/html/wug/ This button pops up a terminal emulator window that receives commands generated by selecting most of the other buttons in this window, and @@ -283,7 +283,7 @@ You may type commands directly into the window. # -:file.analyze.edit_menu:urlview /usr/local/help/html/wug/ +:file.analyze.edit_menu:url_view /usr/local/help/html/wug/ This button allows you to edit the menu configuration file for this panel, using the text editor named in the EDITOR environment @@ -292,7 +292,7 @@ `Reread menu' to reconfigure this panel. # -:file.analyze.reread_menu:urlview /usr/local/help/html/wug/ +:file.analyze.reread_menu:url_view /usr/local/help/html/wug/ Select this button to reconfigure this panel after you have made changes to the menu configuration file (most easily done by @@ -316,7 +316,7 @@ analysis menu file. # -:file.log:urlview /usr/local/help/html/wug/ +:file.log:url_view /usr/local/help/html/wug/ This selection pops up a window that allows you to name a log file, and to record in that file the current record name and start and end time entries @@ -431,7 +431,7 @@ log entry. # -:view:urlview /usr/local/help/html/wug/ +:view:url_view /usr/local/help/html/wug/ This button pops up the View window, which allows you to choose (or merely examine) display scales, grid styles, and annotation, signal, and time @@ -561,14 +561,14 @@ and refreshes the signal window. # -:view.save_as_new_defaults:urlview /usr/local/help/html/wug/ +:view.save_as_new_defaults:url_view /usr/local/help/html/wug/ This button causes WAVE to record the current View panel settings in your .Xdefaults file (at the same time erasing any comments in that file). These settings become the new defaults for your future WAVE sessions. -:edit:urlview /usr/local/help/html/wug/ +:edit:url_view /usr/local/help/html/wug/ This button brings up the Edit menu, which allows you to specify if annotation editing is to be allowed or forbidden. By default, @@ -586,7 +586,7 @@ You may still edit `<', `:', and `>' markers. # -:prop:urlview /usr/local/help/html/wug/ +:prop:url_view /usr/local/help/html/wug/ This button brings up the Properties menu, with selections for obtaining information about the current signal and annotation files @@ -637,7 +637,7 @@ half of the width of the signal window. # -:find:urlview /usr/local/help/html/wug/ +:find:url_view /usr/local/help/html/wug/ This button opens a window that allows you to specify what portion of the current record should be displayed next. You may set a specific start @@ -687,7 +687,7 @@ . to match a deletion made during this edit # -:find.more_options:urlview /usr/local/help/html/wug/ +:find.more_options:url_view /usr/local/help/html/wug/ This button clears the contents of the "Search for" field and opens the Search Template window. # @@ -716,7 +716,7 @@ or marker will be counted as a match. # -:help:urlview /usr/local/help/html/wug/ +:help:url_view /usr/local/help/html/wug/ This button pops up a panel containing buttons that name several topics for which extensive on-line help is available. Choosing a topic @@ -821,7 +821,7 @@ Editing' topic from the Help window. # -:annot.type:urlview /usr/local/help/html/wug/ +:annot.type:url_view /usr/local/help/html/wug/ This field specifies the type of annotation to be inserted. It may be changed by selecting a new value from the pull-down menu, by typing @@ -922,7 +922,7 @@ This button closes the Level window. # -:scope_panel:urlview /usr/local/help/html/wug/ +:scope_panel:url_view /usr/local/help/html/wug/ This panel contains controls for the Scope window, which displays the signal indicated by the Signal control in the @@ -983,7 +983,7 @@ an index mark (`:'), or the `>' marker. # -:scope_canvas:urlview /usr/local/help/html/wug/ +:scope_canvas:url_view /usr/local/help/html/wug/ This is the scope window, which displays the signal indicated on the Analyze panel. The scales match those in the signal window (use diff -Naur wfdb-10.1.5/wave/wave.prf wfdb-10.1.6/wave/wave.prf --- wfdb-10.1.5/wave/wave.prf Sun Apr 9 17:11:44 2000 +++ wfdb-10.1.6/wave/wave.prf Mon Jun 19 15:08:54 2000 @@ -74,7 +74,7 @@ - If you have a web browser such as Netscape, you can read the WAVE User's Guide on-line. WAVE's Help Topics window contains a `User's Guide' button that opens the guide using Netscape or the browser of your choice. (If - you don't use Netscape, you will need to customize the `urlview' script + you don't use Netscape, you will need to customize the `url_view' script provided with the WAVE distribution.) Some topics in WAVE's spot help have `More' buttons that link in this way to the User's Guide for an in-depth discussion. @@ -101,7 +101,7 @@ The aux field of a LINK annotation contains a URL and an optional comment. WAVE displays the comment, underlined and distinctively colored, in the manner of a Web browser; if you select a LINK annotation, WAVE uses the - `urlview' script included in the WAVE distribution to cause your web browser + `url_view' script included in the WAVE distribution to cause your web browser to open the specified URL. Going in the opposite direction, the `wavescript' application included in the WAVE distribution can be used as a helper by a web browser; `wavescript' starts WAVE if necessary and causes it to diff -Naur wfdb-10.1.5/wave/wavemenu.def wfdb-10.1.6/wave/wavemenu.def --- wfdb-10.1.5/wave/wavemenu.def Wed May 24 16:37:39 2000 +++ wfdb-10.1.6/wave/wavemenu.def Mon Jun 19 15:10:15 2000 @@ -1,5 +1,5 @@ # file: wavemenu.def G. Moody 17 August 1990 -# Last revised: 24 May 2000 +# Last revised: 19 June 2000 # WAVE analysis menu # ----------------------------------------------------------------------------- # WAVE: Waveform analyzer, viewer, and editor @@ -142,16 +142,16 @@ # The label `' defines the command that is executed when a follow- # link command is given in the signal window. (To give a follow-link command, -# select a link annotation and press ENTER.) `urlview' is itself a script that -# you may customize for your web browser. The version of `urlview' supplied -# with WAVE uses Netscape (1.1 or any later version) to direct an already- -# running Netscape process to open the specified URL; if Netscape is not -# already running, `urlview' starts it. If you prefer to use a different web -# browser, either change the action associated with `' below, or -# (preferably) replace the last command in `urlview' with one that invokes +# select a link annotation and press ENTER.) `url_view' is itself a script +# that you may customize for your web browser. The version of `url_view' +# supplied with WAVE uses Netscape (1.1 or any later version) to direct an +# already-running Netscape process to open the specified URL; if Netscape is +# not already running, `url_view' starts it. If you prefer to use a different +# web browser, either change the action associated with `' below, or +# (preferably) replace the last command in `url_view' with one that invokes # your browser (unfortunately, the syntax for doing so is not standard; # consult your browser's documentation). - urlview $URL + url_view $URL # The next two buttons use a file created using WAVE's Log window. Typically, # the file contains the times of interesting events selected by the user, diff -Naur wfdb-10.1.5/wave/xvwave.c wfdb-10.1.6/wave/xvwave.c --- wfdb-10.1.5/wave/xvwave.c Sat Apr 1 08:03:00 2000 +++ wfdb-10.1.6/wave/xvwave.c Sat Jul 28 13:17:46 2001 @@ -1,10 +1,10 @@ /* file: xvwave.c G. Moody 27 April 1990 - Last revised: 5 March 2000 + Last revised: 28 July 2001 XView support functions for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 2000 George B. Moody +Copyright (C) 2001 George B. Moody This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -240,7 +240,7 @@ defaults_set_integer("Wave.View.CoarseTimeScale", tsa_index); defaults_set_integer("Wave.View.AmplitudeScale", vsa_index); defaults_set_integer("Wave.View.AnnotationMode", ann_mode); - // defaults_set_integer("Wave.View.AnnotationOverlap", overlap); + defaults_set_integer("Wave.View.AnnotationOverlap", overlap); defaults_set_integer("Wave.View.SignalMode", sig_mode); defaults_set_integer("Wave.View.TimeMode", time_mode); if (tsa_index > MAX_COARSE_TSA_INDEX) @@ -260,22 +260,12 @@ { if (status == DESTROY_CHECKING) { int result; - // #ifdef NOTICE -#if 0 - Xv_notice notice = xv_create((Frame)client, NOTICE, - XV_SHOW, TRUE, - NOTICE_STATUS, &result, -#else + result = notice_prompt((Frame)client, (Event *)NULL, -#endif NOTICE_MESSAGE_STRINGS, "Are you sure you want to Quit?", NULL, NOTICE_BUTTON_YES, "Confirm", NOTICE_BUTTON_NO, "Cancel", NULL); -#if 0 - //#ifdef NOTICE - xv_destroy_safe(notice); -#endif if (result != NOTICE_YES) notify_veto_destroy(client); } else if (status == DESTROY_CLEANUP) { @@ -293,11 +283,12 @@ int sig; Notify_signal_mode when; { - char buf[80], new_annotator[30], new_time[30], new_record[70]; + char buf[80], new_annotator[30], new_time[30], new_record[70], + new_siglist[70]; FILE *sfile; sfile = fopen(sentinel, "r"); - new_annotator[0] = new_time[0] = new_record[0] = '\0'; + new_annotator[0] = new_time[0] = new_record[0] = new_siglist[0] = '\0'; while (fgets(buf, sizeof(buf), sfile)) { /* read a command */ if (buf[0] != '-') continue; /* illegal command -- ignore */ else switch (buf[1]) { @@ -316,6 +307,10 @@ strncpy(new_record, buf+3, sizeof(new_record)-1); new_record[strlen(new_record)-1] = '\0'; break; + case 's': /* choose signals for display */ + new_siglist[sizeof(new_siglist-1)] = '\0'; + strncpy(new_siglist, buf+3, sizeof(new_siglist)-1); + new_siglist[strlen(new_siglist)-1] = '\0'; } } if (*new_record && strcmp(record, new_record)) { @@ -340,15 +335,32 @@ set_annot_item(new_annotator); if (*new_time) set_start_time(new_time); + if (*new_siglist) { + set_siglist_from_string(new_siglist); + if (sig_mode == 0) { + sig_mode = 1; /* display listed signals only */ + mode_undo(); /* change setting in View panel to match */ + set_baselines(); /* recalculate display positions of signals */ + } + freeze_siglist = 1; + /* avoid undoing the effects of setting siglist here, by + suppressing the rebuild of siglist that would normally be + done by record_init (see init.c) */ + } fclose(sfile); if (wave_ppid) { /* synch parent WAVE, if any, with this one */ if (*new_time == '\0') strcpy(new_time, mstimstr(display_start_time)); if (*new_record) - sprintf(buf, "wave-remote -pid %d -r %s -f '%s'\n", wave_ppid, - new_record, new_time); + sprintf(buf, "wave-remote -pid %d -r %s -f '%s'", + wave_ppid, new_record, new_time); else - sprintf(buf, "wave-remote -pid %d -f '%s'\n", wave_ppid, new_time); + sprintf(buf, "wave-remote -pid %d -f '%s'", wave_ppid, new_time); + if (*new_siglist) { + strcat(buf, " -s "); + strcat(buf, new_siglist); + } + strcat(buf, "\n"); system(buf); } disp_proc(XV_NULL, (Event *) '.'); /* redraw display */ @@ -632,10 +644,10 @@ ann_mode = defaults_get_integer("wave.view.annotationmode", "Wave.View.AnnotationMode", 0); - // if (overlap < 0) - // overlap = defaults_get_integer("wave.view.annotationoverlap", - // "Wave.View.AnnotationOverlap", - // 0); + if (overlap < 0) + overlap = defaults_get_integer("wave.view.annotationoverlap", + "Wave.View.AnnotationOverlap", + 0); if (sig_mode < 0) sig_mode = defaults_get_integer("wave.view.signalmode", "Wave.View.SignalMode", diff -Naur wfdb-10.1.5/wave-doc/guide/fixinfo wfdb-10.1.6/wave-doc/guide/fixinfo --- wfdb-10.1.5/wave-doc/guide/fixinfo Thu Jun 24 11:38:46 1999 +++ wfdb-10.1.6/wave-doc/guide/fixinfo Mon Jun 19 15:04:19 2000 @@ -28,7 +28,7 @@ if ($_ =~ /:.*:%*%/) { @words = split(/%/); $key = @words[1]; - print "@words[0]urlview /usr/local/help/html/wug/$label{$key}\n"; + print "@words[0]url_view /usr/local/help/html/wug/$label{$key}\n"; } else { print $_; diff -Naur wfdb-10.1.5/wave-doc/guide/wug.tex wfdb-10.1.6/wave-doc/guide/wug.tex --- wfdb-10.1.5/wave-doc/guide/wug.tex Wed May 24 16:47:42 2000 +++ wfdb-10.1.6/wave-doc/guide/wug.tex Mon Jun 19 15:04:54 2000 @@ -2635,14 +2635,14 @@ line beginning with the {\tt } tag in \WAVE{}'s menu file. In the standard version of the menu file, this line reads: \begin{verbatim} - urlview $URL + url_view $URL \end{verbatim} % $ (this comment is here only to keep Emacs's LaTeX fontification happy) -The program {\tt urlview} is a shell script (normally installed at the +The program {\tt url_view} is a shell script (normally installed at the same time as \WAVE{}, and in the same directory) that handles starting the browser if necessary and instructing it to display the specified -URL. The standard version of {\tt urlview} does so using the command: +URL. The standard version of {\tt url_view} does so using the command: \begin{verbatim} ( netscape -remote 'openURL($URL)' || netscape $URL ) & \end{verbatim} @@ -2661,9 +2661,9 @@ starts a new Netscape browser process. To configure \WAVE{} to use a different web browser, edit the {\tt -urlview} script appropriately. (You may also do this by editing the +url_view} script appropriately. (You may also do this by editing the action associated with {\tt }, but it's better to modify -{\tt urlview}, since \WAVE{} also uses {\tt urlview} to display some +{\tt url_view}, since \WAVE{} also uses {\tt url_view} to display some of its on-line help. If you decide to modify the action in the \WAVE{} menu file, be careful not to change the {\tt } tag at the beginning of the line, since \WAVE{} uses this tag to identify diff -Naur wfdb-10.1.5/waverc/Makefile wfdb-10.1.6/waverc/Makefile --- wfdb-10.1.5/waverc/Makefile Wed Jun 7 00:12:25 2000 +++ wfdb-10.1.6/waverc/Makefile Wed Aug 1 10:28:34 2001 @@ -25,12 +25,12 @@ # please visit PhysioNet (http://www.physionet.org/). # _____________________________________________________________________________ # file: version.def G. Moody 24 May 2000 -# Last revised: 6 June 2000 +# Last revised: 28 February 2001 # Each release of the WFDB Software Package is identified by a three-part # version number, defined here: MAJOR = 10 MINOR = 1 -RELEASE = 5 +RELEASE = 6 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # VDEFS is the set of C compiler options needed to set version number variables @@ -38,6 +38,7 @@ VDEFS = -DWFDB_MAJOR=$(MAJOR) -DWFDB_MINOR=$(MINOR) -DWFDB_RELEASE=$(RELEASE) # _____________________________________________________________________________ +PACKAGE=wfdb-10.1.6 # file: linux.def G. Moody 31 May 2000 # Last revised: 5 June 2000 # 'make' definitions for compiling the WFDB Software Package under Linux @@ -152,7 +153,7 @@ echo "Nothing to be done for lib-post-uninstall" # _____________________________________________________________________________ # file: Makefile.tpl G. Moody 24 May 2000 -# Last revised: 7 June 2000 +# Last revised: 19 June 2000 # Change the settings below as appropriate for your setup. # URLV is the command that starts your web browser if necessary and opens the @@ -161,27 +162,26 @@ # documentation. URLV='( netscape -remote "openURL($$1)" 2>/dev/null || netscape $$1 ) &' -# `make all' creates urlview, wavescript, and wave-remote without installing +# `make all' creates url_view, wavescript, and wave-remote without installing # them. all: wavescript wave-remote # `make install' installs `wavescript' and `wave-remote'. See the WAVE User's # Guide for instructions on setting up `wavescript' as a helper application for # your Web browser. -install: $(BINDIR) urlview wavescript wave-remote +install: $(BINDIR) url_view wavescript wave-remote $(STRIP) wavescript $(STRIP) wave-remote - cp urlview wavescript wave-remote $(BINDIR) - $(SETXPERMISSIONS) $(BINDIR)/urlview $(BINDIR)/wavescript \ - $(BINDIR)/wave-remote + $(SETXPERMISSIONS) url_view wavescript wave-remote + ../install.sh $(BINDIR) url_view wavescript wave-remote uninstall: - ../uninstall $(BINDIR) urlview wavescript wave-remote + ../uninstall.sh $(BINDIR) url_view wavescript wave-remote -# `urlview' opens a web browser to view a named URL. -urlview: Makefile - cp urlvhead urlview - echo $(URLV) >>urlview +# `url_view' opens a web browser to view a named URL. +url_view: Makefile + cp urlvhead url_view + echo $(URLV) >>url_view # `wavescript' reads commands from a named file and passes them to WAVE. wavescript: wavescript.c @@ -200,7 +200,7 @@ # `make clean': remove intermediate and backup files clean: - rm -f urlview wavescript wave-remote wave-remote-test *~ + rm -f url_view wavescript wave-remote wave-remote-test *~ # Create directory for installation if necessary. $(BINDIR): diff -Naur wfdb-10.1.5/waverc/Makefile.tpl wfdb-10.1.6/waverc/Makefile.tpl --- wfdb-10.1.5/waverc/Makefile.tpl Wed Jun 7 18:28:45 2000 +++ wfdb-10.1.6/waverc/Makefile.tpl Mon Jun 19 15:13:12 2000 @@ -1,5 +1,5 @@ # file: Makefile.tpl G. Moody 24 May 2000 -# Last revised: 7 June 2000 +# Last revised: 19 June 2000 # Change the settings below as appropriate for your setup. # URLV is the command that starts your web browser if necessary and opens the @@ -8,26 +8,26 @@ # documentation. URLV='( netscape -remote "openURL($$1)" 2>/dev/null || netscape $$1 ) &' -# `make all' creates urlview, wavescript, and wave-remote without installing +# `make all' creates url_view, wavescript, and wave-remote without installing # them. all: wavescript wave-remote # `make install' installs `wavescript' and `wave-remote'. See the WAVE User's # Guide for instructions on setting up `wavescript' as a helper application for # your Web browser. -install: $(BINDIR) urlview wavescript wave-remote +install: $(BINDIR) url_view wavescript wave-remote $(STRIP) wavescript $(STRIP) wave-remote - $(SETXPERMISSIONS) urlview wavescript wave-remote - ../install.sh $(BINDIR) urlview wavescript wave-remote + $(SETXPERMISSIONS) url_view wavescript wave-remote + ../install.sh $(BINDIR) url_view wavescript wave-remote uninstall: - ../uninstall.sh $(BINDIR) urlview wavescript wave-remote + ../uninstall.sh $(BINDIR) url_view wavescript wave-remote -# `urlview' opens a web browser to view a named URL. -urlview: Makefile - cp urlvhead urlview - echo $(URLV) >>urlview +# `url_view' opens a web browser to view a named URL. +url_view: Makefile + cp urlvhead url_view + echo $(URLV) >>url_view # `wavescript' reads commands from a named file and passes them to WAVE. wavescript: wavescript.c @@ -46,7 +46,7 @@ # `make clean': remove intermediate and backup files clean: - rm -f urlview wavescript wave-remote wave-remote-test *~ + rm -f url_view wavescript wave-remote wave-remote-test *~ # Create directory for installation if necessary. $(BINDIR): diff -Naur wfdb-10.1.5/waverc/urlvhead wfdb-10.1.6/waverc/urlvhead --- wfdb-10.1.5/waverc/urlvhead Thu Jun 24 11:38:28 1999 +++ wfdb-10.1.6/waverc/urlvhead Mon Jun 19 15:13:16 2000 @@ -1,10 +1,10 @@ #!/bin/sh -# file: urlview G. Moody 16 April 1997 +# file: url_view G. Moody 16 April 1997 # # Use this script to view an HTML document or any other URL, either by starting # your web browser or by instructing an already-running copy of your browser to # open the URL. if [ $# -lt 1 ]; then - echo usage: urlview URL; exit + echo usage: url_view URL; exit fi diff -Naur wfdb-10.1.5/waverc/wave-remote.c wfdb-10.1.6/waverc/wave-remote.c --- wfdb-10.1.5/waverc/wave-remote.c Sun Jan 30 04:13:27 2000 +++ wfdb-10.1.6/waverc/wave-remote.c Tue May 29 16:24:23 2001 @@ -1,10 +1,10 @@ /* file: wave-remote.c G. Moody 10 October 1996 - Last revised: 29 April 1999 + Last revised: 29 May 2001 Remote control for WAVE ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 1999 George B. Moody +Copyright (C) 2001 George B. Moody This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -45,6 +45,8 @@ -r RECORD [to (re)open RECORD] -a ANNOTATOR [to (re)open the specified ANNOTATOR for the current record] -f TIME [to go to the specified TIME in the current record] + -s SIGNAL ... [to specify signals to be displayed] + These messages are copies of the corresponding command-line arguments given to wave-remote. @@ -75,6 +77,7 @@ #include #include #include +#include char *pname; @@ -86,7 +89,8 @@ fprintf(stderr, " -f TIME\n"); fprintf(stderr, " -pid PROCESSID\n"); fprintf(stderr, " -r RECORD\n"); - fprintf(stderr, "At least one of -a, -f, and -r must be specified.\n"); + fprintf(stderr, " -s SIGNAL ...\n"); + fprintf(stderr, "At least one of -a, -f, -r, and -s must be specified.\n"); } int find_wave_pid() @@ -115,7 +119,7 @@ { char fname[30]; FILE *ofile; - int i, pid; + int i, j = 0, pid, siglist[WFDB_MAXSIG]; static char *ppid, *record, *annotator, *ptime; pname = argv[0]; @@ -153,9 +157,20 @@ } record = argv[i]; break; + case 's': /* signal numbers follow */ + if (++i >= argc) { + fprintf(stderr, "%s: -s must be followed by a signal number\n", + argv[0]); + exit(1); + } + while (i < argc && j < WFDB_MAXSIG && argv[i][0] != '-') + siglist[j++] = atoi(argv[i++]); + i--; + break; } } - if (annotator == NULL && ptime == NULL && record == NULL) { + siglist[j] = -1; + if (annotator == NULL && ptime == NULL && record == NULL && j == 0) { help(); exit(1); } @@ -172,6 +187,11 @@ if (annotator) sprintf(command+strlen(command), " -a %s", annotator); if (ptime) sprintf(command+strlen(command), " -f %s", ptime); + if (siglist[0] >= 0) { + sprintf(command+strlen(command), " -s %d", siglist[0]); + for (j = 1; siglist[j] >= 0; j++) + sprintf(command+strlen(command), " %d", siglist[j]); + } system(command); exit(0); } @@ -199,6 +219,12 @@ if (record) fprintf(ofile, "-r %s\n", record); if (annotator) fprintf(ofile, "-a %s\n", annotator); if (ptime) fprintf(ofile, "-f %s\n", ptime); + if (siglist[0] >= 0) { + fprintf(ofile, "-s %d", siglist[0]); + for (j = 1; siglist[j] >= 0; j++) + fprintf(ofile, " %d", siglist[j]); + fprintf(ofile, "\n"); + } fclose(ofile); kill(pid, SIGUSR1); /* signal to WAVE that the message is ready */ diff -Naur wfdb-10.1.5/waverc/wavescript.c wfdb-10.1.6/waverc/wavescript.c --- wfdb-10.1.5/waverc/wavescript.c Sun Jan 30 04:13:27 2000 +++ wfdb-10.1.6/waverc/wavescript.c Wed Aug 1 12:11:27 2001 @@ -1,10 +1,10 @@ /* file: wavescript.c G. Moody 10 October 1996 - Last revised: 17 October 1999 + Last revised: 1 August 2001 Remote control for WAVE via script ------------------------------------------------------------------------------- WAVE: Waveform analyzer, viewer, and editor -Copyright (C) 1999 George B. Moody +Copyright (C) 2001 George B. Moody This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -41,6 +41,7 @@ -a ANNOTATOR [to (re)open the specified ANNOTATOR for the current record] -f TIME [to go to the specified TIME in the current record] -p PATH [to add PATH to the list of locations for input files ] + -s SIGNAL [to specify signals to be displayed] These messages are copied from the file named in the first command-line argument, with one exception. @@ -72,29 +73,20 @@ to give WAVE a chance to empty it. If the mailbox is still not empty on a second look, wavescript advises the user to delete it and try again. -In unusual cases, wavescript may be unable to read the mailbox. This can -happen if the highest-numbered WAVE process belongs to another user, for -example. In such cases, wavescript advises the user to delete the mailbox -and try again. (Of course, you won't be able to do that if the mailbox really -does belong to another user; in this case, you can try using wavescript's --pid option to tell it to look in the mailbox belonging to your own WAVE -process.) +In unusual cases, wavescript may be unable to read the mailbox. In such cases, +wavescript advises the user to delete the mailbox and try again. If a record name is specified, and no WAVE processes can be found, wavescript starts a new WAVE process. The option -pid 0 prevents wavescript from looking for an existing WAVE process, so this method can be used to start WAVE unconditionally (though it's unclear why this would be useful). - -This program would be more reliable if it checked to see if the target process -has the same user ID as that of the wavescript process. On a typical -workstation, with only one user running WAVE at a time, however, the current -implementation is adequate. */ #include #include #include #include +#include char *pname; @@ -106,6 +98,7 @@ fprintf(stderr, " -f TIME\n"); fprintf(stderr, " -r RECORD\n"); fprintf(stderr, " -p PATH\n"); + fprintf(stderr, " -s SIGNAL ...\n"); fprintf(stderr, "Any lines in the SCRIPT not beginning with '-' are ignored.\n"); } @@ -134,17 +127,18 @@ #ifndef BINDIR #define BINDIR /usr/bin #endif +#define MAXARGS (WFDB_MAXSIG+12) #define STRING(A) #A -#define WAVE(A) STRING(A) ## "/wave" +#define PATH(A,B) STRING(A) "/" #B -int start_new_wave(record, annotator, ptime, path) -char *record, *annotator, *ptime, *path; +int start_new_wave(record, annotator, ptime, siglist, path) +char *record, *annotator, *ptime, **siglist, *path; { if (*record) { - static char *arg[16]; + static char *arg[MAXARGS+1]; int nargs; - arg[0] = "wave"; + arg[0] = PATH(BINDIR, wave); arg[1] = "-r"; arg[2] = record; nargs = 3; @@ -160,17 +154,21 @@ arg[nargs++] = "-p"; arg[nargs++] = path; } + if (*siglist) { + arg[nargs++] = "-s"; + while (nargs < MAXARGS && *siglist) + arg[nargs++] = *siglist++; + } arg[nargs] = NULL; + /* Send the standard error output to /dev/null. This avoids having such error output appear as dialog boxes when wavescript is run from - Netscape. WAVE's and the DB library's error messages are unaffected - by this choice (since they are handled within WAVE), but the XView - library sometimes generates error messages (particularly under - Linux, where the message "ttysw_sigwinch, can't get tty process - group: Not a typewriter" appears whenever the Analysis Commands - window opens or closes). These may be safely ignored. */ + Netscape. WAVE's and the WFDB library's error messages are + unaffected by this choice (since they are handled within WAVE), but + the XView library sometimes generates warning messages that may be + safely ignored. */ freopen("/dev/null", "w", stderr); - return (execve(WAVE(BINDIR), arg, environ)); + return (execve(arg[0], arg, environ)); } else { /* We can't start WAVE without specifying which record to open @@ -186,8 +184,9 @@ { char fname[30], *p, *q; FILE *ofile = NULL, *script; - int i, pid; + int i = 0, pid; static char buf[80], record[80], annotator[80], ptime[80], path[80]; + static char *siglist[WFDB_MAXSIG], sigstrings[80]; pname = argv[0]; environ = env; @@ -221,6 +220,18 @@ strcpy(record, q); record[strlen(record)-1] = '\0'; break; + case 's': /* signal numbers follow */ + strcpy(sigstrings, q); /* copy the list of signal numbers */ + sigstrings[strlen(sigstrings)-1] = ' '; /* append a space */ + q = sigstrings; + while (*q && i < WFDB_MAXSIG) { /* split the list into tokens */ + siglist[i++] = q++; /* save pointer to current token */ + while (*q != ' ' && *q != '\t') /* find the end of the token */ + q++; + *q++ = '\0'; /* split the list at the end of the token */ + while (*q == ' ' || *q == '\t') + q++; /* look for the next token, if any */ + } } } fclose(script); @@ -231,7 +242,8 @@ } if (argc == 4 && strncmp(argv[2], "-p", 2) == 0) { /* pid specified */ pid = atoi(argv[3]); - if (pid == 0) exit(start_new_wave(record, annotator, ptime, path)); + if (pid == 0) + exit(start_new_wave(record, annotator, ptime, siglist, path)); sprintf(fname, "/tmp/.wave.%d.%d", (int)getuid(), pid); if ((ofile = fopen(fname, "r")) == NULL) { fprintf(stderr, @@ -246,8 +258,7 @@ sprintf(fname, "/tmp/.wave.%d.%d", (int)getuid(), pid); ofile = fopen(fname, "r"); /* attempt to read from file */ if (ofile == NULL && pid == find_wave_pid()) { - /* The mailbox is unreadable -- it may be owned by another - user. */ + /* The mailbox is unreadable */ fprintf(stderr, "Please remove %s and try again.\n", fname); exit(3); } @@ -260,7 +271,7 @@ sleep(2); /* give WAVE a chance to empty it */ if ((ofile = fopen(fname, "r")) == NULL) /* WAVE must have just exited, or someone else cleaned up. */ - exit(start_new_wave(record, annotator, ptime, path)); + exit(start_new_wave(record, annotator, ptime, siglist, path)); if (fgetc(ofile) != EOF) { /* The mailbox is still full -- WAVE may be stuck, or it may have crashed without removing the mailbox. */ @@ -269,7 +280,7 @@ fprintf(stderr, "WAVE process %d not responding -- starting new WAVE process\n", pid); - exit(start_new_wave(record, annotator, ptime, path)); + exit(start_new_wave(record, annotator, ptime, siglist, path)); } } @@ -279,6 +290,12 @@ if (*record) fprintf(ofile, "-r %s\n", record); if (*annotator) fprintf(ofile, "-a %s\n", annotator); if (*ptime) fprintf(ofile, "-f %s\n", ptime); + if (siglist[0]) { + fprintf(ofile, "-s %s", siglist[0]); + for (i = 1; i < WFDB_MAXSIG && siglist[i]; i++) + fprintf(ofile, " %s", siglist[i]); + fprintf(ofile, "\n"); + } fclose(ofile); kill(pid, SIGUSR1); /* signal to WAVE that the message is ready */ @@ -286,5 +303,5 @@ } else - exit(start_new_wave(record, annotator, ptime, path)); + exit(start_new_wave(record, annotator, ptime, siglist, path)); }