v02i081: pbm - Portable Bitmap programs, Part 2/4

Jef Poskanzer jef at webster.UUCP
Wed Mar 30 06:02:52 AEST 1988


Submitted-By: "Jef Poskanzer" <jef at webster.UUCP>

Archive-Name: pbm/Part2


comp.sources.misc: Volume 2, Issue 81
Submitted-By: "Jef Poskanzer" <jef at webster.UUCP>
Archive-Name: pbm/Part2

#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	xbmtopbm.c
#	xbmtopbm.man
#	xwdtopbm.c
#	xwdtopbm.man
#	pbmtocbm.c
#	pbmtocbm.man
#	pbmtoicon.c
#	pbmtoicon.man
#	pbmtops.c
#	pbmtops.man
#	pbmtoptx.c
#	pbmtoptx.man
#	pbmtorast.c
#	pbmtorast.man
# This archive created: Mon Mar 28 12:12:08 1988
# By:	Jef Poskanzer (Paratheo-Anametamystikhood Of Eris Esoteric, Ada Lovelace Cabal)
export PATH; PATH=/bin:$PATH
echo shar: extracting "'xbmtopbm.c'" '(4125 characters)'
if test -f 'xbmtopbm.c'
then
	echo shar: will not over-write existing file "'xbmtopbm.c'"
else
sed 's/^X//' << \SHAR_EOF > 'xbmtopbm.c'
X/* xbmtopbm.c - read an X bitmap file and produce a portable bitmap
X**
X** Copyright (C) 1988 by Jef Poskanzer.
X**
X** Permission to use, copy, modify, and distribute this software and its
X** documentation for any purpose and without fee is hereby granted, provided
X** that the above copyright notice appear in all copies and that both that
X** copyright notice and this permission notice appear in supporting
X** documentation.  This software is provided "as is" without express or
X** implied warranty.
X*/
X
X#include <stdio.h>
X#include <sys/types.h>
X#include "pbm.h"
X
Xmain( argc, argv )
Xint argc;
Xchar *argv[];
X    {
X    FILE *ifd;
X    bit **bits;
X    int rows, cols, row, col, charcount;
X    char *data, mask;
X
X    if ( argc > 2 )
X	{
X	fprintf( stderr, "usage: %s [bitmapfile]\n", argv[0] );
X	exit( 1 );
X	}
X    
X    if ( argc == 2 )
X	{
X	ifd = fopen( argv[1], "r" );
X	if ( ifd == NULL )
X	    {
X	    fprintf( stderr, "%s: can't open.\n", argv[1] );
X	    exit( 1 );
X	    }
X	}
X    else
X	ifd = stdin;
X
X    if ( ReadBitmapFile( ifd, &cols, &rows, &data ) < 0 )
X	{
X	fprintf( stderr, "%s: can't load.\n", argv[1] );
X	exit( 1 );
X	}
X
X    if ( ifd != stdin )
X	fclose( ifd );
X
X    bits = pbm_allocarray( cols, rows );
X
X    for ( row = 0; row < rows; row++ )
X	{
X	charcount = 0;
X	mask = 1;
X	for ( col = 0; col < cols; col++ )
X	    {
X	    if ( charcount >= 8 )
X		{
X		data++;
X		charcount = 0;
X		mask = 1;
X		}
X	    bits[row][col] = ( *data & mask ) ? 1 : 0;
X	    charcount++;
X	    mask = mask << 1;
X	    }
X	data++;
X	}
X
X    pbm_writepbm( stdout, bits, cols, rows );
X
X    exit( 0 );
X    }
X
X
X#ifdef	OS_SYSV
X#include <string.h>
X#else	OS_SYSV
X#include <strings.h>
X#endif	OS_SYSV
X
X#define MAX_LINE 81
X
Xint
XReadBitmapFile( stream, widthP, heightP, dataP )
XFILE *stream;
Xint *widthP, *heightP;
Xchar **dataP;
X    {
X    char line[MAX_LINE], name_and_type[MAX_LINE];
X    char *ptr, *t;
X    int bytes, bytes_per_line, value, version10p, raster_length, padding;
X
X    *widthP = *heightP = -1;
X
X    for ( ; ; )
X	{
X	if ( ! fgets( line, MAX_LINE, stream ) )
X	    break;
X	if ( strlen( line ) == MAX_LINE - 1 )
X	    {
X	    fprintf( stderr, "Line too long.\n" );
X	    return ( -1 );
X	    }
X
X	if (sscanf(line, "#define %s %d", name_and_type, &value) == 2)
X	    {
X#ifdef	OS_SYSV
X	    if ( ! (t = strrchr( name_and_type, '_' )) )
X#else	OS_SYSV
X	    if ( ! (t = rindex( name_and_type, '_' )) )
X#endif	OS_SYSV
X		t = name_and_type;
X	    else
X		t++;
X	    if ( ! strcmp( "width", t ) )
X		*widthP = value;
X	    if ( ! strcmp( "height", t ) )
X		*heightP = value;
X	    continue;
X	    }
X	
X	if ( sscanf( line, "static short %s = {", name_and_type ) == 1 )
X	    {
X	    version10p = 1;
X	    break;
X	    }
X	else if ( sscanf( line, "static char %s = {", name_and_type ) == 1 )
X	    {
X	    version10p = 0;
X	    break;
X	    }
X	else
X	    continue;
X	}
X 
X#ifdef	OS_SYSV
X    if ( ! (t = strrchr( name_and_type, '_' )) )
X#else	OS_SYSV
X    if ( ! (t = rindex( name_and_type, '_' )) )
X#endif	OS_SYSV
X	t = name_and_type;
X    else
X	t++;
X    
X    if ( *widthP == -1 )
X	{
X	fprintf( stderr, "Invalid width.\n" );
X	return ( -1 );
X	}
X    if ( *heightP == -1 )
X	{
X	fprintf( stderr, "Invalid height.\n" );
X	return ( -1 );
X	}
X
X    padding = 0;
X    if ( ((*widthP % 16) >= 1) && ((*widthP % 16) <= 8) && version10p )
X	padding = 1;
X
X    bytes_per_line = (*widthP+7)/8 + padding;
X    
X    raster_length =  bytes_per_line * *heightP;
X    *dataP = (char *) malloc( raster_length );
X    if ( ! *dataP )
X	{
X	fprintf( stderr, "Not enough memory.\n" );
X	return ( -1 );
X	}
X
X    if ( version10p )
X	for ( bytes = 0, ptr = *dataP; bytes < raster_length; bytes += 2 )
X	    {
X	    if ( fscanf( stream, " 0x%x%*[,}]%*[ \n]", &value ) != 1 )
X		{
X		fprintf( stderr, "Error scanning bits item.\n" );
X		return ( -1 );
X		}
X	    *(ptr++) = value & 0xff;
X	    if ( (! padding) || ((bytes+2) % bytes_per_line) )
X		*(ptr++) = value >> 8;
X	    }
X	else
X	    for ( bytes = 0, ptr = *dataP; bytes < raster_length; bytes++ )
X		{
X		if ( fscanf( stream, " 0x%x%*[,}]%*[ \n]", &value ) != 1 )
X		    {
X		    fprintf( stderr, "Error scanning bits item.\n" );
X		    return ( -1 );
X		    }
X		*(ptr++) = value;
X		}
X
X    return ( 0 );
X    }
SHAR_EOF
if test 4125 -ne "`wc -c < 'xbmtopbm.c'`"
then
	echo shar: error transmitting "'xbmtopbm.c'" '(should have been 4125 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'xbmtopbm.man'" '(980 characters)'
if test -f 'xbmtopbm.man'
then
	echo shar: will not over-write existing file "'xbmtopbm.man'"
else
sed 's/^X//' << \SHAR_EOF > 'xbmtopbm.man'
X.TH xbmtopbm 1 "13 February 1988"
X.SH NAME
Xxbmtopbm - convert X11 and X10 bitmaps into portable bitmaps
X.SH SYNOPSIS
Xxbmtopbm [bitmapfile]
X.SH DESCRIPTION
XReads an X11 or X10 bitmap as input.
XProduces a portable bitmap as output.
X.SH "SEE ALSO"
Xpbm(5), cbmtopbm(1), icontopbm(1), macptopbm(1), rasttopbm(1), xwdtopbm(1),
Xpbmtoicon(1), pbmtocbm(1), pbmtops(1), pbmtoptx(1), pbmtorast(1),
Xpbmtoxbm(1), pbmtox10bm(1), pbmtoascii(1), pbminvert(1), pbmfliplr(1),
Xpbmfliptb(1), pbmcatlr(1), pbmcattb(1), pbmcrop(1), pbmtrnspos(1), pbmcut(1),
Xpbmpaste(1), pbmenlarge(1)
X.SH AUTHOR
XCopyright (C) 1988 by Jef Poskanzer.
X
XPermission to use, copy, modify, and distribute this software and its
Xdocumentation for any purpose and without fee is hereby granted, provided
Xthat the above copyright notice appear in all copies and that both that
Xcopyright notice and this permission notice appear in supporting
Xdocumentation.  This software is provided "as is" without express or
Ximplied warranty.
SHAR_EOF
if test 980 -ne "`wc -c < 'xbmtopbm.man'`"
then
	echo shar: error transmitting "'xbmtopbm.man'" '(should have been 980 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'xwdtopbm.c'" '(7751 characters)'
if test -f 'xwdtopbm.c'
then
	echo shar: will not over-write existing file "'xwdtopbm.c'"
else
sed 's/^X//' << \SHAR_EOF > 'xwdtopbm.c'
X/* xwdtopbm.c - read an X11 window dump file and write a portable bitmap
X**
X** Copyright (C) 1988 by Jef Poskanzer.
X**
X** Permission to use, copy, modify, and distribute this software and its
X** documentation for any purpose and without fee is hereby granted, provided
X** that the above copyright notice appear in all copies and that both that
X** copyright notice and this permission notice appear in supporting
X** documentation.  This software is provided "as is" without express or
X** implied warranty.
X*/
X
X#include <stdio.h>
X#include "pbm.h"
X
Xmain( argc, argv )
Xint argc;
Xchar *argv[];
X    {
X    FILE *ifd;
X    bit **bits, getbit();
X    int rows, cols, padR, row, col;
X
X    if ( argc > 2 )
X	{
X	fprintf( stderr, "usage:  %s [xwdfile]\n", argv[0] );
X	exit( 1 );
X	}
X
X    if ( argc == 2 )
X	{
X        ifd = fopen( argv[1], "r" );
X        if ( ifd == NULL )
X	    {
X	    fprintf( stderr, "%s: can't open.\n", argv[1] );
X	    exit( 1 );
X	    }
X	}
X    else
X	ifd = stdin;
X
X    getinit( ifd, &cols, &rows, &padR );
X
X    bits = pbm_allocarray( cols, rows );
X
X    for ( row = 0; row < rows; row++ )
X	{
X        for ( col = 0; col < cols; col++ )
X	    bits[row][col] = getbit( ifd );
X        for ( col = 0; col < padR; col++ )
X	    (void) getbit( ifd );
X	}
X
X    if ( ifd != stdin )
X	fclose( ifd );
X    
X    pbm_writepbm( stdout, bits, cols, rows );
X
X    exit( 0 );
X    }
X
X
Xunsigned char bitem;
Xshort sitem;
Xint bits_per_item, bits_used, bit_shift, bit_order, bit_invert;
X
X/* The following defs are taken from various X10 header files. */
X#define X10WD_FILE_VERSION 6
Xtypedef struct {
X    int header_size;		/* Size of the entire file header (bytes). */
X    int file_version;		/* X10WD_FILE_VERSION */
X    int display_type;		/* Display type. */
X    int display_planes;		/* Number of display planes. */
X    int pixmap_format;		/* Pixmap format. */
X    int pixmap_width;		/* Pixmap width. */
X    int pixmap_height;		/* Pixmap height. */
X    short window_width;		/* Window width. */
X    short window_height;	/* Window height. */
X    short window_x;		/* Window upper left X coordinate. */
X    short window_y;		/* Window upper left Y coordinate. */
X    short window_bdrwidth;	/* Window border width. */
X    short window_ncolors;	/* number of Color entries in this window */
X    } X10WDFileHeader;
X
Xtypedef struct {
X    int pixel;
X    unsigned short red, green, blue;
X    } X10Color;
X
X
X/* The following defs are taken from various X11 header files. */
Xtypedef unsigned long xwdval;
X#define X11WD_FILE_VERSION 7
Xtypedef struct {
X    xwdval header_size;		/* Size of the entire file header (bytes). */
X    xwdval file_version;	/* X11WD_FILE_VERSION */
X    xwdval pixmap_format;	/* Pixmap format */
X    xwdval pixmap_depth;	/* Pixmap depth */
X    xwdval pixmap_width;	/* Pixmap width */
X    xwdval pixmap_height;	/* Pixmap height */
X    xwdval xoffset;		/* Bitmap x offset */
X    xwdval byte_order;		/* MSBFirst, LSBFirst */
X    xwdval bitmap_unit;		/* Bitmap unit */
X    xwdval bitmap_bit_order;	/* MSBFirst, LSBFirst */
X    xwdval bitmap_pad;		/* Bitmap scanline pad */
X    xwdval bits_per_pixel;	/* Bits per pixel */
X    xwdval bytes_per_line;	/* Bytes per scanline */
X    xwdval visual_class;	/* Class of colormap */
X    xwdval red_mask;		/* Z red mask */
X    xwdval green_mask;		/* Z green mask */
X    xwdval blue_mask;		/* Z blue mask */
X    xwdval bits_per_rgb;	/* Log base 2 of distinct color values */
X    xwdval colormap_entries;	/* Number of entries in colormap */
X    xwdval ncolors;		/* Number of Color structures */
X    xwdval window_width;	/* Window width */
X    xwdval window_height;	/* Window height */
X    long window_x;		/* Window upper left X coordinate */
X    long window_y;		/* Window upper left Y coordinate */
X    xwdval window_bdrwidth;	/* Window border width */
X    } X11WDFileHeader;
X
Xtypedef struct {
X    unsigned long pixel;
X    unsigned short red, green, blue;
X    char flags;			/* do_red, do_green, do_blue */
X    char pad;
X    } X11XColor;
X
X
Xgetinit( file, colP, rowP, padRP )
XFILE *file;
Xint *colP, *rowP, *padRP;
X    {
X    int header_size;
X    int file_version;
X    X10WDFileHeader h10;
X    X11WDFileHeader h11;
X    char junk[10000];
X
X    if ( fread( &header_size, sizeof( header_size ), 1, file ) != 1 )
X	{
X	fprintf( stderr, "Couldn't read XWD header size.\n" );
X	exit( 1 );
X	}
X    if ( fread( &file_version, sizeof( file_version ), 1, file ) != 1 )
X	{
X	fprintf( stderr, "Couldn't read XWD file version.\n" );
X	exit( 1 );
X	}
X    if ( file_version == X10WD_FILE_VERSION )
X	{
X	if ( fread( &h10.display_type, sizeof( h10 ) - 2 * sizeof( int ), 1,
X                    file ) != 1 )
X	    {
X	    fprintf( stderr, "Couldn't read X10 XWD file header.\n" );
X	    exit( 1 );
X	    }
X	if ( fread( junk, header_size - sizeof( h10 ), 1, file ) != 1 )
X	    {
X	    fprintf( stderr, "Couldn't read rest of X10 XWD file header.\n" );
X	    exit( 1 );
X	    }
X	if ( fread( junk, sizeof(X10Color), h10.window_ncolors, file ) !=
X	     h10.window_ncolors )
X	    {
X	    fprintf( stderr, "Couldn't read X10 XWD colormap.\n" );
X	    exit( 1 );
X	    }
X
X	/* Check whether we can handle this dump. */
X	if ( h10.window_ncolors != 0 )
X	    {
X	    fprintf( stderr, "Can't handle X10 window_ncolors != 0.\n" );
X	    exit( 1 );
X	    }
X	if ( h10.pixmap_format != 0 )
X	    {
X	    fprintf( stderr, "Can't handle X10 pixmap_format %d.\n",
X		     h10.pixmap_format );
X	    exit( 1 );
X	    }
X
X	*colP = h10.pixmap_width;
X	*rowP = h10.pixmap_height;
X	*padRP = ( h10.pixmap_width + 15 ) / 16 * 16 - h10.pixmap_width;
X	bits_per_item = 16;
X	bit_order = 0;
X	bit_invert = 1;
X	bits_used = 16;
X	}
X    else if ( file_version == X11WD_FILE_VERSION )
X	{
X	if ( fread( &h11.pixmap_format, sizeof( h11 ) - 2 * sizeof( xwdval ),
X		    1, file ) != 1 )
X	    {
X	    fprintf( stderr, "Couldn't read X11 XWD file header.\n" );
X	    exit( 1 );
X	    }
X	if ( fread( junk, header_size - sizeof( h11 ), 1, file ) != 1 )
X	    {
X	    fprintf( stderr, "Couldn't read rest of X11 XWD file header.\n" );
X	    exit( 1 );
X	    }
X	if ( fread( junk, sizeof( X11XColor ), h11.ncolors, file ) !=
X	     h11.ncolors )
X	    {
X	    fprintf( stderr, "Couldn't read X11 XWD colormap.\n" );
X	    exit( 1 );
X	    }
X
X	/* Check whether we can handle this dump. */
X	if ( h11.pixmap_depth != 1 )
X	    {
X	    fprintf( stderr, "Can't handle X11 pixmap_depth > 1.\n" );
X	    exit( 1 );
X	    }
X	if ( h11.colormap_entries != 2 )
X	    {
X	    fprintf( stderr, "Can't handle X11 colormap_entries != 2.\n" );
X	    exit( 1 );
X	    }
X	if ( h11.ncolors != 2 )
X	    {
X	    fprintf( stderr, "Can't handle X11 ncolors != 2.\n" );
X	    exit( 1 );
X	    }
X	if ( h11.pixmap_format != 2 )
X	    {
X	    fprintf( stderr, "Can't handle X11 pixmap_format %d.\n",
X		     h11.pixmap_format );
X	    exit( 1 );
X	    }
X
X	*colP = h11.pixmap_width;
X	*rowP = h11.pixmap_height;
X	*padRP = h11.bytes_per_line * 8 - h11.pixmap_width;
X	bits_per_item = 8;
X	bit_order = h11.bitmap_bit_order;
X	bit_invert = 0;
X	bits_used = 8;
X	}
X    else
X	{
X	fprintf( stderr, "Unknown XWD file version: %d.\n", file_version );
X	exit( 1 );
X	}
X    }
X
Xbit
Xgetbit( file )
XFILE *file;
X    {
X    bit b;
X
X    if ( bits_used == bits_per_item )
X	{
X	if ( bits_per_item == 16 )
X	    {
X	    if ( fread( &sitem, 2, 1, file ) != 1 )
X		{
X		fprintf( stderr, "Couldn't read short bits.\n" );
X		exit( 1 );
X		}
X	    }
X	else
X	    {
X	    if ( fread( &bitem, 1, 1, file ) != 1 )
X		{
X		fprintf( stderr, "Couldn't read byte bits.\n" );
X		exit( 1 );
X		}
X	    }
X	bits_used = 0;
X
X	if ( bit_order == 1 )
X	    bit_shift = bits_per_item - 1;
X	else
X	    bit_shift = 0;
X	}
X
X    bits_used++;
X    if ( bits_per_item == 16 )
X	b = ( sitem >> bit_shift) & 1;
X    else
X	b = ( bitem >> bit_shift) & 1;
X    if ( bit_invert )
X	b = 1 - b;
X
X    if ( bit_order == 1 )
X	bit_shift--;
X    else
X	bit_shift++;
X
X    return ( b );
X    }
SHAR_EOF
if test 7751 -ne "`wc -c < 'xwdtopbm.c'`"
then
	echo shar: error transmitting "'xwdtopbm.c'" '(should have been 7751 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'xwdtopbm.man'" '(1465 characters)'
if test -f 'xwdtopbm.man'
then
	echo shar: will not over-write existing file "'xwdtopbm.man'"
else
sed 's/^X//' << \SHAR_EOF > 'xwdtopbm.man'
X.TH xwdtopbm 1 "21 March 1988"
X.SH NAME
Xxwdtopbm - convert X11 and X10 window dump files into portable bitmaps
X.SH SYNOPSIS
Xxwdtopbm [xwdfile]
X.SH DESCRIPTION
XReads an X11 or X10 window dump file as input.
XProduces a portable bitmap as output.
X.LP
XUsing this program, you can convert anything on an X workstation's screen
Xinto a pbm bitmap.
XJust display whatever you're interested in, do an xwd, run it through
Xxwdtopbm, and then use pbmcut to select the part you want.
X.LP
XNote that this tool only works for monochrome dump files.
XAlso note that there is currently no pbmtoxwd tool.
X.SH BUGS
XI haven't tested this tool with very many configurations, so there are
Xprobably bugs.
XPlease let me know if you find any.
X.SH "SEE ALSO"
Xpbm(5), cbmtopbm(1), icontopbm(1), macptopbm(1), rasttopbm(1), xbmtopbm(1),
Xpbmtoicon(1), pbmtocbm(1), pbmtops(1), pbmtoptx(1), pbmtorast(1),
Xpbmtoxbm(1), pbmtox10bm(1), pbmtoascii(1), pbminvert(1), pbmfliplr(1),
Xpbmfliptb(1), pbmcatlr(1), pbmcattb(1), pbmcrop(1), pbmtrnspos(1), pbmcut(1),
Xpbmpaste(1), pbmenlarge(1)
X.SH AUTHOR
XCopyright (C) 1988 by Jef Poskanzer.
X
XPermission to use, copy, modify, and distribute this software and its
Xdocumentation for any purpose and without fee is hereby granted, provided
Xthat the above copyright notice appear in all copies and that both that
Xcopyright notice and this permission notice appear in supporting
Xdocumentation.  This software is provided "as is" without express or
Ximplied warranty.
SHAR_EOF
if test 1465 -ne "`wc -c < 'xwdtopbm.man'`"
then
	echo shar: error transmitting "'xwdtopbm.man'" '(should have been 1465 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'pbmtocbm.c'" '(1856 characters)'
if test -f 'pbmtocbm.c'
then
	echo shar: will not over-write existing file "'pbmtocbm.c'"
else
sed 's/^X//' << \SHAR_EOF > 'pbmtocbm.c'
X/* pbmtocbm.c - read a portable bitmap and produce a compact bitmap
X**
X** Copyright (C) 1988 by Jef Poskanzer.
X**
X** Permission to use, copy, modify, and distribute this software and its
X** documentation for any purpose and without fee is hereby granted, provided
X** that the above copyright notice appear in all copies and that both that
X** copyright notice and this permission notice appear in supporting
X** documentation.  This software is provided "as is" without express or
X** implied warranty.
X*/
X
X#include <stdio.h>
X#include "pbm.h"
X
Xmain( argc, argv )
Xint argc;
Xchar *argv[];
X    {
X    FILE *ifd;
X    bit **bits;
X    int rows, cols, row, col;
X
X    if ( argc > 2 )
X	{
X	fprintf( stderr, "usage:  %s [pbmfile]\n", argv[0] );
X	exit( 1 );
X	}
X
X    if ( argc == 2 )
X	{
X        ifd = fopen( argv[1], "r" );
X        if ( ifd == NULL )
X	    {
X	    fprintf( stderr, "%s: can't open.\n", argv[1] );
X	    exit( 1 );
X	    }
X	}
X    else
X	ifd = stdin;
X
X    bits = pbm_readpbm( ifd, &cols, &rows );
X
X    if ( ifd != stdin )
X	fclose( ifd );
X    
X    putchar( (char) 42 );
X    putchar( (char) 23 );
X    putchar( (char) ( ( cols >> 8 ) & 0xff ) );
X    putchar( (char) ( cols & 0xff ) );
X    putchar( (char) ( ( rows >> 8 ) & 0xff ) );
X    putchar( (char) ( rows & 0xff ) );
X
X    putinit( );
X    for ( row = 0; row < rows; row++ )
X        for ( col = 0; col < cols; col++ )
X	    putbit( bits[row][col] );
X    putrest( );
X
X    exit( 0 );
X    }
X
X
Xint item, bitsperitem, bitshift;
X
Xputinit( )
X    {
X    bitsperitem = 0;
X    item = 0;
X    bitshift = 7;
X    }
X
Xputbit( b )
Xbit b;
X    {
X    if ( bitsperitem == 8 )
X	putitem( );
X    bitsperitem++;
X    if ( b )
X	item += 1 << bitshift;
X    bitshift--;
X    }
X
Xputrest( )
X    {
X    if ( bitsperitem > 0 )
X	putitem( );
X    }
X
Xputitem( )
X    {
X    putchar( (char) item );
X    bitsperitem = 0;
X    item = 0;
X    bitshift = 7;
X    }
SHAR_EOF
if test 1856 -ne "`wc -c < 'pbmtocbm.c'`"
then
	echo shar: error transmitting "'pbmtocbm.c'" '(should have been 1856 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'pbmtocbm.man'" '(969 characters)'
if test -f 'pbmtocbm.man'
then
	echo shar: will not over-write existing file "'pbmtocbm.man'"
else
sed 's/^X//' << \SHAR_EOF > 'pbmtocbm.man'
X.TH pbmtocbm 1 "13 February 1988"
X.SH NAME
Xpbmtocbm - convert portable bitmaps into compact bitmaps
X.SH SYNOPSIS
Xpbmtocbm [pbmfile]
X.SH DESCRIPTION
XReads a portable bitmap as input.
XProduces a compact bitmap as output.
X.SH "SEE ALSO"
Xpbm(5), cbmtopbm(1), icontopbm(1), macptopbm(1), rasttopbm(1), xbmtopbm(1), xwdtopbm(1),
Xpbmtoicon(1), pbmtops(1), pbmtoptx(1), pbmtorast(1),
Xpbmtoxbm(1), pbmtox10bm(1), pbmtoascii(1), pbminvert(1), pbmfliplr(1),
Xpbmfliptb(1), pbmcatlr(1), pbmcattb(1), pbmcrop(1), pbmtrnspos(1), pbmcut(1),
Xpbmpaste(1), pbmenlarge(1)
X.SH AUTHOR
XCopyright (C) 1988 by Jef Poskanzer.
X
XPermission to use, copy, modify, and distribute this software and its
Xdocumentation for any purpose and without fee is hereby granted, provided
Xthat the above copyright notice appear in all copies and that both that
Xcopyright notice and this permission notice appear in supporting
Xdocumentation.  This software is provided "as is" without express or
Ximplied warranty.
SHAR_EOF
if test 969 -ne "`wc -c < 'pbmtocbm.man'`"
then
	echo shar: error transmitting "'pbmtocbm.man'" '(should have been 969 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'pbmtoicon.c'" '(2414 characters)'
if test -f 'pbmtoicon.c'
then
	echo shar: will not over-write existing file "'pbmtoicon.c'"
else
sed 's/^X//' << \SHAR_EOF > 'pbmtoicon.c'
X/* pbmtoicon.c - read a portable bitmap and produce a Sun icon file
X**
X** Copyright (C) 1988 by Jef Poskanzer.
X**
X** Permission to use, copy, modify, and distribute this software and its
X** documentation for any purpose and without fee is hereby granted, provided
X** that the above copyright notice appear in all copies and that both that
X** copyright notice and this permission notice appear in supporting
X** documentation.  This software is provided "as is" without express or
X** implied warranty.
X*/
X
X#include <stdio.h>
X#include "pbm.h"
X
Xmain( argc, argv )
Xint argc;
Xchar *argv[];
X    {
X    FILE *ifd;
X    bit **bits;
X    int rows, cols, rucols, padleft, padright, row, col;
X    char ch;
X
X    if ( argc > 2 )
X	{
X	fprintf( stderr, "usage:  %s [pbmfile]\n", argv[0] );
X	exit( 1 );
X	}
X
X    if ( argc == 2 )
X	{
X        ifd = fopen( argv[1], "r" );
X        if ( ifd == NULL )
X	    {
X	    fprintf( stderr, "%s: can't open.\n", argv[1] );
X	    exit( 1 );
X	    }
X	}
X    else
X	ifd = stdin;
X
X    bits = pbm_readpbm( ifd, &cols, &rows );
X
X    if ( ifd != stdin )
X	fclose( ifd );
X    
X    /* Round cols up to the nearest multiple of 16. */
X    rucols = ( cols + 15 ) / 16;
X    rucols = rucols * 16;
X    padleft = ( rucols - cols ) / 2;
X    padright = rucols - cols - padleft;
X
X    printf( "/* Format_version=1, Width=%d, Height=%d", rucols, rows );
X    printf( ", Depth=1, Valid_bits_per_item=16\n */\n" );
X
X    putinit( );
X    for ( row = 0; row < rows; row++ )
X	{
X	for ( col = 0; col < padleft; col++ )
X	    putbit( 0 );
X        for ( col = 0; col < cols; col++ )
X	    putbit( bits[row][col] );
X	for ( col = 0; col < padright; col++ )
X	    putbit( 0 );
X        }
X    putrest( );
X
X    exit( 0 );
X    }
X
X
Xint item, bitsperitem, bitshift, itemsperline, firstitem;
X
Xputinit( )
X    {
X    itemsperline = 0;
X    bitsperitem = 0;
X    item = 0;
X    bitshift = 15;
X    firstitem = 1;
X    }
X
Xputbit( b )
Xbit b;
X    {
X    if ( bitsperitem == 16 )
X	putitem( );
X    bitsperitem++;
X    if ( b )
X	item += 1 << bitshift;
X    bitshift--;
X    }
X
Xputrest( )
X    {
X    if ( bitsperitem > 0 )
X	putitem( );
X    putchar( '\n' );
X    }
X
Xputitem( )
X    {
X    if ( firstitem )
X	firstitem = 0;
X    else
X	putchar( ',' );
X    if ( itemsperline == 8 )
X	{
X	putchar( '\n' );
X	itemsperline = 0;
X	}
X    if ( itemsperline == 0 )
X	putchar( '\t' );
X    itemsperline++;
X    printf( "0x%04x", item );
X    bitsperitem = 0;
X    item = 0;
X    bitshift = 15;
X    }
SHAR_EOF
if test 2414 -ne "`wc -c < 'pbmtoicon.c'`"
then
	echo shar: error transmitting "'pbmtoicon.c'" '(should have been 2414 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'pbmtoicon.man'" '(960 characters)'
if test -f 'pbmtoicon.man'
then
	echo shar: will not over-write existing file "'pbmtoicon.man'"
else
sed 's/^X//' << \SHAR_EOF > 'pbmtoicon.man'
X.TH pbmtoicon 1 "13 February 1988"
X.SH NAME
Xpbmtoicon - convert portable bitmaps into Sun icons 
X.SH SYNOPSIS
Xpbmtoicon [pbmfile]
X.SH DESCRIPTION
XReads a portable bitmap as input.
XProduces a Sun icon as output.
X.SH "SEE ALSO"
Xpbm(5), cbmtopbm(1), icontopbm(1), macptopbm(1), rasttopbm(1), xbmtopbm(1), xwdtopbm(1),
Xpbmtocbm(1), pbmtops(1), pbmtoptx(1), pbmtorast(1),
Xpbmtoxbm(1), pbmtox10bm(1), pbmtoascii(1), pbminvert(1), pbmfliplr(1),
Xpbmfliptb(1), pbmcatlr(1), pbmcattb(1), pbmcrop(1), pbmtrnspos(1), pbmcut(1),
Xpbmpaste(1), pbmenlarge(1)
X.SH AUTHOR
XCopyright (C) 1988 by Jef Poskanzer.
X
XPermission to use, copy, modify, and distribute this software and its
Xdocumentation for any purpose and without fee is hereby granted, provided
Xthat the above copyright notice appear in all copies and that both that
Xcopyright notice and this permission notice appear in supporting
Xdocumentation.  This software is provided "as is" without express or
Ximplied warranty.
SHAR_EOF
if test 960 -ne "`wc -c < 'pbmtoicon.man'`"
then
	echo shar: error transmitting "'pbmtoicon.man'" '(should have been 960 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'pbmtops.c'" '(3728 characters)'
if test -f 'pbmtops.c'
then
	echo shar: will not over-write existing file "'pbmtops.c'"
else
sed 's/^X//' << \SHAR_EOF > 'pbmtops.c'
X/* pbmtops.c - read a portable bitmap and produce a PostScript bitmap file
X**
X** Copyright (C) 1988 by Jef Poskanzer.
X**
X** Permission to use, copy, modify, and distribute this software and its
X** documentation for any purpose and without fee is hereby granted, provided
X** that the above copyright notice appear in all copies and that both that
X** copyright notice and this permission notice appear in supporting
X** documentation.  This software is provided "as is" without express or
X** implied warranty.
X*/
X
X#include <stdio.h>
X#ifdef	OS_SYSV
X#include <string.h>
X#else	OS_SYSV
X#include <strings.h>
X#endif	OS_SYSV
X#include "pbm.h"
X
Xmain( argc, argv )
Xint argc;
Xchar *argv[];
X    {
X    FILE *ifd;
X    bit **bits;
X    int argn, rows, cols, rucols, padright, row, col;
X    char ch;
X    float scale;
X    char name[100], *cp;
X    char *usage = "usage:  %s [-s scale] [pbmfile]\n";
X
X    argn = 1;
X    scale = 1.0;
X
X    /* Check for flags. */
X    if ( argc > argn )
X	{
X	if ( argv[argn][0] == '-' )
X	    {
X	    if ( strcmp( argv[argn], "-s" ) == 0 )
X		{
X		if ( argc == argn + 1 )
X		    {
X		    fprintf( stderr, usage, argv[0] );
X		    exit( 1 );
X		    }
X		if ( sscanf( argv[argn+1], "%f", &scale ) != 1 )
X		    {
X		    fprintf( stderr, usage, argv[0] );
X		    exit( 1 );
X		    }
X		argn += 2;
X		}
X	    else
X		{
X		fprintf( stderr, usage, argv[0] );
X		exit( 1 );
X		}
X	    }
X	}
X
X    if ( argc > argn + 1 )
X	{
X	fprintf( stderr, usage, argv[0] );
X	exit( 1 );
X	}
X
X    if ( argc == argn + 1 )
X	{
X        ifd = fopen( argv[argn], "r" );
X        if ( ifd == NULL )
X	    {
X	    fprintf( stderr, "%s: can't open.\n", argv[argn] );
X	    exit( 1 );
X	    }
X	strcpy( name, argv[argn] );
X
X#ifdef	OS_SYSV
X	if ( ( cp = strchr( name, '.' ) ) != 0 )
X#else	OS_SYSV
X	if ( ( cp = index( name, '.' ) ) != 0 )
X#endif	OS_SYSV
X	    *cp = '\0';
X	}
X    else
X	{
X	ifd = stdin;
X	strcpy( name, "noname" );
X	}
X
X    bits = pbm_readpbm( ifd, &cols, &rows );
X
X    if ( ifd != stdin )
X	fclose( ifd );
X    
X    /* Round cols up to the nearest multiple of 8. */
X    rucols = ( cols + 7 ) / 8;
X    rucols = rucols * 8;
X    padright = rucols - cols;
X
X    putinit( name, cols, rows, scale );
X    for ( row = 0; row < rows; row++ )
X	{
X        for ( col = 0; col < cols; col++ )
X	    putbit( bits[row][col] );
X	for ( col = 0; col < padright; col++ )
X	    putbit( 0 );
X        }
X    putrest( );
X
X    exit( 0 );
X    }
X
X
Xint item, bitsperitem, bitshift, itemsperline, firstitem;
X
Xputinit( name, cols, rows, scale )
Xchar *name;
Xint cols, rows;
Xfloat scale;
X    {
X    int scols, srows;
X
X    scols = cols * scale * 0.96 + 0.5;	/*   0.96 is the multiple of   */
X    srows = rows * scale * 0.96 + 0.5;	/* 72/300 that is closest to 1 */
X
X    printf( "%%! %s.ps\n", name );
X    printf(
X	"%d %d translate\t%% move to lower left corner of box\n",
X	300 - ( scols/2 ), 400 - ( srows/2 ) );
X    printf( "%d %d scale\t\t%% scale box\n", scols, srows );
X    printf( "%d %d 1\t\t%% width height bits/sample\n", cols, rows );
X    printf(
X	"[ %d 0 0 -%d 0 %d ]\t%% transformation matrix\n", cols, rows, rows );
X    printf( "{ <\n" );
X
X    itemsperline = 0;
X    item = 0;
X    bitsperitem = 0;
X    bitshift = 7;
X    firstitem = 1;
X    }
X
Xputbit( b )
Xbit b;
X    {
X    if ( bitsperitem == 8 )
X	{
X	putitem( );
X	}
X    if ( ! b )
X	item += 1 << bitshift;
X    bitsperitem++;
X    bitshift--;
X    }
X
Xputrest( )
X    {
X    if ( bitsperitem > 0 )
X	putitem( );
X    printf( "\n> }\nimage\nshowpage\n" );
X    }
X
Xputitem( )
X    {
X    if ( firstitem )
X	firstitem = 0;
X    else
X	putchar( ' ' );
X    if ( itemsperline == 20 )
X	{
X	putchar( '\n' );
X	itemsperline = 0;
X	}
X    if ( itemsperline == 0 )
X	printf( "  " );
X    itemsperline++;
X    printf( "%02x", item );
X    item = 0;
X    bitsperitem = 0;
X    bitshift = 7;
X    }
SHAR_EOF
if test 3728 -ne "`wc -c < 'pbmtops.c'`"
then
	echo shar: error transmitting "'pbmtops.c'" '(should have been 3728 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'pbmtops.man'" '(1139 characters)'
if test -f 'pbmtops.man'
then
	echo shar: will not over-write existing file "'pbmtops.man'"
else
sed 's/^X//' << \SHAR_EOF > 'pbmtops.man'
X.TH pbmtops 1 "19 February 1988"
X.SH NAME
Xpbmtops - convert portable bitmaps into PostScript
X.SH SYNOPSIS
Xpbmtops [pbmfile]
X.SH DESCRIPTION
XReads a portable bitmap as input.
XProduces PostScript as output.
XNote that there is no
Xpstopbm
Xtool - this transformation is one-way, because a pstopbm tool would
Xbe a full-fledged PostScript interpreter, which is beyond the scope
Xof this package.
X.SH "SEE ALSO"
Xpbm(5), cbmtopbm(1), icontopbm(1), macptopbm(1), rasttopbm(1), xbmtopbm(1), xwdtopbm(1),
Xpbmtoicon(1), pbmtocbm(1), pbmtoptx(1), pbmtorast(1),
Xpbmtoxbm(1), pbmtox10bm(1), pbmtoascii(1), pbminvert(1), pbmfliplr(1),
Xpbmfliptb(1), pbmcatlr(1), pbmcattb(1), pbmcrop(1), pbmtrnspos(1), pbmcut(1),
Xpbmpaste(1), pbmenlarge(1)
X.SH AUTHOR
XCopyright (C) 1988 by Jef Poskanzer.
X
XPermission to use, copy, modify, and distribute this software and its
Xdocumentation for any purpose and without fee is hereby granted, provided
Xthat the above copyright notice appear in all copies and that both that
Xcopyright notice and this permission notice appear in supporting
Xdocumentation.  This software is provided "as is" without express or
Ximplied warranty.
SHAR_EOF
if test 1139 -ne "`wc -c < 'pbmtops.man'`"
then
	echo shar: error transmitting "'pbmtops.man'" '(should have been 1139 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'pbmtoptx.c'" '(1791 characters)'
if test -f 'pbmtoptx.c'
then
	echo shar: will not over-write existing file "'pbmtoptx.c'"
else
sed 's/^X//' << \SHAR_EOF > 'pbmtoptx.c'
X/* pbmtoptx.c - read a portable bitmap and produce a Printronix printer file
X**
X** Copyright (C) 1988 by Jef Poskanzer.
X**
X** Permission to use, copy, modify, and distribute this software and its
X** documentation for any purpose and without fee is hereby granted, provided
X** that the above copyright notice appear in all copies and that both that
X** copyright notice and this permission notice appear in supporting
X** documentation.  This software is provided "as is" without express or
X** implied warranty.
X*/
X
X#include <stdio.h>
X#ifdef	OS_SYSV
X#include <string.h>
X#else	OS_SYSV
X#include <strings.h>
X#endif	OS_SYSV
X#include "pbm.h"
X
Xmain( argc, argv )
Xint argc;
Xchar *argv[];
X    {
X    FILE *ifd;
X    bit **bits;
X    int rows, cols, row, col;
X    char *usage = "usage:  %s [pbmfile]\n";
X
X    if ( argc > 2 )
X	{
X	fprintf( stderr, usage, argv[0] );
X	exit( 1 );
X	}
X
X    if ( argc == 2 )
X	{
X        ifd = fopen( argv[1], "r" );
X        if ( ifd == NULL )
X	    {
X	    fprintf( stderr, "%s: can't open.\n", argv[1] );
X	    exit( 1 );
X	    }
X	}
X    else
X	ifd = stdin;
X
X    bits = pbm_readpbm( ifd, &cols, &rows );
X
X    if ( ifd != stdin )
X	fclose( ifd );
X    
X    putinit( );
X    for ( row = 0; row < rows; row++ )
X	{
X	putchar( 5 );
X        for ( col = 0; col < cols; col++ )
X	    putbit( bits[row][col] );
X	putrest( );
X	putchar( '\n' );
X        }
X
X    exit( 0 );
X    }
X
X
Xchar item;
Xint bitsperitem, bitshift;
X
Xputinit( )
X    {
X    bitsperitem = 0;
X    item = 64;
X    bitshift = 0;
X    }
X
Xputbit( b )
Xbit b;
X    {
X    if ( bitsperitem == 6 )
X	putitem( );
X    if ( b )
X	item += 1 << bitshift;
X    bitsperitem++;
X    bitshift++;
X    }
X
Xputrest( )
X    {
X    if ( bitsperitem > 0 )
X	putitem( );
X    }
X
Xputitem( )
X    {
X    putchar( item );
X    bitsperitem = 0;
X    item = 64;
X    bitshift = 0;
X    }
SHAR_EOF
if test 1791 -ne "`wc -c < 'pbmtoptx.c'`"
then
	echo shar: error transmitting "'pbmtoptx.c'" '(should have been 1791 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'pbmtoptx.man'" '(1072 characters)'
if test -f 'pbmtoptx.man'
then
	echo shar: will not over-write existing file "'pbmtoptx.man'"
else
sed 's/^X//' << \SHAR_EOF > 'pbmtoptx.man'
X.TH pbmtoptx 1 "13 February 1988"
X.SH NAME
Xpbmtoptx - convert portable bitmaps into Printronix printer graphics
X.SH SYNOPSIS
Xpbmtoptx [pbmfile]
X.SH DESCRIPTION
XReads a portable bitmap as input.
XProduces a file of Printronix printer graphics as output.
XNote that there is no
Xptxtopbm
Xtool - this transformation is one way.
X.SH "SEE ALSO"
Xpbm(5), cbmtopbm(1), icontopbm(1), macptopbm(1), rasttopbm(1), xbmtopbm(1), xwdtopbm(1),
Xpbmtoicon(1), pbmtocbm(1), pbmtops(1), pbmtorast(1),
Xpbmtoxbm(1), pbmtox10bm(1), pbmtoascii(1), pbminvert(1), pbmfliplr(1),
Xpbmfliptb(1), pbmcatlr(1), pbmcattb(1), pbmcrop(1), pbmtrnspos(1), pbmcut(1),
Xpbmpaste(1), pbmenlarge(1)
X.SH AUTHOR
XCopyright (C) 1988 by Jef Poskanzer.
X
XPermission to use, copy, modify, and distribute this software and its
Xdocumentation for any purpose and without fee is hereby granted, provided
Xthat the above copyright notice appear in all copies and that both that
Xcopyright notice and this permission notice appear in supporting
Xdocumentation.  This software is provided "as is" without express or
Ximplied warranty.
SHAR_EOF
if test 1072 -ne "`wc -c < 'pbmtoptx.man'`"
then
	echo shar: error transmitting "'pbmtoptx.man'" '(should have been 1072 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'pbmtorast.c'" '(1845 characters)'
if test -f 'pbmtorast.c'
then
	echo shar: will not over-write existing file "'pbmtorast.c'"
else
sed 's/^X//' << \SHAR_EOF > 'pbmtorast.c'
X/* pbmtorast.c - read a portable bitmap and produce a Sun rasterfile
X**
X** Copyright (C) 1988 by Jef Poskanzer.
X**
X** Permission to use, copy, modify, and distribute this software and its
X** documentation for any purpose and without fee is hereby granted, provided
X** that the above copyright notice appear in all copies and that both that
X** copyright notice and this permission notice appear in supporting
X** documentation.  This software is provided "as is" without express or
X** implied warranty.
X*/
X
X#include <stdio.h>
X#include "pbm.h"
X
X/* Because of the following include, this program compiles only on Suns. */
X#include <pixrect/pixrect_hs.h>
X
Xmain( argc, argv )
Xint argc;
Xchar *argv[];
X    {
X    FILE *ifd;
X    bit **bits;
X    int linebytes;
X    int rows, cols, row, col;
X    struct pixrect *pr;
X    short *data;
X    int shortcount, bitcount;
X
X    if ( argc > 2 )
X	{
X	fprintf( stderr, "usage:  %s [pbmfile]\n", argv[0] );
X	exit( 1 );
X	}
X
X    if ( argc == 2 )
X	{
X	ifd = fopen( argv[1], "r" );
X	if ( ifd == NULL )
X	    {
X	    fprintf( stderr, "%s: can't open.\n", argv[1] );
X	    exit( 1 );
X	    }
X	}
X    else
X	ifd = stdin;
X
X    bits = pbm_readpbm( ifd, &cols, &rows );
X
X    if ( ifd != stdin )
X	fclose( ifd );
X    
X    if ( (pr = mem_create(cols, rows, 1)) == NULL )
X	{
X	fprintf( stderr, "Unable to create new pixrect.\n");
X	exit( 1 );
X	}
X
X    data = ((struct mpr_data *)pr->pr_data)->md_image;
X    linebytes = ((struct mpr_data *)pr->pr_data)->md_linebytes;
X
X    for ( row = 0; row < rows; row++ )
X	{
X	bitcount = 15;
X	shortcount = 0;
X	for ( col = 0; col < cols; col++ )
X	    {
X	    *(data + shortcount) |= (bits[row][col] << bitcount);
X	    bitcount--;
X	    if ( bitcount < 0 )
X		{
X		bitcount = 15;
X		shortcount++;
X		}
X	    }
X	data += linebytes / sizeof(short);
X	}
X
X    pr_dump( pr, stdout, NULL, RT_STANDARD, 0 );
X
X    exit( 0 );
X    }
SHAR_EOF
if test 1845 -ne "`wc -c < 'pbmtorast.c'`"
then
	echo shar: error transmitting "'pbmtorast.c'" '(should have been 1845 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'pbmtorast.man'" '(1068 characters)'
if test -f 'pbmtorast.man'
then
	echo shar: will not over-write existing file "'pbmtorast.man'"
else
sed 's/^X//' << \SHAR_EOF > 'pbmtorast.man'
X.TH pbmtorast 1 "18 February 1988"
X.SH NAME
Xpbmtorast - convert portable bitmaps into Sun rasters
X.SH SYNOPSIS
Xpbmtorast [pbmfile]
X.SH DESCRIPTION
XReads a portable bitmap as input.
XProduces a Sun raster file as output.
XNOTE: since it uses Sun-specific include files, pbmtorast will compile
Xonly on Suns.
X.SH "SEE ALSO"
Xpbm(5), cbmtopbm(1), icontopbm(1), macptopbm(1), rasttopbm(1), xbmtopbm(1), xwdtopbm(1),
Xpbmtoicon(1), pbmtocbm(1), pbmtops(1), pbmtoptx(1),
Xpbmtoxbm(1), pbmtox10bm(1), pbmtoascii(1), pbminvert(1), pbmfliplr(1),
Xpbmfliptb(1), pbmcatlr(1), pbmcattb(1), pbmcrop(1), pbmtrnspos(1), pbmcut(1),
Xpbmpaste(1), pbmenlarge(1)
X.SH AUTHOR
XBarry Klawans
X
XCopyright (C) 1988 by Jef Poskanzer.
X
XPermission to use, copy, modify, and distribute this software and its
Xdocumentation for any purpose and without fee is hereby granted, provided
Xthat the above copyright notice appear in all copies and that both that
Xcopyright notice and this permission notice appear in supporting
Xdocumentation.  This software is provided "as is" without express or
Ximplied warranty.
SHAR_EOF
if test 1068 -ne "`wc -c < 'pbmtorast.man'`"
then
	echo shar: error transmitting "'pbmtorast.man'" '(should have been 1068 characters)'
fi
fi # end of overwriting check
#	End of shell archive
exit 0



More information about the Comp.sources.misc mailing list