Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37047173
en ru br
ALT Linux repos
S:1.0-alt3

Group :: Development/Other
RPM: crm114

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: crm114-1.0-alt3.patch
Download


 Makefile               |  2 +-
 crm114.h               | 12 ++++++------
 crm114_structs.h       | 43 +++++++++++++++++++++----------------------
 crm_main.c             | 28 ++++++++++++++++++++++++++++
 crm_osbf_maintenance.c |  3 +++
 crm_pca_lib_fncts.c    |  2 ++
 crm_pca_lib_fncts.h    |  2 +-
 crm_str_funcs.c        |  4 ++++
 crm_svm_lib_fncts.c    |  2 ++
 crm_svm_lib_fncts.h    |  2 +-
 crm_svm_matrix_util.c  |  2 ++
 crm_svm_matrix_util.h  |  2 +-
 crm_svm_quad_prog.c    |  1 +
 crm_svm_quad_prog.h    |  2 +-
 crm_var_hash_table.c   |  2 ++
 15 files changed, 76 insertions(+), 33 deletions(-)
diff --git a/Makefile b/Makefile
index 7a0d076..2253b84 100644
--- a/Makefile
+++ b/Makefile
@@ -119,7 +119,7 @@ CFLAGS += -O3 -Wall -DDO_INLINES
 #    BSD users - do NOT use -static-libgcc!!!
 #    Also note that this keeps valgrind from running correctly so comment
 #    it out for debugging.
-LDFLAGS += -static -static-libgcc
+#LDFLAGS += -static -static-libgcc
 #    use this one if you want program profiling.
 #LDFLAGS += -static -static-libgcc -pg
 #LDFLAGS += -pg
diff --git a/crm114.h b/crm114.h
index 41e1a30..80ddaf8 100644
--- a/crm114.h
+++ b/crm114.h
@@ -10,25 +10,25 @@
 //    Global variables
 
 //   The VHT (Variable Hash Table)
-VHT_CELL **vht;
+extern VHT_CELL **vht;
 
 //   The pointer to the global Current Stack Level (CSL) frame
-CSL_CELL *csl;
+extern CSL_CELL *csl;
 
 //    the data window
-CSL_CELL *cdw;
+extern CSL_CELL *cdw;
 
 //    the temporarys data window (where argv, environ, newline etc. live)
-CSL_CELL *tdw;
+extern CSL_CELL *tdw;
 
 //    the pointer to a CSL that we use during matching.  This is flipped
 //    to point to the right data window during matching.  It doesn't have
 //    it's own data, unlike cdw and tdw.
-CSL_CELL *mdw;
+extern CSL_CELL *mdw;
 
 //    a pointer to the current statement argparse block.  This gets whacked
 //    on every new statement.
-ARGPARSE_BLOCK *apb;
+extern ARGPARSE_BLOCK *apb;
 
 //    the microcompiler
 int crm_microcompiler (CSL_CELL *csl,
diff --git a/crm114_structs.h b/crm114_structs.h
index a88ab93..ebe6f00 100644
--- a/crm114_structs.h
+++ b/crm114_structs.h
@@ -9,35 +9,34 @@
 //    These are systemwide globals.  Sure, they should go into a global
 //     struct, but that realization only occured to me in 2008.  Sorry.
 
-long vht_size;
-long cstk_limit;
-long max_pgmlines;
-long max_pgmsize;
-long max_pgmsize;
-long user_trace;
-long internal_trace;
-long debug_countdown;
-long cmdline_break;
-long cycle_counter;
-long ignore_environment_vars;
-long data_window_size;
+extern long vht_size;
+extern long cstk_limit;
+extern long max_pgmlines;
+extern long max_pgmsize;
+extern long user_trace;
+extern long internal_trace;
+extern long debug_countdown;
+extern long cmdline_break;
+extern long cycle_counter;
+extern long ignore_environment_vars;
+extern long data_window_size;
 
 // Number of hash table buckets.  Set from command line, read (only)
 // by classifier learns.
-long sparse_spectrum_file_length;
+extern long sparse_spectrum_file_length;
 
-long microgroom_chain_length ;
-long microgroom_stop_after;
+extern long microgroom_chain_length;
+extern long microgroom_stop_after;
 
-float min_pmax_pmin_ratio;
-long profile_execution;
+extern float min_pmax_pmin_ratio;
+extern long profile_execution;
 
-int dontcare;
-void *dontcareptr;
+extern int dontcare;
+extern void *dontcareptr;
 
-long prettyprint_listing;  //  0= none, 1 = basic, 2 = expanded, 3 = parsecode
+extern long prettyprint_listing;  //  0= none, 1 = basic, 2 = expanded, 3 = parsecode
 
-long engine_exit_base;  //  All internal errors will use this number or higher;
+extern long engine_exit_base;  //  All internal errors will use this number or higher;
                        //  the user programs can use lower numbers freely.
 
 
@@ -46,7 +45,7 @@ long engine_exit_base;  //  All internal errors will use this number or higher;
 //        = 1 no extended (non-EVAL) math, use RPN
 //        = 2 extended (everywhere) math, use algebraic notation
 //        = 3 extended (everywhere) math, use RPN
-long q_expansion_mode;
+extern long q_expansion_mode;
 
 
 //   structure of a vht cell
diff --git a/crm_main.c b/crm_main.c
index 6ad90a8..4c90e08 100644
--- a/crm_main.c
+++ b/crm_main.c
@@ -29,6 +29,34 @@ char *inbuf;
 char *outbuf;
 char *tempbuf;
 
+CSL_CELL *cdw;
+CSL_CELL *csl;
+CSL_CELL *tdw;
+CSL_CELL *mdw;
+ARGPARSE_BLOCK *apb;
+
+long cstk_limit;
+long max_pgmlines;
+long max_pgmsize;
+long debug_countdown;
+long cmdline_break;
+long cycle_counter;
+long ignore_environment_vars;
+long data_window_size;
+
+long sparse_spectrum_file_length;
+
+float min_pmax_pmin_ratio;
+long profile_execution;
+
+void *dontcareptr;
+
+long prettyprint_listing;
+
+long engine_exit_base;
+
+long q_expansion_mode;
+
 int main (int argc, char **argv)
 {
   int i;    //  some random counters, when we need a loop
diff --git a/crm_osbf_maintenance.c b/crm_osbf_maintenance.c
index e7305b4..a16b1f2 100644
--- a/crm_osbf_maintenance.c
+++ b/crm_osbf_maintenance.c
@@ -22,6 +22,9 @@
 
 #include "crm114_osbf.h"
 
+long microgroom_chain_length;
+long microgroom_stop_after;
+
 /* Version names */
 char *CSS_version_name[] = {
   "SBPH-Markovian",
diff --git a/crm_pca_lib_fncts.c b/crm_pca_lib_fncts.c
index b074e54..d015394 100644
--- a/crm_pca_lib_fncts.c
+++ b/crm_pca_lib_fncts.c
@@ -14,6 +14,8 @@
 #include "crm_svm_matrix.h"
 #include "crm_pca_lib_fncts.h"
 
+int PCA_DEBUG_MODE;
+
 /*******************************************************************************************
  *This is a variation of the VonMises power algorithm for sparse matrices.  Let us have
  *x_1, x_2,.., x_n examples with column means xbar.  Then the VonMises update is:
diff --git a/crm_pca_lib_fncts.h b/crm_pca_lib_fncts.h
index 058f09e..328474f 100644
--- a/crm_pca_lib_fncts.h
+++ b/crm_pca_lib_fncts.h
@@ -25,7 +25,7 @@
                             //The intermediate DEBUG modes may enable debug printing for the
                             //matrix operations.  See crm_svm_matrix_util.h for details.
 
-int PCA_DEBUG_MODE;         //The debug mode for the PCA
+extern int PCA_DEBUG_MODE;         //The debug mode for the PCA
 extern int MATR_DEBUG_MODE; //Debug mode for matrices.  MATR_DEBUG_MODE = PCA_DEBUG_MODE
                             //Defined in crm_svm_matrix_util.h
 
diff --git a/crm_str_funcs.c b/crm_str_funcs.c
index 8ebd384..efae7b8 100644
--- a/crm_str_funcs.c
+++ b/crm_str_funcs.c
@@ -16,6 +16,10 @@
 //  and include the routine declarations file
 #include "crm114.h"
 
+int dontcare;
+long internal_trace;
+long user_trace;
+
 //     strnhash - generate the hash of a string of length N
 //     goals - fast, works well with short vars includng
 //     letter pairs and palindromes, not crypto strong, generates
diff --git a/crm_svm_lib_fncts.c b/crm_svm_lib_fncts.c
index 89e9e81..0aa6113 100644
--- a/crm_svm_lib_fncts.c
+++ b/crm_svm_lib_fncts.c
@@ -13,6 +13,8 @@
 // Copyright 2009 William S. Yerazunis.
 // This file is under GPLv3, as described in COPYING.
 
+int SVM_DEBUG_MODE;
+
 //static function declarations
 static SVM_Solution *svm_solve_init_sol(Matrix *Xy, Vector *st_theta, 
 					double weight, int max_train_val);
diff --git a/crm_svm_lib_fncts.h b/crm_svm_lib_fncts.h
index a650425..49f6d4c 100644
--- a/crm_svm_lib_fncts.h
+++ b/crm_svm_lib_fncts.h
@@ -47,7 +47,7 @@
                                 //a feasible setting since the print operations
                                 //put all the zeros in!
 
-int SVM_DEBUG_MODE;         //There are a number of modes.
+extern int SVM_DEBUG_MODE;         //There are a number of modes.
                                    //See crm_svm_matrix_util.h for them.
 //the SVM solution struct
 typedef struct {
diff --git a/crm_svm_matrix_util.c b/crm_svm_matrix_util.c
index b8e1264..1174549 100644
--- a/crm_svm_matrix_util.c
+++ b/crm_svm_matrix_util.c
@@ -19,6 +19,8 @@
  *matrix library, but possibly more general.
  ************************************************************************/
 
+int MATR_DEBUG_MODE;
+
 /***********************Expanding Array Functions***************************/
 
 //Static expanding array function declarations
diff --git a/crm_svm_matrix_util.h b/crm_svm_matrix_util.h
index 3369eb0..7f63bbc 100644
--- a/crm_svm_matrix_util.h
+++ b/crm_svm_matrix_util.h
@@ -58,7 +58,7 @@
 #define MY_INLINE static inline
 #endif
 
-int MATR_DEBUG_MODE;            //the debug value
+extern int MATR_DEBUG_MODE;            //the debug value
                                //for SVM, if internal trace is on 
                                //MATR_DEBUG_MODE = SVM_INTERNAL_TRACE_LEVEL
                                //for PCA, if internal trace is on
diff --git a/crm_svm_quad_prog.c b/crm_svm_quad_prog.c
index 3c5ae80..e725fed 100644
--- a/crm_svm_quad_prog.c
+++ b/crm_svm_quad_prog.c
@@ -13,6 +13,7 @@
 // Copyright 2009 William S. Yerazunis.
 // This file is under GPLv3, as described in COPYING.
 
+int QP_DEBUG_MODE;
 
 /******************************************************************
  *We use the active set method outlined in Gill and Murray 1977
diff --git a/crm_svm_quad_prog.h b/crm_svm_quad_prog.h
index 8212efe..2d1fd67 100644
--- a/crm_svm_quad_prog.h
+++ b/crm_svm_quad_prog.h
@@ -20,7 +20,7 @@
 extern int MATR_DEBUG_MODE;     //debugging mode. see crm_svm_matrix_util.h for
                                //possible values.
 
-int QP_DEBUG_MODE;
+extern int QP_DEBUG_MODE;
 
 #define QP_DEBUG 2              //basic information about the qp solver
 
diff --git a/crm_var_hash_table.c b/crm_var_hash_table.c
index be28710..b6f5a2e 100644
--- a/crm_var_hash_table.c
+++ b/crm_var_hash_table.c
@@ -19,6 +19,8 @@
 //    wherever needed.  These are sized to the same size as the data window.
 extern char *tempbuf;
 
+long vht_size;
+VHT_CELL **vht;
 
 //      initialize the variable hash table (the vht)
 //      and stuff in the "standards" (:_vars:, environment vars)
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin