X-Window to Postscript (missing display.h)
John Cristy
cristy at eplrx7.uucp
Sat May 26 03:21:31 AEST 1990
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell archive."
# Contents: display.h
# Wrapped by cristy at eplrx7 on Fri May 25 13:20:25 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'display.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'display.h'\"
else
echo shar: Extracting \"'display.h'\" \(1629 characters\)
sed "s/^X//" >'display.h' <<'END_OF_FILE'
X
X#include <stdio.h>
X#include <ctype.h>
X#include <math.h>
X#ifdef vms
X#define random rand
X#define popen(command,mode) (FILE *) exit(1)
X#else
X#include <malloc.h>
X#include <memory.h>
X
Xdouble
X strtod();
X
Xlong
X strtol(),
X time();
X#endif
X/*
X Define declarations for the Display program.
X*/
X#ifndef False
X#define False 0
X#endif
X#define GammaCorrect(color,gamma) \
X (pow((double) color/MaxRgb,1.0/gamma)*MaxRgb)
X#define Intensity(color) \
X (((color).red*77+(color).green*150+(color).blue*29) >> 8)
X#define Max(x,y) (((x) > (y)) ? (x) : (y))
X#define MaxColormapSize 4096
X#define MaxImageSize (4096*4096)
X#define MaxRgb 255
X#define Min(x,y) (((x) < (y)) ? (x) : (y))
X#ifndef True
X#define True 1
X#endif
X/*
X Image Id's
X*/
X#define UnknownId 0
X#define XImagerId 1
X/*
X Image classes:
X*/
X#define UnknownClass 0
X#define DirectClass 1
X#define PseudoClass 2
X/*
X Image compression algorithms:
X*/
X#define UnknownCompression 0
X#define NoCompression 1
X#define RunlengthEncodedCompression 2
X#define QEncodedCompression 3
X
X/*
X Typedef declarations for the Display program.
X*/
Xtypedef struct _ColorPacket
X{
X unsigned char
X red,
X green,
X blue;
X
X unsigned short
X index;
X} ColorPacket;
X
Xtypedef struct _RunlengthPacket
X{
X unsigned char
X red,
X green,
X blue,
X length;
X
X unsigned short
X index;
X} RunlengthPacket;
X
Xtypedef struct _Image
X{
X FILE
X *file;
X
X char
X filename[256];
X
X unsigned int
X id,
X class,
X colors,
X packets,
X compression,
X columns,
X rows,
X scene,
X channel;
X
X char
X *comments;
X
X ColorPacket
X *colormap;
X
X RunlengthPacket
X *pixels;
X} Image;
END_OF_FILE
if test 1629 -ne `wc -c <'display.h'`; then
echo shar: \"'display.h'\" unpacked with wrong size!
fi
chmod +x 'display.h'
# end of 'display.h'
fi
echo shar: End of shell archive.
exit 0
--
The UUCP Mailer
More information about the Alt.sources
mailing list