summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre.ledru@scilab.org>2011-03-24 21:57:17 +0100
committerVincent COUVERT <vincent.couvert@scilab.org>2011-03-25 14:54:29 +0100
commit31ef51d4492cb1fdf16163c38ee7470df74a7b56 (patch)
treee3498524017b25e036205bcb33d15e96ed1cb524
parent16efa7b93e8322296e3f66a73d661dae0db317c5 (diff)
downloadscilab-31ef51d4492cb1fdf16163c38ee7470df74a7b56.zip
scilab-31ef51d4492cb1fdf16163c38ee7470df74a7b56.tar.gz
remove useless characters + useless macros removed
Change-Id: Iddbc55dcc3e21420f3eee141c516324c8a64d5e1
-rw-r--r--scilab/modules/api_scilab/src/cpp/api_pointer.cpp2
-rw-r--r--scilab/modules/call_scilab/src/c/SendScilabJobs.c2
-rw-r--r--scilab/modules/core/src/c/intmacr2tree.c2
-rw-r--r--scilab/modules/graphics/src/c/SetProperty.c2
-rw-r--r--scilab/modules/gui/sci_gateway/c/sci_toolbar.c2
-rw-r--r--scilab/modules/gui/src/cpp/displaytree.cpp2
-rw-r--r--scilab/modules/interpolation/src/c/interpolation.c2
-rw-r--r--scilab/modules/output_stream/src/c/do_xxprintf.c2
-rw-r--r--scilab/modules/renderer/src/cpp/polylineDrawing/PolylineInterpColorDrawerJoGL.cpp2
-rw-r--r--scilab/modules/scicos/src/scicos_sundials/src/cvode/cvode.c21
-rw-r--r--scilab/modules/scicos/src/scicos_sundials/src/ida/ida.c21
-rw-r--r--scilab/modules/scicos/src/scicos_sundials/src/ida/ida_ic.c5
-rw-r--r--scilab/modules/scicos/src/scicos_sundials/src/kinsol/kinsol.c18
-rw-r--r--scilab/modules/umfpack/src/c/taucs_scilab.c2
14 files changed, 28 insertions, 57 deletions
diff --git a/scilab/modules/api_scilab/src/cpp/api_pointer.cpp b/scilab/modules/api_scilab/src/cpp/api_pointer.cpp
index 0163084..855f8de 100644
--- a/scilab/modules/api_scilab/src/cpp/api_pointer.cpp
+++ b/scilab/modules/api_scilab/src/cpp/api_pointer.cpp
@@ -93,7 +93,7 @@ SciErr allocPointer(void* _pvCtx, int _iVar, void** _pvPtr)
93 sciErr = fillPointer(_pvCtx, piAddr, &pvPtr); 93 sciErr = fillPointer(_pvCtx, piAddr, &pvPtr);
94 if(sciErr.iErr) 94 if(sciErr.iErr)
95 { 95 {
96 addErrorMessage(&sciErr, API_ERROR_ALLOC_POINTER, _("%s: Unable to create variable in Scilab memory"), "allocPointer");; 96 addErrorMessage(&sciErr, API_ERROR_ALLOC_POINTER, _("%s: Unable to create variable in Scilab memory"), "allocPointer");
97 return sciErr; 97 return sciErr;
98 } 98 }
99 99
diff --git a/scilab/modules/call_scilab/src/c/SendScilabJobs.c b/scilab/modules/call_scilab/src/c/SendScilabJobs.c
index 275ee8d..89cd687 100644
--- a/scilab/modules/call_scilab/src/c/SendScilabJobs.c
+++ b/scilab/modules/call_scilab/src/c/SendScilabJobs.c
@@ -121,7 +121,7 @@ int SendScilabJob(char *job)
121 retCode = (int)Err_Job; 121 retCode = (int)Err_Job;
122 122
123 /* clear prev. Err , TMP_EXEC_STRING scilab variables */ 123 /* clear prev. Err , TMP_EXEC_STRING scilab variables */
124 C2F(scirun)(COMMAND_CLEAR, (long int)strlen(COMMAND_CLEAR));; 124 C2F(scirun)(COMMAND_CLEAR, (long int)strlen(COMMAND_CLEAR));
125 } 125 }
126 else 126 else
127 { 127 {
diff --git a/scilab/modules/core/src/c/intmacr2tree.c b/scilab/modules/core/src/c/intmacr2tree.c
index 5662aef..6291492 100644
--- a/scilab/modules/core/src/c/intmacr2tree.c
+++ b/scilab/modules/core/src/c/intmacr2tree.c
@@ -472,7 +472,7 @@ static int GetInstruction(int *data,int *index2,int *nblines,int *addinstr)
472 switch(data[*index2]) { 472 switch(data[*index2]) {
473 case 0: /* Deleted operation */ 473 case 0: /* Deleted operation */
474 /* This code is ignored */ 474 /* This code is ignored */
475 *index2 += data[*index2+1]-1;; 475 *index2 += data[*index2+1]-1;
476 break; 476 break;
477 case 1: /* Stack put (Obsolete) */ 477 case 1: /* Stack put (Obsolete) */
478 CreateEqualTList("code1",data,index2); 478 CreateEqualTList("code1",data,index2);
diff --git a/scilab/modules/graphics/src/c/SetProperty.c b/scilab/modules/graphics/src/c/SetProperty.c
index 1c05419..4e390f2 100644
--- a/scilab/modules/graphics/src/c/SetProperty.c
+++ b/scilab/modules/graphics/src/c/SetProperty.c
@@ -1093,7 +1093,7 @@ int sciInitFontBackground( sciPointObj * pobj, int colorindex )
1093 { 1093 {
1094 case SCI_TEXT: 1094 case SCI_TEXT:
1095 (sciGetFontContext(pobj))->backgroundcolor = 1095 (sciGetFontContext(pobj))->backgroundcolor =
1096 Max (0, Min (colorindex - 1, sciGetNumColors (pobj) + 1));; 1096 Max (0, Min (colorindex - 1, sciGetNumColors (pobj) + 1));
1097 break; 1097 break;
1098 case SCI_LEGEND: 1098 case SCI_LEGEND:
1099 (sciGetFontContext(pobj))->backgroundcolor = 1099 (sciGetFontContext(pobj))->backgroundcolor =
diff --git a/scilab/modules/gui/sci_gateway/c/sci_toolbar.c b/scilab/modules/gui/sci_gateway/c/sci_toolbar.c
index ad51736..a28a8a0 100644
--- a/scilab/modules/gui/sci_gateway/c/sci_toolbar.c
+++ b/scilab/modules/gui/sci_gateway/c/sci_toolbar.c
@@ -36,7 +36,7 @@ int sci_toolbar(char *fname,unsigned long l)
36 36
37 int figNum = -2; 37 int figNum = -2;
38 38
39 sciPointObj *pObj = NULL;; 39 sciPointObj *pObj = NULL;
40 40
41 CheckRhs(1,2); 41 CheckRhs(1,2);
42 CheckLhs(0,1); 42 CheckLhs(0,1);
diff --git a/scilab/modules/gui/src/cpp/displaytree.cpp b/scilab/modules/gui/src/cpp/displaytree.cpp
index f94a939..c1f2637 100644
--- a/scilab/modules/gui/src/cpp/displaytree.cpp
+++ b/scilab/modules/gui/src/cpp/displaytree.cpp
@@ -78,7 +78,7 @@ bool bParseListItem(int _iVar, int *_piCurrentItem, vector<string> *_pvStructLis
78 szCurLvl += "."; 78 szCurLvl += ".";
79 std::ostringstream out; 79 std::ostringstream out;
80 out << i-1; 80 out << i-1;
81 szCurLvl += out.str();; 81 szCurLvl += out.str();
82 82
83 _pvStructList->push_back(szCurLvl); 83 _pvStructList->push_back(szCurLvl);
84 84
diff --git a/scilab/modules/interpolation/src/c/interpolation.c b/scilab/modules/interpolation/src/c/interpolation.c
index 7c829b3..2357c07 100644
--- a/scilab/modules/interpolation/src/c/interpolation.c
+++ b/scilab/modules/interpolation/src/c/interpolation.c
@@ -88,7 +88,7 @@ int get_rhs_real_hmat(int num, RealHyperMat *H)
88 88
89 /* get the 3d field */ 89 /* get the 3d field */
90 if ( !( *istk(il3) == 1 && *istk(il3+3)==0) ) 90 if ( !( *istk(il3) == 1 && *istk(il3+3)==0) )
91 goto err;; 91 goto err;
92 92
93 H->size = (*istk(il3+1))*(*istk(il3+2)); 93 H->size = (*istk(il3+1))*(*istk(il3+2));
94 H->R = stk(sadr(il3+4)); 94 H->R = stk(sadr(il3+4));
diff --git a/scilab/modules/output_stream/src/c/do_xxprintf.c b/scilab/modules/output_stream/src/c/do_xxprintf.c
index 398d26d..7ee137c 100644
--- a/scilab/modules/output_stream/src/c/do_xxprintf.c
+++ b/scilab/modules/output_stream/src/c/do_xxprintf.c
@@ -542,7 +542,7 @@ static char* readNextUTFChar(char* utfstream,int* size)
542 {/* three bytes UTF-8*/ 542 {/* three bytes UTF-8*/
543 UTFChar[0]=*utfstream; 543 UTFChar[0]=*utfstream;
544 UTFChar[1]=*(utfstream+1); 544 UTFChar[1]=*(utfstream+1);
545 UTFChar[2]=*(utfstream+2);; 545 UTFChar[2]=*(utfstream+2);
546 UTFChar[3]='\0'; 546 UTFChar[3]='\0';
547 *size=3; 547 *size=3;
548 } 548 }
diff --git a/scilab/modules/renderer/src/cpp/polylineDrawing/PolylineInterpColorDrawerJoGL.cpp b/scilab/modules/renderer/src/cpp/polylineDrawing/PolylineInterpColorDrawerJoGL.cpp
index 2faad4c..2ed92c7 100644
--- a/scilab/modules/renderer/src/cpp/polylineDrawing/PolylineInterpColorDrawerJoGL.cpp
+++ b/scilab/modules/renderer/src/cpp/polylineDrawing/PolylineInterpColorDrawerJoGL.cpp
@@ -54,7 +54,7 @@ void PolylineInterpColorDrawerJoGL::drawPolyline( void )
54 xCoords = new double[nbVertices]; 54 xCoords = new double[nbVertices];
55 yCoords = new double[nbVertices]; 55 yCoords = new double[nbVertices];
56 zCoords = new double[nbVertices]; 56 zCoords = new double[nbVertices];
57 colors = new int[nbVertices];; 57 colors = new int[nbVertices];
58 } 58 }
59 catch (const std::exception& e) 59 catch (const std::exception& e)
60 { 60 {
diff --git a/scilab/modules/scicos/src/scicos_sundials/src/cvode/cvode.c b/scilab/modules/scicos/src/scicos_sundials/src/cvode/cvode.c
index ac0a0b9..dd8af42 100644
--- a/scilab/modules/scicos/src/scicos_sundials/src/cvode/cvode.c
+++ b/scilab/modules/scicos/src/scicos_sundials/src/cvode/cvode.c
@@ -32,13 +32,6 @@
32#include "sundials_extension.h" 32#include "sundials_extension.h"
33 33
34/*=================================================================*/ 34/*=================================================================*/
35/* Macros */
36/*=================================================================*/
37
38/* Macro: loop */
39#define loop for(;;)
40
41/*=================================================================*/
42/* CVODE Private Constants */ 35/* CVODE Private Constants */
43/*=================================================================*/ 36/*=================================================================*/
44 37
@@ -1552,7 +1545,7 @@ int CVode(void *cvode_mem, realtype tout, N_Vector yout,
1552 */ 1545 */
1553 1546
1554 nstloc = 0; 1547 nstloc = 0;
1555 loop { 1548 for(;;) {
1556 1549
1557 next_h = h; 1550 next_h = h;
1558 next_q = q; 1551 next_q = q;
@@ -2284,7 +2277,7 @@ static int CVStep(CVodeMem cv_mem)
2284 if ((nst > 0) && (hprime != h)) CVAdjustParams(cv_mem); 2277 if ((nst > 0) && (hprime != h)) CVAdjustParams(cv_mem);
2285 2278
2286 /* Looping point for attempts to take a step */ 2279 /* Looping point for attempts to take a step */
2287 loop { 2280 for(;;) {
2288 2281
2289 CVPredict(cv_mem); 2282 CVPredict(cv_mem);
2290 CVSet(cv_mem); 2283 CVSet(cv_mem);
@@ -2848,7 +2841,7 @@ static int CVNlsFunctional(CVodeMem cv_mem)
2848 2841
2849 /* Loop until convergence; accumulate corrections in acor */ 2842 /* Loop until convergence; accumulate corrections in acor */
2850 2843
2851 loop { 2844 for(;;) {
2852 2845
2853 nni++; 2846 nni++;
2854 2847
@@ -2932,7 +2925,7 @@ static int CVNlsNewton(CVodeMem cv_mem, int nflag)
2932 Evaluate f at the predicted y, call lsetup if indicated, and 2925 Evaluate f at the predicted y, call lsetup if indicated, and
2933 call CVNewtonIteration for the Newton iteration itself. */ 2926 call CVNewtonIteration for the Newton iteration itself. */
2934 2927
2935 loop { 2928 for(;;) {
2936 2929
2937 retval = f(tn, zn[0], ftemp, f_data); 2930 retval = f(tn, zn[0], ftemp, f_data);
2938 nfe++; 2931 nfe++;
@@ -2994,7 +2987,7 @@ static int CVNewtonIteration(CVodeMem cv_mem)
2994 del = delp = ZERO; 2987 del = delp = ZERO;
2995 2988
2996 /* Looping point for Newton iteration */ 2989 /* Looping point for Newton iteration */
2997 loop { 2990 for(;;) {
2998 2991
2999 /* Evaluate the residual of the nonlinear system*/ 2992 /* Evaluate the residual of the nonlinear system*/
3000 N_VLinearSum(rl1, zn[1], ONE, acor, tempv); 2993 N_VLinearSum(rl1, zn[1], ONE, acor, tempv);
@@ -4151,7 +4144,7 @@ static int CVRootfindStd(CVodeMem cv_mem)
4151 /* A sign change was found. Loop to locate nearest root. */ 4144 /* A sign change was found. Loop to locate nearest root. */
4152 4145
4153 side = 0; sideprev = -1; 4146 side = 0; sideprev = -1;
4154 loop { /* Looping point */ 4147 for(;;) { /* Looping point */
4155 4148
4156 /* Set weight alpha. 4149 /* Set weight alpha.
4157 On the first two passes, set alpha = 1. Thereafter, reset alpha 4150 On the first two passes, set alpha = 1. Thereafter, reset alpha
@@ -4663,7 +4656,7 @@ static int CVRootfindExt(CVodeMem cv_mem)
4663 /* A sign change was found. Loop to locate nearest root. */ 4656 /* A sign change was found. Loop to locate nearest root. */
4664 4657
4665 side = 0; sideprev = -1; 4658 side = 0; sideprev = -1;
4666 loop { /* Looping point */ 4659 for(;;) { /* Looping point */
4667 4660
4668 /* Set weight alpha. 4661 /* Set weight alpha.
4669 On the first two passes, set alpha = 1. Thereafter, reset alpha 4662 On the first two passes, set alpha = 1. Thereafter, reset alpha
diff --git a/scilab/modules/scicos/src/scicos_sundials/src/ida/ida.c b/scilab/modules/scicos/src/scicos_sundials/src/ida/ida.c
index a34b074..62eb3b8 100644
--- a/scilab/modules/scicos/src/scicos_sundials/src/ida/ida.c
+++ b/scilab/modules/scicos/src/scicos_sundials/src/ida/ida.c
@@ -90,15 +90,6 @@
90 90
91/* 91/*
92 * ================================================================= 92 * =================================================================
93 * MACRO DEFINITIONS
94 * =================================================================
95 */
96
97/* Macro: loop */
98#define loop for(;;)
99
100/*
101 * =================================================================
102 * IDAS PRIVATE CONSTANTS 93 * IDAS PRIVATE CONSTANTS
103 * ================================================================= 94 * =================================================================
104 */ 95 */
@@ -1431,7 +1422,7 @@ int IDASolve(void *ida_mem, realtype tout, realtype *tret,
1431 1422
1432 /* Looping point for internal steps. */ 1423 /* Looping point for internal steps. */
1433 1424
1434 loop { 1425 for(;;) {
1435 1426
1436 /* Check for too many steps taken. */ 1427 /* Check for too many steps taken. */
1437 1428
@@ -2460,7 +2451,7 @@ static int IDAStep(IDAMem IDA_mem)
2460 2451
2461 /* Looping point for attempts to take a step */ 2452 /* Looping point for attempts to take a step */
2462 2453
2463 loop { 2454 for(;;) {
2464 2455
2465 /*----------------------- 2456 /*-----------------------
2466 Set method coefficients 2457 Set method coefficients
@@ -2651,7 +2642,7 @@ static int IDANls(IDAMem IDA_mem)
2651 /* Begin the main loop. This loop is traversed at most twice. 2642 /* Begin the main loop. This loop is traversed at most twice.
2652 The second pass only occurs when the first pass had a recoverable 2643 The second pass only occurs when the first pass had a recoverable
2653 failure with old Jacobian data */ 2644 failure with old Jacobian data */
2654 loop{ 2645 for(;;){
2655 2646
2656 /* Compute predicted values for yy and yp, and compute residual there. */ 2647 /* Compute predicted values for yy and yp, and compute residual there. */
2657 IDAPredict(IDA_mem); 2648 IDAPredict(IDA_mem);
@@ -2776,7 +2767,7 @@ static int IDANewtonIter(IDAMem IDA_mem)
2776 oldnrm = ZERO; 2767 oldnrm = ZERO;
2777 2768
2778 /* Looping point for Newton iteration. Break out on any error. */ 2769 /* Looping point for Newton iteration. Break out on any error. */
2779 loop { 2770 for(;;) {
2780 2771
2781 nni++; 2772 nni++;
2782 2773
@@ -3479,7 +3470,7 @@ static int IDARootfindStd(IDAMem IDA_mem)
3479 /* A sign change was found. Loop to locate nearest root. */ 3470 /* A sign change was found. Loop to locate nearest root. */
3480 3471
3481 side = 0; sideprev = -1; 3472 side = 0; sideprev = -1;
3482 loop { /* Looping point */ 3473 for(;;) { /* Looping point */
3483 3474
3484 /* Set weight alph. 3475 /* Set weight alph.
3485 On the first two passes, set alph = 1. Thereafter, reset alph 3476 On the first two passes, set alph = 1. Thereafter, reset alph
@@ -3802,7 +3793,7 @@ static int IDARootfindExt(IDAMem IDA_mem)
3802 /* A sign change was found. Loop to locate nearest root. */ 3793 /* A sign change was found. Loop to locate nearest root. */
3803 3794
3804 side = 0; sideprev = -1; 3795 side = 0; sideprev = -1;
3805 loop { /* Looping point */ 3796 for(;;) { /* Looping point */
3806 3797
3807 /* Set weight alph. 3798 /* Set weight alph.
3808 On the first two passes, set alph = 1. Thereafter, reset alph 3799 On the first two passes, set alph = 1. Thereafter, reset alph
diff --git a/scilab/modules/scicos/src/scicos_sundials/src/ida/ida_ic.c b/scilab/modules/scicos/src/scicos_sundials/src/ida/ida_ic.c
index ea5ce55..8534dc0 100644
--- a/scilab/modules/scicos/src/scicos_sundials/src/ida/ida_ic.c
+++ b/scilab/modules/scicos/src/scicos_sundials/src/ida/ida_ic.c
@@ -24,9 +24,6 @@
24/* SUNDIALS EXTENSION */ 24/* SUNDIALS EXTENSION */
25#include "sundials_extension.h" 25#include "sundials_extension.h"
26 26
27/* Macro: loop */
28#define loop for(;;)
29
30/* 27/*
31 * ================================================================= 28 * =================================================================
32 * IDA Constants 29 * IDA Constants
@@ -548,7 +545,7 @@ static int IDALineSrch(IDAMem IDA_mem, realtype *delnorm, realtype *fnorm)
548 545
549 /* Loop on linesearch variable lambda. */ 546 /* Loop on linesearch variable lambda. */
550 547
551 loop { 548 for(;;) {
552 549
553 /* Get new (y,y') = (ynew,ypnew) and norm of new function value. */ 550 /* Get new (y,y') = (ynew,ypnew) and norm of new function value. */
554 IDANewyyp(IDA_mem, lambda); 551 IDANewyyp(IDA_mem, lambda);
diff --git a/scilab/modules/scicos/src/scicos_sundials/src/kinsol/kinsol.c b/scilab/modules/scicos/src/scicos_sundials/src/kinsol/kinsol.c
index 41fe803..95b65a5 100644
--- a/scilab/modules/scicos/src/scicos_sundials/src/kinsol/kinsol.c
+++ b/scilab/modules/scicos/src/scicos_sundials/src/kinsol/kinsol.c
@@ -66,16 +66,6 @@
66 66
67#include "kinsol_impl.h" 67#include "kinsol_impl.h"
68#include <sundials/sundials_math.h> 68#include <sundials/sundials_math.h>
69
70/*
71 * =================================================================
72 * MACRO DEFINITIONS
73 * =================================================================
74 */
75
76/* Macro: loop */
77#define loop for(;;)
78
79/* 69/*
80 * ================================================================= 70 * =================================================================
81 * KINSOL PRIVATE CONSTANTS 71 * KINSOL PRIVATE CONSTANTS
@@ -500,7 +490,7 @@ int KINSol(void *kinmem, N_Vector u, int strategy,
500 490
501 if (inexact_ls && !noMinEps) epsmin = POINT01 * fnormtol; 491 if (inexact_ls && !noMinEps) epsmin = POINT01 * fnormtol;
502 492
503 loop{ 493 for(;;){
504 494
505 retry_nni = FALSE; 495 retry_nni = FALSE;
506 496
@@ -587,7 +577,7 @@ int KINSol(void *kinmem, N_Vector u, int strategy,
587 577
588 fflush(errfp); 578 fflush(errfp);
589 579
590 } /* end of loop; return */ 580 } /* end of for(;;); return */
591 581
592 if (printfl > 0) 582 if (printfl > 0)
593 KINPrintInfo(kin_mem, PRNT_RETVAL, "KINSOL", "KINSol", INFO_RETVAL, ret); 583 KINPrintInfo(kin_mem, PRNT_RETVAL, "KINSOL", "KINSol", INFO_RETVAL, ret);
@@ -974,7 +964,7 @@ static int KINLinSolDrv(KINMem kin_mem)
974 update_fnorm_sub = TRUE; 964 update_fnorm_sub = TRUE;
975 } 965 }
976 966
977 loop{ 967 for(;;){
978 968
979 jacCurrent = FALSE; 969 jacCurrent = FALSE;
980 970
@@ -1255,7 +1245,7 @@ static int KINLineSearch(KINMem kin_mem, realtype *fnormp, realtype *f1normp,
1255 1245
1256 /* Loop until the ALPHA condition is satisfied. Terminate if rl becomes too small */ 1246 /* Loop until the ALPHA condition is satisfied. Terminate if rl becomes too small */
1257 1247
1258 loop { 1248 for(;;) {
1259 1249
1260 /* Evaluate test quantity */ 1250 /* Evaluate test quantity */
1261 1251
diff --git a/scilab/modules/umfpack/src/c/taucs_scilab.c b/scilab/modules/umfpack/src/c/taucs_scilab.c
index 5ba56c0..f39dbb6 100644
--- a/scilab/modules/umfpack/src/c/taucs_scilab.c
+++ b/scilab/modules/umfpack/src/c/taucs_scilab.c
@@ -256,7 +256,7 @@ taucs_ccs_create(int m, int n, int nnz)
256 sciprint(_("%s: No more memory.\n"),"taucs_ccs_create"); 256 sciprint(_("%s: No more memory.\n"),"taucs_ccs_create");
257 return NULL; 257 return NULL;
258 } 258 }
259 matrix->flags = 0;; 259 matrix->flags = 0;
260 matrix->n = n; 260 matrix->n = n;
261 matrix->m = m; 261 matrix->m = m;
262 matrix->colptr = (int*) MALLOC((n+1) * sizeof(int)); 262 matrix->colptr = (int*) MALLOC((n+1) * sizeof(int));