Utah Raster Toolkit
9999-git
URT Development version (post-3.1b)
Main Page
Data Structures
Files
File List
Globals
include
rle_put.h
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
/*
19
* rle_put.h - Definitions and a few global variables for rle_putrow/putraw.
20
*
21
* Author: Spencer W. Thomas
22
* Computer Science Dept.
23
* University of Utah
24
* Date: Mon Aug 9 1982
25
* Copyright (c) 1982 Spencer W. Thomas
26
*
27
* $Id: rle_put.h,v 3.0.1.2 1992/02/27 21:14:35 spencer Exp $
28
*/
29
30
#
include
"rle.h"
31
32
/* ****************************************************************
33
* Dispatch table for different output types.
34
*/
35
#
ifdef
__cplusplus
/* Cfront 2.0 or g++ */
36
#
ifndef
c_plusplus
37
#
define
c_plusplus
38
#
endif
39
extern
"C"
{
40
#
endif
41
42
43
#
ifdef
c_plusplus
44
#
define
ARB_ARGS
...
45
#
else
46
#
define
ARB_ARGS
47
#
endif
48
49
typedef
int
rle_fn
(
ARB_ARGS
);
50
51
struct
rle_dispatch_tab
{
52
CONST_DECL
char
*
magic
;
/* magic type flags */
53
rle_fn
*
setup
,
/* startup function */
54
*
skipBlankLines
,
55
*
setColor
,
56
*
skipPixels
,
57
*
newScanLine
,
58
*
putdat
,
/* put a set of differing pixels */
59
*
putrn
,
/* put a run all the same */
60
*
blockHook
,
/* hook called at start of new */
61
/* output block */
62
*
putEof
;
/* write EOF marker (if possible) */
63
};
64
65
extern
struct
rle_dispatch_tab
rle_DTable
[];
66
67
/*
68
* These definitions presume the existence of a variable called
69
* "fileptr", declared "long * fileptr". *fileptr should be
70
* initialized to 0 before calling Setup().
71
* A pointer "the_hdr" declared "rle_hdr * the_hdr" is also
72
* presumed to exist.
73
*/
74
#
define
rle_magic
(
rle_DTable
[
(
int
)
the_hdr
->
dispatch
]
.
magic
)
75
#
define
Setup
(
)
(
*
rle_DTable
[
(
int
)
the_hdr
->
dispatch
]
.
setup
)
(
the_hdr
)
76
#
define
SkipBlankLines
(
n
)
(
*
rle_DTable
[
(
int
)
the_hdr
->
dispatch
]
.
skipBlankLines
)
(
n
,
the_hdr
)
77
#
define
SetColor
(
c
)
(
*
rle_DTable
[
(
int
)
the_hdr
->
dispatch
]
.
setColor
)
(
c
,
the_hdr
)
78
#
define
SkipPixels
(
n
,
l
,
r
)
(
*
rle_DTable
[
(
int
)
the_hdr
->
dispatch
]
.
skipPixels
)
(
n
,
l
,
r
,
the_hdr
)
79
#
define
NewScanLine
(
flag
)
(
*
rle_DTable
[
(
int
)
the_hdr
->
dispatch
]
.
newScanLine
)
(
flag
,
the_hdr
)
80
#
define
putdata
(
buf
,
len
)
(
*
rle_DTable
[
(
int
)
the_hdr
->
dispatch
]
.
putdat
)
(
buf
,
len
,
the_hdr
)
81
#
define
putrun
(
val
,
len
,
f
)
(
*
rle_DTable
[
(
int
)
the_hdr
->
dispatch
]
.
putrn
)
(
val
,
len
,
f
,
the_hdr
)
82
#
define
BlockHook
(
)
(
*
rle_DTable
[
(
int
)
the_hdr
->
dispatch
]
.
blockHook
)
(
the_hdr
)
83
#
define
PutEof
(
)
(
*
rle_DTable
[
(
int
)
the_hdr
->
dispatch
]
.
putEof
)
(
the_hdr
)
84
85
/*
86
* States for run detection
87
*/
88
#
define
DATA
0
89
#
define
RUN1
1
90
#
define
RUN2
2
91
#
define
RUN3
3
92
#
define
RUN4
4
93
#
define
RUN5
5
94
#
define
RUN6
6
95
#
define
RUN7
7
96
#
define
INRUN
-
1
97
98
#
ifdef
__cplusplus
99
}
100
#
endif
rle_dispatch_tab::putEof
rle_fn * putEof
Definition:
rle_put.h:53
rle_dispatch_tab::skipBlankLines
rle_fn * skipBlankLines
Definition:
rle_put.h:53
rle_dispatch_tab::magic
const char * magic
Definition:
rle_put.h:52
rle_dispatch_tab::putdat
rle_fn * putdat
Definition:
rle_put.h:53
rle_DTable
struct rle_dispatch_tab rle_DTable[]
Definition:
rle_global.c:49
CONST_DECL
#define CONST_DECL
Definition:
rle_config.h:42
rle_fn
int rle_fn()
Definition:
rle_put.h:49
rle_dispatch_tab::newScanLine
rle_fn * newScanLine
Definition:
rle_put.h:53
ARB_ARGS
#define ARB_ARGS
Definition:
rle_put.h:46
rle_dispatch_tab
Definition:
rle_put.h:51
rle_dispatch_tab::setup
rle_fn * setup
Definition:
rle_put.h:53
rle_dispatch_tab::setColor
rle_fn * setColor
Definition:
rle_put.h:53
rle_dispatch_tab::putrn
rle_fn * putrn
Definition:
rle_put.h:53
rle_dispatch_tab::blockHook
rle_fn * blockHook
Definition:
rle_put.h:53
rle_dispatch_tab::skipPixels
rle_fn * skipPixels
Definition:
rle_put.h:53
Generated on Thu Sep 24 2015 11:47:03 for Utah Raster Toolkit by
1.8.10