Skip to content

Commit 4e421de

Browse files
author
t68
committed
*** empty log message ***
1 parent 4072e95 commit 4e421de

File tree

4 files changed

+33
-25
lines changed

4 files changed

+33
-25
lines changed

sources/normal.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ Normalize BARG1(WORD *,term)
9595
/*
9696
#] Declarations :
9797
#[ Setup :
98+
PrintTerm(term,"Normalize");
9899
*/
100+
99101
Restart:
100102
didcontr = 0;
101103
ReplaceType = -1;
@@ -1628,7 +1630,7 @@ defaultcase:;
16281630
goto conscan;
16291631
}
16301632
/*
1631-
#] First scan :
1633+
#] First scan :
16321634
#[ Easy denominators :
16331635
16341636
Easy denominators are denominators that can be replaced by
@@ -2875,7 +2877,7 @@ NextI:;
28752877
}
28762878
#endif
28772879
/*
2878-
#] normalize replacements :
2880+
#] normalize replacements :
28792881
*/
28802882
#ifdef OLDNORMREPLACE
28812883
AT.WorkPointer = termout;
@@ -3104,7 +3106,7 @@ DoTheta ARG1(WORD *,t)
31043106
}
31053107

31063108
/*
3107-
#] DoTheta :
3109+
#] DoTheta :
31083110
#[ DoDelta :
31093111
*/
31103112

@@ -3172,7 +3174,7 @@ DoDelta ARG1(WORD *,t)
31723174
}
31733175

31743176
/*
3175-
#] DoDelta :
3177+
#] DoDelta :
31763178
#[ DoRevert :
31773179
*/
31783180

@@ -3247,7 +3249,7 @@ void DoRevert ARG2(WORD *,fun,WORD *,tmp)
32473249
}
32483250

32493251
/*
3250-
#] DoRevert :
3252+
#] DoRevert :
32513253
#] Normalize :
32523254
#[ DetCommu :
32533255
@@ -3310,7 +3312,7 @@ WORD DetCommu ARG1(WORD *,terms)
33103312
}
33113313

33123314
/*
3313-
#] DetCommu :
3315+
#] DetCommu :
33143316
#[ EvaluateGcd :
33153317
33163318
Try to evaluate the GCDFUNCTION gcd_.
@@ -3627,5 +3629,5 @@ gcdisone:;
36273629
}
36283630

36293631
/*
3630-
#] EvaluateGcd :
3632+
#] EvaluateGcd :
36313633
*/

sources/symmetr.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,7 +1519,7 @@ int FunMatchSy ARG4(WORD *,pattern,WORD *,fun,WORD *,inter,WORD,par)
15191519
if ( argcount == 0 && tcount == 0 && funnycount == 0 ) {
15201520
quicky:
15211521
AN.RepFunList[AN.RepFunNum++] = offset;
1522-
AN.RepFunList[AN.RepFunNum++] = 0;
1522+
AN.RepFunList[AN.RepFunNum++] = signs;
15231523
newpat = pattern + pattern[1];
15241524
if ( newpat >= AN.patstop ) {
15251525
if ( AN.UseFindOnly == 0 ) {
@@ -1850,6 +1850,7 @@ nextiraise:;
18501850
for ( i = 0; i < tcount; i++ ) cycles[i] = tcount-i;
18511851
AT.WorkPointer += tcount;
18521852
signo = 0;
1853+
MesPrint("<1> signs = %d",signs);
18531854
for (;;) {
18541855
for ( j = 0; j < argcount; j++ ) {
18551856
if ( MatchArgument(AT.pWorkSpace[oww+j],AT.pWorkSpace[lhpars+j]) == 0 ) {
@@ -1961,7 +1962,7 @@ nextiraise:;
19611962
}
19621963

19631964
/*
1964-
#] FunMatchSy :
1965+
#] FunMatchSy :
19651966
#[ MatchArgument :
19661967
*/
19671968

sources/token.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "form3.h"
1313

1414
/*
15-
#] Includes :
15+
#] Includes :
1616
#[ Compiler :
1717
#[ tokenize :
1818
@@ -383,9 +383,9 @@ donumber: i = 0;
383383
else goto IllPos;
384384
in++;
385385
break;
386-
case 5: /* + - * / ^ : */
386+
case 5: /* + - * % / ^ : */
387387
CHECKPOLY
388-
if ( *in == ':' ) goto IllPos;
388+
if ( *in == ':' || *in == '%' ) goto IllPos;
389389
if ( *in == '*' || *in == '/' || *in == '^' ) {
390390
if ( object <= 0 ) {
391391
MesPrint("&Illegal position for operator: %s",in);
@@ -563,7 +563,7 @@ WriteTokens ARG1(SBYTE *,in)
563563
}
564564

565565
/*
566-
#] WriteTokens :
566+
#] WriteTokens :
567567
#[ simp1token :
568568
569569
Routine substitutes set elements if possible.
@@ -643,7 +643,7 @@ if ( n < 0 ) {
643643
}
644644

645645
/*
646-
#] simp1token :
646+
#] simp1token :
647647
#[ simpwtoken :
648648
649649
Only to be called in the LHS.
@@ -804,7 +804,7 @@ firsterr: if ( first ) {
804804
}
805805

806806
/*
807-
#] simpwtoken :
807+
#] simpwtoken :
808808
#[ simp2token :
809809
810810
Deals with function arguments.
@@ -985,7 +985,7 @@ tcommon: v++; while ( *v >= 0 ) v++;
985985
}
986986

987987
/*
988-
#] simp2token :
988+
#] simp2token :
989989
#[ simp3atoken :
990990
991991
We hunt for denominators and exponents that seem hidden.
@@ -1219,7 +1219,7 @@ nodot: MesPrint("&Illegal second element in dotproduct");
12191219
}
12201220

12211221
/*
1222-
#] simp3atoken :
1222+
#] simp3atoken :
12231223
#[ simp3btoken :
12241224
*/
12251225

@@ -1593,7 +1593,7 @@ doublepower:;
15931593
}
15941594

15951595
/*
1596-
#] simp3btoken :
1596+
#] simp3btoken :
15971597
#[ simp4token :
15981598
15991599
Deal with the set[n] objects in the RHS.
@@ -1750,7 +1750,7 @@ simp4token ARG1(SBYTE *,s)
17501750
}
17511751

17521752
/*
1753-
#] simp4token :
1753+
#] simp4token :
17541754
#[ simp5token :
17551755
17561756
Making sure that first argument of sumfunction is not a wildcard already
@@ -1797,7 +1797,7 @@ simp5token ARG2(SBYTE *,s,int,mode)
17971797
}
17981798

17991799
/*
1800-
#] simp5token :
1800+
#] simp5token :
18011801
#[ simp6token :
18021802
18031803
int
@@ -1811,7 +1811,7 @@ simp6token ARG2(SBYTE *,s,int,mode)
18111811
return(error);
18121812
}
18131813
1814-
#] simp6token :
1814+
#] simp6token :
18151815
#] Compiler :
18161816
*/
18171817
/* temporary commentary for forcing cvs merge */

sources/wildcard.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ WORD
4040
WildFill BARG3(WORD *,to,WORD *,from,WORD *,sub)
4141
{
4242
GETBIDENTITY
43-
WORD i, j, *s, *t, *m, len, dflag, odirt;
43+
WORD i, j, *s, *t, *m, len, dflag, odirt, adirt;
4444
WORD *r, *u, *v, *w, *z, *zst, *zz, *subs, *accu, na, dirty = 0, *tstop;
4545
WORD *temp = 0, *uu, *oldcpointer, sgn;
4646
WORD subcount, setflag, *setlist = 0, si;
@@ -1172,22 +1172,27 @@ ss10: *m++ = *t++;
11721172
NEXTARG(zz)
11731173
odirt = AN.WildDirt; AN.WildDirt = 0;
11741174
AR.CompressPointer = accu + na;
1175-
m += ARGHEAD;
1176-
t += ARGHEAD;
1175+
for ( j = 0; j < ARGHEAD; j++ ) *m++ = *t++;
11771176
j = 0;
1177+
adirt = 0;
11781178
while ( t < zz ) { /* do a term */
11791179
if ( ( len = WildFill(BHEAD m,t,sub) ) < 0 ) {
11801180
LOCK(ErrorMessageLock);
11811181
MesCall("WildFill");
11821182
UNLOCK(ErrorMessageLock);
11831183
SETERROR(-1)
11841184
}
1185+
if ( AN.WildDirt ) {
1186+
adirt = AN.WildDirt;
1187+
AN.WildDirt = 0;
1188+
}
11851189
m += len;
11861190
t += *t;
11871191
}
11881192
*w = WORDDIF(m,w); /* Fill parameter length */
1189-
if ( AN.WildDirt ) {
1193+
if ( adirt ) {
11901194
dirty = w[1] = 1; v[2] |= DIRTYFLAG;
1195+
AN.WildDirt = adirt;
11911196
}
11921197
else {
11931198
AN.WildDirt = odirt;

0 commit comments

Comments
 (0)