dtinfo: remove register keyword
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / src / cgm / CGM_README
1 This library provides an interpreter for CGM '86 binary encoded
2 Computer Grapics Metafiles. It will draw the first picture in a
3 specified file into a Pixmap and return that Pixmap.
4
5 Files:
6
7 cgm.h contains common definitions (types, etc.) for all of the cgm
8 processing modules. Not needed by external programs.
9
10 spec.h contains the sepcification for the external entry point:
11
12 Pixmap CGMFileToPixmap (Screen          *screen,
13                         char            *filename,
14                         int             depth,
15                         Colormap        colormap,
16                         Visual          *visual,
17                         GC              gc,
18                         Dimension       *ret_width,
19                         Dimension       *ret_height,
20                         Pixel           **ret_colors,
21                         int             *ret_number);
22
23 filename gives the name of the cgm file to be opened. It is not
24 munged in any manner. The first picture in the file will be written
25 into a Pixmap of dimension *ret_width by *ret_height. These are not
26 read on input, and presently will always fit within a 512 square
27 unless the cgm file explicitly asks for a different size by setting
28 the scaling mode to be metric. The Pixmap is the return value.
29
30 screen, depth and visual are used only on input as information on the
31 display to be used. gc is used to provide default foreground and
32 background colors, but these may be overridden by the cgm file. It is
33 not altered.
34
35 If colors are added to the colormap (by XAllocColor), their number and
36 Pixels will be in *ret_number and *ret_colors.
37
38 cgmcmds.c is the basic command module. It both interprets each cgm
39 command and invokes the XLib routines to perform the operations
40 requested, so it uses some XLib specific operations. I.e., XLib type
41 storage is used for the data.
42
43 cgmcommon.c has routines which are encoding and device independent,
44 i.e., not very many.
45
46 cgmio.c has the I/O routines for reading in the cgm file.
47
48 cgmtext.c has the text handling routines, including the definition of
49 a single stroked font.
50
51 getcgm.c has the external entry point, and interfaces it to the guts
52 of the interpreter, i.e., it has the outermost "do-loop".
53
54 testcgm.c is not part of the interpreter proper, but simply a test
55 program to grab a cgm file (either "test.cgm", or argv[1]), open a
56 window and copy the resulting Pixmap into it. It does no backing
57 store. 
58
59 Error messages: all error messages are of the form, e.g., 
60 "burp(stderr, "warning, %d\n", some_int);"
61 where "burp" is defined to be "fprintf" in cgm.h. If wanted, burp can
62 be redefined.
63