Removed
Link Here
|
1 |
--- btnlib/border.c.orig 1995-05-04 17:21:13 UTC |
2 |
+++ btnlib/border.c |
3 |
@@ -35,6 +35,10 @@ static char SccsId[] = "%W% %G%"; |
4 |
* Note: For each byte, bit 0 (0x01) appears on the left. |
5 |
* Note: For each byte, bit 7 (0x80) appears on the right. |
6 |
*/ |
7 |
+ |
8 |
+static unsigned char btn_ReverseByte(); |
9 |
+static void btn_MakeBdrLine(); |
10 |
+ |
11 |
void btn_MakeBdrBitmap ( buttonmap, width, height, byte_width, form, inverse ) |
12 |
unsigned char *buttonmap; /* i,o: pointer to bitmap of button */ |
13 |
int width, height; /* i: dimensions of button window (to cover) */ |
14 |
@@ -52,8 +56,6 @@ void btn_MakeBdrBitmap ( buttonmap, widt |
15 |
int right_form_bit; /* l: bit in first right form byte to use */ |
16 |
int right_bdr_byte; /* l: index of first line byte for right bdr */ |
17 |
int right_bdr_bit; /* l: bit in first line byte for right bdr */ |
18 |
- static unsigned char btn_ReverseByte(); |
19 |
- static void btn_MakeBdrLine(); |
20 |
|
21 |
/* portion of pattern form used (clip overlap if button very small) */ |
22 |
/* middle overlap on odd size counted for height, omitted for width */ |
23 |
@@ -119,6 +121,9 @@ void btn_MakeBdrBitmap ( buttonmap, widt |
24 |
* Subroutine: btn_MakeBdrLine |
25 |
* Purpose: set the bits for one line of the button's border |
26 |
*/ |
27 |
+ |
28 |
+static void btn_RightBorder(); |
29 |
+ |
30 |
static void btn_MakeBdrLine ( line, form, byte_width, inverse, |
31 |
right_bdr_byte, right_bdr_bit, |
32 |
right_form_byte, right_form_bit ) |
33 |
@@ -131,7 +136,6 @@ static void btn_MakeBdrLine ( line, form |
34 |
int right_bdr_byte; /* l: index of first line byte for right bdr */ |
35 |
int right_bdr_bit; /* l: bit in first line byte for right bdr */ |
36 |
{ |
37 |
- static void btn_RightBorder(); |
38 |
/* copy in top left, store reverse for top right */ |
39 |
*line = *form; |
40 |
*(line+1) = *(++form); |
41 |
--- btnlib/create.c.orig 1990-04-28 20:17:46 UTC |
42 |
+++ btnlib/create.c |
43 |
@@ -53,6 +53,9 @@ static GC def_gc = NULL; |
44 |
* Note: Buttonboxes must later be combined into menus and panels |
45 |
* Note: Call TouchButton to activate buttons and submenus when ready |
46 |
*/ |
47 |
+ |
48 |
+static void btn_CreateWindows(); |
49 |
+ |
50 |
ButtonBox MakeButtonBox ( parent, gc, visual, background, geo, defs, borders ) |
51 |
BoxParent *parent; /* i: Parent window info */ |
52 |
GC gc; /* i: graphics context for drawing labels */ |
53 |
@@ -70,7 +73,6 @@ ButtonBox MakeButtonBox ( parent, gc, vi |
54 |
int x, y; /* l: coordinates of box in parent */ |
55 |
int i; /* l: loop counter */ |
56 |
char *btn_Alloc(); |
57 |
- static void btn_CreateWindows(); |
58 |
void btn_LabelButtons(), btn_Dimensions(); |
59 |
|
60 |
/* allocate the space for the new record */ |
61 |
--- btnlib/draw.c.orig 1991-06-21 23:40:21 UTC |
62 |
+++ btnlib/draw.c |
63 |
@@ -103,11 +103,13 @@ void btn_PutImage ( button, phase ) |
64 |
* Xlib calls: none |
65 |
* Method: Dim this box and all co-menu boxes |
66 |
*/ |
67 |
+ |
68 |
+static void btn_DimButtons(); |
69 |
+ |
70 |
void btn_DelightButtons ( buttonbox ) |
71 |
ButtonBox buttonbox; |
72 |
{ |
73 |
int i; |
74 |
- static void btn_DimButtons(); |
75 |
|
76 |
btn_DimButtons(buttonbox); |
77 |
for( i=0; i < buttonbox->co_menu_count; i++ ) { |
78 |
@@ -153,11 +155,13 @@ static void btn_DimButtons ( buttonbox ) |
79 |
* Uses: btn_LightButtons() below |
80 |
* Xlib calls: none |
81 |
*/ |
82 |
+ |
83 |
+static void btn_LightButtons(); |
84 |
+ |
85 |
void btn_RelightButtons ( buttonbox ) |
86 |
ButtonBox buttonbox; |
87 |
{ |
88 |
int i; |
89 |
- static void btn_LightButtons(); |
90 |
|
91 |
btn_LightButtons(buttonbox); |
92 |
for( i=0; i < buttonbox->co_menu_count; i++ ) { |
93 |
--- btnlib/event.c.orig 1995-05-04 17:27:33 UTC |
94 |
+++ btnlib/event.c |
95 |
@@ -52,12 +52,14 @@ static int select_size=0; |
96 |
* with their active submenus. |
97 |
* Note: Must be called with a buttonbox at the base of the menu tree |
98 |
*/ |
99 |
+ |
100 |
+static int btn_Event(); |
101 |
+ |
102 |
int ButtonEvent ( buttonbox, event ) |
103 |
ButtonBox buttonbox; /* i: top handle for button menu group */ |
104 |
XEvent *event; /* i: pointer to filled event record */ |
105 |
{ |
106 |
int i; /* l: loop counter */ |
107 |
- static int btn_Event(); |
108 |
|
109 |
/* is the event in the primary buttonbox (or its sub-menus) */ |
110 |
if( btn_Event(buttonbox, event) != 0 ) { |
111 |
@@ -139,6 +141,10 @@ static int btn_Event ( buttonbox, event |
112 |
* with their active submenus. |
113 |
* Note: Must be called with a buttonbox at the base of the menu tree |
114 |
*/ |
115 |
+ |
116 |
+static int btn_Event(); |
117 |
+static int btn_Control(); |
118 |
+ |
119 |
int ButtonControl ( buttonbox, event, response ) |
120 |
ButtonBox buttonbox; /* i: top handle for button menu group */ |
121 |
XEvent *event; /* i: pointer to filled event record */ |
122 |
@@ -147,8 +153,6 @@ int ButtonControl ( buttonbox, event, re |
123 |
int status; /* o: reason for return code (-1,0,1) */ |
124 |
int not_found; /* l: event search status */ |
125 |
int i; /* l: loop counter */ |
126 |
- static int btn_Event(); |
127 |
- static int btn_Control(); |
128 |
|
129 |
status = 1; |
130 |
*response = NULL; |
131 |
@@ -206,6 +210,9 @@ int ButtonControl ( buttonbox, event, re |
132 |
* until one fields it. If still not, return NULL, else (it |
133 |
* was fielded) get the next event and loop again. |
134 |
*/ |
135 |
+ |
136 |
+static int btn_Event(); |
137 |
+ |
138 |
static int btn_Control ( buttonbox, event, response ) |
139 |
ButtonBox buttonbox; /* i: top handle for button menu tree */ |
140 |
XEvent *event; /* i: pointer to filled event record */ |
141 |
@@ -218,7 +225,6 @@ static int btn_Control ( buttonbox, even |
142 |
int type; /* l: temp for button response type */ |
143 |
int id; /* l: temp for button id */ |
144 |
int mask[2]; /* l: temp store for select mask (select changes it) */ |
145 |
- static int btn_Event(); |
146 |
int btn_PushButton(); |
147 |
void btn_PutImage(), btn_DrawButton(), btn_ReleaseButton(); |
148 |
|
149 |
--- btnlib/image.c.orig 1991-08-03 22:42:11 UTC |
150 |
+++ btnlib/image.c |
151 |
@@ -38,6 +38,9 @@ static char SccsId[] = "%W% %G%"; |
152 |
* Post-state: off_out, off_in, on_out, on_in XImage's set in button record. |
153 |
* Exception: Only labels present are installed. |
154 |
*/ |
155 |
+ |
156 |
+static void btn_AddLabel(); |
157 |
+ |
158 |
void btn_MakeXImages ( button, width, height, byte_width, visual, |
159 |
off_out, off_in, on_out, on_in, mapsz, off, on, motf ) |
160 |
ButtonRecord *button; /* i: main structure describing button */ |
161 |
@@ -56,7 +59,6 @@ void btn_MakeXImages ( button, width, he |
162 |
unsigned char *data; /* l: pointer to bitmap currently processing */ |
163 |
XImage *ximage; |
164 |
char *btn_Alloc(); |
165 |
- static void btn_AddLabel(); |
166 |
|
167 |
#ifdef ALLIANT |
168 |
extern int nbutton; |
169 |
@@ -173,6 +175,9 @@ void btn_MakeXImages ( button, width, he |
170 |
* Exception: Label is not stenciled if one dimension would be zero. |
171 |
* Method: Get basic alignment parameters and call btn_StencilLabel(); |
172 |
*/ |
173 |
+ |
174 |
+static int btn_LabelX(), btn_LabelY(); |
175 |
+ |
176 |
static void btn_AddLabel ( label, width, height, byte_width, bitmap, inverse ) |
177 |
ButtonLabel *label; /* i: record of label bitmap to stencil in */ |
178 |
int width; /* i: width in pixels of button */ |
179 |
@@ -185,7 +190,6 @@ static void btn_AddLabel ( label, width, |
180 |
int dst_x, dst_y; /* l: coords of start of stencil in dst (button) */ |
181 |
int xwdth; /* l: width (cols) to stencil */ |
182 |
int yhght; /* l: number of lines (rows) to stencil */ |
183 |
- static int btn_LabelX(), btn_LabelY(); |
184 |
void btn_StencilLabel(); |
185 |
|
186 |
if( ((xwdth = btn_LabelX(label, width, &src_x, &dst_x)) > 0) && |
187 |
--- btnlib/label.c.orig 1995-05-04 17:19:37 UTC |
188 |
+++ btnlib/label.c |
189 |
@@ -42,6 +42,10 @@ static unsigned char lmask[8] = { 0x01,0 |
190 |
* Note: For each byte, bit 0 (0x01) appears on the left. |
191 |
* Note: For each byte, bit 7 (0x80) appears on the right. |
192 |
*/ |
193 |
+ |
194 |
+static void btn_Stencil(), btn_StencilInv(); |
195 |
+static void btn_StencilAlligned(),btn_StencilAllignedInv(); |
196 |
+ |
197 |
void btn_StencilLabel ( src, msk, dst, src_byte_width, dst_byte_width, |
198 |
src_x, src_y, dst_x, dst_y, width, height, inverse ) |
199 |
unsigned char *src; /* i: ptr to first byte of pattern */ |
200 |
@@ -66,9 +70,6 @@ void btn_StencilLabel ( src, msk, dst, s |
201 |
int first_mask; /* l: bit mask, with coded sign (see above) */ |
202 |
int last_mask; /* l: bit mask, with coded sign (see above) */ |
203 |
|
204 |
- static void btn_Stencil(), btn_StencilInv(); |
205 |
- static void btn_StencilAlligned(),btn_StencilAllignedInv(); |
206 |
- |
207 |
/* advance src and msk to their first used bytes */ |
208 |
byte_offset = (src_y * src_byte_width) + (src_x / 8); |
209 |
src += byte_offset; |
210 |
--- btnlib/mount.c.orig 1990-04-20 21:56:27 UTC |
211 |
+++ btnlib/mount.c |
212 |
@@ -35,11 +35,13 @@ static char SccsId[] = "%W% %G%"; |
213 |
* Xlib calls: none |
214 |
* Note: This routine moves latterally to cover co-menus |
215 |
*/ |
216 |
+ |
217 |
+static void btn_MapButtonbox(); |
218 |
+ |
219 |
void MountButtonMenu ( buttonbox ) |
220 |
ButtonBox buttonbox; |
221 |
{ |
222 |
int i; |
223 |
- static void btn_MapButtonbox(); |
224 |
|
225 |
btn_MapButtonbox(buttonbox); |
226 |
for( i = 0; i < buttonbox->co_menu_count; i++ ) |
227 |
@@ -109,6 +111,9 @@ static void btn_UnmapButtonbox ( buttonb |
228 |
* map submenus of new button. |
229 |
* Note: Unmapping submenus is harmless if they were not mapped. |
230 |
*/ |
231 |
+ |
232 |
+static void btn_UnmapButtonbox(), btn_MapButtonbox(); |
233 |
+ |
234 |
void btn_ReplaceSubmenus ( buttonbox, btn, op_num, mapping ) |
235 |
ButtonBox buttonbox; |
236 |
int btn; |
237 |
@@ -116,7 +121,6 @@ void btn_ReplaceSubmenus ( buttonbox, bt |
238 |
int mapping; /* i: switch allows suppression of mapping */ |
239 |
{ |
240 |
int i; |
241 |
- static void btn_UnmapButtonbox(), btn_MapButtonbox(); |
242 |
|
243 |
/* clear out the old submenus */ |
244 |
for( i=0; i < buttonbox->submenu_count; i++ ) |
245 |
@@ -149,6 +153,9 @@ void btn_ReplaceSubmenus ( buttonbox, bt |
246 |
* Note: Requires search through co-menus |
247 |
* Note: Unmapping cosubmenus is harmless if they were not mapped. |
248 |
*/ |
249 |
+ |
250 |
+static void btn_UnmapButtonbox(), btn_MapButtonbox(); |
251 |
+ |
252 |
void btn_ReplaceCosubmenus ( buttonbox, btn, op_num, mapping ) |
253 |
ButtonBox buttonbox; |
254 |
int btn; |
255 |
@@ -156,7 +163,6 @@ void btn_ReplaceCosubmenus ( buttonbox, |
256 |
int mapping; /* i: switch allows suppression of mapping */ |
257 |
{ |
258 |
int i, j; |
259 |
- static void btn_UnmapButtonbox(), btn_MapButtonbox(); |
260 |
|
261 |
/* check to see if we have the co-mode submenus */ |
262 |
if( buttonbox->cosubmenu_count > 0 ) { |
263 |
--- btnlib/resize.c.orig 1990-04-20 22:15:57 UTC |
264 |
+++ btnlib/resize.c |
265 |
@@ -33,12 +33,14 @@ static char SccsId[] = "%W% %G%"; |
266 |
* Post-state: All buttonboxes having given parent are resized to fill |
267 |
* Method: Call btn_ChkResize with this menu and then its co-menus. |
268 |
*/ |
269 |
+ |
270 |
+static void btn_ChkResize(); |
271 |
+ |
272 |
void ResizeButtons ( buttonbox, parent ) |
273 |
ButtonBox buttonbox; /* i: top handle for button menu group */ |
274 |
BoxParent *parent; /* i: record describing parent window */ |
275 |
{ |
276 |
int i; /* l: loop counter */ |
277 |
- static void btn_ChkResize(); |
278 |
|
279 |
/* check this buttonbox */ |
280 |
btn_ChkResize(buttonbox, parent); |
281 |
--- clralloc.c.orig 1999-05-12 18:40:45 UTC |
282 |
+++ clralloc.c |
283 |
@@ -39,12 +39,14 @@ static unsigned long overlay_mask; /* fo |
284 |
* Method: Try for at least min cells in default colormap, if failed |
285 |
* try to create a private colormap. |
286 |
*/ |
287 |
+ |
288 |
+static Colormap create_colormap(); |
289 |
+static int alloc_color_cells(); |
290 |
+ |
291 |
int alloc_colors( color ) |
292 |
struct colorRec *color; |
293 |
{ |
294 |
int verify_pseudocolor(); |
295 |
- static Colormap create_colormap(); |
296 |
- static int alloc_color_cells(); |
297 |
|
298 |
if( (color->map.default_permit != NO) && |
299 |
(color->map.default_enable == YES) && |
300 |
--- clrctrl.c.orig 1990-04-20 14:43:37 UTC |
301 |
+++ clrctrl.c |
302 |
@@ -36,13 +36,15 @@ extern struct cgraphRec cgraph; |
303 |
* Subroutine: select_color |
304 |
* Purpose: Things to do when a buttonbox color menu button is selected |
305 |
*/ |
306 |
+ |
307 |
+static void new_color_table(); |
308 |
+ |
309 |
void select_color ( ) |
310 |
{ |
311 |
static int overlay = 0; |
312 |
static int cells = 0; |
313 |
static int mode = VOP_PseudoColor; |
314 |
void invert_rgb(), reinit_color(); |
315 |
- static void new_color_table(); |
316 |
|
317 |
if( control.response[0] == VOP ) { |
318 |
switch( control.response[1] ) { |
319 |
@@ -218,10 +220,12 @@ static void new_color_table ( map_code ) |
320 |
* Purpose: Reverse all colors at once (respond to invert button) |
321 |
* Xlib call: XStoreColors() |
322 |
*/ |
323 |
+ |
324 |
+static void invert_table(); |
325 |
+ |
326 |
void invert_rgb ( ) |
327 |
{ |
328 |
void make_cellstore_from_cellmaps(), draw_cgraph(); |
329 |
- static void invert_table(); |
330 |
|
331 |
/* invert color tables and remake storemap */ |
332 |
invert_table(&color.ctable.red); |
333 |
--- clrhard.c.orig 1990-04-20 13:54:21 UTC |
334 |
+++ clrhard.c |
335 |
@@ -29,11 +29,13 @@ static char SccsId[] = "%W% %G%"; |
336 |
* Subroutine: init_hard_colors |
337 |
* Purpose: Set up basic hardware colors |
338 |
*/ |
339 |
+ |
340 |
+static int get_hard_color(); |
341 |
+ |
342 |
void init_hard_colors ( color, colormap ) |
343 |
struct colorRec *color; |
344 |
Colormap colormap; |
345 |
{ |
346 |
- static int get_hard_color(); |
347 |
|
348 |
color->hard.red = |
349 |
get_hard_color(color->display, colormap, "red", 63000, 0, 0); |
350 |
@@ -58,12 +60,14 @@ void init_hard_colors ( color, colormap |
351 |
* Subroutine: lookup_cursor_colors |
352 |
* Purpose: Get color parameters from named cursor colors |
353 |
*/ |
354 |
+ |
355 |
+static void lookup_color(); |
356 |
+ |
357 |
void lookup_cursor_colors ( color, colormap, init ) |
358 |
struct colorRec *color; |
359 |
Colormap colormap; |
360 |
int init; |
361 |
{ |
362 |
- static void lookup_color(); |
363 |
|
364 |
/* update xcolor structs if needed */ |
365 |
if( init || (color->cur.desired_cur != NULL) ) { |
366 |
@@ -90,12 +94,14 @@ void lookup_cursor_colors ( color, color |
367 |
* Pre-state: XColor for cur, one, and two, initialized |
368 |
* Post-state: Pixel values for one and two set, that for cur returned. |
369 |
*/ |
370 |
+ |
371 |
+static int alloc_hard_color(); |
372 |
+ |
373 |
int alloc_cursor_cell_color ( color, colormap ) |
374 |
struct colorRec *color; |
375 |
Colormap colormap; |
376 |
{ |
377 |
int val; |
378 |
- static int alloc_hard_color(); |
379 |
|
380 |
if( (color->cur.disp_one = |
381 |
alloc_hard_color(color->display, colormap, &color->cur.color_one)) < 0 ) |
382 |
@@ -113,10 +119,12 @@ int alloc_cursor_cell_color ( color, col |
383 |
* Subroutine: free_cursor_cell_color |
384 |
* Purpose: Free cell color overlay colors |
385 |
*/ |
386 |
+ |
387 |
+static void free_readonly_color(); |
388 |
+ |
389 |
void free_cursor_cell_color ( color ) |
390 |
struct colorRec *color; |
391 |
{ |
392 |
- static void free_readonly_color(); |
393 |
|
394 |
free_readonly_color(color, (int)color->cur.color_one.pixel); |
395 |
free_readonly_color(color, (int)color->cur.color_two.pixel); |
396 |
--- clrinit.c.orig 2001-12-14 23:17:55 UTC |
397 |
+++ clrinit.c |
398 |
@@ -38,6 +38,9 @@ static Display *display; |
399 |
* Subroutine: init_color |
400 |
* Purpose: Claim and set up colors (and do any needed initial work) |
401 |
*/ |
402 |
+ |
403 |
+static int init_visual(); |
404 |
+ |
405 |
void init_color ( color, init ) |
406 |
struct colorRec *color; |
407 |
int init; |
408 |
@@ -46,7 +49,6 @@ void init_color ( color, init ) |
409 |
void exit_errmsg(), init_hard_colors(), init_halftone(); |
410 |
void free_color_cells(), lookup_cursor_colors(), free_cursor_cell_color(); |
411 |
void init_overlay_color(), init_cell_color(), init_halftone_color(); |
412 |
- static int init_visual(); |
413 |
|
414 |
if( init ) { |
415 |
display = color->display; |
416 |
--- clrmenu.c.orig 1990-04-28 22:40:14 UTC |
417 |
+++ clrmenu.c |
418 |
@@ -35,14 +35,16 @@ EditStruct *color_edit; /* key to popup |
419 |
* Purpose: Get a new pre-defined color table and load it for use |
420 |
* Returns: 1 if succeeded, else 0 |
421 |
*/ |
422 |
+ |
423 |
+static void load_newtable(), write_color_file(); |
424 |
+static ColorTable *read_color_file(); |
425 |
+ |
426 |
int fetch_colortable ( color, table_code, imagefile ) |
427 |
struct colorRec *color; |
428 |
int table_code; |
429 |
char *imagefile; /* i: imagefile name to print in output file */ |
430 |
{ |
431 |
ColorTable *newtable; |
432 |
- static void load_newtable(), write_color_file(); |
433 |
- static ColorTable *read_color_file(); |
434 |
|
435 |
switch( table_code ) { |
436 |
case MOP_Init_A: |
437 |
@@ -111,13 +113,15 @@ static ColorTable *read_color_file ( ) |
438 |
* Subroutine: write_color_file |
439 |
* Purpose: Open and write a color table file |
440 |
*/ |
441 |
+ |
442 |
+static void print_one_color(); |
443 |
+ |
444 |
static void write_color_file ( imagefile, color ) |
445 |
char *imagefile; |
446 |
struct colorRec *color; |
447 |
{ |
448 |
FILE *fp; |
449 |
int error; |
450 |
- static void print_one_color(); |
451 |
EditStruct *init_edit_popup(); |
452 |
int open_output_file(); |
453 |
void timestamp(); |
454 |
@@ -189,11 +193,13 @@ static void print_one_color ( fp, table |
455 |
* Subroutine: load_newtable |
456 |
* Purpose: Load an internally stored color table for use |
457 |
*/ |
458 |
+ |
459 |
+static void load_subtable(); |
460 |
+ |
461 |
static void load_newtable ( ctable, new ) |
462 |
struct colorTable *ctable; |
463 |
ColorTable *new; |
464 |
{ |
465 |
- static void load_subtable(); |
466 |
|
467 |
load_subtable(&ctable->red, &new->red); |
468 |
load_subtable(&ctable->green, &new->green); |
469 |
--- clrread.c.orig 1990-04-28 23:30:35 UTC |
470 |
+++ clrread.c |
471 |
@@ -25,6 +25,9 @@ static char SccsId[] = "%W% %G%"; |
472 |
* Subroutine: parse_color_file |
473 |
* Purpose: Parse values after color identifier |
474 |
*/ |
475 |
+ |
476 |
+static int parse_color_table(), advance_to_ascii(); |
477 |
+ |
478 |
int parse_color_file ( fp, ctable, max_entries ) |
479 |
ColorTable *ctable; |
480 |
int max_entries; |
481 |
@@ -35,7 +38,6 @@ int parse_color_file ( fp, ctable, max_e |
482 |
char line[SZ_LINE]; |
483 |
char cbuf[SZ_LINE]; |
484 |
struct SubTable *table; |
485 |
- static int parse_color_table(), advance_to_ascii(); |
486 |
|
487 |
line_num = 0; |
488 |
/* advance to first non-comment line */ |
489 |
@@ -95,6 +97,9 @@ int parse_color_file ( fp, ctable, max_e |
490 |
* Purpose: Read color table entries for one color |
491 |
* Note: Values may start with word "gamma" and its value |
492 |
*/ |
493 |
+ |
494 |
+static int advance_to_ascii(), prep_alpha(); |
495 |
+ |
496 |
static int parse_color_table ( fp, line, cbuf, i, len, line_num, |
497 |
farb, max_entries, color_cnt ) |
498 |
FILE *fp; |
499 |
@@ -110,7 +115,6 @@ static int parse_color_table ( fp, line, |
500 |
float level, intensity; |
501 |
char *level_token, *intensity_token; |
502 |
int status, entry; |
503 |
- static int advance_to_ascii(), prep_alpha(); |
504 |
int check_parens(); |
505 |
char *next_token(); |
506 |
|
507 |
@@ -227,6 +231,9 @@ static int parse_color_table ( fp, line, |
508 |
* Negative val if string starts with a number or paren |
509 |
* 0 if file ended, or first character was neither char nor num |
510 |
*/ |
511 |
+ |
512 |
+static int find_token(), prep_alpha(); |
513 |
+ |
514 |
static int advance_to_ascii ( fp, line, scratch, len, line_num, dont_end ) |
515 |
FILE *fp; /* i: file descriptor */ |
516 |
char *line; /* i: buffer to get entire line */ |
517 |
@@ -236,7 +243,6 @@ static int advance_to_ascii ( fp, line, |
518 |
int dont_end; /* flag that more is definitely expected */ |
519 |
{ |
520 |
int i; |
521 |
- static int find_token(), prep_alpha(); |
522 |
int check_parens(); |
523 |
|
524 |
/* advance to first non-comment line */ |
525 |
--- clrsetup.c.orig 1990-06-03 04:07:29 UTC |
526 |
+++ clrsetup.c |
527 |
@@ -29,12 +29,14 @@ static char SccsId[] = "%W% %G%"; |
528 |
* Purpose: Set up color parameters unique to overlay type usage |
529 |
* Xlib calls: XStoreColors() |
530 |
*/ |
531 |
+ |
532 |
+static void set_cursor_overlay_color(), copy_xcolor_rgb(), init_cellstore(); |
533 |
+ |
534 |
void init_overlay_color ( color ) |
535 |
struct colorRec *color; |
536 |
{ |
537 |
int ncolors; |
538 |
void make_cellstore_from_tables(); |
539 |
- static void set_cursor_overlay_color(), copy_xcolor_rgb(), init_cellstore(); |
540 |
|
541 |
init_cellstore(color->cellstore, color->pixvalmap, color->ncolors); |
542 |
/* color in the cursor range of the color map */ |
543 |
@@ -75,12 +77,14 @@ void init_overlay_color ( color ) |
544 |
* Purpose: Set up color parameters unique to cell usage without overlay |
545 |
* Xlib calls: XStoreColors() |
546 |
*/ |
547 |
+ |
548 |
+static void init_cellstore(); |
549 |
+ |
550 |
void init_cell_color ( color ) |
551 |
struct colorRec *color; |
552 |
{ |
553 |
void make_cellstore_from_tables(); |
554 |
int alloc_cursor_cell_color(); |
555 |
- static void init_cellstore(); |
556 |
|
557 |
init_cellstore(color->cellstore, color->pixvalmap, color->ncolors); |
558 |
/* Not cursor plane */ |
559 |
--- clrvary.c.orig 1990-04-20 13:57:20 UTC |
560 |
+++ clrvary.c |
561 |
@@ -130,6 +130,9 @@ void vary_colors ( event, mode, track, x |
562 |
* Subroutine: vary_contrast_and_bias |
563 |
* Purpose: change color table cell_levels as per new contrast and bias |
564 |
*/ |
565 |
+ |
566 |
+static void invert_table(); |
567 |
+ |
568 |
void vary_contrast_and_bias ( table, contrast, bias ) |
569 |
struct subtableRec *table; |
570 |
double contrast; /* i: normal = 1.0 */ |
571 |
@@ -137,7 +140,6 @@ void vary_contrast_and_bias ( table, con |
572 |
{ |
573 |
double *base_level, *cell_level; |
574 |
int vertex_cnt; |
575 |
- static void invert_table(); |
576 |
|
577 |
base_level = table->base_level; |
578 |
cell_level = table->cell_level; |
579 |
--- cmdnew.c.orig 1997-06-06 14:52:04 UTC |
580 |
+++ cmdnew.c |
581 |
@@ -73,9 +73,11 @@ static char *prompt = "Enter new image f |
582 |
* Called by: key_response() in MainKey.c |
583 |
* Called by: select_environment() in MainSelect.c |
584 |
*/ |
585 |
+ |
586 |
+static int new_command(); |
587 |
+ |
588 |
void get_new_cmd ( ) |
589 |
{ |
590 |
- static int new_command(); |
591 |
int get_edit_input(); |
592 |
EditStruct *init_edit_popup(); |
593 |
|
594 |
@@ -95,6 +97,11 @@ void get_new_cmd ( ) |
595 |
* Purpose: Given a new command line, parse it and do what is called for |
596 |
* Returns: 1 = success, 0 = user decided not to do anything, -1 = error |
597 |
*/ |
598 |
+ |
599 |
+static char **make_argv(); |
600 |
+static int new_file(), form_tokens(); |
601 |
+static void redo_displays(), clear_params(), reset_dispparams(), free_argv(); |
602 |
+ |
603 |
static int new_command ( input_line ) |
604 |
char *input_line; |
605 |
{ |
606 |
@@ -104,9 +111,6 @@ static int new_command ( input_line ) |
607 |
int headersize; |
608 |
int parse_cmdline(), check_image(); |
609 |
void reinit_color(), redraw_magnifier(), touch_submenu_button(); |
610 |
- static char **make_argv(); |
611 |
- static int new_file(), form_tokens(); |
612 |
- static void redo_displays(), clear_params(), reset_dispparams(), free_argv(); |
613 |
|
614 |
/* store some key initial values */ |
615 |
headersize = img.headersize; |
616 |
--- cmdparse.c.orig 2002-04-08 19:26:55 UTC |
617 |
+++ cmdparse.c |
618 |
@@ -47,6 +47,9 @@ extern int bad_buttons; |
619 |
* Purpose: Process options to set filename and change defaults |
620 |
* Returns: -1 on error, 0 OK but no filename, 1 OK and new filename given |
621 |
*/ |
622 |
+ |
623 |
+static int parse_etc(); |
624 |
+ |
625 |
int parse_cmdline ( argc, argv, displayname ) |
626 |
int argc; |
627 |
char *argv[]; |
628 |
@@ -58,7 +61,6 @@ int parse_cmdline ( argc, argv, displayn |
629 |
int parse_rotate(), parse_scale(), parse_color(), parse_fileread(), usage(); |
630 |
int parse_cursor(); |
631 |
void init_cmdline(); |
632 |
- static int parse_etc(); |
633 |
|
634 |
if( displayname != NULL ) { |
635 |
/* if initial program command line, strip off program name, store line */ |
636 |
--- crdinvrt.c.orig 1990-04-20 14:00:26 UTC |
637 |
+++ crdinvrt.c |
638 |
@@ -28,12 +28,14 @@ static char SccsId[] = "%W% %G%"; |
639 |
* Purpose: Compute parameters of the inverse transform |
640 |
* Method: Uses LU decomposition method |
641 |
*/ |
642 |
+ |
643 |
+static void lu_decompose(), lu_backsub(); |
644 |
+ |
645 |
void invert_matrix ( old, new ) |
646 |
Transform *old, *new; |
647 |
{ |
648 |
float scratch[3][3], column[3]; |
649 |
int pivots[3]; |
650 |
- static void lu_decompose(), lu_backsub(); |
651 |
|
652 |
scratch[0][0] = old->inx_outx; |
653 |
scratch[1][0] = old->iny_outx; |
654 |
@@ -65,13 +67,15 @@ void invert_matrix ( old, new ) |
655 |
* Purpose: Compute the offsets used for integer transforms |
656 |
* Method: Uses matrix inversion |
657 |
*/ |
658 |
+ |
659 |
+static void lu_decompose(), lu_backsub(); |
660 |
+ |
661 |
void compute_iadd_invert ( old, new, ioff ) |
662 |
Transform *old, *new; |
663 |
float ioff; |
664 |
{ |
665 |
float scratch[3][3], column[3]; |
666 |
int pivots[3]; |
667 |
- static void lu_decompose(), lu_backsub(); |
668 |
|
669 |
/* set transform equations in matrix form */ |
670 |
scratch[0][0] = old->inx_outx; |
671 |
--- crdrot.c.orig 1990-04-20 14:00:51 UTC |
672 |
+++ crdrot.c |
673 |
@@ -55,6 +55,9 @@ static char SccsId[] = "%W% %G%"; |
674 |
* As each transform is applied to the front, we apply them in reverse order |
675 |
* the result is, from img->A,B,C,imgtofile(as given)->file |
676 |
*/ |
677 |
+ |
678 |
+static void move_mtrx(), flip_mtrx(), turn_mtrx(); |
679 |
+ |
680 |
void rotate_transform ( img, imgtofile, flip, rotcode ) |
681 |
Coordsys *img; |
682 |
Transform *imgtofile; |
683 |
@@ -63,7 +66,6 @@ void rotate_transform ( img, imgtofile, |
684 |
{ |
685 |
double xmove, ymove; |
686 |
int angle; |
687 |
- static void move_mtrx(), flip_mtrx(), turn_mtrx(); |
688 |
|
689 |
/* if no rotation, do nothing */ |
690 |
if( (rotcode == 0) && (flip == 0) ) return; |
691 |
@@ -93,6 +95,9 @@ void rotate_transform ( img, imgtofile, |
692 |
* Note: ioff is not used for turn or flip, as it is assumed that both |
693 |
* will be bracketed between two moves (to place origin at center) |
694 |
*/ |
695 |
+ |
696 |
+static void mult_mtrx(); |
697 |
+ |
698 |
static void move_mtrx ( mtrx, xtran, ytran, ioff, prior ) |
699 |
Transform *mtrx; |
700 |
double xtran, ytran; |
701 |
@@ -100,7 +105,6 @@ static void move_mtrx ( mtrx, xtran, ytr |
702 |
int prior; |
703 |
{ |
704 |
Transform translate; |
705 |
- static void mult_mtrx(); |
706 |
|
707 |
bzero((char *)(&translate), sizeof(Transform)); |
708 |
translate.inx_outx = 1.0; |
709 |
@@ -119,12 +123,14 @@ static void move_mtrx ( mtrx, xtran, ytr |
710 |
* Subroutine: flip_mtrx |
711 |
* Purpose: Apply a mirror reflection to the passed Transform |
712 |
*/ |
713 |
+ |
714 |
+static void mult_mtrx(); |
715 |
+ |
716 |
static void flip_mtrx ( mtrx, prior ) |
717 |
Transform *mtrx; |
718 |
int prior; /* i: 1: move, transform, move, 0: transform, move */ |
719 |
{ |
720 |
Transform reflect; |
721 |
- static void mult_mtrx(); |
722 |
|
723 |
bzero((char *)(&reflect), sizeof(Transform)); |
724 |
reflect.inx_outx = 1.0; |
725 |
@@ -141,6 +147,9 @@ static void flip_mtrx ( mtrx, prior ) |
726 |
* Note: the pivot is 0,0 of the passed Transform's coordinate system |
727 |
* Exception: only multiples of 90 degrees are allowed |
728 |
*/ |
729 |
+ |
730 |
+static void mult_mtrx(); |
731 |
+ |
732 |
static void turn_mtrx ( mtrx, angle, prior ) |
733 |
Transform *mtrx; |
734 |
int angle; |
735 |
@@ -148,7 +157,6 @@ static void turn_mtrx ( mtrx, angle, pri |
736 |
{ |
737 |
Transform rotate; |
738 |
void exit_errmsg(); |
739 |
- static void mult_mtrx(); |
740 |
|
741 |
while( angle >= 360 ) angle -= 360; |
742 |
while( angle < 0 ) angle += 360; |
743 |
--- crdsynth.c.orig 1990-04-20 14:01:55 UTC |
744 |
+++ crdsynth.c |
745 |
@@ -147,11 +147,13 @@ void combine_transform ( new, first, sec |
746 |
* Subroutine: set_trans_speed |
747 |
* Purpose: Set parameters for fast integer computation |
748 |
*/ |
749 |
+ |
750 |
+static int integer_test(); |
751 |
+ |
752 |
void set_trans_speed ( trans ) |
753 |
Transform *trans; |
754 |
{ |
755 |
int xzm, yzm; |
756 |
- static int integer_test(); |
757 |
|
758 |
trans->ixzoom = 0; |
759 |
trans->iyzoom = 0; |
760 |
--- crdtemp.c.orig 1996-02-26 20:14:19 UTC |
761 |
+++ crdtemp.c |
762 |
@@ -126,6 +126,9 @@ void set_disptran ( coord ) |
763 |
* Purpose: set up zoom given edges of desired display and |
764 |
* appropriate img transform |
765 |
*/ |
766 |
+ |
767 |
+static int choose_zoom(); |
768 |
+ |
769 |
void panedge_zoom ( coord, wintoimgtrans, win_x, win_y ) |
770 |
struct coordRec *coord; /* i: collected coords */ |
771 |
Transform *wintoimgtrans; /* i: transform from mouse's window to img */ |
772 |
@@ -134,7 +137,6 @@ void panedge_zoom ( coord, wintoimgtrans |
773 |
float imgX, imgY; |
774 |
int box_width, box_height; |
775 |
void i_transform(); |
776 |
- static int choose_zoom(); |
777 |
|
778 |
/* calculate image coordinates of win_x and win_y */ |
779 |
i_transform(wintoimgtrans, win_x, win_y, &imgX, &imgY); |
780 |
--- csrarea.c.orig 1990-04-20 14:07:03 UTC |
781 |
+++ csrarea.c |
782 |
@@ -28,13 +28,15 @@ static char SccsId[] = "%W% %G%"; |
783 |
* Purpose: Calculate area, in float units file pixels, enclosed by cursor |
784 |
* Method: Use mathematical formula appropriate to cursor type |
785 |
*/ |
786 |
+ |
787 |
+static int test_cross(); |
788 |
+ |
789 |
double cursor_area ( cursor, user_info ) |
790 |
struct cursorRec *cursor; |
791 |
int user_info; /* flag, data is for user info */ |
792 |
{ |
793 |
double area; |
794 |
int i, j; |
795 |
- static int test_cross(); |
796 |
|
797 |
switch( cursor->type ) { |
798 |
case COP_Circle: |
799 |
@@ -83,13 +85,15 @@ static double x11, y11, x12, y12; |
800 |
* are not tested since neighbors cannot cross but neighbors do |
801 |
* share a common point. |
802 |
*/ |
803 |
+ |
804 |
+static int intercept(); |
805 |
+ |
806 |
static int test_cross ( pt, cnt, j, i ) |
807 |
PolyPoint *pt; /* list of vertices */ |
808 |
int cnt; /* number of vertices */ |
809 |
int j, i; /* two vertices at ends of edge being tested */ |
810 |
{ |
811 |
int k; |
812 |
- static int intercept(); |
813 |
|
814 |
if( (i+2) >= cnt ) { |
815 |
return( 0 ); |
816 |
--- csrgrab.c.orig 1990-04-20 14:08:42 UTC |
817 |
+++ csrgrab.c |
818 |
@@ -38,12 +38,14 @@ extern struct colorRec color; /* need to |
819 |
* Purpose: Change size of cursor to intersect current mouse cursor |
820 |
* while keeping aspect ratio of cursor constant |
821 |
*/ |
822 |
+ |
823 |
+static void size_annulus(), grab_annulus(); |
824 |
+ |
825 |
void size_annuli ( cursor, event ) |
826 |
struct cursorRec *cursor; |
827 |
XEvent *event; /* i: event for location of mouse */ |
828 |
{ |
829 |
void draw_cursor(), make_cursor(); |
830 |
- static void size_annulus(), grab_annulus(); |
831 |
|
832 |
/* if this event is initiating tracking, don't erase the cursor */ |
833 |
if( event->type == MotionNotify ) |
834 |
@@ -64,13 +66,15 @@ void size_annuli ( cursor, event ) |
835 |
* Purpose: Respond to a mouse request to delete an annulus |
836 |
* |
837 |
*/ |
838 |
+ |
839 |
+static int on_annulus(); |
840 |
+static void size_annulus(), remove_annulus(); |
841 |
+ |
842 |
void delete_annulus ( cursor, event ) |
843 |
struct cursorRec *cursor; |
844 |
XEvent *event; /* i: XMotionEvent or XButtonEvent */ |
845 |
{ |
846 |
struct cursorRec *parent; |
847 |
- static int on_annulus(); |
848 |
- static void size_annulus(), remove_annulus(); |
849 |
|
850 |
/* if there are two or more annuli */ |
851 |
if( (cursor->next_annulus != 0) && |
852 |
@@ -169,14 +173,16 @@ static void remove_annulus ( parent ) |
853 |
* Purpose: Set up cursor to for a size annulus interaction |
854 |
* Called by: size_annuli() |
855 |
*/ |
856 |
+ |
857 |
+static int on_annulus(); |
858 |
+static void remove_annulus(); |
859 |
+ |
860 |
static void grab_annulus ( cursor ) |
861 |
struct cursorRec *cursor; |
862 |
{ |
863 |
double inc; |
864 |
int code; |
865 |
struct cursorRec *parent, *annulus; |
866 |
- static int on_annulus(); |
867 |
- static void remove_annulus(); |
868 |
|
869 |
code = on_annulus(cursor, &parent); |
870 |
/* decide what to draw */ |
871 |
--- csrpoly1.c.orig 1990-04-20 14:11:54 UTC |
872 |
+++ csrpoly1.c |
873 |
@@ -36,6 +36,9 @@ extern struct colorRec color; /* need to |
874 |
* Used when initiating a move or size action |
875 |
* Called by: control_cursor() in CursorCtrl.c |
876 |
*/ |
877 |
+ |
878 |
+static int on_polygon_vertex(); |
879 |
+ |
880 |
void grab_polygon_vertex ( cursor, event, size ) |
881 |
struct cursorRec *cursor; |
882 |
XEvent *event; /* i: XbuttonEvent (ButtonPress) for x & y */ |
883 |
@@ -45,7 +48,6 @@ void grab_polygon_vertex ( cursor, event |
884 |
int pt; /* l: index of polygon vertex */ |
885 |
int closest_polygon_line(); |
886 |
void draw_cursor(), add_polygon_vertex(); |
887 |
- static int on_polygon_vertex(); |
888 |
|
889 |
/* erase existing cursor */ |
890 |
draw_cursor(cursor, &color.gcset.undraw); |
891 |
@@ -84,13 +86,15 @@ void grab_polygon_vertex ( cursor, event |
892 |
* Returns: 1 if image must be redrawn, else 0 |
893 |
* Called by: control_cursor() in CursorCtrl.c |
894 |
*/ |
895 |
+ |
896 |
+static int on_polygon_vertex(); |
897 |
+ |
898 |
int request_delete_polygon_vertex ( cursor, event ) |
899 |
struct cursorRec *cursor; |
900 |
XEvent *event; /* i: XbuttonEvent (ButtonPress) for x & y */ |
901 |
{ |
902 |
int i; |
903 |
void delete_polygon_vertex(), draw_cursor(); |
904 |
- static int on_polygon_vertex(); |
905 |
|
906 |
i = on_polygon_vertex((int)event->xbutton.x, (int)event->xbutton.y, |
907 |
cursor->points, cursor->poly_cnt); |
908 |
--- csrpoly2.c.orig 1998-07-09 16:29:27 UTC |
909 |
+++ csrpoly2.c |
910 |
@@ -72,12 +72,14 @@ void collapse_polygon ( cursor ) |
911 |
* Subroutine: start_polygon |
912 |
* Purpose: Install polygon drawing stuff for the active cursor |
913 |
*/ |
914 |
+ |
915 |
+static void init_polygon(); |
916 |
+ |
917 |
void start_polygon ( cursor, coord ) |
918 |
struct cursorRec *cursor; |
919 |
struct coordRec *coord; |
920 |
{ |
921 |
void set_polygon_from_file_coords(); |
922 |
- static void init_polygon(); |
923 |
|
924 |
if( polysz == 0 ) |
925 |
init_polygon(); |
926 |
--- csrpoly3.c.orig 1990-04-20 14:11:40 UTC |
927 |
+++ csrpoly3.c |
928 |
@@ -28,6 +28,9 @@ static char SccsId[] = "%W% %G%"; |
929 |
* vector from pointer to closest point on segment |
930 |
* Method: top down search |
931 |
*/ |
932 |
+ |
933 |
+static double distance_from_segment(), cos_to_segment(); |
934 |
+ |
935 |
int closest_polygon_line ( x, y, vertex, cnt ) |
936 |
int x, y; |
937 |
XPoint *vertex; |
938 |
@@ -38,7 +41,6 @@ int closest_polygon_line ( x, y, vertex, |
939 |
int min_endpoint, endpoint; |
940 |
int min_j; |
941 |
int i, j; |
942 |
- static double distance_from_segment(), cos_to_segment(); |
943 |
|
944 |
min_distance = 1.0E30; |
945 |
min_j = 0; |
946 |
--- csrshape.c.orig 1998-10-19 18:46:41 UTC |
947 |
+++ csrshape.c |
948 |
@@ -31,9 +31,6 @@ static char SccsId[] = "%W% %G%"; |
949 |
|
950 |
#include "defs/circle.def" /* Define Unit_circles */ |
951 |
|
952 |
-#ifdef ANSIC |
953 |
-/* Exported declarations must be centralized before ANSI C can be used */ |
954 |
- |
955 |
void make_cursor( struct cursorRec *cursor); |
956 |
static int make_arrow( double xtip, double ytip, double xray, |
957 |
double rotsin, double rotcos, XPoint *points); |
958 |
@@ -41,28 +38,20 @@ static int make_boxcur( double xcen, dou |
959 |
double xray, double yray, |
960 |
double rotsin, double rotcos, XPoint *points); |
961 |
static int make_circur( double xcen, double ycen, double radius, |
962 |
- XPoint *points ) |
963 |
+ XPoint *points ); |
964 |
static int make_sqrcur( double xcen, double ycen, double radius, |
965 |
- XPoint *points ) |
966 |
+ XPoint *points ); |
967 |
static int make_diacur( double xcen, double ycen, double radius, |
968 |
- XPoint *points ) |
969 |
+ XPoint *points ); |
970 |
static int make_crosscur( double xcen, double ycen, double radius, |
971 |
- XPoint *points ) |
972 |
+ XPoint *points ); |
973 |
static int make_excur( double xcen, double ycen, double radius, |
974 |
- XPoint *points ) |
975 |
+ XPoint *points ); |
976 |
static int make_ellipse( double xcen, double ycen, |
977 |
double xradius, double yradius, |
978 |
double rotsin, double rotcos, XPoint *points); |
979 |
static int make_piecur( double xcen, double ycen, double radius, |
980 |
- XPoint *points ) |
981 |
- |
982 |
-#else |
983 |
- |
984 |
- static int make_arrow(), make_boxcur(), make_circur(); |
985 |
- static int make_ellipse(), make_piecur(); |
986 |
- |
987 |
-#endif |
988 |
- |
989 |
+ XPoint *points ); |
990 |
|
991 |
/* Declare and initialize drawing tools */ |
992 |
double *UnitPieX = Circle12X; |
993 |
--- ctrlcntn.c.orig 1998-07-09 16:29:00 UTC |
994 |
+++ ctrlcntn.c |
995 |
@@ -61,6 +61,9 @@ void init_connections () |
996 |
* Purpose: Open a connection to a remote process and update event handlers |
997 |
* Returns: -1 on failure, else IPC number |
998 |
*/ |
999 |
+ |
1000 |
+static void init_select(); |
1001 |
+ |
1002 |
int open_connection ( connection ) |
1003 |
struct connectRec *connection; |
1004 |
{ |
1005 |
@@ -71,7 +74,6 @@ int open_connection ( connection ) |
1006 |
extern int ButtonSelectMask(), open_pipe(); |
1007 |
extern int open_socket_listener(); |
1008 |
extern struct connectRec *accept_socket_connection(); |
1009 |
- static void init_select(); |
1010 |
#endif |
1011 |
|
1012 |
#ifdef NOPIPEFLUSH |
1013 |
--- ctrlfile.c.orig 1990-04-20 13:49:12 UTC |
1014 |
+++ ctrlfile.c |
1015 |
@@ -40,6 +40,9 @@ extern int errno; |
1016 |
* Post state: Sets pointer to file, open and ready for writing |
1017 |
* Returns: 2 = append, 1 = new file, 0 = user decided not to, -1 = error |
1018 |
*/ |
1019 |
+ |
1020 |
+static int file_exists(); |
1021 |
+ |
1022 |
int open_output_file ( fd, edit, one_popup_row, prompt ) |
1023 |
FILE **fd; |
1024 |
EditStruct *edit; |
1025 |
@@ -56,7 +59,6 @@ int open_output_file ( fd, edit, one_pop |
1026 |
int get_edit_input(); |
1027 |
EditStruct *init_edit_popup(); |
1028 |
void clear_edit_buf(), unmap_popwin(); |
1029 |
- static int file_exists(); |
1030 |
|
1031 |
open_type[0] = 0; |
1032 |
if( (get_edit_input(edit, one_popup_row, 1, 0, prompt) <= 0) || |
1033 |
@@ -137,6 +139,9 @@ int open_output_file ( fd, edit, one_pop |
1034 |
* Note: Sets pointer of file open and ready for reading |
1035 |
* Returns: 1 on success, 0 if user decided not to, -1 on error |
1036 |
*/ |
1037 |
+ |
1038 |
+static int file_exists(); |
1039 |
+ |
1040 |
int open_input_file ( fd, edit, one_popup_row, prompt ) |
1041 |
FILE **fd; |
1042 |
EditStruct *edit; |
1043 |
@@ -146,7 +151,6 @@ int open_input_file ( fd, edit, one_popu |
1044 |
char filename[132]; |
1045 |
int exist; |
1046 |
int get_edit_input(); |
1047 |
- static int file_exists(); |
1048 |
|
1049 |
if( get_edit_input(edit, one_popup_row, 1, 1, prompt) <= 0 ) |
1050 |
return( 0 ); |
1051 |
--- ctrlgc.c.orig 1990-05-02 08:19:55 UTC |
1052 |
+++ ctrlgc.c |
1053 |
@@ -237,10 +237,12 @@ GC set_edit_gc ( font, foreground, backg |
1054 |
* Subroutine: get_fontstruct |
1055 |
* Returns: Pointer to the specified fontstruct |
1056 |
*/ |
1057 |
+ |
1058 |
+static int init_font(); |
1059 |
+ |
1060 |
XFontStruct *get_fontstruct ( app_code ) |
1061 |
int app_code; /* i: see comments above */ |
1062 |
{ |
1063 |
- static int init_font(); |
1064 |
|
1065 |
if( (app_font[app_code] == NULL) && (init_font(app_code) == NULL) ) |
1066 |
return( NULL ); |
1067 |
@@ -253,11 +255,13 @@ XFontStruct *get_fontstruct ( app_code ) |
1068 |
* Purpose: Load the fonts used by this program |
1069 |
* Returns: Font on success, else 0 |
1070 |
*/ |
1071 |
+ |
1072 |
+static int open_font(); |
1073 |
+ |
1074 |
static int init_font ( app_code ) |
1075 |
int app_code; /* i: font application type index */ |
1076 |
{ |
1077 |
int i, name_index; |
1078 |
- static int open_font(); |
1079 |
|
1080 |
for( i=0; i<OPTION_COUNT; i++ ) { |
1081 |
name_index = preference[app_code][i]; |
1082 |
--- dispblnk.c.orig 1990-04-20 14:23:14 UTC |
1083 |
+++ dispblnk.c |
1084 |
@@ -181,13 +181,15 @@ static int display_blink ( index ) |
1085 |
* For each button release, if it is on top of stack, release it and display |
1086 |
* one below, else just release it |
1087 |
*/ |
1088 |
+ |
1089 |
+static int display_blink(); |
1090 |
+ |
1091 |
void control_blink () |
1092 |
{ |
1093 |
static int oldmode; |
1094 |
static int buttons = 0; |
1095 |
static int btnstack[4]; |
1096 |
int i; |
1097 |
- static int display_blink(); |
1098 |
|
1099 |
if( control.event.type == ButtonPress ) { |
1100 |
/* don't respond if it's with a meta key (window resize) */ |
1101 |
--- dispbtmp.c.orig 1991-06-21 22:58:15 UTC |
1102 |
+++ dispbtmp.c |
1103 |
@@ -55,9 +55,11 @@ void init_halftone () |
1104 |
* Subroutine: select_halftone |
1105 |
* Purpose: Respond to halftone selection command |
1106 |
*/ |
1107 |
+ |
1108 |
+static void new_halftone(); |
1109 |
+ |
1110 |
void select_halftone () |
1111 |
{ |
1112 |
- static void new_halftone(); |
1113 |
|
1114 |
switch( control.response[1] ) { |
1115 |
case 0: |
1116 |
--- editctrl.c.orig 1990-06-03 04:07:48 UTC |
1117 |
+++ editctrl.c |
1118 |
@@ -61,6 +61,9 @@ extern int XZ_efn; |
1119 |
* Subroutine: init_edit_popup |
1120 |
* Purpose: Get everything ready for running editor sessions |
1121 |
*/ |
1122 |
+ |
1123 |
+static void init_popwin(); |
1124 |
+ |
1125 |
EditStruct *init_edit_popup ( string, max_chars ) |
1126 |
char *string; |
1127 |
int max_chars; |
1128 |
@@ -69,7 +72,6 @@ EditStruct *init_edit_popup ( string, ma |
1129 |
int len; |
1130 |
EditStruct *get_edit_struct(); |
1131 |
void init_edit_struct(), load_edit_struct(); |
1132 |
- static void init_popwin(); |
1133 |
|
1134 |
if( init_window ) { |
1135 |
init_popwin(color.gcset.menu.foreground, color.gcset.menu.background); |
1136 |
@@ -91,6 +93,9 @@ EditStruct *init_edit_popup ( string, ma |
1137 |
* (but expose is fielded and configure is saved for end). |
1138 |
* Returns: 1 if user returns with a response, 0 if user cancels session |
1139 |
*/ |
1140 |
+ |
1141 |
+static void map_popwin(); |
1142 |
+ |
1143 |
int get_edit_input ( edit, one_row, map, unmap, prompt ) |
1144 |
EditStruct *edit; |
1145 |
int one_row; /* i: put-edit-after-prompt-on-same-line */ |
1146 |
@@ -104,7 +109,6 @@ int get_edit_input ( edit, one_row, map, |
1147 |
int emacs_response(); |
1148 |
void draw_new_string(), redraw_edit_string(); |
1149 |
void adjust_desktop(), redraw_window(), unmap_popwin(); |
1150 |
- static void map_popwin(); |
1151 |
|
1152 |
map_popwin(edit, one_row, prompt, map); |
1153 |
if( !map ) { |
1154 |
--- grphbtmp.c.orig 1990-04-20 14:31:04 UTC |
1155 |
+++ grphbtmp.c |
1156 |
@@ -27,6 +27,9 @@ extern struct colorRec color; |
1157 |
* Subroutine: make_halftone_panimage |
1158 |
* Purpose: Make halftone bitmap for pan window (panbox) |
1159 |
*/ |
1160 |
+ |
1161 |
+static void byte_dither_sample(), byte_diffuse_sample(); |
1162 |
+ |
1163 |
void make_halftone_colorbar ( bytedata, bitdata, |
1164 |
width, height, bytes_per_line ) |
1165 |
unsigned char *bytedata; |
1166 |
@@ -34,7 +37,6 @@ void make_halftone_colorbar ( bytedata, |
1167 |
int width, height; |
1168 |
int bytes_per_line; |
1169 |
{ |
1170 |
- static void byte_dither_sample(), byte_diffuse_sample(); |
1171 |
|
1172 |
bzero((char *)bitdata, bytes_per_line * height); |
1173 |
if( color.halftone.mode == BOP_Dither ) { |
1174 |
--- grphgrab.c.orig 1990-04-20 14:33:27 UTC |
1175 |
+++ grphgrab.c |
1176 |
@@ -30,10 +30,12 @@ extern struct cgraphRec cgraph; |
1177 |
* Subroutine: grab_cgraph_vertex |
1178 |
* Purpose: When a mouse button is pressed, assign a vertex to that button |
1179 |
*/ |
1180 |
+ |
1181 |
+static void get_color_vertex(); |
1182 |
+ |
1183 |
void get_cgraph_vertex ( event ) |
1184 |
XEvent *event; |
1185 |
{ |
1186 |
- static void get_color_vertex(); |
1187 |
|
1188 |
switch( event->xbutton.button ) { |
1189 |
case Button1: |
1190 |
@@ -58,10 +60,12 @@ void get_cgraph_vertex ( event ) |
1191 |
* event |
1192 |
* Returns: 1 if a vertex was dropped, else 0 |
1193 |
*/ |
1194 |
+ |
1195 |
+static int drop_color_vertex(); |
1196 |
+ |
1197 |
int drop_cgraph_vertex ( event ) |
1198 |
XEvent *event; |
1199 |
{ |
1200 |
- static int drop_color_vertex(); |
1201 |
|
1202 |
switch( event->xbutton.button ) { |
1203 |
case Button1: |
1204 |
@@ -83,13 +87,15 @@ int drop_cgraph_vertex ( event ) |
1205 |
* Purpose: Handle grab vertex event for single color |
1206 |
* Method: Grab old vertex or make new vertex - under mouse pointer |
1207 |
*/ |
1208 |
+ |
1209 |
+static int grab_old_color_vertex(); |
1210 |
+static void install_new_color_vertex(); |
1211 |
+ |
1212 |
static void get_color_vertex ( x, y, col ) |
1213 |
int x, y; |
1214 |
struct colgRec *col; |
1215 |
{ |
1216 |
void install_draw_queue_end(); |
1217 |
- static int grab_old_color_vertex(); |
1218 |
- static void install_new_color_vertex(); |
1219 |
|
1220 |
/* clip against limits */ |
1221 |
if( x < cgraph.graph.xzero ) |
1222 |
@@ -151,6 +157,9 @@ static int grab_old_color_vertex ( x, y, |
1223 |
* Subroutine: install_new_color_vertex |
1224 |
* Purpose: Given hash position, install a new vertex, and make active |
1225 |
*/ |
1226 |
+ |
1227 |
+static void add_color_vertex(), add_color_vertex_hash(); |
1228 |
+ |
1229 |
static void install_new_color_vertex ( x, y, col ) |
1230 |
int x, y; /* i: position of ULcorner of new hash mark */ |
1231 |
struct colgRec *col; /* i: color info structure for one color */ |
1232 |
@@ -158,7 +167,6 @@ static void install_new_color_vertex ( x |
1233 |
double intensity, cell_level; |
1234 |
int match; |
1235 |
int select_best_hash_position(); |
1236 |
- static void add_color_vertex(), add_color_vertex_hash(); |
1237 |
|
1238 |
col->active_hash = select_best_hash_position(x, y, col->hash, col->hash_cnt, |
1239 |
&match, cgraph.vertical); |
1240 |
@@ -251,11 +259,13 @@ static void add_color_vertex_hash ( col, |
1241 |
* Purpose: Delete a color table vertex if one is under the mouse position |
1242 |
* Returns: 1 if vertex was dropped, else 0 |
1243 |
*/ |
1244 |
+ |
1245 |
+ static int grab_old_color_vertex(); |
1246 |
+ |
1247 |
static int drop_color_vertex ( col, x, y ) |
1248 |
struct colgRec *col; |
1249 |
int x, y; |
1250 |
{ |
1251 |
- static int grab_old_color_vertex(); |
1252 |
|
1253 |
/* hash mark positions are upper left corner of hash box */ |
1254 |
x -= HASH_RAY; |
1255 |
--- grphinit.c.orig 1990-04-20 14:40:44 UTC |
1256 |
+++ grphinit.c |
1257 |
@@ -46,9 +46,11 @@ extern int XZ_efn; |
1258 |
* Subroutine: init_colorbox |
1259 |
* Purpose: Handle program init-time color bar and graph initialization |
1260 |
*/ |
1261 |
+ |
1262 |
+static void init_main_colorbar(); |
1263 |
+ |
1264 |
void init_colorbox ( ) |
1265 |
{ |
1266 |
- static void init_main_colorbar(); |
1267 |
|
1268 |
cgraph.ncolors = color.ncolors; |
1269 |
cgraph.red.table = &color.ctable.red; |
1270 |
@@ -68,10 +70,12 @@ void init_colorbox ( ) |
1271 |
* Purpose: Initialize color bar and related params |
1272 |
* Xlib calls: XCreateSimpleWindow(), XMapSubwindows() |
1273 |
*/ |
1274 |
+ |
1275 |
+static void set_colorbar_image(), set_colorbar_params(); |
1276 |
+ |
1277 |
static void init_main_colorbar ( ) |
1278 |
{ |
1279 |
char *calloc_errchk(); |
1280 |
- static void set_colorbar_image(), set_colorbar_params(); |
1281 |
|
1282 |
colorbar.display = colorbox.display; |
1283 |
colorbar.ref_width = colorbox.width; |
1284 |
@@ -92,10 +96,12 @@ static void init_main_colorbar ( ) |
1285 |
* Subroutine: adjust_main_colorbar |
1286 |
* Purpose: Adjust color bar size params and/or color data if needed |
1287 |
*/ |
1288 |
+ |
1289 |
+static void set_colorbar_image(), set_colorbar_params(); |
1290 |
+ |
1291 |
void adjust_main_colorbar ( ) |
1292 |
{ |
1293 |
char *calloc_errchk(); |
1294 |
- static void set_colorbar_image(), set_colorbar_params(); |
1295 |
|
1296 |
if( (colorbox.width != colorbar.ref_width) || |
1297 |
(colorbox.height != colorbar.ref_height) ) { |
1298 |
@@ -113,11 +119,13 @@ void adjust_main_colorbar ( ) |
1299 |
* Purpose: Initialize color bar and related params |
1300 |
* Xlib calls: XMapSubwindows() |
1301 |
*/ |
1302 |
+ |
1303 |
+static void set_colorbar_image(), set_colorbar_params(); |
1304 |
+ |
1305 |
void init_graph_colorbar ( ) |
1306 |
{ |
1307 |
Window create_cgraph_box(); |
1308 |
char *calloc_errchk(); |
1309 |
- static void set_colorbar_image(), set_colorbar_params(); |
1310 |
|
1311 |
cgraph.bar.display = graphbox.display; |
1312 |
cgraph.bar.ref_width = graphbox.width; |
1313 |
@@ -149,11 +157,13 @@ void init_graph_colorbar ( ) |
1314 |
* Subroutine: adjust_graph_colorbar |
1315 |
* Purpose: Adjust color bar size params and/or color data if needed |
1316 |
*/ |
1317 |
+ |
1318 |
+static void set_colorbar_image(), set_colorbar_params(); |
1319 |
+ |
1320 |
void adjust_graph_colorbar ( ) |
1321 |
{ |
1322 |
int resize = 0; |
1323 |
char *calloc_errchk(); |
1324 |
- static void set_colorbar_image(), set_colorbar_params(); |
1325 |
|
1326 |
if( cgraph.vertical ) { |
1327 |
if( graphbox.height != cgraph.bar.ref_height ) { |
1328 |
--- grphmove.c.orig 1990-04-20 14:37:26 UTC |
1329 |
+++ grphmove.c |
1330 |
@@ -26,12 +26,14 @@ extern struct cgraphRec cgraph; |
1331 |
* Purpose: Change values (and position) of designated vertices in |
1332 |
* response to mouse movement |
1333 |
*/ |
1334 |
+ |
1335 |
+static void move_color_vertex(); |
1336 |
+ |
1337 |
void move_cgraph_vertices ( x, y ) |
1338 |
int x, y; |
1339 |
{ |
1340 |
double cell_level, intensity; |
1341 |
int hash_x, hash_y; |
1342 |
- static void move_color_vertex(); |
1343 |
|
1344 |
/* clip against limits */ |
1345 |
if( x < cgraph.graph.xzero ) |
1346 |
--- grpholap.c.orig 1990-04-20 14:36:00 UTC |
1347 |
+++ grpholap.c |
1348 |
@@ -28,13 +28,15 @@ extern struct cgraphRec cgraph; |
1349 |
* Subroutine: mark_colorline_overlap |
1350 |
* Purpose: Make line representing more than one color black (or white) |
1351 |
*/ |
1352 |
+ |
1353 |
+static void mark_hashmark_overlap(); |
1354 |
+ |
1355 |
void mark_colorline_overlap ( ) |
1356 |
{ |
1357 |
int i, j; |
1358 |
int x, y; |
1359 |
int x1, y1; |
1360 |
XSegment line[256]; |
1361 |
- static void mark_hashmark_overlap(); |
1362 |
|
1363 |
j = 0; |
1364 |
if( cgraph.vertical ) { |
1365 |
--- grphtext.c.orig 1990-04-20 14:39:37 UTC |
1366 |
+++ grphtext.c |
1367 |
@@ -33,6 +33,9 @@ extern struct cgraphRec cgraph; |
1368 |
* Purpose: Set labeling pieces according to the graph window size |
1369 |
* Xlib calls: XMoveWindow(), XResizeWindow(), XMapWindow() |
1370 |
*/ |
1371 |
+ |
1372 |
+static void init_colorbar_label(); |
1373 |
+ |
1374 |
void init_color_graph_label ( ) |
1375 |
{ |
1376 |
int new = 0; |
1377 |
@@ -40,7 +43,6 @@ void init_color_graph_label ( ) |
1378 |
int resize = 0; |
1379 |
Window create_cgraph_box(); |
1380 |
void init_color_graph_label(); |
1381 |
- static void init_colorbar_label(); |
1382 |
|
1383 |
if( cgraph.graphlabel.active == 0 ) |
1384 |
return; |
1385 |
--- histdist.c.orig 1998-07-28 18:56:45 UTC |
1386 |
+++ histdist.c |
1387 |
@@ -24,6 +24,9 @@ static char SccsId[] = "%W% %G%"; |
1388 |
* Purpose: Distribute the levels among histogram sub-groups |
1389 |
* Returns: number of groups with no assigned color levels |
1390 |
*/ |
1391 |
+ |
1392 |
+static int excess_zgroup(), excess_nzgroup(), range_zgroup(); |
1393 |
+ |
1394 |
int distribute_levels ( linklist, pixel_area, color_levels, |
1395 |
pmin, pmax, ncolor ) |
1396 |
SubrangeLink *linklist; |
1397 |
@@ -39,7 +42,6 @@ int distribute_levels ( linklist, pixel_ |
1398 |
#ifdef DEBUG |
1399 |
int census = 0; |
1400 |
#endif |
1401 |
- static int excess_zgroup(), excess_nzgroup(), range_zgroup(); |
1402 |
|
1403 |
/* if all one group (no strong peaks), allocation is simple */ |
1404 |
if( linklist->next == 0 ) { |
1405 |
--- histeql.c.orig 1990-04-20 14:59:27 UTC |
1406 |
+++ histeql.c |
1407 |
@@ -24,6 +24,10 @@ static char SccsId[] = "%W% %G%"; |
1408 |
* output level optimization accounts for large cell counts |
1409 |
* for single levels (e.g. half of all pixels with value 0) |
1410 |
*/ |
1411 |
+ |
1412 |
+static int count_nonzero_histogram_entries(), rescan_histogram(); |
1413 |
+static void unmark_peak_links(); |
1414 |
+ |
1415 |
void histogram_equalize ( scalemap, histogram, area, pmin, pmax, |
1416 |
color_levels, pixels ) |
1417 |
unsigned char *scalemap; /* i/o: scalemap (for signed indexing) */ |
1418 |
@@ -42,8 +46,6 @@ void histogram_equalize ( scalemap, hist |
1419 |
char *calloc_errchk(); |
1420 |
int distribute_levels(); |
1421 |
void generate_scalemap(), scan_histogram_for_peaks(), resolve_zeroes(); |
1422 |
- static int count_nonzero_histogram_entries(), rescan_histogram(); |
1423 |
- static void unmark_peak_links(); |
1424 |
|
1425 |
/* initialize link list */ |
1426 |
linklist = (SubrangeLink *)calloc_errchk(10, sizeof(int), "HElink"); |
1427 |
--- histlist.c.orig 1991-06-21 22:58:44 UTC |
1428 |
+++ histlist.c |
1429 |
@@ -29,6 +29,12 @@ static char SccsId[] = "%W% %G%"; |
1430 |
* Subroutine: make_equalized_list |
1431 |
* Purpose: Distributing levels for a subrange section of the histogram |
1432 |
*/ |
1433 |
+ |
1434 |
+static int equalize_simply(); |
1435 |
+#ifdef JIGGLE |
1436 |
+static void adjust_list(); |
1437 |
+#endif |
1438 |
+ |
1439 |
void make_equalized_list ( histogram, list, low_entry, high_entry, |
1440 |
pixel_area, color_levels ) |
1441 |
int *histogram; |
1442 |
@@ -47,10 +53,6 @@ void make_equalized_list ( histogram, li |
1443 |
int best_levels_under; |
1444 |
int best_average_over = 0; /* average_area used to get best_levels */ |
1445 |
int best_average_under = 0; |
1446 |
- static int equalize_simply(); |
1447 |
-#ifdef JIGGLE |
1448 |
- static void adjust_list(); |
1449 |
-#endif |
1450 |
|
1451 |
/* else allocation distribution must first be determined */ |
1452 |
/* run through histgram section making basic allocation and taking notes */ |
1453 |
--- histmap.c.orig 1990-04-20 15:00:13 UTC |
1454 |
+++ histmap.c |
1455 |
@@ -28,6 +28,9 @@ static char SccsId[] = "%W% %G%"; |
1456 |
* safely be applied. |
1457 |
* Note: The original link-list of groups is freed. |
1458 |
*/ |
1459 |
+ |
1460 |
+static void make_subrange_scalemap(); |
1461 |
+ |
1462 |
void generate_scalemap ( hist, subrange, scalemap, pixels ) |
1463 |
int *hist; /* i: histogram (for signed offsets) */ |
1464 |
SubrangeLink *subrange; /* i: linklist of subranges */ |
1465 |
@@ -36,7 +39,6 @@ void generate_scalemap ( hist, subrange, |
1466 |
{ |
1467 |
int baselevel; |
1468 |
SubrangeLink *trash; |
1469 |
- static void make_subrange_scalemap(); |
1470 |
|
1471 |
baselevel = 0; |
1472 |
while( subrange != 0 ) { |
1473 |
@@ -54,6 +56,9 @@ void generate_scalemap ( hist, subrange, |
1474 |
* Purpose: Make a section of scale map using histgroup link as guide |
1475 |
* Called by: make_HE_scalemap() in HistEqual.c |
1476 |
*/ |
1477 |
+ |
1478 |
+static void make_gapped_list(), list_to_map(); |
1479 |
+ |
1480 |
static void |
1481 |
make_subrange_scalemap ( histogram, subrange, scalemap, baselevel, pixels ) |
1482 |
int *histogram; |
1483 |
@@ -67,7 +72,6 @@ static void |
1484 |
unsigned char dispval; |
1485 |
char *calloc_errchk(); |
1486 |
void make_equalized_list(); |
1487 |
- static void make_gapped_list(), list_to_map(); |
1488 |
|
1489 |
/* if only one level, make map section */ |
1490 |
if( subrange->color_levels <= 1 ) { |
1491 |
@@ -135,6 +139,10 @@ static void list_to_map ( scalemap, hist |
1492 |
* Purpose: Allocate levels for a histogram subrange. Special process |
1493 |
* for situation when more levels than actually used values. |
1494 |
*/ |
1495 |
+ |
1496 |
+static int first_shortlist_pass(); |
1497 |
+static void add_level_to_short_list(); |
1498 |
+ |
1499 |
static void make_gapped_list ( histogram, list, low, high, levels ) |
1500 |
int *histogram; |
1501 |
SubrangeList *list; |
1502 |
@@ -142,8 +150,6 @@ static void make_gapped_list ( histogram |
1503 |
{ |
1504 |
int range_j, max_range; |
1505 |
int levels_used; |
1506 |
- static int first_shortlist_pass(); |
1507 |
- static void add_level_to_short_list(); |
1508 |
|
1509 |
levels_used = |
1510 |
first_shortlist_pass(histogram, list, low, high, levels, |
1511 |
--- histscan.c.orig 1990-04-20 15:00:36 UTC |
1512 |
+++ histscan.c |
1513 |
@@ -21,6 +21,10 @@ static char SccsId[] = "%W% %G%"; |
1514 |
* Purpose: Scan the image histogram picking out large cell count values |
1515 |
* make sub-groups of the histogram between the large count levels |
1516 |
*/ |
1517 |
+ |
1518 |
+static SubrangeLink *get_new_subrange_record(); |
1519 |
+static void fill_subrange_record(); |
1520 |
+ |
1521 |
void scan_histogram_for_peaks ( subrange, histogram, |
1522 |
pixel_area, map_levels, average ) |
1523 |
SubrangeLink *subrange; /* i/o: link (initially covers range) */ |
1524 |
@@ -36,8 +40,6 @@ void scan_histogram_for_peaks ( subrange |
1525 |
int sr_nzentries; /* l: number of non-zero entries in subrange */ |
1526 |
int sr_pixel_area; /* l: number of pixels in current subrange */ |
1527 |
int sr_max_peak; /* l: highest peak within current subrange */ |
1528 |
- static SubrangeLink *get_new_subrange_record(); |
1529 |
- static void fill_subrange_record(); |
1530 |
|
1531 |
/* set initial pixel_count values */ |
1532 |
sr_pixel_area = 0; |
1533 |
--- histzero.c.orig 1990-04-20 15:01:03 UTC |
1534 |
+++ histzero.c |
1535 |
@@ -23,13 +23,15 @@ static char SccsId[] = "%W% %G%"; |
1536 |
* Note: Adjoining groups are large count single level groups |
1537 |
* Called by: histrogram_equalize() above |
1538 |
*/ |
1539 |
+ |
1540 |
+static void merge_links(); |
1541 |
+ |
1542 |
void resolve_zeroes ( PriorLink, zeroes ) |
1543 |
SubrangeLink *PriorLink; |
1544 |
int zeroes; |
1545 |
{ |
1546 |
SubrangeLink *ThisLink, *NextLink; |
1547 |
int a_count, b_count, z1count, z2count; |
1548 |
- static void merge_links(); |
1549 |
|
1550 |
/* if very first entry is a zero allocated link */ |
1551 |
if( PriorLink->color_levels == 0 ) { |
1552 |
--- imgcheck.c.orig 2001-03-12 21:31:30 UTC |
1553 |
+++ imgcheck.c |
1554 |
@@ -46,13 +46,15 @@ static char SccsId[] = "%W% %G%"; |
1555 |
* Purpose: Do some consistency checks on image type and size |
1556 |
* Returns: 0 if no errors found, else -1 |
1557 |
*/ |
1558 |
+ |
1559 |
+static int check_array(); |
1560 |
+ |
1561 |
int check_image ( img, got_status ) |
1562 |
struct imageRec *img; |
1563 |
int got_status; |
1564 |
{ |
1565 |
int len; |
1566 |
char *ext, *mwcs, cext; |
1567 |
- static int check_array(); |
1568 |
extern int isfits(); |
1569 |
|
1570 |
ext = NULL; |
1571 |
@@ -148,6 +150,9 @@ int check_image ( img, got_status ) |
1572 |
* Purpose: Check array size vs file size etc |
1573 |
* Returns: 0 if size determined and/or OK, else -1 |
1574 |
*/ |
1575 |
+ |
1576 |
+static long size_imagefile(); |
1577 |
+ |
1578 |
static int check_array ( img ) |
1579 |
struct imageRec *img; |
1580 |
{ |
1581 |
@@ -156,7 +161,6 @@ static int check_array ( img ) |
1582 |
float posdim; /* possible dimension */ |
1583 |
int headersize; /* size in bytes of header */ |
1584 |
int rawsize; |
1585 |
- static long size_imagefile(); |
1586 |
|
1587 |
/* get header size */ |
1588 |
headersize = img->headersize; |
1589 |
--- imglogo.c.orig 1990-04-26 16:31:48 UTC |
1590 |
+++ imglogo.c |
1591 |
@@ -372,13 +372,15 @@ static unsigned char logo[LOGO_SZ] = { |
1592 |
* Subroutine: load_logo |
1593 |
* Purpose: place logo image in image buffer |
1594 |
*/ |
1595 |
+ |
1596 |
+static void make_logo(); |
1597 |
+ |
1598 |
void load_logo ( shortbuf, bufwd, bufht ) |
1599 |
short *shortbuf; |
1600 |
int bufwd, bufht; |
1601 |
{ |
1602 |
register short *bufpt, *bufend; |
1603 |
register short bkgd; |
1604 |
- static void make_logo(); |
1605 |
|
1606 |
/* fill buffer with background color */ |
1607 |
bufpt = shortbuf; |
1608 |
--- imgnew.c.orig 1998-10-14 23:01:58 UTC |
1609 |
+++ imgnew.c |
1610 |
@@ -52,6 +52,9 @@ extern struct windowRec desktop; |
1611 |
* Purpose: Create all image coordinate parameters from the beginning |
1612 |
* and take care of all that might be affected |
1613 |
*/ |
1614 |
+ |
1615 |
+static void load_mainbuf(); |
1616 |
+ |
1617 |
void new_display ( dispnow, clear, load, scale ) |
1618 |
int dispnow; /* i: put-display-in-window-now flag */ |
1619 |
int clear; /* i: clear img buf before reading flag */ |
1620 |
@@ -61,7 +64,6 @@ void new_display ( dispnow, clear, load, |
1621 |
void set_disptran(), new_pancursor(), new_scalemap(); |
1622 |
void combine_transform(), set_edges(), set_dispoff(), set_magnifier(); |
1623 |
void adjust_cursor_coords(), map_dispbox(), disp_dispbox(); |
1624 |
- static void load_mainbuf(); |
1625 |
|
1626 |
/* Set disp to img and disp to file transforms */ |
1627 |
set_disptran(&coord); |
1628 |
--- imgtrans.c.orig 1990-04-20 15:13:46 UTC |
1629 |
+++ imgtrans.c |
1630 |
@@ -26,6 +26,9 @@ static char SccsId[] = "%W% %G%"; |
1631 |
* 4-7 = flip y axis then rotate clockwise by (code - 4) * 90 degrees |
1632 |
* Called by: load_image() in ImageRead.c |
1633 |
*/ |
1634 |
+ |
1635 |
+static void square_buf(), unsquare_buf(); |
1636 |
+ |
1637 |
void rotate_buf ( buf, flip, rotcode, width, height, buf_squared, buf_doubled ) |
1638 |
short *buf; |
1639 |
int flip; |
1640 |
@@ -36,7 +39,6 @@ void rotate_buf ( buf, flip, rotcode, wi |
1641 |
int maxdim; |
1642 |
void xflip_buf(), yflip_buf(), zflip_buf(), cwturn_buf(), ccwturn_buf(); |
1643 |
void transfer_buf(); |
1644 |
- static void square_buf(), unsquare_buf(); |
1645 |
|
1646 |
if( flip ) |
1647 |
rotcode += 4; |
1648 |
--- irafcrd.c.orig 1990-04-20 15:16:02 UTC |
1649 |
+++ irafcrd.c |
1650 |
@@ -45,13 +45,15 @@ static char SccsId[] = "%W% %G%"; |
1651 |
* If found and parsed, compute new transform for file coord. |
1652 |
* Returns: 1 if subsection found and parsed successfully, else 0 |
1653 |
*/ |
1654 |
+ |
1655 |
+static int parse_iraf_subsection(); |
1656 |
+ |
1657 |
int guess_true_file_coords ( title ) |
1658 |
char *title; |
1659 |
{ |
1660 |
int xoff, yoff, block; |
1661 |
float fblock; |
1662 |
Transform imgtoaux; |
1663 |
- static int parse_iraf_subsection(); |
1664 |
void set_trans_speed(), combine_transform(), clear_coord_area(); |
1665 |
|
1666 |
if( parse_iraf_subsection(title, &xoff, &yoff, &block) == 0 ) { |
1667 |
@@ -92,6 +94,10 @@ int guess_true_file_coords ( title ) |
1668 |
* Purpose: Parse for subsection and blocking from the image name |
1669 |
* Returns: 1 if subsection or blocking was used, else 0 |
1670 |
*/ |
1671 |
+ |
1672 |
+static char *fn_substr(); /* look for a substr */ |
1673 |
+static void get_subsection_offsets(); |
1674 |
+ |
1675 |
static int parse_iraf_subsection ( s, xoff, yoff, block ) |
1676 |
char *s; /* i: file name */ |
1677 |
int *xoff; /* o: x offset */ |
1678 |
@@ -99,8 +105,6 @@ static int parse_iraf_subsection ( s, xo |
1679 |
int *block; /* o: block */ |
1680 |
{ |
1681 |
char *t, *u; /* temp char pointers */ |
1682 |
- static char *fn_substr(); /* look for a substr */ |
1683 |
- static void get_subsection_offsets(); |
1684 |
|
1685 |
/* seed the default values */ |
1686 |
*xoff = 1; |
1687 |
@@ -139,6 +143,9 @@ static int parse_iraf_subsection ( s, xo |
1688 |
* Subroutine: get_subsection_offsets |
1689 |
* Purpose: parse subsection syntax for x and y offsets of subsection |
1690 |
*/ |
1691 |
+ |
1692 |
+static char *fn_substr(); |
1693 |
+ |
1694 |
static void get_subsection_offsets ( s, xoff, yoff, is_qp ) |
1695 |
char *s; |
1696 |
int *xoff, *yoff; |
1697 |
@@ -147,7 +154,6 @@ static void get_subsection_offsets ( s, |
1698 |
int x1, x2; |
1699 |
int y1, y2; |
1700 |
char *sy, *s2, *st; |
1701 |
- static char *fn_substr(); |
1702 |
|
1703 |
/* if not qp, grab the initial x offset right after the '[' */ |
1704 |
sy = fn_substr(s, ","); |
1705 |
--- irafimtl.c.orig 1998-02-25 19:52:37 UTC |
1706 |
+++ irafimtl.c |
1707 |
@@ -46,6 +46,9 @@ static char wcsbuf[SZ_WCSBUF]; |
1708 |
* Subroutine: imtool_response |
1709 |
* Purpose: Read imtool messages from iraf (return 1 if pipe trouble) |
1710 |
*/ |
1711 |
+ |
1712 |
+static int get_frame_no(); |
1713 |
+ |
1714 |
void imtool_response ( port, imhead, ndatabytes ) |
1715 |
struct connectRec *port; /* i: struct of port for IRAF input */ |
1716 |
struct imtoolRec *imhead; /* i: packet header, already read in */ |
1717 |
@@ -60,7 +63,6 @@ void imtool_response ( port, imhead, nda |
1718 |
void set_curpos_to_iraf_trigger(), set_cursor_from_iraf(), imtool_output(); |
1719 |
void set_imtool_scale(), set_cursor_to_iraf(), disp_subpiece(); |
1720 |
void map_panbox(), disp_panbox(), send_curpos_to_iraf(), flush_connection(); |
1721 |
- static int get_frame_no(); |
1722 |
|
1723 |
switch( imhead->subunit & 077 ) { |
1724 |
case FEEDBACK: |
1725 |
@@ -189,6 +191,9 @@ void imtool_response ( port, imhead, nda |
1726 |
* Purpose: Reset buffer sizes, coordinate systems and parameters as |
1727 |
* needed. |
1728 |
*/ |
1729 |
+ |
1730 |
+static int get_frame_no(); |
1731 |
+ |
1732 |
void imtool_newimage ( is_wcs, imhead ) |
1733 |
int is_wcs; |
1734 |
struct imtoolRec *imhead; |
1735 |
@@ -199,7 +204,6 @@ void imtool_newimage ( is_wcs, imhead ) |
1736 |
void set_disptran(), combine_transform(), set_edges(), set_dispoff(); |
1737 |
void adjust_cursor_coords(), set_magnifier(), disp_subpiece(), set_tdisp(); |
1738 |
void set_imtool_scale(), imtool_reinit(), new_pancursor(); |
1739 |
- static int get_frame_no(); |
1740 |
|
1741 |
/* set size and frame */ |
1742 |
if( is_wcs ) |
1743 |
--- irafio.c.orig 1992-10-12 17:17:50 UTC |
1744 |
+++ irafio.c |
1745 |
@@ -102,6 +102,9 @@ void rename_imtool_connection ( name, in |
1746 |
* Subroutine: imtool_output |
1747 |
* Purpose: Write image data back to iraf device channel |
1748 |
*/ |
1749 |
+ |
1750 |
+static int compact_short_to_byte(); |
1751 |
+ |
1752 |
void imtool_output ( imhead, odev, imagebuf, width, height ) |
1753 |
struct imtoolRec *imhead; |
1754 |
struct connectRec *odev; |
1755 |
@@ -116,7 +119,6 @@ void imtool_output ( imhead, odev, image |
1756 |
int buferr = 0; |
1757 |
char fifobuf[SZ_FIFOBUF + 4]; |
1758 |
int write_connection(); |
1759 |
- static int compact_short_to_byte(); |
1760 |
|
1761 |
ndatabytes = -(int)imhead->thingct; |
1762 |
x = imhead->x & 077777; |
1763 |
@@ -153,6 +155,9 @@ void imtool_output ( imhead, odev, image |
1764 |
* Called by: imtool_response() in RemoteImtool.c |
1765 |
* Returns: -1 if read no bytes, 1 if trouble, else 0 |
1766 |
*/ |
1767 |
+ |
1768 |
+static void expand_byte_to_short(); |
1769 |
+ |
1770 |
int imtool_input ( imhead, idev, readbuf, iwdth, owdth, y1, y2, |
1771 |
imagebuf, imbufsz ) |
1772 |
struct imtoolRec *imhead; |
1773 |
@@ -171,7 +176,6 @@ int imtool_input ( imhead, idev, readbuf |
1774 |
int got, try, gotten; |
1775 |
short *obuf; |
1776 |
int read_connection(); |
1777 |
- static void expand_byte_to_short(); |
1778 |
|
1779 |
/* get data count and packing type */ |
1780 |
ndatavals = -(int)imhead->thingct; |
1781 |
--- irafpipe.c.orig 1998-02-25 19:52:26 UTC |
1782 |
+++ irafpipe.c |
1783 |
@@ -33,6 +33,9 @@ static char SccsId[] = "%W% %G%"; |
1784 |
* Subroutine: read_imtool_packet() |
1785 |
* Purpose: event handler for packet input from iraf |
1786 |
*/ |
1787 |
+ |
1788 |
+static int check_packet_sum(); |
1789 |
+ |
1790 |
void read_imtool_packet( port ) |
1791 |
struct connectRec *port; |
1792 |
{ |
1793 |
@@ -48,7 +51,6 @@ void read_imtool_packet( port ) |
1794 |
#endif |
1795 |
int read_connection(); |
1796 |
void imtool_response(), swap_bytes(); |
1797 |
- static int check_packet_sum(); |
1798 |
|
1799 |
/* read the header */ |
1800 |
bytes = read_connection(port, (char *)&imhead, sizeof(struct imtoolRec)); |
1801 |
--- maininit.c.orig 2003-12-01 23:21:35 UTC |
1802 |
+++ maininit.c |
1803 |
@@ -76,11 +76,13 @@ Display *display; /* display connection |
1804 |
* Xlib calls: XSetErrorHandler() |
1805 |
* UNIX calls: setrlimit() |
1806 |
*/ |
1807 |
+ |
1808 |
+static void init_params(), init_packages(); |
1809 |
+ |
1810 |
main(argc, argv) |
1811 |
int argc; |
1812 |
char **argv; |
1813 |
{ |
1814 |
- static void init_params(), init_packages(); |
1815 |
void crash_on_error(), control_event_loop(); |
1816 |
void say_goodbye(); |
1817 |
|
1818 |
@@ -141,13 +143,15 @@ void say_goodbye ( code ) |
1819 |
* Purpose: Initialize parameters in the records |
1820 |
* Note: Resource or default file not yet used |
1821 |
*/ |
1822 |
+ |
1823 |
+static void init_server(); |
1824 |
+ |
1825 |
static void init_params ( argc, argv ) |
1826 |
int argc; |
1827 |
char **argv; |
1828 |
{ |
1829 |
char *name; /* l: both flag for init and return display name */ |
1830 |
int parse_stat; |
1831 |
- static void init_server(); |
1832 |
int parse_cmdline(), check_image(); |
1833 |
void say_goodbye(), init_connections(); |
1834 |
|
1835 |
--- mainkey.c.orig 2003-09-24 22:38:25 UTC |
1836 |
+++ mainkey.c |
1837 |
@@ -87,6 +87,9 @@ static double oldypix = 0.0; |
1838 |
|
1839 |
static double oldxpos, oldypos; |
1840 |
|
1841 |
+static void PrintFITSHead(); |
1842 |
+static int new_image(); |
1843 |
+ |
1844 |
void |
1845 |
key_response() |
1846 |
{ |
1847 |
@@ -110,7 +113,6 @@ key_response() |
1848 |
void print_center(), print_cursor(); |
1849 |
void move_pointer(); |
1850 |
void get_cursor_pos(); |
1851 |
- static void PrintFITSHead(); |
1852 |
void toggle_region_visibility(), toggle_region_labeling(); |
1853 |
double xbuf, ybuf, xfile, yfile; |
1854 |
double newxpos, newypos, distance; |
1855 |
--- mgfyctrl.c.orig 1999-05-06 19:47:12 UTC |
1856 |
+++ mgfyctrl.c |
1857 |
@@ -45,12 +45,14 @@ extern struct magRec magset; |
1858 |
* Purpose: Magnify location of a dispbox event |
1859 |
* Xlib calls: XCheckWindowEvent(), XSync() |
1860 |
*/ |
1861 |
+ |
1862 |
+static void label_file_coords(), label_file_coords_proportional(); |
1863 |
+ |
1864 |
void magnify_disp ( event, view, text ) |
1865 |
XEvent *event; /* i: XEvent for location of mouse */ |
1866 |
int view, text; |
1867 |
{ |
1868 |
void draw_magnifier(); |
1869 |
- static void label_file_coords(), label_file_coords_proportional(); |
1870 |
|
1871 |
/* get only the most recent mouse moved event */ |
1872 |
XSync(dispbox.display, 0); |
1873 |
@@ -132,6 +134,9 @@ void redraw_magnifier ( ) |
1874 |
* Purpose: Show pointer coordinates and image value in display window |
1875 |
* Xlib calls: XDrawImageString() |
1876 |
*/ |
1877 |
+ |
1878 |
+static void draw_proportional_coord(); |
1879 |
+ |
1880 |
static void label_file_coords ( bufX, bufY ) |
1881 |
double bufX, bufY; |
1882 |
{ |
1883 |
@@ -142,7 +147,6 @@ static void label_file_coords ( bufX, bu |
1884 |
float fileX, fileY; |
1885 |
GC gc, set_edit_gc(); |
1886 |
void d_transform(); |
1887 |
- static void draw_proportional_coord(); |
1888 |
static int lwcs0 = 0; |
1889 |
static int lpix0 = 0; |
1890 |
int i; |
1891 |
@@ -289,6 +293,9 @@ void clear_coord_area () |
1892 |
* but has not been refined for the val section. |
1893 |
* Xlib call: XDrawImageString() |
1894 |
*/ |
1895 |
+ |
1896 |
+static void draw_proportional_number(); |
1897 |
+ |
1898 |
static void label_file_coords_proportional ( bufX, bufY ) |
1899 |
double bufX, bufY; |
1900 |
{ |
1901 |
@@ -297,7 +304,6 @@ static void label_file_coords_proportion |
1902 |
float fileX, fileY; |
1903 |
GC gc, set_edit_gc(); |
1904 |
void d_transform(); |
1905 |
- static void draw_proportional_number(); |
1906 |
|
1907 |
gc = set_edit_gc(magset.text.font, |
1908 |
magset.text.foreground, magset.text.background); |
1909 |
--- mgfytabl.c.orig 1998-07-09 16:28:28 UTC |
1910 |
+++ mgfytabl.c |
1911 |
@@ -30,6 +30,10 @@ static char SccsId[] = "%W% %G%"; |
1912 |
* coordinates |
1913 |
* Note: Uses event coords in control struct (control.event.xkey) |
1914 |
*/ |
1915 |
+ |
1916 |
+static int get_key_buf_coords(), set_table_params(); |
1917 |
+static void output_column_labels(), output_pixval_table(); |
1918 |
+ |
1919 |
void print_table () |
1920 |
{ |
1921 |
int bufx, bufy; |
1922 |
@@ -39,8 +43,6 @@ void print_table () |
1923 |
int table_size; |
1924 |
int col_width; |
1925 |
int rot; |
1926 |
- static int get_key_buf_coords(), set_table_params(); |
1927 |
- static void output_column_labels(), output_pixval_table(); |
1928 |
|
1929 |
/* determine the buffer coordinates of the event */ |
1930 |
if( get_key_buf_coords(&control.event.xkey, &bufx, &bufy) == 0 ) { |
1931 |
--- pancrsr.c.orig 1990-05-02 06:49:17 UTC |
1932 |
+++ pancrsr.c |
1933 |
@@ -45,13 +45,15 @@ void draw_pancursor ( ) |
1934 |
* Subroutine: new_pancursor |
1935 |
* Purpose: Create and draw panbox cursor given image coordinates |
1936 |
*/ |
1937 |
+ |
1938 |
+static void set_pancursor(); |
1939 |
+ |
1940 |
void new_pancursor ( track ) |
1941 |
int track; |
1942 |
{ |
1943 |
float panX1, panX2, panY1, panY2; |
1944 |
GC gc, set_gc(); |
1945 |
void disp_window(), i_transform(); |
1946 |
- static void set_pancursor(); |
1947 |
|
1948 |
if( pancur_present ) { |
1949 |
/* erase the old box if it was visible */ |
1950 |
--- panimage.c.orig 1990-04-20 16:17:38 UTC |
1951 |
+++ panimage.c |
1952 |
@@ -45,12 +45,14 @@ void disp_panbox ( ) |
1953 |
* Subroutine: map_panbox |
1954 |
* Purpose: Fill the panbox display buffer, mapping from its short buffer |
1955 |
*/ |
1956 |
-void map_panbox ( ) |
1957 |
-{ |
1958 |
- static void map_panbuf(); |
1959 |
+ |
1960 |
+static void map_panbuf(); |
1961 |
#ifdef SUMBLOCK |
1962 |
- static void map_adj_panbuf(); |
1963 |
+static void map_adj_panbuf(); |
1964 |
#endif |
1965 |
+ |
1966 |
+void map_panbox ( ) |
1967 |
+{ |
1968 |
void panimage_halftone(); |
1969 |
|
1970 |
if( color.ncolors <= 1 ) { |
1971 |
--- prntcent.c.orig 1999-08-20 22:18:40 UTC |
1972 |
+++ prntcent.c |
1973 |
@@ -36,6 +36,11 @@ static char SccsId[] = "%W% %G%"; |
1974 |
* Returns 1 if successful, else 0 |
1975 |
* Note: Uses event coords in control struct (control.event.xkey) |
1976 |
*/ |
1977 |
+ |
1978 |
+static int set_center_param(); |
1979 |
+static int get_key_buf_coord(); |
1980 |
+static void comp_center (); |
1981 |
+ |
1982 |
void |
1983 |
print_center ( xc, yc ) |
1984 |
|
1985 |
@@ -59,9 +64,6 @@ double *xc, *yc; /* Returned centroided |
1986 |
int xfile, yfile; |
1987 |
char string[64]; |
1988 |
int lstr = 48; |
1989 |
- static int set_center_param(); |
1990 |
- static int get_key_buf_coord(); |
1991 |
- static void comp_center (); |
1992 |
void d_trans(); |
1993 |
int iswcs(); |
1994 |
|
1995 |
--- prntcurs.c.orig 2002-01-16 22:54:18 UTC |
1996 |
+++ prntcurs.c |
1997 |
@@ -31,12 +31,14 @@ static char SccsId[] = "%W% %G%"; |
1998 |
* Subroutine: print_cursor |
1999 |
* Purpose: print location of a dispbox event |
2000 |
*/ |
2001 |
+ |
2002 |
+static void print_file_value(); |
2003 |
+ |
2004 |
void print_cursor ( event ) |
2005 |
XEvent *event; /* XEvent for location of mouse */ |
2006 |
{ |
2007 |
double bufx, bufy, filex, filey; |
2008 |
void get_cursor_pos(); |
2009 |
- static void print_file_value(); |
2010 |
|
2011 |
(void)get_cursor_pos (event, &bufx, &bufy, &filex, &filey ); |
2012 |
(void)print_file_value ( bufx, bufy, filex, filey ); |
2013 |
--- readarr.c.orig 1999-02-23 14:05:41 UTC |
2014 |
+++ readarr.c |
2015 |
@@ -28,6 +28,9 @@ static char SccsId[] = "%W% %G%"; |
2016 |
* Purpose: Read array data from a file |
2017 |
* Note: Assumes file was tested benignly, exits here if trouble |
2018 |
*/ |
2019 |
+ |
2020 |
+static int read_data(); |
2021 |
+ |
2022 |
void read_array ( fd, img, imgbuf, filebuf, width, height, X, Y, block, |
2023 |
verbose ) |
2024 |
int fd; /* if >=0 handle to open & ready image file */ |
2025 |
@@ -40,7 +43,6 @@ void read_array ( fd, img, imgbuf, fileb |
2026 |
int verbose; /* whether to print explanatory messages */ |
2027 |
{ |
2028 |
int vals; |
2029 |
- static int read_data(); |
2030 |
int image_start; |
2031 |
int open_disk(), lseek_disk(); |
2032 |
void close_disk(); |
2033 |
--- readfith.c.orig 1998-09-29 15:40:06 UTC |
2034 |
+++ readfith.c |
2035 |
@@ -46,6 +46,9 @@ static char SccsId[] = "%W% %G%"; |
2036 |
* Purpose: Find important FITS parameters in FITS header |
2037 |
* Returns: 1 if success, else 0 |
2038 |
*/ |
2039 |
+ |
2040 |
+static int get_keyint(), get_keyfloat(); |
2041 |
+ |
2042 |
int read_fitsheader ( header, length, bitpix, naxis, naxes, scale, bias ) |
2043 |
char *header; |
2044 |
int length; |
2045 |
@@ -55,7 +58,6 @@ int read_fitsheader ( header, length, bi |
2046 |
float *scale; |
2047 |
float *bias; |
2048 |
{ |
2049 |
- static int get_keyint(), get_keyfloat(); |
2050 |
struct WorldCoor *wcsinit(); |
2051 |
char *header0; |
2052 |
header0 = header; |
2053 |
@@ -144,6 +146,9 @@ static int get_keyint ( header, keyword, |
2054 |
* Purpose: Return the float value in the data field for a given FITS |
2055 |
* header keyword. If key not found, return 0. |
2056 |
*/ |
2057 |
+ |
2058 |
+static void fix_exponent(); |
2059 |
+ |
2060 |
static int get_keyfloat ( header, keyword, length, val, report_error) |
2061 |
char *header; /* buffer start */ |
2062 |
char *keyword; /* keyword to match */ |
2063 |
@@ -153,7 +158,6 @@ static int get_keyfloat ( header, keywor |
2064 |
{ |
2065 |
int key_not_end; |
2066 |
int i; |
2067 |
- static void fix_exponent(); |
2068 |
void no_fitscomment(); |
2069 |
|
2070 |
key_not_end = (strncmp(keyword, "END ", 8) != 0); |
2071 |
--- rgnanli.c.orig 1990-04-20 16:25:03 UTC |
2072 |
+++ rgnanli.c |
2073 |
@@ -89,14 +89,16 @@ void new_annulus_edge ( cursor ) |
2074 |
* Note: "vala valb valc ..." and "val1 val2 n=int" are both |
2075 |
* permitted syntax forms |
2076 |
*/ |
2077 |
+ |
2078 |
+static int expand_radii(); |
2079 |
+static char *got_nequal(); |
2080 |
+ |
2081 |
int parse_radii ( line, radius, maxcnt ) |
2082 |
char *line; /* i: string with first radius as next token */ |
2083 |
float *radius; /* o: buffer for float radius vals */ |
2084 |
int maxcnt; /* i: size of radius buffer */ |
2085 |
{ |
2086 |
int i, cnt; |
2087 |
- static int expand_radii(); |
2088 |
- static char *got_nequal(); |
2089 |
char *next_token(); |
2090 |
|
2091 |
i = 0; |
2092 |
--- rgndraw.c.orig 1998-11-30 21:46:40 UTC |
2093 |
+++ rgndraw.c |
2094 |
@@ -115,12 +115,14 @@ void disp_regions ( cursor ) |
2095 |
* Subroutine: disp_region |
2096 |
* Purpose: Draw one saved cursor region and its labels |
2097 |
*/ |
2098 |
+ |
2099 |
+static GC set_region_gc(); |
2100 |
+static void label_annuli(), label_region(), draw_region(); |
2101 |
+ |
2102 |
void disp_region ( region ) |
2103 |
struct cursorRec *region; |
2104 |
{ |
2105 |
GC gc; |
2106 |
- static GC set_region_gc(); |
2107 |
- static void label_annuli(), label_region(), draw_region(); |
2108 |
|
2109 |
if( rgdraw.visible && (region != NULL) ) { |
2110 |
gc = set_region_gc(region); |
2111 |
@@ -215,11 +217,13 @@ static void draw_region_label ( string, |
2112 |
* Purpose: Draw one saved cursor region outline or point index |
2113 |
* Note: gc is already set, hence NULL GCspec in draw calls |
2114 |
*/ |
2115 |
+ |
2116 |
+static void draw_region_label(); |
2117 |
+ |
2118 |
static void draw_region ( region, gc ) |
2119 |
struct cursorRec *region; |
2120 |
GC gc; |
2121 |
{ |
2122 |
- static void draw_region_label(); |
2123 |
void draw_annuli(), draw_cursor(); |
2124 |
|
2125 |
if( region->type != COP_Point ) { |
2126 |
@@ -246,12 +250,14 @@ static void draw_region ( region, gc ) |
2127 |
/* |
2128 |
* Subroutine: label_annuli |
2129 |
*/ |
2130 |
+ |
2131 |
+static void label_region(); |
2132 |
+ |
2133 |
static void label_annuli ( region, gc ) |
2134 |
struct cursorRec *region; |
2135 |
GC gc; |
2136 |
{ |
2137 |
struct cursorRec *annulus; |
2138 |
- static void label_region(); |
2139 |
|
2140 |
/* apply label to outer annulus */ |
2141 |
annulus = region; |
2142 |
@@ -268,6 +274,10 @@ static void label_annuli ( region, gc ) |
2143 |
* Purpose: Draw one region's label line and text for center and edge |
2144 |
* Xlib calls: XDrawLine() |
2145 |
*/ |
2146 |
+ |
2147 |
+static int mark_include(); |
2148 |
+static void draw_region_label(); |
2149 |
+ |
2150 |
static void label_region ( region, gc ) |
2151 |
struct cursorRec *region; |
2152 |
GC gc; |
2153 |
@@ -277,8 +287,6 @@ static void label_region ( region, gc ) |
2154 |
char edge_string[132]; |
2155 |
int len; |
2156 |
int exclude; |
2157 |
- static int mark_include(); |
2158 |
- static void draw_region_label(); |
2159 |
|
2160 |
/* if label not requested or don't know how to label or will another part */ |
2161 |
if( (!rgdraw.label) || (region->type == COP_Polygon) ) |
2162 |
--- rgndrop.c.orig 1990-04-20 16:31:38 UTC |
2163 |
+++ rgndrop.c |
2164 |
@@ -64,14 +64,16 @@ void unsave_region ( cursor, dead_meat ) |
2165 |
* cursors enclose one or two digit label but have 0 area). |
2166 |
* In case of equal areas (i.e. points), closer center is used. |
2167 |
*/ |
2168 |
+ |
2169 |
+static int pointer_is_inside_region(); |
2170 |
+static int closer_to_center(); |
2171 |
+ |
2172 |
struct cursorRec *region_indicated_by_pointer ( cursor, x, y, point_only ) |
2173 |
struct cursorRec *cursor; |
2174 |
int x, y; |
2175 |
int point_only; |
2176 |
{ |
2177 |
struct cursorRec *region, *chosen; |
2178 |
- static int pointer_is_inside_region(); |
2179 |
- static int closer_to_center(); |
2180 |
|
2181 |
chosen = NULL; |
2182 |
region = cursor->next_region; |
2183 |
@@ -115,13 +117,15 @@ static int closer_to_center ( challenger |
2184 |
* Subroutine: is_inside_region |
2185 |
* Purpose: Determine if mouse is within a region |
2186 |
*/ |
2187 |
+ |
2188 |
+static int pointer_is_inside_polygon(); |
2189 |
+ |
2190 |
static int pointer_is_inside_region ( x, y, region ) |
2191 |
int x, y; |
2192 |
struct cursorRec *region; |
2193 |
{ |
2194 |
double rayX, rayY, ray; |
2195 |
int inside; |
2196 |
- static int pointer_is_inside_polygon(); |
2197 |
|
2198 |
if( region->type == COP_Polygon ) |
2199 |
return( pointer_is_inside_polygon((double)x, (double)y, |
2200 |
--- rgnwpros.c.orig 1991-01-09 03:57:30 UTC |
2201 |
+++ rgnwpros.c |
2202 |
@@ -45,11 +45,13 @@ static char SccsId[] = "%W% %G%"; |
2203 |
* Purpose: Write ROSAT PROS style region description to file |
2204 |
* Method: Recurse first to start writing from end of link list |
2205 |
*/ |
2206 |
+ |
2207 |
+static void cat_annulus(), write_annuli(), cat_shape(); |
2208 |
+ |
2209 |
void write_region_pros ( fd, region ) |
2210 |
FILE *fd; |
2211 |
struct cursorRec *region; |
2212 |
{ |
2213 |
- static void cat_annulus(), write_annuli(), cat_shape(); |
2214 |
|
2215 |
/* Check for pointer before doing anything */ |
2216 |
if( region == NULL ) |
2217 |
@@ -84,13 +86,15 @@ void write_region_pros ( fd, region ) |
2218 |
/* Subroutine: cat_shape |
2219 |
* Purpose: Put simple PROS description of given cursor in line buffer |
2220 |
*/ |
2221 |
+ |
2222 |
+static void cat_polypts(), cat_cen(), cat_params(); |
2223 |
+ |
2224 |
static void cat_shape ( region, line ) |
2225 |
struct cursorRec *region; |
2226 |
char *line; |
2227 |
{ |
2228 |
int params; |
2229 |
void write_text_region(); |
2230 |
- static void cat_polypts(), cat_cen(), cat_params(); |
2231 |
|
2232 |
switch( region->type ) { |
2233 |
case COP_Box: |
2234 |
@@ -205,12 +209,14 @@ static void cat_cen ( region, line ) |
2235 |
* Subroutine: cat_polypts |
2236 |
* Purpose: Add list of point coordinates to line buffer (for polygon) |
2237 |
*/ |
2238 |
+ |
2239 |
+static void cat_pt(); |
2240 |
+ |
2241 |
static void cat_polypts ( region, line ) |
2242 |
struct cursorRec *region; |
2243 |
char *line; |
2244 |
{ |
2245 |
int i; |
2246 |
- static void cat_pt(); |
2247 |
|
2248 |
cat_pt((double)region->poly[0].fileX, (double)region->poly[0].fileY, |
2249 |
line, 0); |
2250 |
@@ -254,12 +260,14 @@ static void cat_pt ( x, y, line, comma ) |
2251 |
* Purpose: Put a PROS style description of circular annuli on the |
2252 |
* line buffer |
2253 |
*/ |
2254 |
+ |
2255 |
+static void cat_cen(); |
2256 |
+ |
2257 |
static void cat_annulus ( region, line ) |
2258 |
struct cursorRec *region; |
2259 |
char *line; |
2260 |
{ |
2261 |
char radius[16]; |
2262 |
- static void cat_cen(); |
2263 |
|
2264 |
(void)strcat(line, "ANNULUS("); |
2265 |
cat_cen(region, line); |
2266 |
@@ -275,14 +283,16 @@ static void cat_annulus ( region, line ) |
2267 |
* Subroutine: write_annuli |
2268 |
* Purpose: Write PROS type description to produce annuli of given shapes |
2269 |
*/ |
2270 |
+ |
2271 |
+static struct cursorRec *cat_annular(); |
2272 |
+static void cat_shape(); |
2273 |
+ |
2274 |
static void write_annuli ( region, line, fd ) |
2275 |
struct cursorRec *region; |
2276 |
char *line; |
2277 |
FILE *fd; |
2278 |
{ |
2279 |
struct cursorRec *annulus; |
2280 |
- static struct cursorRec *cat_annular(); |
2281 |
- static void cat_shape(); |
2282 |
|
2283 |
/* annuli start with next_annulus (base region is not one of them) */ |
2284 |
if( (annulus = region->next_annulus) != NULL ) { |
2285 |
@@ -309,11 +319,13 @@ static void write_annuli ( region, line, |
2286 |
* Purpose: Add outer shape anded with not of inner shape to make |
2287 |
* an annular ring |
2288 |
*/ |
2289 |
+ |
2290 |
+static void cat_shape(); |
2291 |
+ |
2292 |
static struct cursorRec *cat_annular ( region, line ) |
2293 |
struct cursorRec *region; |
2294 |
char *line; |
2295 |
{ |
2296 |
- static void cat_shape(); |
2297 |
|
2298 |
if( region->next_annulus != NULL ) { |
2299 |
if( region->exclude_region ) |
2300 |
--- rgnwrite.c.orig 1995-09-08 22:29:19 UTC |
2301 |
+++ rgnwrite.c |
2302 |
@@ -58,6 +58,9 @@ EditStruct *region_edit; |
2303 |
* Subroutine: write_regions |
2304 |
* Purpose: Write region info to a file |
2305 |
*/ |
2306 |
+ |
2307 |
+static void write_region_imtool(); |
2308 |
+ |
2309 |
void write_regions ( cursor, image, output_type ) |
2310 |
struct cursorRec *cursor; |
2311 |
struct imageRec *image; |
2312 |
@@ -66,7 +69,6 @@ void write_regions ( cursor, image, outp |
2313 |
FILE *fd; |
2314 |
static int last_output_type = 0; |
2315 |
char fname[SZ_FNAME]; |
2316 |
- static void write_region_imtool(); |
2317 |
int open_output_file(); |
2318 |
EditStruct *init_edit_popup(); |
2319 |
void set_path_iraf(), write_region_pros(), load_edit_struct(), timestamp(); |
2320 |
@@ -146,13 +148,15 @@ static void write_region_imtool ( fd, re |
2321 |
* Subroutine: timestamp |
2322 |
* Purpose: Write date and filename (if known) to region file |
2323 |
*/ |
2324 |
+ |
2325 |
+static void set_time_string(); |
2326 |
+ |
2327 |
void timestamp ( fd, imagename ) |
2328 |
FILE *fd; |
2329 |
char *imagename; |
2330 |
{ |
2331 |
char line[SZ_LINE]; |
2332 |
int len; |
2333 |
- static void set_time_string(); |
2334 |
|
2335 |
/* timestamp the first entry in the output file. */ |
2336 |
set_time_string (line); |
2337 |
--- sclctrl.c.orig 1996-10-10 15:55:57 UTC |
2338 |
+++ sclctrl.c |
2339 |
@@ -70,6 +70,9 @@ void select_scalemap () |
2340 |
* Subroutine: new_scalemap |
2341 |
* Purpose: Scalemap calculation for a new image |
2342 |
*/ |
2343 |
+ |
2344 |
+static void new_histogram(); |
2345 |
+ |
2346 |
void new_scalemap ( ) |
2347 |
{ |
2348 |
static double cmdMin = 0.0; |
2349 |
@@ -78,7 +81,6 @@ void new_scalemap ( ) |
2350 |
static int max_given = 0; |
2351 |
static int imtool_200 = 0; |
2352 |
static int init = 1; /* identify first time called */ |
2353 |
- static void new_histogram(); |
2354 |
void make_scalemap(), color_logo(); |
2355 |
#ifdef IMTOOL |
2356 |
void set_imtool_colors(); |
2357 |
--- sclmap.c.orig 1994-10-25 15:25:02 UTC |
2358 |
+++ sclmap.c |
2359 |
@@ -36,11 +36,13 @@ static char SccsId[] = "%W% %G%"; |
2360 |
* Note: Map goes from image value to hardware value (through ideal |
2361 |
* map value using pixels array from XAllocColors) |
2362 |
*/ |
2363 |
+ |
2364 |
+static void linear_scale(), wrap_scale(), sqrt_scale(), log_scale(); |
2365 |
+ |
2366 |
void make_scalemap ( image_min, image_max ) |
2367 |
int image_min, image_max; /* i: range of mapping for image data input */ |
2368 |
{ |
2369 |
void histogram_equalize(); |
2370 |
- static void linear_scale(), wrap_scale(), sqrt_scale(), log_scale(); |
2371 |
|
2372 |
/* note the range of data for which mapping is to be calculated */ |
2373 |
if( image_max == image_min ) |
2374 |
@@ -105,6 +107,9 @@ void make_scalemap ( image_min, image_ma |
2375 |
* Subroutine: linear_scale |
2376 |
* Purpose: Distribute color levels in the map evenly |
2377 |
*/ |
2378 |
+ |
2379 |
+static void get_histogram_range(); |
2380 |
+ |
2381 |
static void linear_scale ( image_min, image_max ) |
2382 |
int image_min, image_max; /* i: limits of values in display */ |
2383 |
{ |
2384 |
@@ -118,7 +123,6 @@ static void linear_scale ( image_min, im |
2385 |
register int imageval; |
2386 |
register int pixval; |
2387 |
register int imagelim; |
2388 |
- static void get_histogram_range(); |
2389 |
|
2390 |
range_min = image_min; |
2391 |
range_max = image_max; |
2392 |
--- wndwconf.c.orig 1995-01-21 00:27:13 UTC |
2393 |
+++ wndwconf.c |
2394 |
@@ -55,9 +55,11 @@ static unsigned int geo_width, geo_heigh |
2395 |
* Method: The size can be given or set to norm. If given but less |
2396 |
* than min (i.e. 0,0) it becomes the minimum configuration. |
2397 |
*/ |
2398 |
+ |
2399 |
+static void set_parsed_geometry(); |
2400 |
+ |
2401 |
void init_desktop ( ) |
2402 |
{ |
2403 |
- static void set_parsed_geometry(); |
2404 |
|
2405 |
desktop.hints.min_width = |
2406 |
(2 * desktop.xzero) + (2 * dispbox.bdrwidth) + dispbox.hints.min_width; |
2407 |
--- wndwinit.c.orig 2001-12-14 23:19:23 UTC |
2408 |
+++ wndwinit.c |
2409 |
@@ -53,11 +53,13 @@ static char **cmd_argv; /* i: command l |
2410 |
* Uses: create_window() in WndwCreate.c |
2411 |
* Xlib calls: DisplayWidth(), DisplayHeight(); |
2412 |
*/ |
2413 |
+ |
2414 |
+static void set_window_basics(); |
2415 |
+ |
2416 |
void init_windows1 ( argc, argv ) |
2417 |
int argc; /* i: command line arg count param */ |
2418 |
char **argv; /* i: command line args */ |
2419 |
{ |
2420 |
- static void set_window_basics(); |
2421 |
void init_desktop(), create_window(); |
2422 |
|
2423 |
/* set display screen parameters for all to see */ |
2424 |
@@ -81,9 +83,11 @@ void init_windows1 ( argc, argv ) |
2425 |
* Uses: configure_windows() in WndwConfig.c |
2426 |
* Uses: get_window_dimensions(), create_window() in WndwCreate.c |
2427 |
*/ |
2428 |
+ |
2429 |
+static void init_window_basics(), set_border_color(); |
2430 |
+ |
2431 |
void init_windows2 ( ) |
2432 |
{ |
2433 |
- static void init_window_basics(), set_border_color(); |
2434 |
void get_window_dimensions(), configure_windowgroup(), create_window(); |
2435 |
|
2436 |
/* install runtime environment parameters for all windows */ |
2437 |
@@ -175,11 +179,13 @@ void raise_windows ( ) |
2438 |
* Subroutine: init_window_basics, set_window_basics |
2439 |
* Purpose: Set the runtime environment parameters |
2440 |
*/ |
2441 |
+ |
2442 |
+static void set_window_basics(); |
2443 |
+ |
2444 |
static void init_window_basics ( border_pixel ) |
2445 |
int border_pixel; |
2446 |
{ |
2447 |
XImage *ximage; |
2448 |
- static void set_window_basics(); |
2449 |
|
2450 |
ximage = XCreateImage(desktop.display, color.visual, color.screen_depth, |
2451 |
dispbox.image.format, 0, malloc(4), 2, 2, |
2452 |
--- wndwmaus.c.orig 2001-12-19 22:06:46 UTC |
2453 |
+++ wndwmaus.c |
2454 |
@@ -61,11 +61,13 @@ static Cursor keycursor; |
2455 |
* Subroutine: init_mousepointers |
2456 |
* Purpose: Set up the various mouse pointer icons for all windows |
2457 |
*/ |
2458 |
+ |
2459 |
+static Cursor make_mouse_cursor(); |
2460 |
+ |
2461 |
void init_mousepointers ( dispdisplay, auxdisplay ) |
2462 |
Display *dispdisplay; /* i: display for the dispbox */ |
2463 |
Display *auxdisplay; /* i: display for the auxiliary windows */ |
2464 |
{ |
2465 |
- static Cursor make_mouse_cursor(); |
2466 |
|
2467 |
/* create special btnbox cursor for button menu window */ |
2468 |
btnbox.attrs.cursor = |