summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/symmetrica-sort_sum_rename.patch
blob: 2d9a2dae068b2cfb5cc27a7b038c3ef1a937a220 (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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
diff -r 5cd656a07aa5 src/bar.c
--- a/bar.c	Thu May 14 06:01:00 2009 -0400
+++ b/bar.c	Thu May 14 07:38:17 2009 -0400
@@ -237,7 +237,7 @@
     g = callocobject();
     e = S_V_I(a,0L);
     f = S_V_I(a,1L);
-    erg += sum(f,g);
+    erg += sym_sum(f,g);
     j=0L;
     for (i=0L;i<S_V_LI(e);i++)
         j += S_V_II(e,i)*(i+1L);
@@ -427,7 +427,7 @@
     for (i=0L;i<S_V_LI(b);i++)
         erg += kranztypus_to_matrix(S_V_I(c,i),S_V_I(b,i));
     erg += freeall(c);
-    erg += sort(b); /* AK 130592 */
+    erg += sym_sort(b); /* AK 130592 */
     ENDR("makevectorof_class_bar");
 }
 
@@ -615,7 +615,7 @@
     c = callocobject();
     d = callocobject();
     erg += lehmercode_bar(a,c);
-    erg += sum(S_V_I(c,1L),b);
+    erg += sym_sum(S_V_I(c,1L),b);
     for(i=0L;i<S_P_LI(a);i++)
         {
         if (S_V_II(S_V_I(c,0L),i) == 1L)
diff -r 5cd656a07aa5 src/def.h
--- a/def.h	Thu May 14 06:01:00 2009 -0400
+++ b/def.h	Thu May 14 07:38:17 2009 -0400
@@ -3105,7 +3105,7 @@
 extern INT so_character ();
 extern INT so_dimension ();
 extern OBJECTKIND s_o_k();
-extern INT sort();
+extern INT sym_sort();
 extern INT sort_rows_tableaux_apply();
 extern INT sort_vector();
 extern OBJECTSELF s_o_s();
@@ -3271,7 +3271,7 @@
 extern INT sub_part_part();
 extern INT substitute_one_matrix ();
 extern INT substitute_one_monopoly ();
-extern INT sum();
+extern INT sym_sum();
 extern INT sum_integervector();
 extern INT sum_matrix();
 extern INT sum_vector();
diff -r 5cd656a07aa5 src/di.c
--- a/di.c	Thu May 14 06:01:00 2009 -0400
+++ b/di.c	Thu May 14 07:38:17 2009 -0400
@@ -1355,7 +1355,7 @@
 				m_il_nv(0L,weight_watcher);
 				m_il_nv(0L,perm_vec);
 				copy(S_V_I(FP,0L),fix);
-				sort(fix);
+				sym_sort(fix);
 
 				get_perm(hweight,p,b,S_I_I(n),S_I_I(m),0L,
 						 perm_vec,weight_watcher,fix);
@@ -1502,7 +1502,7 @@
 	if(ind == m)
 	{
 		mult_perm_fix(p,fix,hfix);
-		sort(hfix);
+		sym_sort(hfix);
 		if(!hfix_in_ww(hfix,ww))
 		{
 			inc(ww);
diff -r 5cd656a07aa5 src/ga.c
--- a/ga.c	Thu May 14 06:01:00 2009 -0400
+++ b/ga.c	Thu May 14 07:38:17 2009 -0400
@@ -632,7 +632,7 @@
     else if (what == 0L)
         erg += vertikal_sum(S_V_L(a),c);
     erg += copy(a,d);
-    erg += sort(d);
+    erg += sym_sort(d);
     erg += m_il_p(S_V_II(d,S_V_LI(d)-1L),e); /* identitaet */
     for (i=0L,k=0L,j=S_V_LI(d);i<S_P_LI(e);i++)
         if (i+1L == S_V_II(d,k) )
@@ -722,7 +722,7 @@
 
     j=0L;
     erg += append(h,g,h2); 
-    erg += sort(h2);
+    erg += sym_sort(h2);
     for (i=0L;i<S_V_LI(g);i++)
         {
         erg += m_i_i(S_V_II(g,i),S_P_I(a,j));
diff -r 5cd656a07aa5 src/galois.c
--- a/galois.c	Thu May 14 06:01:00 2009 -0400
+++ b/galois.c	Thu May 14 07:38:17 2009 -0400
@@ -758,7 +758,7 @@
 		}
         }
     FREEALL2(v,nv);
-    sort(res);
+    sym_sort(res);
     }
     S3R(k,phg_c,phg_d,"all_points_phg_store",res);
     ENDR("all_points");
diff -r 5cd656a07aa5 src/macro.h
--- a/macro.h	Thu May 14 06:01:00 2009 -0400
+++ b/macro.h	Thu May 14 07:38:17 2009 -0400
@@ -1,6 +1,8 @@
 /* file: macro.h symmetrica source code */
 #ifndef MACRO_H
 
+#include "string.h"
+
 #ifdef SYMMAGMA
 #define SYM_MALLOC(a) mem_malloc(a)
 #else
 #define C_O_K(a,b) ((a)->ob_kind = (OBJECTKIND)(b))
--- a/nc.c	Thu May 14 06:01:00 2009 -0400
+++ b/nc.c	Thu May 14 07:38:17 2009 -0400
@@ -204,7 +204,7 @@
     erg += mult(S_NC_C(a),S_NC_C(b),d);
     erg += m_gl_co(S_NC_GL(a),e);
     erg += mult_apply(e,d);
-    erg += sum(d,e);
+    erg += sym_sum(d,e);
     erg += m_gl_go(S_NC_GL(a),d);
     erg += div(e,d,c);
     erg += freeall(e);
@@ -617,7 +617,7 @@
         erg += mult_nc_kranz(c,a,e);
         erg += mult(S_V_I(e,1L),f,c);
         erg += div(c,g,c);
-        erg += sum(c,S_V_I(S_NC_C(b),S_I_I(d)));
+        erg += sym_sum(c,S_V_I(S_NC_C(b),S_I_I(d)));
     }
     erg += freeall(c); 
     erg += freeall(d); 
@@ -712,7 +712,7 @@
     for(j = 0L; j<S_V_LI(c);j++) {
         kranztypus_to_matrix(S_V_I(c,j),S_V_I(a,j)); 
     }
-    sort(a);
+    sym_sort(a);
     freeall(f); freeall(h); freeall(c);
     return OK;
 }
@@ -739,7 +739,7 @@
         kranztypus_to_matrix(S_V_I(c,j),S_V_I(h,j)); 
         }
     
-    sort(h); 
+    sym_sort(h); 
     m_l_v(S_V_L(h),a);
     for(j = 0L; j<S_V_LI(c);j++) {
         typusorder(S_V_I(h,j), zb, za, S_V_I(a,j), f);
@@ -789,7 +789,7 @@
         erg += kranztypus_to_matrix(S_V_I(c,j),S_V_I(h,j)); 
     }
     
-    erg += sort(h);
+    erg += sym_sort(h);
     erg += typusorder(S_V_I(h,S_I_I(i)), zb, za, a, f);
     erg += freeall(f); 
     erg += freeall(c); 
diff -r 5cd656a07aa5 src/nu.c
--- a/nu.c	Thu May 14 06:01:00 2009 -0400
+++ b/nu.c	Thu May 14 07:38:17 2009 -0400
@@ -531,13 +531,13 @@
     ENDR("add");
 }
 
-INT sort(a) OP a;
+INT sym_sort(a) OP a;
 /* sortiert das object in aufsteigender reihenfolge AK 270787 */
 /* AK 160986 */ /* AK 280689 V1.0 */ /* AK 050390 V1.1 */
 /* AK 070891 V1.3 */
 {
     INT erg = OK;
-    EOP("sort(1)",a);
+    EOP("sym_sort(1)",a);
 
     switch(S_O_K(a))
     {
@@ -547,9 +547,9 @@
         erg += sort_vector(a);break;
 #endif /* VECTORTRUE */
     default:
-        erg += WTO("sort",a); break;
+        erg += WTO("sym_sort",a); break;
     };
-    ENDR("sort");
+    ENDR("sym_sort");
 }
 
 INT length(a,d) OP a,d;
@@ -641,7 +641,7 @@
     ENDR("content");
 }
 
-INT sum(a,res) OP a,res;
+INT sym_sum(a,res) OP a,res;
 /* AK 280689 V1.0 */ /* AK 050390 V1.1 */ /* AK 120391 V1.2 */
 /* AK 140891 V1.3 */
 /* AK 170298 V2.0 */
@@ -649,7 +649,7 @@
     INT erg = OK;
     COP("sum(1)",a);
     COP("sum(2)",res);
-    CE2(a,res,sum);
+    CE2(a,res,sym_sum);
 
     switch(S_O_K(a))
     {
@@ -680,7 +680,7 @@
         erg += WTO("sum",a); break;
     };
 
-    ENDR("sum");
+    ENDR("sym_sum");
 }
 
 
diff -r 5cd656a07aa5 src/part.c
--- a/part.c	Thu May 14 06:01:00 2009 -0400
+++ b/part.c	Thu May 14 07:38:17 2009 -0400
@@ -347,7 +347,7 @@
     if (a == b) { /* a := a+a */
         if (S_PA_K(a) == VECTOR) {
             erg += append_apply_vector(S_PA_S(a),S_PA_S(b));
-            erg += sort(S_PA_S(a));
+            erg += sym_sort(S_PA_S(a));
             goto endr_ende;
         }
         else if (S_PA_K(a) == EXPONENT) {
@@ -406,7 +406,7 @@
             k=S_PA_LI(b)-1;
 /*
             erg += append_apply_vector(S_PA_S(a),S_PA_S(b));
-            erg += sort(S_PA_S(a));
+            erg += sym_sort(S_PA_S(a));
 */
             inc_vector_co(S_PA_S(a),S_PA_LI(b));
             for (j=S_PA_LI(a)-1;j>=0;j--)
diff -r 5cd656a07aa5 src/perm.c
--- a/perm.c	Thu May 14 06:01:00 2009 -0400
+++ b/perm.c	Thu May 14 07:38:17 2009 -0400
@@ -833,9 +833,9 @@
     /* s = Anzahl der spalten */
         
     s = S_V_LI(S_V_I(a,0L));
-    sum(S_V_I(a,0L),summe);/* composition ist vector */
+    sym_sum(S_V_I(a,0L),summe);/* composition ist vector */
     z = S_I_I(summe);
-    FREEALL(summe); 
+    FREEALL(summe);
     m_ilih_nm(s,z,b); 
     C_O_K(b,KRANZTYPUS);
     for (i=0L;i<s;i++)
@@ -1114,7 +1114,7 @@
         erg += kranztypus_to_matrix(S_V_I(c,i),S_V_I(h,i)); 
     }
     
-    erg += sort(h);
+    erg += sym_sort(h);
 
     erg += chartafel(b,ct);
 
@@ -1926,7 +1926,7 @@
     OP c;
     c = CALLOCOBJECT();
     erg += lehmercode_permutation(a,c); /*result is a vector */
-    erg += sum(c,b); 
+    erg += sym_sum(c,b); 
     FREEALL(c);
     }
     ENDR("numberof_inversionen");
@@ -2364,7 +2364,7 @@
     COP("rz_lehmercode(2)",b);
 
     zw = callocobject();
-    erg += sum(lc,zw); 
+    erg += sym_sum(lc,zw); 
     if (NULLP(zw)) 
         {
         erg += m_il_integervector((INT)0,b);
diff -r 5cd656a07aa5 src/rest.c
--- a/rest.c	Thu May 14 06:01:00 2009 -0400
+++ b/rest.c	Thu May 14 07:38:17 2009 -0400
@@ -3998,7 +3998,7 @@
                 oj = j;
                 }
         }
-    erg += sum(c,b);
+    erg += sym_sum(c,b);
 eee:
     erg += freeall(c);
     ENDR("charge_word");
diff -r 5cd656a07aa5 src/ta.c
--- a/ta.c	Thu May 14 06:01:00 2009 -0400
+++ b/ta.c	Thu May 14 07:38:17 2009 -0400
@@ -1596,7 +1596,7 @@
     {
     OP d,e;
     e = CALLOCOBJECT();
-    erg += sum(content,e); /* AK 271098 */
+    erg += sym_sum(content,e); /* AK 271098 */
     d = CALLOCOBJECT();
     erg += weight(shape,d);
     if (NEQ(d,e))
@@ -1821,7 +1821,7 @@
     CE3(matrix, column_index, row_index,matrix_twoword);
     c = callocobject();
     erg += zeilen_summe(matrix,c);
-    erg += sum(c,c);
+    erg += sym_sum(c,c);
     erg += m_l_v(c,column_index);
     erg += m_l_v(c,row_index);
     for(i=0,l=0;i<S_M_HI(matrix);i++)
diff -r 5cd656a07aa5 src/zyk.c
--- a/zyk.c	Thu May 14 06:01:00 2009 -0400
+++ b/zyk.c	Thu May 14 07:38:17 2009 -0400
@@ -804,7 +804,7 @@
     zykeltypvec = CALLOCOBJECT();
     ak_order = CALLOCOBJECT();
 
-    sum(numztvec,ak_order); /* AK 060295 */
+    sym_sum(numztvec,ak_order); /* AK 060295 */
 
 
 
@@ -1176,7 +1176,7 @@
     erg += m_i_i(0,c);
     while (z!=NULL)
         {
-        erg += sum(S_PO_S(z),e);
+        erg += sym_sum(S_PO_S(z),e);
         erg += hoch(b,e,e);
         erg += mult_apply(S_PO_K(z),e);
         erg += add_apply(e,c);