Utah Raster Toolkit  9999-git
URT Development version (post-3.1b)
rle_global.c
Go to the documentation of this file.
1 /*
2  * This software is copyrighted as noted below. It may be freely copied,
3  * modified, and redistributed, provided that the copyright notice is
4  * preserved on all copies.
5  *
6  * There is no warranty or other guarantee of fitness for this software,
7  * it is provided solely "as is". Bug reports or fixes may be sent
8  * to the author, who may or may not act on them as he desires.
9  *
10  * You may not include this software in a program or other software product
11  * without supplying the source, or without informing the end-user that the
12  * source is available for no extra charge.
13  *
14  * If you modify this software, you should include a notice giving the
15  * name of the person performing the modification, the date of modification,
16  * and the reason for such modification.
17  *
18  * Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire
19  * to have all "void" functions so declared.
20  */
21 /*
22  * rle_global.c - Global variable initialization for rle routines.
23  *
24  * Author: Spencer W. Thomas
25  * Computer Science Dept.
26  * University of Utah
27  * Date: Thu Apr 25 1985
28  * Copyright (c) 1985,1986 Spencer W. Thomas
29  *
30  * $Id: rle_global.c,v 3.0.1.1 1992/01/28 18:23:03 spencer Exp $
31  */
32 
33 #include <stdio.h>
34 #include "rle_put.h"
35 #include "rle.h"
36 
37 extern int RunSetup( ARB_ARGS ),
45 
46 extern int DefaultBlockHook( ARB_ARGS );
47 extern void NullputEof( ARB_ARGS );
48 
50  {
51  " OB",
52  RunSetup,
57  Runputdata,
58  Runputrun,
60  RunputEof
61  },
62 };
63 
64 static int bg_color[3] = { 0, 0, 0 };
65 
66 rle_hdr rle_dflt_hdr = {
67  RUN_DISPATCH, /* dispatch value */
68  3, /* 3 colors */
69  bg_color, /* background color */
70  0, /* (alpha) if 1, save alpha channel */
71  2, /* (background) 0->just save pixels, */
72  /* 1->overlay, 2->clear to bg first */
73  0, 511, /* (xmin, xmax) X bounds to save */
74  0, 511, /* (ymin, ymax) Y bounds to save */
75  0, /* ncmap (if != 0, save color map) */
76  8, /* cmaplen (log2 of length of color map) */
77  NULL, /* pointer to color map */
78  NULL, /* pointer to comment strings */
79  NULL, /* output file -- must be set dynamically */
80  { 7 }, /* RGB channels only */
81  0L, /* Can't free name and file fields. */
82  "Urt", /* Default "program name". */
83  "no file", /* No file name given. */
84  0 /* First image. */
85  /* Can't initialize the union */
86 };
87 
88 /* ARGSUSED */
89 void
91 rle_hdr * the_hdr;
92 {
93  /* do nothing */
94 }
void RunSetColor(int c, rle_hdr *the_hdr)
Definition: Runput.c:280
void Runputdata(rle_pixel *buf, int n, rle_hdr *the_hdr)
Definition: Runput.c:328
void RunSkipBlankLines(int nblank, rle_hdr *the_hdr)
Definition: Runput.c:266
struct rle_dispatch_tab rle_DTable[]
Definition: rle_global.c:49
static int bg_color[3]
Definition: rle_global.c:64
void RunSkipPixels(int nskip, int last, int wasrun, rle_hdr *the_hdr)
Definition: Runput.c:295
void DefaultBlockHook(rle_hdr *the_hdr)
Definition: rle_putrow.c:463
#define ARB_ARGS
Definition: rle_put.h:46
void RunputEof(rle_hdr *the_hdr)
Definition: Runput.c:364
void RunNewScanLine(int flag, rle_hdr *the_hdr)
Definition: Runput.c:312
void RunSetup(rle_hdr *the_hdr)
Definition: Runput.c:165
rle_hdr rle_dflt_hdr
Definition: rle_global.c:66
void Runputrun(int color, int n, int last, rle_hdr *the_hdr)
Definition: Runput.c:350
void NullputEof(rle_hdr *the_hdr)
Definition: rle_global.c:90