summaryrefslogtreecommitdiff
blob: a9071da812076c4ae05419b51cccd1682fd18911 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
--- a/src/field.c
+++ b/src/field.c
@@ -42,6 +42,9 @@
 #include	"prefs.h"
 #include	"readimage.h"
 
+extern prefstruct prefs;
+char gstr[MAXCHAR];
+
 /********************************* newfield **********************************/
 /*
 Returns a pointer to a new field, ready to go!
--- a/src/fits/fitsbody.c
+++ b/src/fits/fitsbody.c
@@ -43,6 +43,7 @@
 #include	"fitscat_defs.h"
 #include	"fitscat.h"
 
+extern int bswapflag;
 size_t	body_maxram = BODY_DEFRAM,
 	body_maxvram = BODY_DEFVRAM,
 	body_ramleft, body_vramleft, body_ramflag;
--- a/src/fits/fitscat.h
+++ b/src/fits/fitscat.h
@@ -333,6 +333,6 @@ extern  void	error(int, char *, char *),
 		warning(char *msg1, char *msg2);
 
 
-int		bswapflag;
+extern int		bswapflag;
 
 #endif
--- a/src/fits/fitscheck.c
+++ b/src/fits/fitscheck.c
@@ -42,6 +42,7 @@
 unsigned int	exclude[13] = {0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40,
 				0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60};
 
+extern int bswapflag;
 /****** encode_checksum *****************************************************
 PROTO	void encode_checksum(unsigned int sum, char *str)
 PURPOSE	Encode a checksum to ASCII
--- a/src/fits/fitskey.c
+++ b/src/fits/fitskey.c
@@ -38,6 +38,7 @@
 #include	"fitscat_defs.h"
 #include	"fitscat.h"
 
+int bswapflag;
 /****** add_key ****************************************************************
 PROTO	int add_key(keystruct *key, tabstruct *tab, int pos)
 PURPOSE	Copy a key from one table to another.
--- a/src/fits/fitsread.c
+++ b/src/fits/fitsread.c
@@ -38,6 +38,7 @@
 #include	"fitscat_defs.h"
 #include	"fitscat.h"
 
+extern int bswapflag;
 char	padbuf[FBSIZE];
 
 /****** read_cat ***************************************************************
--- a/src/fits/fitswrite.c
+++ b/src/fits/fitswrite.c
@@ -39,6 +39,7 @@
 #include	"fitscat_defs.h"
 #include	"fitscat.h"
 
+extern int bswapflag;
 
 /****** save_cat **************************************************************
 PROTO	void save_cat(catstruct *cat, char *filename)
--- a/src/globals.h
+++ b/src/globals.h
@@ -30,7 +30,7 @@
 #include "types.h"
 
 /*----------------------- miscellaneous variables ---------------------------*/
-char		gstr[MAXCHAR];
+extern char		gstr[MAXCHAR];
 
 /*------------------------------- functions ---------------------------------*/
 extern	void	makeit(void),
--- a/src/main.c
+++ b/src/main.c
@@ -51,6 +51,8 @@ EXECUTABLE " [-c <configuration_file>] [-<keyword> <value>]\n"\
 extern const char	notokstr[];
 time_t		thetime, thetime2;
 
+extern prefstruct prefs;
+
 /********************************** main ************************************/
 int	main(int argc, char *argv[])
 
--- a/src/makeit.c
+++ b/src/makeit.c
@@ -45,6 +45,8 @@
 #include "readimage.h"
 #include "xml.h"
 
+extern prefstruct prefs;
+
 /********************************** makeit ***********************************/
 void	makeit(void)
   {
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -51,6 +51,9 @@
 #include 	"prefs.h"
 #include	"preflist.h"
 
+extern int bswapflag;
+prefstruct prefs;
+
 /********************************* dumpprefs ********************************/
 /*
 Print the default preference parameters.
--- a/src/prefs.h
+++ b/src/prefs.h
@@ -86,7 +86,7 @@ typedef struct
   double	time_diff;			/* Execution time */
   }	prefstruct;
 
-  prefstruct	prefs;
+extern prefstruct prefs;
 
 
 /*-------------------------------- protos -----------------------------------*/
--- a/src/readimage.c
+++ b/src/readimage.c
@@ -39,6 +39,7 @@
 #include	"fits/fitscat.h"
 #include	"readimage.h"
 
+extern int bswapflag;
 /******************************** readdata **********************************/
 /*
 read and convert input data stream in PIXTYPE (float) format.
--- a/src/vector.c
+++ b/src/vector.c
@@ -46,6 +46,9 @@
 
 static void	chsort(crosstruct *ra, int n);
 
+extern char gstr[MAXCHAR];
+extern prefstruct prefs;
+
 /********************************** newvec **********************************/
 /*
 Returns a pointer to a new polygon, and initialize local context buffer:
--- a/src/xml.c
+++ b/src/xml.c
@@ -45,6 +45,7 @@
 #include "field.h"
 #include "xml.h"
 
+extern  prefstruct prefs;
 extern time_t		thetime,thetime2;	/* from makeit.c */
 extern pkeystruct	key[];			/* from preflist.h */
 extern char		keylist[][32];		/* from preflist.h */