View | Details | Raw Unified | Return to bug 249989
Collapse All | Expand All

(-)Makefile (-6 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	crm114
4
PORTNAME=	crm114
5
PORTVERSION=	20100106
5
PORTVERSION=	20100106
6
PORTREVISION=	5
6
PORTREVISION=	6
7
# WARNING change versionname in CRM114RELEASENAME too.
7
# WARNING change versionname in CRM114RELEASENAME too.
8
# portlint didn't like this variable at this place.
8
# portlint didn't like this variable at this place.
9
# So I have to put it down in this file.
9
# So I have to put it down in this file.
Lines 38-48 LDFLAGS+= -L${LOCALBASE}/lib -Wl,--as-needed Link Here
38
CFLAGS+=	-DVERSION='\"${PORTVERSION}-${CRM114RELEASENAME}\"'
38
CFLAGS+=	-DVERSION='\"${PORTVERSION}-${CRM114RELEASENAME}\"'
39
CFLAGS+=	-DNO_LOGL
39
CFLAGS+=	-DNO_LOGL
40
40
41
CFLAGS+=		-fcommon
42
43
DEPRECATED=	Unmaintained and dead upstream, does not build with -fno-common (llvm 11)
44
EXPIRATION_DATE=2021-04-01
45
46
INSTALL_TARGET=	install_binary_only
41
INSTALL_TARGET=	install_binary_only
47
42
48
CRM_FILES=	mailfilter.crm mailfilter.cf mailreaver.crm mailtrainer.crm \
43
CRM_FILES=	mailfilter.crm mailfilter.cf mailreaver.crm mailtrainer.crm \
(-)files/patch-no-common (+302 lines)
Line 0 Link Here
1
--- crm114.h.orig	2010-01-06 10:38:46.000000000 -0800
2
+++ crm114.h	2020-09-29 11:24:33.568829000 -0700
3
@@ -10,25 +10,25 @@
4
 //    Global variables
5
 
6
 //   The VHT (Variable Hash Table)
7
-VHT_CELL **vht;
8
+extern VHT_CELL **vht;
9
 
10
 //   The pointer to the global Current Stack Level (CSL) frame
11
-CSL_CELL *csl;
12
+extern CSL_CELL *csl;
13
 
14
 //    the data window
15
-CSL_CELL *cdw;
16
+extern CSL_CELL *cdw;
17
 
18
 //    the temporarys data window (where argv, environ, newline etc. live)
19
-CSL_CELL *tdw;
20
+extern CSL_CELL *tdw;
21
 
22
 //    the pointer to a CSL that we use during matching.  This is flipped
23
 //    to point to the right data window during matching.  It doesn't have
24
 //    it's own data, unlike cdw and tdw.
25
-CSL_CELL *mdw;
26
+extern CSL_CELL *mdw;
27
 
28
 //    a pointer to the current statement argparse block.  This gets whacked
29
 //    on every new statement.
30
-ARGPARSE_BLOCK *apb;
31
+extern ARGPARSE_BLOCK *apb;
32
 
33
 //    the microcompiler
34
 int crm_microcompiler (CSL_CELL *csl,
35
--- crm114_structs.h.orig	2010-01-06 10:38:46.000000000 -0800
36
+++ crm114_structs.h	2020-09-29 11:25:56.181047000 -0700
37
@@ -9,35 +9,31 @@
38
 //    These are systemwide globals.  Sure, they should go into a global
39
 //     struct, but that realization only occured to me in 2008.  Sorry.
40
 
41
-long vht_size;
42
-long cstk_limit;
43
-long max_pgmlines;
44
-long max_pgmsize;
45
-long max_pgmsize;
46
-long user_trace;
47
-long internal_trace;
48
-long debug_countdown;
49
-long cmdline_break;
50
-long cycle_counter;
51
-long ignore_environment_vars;
52
-long data_window_size;
53
+extern long vht_size;
54
+extern long max_pgmsize;
55
+extern long user_trace;
56
+extern long internal_trace;
57
+extern long debug_countdown;
58
+extern long cmdline_break;
59
+extern long cycle_counter;
60
+extern long ignore_environment_vars;
61
+extern long data_window_size;
62
 
63
 // Number of hash table buckets.  Set from command line, read (only)
64
 // by classifier learns.
65
-long sparse_spectrum_file_length;
66
+extern long sparse_spectrum_file_length;
67
 
68
-long microgroom_chain_length ;
69
-long microgroom_stop_after;
70
+extern long microgroom_chain_length ;
71
+extern long microgroom_stop_after;
72
 
73
-float min_pmax_pmin_ratio;
74
-long profile_execution;
75
+extern float min_pmax_pmin_ratio;
76
+extern long profile_execution;
77
 
78
-int dontcare;
79
-void *dontcareptr;
80
+extern int dontcare;
81
 
82
-long prettyprint_listing;  //  0= none, 1 = basic, 2 = expanded, 3 = parsecode
83
+extern long prettyprint_listing;  //  0= none, 1 = basic, 2 = expanded, 3 = parsecode
84
 
85
-long engine_exit_base;  //  All internal errors will use this number or higher;
86
+extern long engine_exit_base;  //  All internal errors will use this number or higher;
87
                        //  the user programs can use lower numbers freely.
88
 
89
 
90
@@ -46,7 +42,7 @@
91
 //        = 1 no extended (non-EVAL) math, use RPN
92
 //        = 2 extended (everywhere) math, use algebraic notation
93
 //        = 3 extended (everywhere) math, use RPN
94
-long q_expansion_mode;
95
+extern long q_expansion_mode;
96
 
97
 
98
 //   structure of a vht cell
99
--- crm_expr_syscall.c.orig	2010-01-06 10:38:46.000000000 -0800
100
+++ crm_expr_syscall.c	2020-09-29 11:27:01.849003000 -0700
101
@@ -331,7 +331,7 @@
102
 		      if (user_trace)
103
 			fprintf (stderr, "Redirecting minion stdin to %s\n",
104
 				 filename);
105
-		      dontcareptr = freopen (filename, "rb", stdin);
106
+		      (void )freopen (filename, "rb", stdin);
107
 		    };
108
 		  if (sys_cmd[vstart] == '>')
109
 		    {
110
@@ -343,7 +343,7 @@
111
 			    fprintf (stderr,
112
 				     "Redirecting minion stdout to %s\n",
113
 				     filename);
114
-			  dontcareptr = freopen (filename, "wb", stdout);
115
+			  (void )freopen (filename, "wb", stdout);
116
 			}
117
 		      else
118
 			{
119
@@ -353,7 +353,7 @@
120
 			    fprintf (stderr,
121
 				     "Appending minion stdout to %s\n",
122
 				     filename);
123
-			  dontcareptr =  freopen (filename, "a+", stdout);
124
+			  (void )freopen (filename, "a+", stdout);
125
 			}
126
 		    };
127
 		}
128
--- crm_main.c.orig	2010-01-06 10:38:46.000000000 -0800
129
+++ crm_main.c	2020-09-29 11:24:03.412831000 -0700
130
@@ -17,6 +17,30 @@
131
 //  and include OSBF declarations
132
 #include "crm114_osbf.h"
133
 
134
+//
135
+//    Global variables
136
+
137
+//   The VHT (Variable Hash Table)
138
+VHT_CELL **vht;
139
+
140
+//   The pointer to the global Current Stack Level (CSL) frame
141
+CSL_CELL *csl;
142
+
143
+//    the data window
144
+CSL_CELL *cdw;
145
+
146
+//    the temporarys data window (where argv, environ, newline etc. live)
147
+CSL_CELL *tdw;
148
+
149
+//    the pointer to a CSL that we use during matching.  This is flipped
150
+//    to point to the right data window during matching.  It doesn't have
151
+//    it's own data, unlike cdw and tdw.
152
+CSL_CELL *mdw;
153
+
154
+//    a pointer to the current statement argparse block.  This gets whacked
155
+//    on every new statement.
156
+ARGPARSE_BLOCK *apb;
157
+
158
 //    the command line argv
159
 char **prog_argv;
160
 
161
@@ -29,6 +53,21 @@
162
 char *outbuf;
163
 char *tempbuf;
164
 
165
+long vht_size;
166
+long max_pgmsize;
167
+long data_window_size;
168
+long sparse_spectrum_file_length;
169
+float min_pmax_pmin_ratio;
170
+long ignore_environment_vars;
171
+long debug_countdown;
172
+long cycle_counter;
173
+long cmdline_break;
174
+long profile_execution;
175
+long prettyprint_listing;
176
+long engine_exit_base;
177
+long q_expansion_mode;
178
+static long max_pgmlines;
179
+
180
 int main (int argc, char **argv)
181
 {
182
   int i;    //  some random counters, when we need a loop
183
@@ -45,7 +84,6 @@
184
   prog_argv = argv;
185
 
186
   vht_size = DEFAULT_VHT_SIZE;
187
-  cstk_limit = DEFAULT_CSTK_LIMIT;
188
   max_pgmlines = DEFAULT_MAX_PGMLINES;
189
   max_pgmsize = DEFAULT_MAX_PGMLINES * 128;
190
   data_window_size = DEFAULT_DATA_WINDOW;
191
--- crm_osbf_maintenance.c.orig	2010-01-06 10:38:46.000000000 -0800
192
+++ crm_osbf_maintenance.c	2020-09-29 11:11:31.072503000 -0700
193
@@ -22,6 +22,9 @@
194
 
195
 #include "crm114_osbf.h"
196
 
197
+long microgroom_chain_length;
198
+long microgroom_stop_after;
199
+
200
 /* Version names */
201
 char *CSS_version_name[] = {
202
   "SBPH-Markovian",
203
--- crm_pca.c.orig	2010-01-06 10:38:46.000000000 -0800
204
+++ crm_pca.c	2020-09-29 11:30:23.757205000 -0700
205
@@ -14,6 +14,8 @@
206
 
207
 #include "crm_pca.h"
208
 
209
+int PCA_DEBUG_MODE;
210
+
211
 //static function declarations
212
 static Vector *convert_document(char *text, long text_len,
213
 				unsigned int *features,
214
--- crm_pca_lib_fncts.h.orig	2010-01-06 10:38:46.000000000 -0800
215
+++ crm_pca_lib_fncts.h	2020-09-29 11:13:30.976438000 -0700
216
@@ -25,7 +25,7 @@
217
                             //The intermediate DEBUG modes may enable debug printing for the
218
                             //matrix operations.  See crm_svm_matrix_util.h for details.
219
 
220
-int PCA_DEBUG_MODE;         //The debug mode for the PCA
221
+extern int PCA_DEBUG_MODE;         //The debug mode for the PCA
222
 extern int MATR_DEBUG_MODE; //Debug mode for matrices.  MATR_DEBUG_MODE = PCA_DEBUG_MODE
223
                             //Defined in crm_svm_matrix_util.h
224
 
225
--- crm_str_funcs.c.orig	2010-01-06 10:38:46.000000000 -0800
226
+++ crm_str_funcs.c	2020-09-29 11:07:19.848617000 -0700
227
@@ -16,6 +16,10 @@
228
 //  and include the routine declarations file
229
 #include "crm114.h"
230
 
231
+int dontcare;
232
+long internal_trace;
233
+long user_trace;
234
+
235
 //     strnhash - generate the hash of a string of length N
236
 //     goals - fast, works well with short vars includng
237
 //     letter pairs and palindromes, not crypto strong, generates
238
--- crm_svm.c.orig	2010-01-06 10:38:46.000000000 -0800
239
+++ crm_svm.c	2020-09-29 11:29:52.525272000 -0700
240
@@ -13,6 +13,8 @@
241
 
242
 #include "crm_svm.h"
243
 
244
+int SVM_DEBUG_MODE;
245
+
246
 //static function declarations
247
 static Vector *convert_document(char *text, long text_len,
248
 				unsigned int *features,
249
--- crm_svm_lib_fncts.h.orig	2010-01-06 10:38:46.000000000 -0800
250
+++ crm_svm_lib_fncts.h	2020-09-29 11:13:06.456437000 -0700
251
@@ -47,7 +47,7 @@
252
                                 //a feasible setting since the print operations
253
                                 //put all the zeros in!
254
 
255
-int SVM_DEBUG_MODE;         //There are a number of modes.
256
+extern int SVM_DEBUG_MODE;         //There are a number of modes.
257
                                    //See crm_svm_matrix_util.h for them.
258
 //the SVM solution struct
259
 typedef struct {
260
--- crm_svm_matrix.c.orig	2010-01-06 10:38:46.000000000 -0800
261
+++ crm_svm_matrix.c	2020-09-29 11:28:36.597637000 -0700
262
@@ -14,6 +14,8 @@
263
 #include "crm_svm_matrix.h"
264
 #include "crm_svm_matrix_util.h"
265
 
266
+int MATR_DEBUG_MODE;
267
+
268
 /*****************************************************************************
269
  *This is a matrix/vector library.
270
  *The intent of it is to keep all matrix operations out of the algorithms.
271
--- crm_svm_matrix_util.h.orig	2010-01-06 10:38:46.000000000 -0800
272
+++ crm_svm_matrix_util.h	2020-09-29 11:10:00.228429000 -0700
273
@@ -58,7 +58,7 @@
274
 #define MY_INLINE static inline
275
 #endif
276
 
277
-int MATR_DEBUG_MODE;            //the debug value
278
+extern int MATR_DEBUG_MODE;            //the debug value
279
                                //for SVM, if internal trace is on 
280
                                //MATR_DEBUG_MODE = SVM_INTERNAL_TRACE_LEVEL
281
                                //for PCA, if internal trace is on
282
--- crm_svm_quad_prog.c.orig	2010-01-06 10:38:46.000000000 -0800
283
+++ crm_svm_quad_prog.c	2020-09-29 11:29:28.397123000 -0700
284
@@ -13,6 +13,7 @@
285
 // Copyright 2009 William S. Yerazunis.
286
 // This file is under GPLv3, as described in COPYING.
287
 
288
+int QP_DEBUG_MODE;
289
 
290
 /******************************************************************
291
  *We use the active set method outlined in Gill and Murray 1977
292
--- crm_svm_quad_prog.h.orig	2010-01-06 10:38:46.000000000 -0800
293
+++ crm_svm_quad_prog.h	2020-09-29 11:29:04.628919000 -0700
294
@@ -20,8 +20,6 @@
295
 extern int MATR_DEBUG_MODE;     //debugging mode. see crm_svm_matrix_util.h for
296
                                //possible values.
297
 
298
-int QP_DEBUG_MODE;
299
-
300
 #define QP_DEBUG 2              //basic information about the qp solver
301
 
302
 #define QP_DEBUG_LOOP 3         //prints some information during each qp loop

Return to bug 249989