@@ -374,8 +374,10 @@ int UnpackFloat(mpf_t outfloat,WORD *fun)
374374*/
375375 GETIDENTITY
376376 if ( AT .aux_ == 0 ) {
377+ MLOCK (ErrorMessageLock );
377378 MesPrint ("Illegal attempt at using a float_ function without proper startup." );
378379 MesPrint ("Please use %#StartFloat <options> first." );
380+ MUNLOCK (ErrorMessageLock );
379381 Terminate (-1 );
380382 }
381383/*
@@ -1355,7 +1357,7 @@ int CoChop(UBYTE *s)
13551357 return (1 );
13561358 }
13571359 if ( * s == 0 ) {
1358- MesPrint ("&Chop needs a number (float or rational ) as an argument." );
1360+ MesPrint ("&Chop needs a number (float, rational or power ) as an argument." );
13591361 return (1 );
13601362 }
13611363 /* Create TYPECHOP header */
@@ -1422,7 +1424,7 @@ int CoChop(UBYTE *s)
14221424 }
14231425 }
14241426 if ( * s ) {
1425- MesPrint ("&Illegal argument(s) in Chop statement: '%s'" ,s );
1427+ MesPrint ("&Illegal argument(s) in Chop statement: '%s'. " ,s );
14261428 return (1 );
14271429 }
14281430 AT .WorkPointer = OldWork ;
@@ -2006,8 +2008,10 @@ void SingleTable(mpf_t *tabl, int N, int m, int pow)
20062008 mpf_t jm ,jjm ;
20072009 mpf_init (jm ); mpf_init (jjm );
20082010 if ( pow < 1 || pow > 2 ) {
2009- printf ("Wrong parameter pow in SingleTable: %d\n" ,pow );
2010- exit (-1 );
2011+ MLOCK (ErrorMessageLock );
2012+ MesPrint ("Wrong parameter pow in SingleTable: %d\n" ,pow );
2013+ MUNLOCK (ErrorMessageLock );
2014+ Terminate (-1 );
20112015 }
20122016 if ( m < 0 ) { m = - m ; s = -1 ; }
20132017 mpf_set_si (auxsum ,0L );
@@ -2047,8 +2051,10 @@ void DoubleTable(mpf_t *tabout, mpf_t *tabin, int N, int m, int pow)
20472051 mpf_t jm ,jjm ;
20482052 mpf_init (jm ); mpf_init (jjm );
20492053 if ( pow < -1 || pow > 2 ) {
2050- printf ("Wrong parameter pow in SingleTable: %d\n" ,pow );
2051- exit (-1 );
2054+ MLOCK (ErrorMessageLock );
2055+ MesPrint ("Wrong parameter pow in DoubleTable: %d\n" ,pow );
2056+ MUNLOCK (ErrorMessageLock );
2057+ Terminate (-1 );
20522058 }
20532059 if ( m < 0 ) { m = - m ; s = -1 ; }
20542060 mpf_set_ui (auxsum ,0L );
@@ -2097,8 +2103,10 @@ void EndTable(mpf_t sum, mpf_t *tabin, int N, int m, int pow)
20972103 mpf_t jm ,jjm ;
20982104 mpf_init (jm ); mpf_init (jjm );
20992105 if ( pow < -1 || pow > 2 ) {
2100- printf ("Wrong parameter pow in SingleTable: %d\n" ,pow );
2101- exit (-1 );
2106+ MLOCK (ErrorMessageLock );
2107+ MesPrint ("Wrong parameter pow in EndTable: %d\n" ,pow );
2108+ MUNLOCK (ErrorMessageLock );
2109+ Terminate (-1 );
21022110 }
21032111 if ( m < 0 ) { m = - m ; s = -1 ; }
21042112 mpf_set_si (sum ,0L );
@@ -2271,7 +2279,10 @@ void deltaEulerC(mpf_t result, WORD *indexes, int depth)
22712279 mpf_set_ui (result ,0 );
22722280 if ( depth == 1 ) {
22732281 if ( indexes [0 ] == 0 ) {
2274- printf ("Illegal index in depth=1 deltaEulerC: %d\n" ,indexes [0 ]);
2282+ MLOCK (ErrorMessageLock );
2283+ MesPrint ("Illegal index in depth=1 deltaEulerC: %d\n" ,indexes [0 ]);
2284+ MUNLOCK (ErrorMessageLock );
2285+ Terminate (-1 );
22752286 }
22762287 if ( indexes [0 ] < 0 ) SimpleDeltaC (result ,indexes [0 ]);
22772288 else SimpleDelta (result ,indexes [0 ]);
@@ -2332,13 +2343,17 @@ void CalculateMZVhalf(mpf_t result, WORD *indexes, int depth)
23322343{
23332344 int i ;
23342345 if ( depth < 0 ) {
2335- printf ("Illegal depth in CalculateMZVhalf: %d\n" ,depth );
2336- exit (-1 );
2346+ MLOCK (ErrorMessageLock );
2347+ MesPrint ("Illegal depth in CalculateMZVhalf: %d" ,depth );
2348+ MUNLOCK (ErrorMessageLock );
2349+ Terminate (-1 );
23372350 }
23382351 for ( i = 0 ; i < depth ; i ++ ) {
23392352 if ( indexes [i ] <= 0 ) {
2340- printf ("Illegal index[%d] in CalculateMZVhalf: %d\n" ,i ,indexes [i ]);
2341- exit (-1 );
2353+ MLOCK (ErrorMessageLock );
2354+ MesPrint ("Illegal index[%d] in CalculateMZVhalf: %d" ,i ,indexes [i ]);
2355+ MUNLOCK (ErrorMessageLock );
2356+ Terminate (-1 );
23422357 }
23432358 }
23442359 deltaMZV (result ,indexes ,depth );
@@ -2354,18 +2369,24 @@ void CalculateMZV(mpf_t result, WORD *indexes, int depth)
23542369 GETIDENTITY
23552370 int num1 , num2 = 0 , i , j = 0 ;
23562371 if ( depth < 0 ) {
2357- printf ("Illegal depth in CalculateMZV: %d\n" ,depth );
2358- exit (-1 );
2372+ MLOCK (ErrorMessageLock );
2373+ MesPrint ("Illegal depth in CalculateMZV: %d" ,depth );
2374+ MUNLOCK (ErrorMessageLock );
2375+ Terminate (-1 );
23592376 }
23602377 if ( indexes [0 ] == 1 ) {
2361- printf ("Divergent MZV in CalculateMZV\n" );
2362- exit (-1 );
2378+ MLOCK (ErrorMessageLock );
2379+ MesPrint ("Divergent MZV in CalculateMZV" );
2380+ MUNLOCK (ErrorMessageLock );
2381+ Terminate (-1 );
23632382 }
23642383/* MesPrint("calculateMZV(%a)",depth,indexes); */
23652384 for ( i = 0 ; i < depth ; i ++ ) {
23662385 if ( indexes [i ] <= 0 ) {
2367- printf ("Illegal index[%d] in CalculateMZV: %d\n" ,i ,indexes [i ]);
2368- exit (-1 );
2386+ MLOCK (ErrorMessageLock );
2387+ MesPrint ("Illegal index[%d] in CalculateMZV: %d" ,i ,indexes [i ]);
2388+ MUNLOCK (ErrorMessageLock );
2389+ Terminate (-1 );
23692390 }
23702391 AT .indi1 [i ] = indexes [i ];
23712392 }
@@ -2428,17 +2449,23 @@ void CalculateEuler(mpf_t result, WORD *Zindexes, int depth)
24282449 }
24292450
24302451 if ( depth < 0 ) {
2431- printf ("Illegal depth in CalculateEuler: %d\n" ,depth );
2432- exit (-1 );
2452+ MLOCK (ErrorMessageLock );
2453+ MesPrint ("Illegal depth in CalculateEuler: %d\n" ,depth );
2454+ MUNLOCK (ErrorMessageLock );
2455+ Terminate (-1 );
24332456 }
24342457 if ( indexes [0 ] == 1 ) {
2435- printf ("Divergent Euler sum in CalculateEuler\n" );
2436- exit (-1 );
2458+ MLOCK (ErrorMessageLock );
2459+ MesPrint ("Divergent Euler sum in CalculateEuler\n" );
2460+ MUNLOCK (ErrorMessageLock );
2461+ Terminate (-1 );
24372462 }
24382463 for ( i = 0 , j = 0 ; i < depth ; i ++ ) {
24392464 if ( indexes [i ] == 0 ) {
2440- printf ("Illegal index[%d] in CalculateEuler: %d\n" ,i ,indexes [i ]);
2441- exit (-1 );
2465+ MLOCK (ErrorMessageLock );
2466+ MesPrint ("Illegal index[%d] in CalculateEuler: %d\n" ,i ,indexes [i ]);
2467+ MUNLOCK (ErrorMessageLock );
2468+ Terminate (-1 );
24422469 }
24432470 if ( indexes [i ] < 0 ) j = 1 ;
24442471 AT .indi1 [i ] = indexes [i ];
@@ -2558,8 +2585,10 @@ int EvaluateEuler(PHEAD WORD *term, WORD level, WORD par)
25582585 /* euler sum without arguments, i.e. mzv_(), euler_() or mzvhalf_() */
25592586 if ( depth == 0 ) goto nextfun ;
25602587 if ( sumweight > AC .MaxWeight ) {
2561- MesPrint ("Error: Weight of Euler/MZV sum greater than %d" ,sumweight );
2562- MesPrint ("Please increase MaxWeight in form.set." );
2588+ MLOCK (ErrorMessageLock );
2589+ MesPrint ("Error: Weight of Euler/MZV sum greater than %d." ,AC .MaxWeight );
2590+ MesPrint ("Please increase the maximum weight in %#startfloat." );
2591+ MUNLOCK (ErrorMessageLock );
25632592 Terminate (-1 );
25642593 }
25652594/*
0 commit comments