head	1.2;
access;
symbols
	perseant-exfatfs-base-20250801:1.2
	perseant-exfatfs-base-20240630:1.2
	perseant-exfatfs:1.2.0.2
	perseant-exfatfs-base:1.2
	netbsd-8-3-RELEASE:1.1.1.1
	netbsd-9-4-RELEASE:1.1.1.1
	netbsd-9-3-RELEASE:1.1.1.1
	cjep_sun2x-base1:1.1.1.1
	cjep_sun2x:1.1.1.1.0.50
	cjep_sun2x-base:1.1.1.1
	cjep_staticlib_x-base1:1.1.1.1
	netbsd-9-2-RELEASE:1.1.1.1
	cjep_staticlib_x:1.1.1.1.0.48
	cjep_staticlib_x-base:1.1.1.1
	netbsd-9-1-RELEASE:1.1.1.1
	phil-wifi-20200421:1.1.1.1
	phil-wifi-20200411:1.1.1.1
	is-mlppp:1.1.1.1.0.46
	is-mlppp-base:1.1.1.1
	phil-wifi-20200406:1.1.1.1
	netbsd-8-2-RELEASE:1.1.1.1
	netbsd-9-0-RELEASE:1.1.1.1
	netbsd-9-0-RC2:1.1.1.1
	netbsd-9-0-RC1:1.1.1.1
	phil-wifi-20191119:1.1.1.1
	expat-2-2-8:1.1.1.1
	netbsd-9:1.1.1.1.0.44
	netbsd-9-base:1.1.1.1
	phil-wifi-20190609:1.1.1.1
	netbsd-8-1-RELEASE:1.1.1.1
	netbsd-8-1-RC1:1.1.1.1
	pgoyette-compat-merge-20190127:1.1.1.1
	pgoyette-compat-20190127:1.1.1.1
	pgoyette-compat-20190118:1.1.1.1
	pgoyette-compat-1226:1.1.1.1
	pgoyette-compat-1126:1.1.1.1
	pgoyette-compat-1020:1.1.1.1
	pgoyette-compat-0930:1.1.1.1
	pgoyette-compat-0906:1.1.1.1
	netbsd-7-2-RELEASE:1.1.1.1
	pgoyette-compat-0728:1.1.1.1
	netbsd-8-0-RELEASE:1.1.1.1
	phil-wifi:1.1.1.1.0.42
	phil-wifi-base:1.1.1.1
	pgoyette-compat-0625:1.1.1.1
	netbsd-8-0-RC2:1.1.1.1
	pgoyette-compat-0521:1.1.1.1
	pgoyette-compat-0502:1.1.1.1
	pgoyette-compat-0422:1.1.1.1
	netbsd-8-0-RC1:1.1.1.1
	pgoyette-compat-0415:1.1.1.1
	pgoyette-compat-0407:1.1.1.1
	pgoyette-compat-0330:1.1.1.1
	pgoyette-compat-0322:1.1.1.1
	pgoyette-compat-0315:1.1.1.1
	netbsd-7-1-2-RELEASE:1.1.1.1
	pgoyette-compat:1.1.1.1.0.40
	pgoyette-compat-base:1.1.1.1
	netbsd-7-1-1-RELEASE:1.1.1.1
	matt-nb8-mediatek:1.1.1.1.0.38
	matt-nb8-mediatek-base:1.1.1.1
	perseant-stdc-iso10646:1.1.1.1.0.36
	perseant-stdc-iso10646-base:1.1.1.1
	expat-2-2-1:1.1.1.1
	netbsd-8:1.1.1.1.0.34
	netbsd-8-base:1.1.1.1
	prg-localcount2-base3:1.1.1.1
	prg-localcount2-base2:1.1.1.1
	prg-localcount2-base1:1.1.1.1
	prg-localcount2:1.1.1.1.0.32
	prg-localcount2-base:1.1.1.1
	pgoyette-localcount-20170426:1.1.1.1
	bouyer-socketcan-base1:1.1.1.1
	pgoyette-localcount-20170320:1.1.1.1
	netbsd-7-1:1.1.1.1.0.30
	netbsd-7-1-RELEASE:1.1.1.1
	netbsd-7-1-RC2:1.1.1.1
	expat-2-2-0:1.1.1.1
	netbsd-7-nhusb-base-20170116:1.1.1.1
	bouyer-socketcan:1.1.1.1.0.28
	bouyer-socketcan-base:1.1.1.1
	pgoyette-localcount-20170107:1.1.1.1
	netbsd-7-1-RC1:1.1.1.1
	pgoyette-localcount-20161104:1.1.1.1
	netbsd-7-0-2-RELEASE:1.1.1.1
	localcount-20160914:1.1.1.1
	netbsd-7-nhusb:1.1.1.1.0.26
	netbsd-7-nhusb-base:1.1.1.1
	pgoyette-localcount-20160806:1.1.1.1
	pgoyette-localcount-20160726:1.1.1.1
	pgoyette-localcount:1.1.1.1.0.24
	pgoyette-localcount-base:1.1.1.1
	netbsd-7-0-1-RELEASE:1.1.1.1
	expat-2-1-1:1.1.1.1
	netbsd-7-0:1.1.1.1.0.22
	netbsd-7-0-RELEASE:1.1.1.1
	netbsd-7-0-RC3:1.1.1.1
	netbsd-7-0-RC2:1.1.1.1
	netbsd-7-0-RC1:1.1.1.1
	netbsd-6-0-6-RELEASE:1.1.1.1
	netbsd-6-1-5-RELEASE:1.1.1.1
	netbsd-7:1.1.1.1.0.20
	netbsd-7-base:1.1.1.1
	yamt-pagecache-base9:1.1.1.1
	yamt-pagecache-tag8:1.1.1.1.4.2
	netbsd-6-1-4-RELEASE:1.1.1.1
	netbsd-6-0-5-RELEASE:1.1.1.1
	tls-earlyentropy:1.1.1.1.0.18
	tls-earlyentropy-base:1.1.1.1
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.1
	riastradh-drm2-base3:1.1.1.1
	netbsd-6-1-3-RELEASE:1.1.1.1
	netbsd-6-0-4-RELEASE:1.1.1.1
	netbsd-6-1-2-RELEASE:1.1.1.1
	netbsd-6-0-3-RELEASE:1.1.1.1
	netbsd-6-1-1-RELEASE:1.1.1.1
	riastradh-drm2-base2:1.1.1.1
	riastradh-drm2-base1:1.1.1.1
	riastradh-drm2:1.1.1.1.0.12
	riastradh-drm2-base:1.1.1.1
	netbsd-6-1:1.1.1.1.0.16
	netbsd-6-0-2-RELEASE:1.1.1.1
	netbsd-6-1-RELEASE:1.1.1.1
	netbsd-6-1-RC4:1.1.1.1
	netbsd-6-1-RC3:1.1.1.1
	agc-symver:1.1.1.1.0.14
	agc-symver-base:1.1.1.1
	netbsd-6-1-RC2:1.1.1.1
	netbsd-6-1-RC1:1.1.1.1
	yamt-pagecache-base8:1.1.1.1
	netbsd-6-0-1-RELEASE:1.1.1.1
	yamt-pagecache-base7:1.1.1.1
	matt-nb6-plus-nbase:1.1.1.1
	yamt-pagecache-base6:1.1.1.1
	netbsd-6-0:1.1.1.1.0.10
	netbsd-6-0-RELEASE:1.1.1.1
	netbsd-6-0-RC2:1.1.1.1
	tls-maxphys:1.1.1.1.0.8
	tls-maxphys-base:1.1.1.1
	matt-nb6-plus:1.1.1.1.0.6
	matt-nb6-plus-base:1.1.1.1
	netbsd-6-0-RC1:1.1.1.1
	yamt-pagecache-base5:1.1.1.1
	yamt-pagecache:1.1.1.1.0.4
	yamt-pagecache-base4:1.1.1.1
	expat-2-1-0:1.1.1.1
	netbsd-6:1.1.1.1.0.2
	netbsd-6-base:1.1.1.1
	expat-2-0-1:1.1.1.1
	expat:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2022.02.23.15.24.05;	author christos;	state dead;
branches;
next	1.1;
commitid	YS4T7180BxJ8UKtD;

1.1
date	2012.02.11.18.18.23;	author tron;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2012.02.11.18.18.23;	author tron;	state Exp;
branches
	1.1.1.1.4.1;
next	;

1.1.1.1.4.1
date	2012.02.11.18.18.23;	author yamt;	state dead;
branches;
next	1.1.1.1.4.2;

1.1.1.1.4.2
date	2012.04.17.00.04.41;	author yamt;	state Exp;
branches;
next	;


desc
@@


1.2
log
@merge conflicts between expat-2.2.8 and expat-2.4.6
@
text
@#!/bin/sh
# Look for program[s] somewhere in $PATH.
#
# Options:
#  -s
#    Do not print out full pathname. (silent)
#  -pPATHNAME
#    Look in PATHNAME instead of $PATH
#
# Usage:
#  PrintPath [-s] [-pPATHNAME] program [program ...]
#
# Initially written by Jim Jagielski for the Apache configuration mechanism
#  (with kudos to Kernighan/Pike)
#
# This script falls under the Apache License.
# See http://www.apache.org/licenses/LICENSE

##
# Some "constants"
##
pathname=$PATH
echo="yes"

##
# Find out what OS we are running for later on
##
os=`(uname) 2>/dev/null`

##
# Parse command line
##
for args in $*
do
    case $args in
	-s  ) echo="no" ;;
	-p* ) pathname="`echo $args | sed 's/^..//'`" ;;
	*   ) programs="$programs $args" ;;
    esac
done

##
# Now we make the adjustments required for OS/2 and everyone
# else :)
#
# First of all, all OS/2 programs have the '.exe' extension.
# Next, we adjust PATH (or what was given to us as PATH) to
# be whitespace separated directories.
# Finally, we try to determine the best flag to use for
# test/[] to look for an executable file. OS/2 just has '-r'
# but with other OSs, we do some funny stuff to check to see
# if test/[] knows about -x, which is the preferred flag.
##

if [ "x$os" = "xOS/2" ]
then
    ext=".exe"
    pathname=`echo -E $pathname |
     sed 's/^;/.;/
	  s/;;/;.;/g
	  s/;$/;./
	  s/;/ /g
	  s/\\\\/\\//g' `
    test_exec_flag="-r"
else
    ext=""	# No default extensions
    pathname=`echo $pathname |
     sed 's/^:/.:/
	  s/::/:.:/g
	  s/:$/:./
	  s/:/ /g' `
    # Here is how we test to see if test/[] can handle -x
    testfile="pp.t.$$"

    cat > $testfile <<ENDTEST
#!/bin/sh
if [ -x / ] || [ -x /bin ] || [ -x /bin/ls ]; then
    exit 0
fi
exit 1
ENDTEST

    if `/bin/sh $testfile 2>/dev/null`; then
	test_exec_flag="-x"
    else
	test_exec_flag="-r"
    fi
    rm -f $testfile
fi

for program in $programs
do
    for path in $pathname
    do
	if [ $test_exec_flag $path/${program}${ext} ] && \
	   [ ! -d $path/${program}${ext} ]; then
	    if [ "x$echo" = "xyes" ]; then
		echo $path/${program}${ext}
	    fi
	    exit 0
	fi

# Next try without extension (if one was used above)
	if [ "x$ext" != "x" ]; then
            if [ $test_exec_flag $path/${program} ] && \
               [ ! -d $path/${program} ]; then
                if [ "x$echo" = "xyes" ]; then
                    echo $path/${program}
                fi
                exit 0
            fi
        fi
    done
done
exit 1

@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Initial import of "expat" 2.0.1 into base:
This is James Clark's expat XML parser library in C. It is a stream
oriented parser that requires setting handlers to deal with the
structure that the parser discovers in the document.

This is the first part of the fix for PR lib/40346.
@
text
@@


1.1.1.1.4.1
log
@file PrintPath was added on branch yamt-pagecache on 2012-04-17 00:04:41 +0000
@
text
@d1 116
@


1.1.1.1.4.2
log
@sync with head
@
text
@a0 116
#!/bin/sh
# Look for program[s] somewhere in $PATH.
#
# Options:
#  -s
#    Do not print out full pathname. (silent)
#  -pPATHNAME
#    Look in PATHNAME instead of $PATH
#
# Usage:
#  PrintPath [-s] [-pPATHNAME] program [program ...]
#
# Initially written by Jim Jagielski for the Apache configuration mechanism
#  (with kudos to Kernighan/Pike)
#
# This script falls under the Apache License.
# See http://www.apache.org/licenses/LICENSE

##
# Some "constants"
##
pathname=$PATH
echo="yes"

##
# Find out what OS we are running for later on
##
os=`(uname) 2>/dev/null`

##
# Parse command line
##
for args in $*
do
    case $args in
	-s  ) echo="no" ;;
	-p* ) pathname="`echo $args | sed 's/^..//'`" ;;
	*   ) programs="$programs $args" ;;
    esac
done

##
# Now we make the adjustments required for OS/2 and everyone
# else :)
#
# First of all, all OS/2 programs have the '.exe' extension.
# Next, we adjust PATH (or what was given to us as PATH) to
# be whitespace separated directories.
# Finally, we try to determine the best flag to use for
# test/[] to look for an executable file. OS/2 just has '-r'
# but with other OSs, we do some funny stuff to check to see
# if test/[] knows about -x, which is the preferred flag.
##

if [ "x$os" = "xOS/2" ]
then
    ext=".exe"
    pathname=`echo -E $pathname |
     sed 's/^;/.;/
	  s/;;/;.;/g
	  s/;$/;./
	  s/;/ /g
	  s/\\\\/\\//g' `
    test_exec_flag="-r"
else
    ext=""	# No default extensions
    pathname=`echo $pathname |
     sed 's/^:/.:/
	  s/::/:.:/g
	  s/:$/:./
	  s/:/ /g' `
    # Here is how we test to see if test/[] can handle -x
    testfile="pp.t.$$"

    cat > $testfile <<ENDTEST
#!/bin/sh
if [ -x / ] || [ -x /bin ] || [ -x /bin/ls ]; then
    exit 0
fi
exit 1
ENDTEST

    if `/bin/sh $testfile 2>/dev/null`; then
	test_exec_flag="-x"
    else
	test_exec_flag="-r"
    fi
    rm -f $testfile
fi

for program in $programs
do
    for path in $pathname
    do
	if [ $test_exec_flag $path/${program}${ext} ] && \
	   [ ! -d $path/${program}${ext} ]; then
	    if [ "x$echo" = "xyes" ]; then
		echo $path/${program}${ext}
	    fi
	    exit 0
	fi

# Next try without extension (if one was used above)
	if [ "x$ext" != "x" ]; then
            if [ $test_exec_flag $path/${program} ] && \
               [ ! -d $path/${program} ]; then
                if [ "x$echo" = "xyes" ]; then
                    echo $path/${program}
                fi
                exit 0
            fi
        fi
    done
done
exit 1

@


