AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
December 1994

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



1994.12.14 17:17 "", by Peder Langlo

#---------------------------------- cut here ----------------------------------
# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by Peder Langlo <pederl@hpubgon> on Wed Dec 14 18:17:26 1994
#
# This archive contains:
#	Star_21x20.tiff	
#
# Existing files will not be overwritten.

LANG=""; export LANG
PATH=/bin:/usr/bin:$PATH; export PATH

if test -f Star_21x20.tiff
then
	echo Ok to overwrite existing file Star_21x20.tiff\?
	read answer
	case "$answer" in
	[yY]*)	echo Proceeding;;
	*)	echo Aborting; exit 1;;
	esac
	rm -f Star_21x20.tiff
	if test -f Star_21x20.tiff
	then
		echo Error: could not remove Star_21x20.tiff, aborting
		exit 1
	fi
fi

rm -f /tmp/uud$$
(echo "begin 666 /tmp/uud$$\n#;VL*n#6%@x\n \nend" | uudecode) >/dev/null 2>&1
if [ X"`cat /tmp/uud$$ 2>&1`" = Xok ]
then
	unpacker=uudecode
else
	echo Compiling unpacker for non-ascii files
	pwd=`pwd`; cd /tmp
	cat >unpack$$.c <<'EOF'
#include <stdio.h>
#define C (*p++ - ' ' & 077)
main()
{
	int n;
	char buf[128], *p, a,b;

	scanf("begin %o ", &n);
	gets(buf);

	if (freopen(buf, "w", stdout) == NULL) {
		perror(buf);
		exit(1);
	}

	while (gets(p=buf) && (n=C)) {
		while (n>0) {
			a = C;
			if (n-- > 0) putchar(a << 2 | (b=C) >> 4);
			if (n-- > 0) putchar(b << 4 | (a=C) >> 2);
			if (n-- > 0) putchar(a << 6 | C);
		}
	}
	exit(0);
}
EOF
	cc -o unpack$$ unpack$$.c
	rm unpack$$.c
	cd $pwd
	unpacker=/tmp/unpack$$
fi
rm -f /tmp/uud$$

echo x - Star_21x20.tiff '[non-ascii]'
$unpacker <<'@eof'
begin 644 Star_21x20.tiff
M34T *@   HC_________________________________________\/______X
M____________ / /___________________P__________________\ \ __X
M__________________#________________P#P#P#P#_________________X
M\/________________ /\/ / /_________________P________________X
M\ [P\ \ \ ________________#______________P#P#O#P#P#P#_______X
M________\/______________ /\.\/\/ / / /_____________P\ \ \ \ X
M\ \ \ \ [P_P[P\ \ \ \ \ \ \ \ \ __#__P#P#O#_#O#_#O#_#O#_#O#_X
M#O#_#O#P#P#P#___\/____ / / .\.\/\.\.\.\/\.\.\/ / / / /_____PX
M______\ \ \ _P[P_P[P_P[P_P\ \ \ \ ________#__________P#P#O#OX
M#_#O#O#P#P#P#P#_________\/__________ / .\/\.\/\.\/ / / /____X
M_______P__________\ [P_P[P\ [P_P[P\ \ ____________#________PX
M#P#_#O#P#P#P#O#_#P#P#P#_________\/________ /\.\/ / / / / .\/X
M\/ / /_________P________\ [P\ \ \ ____\ \ [P\ \ \ ________#_X
M_____P#P#P#P#P#________P#P#P#P#P#_______\/______ / / /______X
M__________ / / /_______P  P!   #     0 5   ! 0 #     0 4   !X
M @ #     P   QX! P #     0 !   !!@ #     0 "   !$0 $     0  X
M  @!%0 #     0 #   !%P $     0   H !&@ %     0   R0!&P %    X
M 0   RP!'  #     0 !   !*  #     0 "          0 !  $  K\@   X
*)Q  "OR    G$                                               X
                                                             X
end
@eof

chmod 644 Star_21x20.tiff

rm -f /tmp/unpack$$
exit 0