head 1.5; access; symbols pkgsrc-2013Q2:1.5.0.32 pkgsrc-2013Q2-base:1.5 pkgsrc-2012Q4:1.5.0.30 pkgsrc-2012Q4-base:1.5 pkgsrc-2011Q4:1.5.0.28 pkgsrc-2011Q4-base:1.5 pkgsrc-2011Q2:1.5.0.26 pkgsrc-2011Q2-base:1.5 pkgsrc-2009Q4:1.5.0.24 pkgsrc-2009Q4-base:1.5 pkgsrc-2008Q4:1.5.0.22 pkgsrc-2008Q4-base:1.5 pkgsrc-2008Q3:1.5.0.20 pkgsrc-2008Q3-base:1.5 cube-native-xorg:1.5.0.18 cube-native-xorg-base:1.5 pkgsrc-2008Q2:1.5.0.16 pkgsrc-2008Q2-base:1.5 pkgsrc-2008Q1:1.5.0.14 pkgsrc-2008Q1-base:1.5 pkgsrc-2007Q4:1.5.0.12 pkgsrc-2007Q4-base:1.5 pkgsrc-2007Q3:1.5.0.10 pkgsrc-2007Q3-base:1.5 pkgsrc-2007Q2:1.5.0.8 pkgsrc-2007Q2-base:1.5 pkgsrc-2007Q1:1.5.0.6 pkgsrc-2007Q1-base:1.5 pkgsrc-2006Q4:1.5.0.4 pkgsrc-2006Q4-base:1.5 pkgsrc-2006Q3:1.5.0.2 pkgsrc-2006Q3-base:1.5 pkgsrc-2006Q2:1.4.0.14 pkgsrc-2006Q2-base:1.4 pkgsrc-2006Q1:1.4.0.12 pkgsrc-2006Q1-base:1.4 pkgsrc-2005Q4:1.4.0.10 pkgsrc-2005Q4-base:1.4 pkgsrc-2005Q3:1.4.0.8 pkgsrc-2005Q3-base:1.4 pkgsrc-2005Q2:1.4.0.6 pkgsrc-2005Q2-base:1.4 pkgsrc-2005Q1:1.4.0.4 pkgsrc-2005Q1-base:1.4 pkgsrc-2004Q4:1.4.0.2 pkgsrc-2004Q4-base:1.4 pkgsrc-2004Q3:1.2.0.6 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.4 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.2 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.1.0.10 pkgsrc-2003Q4-base:1.1 netbsd-1-6-1:1.1.0.6 netbsd-1-6-1-base:1.1 netbsd-1-6:1.1.0.8 netbsd-1-6-RELEASE-base:1.1 pkgviews:1.1.0.4 pkgviews-base:1.1 buildlink2:1.1.0.2 buildlink2-base:1.1 netbsd-1-5-PATCH003:1.1 netbsd-1-5-PATCH001:1.1 netbsd-1-5-RELEASE:1.1 netbsd-1-4-PATCH003:1.1 netbsd-1-4-PATCH002:1.1 comdex-fall-1999:1.1; locks; strict; comment @# @; 1.5 date 2006.08.10.03.45.32; author minskim; state dead; branches; next 1.4; 1.4 date 2004.10.22.19.32.35; author jmmv; state Exp; branches; next 1.3; 1.3 date 2004.10.22.12.49.02; author kei; state Exp; branches; next 1.2; 1.2 date 2003.12.24.12.51.31; author jmmv; state dead; branches; next 1.1; 1.1 date 99.10.04.23.21.44; author simonb; state Exp; branches; next ; desc @@ 1.5 log @Remove teTeX2. @ text @$NetBSD: patch-ag,v 1.4 2004/10/22 19:32:35 jmmv Exp $ This diff is taken from the url below: http://cvs.sourceforge.net/viewcvs.py/xdvi/xdvik/texk/xdvik/xdvizilla?r1=text&tr1=1.2&r2=text&tr2=1.10&diff_format=u =================================================================== RCS file: /cvsroot/xdvi/xdvik/texk/xdvik/xdvizilla,v retrieving revision 1.2 retrieving revision 1.10 diff -u -r1.2 -r1.10 --- texk/xdvik/xdvizilla 2002/10/12 13:29:17 1.2 +++ texk/xdvik/xdvizilla 2004/02/24 22:37:37 1.10 @@@@ -1,11 +1,68 @@@@ #! /bin/sh - +# # This is a kludge to fix helper apps in mozilla. See mozilla bugs #57420 # and also #78919. - +# # It's also useful for tar files with Netscape 4.x +# +# Copyright (c) 2002-2004 Paul Vojta +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL PAUL VOJTA OR ANY OTHER AUTHOR OF OR CONTRIBUTOR TO +# THIS SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. + +# Some changes suggested by Thomas Esser included by +# . +IN_FILE= NO_RM= +TMP_DIR= +progname=xdvizilla + +do_cleanup() +{ + exitval=$? + if [ -z "$NO_RM" -a -n "$IN_FILE" ] ; then + rm -f "$IN_FILE" + fi + test -n "$TMP_DIR" && rm -rf "$TMP_DIR" + exit $exitval +} + +do_abort() +{ + xmessage -nearmouse "$progname: $1" + do_cleanup + exit 1 +} + +usage() +{ + xmessage -nearmouse "Usage: $progname [-no-rm] " + do_cleanup + exit 1 +} + +trap 'do_cleanup' 1 2 3 7 13 15 + +### create a temporary directory only read/writable by user +TMP_DIR=${TMP-/tmp}/$progname.$$ +(umask 077; mkdir "$TMP_DIR") || do_abort "Could not create directory \`$TMP_DIR'" if [ $# -gt 1 -a "x$1" = "x-no-rm" ]; then NO_RM=y @@@@ -13,8 +70,7 @@@@ fi if [ $# -ne 1 ]; then - xmessage -nearmouse 'Usage: xdvizilla [-no-rm] ' - exit 1 + usage fi DIR=`dirname "$0"` @@@@ -27,55 +83,52 @@@@ DIR= fi -FILE=$1 -FILETYPE=`file "$FILE"` - -case "$FILETYPE" in - - *"gzip compressed data"*) - FILE=/tmp/xdvizilla$$ - gunzip -c "$1" > $FILE - [ -n "$NO_RM" ] || rm -f -- "$1" - NO_RM= - FILETYPE=`file "$FILE"` - ;; - - *"compressed data"* | *"compress'd data"*) - FILE=/tmp/xdvizilla$$ - uncompress -c "$1" > $FILE - [ -n "$NO_RM" ] || rm -f -- "$1" - NO_RM= - FILETYPE=`file "$FILE"` - ;; - - "$1: empty") - xmessage -nearmouse "$1 is an empty file -(this is a bug in Mozilla)" - [ -n "$NO_RM" ] || rm -f -- "$1" - exit 1 - ;; - -esac - -case "$FILETYPE" in - - *" tar archive") - TARDIR=/tmp/xdvitar$$ - mkdir $TARDIR - cat "$FILE" | (cd $TARDIR; tar xf -) - DVINAME=`tar tf "$FILE" | grep '\.dvi$' | head -1` - [ -n "$NO_RM" ] || rm -f -- "$FILE" - if [ -z "$DVINAME" ]; then - xmessage -nearmouse "Tar file does not contain a dvi file" - else - (cd $TARDIR; "$DIR"xdvi -safer "$DVINAME") - fi - rm -rf $TARDIR - ;; +# need to preserve IN_FILE for eventual deletion +IN_FILE="$1" +TMP_FILE="$IN_FILE" + +while [ 1 ]; do + [ -f "$TMP_FILE" ] || do_abort "$TMP_FILE: File not found." + FILETYPE=`file "$TMP_FILE"` + case "$FILETYPE" in + *"gzip compressed data"*) + out="$TMP_DIR"/tmp-gz + gunzip -c "$TMP_FILE" > "$out" + TMP_FILE="$out" + ;; + *"compressed data"* | *"compress'd data"*) + out="$TMP_DIR"/tmp-compress + uncompress -c "$TMP_FILE" > "$out" + TMP_FILE="$out" + ;; + "$TMP_FILE: empty") + do_abort "$TMP_FILE is an empty file +(probably a bug in Mozilla?)" + ;; + *" tar archive") + ### do sanity checks on the tar archive, to avoid overwriting user files: + dangerous=`tar tf "$TMP_FILE" | egrep '^(/|.*\.\./)'` + [ -z "$dangerous" ] || do_abort "Tar file contains files with absolute paths or \`../' components, +which may overwrite user files. Not unpacking it." + ### also check for gzipped DVI files inside the archive ... + out="$TMP_DIR"/`tar tf "$TMP_FILE" | egrep '\.(dvi|dvi.gz|dvi.Z)$' | head -1` + if [ -z "$out" ]; then + do_abort "Tar file does not contain a dvi file." + else + cat "$TMP_FILE" | (cd "$TMP_DIR"; tar xf -) + TMP_FILE="$out" + fi + ;; + *"DVI file"*) + "$DIR"xdvi -safer "$TMP_FILE" + break + ;; + *) + do_abort "$TMP_FILE: Unrecognized file format!" + ;; + esac +done - *) - "$DIR"xdvi -safer "$FILE" - [ -n "$NO_RM" ] || rm -f -- "$FILE" - ;; +do_cleanup -esac +exit 0 @ 1.4 log @Fix path to file to patch. Closes PR pkg/27355. @ text @d1 1 a1 1 $NetBSD: patch-ag,v 1.3 2004/10/22 12:49:02 kei Exp $ @ 1.3 log @xdvizilla had unsafe temporary file usage. fixes (diffs between 1.2 and 1.10) are pulled from its CVS repository. closes pkga22940 by Jeremy C. Reed. @ text @d1 1 a1 1 $NetBSD$ d11 2 a12 2 --- xdvi/xdvik/texk/xdvik/xdvizilla 2002/10/12 13:29:17 1.2 +++ xdvi/xdvik/texk/xdvik/xdvizilla 2004/02/24 22:37:37 1.10 @ 1.2 log @Update teTeX packages to 2.0.2 (really merge teTeX2 into teTeX). The 2.x branch becomes the default teTeX package. @ text @d1 1 a1 1 $NetBSD: patch-ag,v 1.1 1999/10/04 23:21:44 simonb Exp $ d3 194 a196 11 --- texk/ps2pkm/curves.c.orig Wed Jan 28 20:44:07 1998 +++ texk/ps2pkm/curves.c Thu Sep 30 13:33:49 1999 @@@@ -213,7 +213,7 @@@@ if ( TOOBIG(xB) || TOOBIG(yB) || TOOBIG(xC) || TOOBIG(yC) || TOOBIG(xD) || TOOBIG(yD) ) - abort("Beziers this big not yet supported"); + t1_abort("Beziers this big not yet supported"); return(StepBezierRecurse(&Info, (fractpel) 0, (fractpel) 0, xB, yB, xC, yC, xD, yD)); @ 1.1 log @Don't use a function called "abort" that takes one char * as a parameter. Fixes compile problems on at least pmax, arm32. @ text @d1 1 a1 1 $NetBSD$ @