From: cristy@eplrx7.uucp (John Cristy) Newsgroups: alt.sources Subject: X-Window to Postscript (missing display.h) Message-ID: <1990May25.172131.10956@eplrx7.uucp> Date: 25 May 90 17:21:31 GMT #! /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 'display.h' <<'END_OF_FILE' X X#include X#include X#include X#ifdef vms X#define random rand X#define popen(command,mode) (FILE *) exit(1) X#else X#include X#include 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