From 0399b0a22f7b9c8441988cb61b41388ef3fb8464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich@dune-project.org> Date: Sat, 20 Dec 2014 09:58:55 +0100 Subject: [PATCH] Use C++'s bool, true and false instead of macros BOOL, TRUE, FALSE. --- dev/xif/xmain.cc | 12 +- dom/lgm/ansys2lgm.cc | 60 +++--- dom/std/std_domain.cc | 6 +- gm/GenerateRules.cc | 2 +- gm/algebra.cc | 102 ++++----- gm/cw.cc | 28 +-- gm/enrol.cc | 4 +- gm/er.cc | 54 ++--- gm/gg2/ggmain.cc | 20 +- gm/gm.h | 2 +- gm/refine.cc | 64 +++--- gm/shapes.cc | 6 +- gm/smooth.cc | 32 +-- gm/ugio.cc | 16 +- gm/ugm.cc | 68 +++--- gm/ugm.h | 4 +- graphics/uggraph/wop.cc | 118 +++++------ graphics/uggraph/wpm.cc | 10 +- low/debug.h | 6 +- low/defaults.cc | 6 +- low/fileopen.cc | 24 +-- low/heaps.cc | 28 +-- low/heaps.h | 4 +- low/misc.h | 2 +- low/ugenv.h | 2 +- low/ugstruct.cc | 2 +- low/ugtypes.h | 4 - np/algebra/amgtools.cc | 4 +- np/algebra/ff.cc | 20 +- np/algebra/ff_gen.cc | 14 +- np/algebra/ff_gen.h | 4 +- np/algebra/fvgeom.cc | 8 +- np/algebra/transgrid.cc | 6 +- np/algebra/ugiter.cc | 76 +++---- np/field/stoch.cc | 18 +- np/procs/assemble.cc | 2 +- np/procs/bdf.cc | 4 +- np/procs/enewton.cc | 4 +- np/procs/fas.cc | 4 +- np/procs/freebnd.cc | 2 +- np/procs/iter.cc | 26 +-- np/procs/ls.cc | 2 +- np/procs/newton.cc | 10 +- np/procs/order.cc | 4 +- np/procs/transfer.cc | 6 +- np/udm/disctools.cc | 16 +- np/udm/disctools.h | 2 +- np/udm/formats.cc | 22 +- np/udm/npscan.cc | 4 +- np/udm/pcr.cc | 10 +- np/udm/udm.cc | 12 +- np/udm/udm.h | 6 +- parallel/ddd/basic/lowcomm.cc | 8 +- parallel/ddd/basic/oopp.h | 15 -- parallel/ddd/basic/ooppcc.h | 14 +- parallel/ddd/basic/topo.cc | 6 +- parallel/ddd/dddi.h | 15 +- parallel/ddd/ident/ident.cc | 18 +- parallel/ddd/if/ifcreate.cc | 4 +- parallel/ddd/if/ifobjsc.cc | 4 +- parallel/ddd/join/join.cc | 4 +- parallel/ddd/mgr/prio.cc | 12 +- parallel/ddd/mgr/typemgr.cc | 40 ++-- parallel/ddd/prio/pcmds.cc | 4 +- parallel/ddd/xfer/cmds.cc | 16 +- parallel/ddd/xfer/unpack.cc | 10 +- parallel/ddd/xfer/xfer.cc | 6 +- parallel/dddif/debugger.cc | 6 +- parallel/dddif/handler.cc | 8 +- parallel/dddif/initddd.cc | 20 +- parallel/dddif/overlap.cc | 2 +- parallel/ppif/MPI/ppif.cc | 30 +-- tools/xugv.cc | 8 +- ui/cmdint.cc | 66 +++--- ui/commands.cc | 382 +++++++++++++++++----------------- ui/helpmsg.cc | 10 +- ui/uginterface.cc | 14 +- 77 files changed, 830 insertions(+), 864 deletions(-) diff --git a/dev/xif/xmain.cc b/dev/xif/xmain.cc index e5085dcb2..668daa37c 100644 --- a/dev/xif/xmain.cc +++ b/dev/xif/xmain.cc @@ -157,7 +157,7 @@ INT NS_PREFIX GetScreenSize (INT size[2]) size[0] = display_width; size[1] = display_height; - return (TRUE); + return (true); } /****************************************************************************/ @@ -344,7 +344,7 @@ static INT GetNextUGEvent_XUI (EVENT *theEvent, INT Eventmask) #ifdef USE_XAW flag=XtDispatchEvent(&report); IFDEBUG(dev,DBG_LEVEL) - if (flag==FALSE) { + if (flag==false) { PRINTDEBUG(dev,DBG_LEVEL,("XtDispatchEvent(): NO handler for this event found\n")); } else { @@ -431,7 +431,7 @@ static INT GetNextUGEvent_XUI (EVENT *theEvent, INT Eventmask) report.xbutton.button == Button3 ) { CursorPos = XawTextGetInsertionPoint(shell.wid); - XawTextDisplayCaret(shell.wid,FALSE); + XawTextDisplayCaret(shell.wid,false); if (report.xbutton.button == Button3) XawTextSetInsertionPoint(shell.wid,CutBeginPos); } @@ -532,7 +532,7 @@ static INT GetNextUGEvent_XUI (EVENT *theEvent, INT Eventmask) /* Send all events to shell widget */ flag=XtDispatchEvent(&report); IFDEBUG(dev,DBG_LEVEL) - if (flag==FALSE) { + if (flag==false) { PRINTDEBUG(dev,DBG_LEVEL,("XtDispatchEvent(): NO handler for this event found\n")); } else { @@ -552,7 +552,7 @@ static INT GetNextUGEvent_XUI (EVENT *theEvent, INT Eventmask) report.xbutton.button == Button3 ) { XawTextSetInsertionPoint(shell.wid,CursorPos); - XawTextDisplayCaret(shell.wid,TRUE); + XawTextDisplayCaret(shell.wid,true); } } break; @@ -674,7 +674,7 @@ OUTPUTDEVICE * NS_PREFIX InitScreen (int *argcp, char **argv, INT *error) /* set input focus to true, due to problems with some window manager implemtations, DEC, LINUX, SUN */ n=0; - XtSetArg(args[n], XtNinput, TRUE); n++; + XtSetArg(args[n], XtNinput, true); n++; toplevel = XtAppInitialize (&context, "Xug3", (XrmOptionDescRec*)NULL, 0, diff --git a/dom/lgm/ansys2lgm.cc b/dom/lgm/ansys2lgm.cc index 5a9f586f5..11fb0fea1 100644 --- a/dom/lgm/ansys2lgm.cc +++ b/dom/lgm/ansys2lgm.cc @@ -611,7 +611,7 @@ int SurfaceLoadFct(INT sz,INT *statistik, INT *condition_array,BND_SFE_TYP *bnds BND_SFE_SIDEID((&(bndseg_array[help])))=(INT)(strtol(s,&endp,10)); /* mark element in elemflag_array : */ - elemflag_array[BND_SFE_ELEMENTID((&(bndseg_array[help])))] = TRUE; + elemflag_array[BND_SFE_ELEMENTID((&(bndseg_array[help])))] = true; do endp++; @@ -673,24 +673,24 @@ int SurfaceLoadFct(INT sz,INT *statistik, INT *condition_array,BND_SFE_TYP *bnds switch(w) { case 1 : /*ijk012*/ - nodeflag_array[el_array[u]]=TRUE; - nodeflag_array[el_array[1+u]]=TRUE; - nodeflag_array[el_array[2+u]]=TRUE; + nodeflag_array[el_array[u]]=true; + nodeflag_array[el_array[1+u]]=true; + nodeflag_array[el_array[2+u]]=true; break; case 2 : /*ijl013*/ - nodeflag_array[el_array[u]]=TRUE; - nodeflag_array[el_array[1+u]]=TRUE; - nodeflag_array[el_array[3+u]]=TRUE; + nodeflag_array[el_array[u]]=true; + nodeflag_array[el_array[1+u]]=true; + nodeflag_array[el_array[3+u]]=true; break; case 3 : /*jkl123*/ - nodeflag_array[el_array[1+u]]=TRUE; - nodeflag_array[el_array[2+u]]=TRUE; - nodeflag_array[el_array[3+u]]=TRUE; + nodeflag_array[el_array[1+u]]=true; + nodeflag_array[el_array[2+u]]=true; + nodeflag_array[el_array[3+u]]=true; break; case 4 : /*ikl023*/ - nodeflag_array[el_array[u]]=TRUE; - nodeflag_array[el_array[2+u]]=TRUE; - nodeflag_array[el_array[3+u]]=TRUE; + nodeflag_array[el_array[u]]=true; + nodeflag_array[el_array[2+u]]=true; + nodeflag_array[el_array[3+u]]=true; } return(0); @@ -1590,7 +1590,7 @@ INT NextGoodPrimeNumber(INT *TheNumber) /*vermutlich schnellere Alternative : SAtz des Eratostenes siehe DTV-Atlas der Mathematik von C Wrobel Prinzip : Man beginnt mit einem boolschen Feld, das bei allen Zahlen - auf TRUE- gesetzt ist . Anschliessend streicht mal (beginnend von klein nach + auf true- gesetzt ist . Anschliessend streicht mal (beginnend von klein nach gross die Vielfachen von Primzahel aus (False)*/ @@ -7567,7 +7567,7 @@ INT FindElNeighbours(INT ne) /*concerning <-1 * Vorkommanzahl der zugewiesenen CADLastzahl> see ReadAnsysFile*/ { - gefunden = FALSE; /*noch keinen Nachbar gefunden*/ + gefunden = false; /*noch keinen Nachbar gefunden*/ switch(nbijkl) { /*TODO : Die nunfolgende Fallunterscheidung realisiert die UG-Reihenfolge fuer @@ -7596,25 +7596,25 @@ INT FindElNeighbours(INT ne) a = el_array[realelind + kna]; elaindex = NUOFCLMS * a; ela = node_element_matrix[elaindex]; /*first element of node a*/ - while ((ela != 0) && (gefunden == FALSE)) + while ((ela != 0) && (gefunden == false)) { if(ela != elind) { b = el_array[realelind + knb]; elbindex = NUOFCLMS * b; elb = node_element_matrix[elbindex]; /*first element of node b*/ - while ((elb != 0) && (gefunden == FALSE)) + while ((elb != 0) && (gefunden == false)) { if(ela == elb) { c = el_array[realelind + knc]; elcindex = NUOFCLMS * c; elc = node_element_matrix[elcindex]; /*first element of node c*/ - while ((elc != 0) && (gefunden == FALSE)) + while ((elc != 0) && (gefunden == false)) { if(elb == elc) { - gefunden = TRUE; /*neighbour found*/ + gefunden = true; /*neighbour found*/ el_array[realelemsurf] = elc; /* forward connenction */ elgefstartindex = 8 * elc; /*the four nodes of the found element: ...*/ @@ -7622,7 +7622,7 @@ INT FindElNeighbours(INT ne) n[1] = el_array[elgefstartindex+1]; n[2] = el_array[elgefstartindex+2]; n[3] = el_array[elgefstartindex+3]; - indexn = -1; found = FALSE; + indexn = -1; found = false; /*Welcher der 4 Knoten des gef. Tetraeders ist nicht betroffen*/ do { @@ -7630,7 +7630,7 @@ INT FindElNeighbours(INT ne) /* a,b,c : die 3 KnotenIDs der Sideflaeche, die hier betroffen ist*/ if( (n[indexn] != a) && (n[indexn] != b) && - (n[indexn] != c) ) found =TRUE; + (n[indexn] != c) ) found =true; } while(found == 0); switch (indexn) /*indexn is misser!*/ { @@ -7648,24 +7648,24 @@ INT FindElNeighbours(INT ne) elcindex++; elc = node_element_matrix[elcindex]; /*next element of node c*/ } - } /*"while ((elc != 0) && (gefunden == FALSE))"*/ + } /*"while ((elc != 0) && (gefunden == false))"*/ } /*"if(ela == elb)"*/ - if(gefunden == FALSE) + if(gefunden == false) { elbindex++; elb = node_element_matrix[elbindex]; /*next element of node a*/ } - } /*"while ((elb != 0) && (gefunden == FALSE))"*/ + } /*"while ((elb != 0) && (gefunden == false))"*/ } /*"if(ela != elind)"*/ - if(gefunden == FALSE) + if(gefunden == false) { elaindex++; ela = node_element_matrix[elaindex]; /*next element of node a*/ } - } /*"while ((ela != 0) && (gefunden == FALSE))"*/ + } /*"while ((ela != 0) && (gefunden == false))"*/ /*wenn kein Nachbar geunden wurde . . .*/ - if(found != TRUE) + if(found != true) { PrintErrorMessage('E',"FindElNeighbours","no neighbour found"); return(1); @@ -7712,15 +7712,15 @@ int FetchATetrahedronOfThisSbd(SD_TYP *sbd) lff = 12; /*da kommt der erste Nachbareintrag des ersten Elements*/ maxwert = (statistik[6] * 8) + 8; - gefunde = FALSE; - while((gefunde == FALSE)&&(lff < maxwert)) + gefunde = false; + while((gefunde == false)&&(lff < maxwert)) { for (i=0; i<4; i++) { /* DIRKS NEU, sbd_name oben mit bisherige_ID_array modifiziert da el_array CAD IDs hat*/ if(sbd_name == el_array[lff]) { - gefunde = TRUE; + gefunde = true; gefTetraederelementID = lff / 8; /* DIV !!!*/ return(gefTetraederelementID); } diff --git a/dom/std/std_domain.cc b/dom/std/std_domain.cc index ab9d8b918..7ae4e8a71 100644 --- a/dom/std/std_domain.cc +++ b/dom/std/std_domain.cc @@ -457,7 +457,7 @@ RemoveDomain (const char *name) { ENVITEM* d = SearchEnv (name, "/Domains", theDomainDirID, theDomainDirID); if (d!=0) { - d->v.locked = FALSE; + d->v.locked = false; RemoveEnvDir(d); } } @@ -1633,7 +1633,7 @@ BVP_Init (const char *name, HEAP * Heap, MESH * Mesh, INT MarkKey) UserWriteF("Too many parts for control entry in vector\n"); UserWriteF("Domain requests %d parts, but only %d are possible!\n", DOMAIN_NPARTS (theDomain), (1 << VPART_LEN)); - ASSERT (FALSE); + ASSERT (false); return (NULL); } @@ -4008,7 +4008,7 @@ BNDP_Move (BNDP * aBndP, const DOUBLE global[]) #ifdef ModelP /* TODO: parallel version */ PrintErrorMessage ('E', "BNDP_Move", "parallel not implemented"); - ASSERT (FALSE); + ASSERT (false); #endif ps = (BND_PS *) aBndP; diff --git a/gm/GenerateRules.cc b/gm/GenerateRules.cc index 865575ef5..107b09efa 100644 --- a/gm/GenerateRules.cc +++ b/gm/GenerateRules.cc @@ -89,7 +89,7 @@ static int nRules; /* total number static int FirstRuleWithEdgePattern; /* Rule no. of first of several SidePatterns */ static REFRULE *RuleList; /* list is allocated in main program */ static SHORT *PatternToRefrule; /* vector is allocated in main program */ -static int Output; /* if TRUE output of generated rules */ +static int Output; /* if true output of generated rules */ /* prototype for new rules without any data */ static REFRULE EmptyRule = diff --git a/gm/algebra.cc b/gm/algebra.cc index 8ed9c7167..027f61d85 100644 --- a/gm/algebra.cc +++ b/gm/algebra.cc @@ -495,7 +495,7 @@ BLOCKVECTOR *NS_DIM_PREFIX FindBV( const GRID *grid, const BV_DESC *bvd, const B nr = BVD_READ_NEXT_ENTRY( ©_bvd, bvdf ); /* search trough all blockvector levels defined in bvd */ - while ( TRUE ) + while ( true ) { while ( BVNUMBER(bv) != nr ) /* search block with number nr in block list*/ { @@ -2960,7 +2960,7 @@ INT NS_DIM_PREFIX CreateAlgebra (MULTIGRID *theMG) INT side,i; - if (MG_COARSE_FIXED(theMG) == FALSE) { + if (MG_COARSE_FIXED(theMG) == false) { for (i=0; i<=TOPLEVEL(theMG); i++) { g = GRID_ON_LEVEL(theMG,i); @@ -3081,7 +3081,7 @@ INT NS_DIM_PREFIX CreateAlgebra (MULTIGRID *theMG) } } #endif - MG_COARSE_FIXED(theMG) = TRUE; + MG_COARSE_FIXED(theMG) = true; /* now connections */ if (MGCreateConnection(theMG)) @@ -4675,8 +4675,8 @@ static int MatrixCompare (MATRIX **MatHandle1, MATRIX **MatHandle2) * @param theGrid - grid level * @param order - hierarchie of ordering directions (x,y[,z]) * @param sign - signs for the directions - * @param SpecSkipVecs - if TRUE: GM_PUT_AT_BEGIN or GM_PUT_AT_END of vectors with skip TRUE - * @param AlsoOrderMatrices - if TRUE order matrices in the same sense + * @param SpecSkipVecs - if true: GM_PUT_AT_BEGIN or GM_PUT_AT_END of vectors with skip true + * @param AlsoOrderMatrices - if true order matrices in the same sense This function orders the vectors of one level lexicographically. It has the complexity of qsort which is n*log(n). @@ -4975,7 +4975,7 @@ static INT OrderMatrices (VECTOR *vec, INT Sense) qsort(MatList,nm,sizeof(MATRIX*),(int (*)(const void *, const void *))SensCompare); /* find 'begin */ - flag = FALSE; + flag = false; for (start=0; start<nm; start++) { nbv = MDEST(MatList[start]); @@ -4984,7 +4984,7 @@ static INT OrderMatrices (VECTOR *vec, INT Sense) if (flag && !condition1) break; else if (condition2) - flag = TRUE; + flag = true; } /* establish pointer connections */ @@ -5080,7 +5080,7 @@ INT NS_DIM_PREFIX ShellOrderVectors (GRID *theGrid, VECTOR *seed) PARAMETERS: * @param theGrid - pointer to grid * @param mode - * @param putSkipFirst - if TRUE put vectors with a skip pattern larger than SkipPat to begin of list + * @param putSkipFirst - if true put vectors with a skip pattern larger than SkipPat to begin of list . skipPat - s.a. DESCRIPTION: @@ -5194,7 +5194,7 @@ static INT OrderVectorAlgebraic (GRID *theGrid, INT mode, INT putSkipFirst, INT HEAP *theHeap; #ifdef ModelP - ASSERT(FALSE); /* see TODO below */ + ASSERT(false); /* see TODO below */ #endif /********************************************************************/ @@ -5561,7 +5561,7 @@ static INT OrderVectorAlgebraic (GRID *theGrid, INT mode, INT putSkipFirst, INT * @param theMG - multigrid to order * @param levels - GM_ALL_LEVELS or GM_CURRENT_LEVEL * @param mode - GM_FCFCLL or GM_FFCCLL (see orderv command) - * @param PutSkipFirst - if TRUE put vectors with a skip pattern larger than SkipPat to begin of list + * @param PutSkipFirst - if true put vectors with a skip pattern larger than SkipPat to begin of list * @param SkipPat - s.a. * @param dependency - name of user defined dependency item * @param dep_options - options for user dependency function @@ -5804,7 +5804,7 @@ static INT LineOrderVectorsAlgebraic (GRID *theGrid, INT verboselevel) INT MarkKey; #ifdef ModelP - ASSERT(FALSE); /* see TODO below */ + ASSERT(false); /* see TODO below */ #endif gen_label[GM_GEN_FIRST] = 'F'; @@ -6335,8 +6335,8 @@ INT NS_DIM_PREFIX PrepareForLineorderVectors (GRID *theGrid) for (vec=FIRSTVECTOR(theGrid); vec!=NULL; vec=SUCCVC(vec)) { - SETVCUSED(vec,FALSE); - SETVCFLAG(vec,FALSE); + SETVCUSED(vec,false); + SETVCFLAG(vec,false); } return (0); @@ -6370,8 +6370,8 @@ INT NS_DIM_PREFIX MarkBeginEndForLineorderVectors (ELEMENT *elem, INT dt, INT ot for (i=0; i<cnt; i++) switch (mark[i]) { - case GM_LOV_BEGIN : SETVCUSED(vList[i],TRUE); - case GM_LOV_END : SETVCFLAG(vList[i],TRUE); + case GM_LOV_BEGIN : SETVCUSED(vList[i],true); + case GM_LOV_END : SETVCFLAG(vList[i],true); } return (0); @@ -6461,45 +6461,45 @@ static INT LexAlgDep (GRID *theGrid, const char *data) #endif return(1); } - error = xused = yused = zused = FALSE; + error = xused = yused = zused = false; for (i=0; i<DIM; i++) switch (ord[i]) { case 'r' : - if (xused) error = TRUE; - xused = TRUE; + if (xused) error = true; + xused = true; Order[i] = _X_; Sign[i] = 1; break; case 'l' : - if (xused) error = TRUE; - xused = TRUE; + if (xused) error = true; + xused = true; Order[i] = _X_; Sign[i] = -1; break; #ifdef __TWODIM__ case 'u' : - if (yused) error = TRUE; - yused = TRUE; + if (yused) error = true; + yused = true; Order[i] = _Y_; Sign[i] = 1; break; case 'd' : - if (yused) error = TRUE; - yused = TRUE; + if (yused) error = true; + yused = true; Order[i] = _Y_; Sign[i] = -1; break; #else case 'b' : - if (yused) error = TRUE; - yused = TRUE; + if (yused) error = true; + yused = true; Order[i] = _Y_; Sign[i] = 1; break; case 'f' : - if (yused) error = TRUE; - yused = TRUE; + if (yused) error = true; + yused = true; Order[i] = _Y_; Sign[i] = -1; break; case 'u' : - if (zused) error = TRUE; - zused = TRUE; + if (zused) error = true; + zused = true; Order[i] = _Z_; Sign[i] = 1; break; case 'd' : - if (zused) error = TRUE; - zused = TRUE; + if (zused) error = true; + zused = true; Order[i] = _Z_; Sign[i] = -1; break; #endif } @@ -6510,7 +6510,7 @@ static INT LexAlgDep (GRID *theGrid, const char *data) } /* treat vectors with skipflag set specially? */ - SpecialTreatSkipVecs = FALSE; + SpecialTreatSkipVecs = false; if (strchr(data,'<')!=NULL) SpecialTreatSkipVecs = GM_PUT_AT_BEGIN; else if (strchr(data,'>')!=NULL) @@ -6630,45 +6630,45 @@ static INT StrongLexAlgDep (GRID *theGrid, const char *data) #endif return(1); } - error = xused = yused = zused = FALSE; + error = xused = yused = zused = false; for (i=0; i<DIM; i++) switch (ord[i]) { case 'r' : - if (xused) error = TRUE; - xused = TRUE; + if (xused) error = true; + xused = true; Order[i] = _X_; Sign[i] = 1; break; case 'l' : - if (xused) error = TRUE; - xused = TRUE; + if (xused) error = true; + xused = true; Order[i] = _X_; Sign[i] = -1; break; #ifdef __TWODIM__ case 'u' : - if (yused) error = TRUE; - yused = TRUE; + if (yused) error = true; + yused = true; Order[i] = _Y_; Sign[i] = 1; break; case 'd' : - if (yused) error = TRUE; - yused = TRUE; + if (yused) error = true; + yused = true; Order[i] = _Y_; Sign[i] = -1; break; #else case 'b' : - if (yused) error = TRUE; - yused = TRUE; + if (yused) error = true; + yused = true; Order[i] = _Y_; Sign[i] = 1; break; case 'f' : - if (yused) error = TRUE; - yused = TRUE; + if (yused) error = true; + yused = true; Order[i] = _Y_; Sign[i] = -1; break; case 'u' : - if (zused) error = TRUE; - zused = TRUE; + if (zused) error = true; + zused = true; Order[i] = _Z_; Sign[i] = 1; break; case 'd' : - if (zused) error = TRUE; - zused = TRUE; + if (zused) error = true; + zused = true; Order[i] = _Z_; Sign[i] = -1; break; #endif } @@ -6679,7 +6679,7 @@ static INT StrongLexAlgDep (GRID *theGrid, const char *data) } /* treat vectors with skipflag set specially? */ - SpecialTreatSkipVecs = FALSE; + SpecialTreatSkipVecs = false; if (strchr(data,'<')!=NULL) SpecialTreatSkipVecs = GM_PUT_AT_BEGIN; else if (strchr(data,'>')!=NULL) diff --git a/gm/cw.cc b/gm/cw.cc index c7642fcd2..aaceba47e 100644 --- a/gm/cw.cc +++ b/gm/cw.cc @@ -286,7 +286,7 @@ void NS_DIM_PREFIX ListCWofObject (const void *obj, INT offset) sub = min; last_ce = ce; } - while (TRUE); + while (true); ASSERT(sub>=0); } @@ -337,7 +337,7 @@ void NS_DIM_PREFIX ListAllCWsOfObject (const void *obj) sub = min; last_cw = cw; } - while (TRUE); + while (true); ASSERT(sub>=0); } @@ -393,7 +393,7 @@ static void ListCWofObjectType (INT objt, INT offset, PrintfProcPtr myprintf) sub = min; last_ce = ce; } - while (TRUE); + while (true); if (sub==-1) myprintf(" --- no ce found with objt %d\n",objt); @@ -444,7 +444,7 @@ static void ListAllCWsOfObjectType (INT objt, PrintfProcPtr myprintf) sub = min; last_cw = cw; } - while (TRUE); + while (true); if (sub==-1) printf(" --- no cw found with objt %d\n",objt); @@ -519,7 +519,7 @@ static INT InitPredefinedControlWords (void) if (nused!=GM_N_CW) { printf("InitPredefinedControlWords: nused=%d != GM_N_CW=%d\n",nused,GM_N_CW); - assert(FALSE); + assert(false); } return (GM_OK); @@ -631,7 +631,7 @@ static INT InitPredefinedControlEntries (void) if (nused!=REFINE_N_CE) { printf("InitPredefinedControlEntries: nused=%d != REFINE_N_CE=%d\n",nused,REFINE_N_CE); - assert(FALSE); + assert(false); } return (GM_OK); @@ -773,7 +773,7 @@ UINT NS_DIM_PREFIX ReadCW (const void *obj, INT ceID) if ((ceID<0) || (ceID>=MAX_CONTROL_ENTRIES)) { printf("ReadCW: ceID=%d out of range\n",ceID); - assert(FALSE); + assert(false); } /* update statistics */ @@ -784,7 +784,7 @@ UINT NS_DIM_PREFIX ReadCW (const void *obj, INT ceID) if (!ce->used) { printf("ReadCW: ceID=%d unused\n",ceID); - assert(FALSE); + assert(false); } cw_objt = BITWISE_TYPE(OBJT(obj)); @@ -794,7 +794,7 @@ UINT NS_DIM_PREFIX ReadCW (const void *obj, INT ceID) printf("ReadCW: invalid objt %d for ce %s\n",OBJT(obj),ce->name); else printf("ReadCW: invalid objt %d for ce %d\n",OBJT(obj),ceID); - assert(FALSE); + assert(false); } off_in_wrd = ce->offset_in_word; @@ -846,7 +846,7 @@ void NS_DIM_PREFIX WriteCW (void *obj, INT ceID, INT n) if ((ceID<0) || (ceID>=MAX_CONTROL_ENTRIES)) { printf("WriteCW: ceID=%d out of range\n",ceID); - assert(FALSE); + assert(false); } /* update statistics */ @@ -858,7 +858,7 @@ void NS_DIM_PREFIX WriteCW (void *obj, INT ceID, INT n) if (!ce->used) { printf("WriteCW: ceID=%d unused\n",ceID); - assert(FALSE); + assert(false); } cw_objt = BITWISE_TYPE(OBJT(obj)); @@ -873,7 +873,7 @@ void NS_DIM_PREFIX WriteCW (void *obj, INT ceID, INT n) printf("WriteCW: objt 0 but %s rather than expected SETOBJT access\n",ce->name); else printf("WriteCW: objt 0 but %d rather than expected SETOBJT access\n",ceID); - assert(FALSE); + assert(false); } } else if (!(cw_objt & ce->objt_used)) @@ -882,7 +882,7 @@ void NS_DIM_PREFIX WriteCW (void *obj, INT ceID, INT n) printf("WriteCW: invalid objt %d for ce %s\n",OBJT(obj),ce->name); else printf("WriteCW: invalid objt %d for ce %d\n",OBJT(obj),ceID); - assert(FALSE); + assert(false); } off_in_wrd = ce->offset_in_word; @@ -901,7 +901,7 @@ void NS_DIM_PREFIX WriteCW (void *obj, INT ceID, INT n) else printf("WriteCW: value=%d exceeds max=%d for %d\n", n,POW2(ce->length)-1,ceID); - assert(FALSE); + assert(false); } j = j & mask; diff --git a/gm/enrol.cc b/gm/enrol.cc index 2659a126e..b2148b9cf 100644 --- a/gm/enrol.cc +++ b/gm/enrol.cc @@ -336,14 +336,14 @@ FORMAT * NS_DIM_PREFIX CreateFormat (char *name, INT sVertex, INT sMultiGrid, #endif /* derive additional information */ - for (i=0; i<MAXVOBJECTS; i++) FMT_USES_OBJ(fmt,i) = FALSE; + for (i=0; i<MAXVOBJECTS; i++) FMT_USES_OBJ(fmt,i) = false; FMT_MAX_PART(fmt) = 0; MaxType = 0; for (i=0; i<MAXDOMPARTS; i++) for (j=0; j<MAXVOBJECTS; j++) if (po2t[i][j]!=NOVTYPE) { - FMT_USES_OBJ(fmt,j) = TRUE; + FMT_USES_OBJ(fmt,j) = true; FMT_MAX_PART(fmt) = MAX(FMT_MAX_PART(fmt),i); MaxType = MAX(MaxType,po2t[i][j]); } diff --git a/gm/er.cc b/gm/er.cc index 22bdf6942..7f1c3f259 100644 --- a/gm/er.cc +++ b/gm/er.cc @@ -155,7 +155,7 @@ enum ER_DBG { (int)ns #ifdef Debug -#define PD_ERR(l,x,e) {PRINTDEBUG(gm,l,x); e++; /* ASSERT(FALSE);*/} +#define PD_ERR(l,x,e) {PRINTDEBUG(gm,l,x); e++; /* ASSERT(false);*/} #define PD(x) {PrintDebug x;} #else #define PD_ERR(l,x,e) /* no debug */ @@ -667,7 +667,7 @@ static INT RuleCompare (int id, const URULE *ur, const ERULE *er) if (nco0==nco1) { - int corners_match = TRUE; + int corners_match = true; int i; for (i=0; i<nco0; i++) @@ -683,7 +683,7 @@ static INT RuleCompare (int id, const URULE *ur, const ERULE *er) break; if (j>=nco1) { - corners_match = FALSE; + corners_match = false; break; } } @@ -811,7 +811,7 @@ static int CountIFElements (DDD_OBJ obj) if (HAS_NO_RULE(elem)) { - SETTHEFLAG(elem,TRUE); + SETTHEFLAG(elem,true); ASSERT(global.if_elems<MAX_IFID); @@ -820,7 +820,7 @@ static int CountIFElements (DDD_OBJ obj) } else { - SETTHEFLAG(elem,FALSE); + SETTHEFLAG(elem,false); } return (0); @@ -1039,7 +1039,7 @@ static int ExtractInterfaceERule (DDD_OBJ obj) ENDDEBUG } - SETUSED(elem,TRUE); + SETUSED(elem,true); return (0); } @@ -1175,7 +1175,7 @@ static INT ExtractRules (MULTIGRID *mg) /* TODO (HRR 971211): don't include TOPLEVEL (no elem refined there) */ for (l=0; l<=TOPLEVEL(mg); l++) for (elem=FIRSTELEMENT(GRID_ON_LEVEL(mg,l)); elem!=NULL; elem=SUCCE(elem)) - SETUSED(elem,FALSE); + SETUSED(elem,false); if (ExtractInterfaceRules(mg)) REP_ERR_RETURN(1); #endif @@ -1393,7 +1393,7 @@ static INT GetFSidesOfCorners (int tag, int n, SHORT corners[MAX_CORNERS_OF_SIDE for (co=0; co<n; co++) for (side=0; side<soe; side++) - corner_on_side[co][side] = FALSE; + corner_on_side[co][side] = false; for (co=0; co<n; co++) if (corners[co]==coe+CENTER_NODE_INDEX_TAG(tag)) @@ -1408,7 +1408,7 @@ static INT GetFSidesOfCorners (int tag, int n, SHORT corners[MAX_CORNERS_OF_SIDE for (side=0; side<soe; side++) if (CORNER_OF_SIDE_INV_TAG(tag,side,fco)>=0) - corner_on_side[co][side] = TRUE; + corner_on_side[co][side] = true; } else if (corners[co]<(coe+eoe)) { @@ -1416,14 +1416,14 @@ static INT GetFSidesOfCorners (int tag, int n, SHORT corners[MAX_CORNERS_OF_SIDE int ed = corners[co]-coe; #ifdef __TWODIM__ - corner_on_side[co][ed] = TRUE; + corner_on_side[co][ed] = true; #else int i; for (i=0; i<MAX_SIDES_OF_EDGE; i++) { int sd = SIDE_WITH_EDGE_TAG(tag,ed,i); if (sd>=0) - corner_on_side[co][sd] = TRUE; + corner_on_side[co][sd] = true; } #endif } @@ -1432,11 +1432,11 @@ static INT GetFSidesOfCorners (int tag, int n, SHORT corners[MAX_CORNERS_OF_SIDE { /* side mid */ int sd = corners[co]-(coe+eoe); - corner_on_side[co][sd] = TRUE; + corner_on_side[co][sd] = true; } #endif else - ASSERT(FALSE); /* Huh??? */ + ASSERT(false); /* Huh??? */ return (YES); } @@ -1547,13 +1547,13 @@ static INT SidesMatch (int nsco, SHORT sco0[], SHORT sco1[]) /* try each permutation of first with reverse order of second */ for (i=0; i<nsco; i++) { - int match = TRUE; + int match = true; int j; for (j=0; j<nsco; j++) if (sco0[(i+j)%nsco]!=sco1[nsco-j-1]) { - match = FALSE; + match = false; break; } if (match) @@ -1860,18 +1860,18 @@ static void CheckMRules (MULTIGRID *mg, INT RefRuleOffset[], MGIO_RR_RULE *mrule ELEMENT *elem; int l; int max_path_depth = 0; - int use_bug_in_rule = TRUE; + int use_bug_in_rule = true; short *bug_in_rule[TAGS]; INT MarkKey; int tg; if (MarkTmpMem(global.heap,&MarkKey)) - use_bug_in_rule = FALSE; + use_bug_in_rule = false; else { bug_in_rule[0] = (short*) GetTmpMem(global.heap,global.maxrules*sizeof(short),MarkKey); if (bug_in_rule[0]==NULL) - use_bug_in_rule = FALSE; + use_bug_in_rule = false; else { int t,i; @@ -1879,7 +1879,7 @@ static void CheckMRules (MULTIGRID *mg, INT RefRuleOffset[], MGIO_RR_RULE *mrule { bug_in_rule[t] = bug_in_rule[0] + RefRuleOffset[t]; for (i=0; i<global.maxrule[t]; i++) - bug_in_rule[t][i] = FALSE; + bug_in_rule[t][i] = false; } } } @@ -1891,7 +1891,7 @@ static void CheckMRules (MULTIGRID *mg, INT RefRuleOffset[], MGIO_RR_RULE *mrule for (i=0; i<global.maxrule[tg]; i++) if (CheckNBrelations(mrules+RefRuleOffset[tg]+i,i,tg)) if (use_bug_in_rule) - bug_in_rule[tg][i] = TRUE; + bug_in_rule[tg][i] = true; } for (l=0; l<TOPLEVEL(mg); l++) @@ -1917,7 +1917,7 @@ static void CheckMRules (MULTIGRID *mg, INT RefRuleOffset[], MGIO_RR_RULE *mrule PD_ERR(ER_DBG_RULE_VERBOSE,("ERROR in CheckMRules, elem %ld: NSONS(elem)!=mr->nsons\n",id),error); if (GetNodeContext(elem,nodes)) - ASSERT(FALSE); + ASSERT(false); /* check pattern */ for (i=0; i<MAX_NEW_CORNERS_DIM; i++) @@ -1936,7 +1936,7 @@ static void CheckMRules (MULTIGRID *mg, INT RefRuleOffset[], MGIO_RR_RULE *mrule /* check sons */ if (GetOrderedSons(elem,mr,nodes,sons,&maxsonex)) - ASSERT(FALSE); + ASSERT(false); #ifndef ModelP if (maxsonex!=nsons) PD_ERR(ER_DBG_RULE_VERBOSE,("ERROR in CheckMRules, elem %ld: wrong number of sons (%d vs %d)\n",id,maxsonex,nsons),error); @@ -2005,7 +2005,7 @@ static void CheckMRules (MULTIGRID *mg, INT RefRuleOffset[], MGIO_RR_RULE *mrule ELEMENT *nson = sons[0]; int path = rson->path; int pd = PATHDEPTH(path); - int son_path_ok = FALSE; + int son_path_ok = false; int j; max_path_depth = MAX(max_path_depth,pd); @@ -2029,9 +2029,9 @@ static void CheckMRules (MULTIGRID *mg, INT RefRuleOffset[], MGIO_RR_RULE *mrule if (nson!=son) PD_ERR(ER_DBG_RULE_VERBOSE,("ERROR in CheckMRules, elem %ld: wrong path of son %d\n",id,s),error) else - son_path_ok = TRUE; + son_path_ok = true; if (!son_path_ok) - some_path_wrong = TRUE; + some_path_wrong = true; }*/ #endif #endif @@ -2053,7 +2053,7 @@ static void CheckMRules (MULTIGRID *mg, INT RefRuleOffset[], MGIO_RR_RULE *mrule { PD(("in total %3d ERRORS in CheckMRules (%c-rule %3d of %d), elem %ld\n",error,(refi<UGMAXRULE(tag)) ? 'r' : 'e',refi,tag,id)); if (use_bug_in_rule) - bug_in_rule[tag][refi] = TRUE; + bug_in_rule[tag][refi] = true; } else PrintDebug("FINE in CheckMRules (%c-rule %4d of %d), elem %ld: everything ok\n",(refi<UGMAXRULE(tag)) ? 'r' : 'e',refi,tag,id); @@ -2080,7 +2080,7 @@ static void CheckMRules (MULTIGRID *mg, INT RefRuleOffset[], MGIO_RR_RULE *mrule PrintDebug("------------------------------------------------------------\n"); if (ReleaseTmpMem(global.heap,MarkKey)) - ASSERT(FALSE); + ASSERT(false); } else PrintDebug("sorry, no storage available for use_bug_in_rule\n"); diff --git a/gm/gg2/ggmain.cc b/gm/gg2/ggmain.cc index d287685e7..f7c898b3a 100644 --- a/gm/gg2/ggmain.cc +++ b/gm/gg2/ggmain.cc @@ -155,14 +155,14 @@ typedef struct mesh2d MESH2D; static char buffer[256]; /* general purpose text buffer */ -static INT doupdate; /* if TRUE MakeElement calls UpdateDoc, PlotElement else*/ -static INT dostep; /* if TRUE MakeElement stops after each plot */ -static INT doanimate; /* if TRUE MakeElement plots the current element */ -static INT doedge; /* if TRUE MakeElement uses accelerator with edgetree*/ -static INT doangle; /* if TRUE MakeElement uses accelerator with angletree */ -static INT doEdge; /* if TRUE MakeElement uses smallest edge without accelerator*/ -static INT doAngle; /* if TRUE MakeElement uses smallest angle without accelerator* */ -static INT doConstDel; /* if TRUE Constrained Delaunay Triangulation* */ +static INT doupdate; /* if true MakeElement calls UpdateDoc, PlotElement else*/ +static INT dostep; /* if true MakeElement stops after each plot */ +static INT doanimate; /* if true MakeElement plots the current element */ +static INT doedge; /* if true MakeElement uses accelerator with edgetree*/ +static INT doangle; /* if true MakeElement uses accelerator with angletree */ +static INT doEdge; /* if true MakeElement uses smallest edge without accelerator*/ +static INT doAngle; /* if true MakeElement uses smallest angle without accelerator* */ +static INT doConstDel; /* if true Constrained Delaunay Triangulation* */ static INT ElemID; static INT equilateral; @@ -219,8 +219,8 @@ static INT IsPointLeftOfFC (DOUBLE xP,DOUBLE yP, FRONTCOMP *theFC) xTest = xP - cvect[0]; yTest = yP - cvect[1]; - /* side.. = FALSE: xTest right of .., - = TRUE: xTest left of .. */ + /* side.. = false: xTest right of .., + = true: xTest left of .. */ sideIn = ((yTest*xIn-xTest*yIn) > SMALLDOUBLE); sideOut = ((yTest*xOut-xTest*yOut) > SMALLDOUBLE); diff --git a/gm/gm.h b/gm/gm.h index 11065a5c4..bc12ffd53 100644 --- a/gm/gm.h +++ b/gm/gm.h @@ -849,7 +849,7 @@ struct node { int levelIndex; /** \brief Information if this node is on the leaf. */ - BOOL isLeaf; + bool isLeaf; #ifdef ModelP /** \brief Per-node message buffer used by Dune for dynamic load-balancing */ diff --git a/gm/refine.cc b/gm/refine.cc index ac2c6b32e..5e266d790 100644 --- a/gm/refine.cc +++ b/gm/refine.cc @@ -2726,7 +2726,7 @@ static INT RestrictMarks (GRID *theGrid) for (co=0; co<CORNERS_OF_ELEM(theElement); co++) if (THEFLAG(NVECTOR(CORNER(theElement,co)))) - SETUSED(NVECTOR(CORNER(theElement,co)),TRUE); + SETUSED(NVECTOR(CORNER(theElement,co)),true); } #endif @@ -3104,7 +3104,7 @@ static int UpdateContext (GRID *theGrid, ELEMENT *theElement, NODE **theElementC NODE **MidNodes; /* nodes on refined edges */ NODE *Node0, *Node1; INT Mark; - BOOL toBisect,toCreate; + bool toBisect,toCreate; #ifdef __THREEDIM__ ELEMENT *theNeighbor; /* neighbor and a son of current elem. */ NODE **SideNodes; /* nodes on refined sides */ @@ -3144,7 +3144,7 @@ static int UpdateContext (GRID *theGrid, ELEMENT *theElement, NODE **theElementC Corner0 = CORNER_OF_EDGE(theElement,i,0); Corner1 = CORNER_OF_EDGE(theElement,i,1); - toBisect = FALSE; + toBisect = false; if (MARKED_NEW_GREEN(theElement)) { @@ -3154,7 +3154,7 @@ static int UpdateContext (GRID *theGrid, ELEMENT *theElement, NODE **theElementC if (ADDPATTERN(theEdge) == 0) { - toBisect = TRUE; + toBisect = true; MidNodes[i] = MIDNODE(theEdge); } } @@ -3163,7 +3163,7 @@ static int UpdateContext (GRID *theGrid, ELEMENT *theElement, NODE **theElementC #endif if (NODE_OF_RULE(theElement,Mark,i)) { - toBisect = TRUE; + toBisect = true; } IFDEBUG(gm,2) @@ -3219,7 +3219,7 @@ static int UpdateContext (GRID *theGrid, ELEMENT *theElement, NODE **theElementC if (CORNERS_OF_SIDE(theElement,i) == 3) continue; #endif - toCreate = FALSE; + toCreate = false; /* is side node needed */ if (MARKED_NEW_GREEN(theElement)) { @@ -3238,7 +3238,7 @@ static int UpdateContext (GRID *theGrid, ELEMENT *theElement, NODE **theElementC ASSERT(j<SIDES_OF_ELEM(theNeighbor)); if (NODE_OF_RULE(theNeighbor,MARK(theNeighbor), EDGES_OF_ELEM(theNeighbor)+j)) - toCreate = TRUE; + toCreate = true; } } } @@ -3247,7 +3247,7 @@ static int UpdateContext (GRID *theGrid, ELEMENT *theElement, NODE **theElementC #endif if (NODE_OF_RULE(theElement,Mark,EDGES_OF_ELEM(theElement)+i)) { - toCreate = TRUE; + toCreate = true; } IFDEBUG(gm,2) @@ -3348,20 +3348,20 @@ static int UpdateContext (GRID *theGrid, ELEMENT *theElement, NODE **theElementC CenterNode = MidNodes+CENTER_NODE_INDEX(theElement); CenterNode[0] = NULL; - toCreate = FALSE; + toCreate = false; if (CenterNode[0] == NULL) { if (MARKED_NEW_GREEN(theElement)) { - toCreate = TRUE; + toCreate = true; } #ifndef __ANISOTROPIC__ else #endif if (NODE_OF_RULE(theElement,Mark,CENTER_NODE_INDEX(theElement))) { - toCreate = TRUE; + toCreate = true; } } @@ -3467,7 +3467,7 @@ static INT UnrefineElement (GRID *theGrid, ELEMENT *theElement) PRINTDEBUG(gm,1,(PFMT "UnrefineElement(): DisposeElement[%d]=" EID_FMTX "\n",me,s,EID_PRTX(SonList[s]))); - if (DisposeElement(theGrid,SonList[s],TRUE)!=0) RETURN(GM_FATAL); + if (DisposeElement(theGrid,SonList[s],true)!=0) RETURN(GM_FATAL); } return (GM_OK); @@ -4507,7 +4507,7 @@ static int RefineElementGreen (GRID *theGrid, ELEMENT *theElement, NODE **theCon NODE *ElementNodes[MAX_CORNERS_OF_ELEM]; int i,j,k,l,m,n,s; int nelem,nedges,node0; - BOOL bdy,found; + bool bdy,found; int edge, sides[4], side0, side1; int tetNode0, tetNode1, tetNode2, tetEdge0, tetEdge1, tetEdge2, tetSideNode0Node1, tetSideNode0Node2, tetSideNode1Node2, @@ -5169,26 +5169,26 @@ static int RefineElementGreen (GRID *theGrid, ELEMENT *theElement, NODE **theCon /* two elements share this edge */ /* get son elements for this edge */ - found = FALSE; + found = false; for (j=side0*5; j<(side0*5+5); j++) { for (k=0; k<MAX_SIDES_OF_ELEM; k++) if ((sons[j].nb[k]-MAX_GREEN_SONS)==side1) { - found = TRUE; + found = true; break; } if (found) break; } ASSERT(j<side0*5+5); - found = FALSE; + found = false; for (l=side1*5; l<side1*5+5; l++) { for (m=0; m<MAX_SIDES_OF_ELEM; m++) if ((sons[l].nb[m]-MAX_GREEN_SONS)==side0) { - found = TRUE; + found = true; break; } if (found) break; @@ -5226,14 +5226,14 @@ static int RefineElementGreen (GRID *theGrid, ELEMENT *theElement, NODE **theCon for (j=0; j<CORNERS_OF_EDGE; j++) { theNode1 = theContext[CORNER_OF_EDGE(theElement,i,j)]; - found = FALSE; + found = false; for (l=0; l<2; l++) { for (k=0; k<MAX_CORNERS_OF_ELEM; k++) { if (theNode1 == sons[elementsSide0[l]].corners[k]) { - found = TRUE; + found = true; break; } } @@ -5242,14 +5242,14 @@ static int RefineElementGreen (GRID *theGrid, ELEMENT *theElement, NODE **theCon ASSERT(k<MAX_CORNERS_OF_ELEM); ASSERT(l<2); - found = FALSE; + found = false; for (m=0; m<2; m++) { for (k=0; k<MAX_CORNERS_OF_ELEM; k++) { if (theNode1 == sons[elementsSide1[m]].corners[k]) { - found = TRUE; + found = true; break; } } @@ -5865,7 +5865,7 @@ static int AdaptGrid (GRID *theGrid, INT *nadapted) { if (LEVEL(theElement)>0 && EFATHER(theElement)==NULL) { - DisposeElement(theGrid,theElement,TRUE); + DisposeElement(theGrid,theElement,true); continue; } } @@ -5913,7 +5913,7 @@ static int AdaptGrid (GRID *theGrid, INT *nadapted) { if (LEVEL(theElement)>0 && EFATHER(theElement)==NULL) { - DisposeElement(theGrid,theElement,TRUE); + DisposeElement(theGrid,theElement,true); continue; } } @@ -5978,7 +5978,7 @@ static int AdaptGrid (GRID *theGrid, INT toplevel, INT level, INT newlevel, INT theElement!=NULL; theElement=SUCCE(theElement)) { - if (EPRIO(theElement) == PrioHGhost) DisposeElement(FinerGrid,theElement,TRUE); + if (EPRIO(theElement) == PrioHGhost) DisposeElement(FinerGrid,theElement,true); } } DDD_XferEnd(); @@ -6247,8 +6247,8 @@ static INT InitializePeriodicFlags(GRID *grid) return (0); for (vec=PFIRSTVECTOR(grid); vec!=NULL; vec=SUCCVC(vec)) { - SETUSED(vec,FALSE); - SETTHEFLAG(vec,FALSE); + SETUSED(vec,false); + SETTHEFLAG(vec,false); } for (node=PFIRSTNODE(grid); node!=NULL; node=SUCCN(node)) { @@ -6259,7 +6259,7 @@ static INT InitializePeriodicFlags(GRID *grid) vtx=MYVERTEX(node); if (OBJT(vtx)!=BVOBJ) continue; if ((*IsPeriodicBnd)(vtx,&n,per_ids,coord,pcoords)) - SETTHEFLAG(NVECTOR(node),TRUE); + SETTHEFLAG(NVECTOR(node),true); } return (0); @@ -6276,8 +6276,8 @@ static INT Grid_MakePeriodicMarksConsistent(GRID *grid) return (0); for (vec=FIRSTVECTOR(grid); vec!=NULL; vec=SUCCVC(vec)) { - SETUSED(vec,FALSE); /* vector of marked element */ - SETTHEFLAG(vec,FALSE); /* periodic vector */ + SETUSED(vec,false); /* vector of marked element */ + SETTHEFLAG(vec,false); /* periodic vector */ } /* check if element has points on periodic boundary and set flags */ @@ -6301,9 +6301,9 @@ static INT Grid_MakePeriodicMarksConsistent(GRID *grid) if (OBJT(vtx)!=BVOBJ) continue; if ((*IsPeriodicBnd)(vtx,&n,per_ids,coord,pcoords)) { - SETTHEFLAG(vec,TRUE); + SETTHEFLAG(vec,true); if (mark==RED) { - SETUSED(vec,TRUE); + SETUSED(vec,true); PRINTDEBUG(gm,1,("periodic vec %8d on level %d: used at %d bndries\n",VINDEX(vec),GLEVEL(grid),n)); } } @@ -6350,7 +6350,7 @@ static INT Grid_MakePeriodicMarksConsistent(GRID *grid) vec = NVECTOR(node); if (THEFLAG(vec)) { /* periodic vector */ - SETUSED(vec,TRUE); + SETUSED(vec,true); PRINTDEBUG(gm,1,("Elem %8d on level %d: periodic vec %8d\n",ID(elem),GLEVEL(grid),VINDEX(vec))); } } diff --git a/gm/shapes.cc b/gm/shapes.cc index a5cc0e5fa..f8f1d4c38 100644 --- a/gm/shapes.cc +++ b/gm/shapes.cc @@ -271,13 +271,13 @@ INT NS_DIM_PREFIX InterpolateFEFunction (INT dim, INT tag, DOUBLE ip_local[DIM], \param dim - space dimension, 2D can elements can be used in 3D \param tag - identifier for element type - This function returns TRUE when the coordinate transformation from the + This function returns true when the coordinate transformation from the reference element to the general element is linear. In that case the Jacobian need only be evaluated once per element. \return <ul> - <li> TRUE when transformation is linear - <li> FALSE when transformation is nonlinear + <li> true when transformation is linear + <li> false when transformation is nonlinear */ /****************************************************************************/ diff --git a/gm/smooth.cc b/gm/smooth.cc index a188099e2..c2ce8ee59 100644 --- a/gm/smooth.cc +++ b/gm/smooth.cc @@ -136,9 +136,9 @@ static DOUBLE LambdaOfLengthOfEdge(ELEMENT *theElement, INT edge, DOUBLE LambdaO /* determine orientation of boundary lambda */ lambda[0] = 0; BNDS_Global(bnds,lambda,BndPoint1); - reverse = TRUE; + reverse = true; V_DIM_COPY(CVECT(MYVERTEX(CORNER(theElement,CORNER_OF_EDGE(theElement,edge,0)))),BndPoint0); - if (V_DIM_ISEQUAL(BndPoint0,BndPoint1)) reverse = FALSE; + if (V_DIM_ISEQUAL(BndPoint0,BndPoint1)) reverse = false; /* linear interpolation */ V_DIM_LINCOMB(1-LambdaOfLength,CVECT(MYVERTEX(CORNER(theElement,CORNER_OF_EDGE(theElement,edge,0)))), @@ -146,12 +146,12 @@ static DOUBLE LambdaOfLengthOfEdge(ELEMENT *theElement, INT edge, DOUBLE LambdaO BndPoint0); /* boundary interpolation */ - if (reverse==TRUE) + if (reverse==true) lambda[0] = 1.-LambdaOfLength; else lambda[0] = LambdaOfLength; BNDS_Global(bnds,lambda,BndPoint1); - if (reverse==TRUE) printf("reverse: element %d, edge %d \n",ID(theElement),edge); + if (reverse==true) printf("reverse: element %d, edge %d \n",ID(theElement),edge); V_DIM_EUKLIDNORM_OF_DIFF(BndPoint0,BndPoint1,diff); if (diff <= MAX_PAR_DIST) return(LambdaOfLength); /* boundary is a straight line */ @@ -199,7 +199,7 @@ static DOUBLE LambdaOfLengthOfEdge(ELEMENT *theElement, INT edge, DOUBLE LambdaO if (len2/len>=LambdaOfLength) break; } - if (reverse==TRUE) + if (reverse==true) return(1-lambda[0]); else return(lambda[0]); @@ -672,7 +672,7 @@ static INT LambdaFromQuad (ELEMENT *theElement,VERTEX *centerVertex, PARAMETERS . theElement - father element of the center node . CenterNode - center node of father element - . LambdaMod - TRUE for 'smoothgrid $b' + . LambdaMod - true for 'smoothgrid $b' . MidNodeLambdaNew - new lambda of mid nodes . MidNodeLambdaOld - old lambda of mid nodes @@ -724,7 +724,7 @@ static INT DefaultPosCurvedBoundary(ELEMENT *theElement, NODE *CenterNode, INT L if (VFATHER(MYVERTEX(theBndNode))!=VFATHER(MYVERTEX(theOppNode))) continue; /* calculate global coordinates of a regular refined boundary mid node */ - if (LambdaMod==TRUE) + if (LambdaMod==true) { /* get lambda of bnd-node and reset center node (only used for smoothgrid $b) */ if (GetMidNodeParam(theBndNode,&lambda_old)!=0) continue; MidNodeLambdaOld[ID(MYVERTEX(theBndNode))] = lambda_old; @@ -1344,7 +1344,7 @@ static INT MoveNodesOnGrid (GRID *theGrid, DOUBLE_VECTOR *VertexCoord, DOUBLE_VE { if (!V2_LOCAL_EQUAL(newLPos,oldLPos)) { - if (MoveNode(theMG,theNode,newPos,FALSE)!=0) return(1); + if (MoveNode(theMG,theNode,newPos,false)!=0) return(1); SETMOVED(theVertex,1); if (NTYPE(theNode)==CENTER_NODE) MoveInfo[0]++; if (NTYPE(theNode)==MID_NODE) MoveInfo[1]++; @@ -1354,7 +1354,7 @@ static INT MoveNodesOnGrid (GRID *theGrid, DOUBLE_VECTOR *VertexCoord, DOUBLE_VE { if (!V2_LOCAL_EQUAL(newLPos,oldLPos)) { - if (MoveNode(theMG,theNode,newPos,FALSE)!=0) return(1); + if (MoveNode(theMG,theNode,newPos,false)!=0) return(1); SETMOVED(theVertex,1); MoveInfo[0]++; /* are there nodes which reached the moving limit ? */ @@ -1376,7 +1376,7 @@ static INT MoveNodesOnGrid (GRID *theGrid, DOUBLE_VECTOR *VertexCoord, DOUBLE_VE if (!LOCAL_EQUAL(lambda_new,lambda_old)) { - if (MoveMidNode(theMG,theNode,lambda_new,FALSE)!=0) return(1); + if (MoveMidNode(theMG,theNode,lambda_new,false)!=0) return(1); SETMOVED(theVertex,1); MoveInfo[1]++; } @@ -1427,10 +1427,10 @@ static INT ElemOnSpecBnd(ELEMENT *theElement, const INT *bnd, const INT bnd_num, if (type[1]==bnd[j]) { *side = i; - return(TRUE); + return(true); } } - return(FALSE); + return(false); } static void CubicSplineCompute(DOUBLE *x, DOUBLE *y, INT n, DOUBLE yp1, DOUBLE ypn, DOUBLE *y2) { @@ -1757,7 +1757,7 @@ option_b: if (option==3) { /* determine default positions for center node and mid node opposite to boundary */ - if (DefaultPosCurvedBoundary(fatherElement,theNode,TRUE, + if (DefaultPosCurvedBoundary(fatherElement,theNode,true, MidNodeLambdaNew,MidNodeLambdaOld)) continue; } else @@ -1910,7 +1910,7 @@ option_c: /* calculate new position */ if (SplineSmooth(theNode,newPos)) continue; /* move node to new position */ - if (MoveNode(theMG,theNode,newPos,FALSE)!=0) return(1); + if (MoveNode(theMG,theNode,newPos,false)!=0) return(1); n++; } n1 = 0; @@ -1950,7 +1950,7 @@ option_c: } if (nlinks!=4) continue; /* move the center node to the new position */ - if (MoveNode(theMG,theNode,newPos,FALSE)!=0) return(1); + if (MoveNode(theMG,theNode,newPos,false)!=0) return(1); n1++; } UserWriteF("%d mid-nodes and %d center-nodes moved due to 'spline' option on level %d\n", @@ -2105,7 +2105,7 @@ INT NS_DIM_PREFIX SmoothGridReset (MULTIGRID *theMG, INT fl, INT tl) if (!MovedNode(fatherElement)) continue; /* determine default positions for center node and mid node opposite to boundary */ - if (DefaultPosCurvedBoundary(fatherElement,theNode,FALSE, + if (DefaultPosCurvedBoundary(fatherElement,theNode,false, MidNodeLambdaNew,MidNodeLambdaOld)) continue; } diff --git a/gm/ugio.cc b/gm/ugio.cc index d5e225a16..fa48189fc 100644 --- a/gm/ugio.cc +++ b/gm/ugio.cc @@ -146,7 +146,7 @@ USING_UGDIM_NAMESPACE /****************************************************************************/ REP_ERR_FILE; -static INT gridpaths_set=FALSE; +static INT gridpaths_set=false; static MGIO_RR_RULE *rr_rules; static INT rr_rule_offsets[TAGS]; static unsigned short *ProcList, *ActProcListPos; @@ -2108,7 +2108,7 @@ static INT CheckLocalElementKeys (ELEMENT *theElement, MGIO_REFINEMENT *ref, INT /* check as many consistencies as possible. Various keys (for neibhbours, sons, ...) are stored in the debug mode and are now compared to the existing objects in the memory. - if must_exist == TRUE all sons must exist. */ + if must_exist == true all sons must exist. */ { INT i, j, k, key, nmax; NODE *corner_node; @@ -2580,7 +2580,7 @@ static INT InsertLocalTree (GRID *theGrid, ELEMENT *theElement, MGIO_REFINEMENT } #if (MGIO_DEBUG>0) - if (CheckLocalElementKeys(theElement, &ref_copy, FALSE)==0) + if (CheckLocalElementKeys(theElement, &ref_copy, false)==0) { PRINTDEBUG(gm,4,("InsertLocalTree: preliminary CheckLocalElementKeys ok.\n")); } @@ -2606,7 +2606,7 @@ static INT InsertLocalTree (GRID *theGrid, ELEMENT *theElement, MGIO_REFINEMENT } #if (MGIO_DEBUG>0) - if (CheckLocalElementKeys(theElement, &ref_copy, TRUE)==0) + if (CheckLocalElementKeys(theElement, &ref_copy, true)==0) { PRINTDEBUG(gm,4,("InsertLocalTree: after son %d intermediate CheckLocalElementKeys ok.\n",i)); } @@ -2618,7 +2618,7 @@ static INT InsertLocalTree (GRID *theGrid, ELEMENT *theElement, MGIO_REFINEMENT } #if (MGIO_DEBUG>0) - if (CheckLocalElementKeys(theElement, &ref_copy, TRUE)==0) + if (CheckLocalElementKeys(theElement, &ref_copy, true)==0) { PRINTDEBUG(gm,4,("InsertLocalTree: final CheckLocalElementKeys ok.\n")); } @@ -2934,7 +2934,7 @@ nparfiles = UG_GlobalMinINT(nparfiles); if (heapSize==0) heapSize = mg_general.heapsize * KBYTE; /* create a virginenal multigrid on the BVP */ - theMG = CreateMultiGrid(MGName,BndValName,FormatName,heapSize,TRUE,FALSE); + theMG = CreateMultiGrid(MGName,BndValName,FormatName,heapSize,true,false); if (theMG==NULL) { UserWrite("ERROR(ugio): cannot create multigrid\n"); CloseMGFile (); @@ -3701,9 +3701,9 @@ INT NS_DIM_PREFIX SaveCnomGridAndValues (MULTIGRID *theMG, char *docName, char * INT NS_DIM_PREFIX InitUgio () { /* read gridpaths from defaults file (iff) */ - gridpaths_set = FALSE; + gridpaths_set = false; if (ReadSearchingPaths(DEFAULTSFILENAME,"gridpaths")==0) - gridpaths_set = TRUE; + gridpaths_set = true; if (MGIO_Init ()) return(1); diff --git a/gm/ugm.cc b/gm/ugm.cc index 51471640b..b494dc440 100644 --- a/gm/ugm.cc +++ b/gm/ugm.cc @@ -2219,7 +2219,7 @@ EDGE * NS_DIM_PREFIX GetEdge (const NODE *from, const NODE *to) * @param theGrid - grid where vertex should be inserted * @param theElement - pointer to element * @param edge - number of edge - * @param with_vector - also create vector for edge (TRUE/FALSE) + * @param with_vector - also create vector for edge (true/false) This function returns a pointer to a new edge structure. @@ -2236,7 +2236,7 @@ EDGE * #ifdef ModelP NS_DIM_PREFIX #endif -CreateEdge (GRID *theGrid, ELEMENT *theElement, INT edge, BOOL with_vector) +CreateEdge (GRID *theGrid, ELEMENT *theElement, INT edge, bool with_vector) { ELEMENT *theFather; EDGE *pe,*father_edge; @@ -2539,7 +2539,7 @@ LINK *GetLink (const NODE *from, const NODE *to) /****************************************************************************/ ELEMENT * NS_DIM_PREFIX CreateElement (GRID *theGrid, INT tag, INT objtype, NODE **nodes, - ELEMENT *Father, BOOL with_vector) + ELEMENT *Father, bool with_vector) { ELEMENT *pe; INT i,s_id; @@ -2585,7 +2585,7 @@ ELEMENT * NS_DIM_PREFIX CreateElement (GRID *theGrid, INT tag, INT objtype, NODE /* create edges */ for (i=0; i<EDGES_OF_ELEM(pe); i++) if (CreateEdge (theGrid,pe,i,with_vector) == NULL) { - DisposeElement(theGrid,pe,TRUE); + DisposeElement(theGrid,pe,true); return(NULL); } @@ -2612,7 +2612,7 @@ ELEMENT * NS_DIM_PREFIX CreateElement (GRID *theGrid, INT tag, INT objtype, NODE { if (CreateVector (theGrid,ELEMVEC,(GEOM_OBJECT *)pe,&pv)) { - DisposeElement(theGrid,pe,TRUE); + DisposeElement(theGrid,pe,true); return (NULL); } SET_EVECTOR(pe,pv); @@ -2623,7 +2623,7 @@ ELEMENT * NS_DIM_PREFIX CreateElement (GRID *theGrid, INT tag, INT objtype, NODE if (EDATA_DEF_IN_GRID(theGrid)) { q = (void *) GetMemoryForObject(theGrid->mg,EDATA_DEF_IN_GRID(theGrid),-1); if (q == NULL) { - DisposeElement(theGrid,pe,TRUE); + DisposeElement(theGrid,pe,true); return (NULL); } SET_EDATA(pe,q); @@ -2636,7 +2636,7 @@ ELEMENT * NS_DIM_PREFIX CreateElement (GRID *theGrid, INT tag, INT objtype, NODE { if (CreateSideVector (theGrid,i,(GEOM_OBJECT *)pe,&pv)) { - DisposeElement(theGrid,pe,TRUE); + DisposeElement(theGrid,pe,true); return (NULL); } SET_SVECTOR(pe,i,pv); @@ -3253,7 +3253,7 @@ MULTIGRID * NS_DIM_PREFIX CreateMultiGrid (char *MultigridName, char *BndValProb GRID_ON_LEVEL(theMG,-i-1) = NULL; } - if(optimizedIE == TRUE) + if(optimizedIE == true) { if ((MGNDELEMPTRARRAY(theMG)= (ELEMENT***)GetTmpMem(theHeap,NDELEM_BLKS_MAX*sizeof(ELEMENT**),MarkKey))==NULL) @@ -3562,7 +3562,7 @@ static INT DisposeVertex (GRID *theGrid, VERTEX *theVertex) * @param theGrid - grid to remove from * @param theElement - element to remove - * @param dispose_connections - also dispose connections (TRUE/FALSE) + * @param dispose_connections - also dispose connections (true/false) This function removes an element from the data structure and inserts it into the free list. This includes all elementsides, sidevectors and the @@ -4341,7 +4341,7 @@ INT NS_DIM_PREFIX DisposeMultiGrid (MULTIGRID *theMG) if (BVP_Dispose(MG_BVP(theMG))) return (GM_ERROR); /* first unlock the mg */ - ((ENVITEM*) theMG)->v.locked = FALSE; + ((ENVITEM*) theMG)->v.locked = false; /* delete mg */ if (ChangeEnvDir("/Multigrids")==NULL) RETURN (GM_ERROR); @@ -4428,7 +4428,7 @@ static int LinkCompare (LINK **LinkHandle1, LINK **LinkHandle2) * @param theGrid - grid to order * @param order - precedence of coordinate directions * @param sign - respective ordering direction - * @param AlsoOrderLinks - if 'TRUE' also order links + * @param AlsoOrderLinks - if 'true' also order links This function reorders the double linked 'NODE' list of the grid with qsort and order criteria LexCompare(). If specified the 'LINK's are ordered @@ -5125,7 +5125,7 @@ INT NS_DIM_PREFIX MoveMidNode (MULTIGRID *theMG, NODE *theNode, DOUBLE lambda, I RecreateBNDSofNode(theMG,sonNode); } - if (update==FALSE) return(GM_OK); + if (update==false) return(GM_OK); /* Warning: O(n) Operation! */ for(k=LEVEL(theNode)+1; k<=TOPLEVEL(theMG); k++) for (theVertex=FIRSTVERTEX(GRID_ON_LEVEL(theMG,k)); @@ -5379,7 +5379,7 @@ INT NS_DIM_PREFIX MoveNode (MULTIGRID *theMG, NODE *theNode, DOUBLE *newPos, INT else V_DIM_COPY(newPos,CVECT(theVertex)); - if (update==FALSE) return(GM_OK); + if (update==false) return(GM_OK); /* Warning: O(n) Operation! */ for(k=LEVEL(theNode)+1; k<=TOPLEVEL(theMG); k++) for (theVertex=FIRSTVERTEX(GRID_ON_LEVEL(theMG,k)); @@ -5451,7 +5451,7 @@ INT NS_DIM_PREFIX MoveFreeBoundaryVertex (MULTIGRID *theMG, VERTEX *vert, const #ifdef ModelP /* TODO: parallel version */ PrintErrorMessage('E',"MoveFreeBoundaryVertex","parallel not implemented"); - ASSERT(FALSE); + ASSERT(false); #endif if (OBJT(vert) != BVOBJ) @@ -6572,7 +6572,7 @@ INT NS_DIM_PREFIX DeleteElement (MULTIGRID *theMG, ELEMENT *theElement) /* 3D VE } /* delete element now */ - DisposeElement(theGrid,theElement,TRUE); + DisposeElement(theGrid,theElement,true); return(GM_OK); } @@ -8781,7 +8781,7 @@ void NS_DIM_PREFIX ListElementRange (const MULTIGRID *theMG, INT from, INT to, I int level,fromlevel,tolevel; ELEMENT *theElement; - if (lopt==FALSE) + if (lopt==false) { fromlevel = 0; tolevel = TOPLEVEL(theMG); @@ -10567,8 +10567,8 @@ static INT FinishGrid (MULTIGRID *mg) for (elem=PFIRSTELEMENT(grid); elem!=NULL; elem=SUCCE(elem)) { - SETUSED(elem,FALSE); - SETTHEFLAG(elem,FALSE); + SETUSED(elem,false); + SETTHEFLAG(elem,false); } /* table for subdomain ids */ @@ -10588,7 +10588,7 @@ static INT FinishGrid (MULTIGRID *mg) fifo_init(&shell,buffer,sizeof(ELEMENT*)*NT(grid)); /* outermost loop handles nonconnected domains */ - while (TRUE) + while (true) { for (elem=PFIRSTELEMENT(grid); elem!=NULL; elem=SUCCE(elem)) if (!USED(elem)) @@ -10611,9 +10611,9 @@ static INT FinishGrid (MULTIGRID *mg) /* shell algo (using FLAG): neighbours, but not across bside */ fifo_clear(&shell); fifo_in(&shell,elem); - SETTHEFLAG(elem,TRUE); + SETTHEFLAG(elem,true); for (i=0; i<=nsd; i++) sd_table[i] = 0; - found = FALSE; + found = false; while (!fifo_empty(&shell)) { elem = (ELEMENT*) fifo_out(&shell); @@ -10631,7 +10631,7 @@ static INT FinishGrid (MULTIGRID *mg) /* TODO (HRR 971012): parallel? */ ASSERT(nbid==0); s_id = id; - found = TRUE; + found = true; break; } else @@ -10643,7 +10643,7 @@ static INT FinishGrid (MULTIGRID *mg) else if (id==SUBDOMAIN(nb)) s_id = nbid; else - ASSERT(FALSE); + ASSERT(false); } /* handle outer boundary cases */ @@ -10651,14 +10651,14 @@ static INT FinishGrid (MULTIGRID *mg) { ASSERT(nbid>0); s_id = nbid; - found = TRUE; + found = true; break; } if (nbid==0) { ASSERT(id>0); s_id = id; - found = TRUE; + found = true; break; } @@ -10666,7 +10666,7 @@ static INT FinishGrid (MULTIGRID *mg) if (sd_table[id]>1) { s_id = id; - found = TRUE; + found = true; break; } } @@ -10682,7 +10682,7 @@ static INT FinishGrid (MULTIGRID *mg) if (!USED(nb) && !THEFLAG(nb)) { fifo_in(&shell,nb); - SETTHEFLAG(nb,TRUE); + SETTHEFLAG(nb,true); } } else @@ -10692,7 +10692,7 @@ static INT FinishGrid (MULTIGRID *mg) if (!USED(nb) && !THEFLAG(nb)) { fifo_in(&shell,nb); - SETTHEFLAG(nb,TRUE); + SETTHEFLAG(nb,true); } } } @@ -10703,14 +10703,14 @@ static INT FinishGrid (MULTIGRID *mg) found++; if (found>2) /* FATAL: algorithm relies on assumptions obviously not fulfilled! */ - ASSERT(FALSE); + ASSERT(false); /* again shell algo starting from last element */ /* set USED, propagate subdomain ids and remove spurious bsides (has to have NB!) */ /* use PRINTDEBUG */ fifo_clear(&shell); fifo_in(&shell,elem); - SETUSED(elem,TRUE); + SETUSED(elem,true); SETSUBDOMAIN(elem,s_id); while (!fifo_empty(&shell)) { @@ -10749,7 +10749,7 @@ static INT FinishGrid (MULTIGRID *mg) if (!USED(nb)) { fifo_in(&shell,nb); - SETUSED(nb,TRUE); + SETUSED(nb,true); SETSUBDOMAIN(nb,s_id); } } @@ -10766,7 +10766,7 @@ static INT FinishGrid (MULTIGRID *mg) if (!USED(nb)) { fifo_in(&shell,nb); - SETUSED(nb,TRUE); + SETUSED(nb,true); SETSUBDOMAIN(nb,s_id); } } @@ -11058,7 +11058,7 @@ static INT ModifyVectorPointer (GRID *g, PERIODIC_ENTRIES *list, INT i, INT j) INT nbnd,IsOnSamePerBnd; VERTEX *vtx; - IsOnSamePerBnd=FALSE; + IsOnSamePerBnd=false; d = MDEST(m); vtx = MYVERTEX((NODE*)VOBJECT(d)); @@ -11074,7 +11074,7 @@ static INT ModifyVectorPointer (GRID *g, PERIODIC_ENTRIES *list, INT i, INT j) for (k=0; k<nbnd; k++) if (periodic_ids[k]==list[i].periodic_id) { - IsOnSamePerBnd=TRUE; + IsOnSamePerBnd=true; break; } } diff --git a/gm/ugm.h b/gm/ugm.h index cb821a4f3..43f83c00f 100644 --- a/gm/ugm.h +++ b/gm/ugm.h @@ -107,10 +107,10 @@ INT ReleaseOBJT (INT type); */ #ifdef ModelP -EDGE * CreateEdge (GRID *theGrid, ELEMENT *theElement, INT i, BOOL with_vector); +EDGE * CreateEdge (GRID *theGrid, ELEMENT *theElement, INT i, bool with_vector); #endif ELEMENT * CreateElement (GRID *theGrid, INT tag, INT objtype, - NODE **nodes, ELEMENT *Father, BOOL with_vector); + NODE **nodes, ELEMENT *Father, bool with_vector); INT CreateSonElementSide (GRID *theGrid, ELEMENT *theElement, INT side, ELEMENT *theSon, INT son_side); diff --git a/graphics/uggraph/wop.cc b/graphics/uggraph/wop.cc index 663e1b85c..f834c4c78 100644 --- a/graphics/uggraph/wop.cc +++ b/graphics/uggraph/wop.cc @@ -592,10 +592,10 @@ static short NE_CornerMarkerSize; /* markersize for corner nodes static NODE *NE_Node; /* node for insert node work */ /*---------- working variables of 'EW_MarkElement2D' -----------------------*/ -static INT ME2D_found; /* TRUE if an element found */ +static INT ME2D_found; /* true if an element found */ static ELEMENT *ME2D_elem; /* pointer to element found */ -static INT ME2D_pointIn; /* TRUE if point specified, rectangle else */ -static DOUBLE_VECTOR ME2D_point; /* point if ME2D_pointIn TRUE */ +static INT ME2D_pointIn; /* true if point specified, rectangle else */ +static DOUBLE_VECTOR ME2D_point; /* point if ME2D_pointIn true */ static DOUBLE ME2D_xmin; /* search rectangle */ static DOUBLE ME2D_xmax; /* search rectangle */ static DOUBLE ME2D_ymin; /* search rectangle */ @@ -613,13 +613,13 @@ static DOUBLE MN_ymin; /* limits of the picture */ static DOUBLE MN_ymax; /* limits of the picture */ static DOUBLE MN_delta; /* resolution */ static INT MN_accept; /* indicates whether correctly moved or not */ -static INT MN_MouseMoved; /* invert links at last pos if TRUE */ +static INT MN_MouseMoved; /* invert links at last pos if true */ static INT MN_LastMousePos[2]; /* store last mouse position */ static short MN_Resolution; /* resolution */ /*---------- working variables of 'EW_BndEval2d' ---------------------------*/ -static short BND_PlotBoundary; /* plot boundary if TRUE */ -static short BND_PlotNewFree; /* plot new free boundary if TRUE */ +static short BND_PlotBoundary; /* plot boundary if true */ +static short BND_PlotNewFree; /* plot new free boundary if true */ static VECDATA_DESC *BND_NewFree; /* vd describing globals of new free bdry */ static long BND_BndColor; /* use this color for the outer boundary */ static long BND_FreeBndColor; /* use this color for the free boundary */ @@ -637,7 +637,7 @@ static MULTIGRID *BND_MG; /* mg pointer */ static INT VM_Marker; /* plot markers for Vectors */ static long VN_MarkerColor[4]; /* colors of Markers (VCLASS dependent) */ -static INT VM_Type[MAXVECTORS]; /* plot only vectors of TRUE Types */ +static INT VM_Type[MAXVECTORS]; /* plot only vectors of true Types */ static long VM_DiagCol; /* color for diag entry */ static long VM_OffCol; /* color for offdiag entry */ static long VM_MColor; /* color of connections */ @@ -5844,14 +5844,14 @@ static INT VW_MatrixPreProcess (PICTURE *thePicture, WORK *theWork) d = sqrt((point0.x-point1.x)*(point0.x-point1.x)+(point0.y-point1.y)*(point0.y-point1.y)); if (d>MAT_FRAMESIZE) - MAT_frame = TRUE; + MAT_frame = true; else - MAT_frame = FALSE; + MAT_frame = false; if (d>4*MAT_TEXTSIZE*GetTextFactor()) - MAT_print = TRUE; + MAT_print = true; else - MAT_print = FALSE; + MAT_print = false; l_setindex(theGrid); @@ -6167,7 +6167,7 @@ INT NS_DIM_PREFIX SetOrderStrategy (INT OrderStrategy) return (1); /* to force ordering next time we plot */ - OE_force_ordering = TRUE; + OE_force_ordering = true; OE_OrderStrategy = OrderStrategy; return (0); @@ -7268,7 +7268,7 @@ static INT EW_PreProcess_MarkElement2D (PICTURE *thePicture, WORK *theWork) if (status==MOUSE_NOT_MOVED) { /* mark element containing the mouse point */ - ME2D_pointIn = TRUE; + ME2D_pointIn = true; point[_X_] = ME2D_xmin; point[_Y_] = ME2D_ymin; @@ -7277,7 +7277,7 @@ static INT EW_PreProcess_MarkElement2D (PICTURE *thePicture, WORK *theWork) } else /* mark elements with center of mass contained in rectangle */ - ME2D_pointIn = FALSE; + ME2D_pointIn = false; return (0); } @@ -7288,14 +7288,14 @@ static INT EW_MarkElementEval2D (ELEMENT *theElement, DRAWINGOBJ *theDO) DOUBLE_VECTOR cm; COORD_POINT a; - ME2D_found = FALSE; + ME2D_found = false; ME2D_elem = theElement; /* check element */ if (ME2D_pointIn) { if (PointInElement(ME2D_point,theElement)) - ME2D_found = TRUE; + ME2D_found = true; } else { @@ -7308,7 +7308,7 @@ static INT EW_MarkElementEval2D (ELEMENT *theElement, DRAWINGOBJ *theDO) /* in rectangle? */ if ((ME2D_xmin<=a.x) && (a.x<=ME2D_xmax)) if ((ME2D_ymin<=a.y) && (a.y<=ME2D_ymax)) - ME2D_found = TRUE; + ME2D_found = true; } return (0); @@ -7513,7 +7513,7 @@ static INT EW_PreProcess_VecMatBnd2D (PICTURE *thePicture, WORK *theWork) theMG = PO_MG(PIC_PO(thePicture)); BND_PlotBoundary = theVmo->Boundary; - BND_PlotNewFree = FALSE; + BND_PlotNewFree = false; BND_BndColor = theOD->blue; BND_FreeBndColor = theOD->green; BND_InnerBndColor = theOD->cyan; @@ -8170,8 +8170,8 @@ static INT EXT_PreProcess_MoveNode2D (PICTURE *thePicture, WORK *theWork) MN_ymin = MIN(PIC_GLL(thePicture)[_Y_],PIC_GUR(thePicture)[_Y_]); MN_ymax = MAX(PIC_GLL(thePicture)[_Y_],PIC_GUR(thePicture)[_Y_]); MN_MG = theMG; - MN_accept= FALSE; - MN_MouseMoved = FALSE; + MN_accept= false; + MN_MouseMoved = false; MN_LastMousePos[0] = W_INSERTNODE_WORK(theWork)->PixelX; MN_LastMousePos[1] = W_INSERTNODE_WORK(theWork)->PixelY; MN_Resolution = 100; @@ -8262,7 +8262,7 @@ static INT EXT_MoveNodeEval2D (DRAWINGOBJ *theDO, INT *end) WOP_DObjPnt = theDO; #endif - MN_accept = FALSE; + MN_accept = false; return (0); } if ((MousePos[1]<MN_ymin) || (MousePos[1]>MN_ymax)) @@ -8273,7 +8273,7 @@ static INT EXT_MoveNodeEval2D (DRAWINGOBJ *theDO, INT *end) WOP_DObjPnt = theDO; #endif - MN_accept = FALSE; + MN_accept = false; return (0); } @@ -8291,7 +8291,7 @@ static INT EXT_MoveNodeEval2D (DRAWINGOBJ *theDO, INT *end) V2_COPY(nbpos,DO_2Cp(theDO)); DO_inc_n(theDO,2); } } - MN_MouseMoved = TRUE; + MN_MouseMoved = true; /* mouse position in the physical system */ V2_TRAFOM3_V2(MousePos,InvObsTrafo,MN_pos); @@ -8310,7 +8310,7 @@ static INT EXT_MoveNodeEval2D (DRAWINGOBJ *theDO, INT *end) WOP_DObjPnt = theDO; #endif - MN_accept = FALSE; + MN_accept = false; return(0); } /* scan resolution points of the segment */ @@ -8347,7 +8347,7 @@ static INT EXT_MoveNodeEval2D (DRAWINGOBJ *theDO, INT *end) WOP_DObjPnt = theDO; #endif - MN_accept = FALSE; + MN_accept = false; return(0); } @@ -8367,7 +8367,7 @@ static INT EXT_MoveNodeEval2D (DRAWINGOBJ *theDO, INT *end) WOP_DObjPnt = theDO; #endif - MN_accept = TRUE; + MN_accept = true; return (0); } @@ -8389,7 +8389,7 @@ static INT EXT_MoveNodeEval2D (DRAWINGOBJ *theDO, INT *end) #endif } - *end = TRUE; + *end = true; return (0); } @@ -8403,7 +8403,7 @@ static INT EXT_PostProcess_MoveNode2D (PICTURE *thePicture, WORK *theWork) theVertex = MYVERTEX(MN_Node); if (OBJT(theVertex)==IVOBJ) { - if (MoveNode(MN_MG,MN_Node,MN_pos,TRUE)!=GM_OK) + if (MoveNode(MN_MG,MN_Node,MN_pos,true)!=GM_OK) return (1); return (0); } @@ -8413,7 +8413,7 @@ static INT EXT_PostProcess_MoveNode2D (PICTURE *thePicture, WORK *theWork) "on the boundary only midnodes can be moved"); return (1); } - if (MoveMidNode (MN_MG,MN_Node,MN_lambda,TRUE)) + if (MoveMidNode (MN_MG,MN_Node,MN_lambda,true)) return (1); } @@ -9465,7 +9465,7 @@ static INT EXT_NodesEval2D (DRAWINGOBJ *theDO, INT *end) WOP_DObjPnt = theDO; #endif - *end = TRUE; + *end = true; return (0); } @@ -10093,7 +10093,7 @@ static INT EW_EScalar2D (ELEMENT *theElement, DRAWINGOBJ *theDO) n = CORNERS_OF_ELEM(theElement); /* get coordinates of corners of the element */ - found = FALSE; + found = false; n = CORNERS_OF_ELEM(theElement); for (i=0; i<n; i++) { @@ -10101,7 +10101,7 @@ static INT EW_EScalar2D (ELEMENT *theElement, DRAWINGOBJ *theDO) if (!found) { corners[i].x = x[i][_X_]; corners[i].y = x[i][_Y_]; - if (PointInPolygon(PhysRect,4,corners[i])) found=TRUE; + if (PointInPolygon(PhysRect,4,corners[i])) found=true; } } @@ -10584,7 +10584,7 @@ static INT EW_EVector2D (ELEMENT *theElement, DRAWINGOBJ *theDO) DOUBLE_VECTOR Arrow; /* get coordinates of corners of the element and their z coordinates in cut system */ - found = FALSE; + found = false; n = CORNERS_OF_ELEM(theElement); for (i=0; i<n; i++) { @@ -10592,7 +10592,7 @@ static INT EW_EVector2D (ELEMENT *theElement, DRAWINGOBJ *theDO) if (!found) { corners[i].x = x[i][_X_]; corners[i].y = x[i][_Y_]; - if (PointInPolygon(PhysRect,4,corners[i])) found=TRUE; + if (PointInPolygon(PhysRect,4,corners[i])) found=true; } V2_COPY(x[i],Poly[i]); } @@ -13008,7 +13008,7 @@ static DRAWINGOBJ *ElementNodes (ELEMENT *theElement, DRAWINGOBJ *theDO, INT Vie break; if (k>=nplot) { - SETUSED(CORNER(theElement,corn),TRUE); + SETUSED(CORNER(theElement,corn),true); EE3D_PlotNode[nplot++] = corn; if (IsNodeSelected(GElem_MG,CORNER(theElement,corn))) InvNode[ninv++] = corn; @@ -13115,7 +13115,7 @@ static DRAWINGOBJ *ElementVectors (ELEMENT *theElement, DRAWINGOBJ *theDO, INT V break; if (k>=nplotNDV) { - SETVCUSED(vec,TRUE); + SETVCUSED(vec,true); EE3D_ndv[nplotNDV++] = vec; if (IsVectorSelected(GElem_MG,vec)) InvNDV[ninvNDV++] = vec; @@ -13137,7 +13137,7 @@ static DRAWINGOBJ *ElementVectors (ELEMENT *theElement, DRAWINGOBJ *theDO, INT V /* we don't have to check VCUSED flag */ vec = SVECTOR(theElement,i); - /* SETVCUSED(vec,TRUE); */ + /* SETVCUSED(vec,true); */ EE3D_sdv[nplotSDV++] = vec; if (IsVectorSelected(GElem_MG,vec)) InvSDV[ninvSDV++] = vec; @@ -13169,7 +13169,7 @@ static DRAWINGOBJ *ElementVectors (ELEMENT *theElement, DRAWINGOBJ *theDO, INT V break; if (k>=nplotEDV) { - SETVCUSED(vec,TRUE); + SETVCUSED(vec,true); EE3D_edv[nplotEDV++] = vec; if (IsVectorSelected(GElem_MG,vec)) InvEDV[ninvEDV++] = vec; @@ -18352,7 +18352,7 @@ static INT OrderElements_3D (MULTIGRID *mg, VIEWEDOBJ *vo, INT bullet) } } - OE_force_ordering = FALSE; + OE_force_ordering = false; #endif /* inits */ @@ -18719,7 +18719,7 @@ static INT EXT_VecMatEval3D (DRAWINGOBJ *theDO, INT *end) WOP_DObjPnt = theDO; #endif - *end = TRUE; + *end = true; return (0); } @@ -18775,7 +18775,7 @@ static void ResetNodeUsed (MULTIGRID *theMG) for (l=0; l<=CURRENTLEVEL(theMG); l++) for (nd=FIRSTNODE(GRID_ON_LEVEL(theMG,l)); nd!=NULL; nd=SUCCN(nd)) - SETUSED(nd,FALSE); + SETUSED(nd,false); } static void ResetVectorUsed (MULTIGRID *theMG) @@ -18785,7 +18785,7 @@ static void ResetVectorUsed (MULTIGRID *theMG) for (l=0; l<=CURRENTLEVEL(theMG); l++) for (vec=FIRSTVECTOR(GRID_ON_LEVEL(theMG,l)); vec!=NULL; vec=SUCCVC(vec)) - SETVCUSED(vec,FALSE); + SETVCUSED(vec,false); } static INT EW_PreProcess_PlotGrid3D (PICTURE *thePicture, WORK *theWork) @@ -18856,7 +18856,7 @@ static INT EW_PreProcess_PlotGrid3D (PICTURE *thePicture, WORK *theWork) ResetVectorUsed(theMG); } else - EE3D_Nodes = EE3D_Vectors = FALSE; + EE3D_Nodes = EE3D_Vectors = false; switch (theGpo->WhichElem) { @@ -20841,7 +20841,7 @@ static INT EW_PostProcess_Isosurface3D_FR(PICTURE *thePicture, WORK *theWork) . pos - draw text here (the lower left corner is the origin) . text - text to draw . size - texz size (if 0 take default) - . center - center text at position if TRUE + . center - center text at position if true . inverse - draw text inverse (rather than black) DESCRIPTION: @@ -22587,7 +22587,7 @@ INT NS_DIM_PREFIX DragPicture (PICTURE *thePicture, const INT *StartMousePos) else V3_TRAFOM4_V3(OldMousePos,InvObsTrafo,oldpos) - rejected = MouseMoved = FALSE; + rejected = MouseMoved = false; V3_COPY(OldMousePos,LastMousePos); while (MouseStillDown()) { @@ -22598,7 +22598,7 @@ INT NS_DIM_PREFIX DragPicture (PICTURE *thePicture, const INT *StartMousePos) /* inside picture? */ if ((MousePos[0]<xmin) || (MousePos[0]>xmax) || (MousePos[1]<ymin) || (MousePos[1]>ymax)) { - rejected = TRUE; + rejected = true; break; } @@ -22613,7 +22613,7 @@ INT NS_DIM_PREFIX DragPicture (PICTURE *thePicture, const INT *StartMousePos) UgInverseLine(FrameUL,FrameLL); } - MouseMoved = TRUE; + MouseMoved = true; /* calculate shifted picture frame in screen coords */ V2_SUBTRACT(MousePos,OldMousePos,shift); @@ -23378,7 +23378,7 @@ INT NS_DIM_PREFIX RotatePicture (PICTURE *thePicture, const INT *OldMousePos) /* invert tripod (dipod?) */ InvertTripod2d(TP_sc,TP_ph,RotMat,unit); - rejected = MouseMoved = FALSE; + rejected = MouseMoved = false; while (MouseStillDown()) { MousePosition(MousePos); @@ -23388,7 +23388,7 @@ INT NS_DIM_PREFIX RotatePicture (PICTURE *thePicture, const INT *OldMousePos) /* inside picture? */ if ((MousePos[0]<xmin) || (MousePos[0]>xmax) || (MousePos[1]<ymin) || (MousePos[1]>ymax)) { - rejected = TRUE; + rejected = true; break; } @@ -23396,7 +23396,7 @@ INT NS_DIM_PREFIX RotatePicture (PICTURE *thePicture, const INT *OldMousePos) InvertTripod2d(TP_sc,TP_ph,RotMat,unit); V2_COPY(MousePos,LastMousePos); - MouseMoved = TRUE; + MouseMoved = true; if (RotObsTrafo2d(ScreenMid,OldMousePos,LastMousePos,RotMat)) return (1); @@ -23493,7 +23493,7 @@ INT NS_DIM_PREFIX RotatePicture (PICTURE *thePicture, const INT *OldMousePos) /* invert tripod */ InvertTripod3d(TP_sc,TP_ph,PhysRotMat,unit); - rejected = MouseMoved = FALSE; + rejected = MouseMoved = false; while (MouseStillDown()) { MousePosition(MousePos); @@ -23503,7 +23503,7 @@ INT NS_DIM_PREFIX RotatePicture (PICTURE *thePicture, const INT *OldMousePos) /* inside picture? */ if ((MousePos[0]<xmin) || (MousePos[0]>xmax) || (MousePos[1]<ymin) || (MousePos[1]>ymax)) { - rejected = TRUE; + rejected = true; break; } @@ -23516,7 +23516,7 @@ INT NS_DIM_PREFIX RotatePicture (PICTURE *thePicture, const INT *OldMousePos) M3_TIMES_M3(AuxMat,ObsTrafoRot,PhysRotMat); V2_COPY(MousePos,LastMousePos); - MouseMoved = TRUE; + MouseMoved = true; /* invert new tripod */ InvertTripod3d(TP_sc,TP_ph,PhysRotMat,unit); @@ -23683,7 +23683,7 @@ INT NS_DIM_PREFIX RotateCut (PICTURE *thePicture, const INT *OldMousePos) /* invert cut */ InvertCut(PP_sc,PP_ph,PhysRotMat,cut_pn,cut_px,cut_py); - rejected = MouseMoved = FALSE; + rejected = MouseMoved = false; while (MouseStillDown()) { MousePosition(MousePos); @@ -23693,7 +23693,7 @@ INT NS_DIM_PREFIX RotateCut (PICTURE *thePicture, const INT *OldMousePos) /* inside picture? */ if ((MousePos[0]<xmin) || (MousePos[0]>xmax) || (MousePos[1]<ymin) || (MousePos[1]>ymax)) { - rejected = TRUE; + rejected = true; break; } @@ -23706,7 +23706,7 @@ INT NS_DIM_PREFIX RotateCut (PICTURE *thePicture, const INT *OldMousePos) M3_TIMES_M3(AuxMat,ObsTrafoRot,PhysRotMat); V2_COPY(MousePos,LastMousePos); - MouseMoved = TRUE; + MouseMoved = true; /* invert new cut icon */ InvertCut(PP_sc,PP_ph,PhysRotMat,cut_pn,cut_px,cut_py); @@ -23838,7 +23838,7 @@ INT NS_DIM_PREFIX MoveCut (PICTURE *thePicture, const INT *OldMousePos) InvertControl(xmin,xmax,ym,curr); InvertSlider (xm,dx,ym,curr,LastMousePos[_X_]); - rejected = MouseMoved = FALSE; + rejected = MouseMoved = false; while (MouseStillDown()) { MousePosition(MousePos); @@ -23848,7 +23848,7 @@ INT NS_DIM_PREFIX MoveCut (PICTURE *thePicture, const INT *OldMousePos) /* inside picture? */ if ((MousePos[0]<xmin) || (MousePos[0]>xmax) || (MousePos[1]<ymin) || (MousePos[1]>ymax)) { - rejected = TRUE; + rejected = true; break; } @@ -23856,7 +23856,7 @@ INT NS_DIM_PREFIX MoveCut (PICTURE *thePicture, const INT *OldMousePos) InvertSlider (xm,dx,ym,curr,LastMousePos[_X_]); V2_COPY(MousePos,LastMousePos); - MouseMoved = TRUE; + MouseMoved = true; /* invert slider */ InvertSlider (xm,dx,ym,curr,LastMousePos[_X_]); diff --git a/graphics/uggraph/wpm.cc b/graphics/uggraph/wpm.cc index 2bd0e1efa..ef3315d7b 100644 --- a/graphics/uggraph/wpm.cc +++ b/graphics/uggraph/wpm.cc @@ -1838,7 +1838,7 @@ INT NS_DIM_PREFIX CopyView (const PICTURE *mypic, INT all, INT cut) myViewDim = PO_DIM(thePlotObj); if (cut && !PO_USESCUT(VO_PO(myvo))) - cut = FALSE; + cut = false; for (theUGW=GetFirstUgWindow(); theUGW!=NULL; theUGW=GetNextUgWindow(theUGW)) { @@ -2729,10 +2729,10 @@ static INT InitMatrixPlotObject (PLOTOBJ *thePlotObj, INT argc, char **argv) { theMpo->min =-4.0; theMpo->max = 4.0; - theMpo->log = FALSE; - theMpo->conn = TRUE; - theMpo->extra = FALSE; - theMpo->rel = FALSE; + theMpo->log = false; + theMpo->conn = true; + theMpo->extra = false; + theMpo->rel = false; theMpo->EvalFct = NULL; theMpo->Matrix = NULL; theMpo->dash = 0.0; diff --git a/low/debug.h b/low/debug.h index 1b1a619da..4c78dda28 100644 --- a/low/debug.h +++ b/low/debug.h @@ -72,8 +72,8 @@ #ifdef ModelP #define REP_ERR_RETURN(err) { assert(((err)==0));return (err);} #define REP_ERR_RETURN_PTR(p) { assert(((p)!=NULL));return (p);} -#define REP_ERR_RETURN_VOID { assert(FALSE);return;} -#define REP_ERR_GOTO(st,lbl) { st; assert(FALSE); goto lbl;} +#define REP_ERR_RETURN_VOID { assert(false);return;} +#define REP_ERR_GOTO(st,lbl) { st; assert(false); goto lbl;} #else #define REP_ERR_RETURN(err) { if (err) REP_ERR_INC return (err);} #define REP_ERR_RETURN_PTR(p) { if (p == NULL) REP_ERR_INC return (p);} @@ -107,7 +107,7 @@ #define REP_ERR_RETURN_PTR(p) {return (p);} #define REP_ERR_RETURN_VOID {return;} #define REP_ERR_GOTO(st,lbl) {st; goto lbl;} -#define REP_ERR_ENCOUNTERED (FALSE) +#define REP_ERR_ENCOUNTERED (false) #define REP_ERR_INC #define REP_ERR_RESET #define REP_ERR_FILE diff --git a/low/defaults.cc b/low/defaults.cc index 5b592364c..5f3e3e8a9 100644 --- a/low/defaults.cc +++ b/low/defaults.cc @@ -232,12 +232,12 @@ static INT GetPathedUGRCValue (const char *path, const char *name, char *value, INT NS_PREFIX GetDefaultValue (const char *filename, const char *name, char *value) { #ifdef ModelP - static int already_called = FALSE; + static int already_called = false; if (already_called) return GetLocalizedDefaultValue(NULL,name,value); else - already_called = TRUE; + already_called = true; #endif PRINTDEBUG(low,2,("GetDefaultValue\n")); @@ -256,7 +256,7 @@ INT NS_PREFIX GetDefaultValue (const char *filename, const char *name, char *val } } else if (strcmp(filename,UGRC_NAME)!=0) - ASSERT(FALSE); /* try GetLocalizedDefaultValue */ + ASSERT(false); /* try GetLocalizedDefaultValue */ /* localize defaults file */ { diff --git a/low/fileopen.cc b/low/fileopen.cc index 15df11116..61d71b839 100644 --- a/low/fileopen.cc +++ b/low/fileopen.cc @@ -388,7 +388,7 @@ static int rename_if_necessary( const char *fname, int do_rename) PARAMETERS: . fname - directory name with path convention in UNIX-style; may not be passed through BasedConvertedFilename() . mode - creation mode in UNIX-style (see mkdir(2)) - . do_rename - if TRUE an already existing subdirectory will be renamed + . do_rename - if true an already existing subdirectory will be renamed DESCRIPTION: This function creates an directory and renames an already existing one @@ -451,7 +451,7 @@ int NS_PREFIX mkdir_r (const char *fname, mode_t mode, int do_rename) PARAMETERS: . fname - file name with path convention in UNIX-style . mode - file opening mode in UNIX-style (see fopen(2)) - . do_rename - if TRUE an already existing file will be renamed + . do_rename - if true an already existing file will be renamed DESCRIPTION: This function opens a file and renames an already existing one @@ -673,7 +673,7 @@ INT NS_PREFIX DirWalk (const char *dir, ProcessFileProc fcn) hpb.ioNamePtr = c2pstr((char *)dirname); hpb.ioVRefNum = 0; /* use pathname, not ref num */ hpb.ioVolIndex = -1; /* don't use volume index either */ - err = PBHGetVInfo( (HParmBlkPtr)&hpb, FALSE ); + err = PBHGetVInfo( (HParmBlkPtr)&hpb, false ); if (err) { if (err==nsvErr) /* No such volume error */ REP_ERR_RETURN (VOLUME_NOT_FOUND); @@ -691,7 +691,7 @@ INT NS_PREFIX DirWalk (const char *dir, ProcessFileProc fcn) fpb->ioNamePtr = c2pstr((char *)dirname); fpb->ioDirID = 0; /* search from working directory */ fpb->ioFDirIndex = 0; /* gimme info about the named directory */ - err = PBGetCatInfo( &cipbr, FALSE ); /* get the catalog info */ + err = PBGetCatInfo( &cipbr, false ); /* get the catalog info */ if (err) { /* No such volume */ if (err == nsvErr) REP_ERR_RETURN (VOLUME_NOT_FOUND); @@ -720,13 +720,13 @@ INT NS_PREFIX DirWalk (const char *dir, ProcessFileProc fcn) /* now loop through files using PBGetCatInfo... */ fpb->ioVRefNum = volID; - for( idx=1; TRUE; idx++) { + for( idx=1; true; idx++) { char name[MAX_PATH_LEN]; fpb->ioDirID = dirID; /* set ioDirID on each loop */ fpb->ioFDirIndex = idx; /* index of entry to return */ - err = PBGetCatInfo( &cipbr, FALSE ); + err = PBGetCatInfo( &cipbr, false ); if (err) break; /* exit when no more entries */ if (strlen(parentdir)+pstrlen(fpb->ioNamePtr)+2 > sizeof(name)) @@ -867,7 +867,7 @@ INT NS_PREFIX ReadSearchingPaths (const char *filename, const char *paths) int NS_PREFIX DirCreateUsingSearchPaths (const char *fname, const char *paths) { - return DirCreateUsingSearchPaths_r ( fname, paths, FALSE); /* no renaming */ + return DirCreateUsingSearchPaths_r ( fname, paths, false); /* no renaming */ } /****************************************************************************/ @@ -882,7 +882,7 @@ int NS_PREFIX DirCreateUsingSearchPaths (const char *fname, const char *paths) . fname - subdirectory name to be created . paths - try paths specified in the environment item '/Paths/<paths>' which was set by --> 'ReadSearchingPaths' - . rename - if TRUE an already existing subdirectory will be renamed + . rename - if true an already existing subdirectory will be renamed DESCRIPTION: The functions trys to create a subdirectory with 'filename' using one by one the @@ -987,7 +987,7 @@ int NS_PREFIX DirCreateUsingSearchPaths_r (const char *fname, const char *paths, FILE * NS_PREFIX FileOpenUsingSearchPaths (const char *fname, const char *mode, const char *paths) { - return FileOpenUsingSearchPaths_r( fname, mode, paths, FALSE ); /* no renaming */ + return FileOpenUsingSearchPaths_r( fname, mode, paths, false ); /* no renaming */ } /****************************************************************************/ @@ -1003,7 +1003,7 @@ FILE * NS_PREFIX FileOpenUsingSearchPaths (const char *fname, const char *mode, . mode - see ANSI-C 'fopen' . paths - try paths specified in the environment item '/Paths/<paths>' which was set by --> 'ReadSearchingPaths' - . rename - if TRUE an already existing file will be renamed (wise only for writing) + . rename - if true an already existing file will be renamed (wise only for writing) DESCRIPTION: The functions trys to open the file with 'filename' using one by one the @@ -1077,7 +1077,7 @@ FILE * NS_PREFIX FileOpenUsingSearchPaths_r (const char *fname, const char *mode FILE * NS_PREFIX FileOpenUsingSearchPath (const char *fname, const char *mode, const char *path) { - return FileOpenUsingSearchPath_r( fname, mode, path, FALSE ); /* no renaming */ + return FileOpenUsingSearchPath_r( fname, mode, path, false ); /* no renaming */ } /****************************************************************************/ @@ -1091,7 +1091,7 @@ FILE * NS_PREFIX FileOpenUsingSearchPath (const char *fname, const char *mode, c . fname - open file with this name . mode - see ANSI-C 'fopen' . path - path to which fname is to be appended - . rename - if TRUE an already existing file will be renamed (wise only for writing) + . rename - if true an already existing file will be renamed (wise only for writing) DESCRIPTION: Try to open a file in the specified path. diff --git a/low/heaps.cc b/low/heaps.cc index 38baafb09..43d07e5e4 100644 --- a/low/heaps.cc +++ b/low/heaps.cc @@ -434,7 +434,7 @@ void *NS_PREFIX GetMemUsingKey (HEAP *theHeap, MEM n, enum HeapAllocMode mode, I * key < topStackPtr: stack pos already released */ if (key != theHeap->topStackPtr) { - ASSERT(FALSE); + ASSERT(false); return(NULL); } @@ -446,7 +446,7 @@ void *NS_PREFIX GetMemUsingKey (HEAP *theHeap, MEM n, enum HeapAllocMode mode, I #endif } /* not marked */ - ASSERT(FALSE); + ASSERT(false); return(NULL); } if (mode==FROM_BOTTOM) @@ -457,7 +457,7 @@ void *NS_PREFIX GetMemUsingKey (HEAP *theHeap, MEM n, enum HeapAllocMode mode, I * key < bottomStackPtr: stack pos already released */ if (key != theHeap->bottomStackPtr) { - ASSERT(FALSE); + ASSERT(false); return(NULL); } #if UG_USE_SYSTEM_HEAP @@ -468,11 +468,11 @@ void *NS_PREFIX GetMemUsingKey (HEAP *theHeap, MEM n, enum HeapAllocMode mode, I #endif } /* not marked */ - ASSERT(FALSE); + ASSERT(false); return(NULL); } /* wrong mode */ - ASSERT(FALSE); + ASSERT(false); return(NULL); } /* no key for GENERAL_HEAP */ @@ -625,7 +625,7 @@ void NS_PREFIX DisposeMem (HEAP *theHeap, void *buffer) } /* here must be something wrong */ - assert(FALSE); + assert(false); return; #endif } @@ -858,13 +858,13 @@ INT NS_PREFIX Release (HEAP *theHeap, INT mode, INT key) if (key>theHeap->topStackPtr) { /* Mark/Release calls not balanced */ - ASSERT(FALSE); + ASSERT(false); return(1); } if (key<theHeap->topStackPtr) { /* stack pos already released */ - ASSERT(FALSE); + ASSERT(false); return(2); } oldsize = theHeap->heapptr->size; @@ -884,13 +884,13 @@ INT NS_PREFIX Release (HEAP *theHeap, INT mode, INT key) if (key>theHeap->bottomStackPtr) { /* Mark/Release calls not balanced */ - ASSERT(FALSE); + ASSERT(false); return(3); } if (key<theHeap->bottomStackPtr) { /* stack pos already released */ - ASSERT(FALSE); + ASSERT(false); return(4); } oldsize = theHeap->heapptr->size; @@ -1012,9 +1012,9 @@ INT NS_PREFIX InitVirtualHeapManagement (VIRT_HEAP_MGMT *theVHM, MEM TotalSize) /* now init what is necessary */ if (TotalSize==SIZE_UNKNOWN) - theVHM->locked = FALSE; + theVHM->locked = false; else - theVHM->locked = TRUE; + theVHM->locked = true; theVHM->TotalSize = TotalSize; theVHM->TotalUsed = 0; @@ -1046,9 +1046,9 @@ MEM NS_PREFIX CalcAndFixTotalSize (VIRT_HEAP_MGMT *theVHM) if (theVHM==NULL) return (99); - assert(theVHM->locked!=TRUE); + assert(theVHM->locked!=true); - theVHM->locked = TRUE; + theVHM->locked = true; theVHM->TotalSize = theVHM->TotalUsed; theVHM->LargestGap = 0; theVHM->nGaps = 0; diff --git a/low/heaps.h b/low/heaps.h index 18b597f59..9d2c111db 100644 --- a/low/heaps.h +++ b/low/heaps.h @@ -173,11 +173,11 @@ typedef struct { typedef struct { - INT locked; /**< If TRUE the TotalSize is fixed */ + INT locked; /**< If true the TotalSize is fixed */ MEM TotalSize; /**< Total size of the associated heap */ MEM TotalUsed; /**< Total size used */ INT UsedBlocks; /**< Number of blocks initialized */ - INT nGaps; /**< TRUE if a gap between exist. blocks */ + INT nGaps; /**< true if a gap between exist. blocks */ MEM LargestGap; /**< Largest free gap between blocks */ BLOCK_DESC BlockDesc[MAXNBLOCKS]; /**< The different block descriptors */ diff --git a/low/misc.h b/low/misc.h index da806e26b..f0b4166d4 100644 --- a/low/misc.h +++ b/low/misc.h @@ -124,7 +124,7 @@ START_UG_NAMESPACE #define OFF 0 #define BOOL_2_YN(b) ((b) ? "YES" : "NO") -#define BOOL_2_TF(b) ((b) ? "TRUE" : "FALSE") +#define BOOL_2_TF(b) ((b) ? "true" : "false") #define BOOL_2_NF(b) ((b) ? "ON" : "OFF") /* switching by strings */ diff --git a/low/ugenv.h b/low/ugenv.h index 28d4e598b..fdb8c8c54 100644 --- a/low/ugenv.h +++ b/low/ugenv.h @@ -110,7 +110,7 @@ enum {SEARCHALL = -1}; /*!< Scan through all directories /** \brief This macro returns a pointer to the name string of the 'ENVITEM'. */ #define ENVITEM_NAME(p) (((ENVITEM *)(p))->v.name) -/** \brief 'RemoveEnvItem' checks this and returns an error if TRUE. */ +/** \brief 'RemoveEnvItem' checks this and returns an error if true. */ #define ENVITEM_LOCKED(p) (((ENVITEM *)(p))->v.locked) /****************************************************************************/ diff --git a/low/ugstruct.cc b/low/ugstruct.cc index b4516a156..76b9ab123 100644 --- a/low/ugstruct.cc +++ b/low/ugstruct.cc @@ -1263,7 +1263,7 @@ static INT DirOut (const ENVDIR *theDir, char *buffer, int bufLen, int ropt) } status=0; - } while (TRUE); + } while (true); return(6); /* this should never be reached */ } diff --git a/low/ugtypes.h b/low/ugtypes.h index 49471a089..fa98f6ff8 100644 --- a/low/ugtypes.h +++ b/low/ugtypes.h @@ -58,10 +58,6 @@ typedef float SCREEN_COORD; #endif -typedef bool BOOL; -#define TRUE true -#define FALSE false - END_UG_NAMESPACE #endif diff --git a/np/algebra/amgtools.cc b/np/algebra/amgtools.cc index 440fd96ba..a07d9b532 100644 --- a/np/algebra/amgtools.cc +++ b/np/algebra/amgtools.cc @@ -1701,14 +1701,14 @@ static INT bfs (FIFO *Fifo, VECTOR *theSeedVector, continue; /* j is always labeled (so: don't put in fifo again!)! */ /* run over all vectors vk adjacent to vj: */ - no_coarse_neighbor = TRUE; + no_coarse_neighbor = true; for (mjk=MNEXT(VSTART(vj)); mjk!=NULL; mjk=MNEXT(mjk)) { vk = MDEST(mjk); if ( VCCOARSE(vk) ) if (STRONG(mjk)) { - no_coarse_neighbor = FALSE; + no_coarse_neighbor = false; break; } } diff --git a/np/algebra/ff.cc b/np/algebra/ff.cc index f544fccee..2010e1eb7 100644 --- a/np/algebra/ff.cc +++ b/np/algebra/ff.cc @@ -186,7 +186,7 @@ INT NS_DIM_PREFIX TFFCalculateTheta( const BLOCKVECTOR *bv_dest, #ifdef THETA_EXACT dcopyBS( bv_source, aux4_COMP, aux_comp ); dsetBS( bv_source, aux_comp, 0.0 ); - gs_solveBS ( bv_source, bvd_source, bvdf, 1e-16, 100, Theta_comp, aux_comp, aux4_COMP, aux5_COMP, TRUE ); + gs_solveBS ( bv_source, bvd_source, bvdf, 1e-16, 100, Theta_comp, aux_comp, aux4_COMP, aux5_COMP, true ); #else #ifdef ModelP FFMultWithMInv( bv_source, bvd_source, bvdf, aux_comp, aux_comp, NULL, NULL ); @@ -207,12 +207,12 @@ INT NS_DIM_PREFIX TFFCalculateTheta( const BLOCKVECTOR *bv_dest, val = VVALUE( v_dest, tv_comp ); if ( fabs( val ) < FFsmallTV ) { - SETVCUSED( v_dest, TRUE ); + SETVCUSED( v_dest, true ); missed++; } else { - SETVCUSED( v_dest, FALSE ); + SETVCUSED( v_dest, false ); m = GetMatrix( v_source, v_dest ); ASSERT( m != NULL ); MVALUE( m, Theta_comp ) = MVALUE( MADJ(m), Theta_comp ) = VVALUE( v_source, aux_comp ) / val; @@ -241,21 +241,21 @@ INT NS_DIM_PREFIX TFFCalculateTheta( const BLOCKVECTOR *bv_dest, missed--; pred_dest = succ_dest = v_dest; pred_source = succ_source = v_source; - pred_found = succ_found = FALSE; - pred_in_block = succ_in_block = TRUE; + pred_found = succ_found = false; + pred_in_block = succ_in_block = true; while ( !pred_found && !succ_found && (pred_in_block || succ_in_block) ) { if ( !VCUSED( pred_dest ) && pred_in_block ) { pred_val = MVALUE( GetMatrix( pred_source, pred_dest ), Theta_comp ); - pred_found = TRUE; + pred_found = true; } if ( !VCUSED( succ_dest ) && succ_in_block ) { succ_val = MVALUE( GetMatrix( succ_source, succ_dest ), Theta_comp ); - succ_found = TRUE; + succ_found = true; } if ( pred_in_block ) @@ -492,7 +492,7 @@ INT NS_DIM_PREFIX FFCalculateThetaAndUpdate( const BLOCKVECTOR *bv_dest, MVALUE( MADJ(m_offdiag), T_comp ) = MVALUE(MADJ(m_offdiag), K_comp ) - off_val; } else - ASSERT(FALSE); + ASSERT(false); a1 = VVALUE( vip1, aux1_comp ) - off_val*e1i; a2 = VVALUE( vip1, aux2_comp ) - off_val*e2i; @@ -573,7 +573,7 @@ static INT FFO0CalculateThetaAndUpdate( const BLOCKVECTOR *bv_dest, tvval = VVALUE( vi, tv_comp ); if ( fabs(tvval) < SMALL_D ) { - SETVCUSED( vi, TRUE ); + SETVCUSED( vi, true ); missed++; /*PRINTDEBUG( np, 0, ("FFO0CalculateThetaAndUpdate: testvector entry was 0\n") ); printf("tv\n"); printvBS(bv_dest, tv_comp); @@ -581,7 +581,7 @@ static INT FFO0CalculateThetaAndUpdate( const BLOCKVECTOR *bv_dest, } else { - SETVCUSED( vi, FALSE ); + SETVCUSED( vi, false ); MVALUE( VSTART(vi), T_comp ) = MVALUE( VSTART(vi), K_comp ) - VVALUE( vi, aux_comp ) / tvval; } diff --git a/np/algebra/ff_gen.cc b/np/algebra/ff_gen.cc index 32c1e9e1a..3db80d424 100644 --- a/np/algebra/ff_gen.cc +++ b/np/algebra/ff_gen.cc @@ -212,7 +212,7 @@ static INT HasDirichletNeighbour( const VECTOR *v ) register LINK *link; register VERTEX *nb_vertex; - ASSERT(FALSE); /* neues boundary konzept einbauen */ + ASSERT(false); /* neues boundary konzept einbauen */ REP_ERR_RETURN(1); register VSEGMENT *vseg; @@ -247,11 +247,11 @@ static INT HasDirichletNeighbour( const VECTOR *v ) &value, &type ); if ( type == DIRICHLET ) - return TRUE; + return true; } } - return FALSE; + return false; } #endif /* NIE_DAA */ @@ -952,7 +952,7 @@ static void MeshwidthForFFConstructTestvector_loc( const VECTOR *v, const VECTOR if( (*meshwidth = fabs( *coord - pos2[1] )) <= 1e-6 ) { /* if not on the same vertical line then an error */ - /* ASSERT( FALSE );*/ /* comment out because of cross points */ + /* ASSERT( false );*/ /* comment out because of cross points */ } } @@ -1458,7 +1458,7 @@ INT NS_DIM_PREFIX FFMultWithMInv( if ( BV_IS_LEAF_BV(bv_i) ) solveLUMatBS( bv_i, bvd_i, bvdf, aux_comp, DECOMPMAT_ON_LEVEL( bv_i ), b_comp ); else - gs_solveBS ( bv_i, bvd_i, bvdf, 5e-14, 1000, L_comp, aux_comp, b_comp, auxA_comp, TRUE, TRUE ); + gs_solveBS ( bv_i, bvd_i, bvdf, 5e-14, 1000, L_comp, aux_comp, b_comp, auxA_comp, true, true ); #else #ifdef ModelP FFMultWithMInv( bv_i, bvd_i, bvdf, aux_comp, b_comp, NULL, NULL ); @@ -1498,7 +1498,7 @@ INT NS_DIM_PREFIX FFMultWithMInv( else*/ { dcopyBS( bv_i, auxB_comp, b_comp ); /* necessary if b_comp == v_comp */ - gs_solveBS ( bv_i, bvd_i, bvdf, 5e-14, 1000, L_comp, v_comp, auxB_comp, auxA_comp, TRUE, TRUE ); + gs_solveBS ( bv_i, bvd_i, bvdf, 5e-14, 1000, L_comp, v_comp, auxB_comp, auxA_comp, true, true ); } #else #ifdef ModelP @@ -1562,7 +1562,7 @@ INT NS_DIM_PREFIX FFMultWithMInv( else*/ { dcopyBS( bv_i, auxB_comp, v_comp ); - gs_solveBS ( bv_i, bvd_i, bvdf, 5e-14, 1000, L_comp, v_comp, auxB_comp, auxA_comp, TRUE, TRUE ); + gs_solveBS ( bv_i, bvd_i, bvdf, 5e-14, 1000, L_comp, v_comp, auxB_comp, auxA_comp, true, true ); } #else #ifdef ModelP diff --git a/np/algebra/ff_gen.h b/np/algebra/ff_gen.h index bc490bcf3..819b873ae 100644 --- a/np/algebra/ff_gen.h +++ b/np/algebra/ff_gen.h @@ -86,8 +86,8 @@ START_UGDIM_NAMESPACE CAUTION: the sequence of free's must be exctly the reverse of the get's! */ #ifdef Debug #define GET_AUX_VEC ( (TOS_FF_Vecs<FF_MAX_VECS) ? FF_Vecs[TOS_FF_Vecs++] : -1 ) -/* tricky: enforce, that TOS_FF_Vecs-- and ASSERT(FALSE) have the same type */ -#define FREE_AUX_VEC(vec) ( (vec==FF_Vecs[TOS_FF_Vecs-1]) ? (TOS_FF_Vecs--) : (ASSERT(FALSE),0) ); +/* tricky: enforce, that TOS_FF_Vecs-- and ASSERT(false) have the same type */ +#define FREE_AUX_VEC(vec) ( (vec==FF_Vecs[TOS_FF_Vecs-1]) ? (TOS_FF_Vecs--) : (ASSERT(false),0) ); #else #define GET_AUX_VEC (FF_Vecs[TOS_FF_Vecs++]) #define FREE_AUX_VEC(vec) (TOS_FF_Vecs--); diff --git a/np/algebra/fvgeom.cc b/np/algebra/fvgeom.cc index fb4305d12..67ca18827 100644 --- a/np/algebra/fvgeom.cc +++ b/np/algebra/fvgeom.cc @@ -1574,7 +1574,7 @@ INT NS_DIM_PREFIX GetMJRawPositiveUpwindShapes (const FVElementGeometry *geo, co { /* dimensionless flux is small */ ipflow[ip] = 0.0; - noflow[ip] = TRUE; + noflow[ip] = true; found++; /* use linear combination of from and to node */ @@ -1582,7 +1582,7 @@ INT NS_DIM_PREFIX GetMJRawPositiveUpwindShapes (const FVElementGeometry *geo, co NodalShape[ip][SCVF_TO (FVG_SCVF(geo,ip))] = 0.5; } else - noflow[ip] = FALSE; + noflow[ip] = false; } if (found==ni) @@ -1616,7 +1616,7 @@ INT NS_DIM_PREFIX GetMJRawPositiveUpwindShapes (const FVElementGeometry *geo, co flux = MAX(f_in,f_out); - /* now we know noflow[scvip[i]] is FALSE */ + /* now we know noflow[scvip[i]] is false */ for (i=0; i<n; i++) if (f[i]>0) { @@ -1875,7 +1875,7 @@ INT NS_DIM_PREFIX EvaluateShapesAndDerivatives (FVElementGeometry *geo, INT flag Coe = READ_FLAG(flags,FILL_COE); if (grad) - Jinv = TRUE; + Jinv = true; lin = LinearTrafo(DIM,FVG_TAG(geo)); diff --git a/np/algebra/transgrid.cc b/np/algebra/transgrid.cc index 34aef777a..7c9ccbf1e 100644 --- a/np/algebra/transgrid.cc +++ b/np/algebra/transgrid.cc @@ -270,11 +270,11 @@ static INT StandardIntCorNodeVector (GRID *FineGrid, const VECDATA_DESC *to, con if ((NODE *)VOBJECT(v)!=theNode) continue; #endif vecskip = VECSKIP(v); - skip = TRUE; + skip = true; for (i=0; i<ncomp; i++) if (!(vecskip & (1<<i))) - skip = FALSE; - if (skip) continue; /* skip only if all flags are TRUE */ + skip = false; + if (skip) continue; /* skip only if all flags are true */ if (CORNERTYPE(theNode)) { diff --git a/np/algebra/ugiter.cc b/np/algebra/ugiter.cc index 65003a3e9..dfe71a122 100644 --- a/np/algebra/ugiter.cc +++ b/np/algebra/ugiter.cc @@ -136,7 +136,7 @@ USING_UG_NAMESPACES /* */ /****************************************************************************/ -static INT StoreInverse=TRUE; +static INT StoreInverse=true; /* large matrix for l_pgs */ /* (Macintosh does not support local data >32k) */ @@ -206,8 +206,8 @@ INT NS_DIM_PREFIX l_ordervtypes (GRID *g, const SHORT TypeOrder[NVECTYPES]) INT type,order,Types[NVECTYPES]; /* consistency check before whole list is messed up */ - for (type=0; type<NVECTYPES; type++) Types[type] = FALSE; - for (order=0; order<NVECTYPES; order++) Types[TypeOrder[order]] = TRUE; + for (type=0; type<NVECTYPES; type++) Types[type] = false; + for (order=0; order<NVECTYPES; order++) Types[TypeOrder[order]] = true; for (type=0; type<NVECTYPES; type++) if (!Types[type]) REP_ERR_RETURN (NUM_ERROR); @@ -1218,7 +1218,7 @@ INT NS_DIM_PREFIX l_lgsB (GRID *g, const VECDATA_DESC *v, const MATDATA_DESC *M, \param u_comp - position of the solution scalar in the VECTORs of the blockvector \param f_comp - position of the right hand side scalar in the VECTORs of the blockvector \param aux_comp - if nonnegative denotes auxiliary component for defect calculation - \param verbose - if TRUE display the convergence rate of the iteration + \param verbose - if true display the convergence rate of the iteration \param eps_relative - error reduction relative to the start defect This function solve \f$ Ku = f\f$ by iterative solvings of `LowerTriangle(K) v = f`. @@ -1230,7 +1230,7 @@ INT NS_DIM_PREFIX l_lgsB (GRID *g, const VECDATA_DESC *v, const MATDATA_DESC *M, given, the defect of the solution can be calculated and the iteration is stopped premature if the prescribed accuracy 'eps' is reached; this stopping-accuracy will be multiplied by the start defect norm (resulting - in a relative criterion) if 'eps_relative' is TRUE. + in a relative criterion) if 'eps_relative' is true. u_comp, f_comp (and aux_comp if given) must be different! @@ -2332,10 +2332,10 @@ INT NS_DIM_PREFIX l_ilubthdecomp (GRID *g, const MATDATA_DESC *M, const VEC_SCAL Rest = VVALUEPTR(vi,0); RestComp = VD_CMPPTR_OF_TYPE(VD_rest,type); - flag = FALSE; + flag = false; for (i=0; i<n; i++) if (Rest[RestComp[i]]>TypeORT[i]) - flag = TRUE; + flag = true; SETVCUSED(vi,flag); } @@ -2482,7 +2482,7 @@ INT NS_DIM_PREFIX l_ilubthdecomp (GRID *g, const MATDATA_DESC *M, const VEC_SCAL Piv = MVALUEPTR(Mji,0); /* matrix multiplication */ - PivIsZero = TRUE; + PivIsZero = true; for (i0=0; i0<nr; i0++) for (j0=0; j0<n; j0++) { @@ -2491,7 +2491,7 @@ INT NS_DIM_PREFIX l_ilubthdecomp (GRID *g, const MATDATA_DESC *M, const VEC_SCAL sum += Piv[PivComp[i0*n+k0]] * InvMat[k0*n+j0]; PivMat[i0*n+j0] = sum; if (sum!=0.0) - PivIsZero = FALSE; + PivIsZero = false; } /* the pivot becomes the entry of the lower triangular part */ @@ -2522,7 +2522,7 @@ INT NS_DIM_PREFIX l_ilubthdecomp (GRID *g, const MATDATA_DESC *M, const VEC_SCAL Elm = MVALUEPTR(Mik,0); /* matrix multiplication */ - CorIsZero = TRUE; + CorIsZero = true; for (i0=0; i0<nr; i0++) for (j0=0; j0<nc; j0++) { @@ -2531,7 +2531,7 @@ INT NS_DIM_PREFIX l_ilubthdecomp (GRID *g, const MATDATA_DESC *M, const VEC_SCAL sum += PivMat[i0*n+k0] * Elm[ElmComp[k0*nc+j0]]; CorMat[i0*nc+j0] = sum; if (sum!=0.0) - CorIsZero = FALSE; + CorIsZero = false; } if (CorIsZero) @@ -3005,7 +3005,7 @@ INT NS_DIM_PREFIX l_icdecomp (GRID *g, const MATDATA_DESC *M) DikComp = MD_MCMPPTR_OF_RT_CT(M,type,ctype); nc = MD_COLS_IN_RT_CT(M,type,ctype); Dik = MVALUEPTR(Mik,0); - CorIsZero = TRUE; + CorIsZero = true; /* matrix multiplication */ for (i0=0; i0<n; i0++) @@ -3016,7 +3016,7 @@ INT NS_DIM_PREFIX l_icdecomp (GRID *g, const MATDATA_DESC *M) sum += Dik[DikComp[i0*nc+k0]] * Dik[DikComp[j0*nc+k0]]; CorMat[i0*n+j0] = sum; if (sum!=0.0) - CorIsZero = FALSE; + CorIsZero = false; } if (CorIsZero) @@ -3071,7 +3071,7 @@ INT NS_DIM_PREFIX l_icdecomp (GRID *g, const MATDATA_DESC *M) Dik = MVALUEPTR(Mik,0); DjkComp = MD_MCMPPTR_OF_RT_CT(M,rtype,ctype); Djk = MVALUEPTR(Mjk,0); - CorIsZero = TRUE; + CorIsZero = true; /* matrix multiplication */ for (i0=0; i0<n; i0++) @@ -3082,7 +3082,7 @@ INT NS_DIM_PREFIX l_icdecomp (GRID *g, const MATDATA_DESC *M) sum += Dik[DikComp[i0*nc+k0]] * Djk[DjkComp[j0*nc+k0]]; CorMat[i0*nr+j0] = sum; if (sum!=0.0) - CorIsZero = FALSE; + CorIsZero = false; } if (CorIsZero) @@ -3216,10 +3216,10 @@ INT NS_DIM_PREFIX l_iluspdecomp (GRID *g, const MATDATA_DESC *M, const VEC_SCALA Rest = VVALUEPTR(vi,0); RestComp = VD_CMPPTR_OF_TYPE(t,type); - flag = FALSE; + flag = false; for (i=0; i<n; i++) if (Rest[RestComp[i]]>TypeORT[i]) - flag = TRUE; + flag = true; SETVCUSED(vi,flag); } @@ -3415,7 +3415,7 @@ INT NS_DIM_PREFIX l_iluspdecomp (GRID *g, const MATDATA_DESC *M, const VEC_SCALA Piv = MVALUEPTR(Mji,0); /* matrix multiplication */ - PivIsZero = TRUE; + PivIsZero = true; for (i0=0; i0<nr; i0++) for (j0=0; j0<n; j0++) { @@ -3424,7 +3424,7 @@ INT NS_DIM_PREFIX l_iluspdecomp (GRID *g, const MATDATA_DESC *M, const VEC_SCALA sum += Piv[PivComp[i0*n+k0]] * InvMat[k0*n+j0]; PivMat[i0*n+j0] = sum; if (sum!=0.0) - PivIsZero = FALSE; + PivIsZero = false; } /* the pivot becomes the entry of the lower triangular part */ @@ -3455,7 +3455,7 @@ INT NS_DIM_PREFIX l_iluspdecomp (GRID *g, const MATDATA_DESC *M, const VEC_SCALA Elm = MVALUEPTR(Mik,0); /* matrix multiplication */ - CorIsZero = TRUE; + CorIsZero = true; for (i0=0; i0<nr; i0++) for (j0=0; j0<nc; j0++) { @@ -3464,7 +3464,7 @@ INT NS_DIM_PREFIX l_iluspdecomp (GRID *g, const MATDATA_DESC *M, const VEC_SCALA sum += PivMat[i0*n+k0] * Elm[ElmComp[k0*nc+j0]]; CorMat[i0*nc+j0] = sum; if (sum!=0.0) - CorIsZero = FALSE; + CorIsZero = false; } if (CorIsZero) @@ -3807,7 +3807,7 @@ INT NS_DIM_PREFIX l_lrdecomp (GRID *g, const MATDATA_DESC *M) Piv = MVALUEPTR(Mji,0); /* matrix multiplication */ - PivIsZero = TRUE; + PivIsZero = true; for (i0=0; i0<nr; i0++) for (j0=0; j0<n; j0++) { @@ -3816,7 +3816,7 @@ INT NS_DIM_PREFIX l_lrdecomp (GRID *g, const MATDATA_DESC *M) sum += Piv[PivComp[i0*n+k0]] * InvMat[k0*n+j0]; PivMat[i0*n+j0] = sum; if (sum!=0.0) - PivIsZero = FALSE; + PivIsZero = false; } /* the pivot becomes the entry of the lower triangular part */ @@ -3845,7 +3845,7 @@ INT NS_DIM_PREFIX l_lrdecomp (GRID *g, const MATDATA_DESC *M) Elm = MVALUEPTR(Mik,0); /* matrix multiplication */ - CorIsZero = TRUE; + CorIsZero = true; for (i0=0; i0<nr; i0++) for (j0=0; j0<nc; j0++) { @@ -3854,7 +3854,7 @@ INT NS_DIM_PREFIX l_lrdecomp (GRID *g, const MATDATA_DESC *M) sum += PivMat[i0*n+k0] * Elm[ElmComp[k0*nc+j0]]; CorMat[i0*nc+j0] = sum; if (sum!=0.0) - CorIsZero = FALSE; + CorIsZero = false; } if (CorIsZero) @@ -4122,7 +4122,7 @@ static INT l_lrregularizeB (GRID *theGrid, VECTOR *vec, const MATDATA_DESC *M) } MVALUE(VSTART(vec),matComp) = 1.0; - if (TRUE /*mutelevel<=VERBOSE_SMOOTH*/) + if (true /*mutelevel<=VERBOSE_SMOOTH*/) UserWriteF(" - BLOCKVECTOR decomposition regularized on level %d, component %d\n",(int)GLEVEL(theGrid),singComp); if (StoreInverse) @@ -4346,7 +4346,7 @@ INT NS_DIM_PREFIX l_lrdecompB (GRID *g, const MATDATA_DESC *M) Piv = MVALUEPTR(Mji,0); /* matrix multiplication */ - PivIsZero = TRUE; + PivIsZero = true; for (i0=0; i0<nr; i0++) for (j0=0; j0<n; j0++) { @@ -4355,7 +4355,7 @@ INT NS_DIM_PREFIX l_lrdecompB (GRID *g, const MATDATA_DESC *M) sum += Piv[PivComp[i0*n+k0]] * InvMat[k0*n+j0]; PivMat[i0*n+j0] = sum; if (sum!=0.0) - PivIsZero = FALSE; + PivIsZero = false; } /* the pivot becomes the entry of the lower triangular part */ @@ -4385,7 +4385,7 @@ INT NS_DIM_PREFIX l_lrdecompB (GRID *g, const MATDATA_DESC *M) Elm = MVALUEPTR(Mik,0); /* matrix multiplication */ - CorIsZero = TRUE; + CorIsZero = true; for (i0=0; i0<nr; i0++) for (j0=0; j0<nc; j0++) { @@ -4394,7 +4394,7 @@ INT NS_DIM_PREFIX l_lrdecompB (GRID *g, const MATDATA_DESC *M) sum += PivMat[i0*n+k0] * Elm[ElmComp[k0*nc+j0]]; CorMat[i0*nc+j0] = sum; if (sum!=0.0) - CorIsZero = FALSE; + CorIsZero = false; } if (CorIsZero) @@ -5823,10 +5823,10 @@ INT NS_DIM_PREFIX l_ilubthdecomp_fine (GRID *g, const MATDATA_DESC *M, const VEC Rest = VVALUEPTR(vi,0); RestComp = VD_CMPPTR_OF_TYPE(VD_rest,type); - flag = FALSE; + flag = false; for (i=0; i<n; i++) if (Rest[RestComp[i]]>TypeORT[i]) - flag = TRUE; + flag = true; SETVCUSED(vi,flag); } @@ -5978,7 +5978,7 @@ INT NS_DIM_PREFIX l_ilubthdecomp_fine (GRID *g, const MATDATA_DESC *M, const VEC Piv = MVALUEPTR(Mji,0); /* matrix multiplication */ - PivIsZero = TRUE; + PivIsZero = true; for (i0=0; i0<nr; i0++) for (j0=0; j0<n; j0++) { @@ -5987,7 +5987,7 @@ INT NS_DIM_PREFIX l_ilubthdecomp_fine (GRID *g, const MATDATA_DESC *M, const VEC sum += Piv[PivComp[i0*n+k0]] * InvMat[k0*n+j0]; PivMat[i0*n+j0] = sum; if (sum!=0.0) - PivIsZero = FALSE; + PivIsZero = false; } /* the pivot becomes the entry of the lower triangular part */ @@ -6018,7 +6018,7 @@ INT NS_DIM_PREFIX l_ilubthdecomp_fine (GRID *g, const MATDATA_DESC *M, const VEC Elm = MVALUEPTR(Mik,0); /* matrix multiplication */ - CorIsZero = TRUE; + CorIsZero = true; for (i0=0; i0<nr; i0++) for (j0=0; j0<nc; j0++) { @@ -6027,7 +6027,7 @@ INT NS_DIM_PREFIX l_ilubthdecomp_fine (GRID *g, const MATDATA_DESC *M, const VEC sum += PivMat[i0*n+k0] * Elm[ElmComp[k0*nc+j0]]; CorMat[i0*nc+j0] = sum; if (sum!=0.0) - CorIsZero = FALSE; + CorIsZero = false; } if (CorIsZero) @@ -7262,7 +7262,7 @@ INT NS_DIM_PREFIX l_iluspbldecomp (GRID *g, const MATDATA_DESC *M, const VEC_SCA /* multiplication of sparse block Mji by invert diagonal block Mii */ - PivIsZero = TRUE; + PivIsZero = true; for (j0=0; j0<smr->nrows; j0++) for (i0=0; i0<n; i0++) @@ -7273,7 +7273,7 @@ INT NS_DIM_PREFIX l_iluspbldecomp (GRID *g, const MATDATA_DESC *M, const VEC_SCA PivMat[j0*n+i0] = sum; - if (sum!=0.0) PivIsZero = FALSE; + if (sum!=0.0) PivIsZero = false; } diff --git a/np/field/stoch.cc b/np/field/stoch.cc index d1f4013de..4219be4d3 100644 --- a/np/field/stoch.cc +++ b/np/field/stoch.cc @@ -1470,10 +1470,10 @@ static INT NPStochFieldInit(NP_BASE *theNP, INT argc , char **argv) ret = NP_NOT_ACTIVE; } else - np->inttype = TRUE; + np->inttype = true; else if (ReadArgvOption("const",argc,argv)) - np->inttype = FALSE; - else if ((np->inttype != TRUE) && (np->inttype != FALSE)) + np->inttype = false; + else if ((np->inttype != true) && (np->inttype != false)) ret = NP_NOT_ACTIVE; if (sopt == 1) @@ -1539,9 +1539,9 @@ static INT NPStochFieldDisplay(NP_BASE *theNP) else UserWriteF(DISPLAY_NP_FORMAT_S,"Random initial"); - if (np->inttype==TRUE) + if (np->inttype==true) UserWriteF(DISPLAY_NP_FORMAT_SS,"Interpolation","linear in each dir"); - else if (np->inttype==FALSE) + else if (np->inttype==false) UserWriteF(DISPLAY_NP_FORMAT_SS,"Interpolation","constant on cells"); return(0); @@ -1571,10 +1571,10 @@ INT NS_DIM_PREFIX Field_RandomValues (NP_FIELD *theField, DOUBLE *Pos, DOUBLE *o #ifdef __THREEDIM__ switch(np->inttype) { - case FALSE : + case false : out[0] = (REALPART(np->size,np->Fld,node[0],node[1],node[2]) - np->mean) / sqrt(np->var); break; - case TRUE : + case true : { INT extraNode[DIM]; @@ -1604,10 +1604,10 @@ INT NS_DIM_PREFIX Field_RandomValues (NP_FIELD *theField, DOUBLE *Pos, DOUBLE *o #else switch(np->inttype) { - case FALSE : + case false : out[0] = (REALPART(np->size,np->Fld,node[0],node[1]) - np->mean) / sqrt(np->var); break; - case TRUE : + case true : { INT extraNode[DIM]; diff --git a/np/procs/assemble.cc b/np/procs/assemble.cc index db9edc090..31e82eba9 100644 --- a/np/procs/assemble.cc +++ b/np/procs/assemble.cc @@ -953,7 +953,7 @@ INT NS_DIM_PREFIX SetPartassParamsX (PARTASS_PARAMS *pp, const VEC_TEMPLATE *vt, memset(pp,0,sizeof(PARTASS_PARAMS)); /* general */ - PP_ASS_PART(pp) = TRUE; + PP_ASS_PART(pp) = true; PP_ACTION(pp) = PARTASS_UNKNOWN; PP_SCALE_A(pp) = s_a; PP_SCALE_M(pp) = s_m; diff --git a/np/procs/bdf.cc b/np/procs/bdf.cc index 0c5648c15..914e25604 100644 --- a/np/procs/bdf.cc +++ b/np/procs/bdf.cc @@ -518,7 +518,7 @@ static INT BDFTimeStep (NP_T_SOLVER *ts, INT level, INT *res) { if (bdf->noabort) /* use last iterate */ { - nlresult.converged = TRUE; + nlresult.converged = true; bdf->dt = bdf->dtmin; bad = 1; UserWrite("bdf->TimeStep: not converged, still going on \n"); @@ -1133,7 +1133,7 @@ INT NS_DIM_PREFIX BDFDisplay (NP_BASE *theNumProc) UserWriteF(DISPLAY_NP_FORMAT_SF,"dtscale",(float)bdf->dtscale); UserWriteF(DISPLAY_NP_FORMAT_SF,"rhogood",(float)bdf->rhogood); if (bdf->noabort) - UserWriteF(DISPLAY_NP_FORMAT_SS,"noabort","TRUE"); + UserWriteF(DISPLAY_NP_FORMAT_SS,"noabort","true"); if (bdf->y_p1 != NULL) UserWriteF(DISPLAY_NP_FORMAT_SS,"y_p1",ENVITEM_NAME(bdf->y_p1)); if (bdf->y_0 != NULL) diff --git a/np/procs/enewton.cc b/np/procs/enewton.cc index 22ed537c0..d1f4dd0c6 100644 --- a/np/procs/enewton.cc +++ b/np/procs/enewton.cc @@ -325,7 +325,7 @@ static INT ENewtonSolver (NP_ENL_SOLVER *nls, INT level, EVECDATA_DESC *x, NP_EN n_unk = VD_NCOMP(x->vd)+x->n; /* init ass once and compute nonlinear defect */ - if (ENonLinearDefect(mg,level,TRUE,x,newton,ass,defect,&error)!=0) {res->error_code = __LINE__; REP_ERR_RETURN(res->error_code);} + if (ENonLinearDefect(mg,level,true,x,newton,ass,defect,&error)!=0) {res->error_code = __LINE__; REP_ERR_RETURN(res->error_code);} if (error) goto exit; /* display norm of nonlinear defect */ @@ -527,7 +527,7 @@ static INT ENewtonSolver (NP_ENL_SOLVER *nls, INT level, EVECDATA_DESC *x, NP_EN EVDD_E(x,level,i)-=EVDD_E(newton->v,level,i); /* print norm of defect */ - if (ENonLinearDefect(mg,level,FALSE,x,newton,ass,defect,&error)) + if (ENonLinearDefect(mg,level,false,x,newton,ass,defect,&error)) if (error) goto exit; if (DoPCR(PrintID,defect,PCR_CRATE)) {res->error_code = __LINE__; REP_ERR_RETURN(res->error_code);} diff --git a/np/procs/fas.cc b/np/procs/fas.cc index 3eea91d0e..eea6e640d 100644 --- a/np/procs/fas.cc +++ b/np/procs/fas.cc @@ -582,7 +582,7 @@ static INT FasSolver (NP_NL_SOLVER *nls, INT level, VECDATA_DESC *x, } /* init ass once and compute nonlinear defect */ - if (FasInitialStep (mg,level,TRUE,x,fas,ass,defect)!=0) + if (FasInitialStep (mg,level,true,x,fas,ass,defect)!=0) { res->error_code = __LINE__; REP_ERR_RETURN(res->error_code); @@ -625,7 +625,7 @@ static INT FasSolver (NP_NL_SOLVER *nls, INT level, VECDATA_DESC *x, CSTOP(fas_t,fas_c); /* compute nonlinear defect */ - if (FasInitialStep (mg,level,FALSE,x,fas,ass,defect)!=0) + if (FasInitialStep (mg,level,false,x,fas,ass,defect)!=0) { res->error_code = __LINE__; REP_ERR_RETURN(res->error_code); diff --git a/np/procs/freebnd.cc b/np/procs/freebnd.cc index 87479c8c1..540433357 100644 --- a/np/procs/freebnd.cc +++ b/np/procs/freebnd.cc @@ -132,7 +132,7 @@ INT NS_DIM_PREFIX MoveFreeBoundary (MULTIGRID *mg, INT level, const VECDATA_DESC #ifdef ModelP /* TODO: parallel version */ PrintErrorMessage('E',"MoveFreeBoundary","parallel not implemented"); - ASSERT(FALSE); + ASSERT(false); #endif if (VD_ncmps_in_otype_mod(vd,NODEVEC,NON_STRICT)<DIM) diff --git a/np/procs/iter.cc b/np/procs/iter.cc index 01de9acb9..8011a7db4 100644 --- a/np/procs/iter.cc +++ b/np/procs/iter.cc @@ -360,11 +360,11 @@ typedef struct DOUBLE meshwidth; /* meshwidth of the grid */ DOUBLE wave_nr_rel; /* wavenumber for the testing frequency */ DOUBLE wave_nr_rel3D; /* wavenumber for the testing frequency; only for 3D */ - INT all_freq; /* flag; TRUE == smooth for all relevant frequencies */ + INT all_freq; /* flag; true == smooth for all relevant frequencies */ INT display; INT par_sim; /* temp for: simulating parallel algo on SEQ */ INT ass_dirichlet; /* assemble Dirichlet boundary condition (only necessary if not done otherwise (fetransfer) */ - INT symm_frq; /* TRUE, if series of testfrequencies should be symmetric, i.e. 1,2,4,8,...,n-1,n,n-1,...,8,4,2,1 */ + INT symm_frq; /* true, if series of testfrequencies should be symmetric, i.e. 1,2,4,8,...,n-1,n,n-1,...,8,4,2,1 */ INT check_symm; /* check, whether the preconditioner is symmetric. This is done by checking <M^-1*M^-1*d,d> == <M^-1*d,M^-1*d>*/ #ifdef __BLOCK_VECTOR_DESC__ @@ -4937,7 +4937,7 @@ static INT SBGS_Init (NP_BASE *theNP, INT argc , char **argv) theSBGS = (NP_SBGS*) theNP; /* set configuration parameters */ - bopt = boopt = biopt = FALSE; + bopt = boopt = biopt = false; for (i=1; i<argc; i++) if (sscanf(argv[i],expandfmt(CONCAT5("%",OPTIONLENSTR,"[a-zA-Z0-9_] %",VALUELENSTR,"[ -~]")),option,value)==2) { @@ -4945,19 +4945,19 @@ static INT SBGS_Init (NP_BASE *theNP, INT argc , char **argv) if (strstr(option,"Blocking")!=NULL) if (ReadVecTypeINTs(MGFORMAT(NP_MG(theNP)),value,MAX_BLOCKS+1,nTypeBlocks,TypeBlocks)!=0) REP_ERR_RETURN (NP_NOT_ACTIVE) - else {bopt = TRUE; continue;} + else {bopt = true; continue;} /* BlockOrder */ if (strstr(option,"BlockOrder")!=NULL) if (ReadVecTypeOrder(MGFORMAT(NP_MG(theNP)),value,MAX_ORDER,MAX_BLOCKS,&SBGS_NBLOCKITER(theSBGS),SBGS_BLOCKORDER(theSBGS))!=0) REP_ERR_RETURN (NP_NOT_ACTIVE) - else {boopt = TRUE; continue;} + else {boopt = true; continue;} /* BlockIter */ if (strstr(option,"BlockIter")!=NULL) if (ReadVecTypeNUMPROCs(NP_MG(theNP),value,ITER_CLASS_NAME,MAX_BLOCKS,nBlockIter,BlockIter)!=0) REP_ERR_RETURN (NP_NOT_ACTIVE) - else {biopt = TRUE; continue;} + else {biopt = true; continue;} } if (!(bopt && boopt && biopt)) @@ -6648,12 +6648,12 @@ static INT FFInit (NP_BASE *theNP, INT argc , char **argv) } if( strcmp( buffer, "ALL") == 0 || strcmp( buffer, "all") == 0 ) { - NPFF_ALLFREQ(np) = TRUE; + NPFF_ALLFREQ(np) = true; NPFF_WaveNrRel(np) = -1.0; } else { - NPFF_ALLFREQ(np) = FALSE; + NPFF_ALLFREQ(np) = false; sscanf(buffer,"%lf", &NPFF_WaveNrRel(np) ); } @@ -6675,10 +6675,10 @@ static INT FFInit (NP_BASE *theNP, INT argc , char **argv) } } - NPFF_ParSim(np) = FALSE; + NPFF_ParSim(np) = false; if ( ReadArgvINT ( "parsim", &NPFF_ParSim(np), argc, argv) ) { - NPFF_ParSim(np) = FALSE; + NPFF_ParSim(np) = false; } else NPFF_ParSim(np) = (NPFF_ParSim(np)==1); @@ -6762,7 +6762,7 @@ static INT FFDisplay (NP_BASE *theNP) UserWriteF(DISPLAY_NP_FORMAT_SF,"meshwidth",(double)NPFF_MESHWIDTH(np)); - if ( NPFF_ALLFREQ(np) == TRUE ) + if ( NPFF_ALLFREQ(np) == true ) UserWriteF(DISPLAY_NP_FORMAT_SS,"frequency","ALL"); else { @@ -7035,14 +7035,14 @@ static INT FFPreProcess (NP_ITER *theNP, INT level, } else { - if ( FF_PrepareGrid( theGrid, &meshwidth, TRUE, MD_SCALCMP( A ), VD_SCALCMP( x ), VD_SCALCMP( b ), NPFF_BVDF(np) )!=NUM_OK) + if ( FF_PrepareGrid( theGrid, &meshwidth, true, MD_SCALCMP( A ), VD_SCALCMP( x ), VD_SCALCMP( b ), NPFF_BVDF(np) )!=NUM_OK) { PrintErrorMessage('E',"FFPreProcess","preparation of the grid failed"); NP_RETURN(1,result[0]); } } #else - if (FF_PrepareGrid( theGrid, &meshwidth, TRUE, MD_SCALCMP( A ), VD_SCALCMP( x ), VD_SCALCMP( b ), NPFF_BVDF(np) )!=NUM_OK) + if (FF_PrepareGrid( theGrid, &meshwidth, true, MD_SCALCMP( A ), VD_SCALCMP( x ), VD_SCALCMP( b ), NPFF_BVDF(np) )!=NUM_OK) { PrintErrorMessage('E',"FFPreProcess","preparation of the grid failed"); NP_RETURN(1,result[0]); diff --git a/np/procs/ls.cc b/np/procs/ls.cc index 609289a96..e290fc112 100644 --- a/np/procs/ls.cc +++ b/np/procs/ls.cc @@ -1106,7 +1106,7 @@ static INT CGUpdateProject (NP_LS *theNP, INT level, NP_RETURN(1,result[0]); if (dcopy(theMG,theNP->baselevel,level,ALL_VECTORS,ct,c)!= NUM_OK) REP_ERR_RETURN(1); - if (SubspaceEntering(theMG,theNP->baselevel,level, np->csol,c, TRUE)) + if (SubspaceEntering(theMG,theNP->baselevel,level, np->csol,c, true)) NP_RETURN(1,result[0]); } np->count++; diff --git a/np/procs/newton.cc b/np/procs/newton.cc index a7715fc99..ae05301c7 100644 --- a/np/procs/newton.cc +++ b/np/procs/newton.cc @@ -249,7 +249,7 @@ static INT NonLinearDefect (MULTIGRID *mg, INT level, INT init, VECDATA_DESC *x, IFDEBUG(np,3) UserWrite("---- After computation of nonlinear defect\n"); - ListVectorRange(mg,0,level,0,0,1000,FALSE,TRUE,~(INT)1,LV_MOD_DEFAULT); + ListVectorRange(mg,0,level,0,0,1000,false,true,~(INT)1,LV_MOD_DEFAULT); ENDDEBUG /* compute norm of defect */ @@ -397,7 +397,7 @@ static INT NewtonSolver (NP_NL_SOLVER *nls, INT level, VECDATA_DESC *x, n_unk = VD_NCOMP(x); /* init ass once and compute nonlinear defect */ - if (NonLinearDefect(mg,level,TRUE,x,newton,ass,defect,&error)!=0) + if (NonLinearDefect(mg,level,true,x,newton,ass,defect,&error)!=0) { res->error_code = __LINE__; REP_ERR_RETURN(res->error_code); @@ -518,7 +518,7 @@ static INT NewtonSolver (NP_NL_SOLVER *nls, INT level, VECDATA_DESC *x, IFDEBUG(np,3) UserWrite("---- After linear solver\n"); - ListVectorRange(mg,0,level,0,0,1000,FALSE,TRUE,~(INT)1,LV_MOD_DEFAULT); + ListVectorRange(mg,0,level,0,0,1000,false,true,~(INT)1,LV_MOD_DEFAULT); ENDDEBUG /* linear solver statistics */ @@ -555,7 +555,7 @@ static INT NewtonSolver (NP_NL_SOLVER *nls, INT level, VECDATA_DESC *x, error = 0; } else - if (NonLinearDefect(mg,level,FALSE,x,newton,ass,defect,&error)!=0) + if (NonLinearDefect(mg,level,false,x,newton,ass,defect,&error)!=0) { res->error_code = __LINE__; REP_ERR_RETURN(res->error_code); @@ -619,7 +619,7 @@ static INT NewtonSolver (NP_NL_SOLVER *nls, INT level, VECDATA_DESC *x, dcopy(mg,0,level,ALL_VECTORS,x,newton->s); daxpy(mg,0,level,ALL_VECTORS,x,-la,newton->v); - if (NonLinearDefect(mg,level,FALSE,x,newton,ass, defect,&error)!=0) + if (NonLinearDefect(mg,level,false,x,newton,ass, defect,&error)!=0) { res->error_code = __LINE__; REP_ERR_RETURN(res->error_code); diff --git a/np/procs/order.cc b/np/procs/order.cc index f411ecf0c..3bb4a83c1 100644 --- a/np/procs/order.cc +++ b/np/procs/order.cc @@ -234,8 +234,8 @@ static INT OrderLexInit (NP_BASE *theNP, INT argc , char **argv) if (ReadArgvChar ("config",np->config,argc,argv)) return (NP_NOT_ACTIVE); if (strlen(np->config)!=DIM) return (NP_NOT_ACTIVE); np->which = GM_TAKE_SKIP | GM_TAKE_NONSKIP; - np->AlsoOrderMatrices = FALSE; - np->SpecialTreatSkipVecs = FALSE; + np->AlsoOrderMatrices = false; + np->SpecialTreatSkipVecs = false; np->mode = OV_CARTES; for (i=0; i<strlen(np->config); i++) diff --git a/np/procs/transfer.cc b/np/procs/transfer.cc index c4f9d4ef9..84793ff65 100644 --- a/np/procs/transfer.cc +++ b/np/procs/transfer.cc @@ -140,7 +140,7 @@ typedef struct const VEC_TEMPLATE *mvt; /* main vector template */ INT ntrans; /* number of part transfer numprocs */ NP_TRANSFER *trans[MAX_PT]; /* pointers to part transfer numprocs */ - INT swap[MAX_PT]; /* TRUE or FALSE for swapping of data */ + INT swap[MAX_PT]; /* true or false for swapping of data */ INT svt[MAX_PT]; /* indices of sub vector templates */ /* sub XXXDATA_DESCs needed */ @@ -968,11 +968,11 @@ static INT PartTransferInit (NP_BASE *theNP, INT argc , char **argv) /* noswap option following? */ if (strcmp(argv[i+1],"noswap")==0) { - PT_SWAP(thePT,ntrans) = FALSE; + PT_SWAP(thePT,ntrans) = false; i++; } else - PT_SWAP(thePT,ntrans) = TRUE; + PT_SWAP(thePT,ntrans) = true; PT_TRANS(thePT,ntrans++) = trans; break; diff --git a/np/udm/disctools.cc b/np/udm/disctools.cc index b85e52cff..166179247 100644 --- a/np/udm/disctools.cc +++ b/np/udm/disctools.cc @@ -1229,11 +1229,11 @@ static INT PrepareMultipleVMPtrs (MVM_DESC *mvmd) /* set vtypes used */ for (tp=0; tp<NVECTYPES; tp++) if (READ_FLAG(dt,BITWISE_TYPE(tp))) - MVMD_TYPE(mvmd,tp) = TRUE; + MVMD_TYPE(mvmd,tp) = true; else - MVMD_TYPE(mvmd,tp) = FALSE; + MVMD_TYPE(mvmd,tp) = false; - MVMD_M_OF_1_ONLY(mvmd) = FALSE; + MVMD_M_OF_1_ONLY(mvmd) = false; return (0); } @@ -2139,7 +2139,7 @@ static void PrintSingleVectorX (const VECTOR *v, const VECDATA_DESC *X, INT vcla i += sprintf(buffer+i,"z=%5.2f ",pos[2]); } else { - *info = TRUE; + *info = true; i += sprintf(buffer," "); if (DIM == 3) i += sprintf(buffer+i," "); @@ -2165,7 +2165,7 @@ static void PrintSingleVectorX (const VECTOR *v, const VECDATA_DESC *X, INT vcla INT NS_DIM_PREFIX PrintVectorListX (const VECTOR *vlist[], const VECDATA_DESC *X, INT vclass, INT vnclass, PrintfProcPtr Printf) { - INT info=FALSE; + INT info=false; for (; *vlist!= NULL; ++vlist) PrintSingleVectorX(*vlist,X,vclass,vnclass,Printf,&info); @@ -2178,7 +2178,7 @@ INT NS_DIM_PREFIX PrintVectorListX (const VECTOR *vlist[], const VECDATA_DESC *X INT NS_DIM_PREFIX PrintVectorX (const GRID *g, const VECDATA_DESC *X, INT vclass, INT vnclass, PrintfProcPtr Printf) { const VECTOR *v; - INT info=FALSE; + INT info=false; for (v=FIRSTVECTOR(g); v!= NULL; v=SUCCVC(v)) PrintSingleVectorX(v,X,vclass,vnclass,Printf,&info); @@ -2333,7 +2333,7 @@ INT NS_DIM_PREFIX PrintDiagMatrix (GRID *g, MATDATA_DESC *Mat, INT vclass, INT v char buffer[256]; VECTOR *v; DOUBLE_VECTOR pos; - INT info=FALSE; + INT info=false; MATRIX *m; INT Mcomp,ccomp,i,j,rtype; @@ -2358,7 +2358,7 @@ INT NS_DIM_PREFIX PrintDiagMatrix (GRID *g, MATDATA_DESC *Mat, INT vclass, INT v #endif } else { - info = TRUE; + info = true; i += sprintf(buffer," "); if (DIM == 3) i += sprintf(buffer+i," "); diff --git a/np/udm/disctools.h b/np/udm/disctools.h index 1895833d6..6d49abee5 100644 --- a/np/udm/disctools.h +++ b/np/udm/disctools.h @@ -99,7 +99,7 @@ typedef struct { INT objtypes; INT vdsubseq[MAXVD]; INT mdsubseq[MAXMD]; - INT MatOfFirstVecOnly; /* default FALSE, may be changed after call */ + INT MatOfFirstVecOnly; /* default false, may be changed after call */ /* of PrepareElementMultipleVMPtrs */ } MVM_DESC; diff --git a/np/udm/formats.cc b/np/udm/formats.cc index 692a10b45..02587418b 100644 --- a/np/udm/formats.cc +++ b/np/udm/formats.cc @@ -1657,7 +1657,7 @@ static INT ScanVecOption (INT argc, char **argv, /* optio PrintErrorMessageF('E',"newformat","no valid type name '%c' (in '$%s')",tp,argv[opt]); REP_ERR_RETURN (1); } - TypeUsed[type] = TRUE; + TypeUsed[type] = true; if (VT_COMP(vt,type) !=0 ) { PrintErrorMessageF('E',"newformat", "double vector type specification (in '$%s')",argv[opt]); @@ -2050,13 +2050,13 @@ static INT ParseImplicitSMDeclaration (const char *str, const MAT_TEMPLATE *mt, for (t=tpltname, p++; *p!='\0' && *p!=',' && *p!=')'; p++) *(t++) = *p; *t = '\0'; - r_sub = TRUE; + r_sub = true; } else { /* subname actually is meant as a tpltname */ strcpy(tpltname,subname); - r_sub = FALSE; + r_sub = false; } /* get vector template */ @@ -2101,13 +2101,13 @@ static INT ParseImplicitSMDeclaration (const char *str, const MAT_TEMPLATE *mt, for (t=tpltname, p++; *p!='\0' && *p!=',' && *p!=')'; p++) *(t++) = *p; *t = '\0'; - c_sub = TRUE; + c_sub = true; } else { /* subname actually is meant as a tpltname */ strcpy(tpltname,subname); - c_sub = FALSE; + c_sub = false; } /* get vector template */ @@ -2286,7 +2286,7 @@ static INT ScanMatOption ( INT argc, char **argv, /* optio } /* read types and sizes */ - checksub = FALSE; + checksub = false; for (type=0; type<NMATTYPES; type++) MT_RCOMP(mt,type) = MT_CCOMP(mt,type) = 0; token = strtok(argv[opt]+1,BLANKS); @@ -2304,7 +2304,7 @@ static INT ScanMatOption ( INT argc, char **argv, /* optio MT_CCOMPS(mt),offset); if (strlen(MT_COMPNAMES(mt))==2*offset[NMATTYPES_NORMAL]) - checksub = TRUE; + checksub = true; } else { @@ -2379,7 +2379,7 @@ static INT ScanMatOption ( INT argc, char **argv, /* optio "mat component names are not unique (in '$%s')",argv[opt]); REP_ERR_RETURN (1); } - checksub = TRUE; + checksub = true; } } @@ -2673,7 +2673,7 @@ static INT ScanTypeOptions (INT argc, char **argv, INT po2t[][MAXVOBJECTS], INT if (max>=(1<<VTYPE_LEN)) { printf("I would love to define another type for you, but control flags are rare... (in '$%s')",argv[opt]); - ASSERT(FALSE); + ASSERT(false); REP_ERR_RETURN(1); } @@ -2904,7 +2904,7 @@ INT NS_DIM_PREFIX CreateFormatCmd (INT argc, char **argv) case 'N' : if (argv[opt][1] == 'E') - nodeelementlist = TRUE; + nodeelementlist = true; break; default : @@ -2913,7 +2913,7 @@ INT NS_DIM_PREFIX CreateFormatCmd (INT argc, char **argv) REP_ERR_RETURN (1); } - if ((ndata == TRUE) && (nodeelementlist == TRUE)) { + if ((ndata == true) && (nodeelementlist == true)) { PrintErrorMessage('E',"newformat","specify either $n or $NE"); CleanupTempDir(); REP_ERR_RETURN (1); diff --git a/np/udm/npscan.cc b/np/udm/npscan.cc index ab875fd31..864f5e52a 100644 --- a/np/udm/npscan.cc +++ b/np/udm/npscan.cc @@ -1226,12 +1226,12 @@ INT NS_DIM_PREFIX sc_read (VEC_SCALAR x, const FORMAT *fmt, const VECDATA_DESC * if (strlen(name)>=OPTIONLEN-1) REP_ERR_RETURN (1); /* find input string */ - found = FALSE; + found = false; for (i=0; i<argc; i++) if (sscanf(argv[i],expandfmt(CONCAT5("%",OPTIONLENSTR,"[a-zA-Z0-9_] %",VALUELENSTR,"[ -~]")),option,value)==2) if (strcmp(option,name) == 0) { - found = TRUE; + found = true; break; } if (!found) return(2); diff --git a/np/udm/pcr.cc b/np/udm/pcr.cc index 1811f463a..a54a09afd 100644 --- a/np/udm/pcr.cc +++ b/np/udm/pcr.cc @@ -282,7 +282,7 @@ INT NS_DIM_PREFIX PreparePCR (VECDATA_DESC *Vsym, INT DispMode, const char *text PCR_nb[i] = 0; PCR_DispMode[i] = DispMode; PCR_header[i] = text; - for (j=i; j<32; j++) PCR_printed[j] = FALSE; + for (j=i; j<32; j++) PCR_printed[j] = false; /* print head line */ if (text!=NULL && DispMode!=PCR_NO_DISPLAY) @@ -346,7 +346,7 @@ INT NS_DIM_PREFIX PrepareEPCR (EVECDATA_DESC *Vsym, INT DispMode, const char *te PCR_nb[i] = 0; PCR_DispMode[i] = DispMode; PCR_header[i] = text; - for (j=i; j<32; j++) PCR_printed[j] = FALSE; + for (j=i; j<32; j++) PCR_printed[j] = false; /* print head line */ if (text!=NULL && DispMode!=PCR_NO_DISPLAY) @@ -532,7 +532,7 @@ INT NS_DIM_PREFIX DoPCR (INT ID, VEC_SCALAR InDefect, INT PrintMode) PCR_InitNorm[ID] = s; if (PCR_DispMode[ID]==PCR_FULL_DISPLAY) { - PCR_printed[ID] = TRUE; + PCR_printed[ID] = true; UserWriteF(" %-3d %c: %-12.7e %-12.7s\n",(int)PCR_nb[ID],PCR_compNames[ID][0],Defect[0],"---"); for (i=1; i<PCR_nComp[ID]; i++) UserWriteF(" %c: %-12.7e %-12.7s\n",PCR_compNames[ID][i],Defect[i],"---"); @@ -543,7 +543,7 @@ INT NS_DIM_PREFIX DoPCR (INT ID, VEC_SCALAR InDefect, INT PrintMode) } else if (PCR_DispMode[ID]==PCR_FULL_DISPLAY) { - PCR_printed[ID] = TRUE; + PCR_printed[ID] = true; PrintHeaderIff(ID); if (PCR_OldDefect[ID][0]!=0.0) UserWriteF(" %-3d %c: %-12.7e %-12.7e\n",(int)PCR_nb[ID],PCR_compNames[ID][0],Defect[0],Defect[0]/PCR_OldDefect[ID][0]); @@ -568,7 +568,7 @@ INT NS_DIM_PREFIX DoPCR (INT ID, VEC_SCALAR InDefect, INT PrintMode) case PCR_AVERAGE_SD : if (PCR_nb[ID]<2) return (0); if (PCR_DispMode[ID]==PCR_NO_DISPLAY) break; - PCR_printed[ID] = TRUE; + PCR_printed[ID] = true; PrintHeaderIff(ID); if (PCR_DispMode[ID]==PCR_FULL_DISPLAY) UserWrite("\n"); if (PCR_InitDefect[ID][0]!=0.0) diff --git a/np/udm/udm.cc b/np/udm/udm.cc index 0c45336c8..76c39739f 100644 --- a/np/udm/udm.cc +++ b/np/udm/udm.cc @@ -361,7 +361,7 @@ static INT SetScalVecSettings (VECDATA_DESC *vd) { INT tp; - VD_IS_SCALAR(vd) = FALSE; + VD_IS_SCALAR(vd) = false; /* check number of components per type */ for (tp=0; tp<NVECTYPES; tp++) @@ -383,7 +383,7 @@ static INT SetScalVecSettings (VECDATA_DESC *vd) return (NUM_OK); /* no scalar */ } - VD_IS_SCALAR(vd) = TRUE; + VD_IS_SCALAR(vd) = true; return (NUM_OK); } @@ -2397,7 +2397,7 @@ static INT SetScalMatSettings (MATDATA_DESC *md) { INT mtp; - MD_IS_SCALAR(md) = FALSE; + MD_IS_SCALAR(md) = false; /* check number of components per type */ for (mtp=0; mtp<NMATTYPES; mtp++) @@ -2420,7 +2420,7 @@ static INT SetScalMatSettings (MATDATA_DESC *md) return (NUM_OK); /* no scalar */ } - MD_IS_SCALAR(md) = TRUE; + MD_IS_SCALAR(md) = true; return (NUM_OK); } @@ -3740,14 +3740,14 @@ INT NS_DIM_PREFIX MDinterfaceCoCoupleDesc (const MATDATA_DESC *md, const MATDATA nr = MD_ROWS_IN_RT_CT(md,rt,ct); nc = MD_COLS_IN_RT_CT(md,rt,ct); for (i=0; i<nr; i++) - RowUsed[i] = FALSE; + RowUsed[i] = false; for (jj=0; jj<ns; jj++) { cmp = MD_MCMP_OF_RT_CT(mds,rt,ct,jj); for (i=0; i<nr; i++) for (j=0; j<nc; j++) if (cmp==MD_IJ_CMP_OF_RT_CT(md,rt,ct,i,j)) - RowUsed[i] = TRUE; + RowUsed[i] = true; } } co_nr = 0; diff --git a/np/udm/udm.h b/np/udm/udm.h index e5654fce5..654f872c8 100644 --- a/np/udm/udm.h +++ b/np/udm/udm.h @@ -240,7 +240,7 @@ typedef struct { SHORT *CmpsInType[NVECTYPES]; /* redundant (but frequently used) information */ - /** \brief TRUE if desc is scalar: same settings in all types */ + /** \brief true if desc is scalar: same settings in all types */ SHORT IsScalar; /** \brief Successive components */ @@ -305,10 +305,10 @@ typedef struct { NS_DIM_PREFIX SPARSE_MATRIX *sm[NMATTYPES]; /* redundant (but frequently used) information */ - /** \brief TRUE if sparse form should be used */ + /** \brief true if sparse form should be used */ SHORT IsSparse; - /** \brief TRUE if desc is scalar: same settings in all types */ + /** \brief true if desc is scalar: same settings in all types */ SHORT IsScalar; /** \brief Successive components */ diff --git a/parallel/ddd/basic/lowcomm.cc b/parallel/ddd/basic/lowcomm.cc index 7c78a98d9..67820408c 100644 --- a/parallel/ddd/basic/lowcomm.cc +++ b/parallel/ddd/basic/lowcomm.cc @@ -636,7 +636,7 @@ int LC_MsgAlloc (LC_MSGHANDLE msg) MSG_DESC *md = (MSG_DESC *) msg; ULONG *hdr; int i, j, n = md->msgType->nComps; - int remaining=1, give_up = FALSE; + int remaining=1, give_up = false; assert(md->msgState==MSTATE_FREEZED); @@ -650,7 +650,7 @@ int LC_MsgAlloc (LC_MSGHANDLE msg) if (md->buffer==NULL) { if (remaining==0) - give_up = TRUE; + give_up = true; else { # if DebugLowComm<=7 @@ -683,7 +683,7 @@ int LC_MsgAlloc (LC_MSGHANDLE msg) me, md->msgType->name); DDD_PrintDebug(cBuffer); # endif - return(FALSE); + return(false); } @@ -703,7 +703,7 @@ int LC_MsgAlloc (LC_MSGHANDLE msg) md->msgState=MSTATE_ALLOCATED; - return(TRUE); + return(true); } diff --git a/parallel/ddd/basic/oopp.h b/parallel/ddd/basic/oopp.h index 0ab5e447f..e0ba8204f 100644 --- a/parallel/ddd/basic/oopp.h +++ b/parallel/ddd/basic/oopp.h @@ -30,21 +30,6 @@ #ifndef __OOPP_H__ #define __OOPP_H__ - -/****************************************************************************/ -/* */ -/* very basic macros and constants */ -/* */ -/****************************************************************************/ - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifndef TRUE -#define TRUE 1 -#endif - /****************************************************************************/ /* */ /* basic text manipulation macros */ diff --git a/parallel/ddd/basic/ooppcc.h b/parallel/ddd/basic/ooppcc.h index 6e63553b7..422cac4fb 100644 --- a/parallel/ddd/basic/ooppcc.h +++ b/parallel/ddd/basic/ooppcc.h @@ -663,7 +663,7 @@ static enum BTreeConstant Method(Insert) (ParamThis, if (nData < 4) { /* only a few entries -> use linear search */ - int found=FALSE; + int found=false; for(i=0; i<nData && !found; i++) { @@ -679,9 +679,9 @@ static enum BTreeConstant Method(Insert) (ParamThis, return(BTREE_FOUND); } - if (cmp>0) found = TRUE; + if (cmp>0) found = true; } - if (found==TRUE) i--; + if (found==true) i--; } else { @@ -895,7 +895,7 @@ int Method(Insert) (ParamThis, CN(BTreeOf) *item) This->root = CALL(New,CBTreeNode) (item,NULL,NULL); assert(This->root!=NULL); This->nItems++; - return(TRUE); + return(true); } ret = CALL(CBTreeNode,Insert) (This->root, /*This->compare_func,*/ item); @@ -915,7 +915,7 @@ int Method(Insert) (ParamThis, CN(BTreeOf) *item) if (ret!=BTREE_FOUND) This->nItems++; - /* return TRUE if item was really inserted */ + /* return true if item was really inserted */ return(ret!=BTREE_FOUND); } @@ -1096,12 +1096,12 @@ int Method(ItemOK) (ParamThis) if (CALL(CBTree,Insert) (This->tree, This->last_item)) { /* item could be inserted in btree, hence it was a new one. */ - return(TRUE); + return(true); } /* item was in tree already, it was an old one. */ CALL(CSegmList,DiscardItem) (This->list); - return(FALSE); + return(false); } diff --git a/parallel/ddd/basic/topo.cc b/parallel/ddd/basic/topo.cc index 2b220e498..2c846abf2 100644 --- a/parallel/ddd/basic/topo.cc +++ b/parallel/ddd/basic/topo.cc @@ -195,11 +195,11 @@ RETCODE DDD_GetChannels (int nPartners) theTopology[theProcArray[i]] = vc; nConn++; - theProcFlags[i] = TRUE; + theProcFlags[i] = true; } else { - theProcFlags[i] = FALSE; + theProcFlags[i] = false; } } @@ -224,7 +224,7 @@ RETCODE DDD_GetChannels (int nPartners) if (ret==1) { - theProcFlags[i] = FALSE; + theProcFlags[i] = false; nConn--; } } diff --git a/parallel/ddd/dddi.h b/parallel/ddd/dddi.h index 9ada28735..15a299896 100644 --- a/parallel/ddd/dddi.h +++ b/parallel/ddd/dddi.h @@ -73,9 +73,9 @@ START_UGDIM_NAMESPACE /* macros for correct return or premature abort of a procedure */ -#define RET_ON_OK return (TRUE) -#define RET_ON_ERROR return (FALSE) -#define IS_OK(p) ((p)==TRUE) +#define RET_ON_OK return (true) +#define RET_ON_ERROR return (false) +#define IS_OK(p) ((p)==true) typedef int RETCODE; @@ -275,7 +275,7 @@ typedef struct _TYPE_DESC //int nextFree; /* next free object in arrays */ int elemHeader; /* which rec. type-elem contains hdr? (offsetHeader gives local offset) */ - /* (hasHeader must be TRUE) */ + /* (hasHeader must be true) */ #endif /* if C_FRONTEND or (CPP_FRONTEND and storage==STORAGE_STRUCT) */ @@ -376,16 +376,9 @@ extern VChannelPtr *theTopology; #define YES 1 #define ON 1 -#ifndef TRUE -#define TRUE 1 -#endif #define NO 0 #define OFF 0 -#ifndef FALSE -#define FALSE 0 -#endif - diff --git a/parallel/ddd/ident/ident.cc b/parallel/ddd/ident/ident.cc index 2b08c9cc1..44358ab01 100644 --- a/parallel/ddd/ident/ident.cc +++ b/parallel/ddd/ident/ident.cc @@ -363,11 +363,11 @@ static int IdentStepMode (enum IdentMode old) sprintf(cBuffer, ERR_ID_WRONG_MODE, IdentModeName(identMode), IdentModeName(old)); DDD_PrintError('E', 3070, cBuffer); - return FALSE; + return false; } IdentSetMode(IdentSuccMode(identMode)); - return TRUE; + return true; } @@ -790,12 +790,12 @@ static int IdentifySort (IDENTINFO **id, int nIds, { case IDMODE_LISTS : qsort(id, nIds, sizeof(IDENTINFO *), sort_intoTupelsLists); - keep_order_inside_tupel = TRUE; + keep_order_inside_tupel = true; break; case IDMODE_SETS : qsort(id, nIds, sizeof(IDENTINFO *), sort_intoTupelsSets); - keep_order_inside_tupel = FALSE; + keep_order_inside_tupel = false; break; default : @@ -968,7 +968,7 @@ static int InitComm (int nPartners) if (! IS_OK(DDD_GetChannels(nPartners))) { - return(FALSE); + return(false); } @@ -989,7 +989,7 @@ static int InitComm (int nPartners) sizeof(MSGITEM)*plist->nEntries + sizeof(long), &err); } - return(TRUE); + return(true); } @@ -1004,7 +1004,7 @@ static void idcons_CheckPairs (void) { NOTIFY_DESC *msgs = DDD_NotifyBegin(nPLists); ID_PLIST *plist; - int i, j, nRecvs, err=FALSE; + int i, j, nRecvs, err=false; for(i=0, plist=thePLists; plist!=NULL; plist=plist->next, i++) { @@ -1034,7 +1034,7 @@ static void idcons_CheckPairs (void) { sprintf(cBuffer, ERR_ID_DIFF_IDENT, plist->proc, plist->nEntries); DDD_PrintError('E', 3900, cBuffer); - err=TRUE; + err=true; } else { @@ -1043,7 +1043,7 @@ static void idcons_CheckPairs (void) sprintf(cBuffer, ERR_ID_DIFF_N_IDENT, msgs[j].size, plist->proc, plist->nEntries); DDD_PrintError('E', 3901, cBuffer); - err=TRUE; + err=true; } } } diff --git a/parallel/ddd/if/ifcreate.cc b/parallel/ddd/if/ifcreate.cc index c4ac20795..777d0b0f7 100644 --- a/parallel/ddd/if/ifcreate.cc +++ b/parallel/ddd/if/ifcreate.cc @@ -264,9 +264,9 @@ static int is_elem (DDD_PRIO el, int n, DDD_PRIO *set) for(i=0; i<n; i++) if (set[i]==el) - return(TRUE); + return(true); - return(FALSE); + return(false); } diff --git a/parallel/ddd/if/ifobjsc.cc b/parallel/ddd/if/ifobjsc.cc index 22f44c6b7..d744b03a1 100644 --- a/parallel/ddd/if/ifobjsc.cc +++ b/parallel/ddd/if/ifobjsc.cc @@ -69,7 +69,7 @@ static void IFComputeShortcutTable (DDD_IF ifId) int i; /* mark obj-shortcut-table as valid */ - theIF[ifId].objValid = TRUE; + theIF[ifId].objValid = true; if (nItems==0) return; @@ -165,7 +165,7 @@ void IFInvalidateShortcuts (DDD_TYPE invalid_type) if ((1<<invalid_type) & theIF[i].maskO) { /* yes, invalidate interface */ - theIF[i].objValid = FALSE; + theIF[i].objValid = false; } } } diff --git a/parallel/ddd/join/join.cc b/parallel/ddd/join/join.cc index f835732c8..fafdcfa84 100644 --- a/parallel/ddd/join/join.cc +++ b/parallel/ddd/join/join.cc @@ -248,11 +248,11 @@ int JoinStepMode (int old) sprintf(cBuffer, "wrong join-mode (currently in %s, expected %s)", JoinModeName(joinGlobals.joinMode), JoinModeName(old)); DDD_PrintError('E', 7200, cBuffer); - return FALSE; + return false; } JoinSetMode(JoinSuccMode(joinGlobals.joinMode)); - return TRUE; + return true; } diff --git a/parallel/ddd/mgr/prio.cc b/parallel/ddd/mgr/prio.cc index 4e68978f4..ef4def116 100644 --- a/parallel/ddd/mgr/prio.cc +++ b/parallel/ddd/mgr/prio.cc @@ -233,7 +233,7 @@ static int SetPrioMatrix (TYPE_DESC *desc, int priomerge_mode) DDD_PRIO pres; PM_GETDEFAULT(priomerge_mode, r, c, pres); - if (pres==MAX_PRIO) return FALSE; + if (pres==MAX_PRIO) return false; PM_ENTRY(desc->prioMatrix, r, c) = pres; } @@ -242,7 +242,7 @@ static int SetPrioMatrix (TYPE_DESC *desc, int priomerge_mode) /* remember default setting */ desc->prioDefault = priomerge_mode; - return TRUE; + return true; } @@ -258,7 +258,7 @@ static int CheckPrioMatrix (TYPE_DESC *desc) if (desc->prioMatrix==NULL) /* no prioMatrix defined, ok */ - return TRUE; + return true; /* check: entries i must be 0<=i<MAX_PRIO */ for(r=0; r<MAX_PRIO; r++) @@ -281,7 +281,7 @@ static int CheckPrioMatrix (TYPE_DESC *desc) /* TODO: check for associativity */ - return TRUE; + return true; } @@ -467,7 +467,7 @@ void DDD_PrioMergeDisplay (DDD_TYPE type_id) /* find out which rows/columns we will have to print */ for(r=0; r<MAX_PRIO; r++) { - changed_rows[r] = FALSE; + changed_rows[r] = false; for(c=0; c<MAX_PRIO; c++) { @@ -477,7 +477,7 @@ void DDD_PrioMergeDisplay (DDD_TYPE type_id) PriorityMerge(desc, r, c, &p_actual); if (p_dflt != p_actual) - changed_rows[r] = TRUE; + changed_rows[r] = true; } } diff --git a/parallel/ddd/mgr/typemgr.cc b/parallel/ddd/mgr/typemgr.cc index 1d99d5fa1..37523917b 100644 --- a/parallel/ddd/mgr/typemgr.cc +++ b/parallel/ddd/mgr/typemgr.cc @@ -221,7 +221,7 @@ static int CheckOverlapEls (TYPE_DESC *desc) { char buf[64]; int i; - int ok = TRUE; + int ok = true; for(i=0; i<desc->nElements; i++) { @@ -233,7 +233,7 @@ static int CheckOverlapEls (TYPE_DESC *desc) if (CPP_STRUCT(desc) CPP_AND (e1->offset+e1->size > e2->offset)) { - ok = FALSE; + ok = false; sprintf(buf, "element too big (offset=%d)", e1->offset); DDD_PrintError('E', 2403, RegisterError(desc, 0, buf)); } @@ -241,7 +241,7 @@ static int CheckOverlapEls (TYPE_DESC *desc) if (CPP_ARRAY(desc) CPP_AND (e1->array+(e1->size*desc->arraySize) > e2->array)) { - ok = FALSE; + ok = false; sprintf(buf, "element too big (array=%d)", i); DDD_PrintError('E', 2404, RegisterError(desc, 0, buf)); } @@ -252,7 +252,7 @@ static int CheckOverlapEls (TYPE_DESC *desc) { if (CPP_STRUCT(desc) CPP_AND (e1->offset+e1->size > desc->size)) { - ok = FALSE; + ok = false; sprintf(buf, "element too big (offset=%d)", e1->offset); DDD_PrintError('E', 2405, RegisterError(desc, 0, buf)); } @@ -368,7 +368,7 @@ static int RecursiveRegister (TYPE_DESC *desc, { if (!desc->hasHeader) { - desc->hasHeader = TRUE; + desc->hasHeader = true; desc->offsetHeader = d2->offsetHeader + offs; } else @@ -418,7 +418,7 @@ static int RecursiveRegister (TYPE_DESC *desc, { if (!desc->hasHeader) { - desc->hasHeader = TRUE; + desc->hasHeader = true; desc->elemHeader = i; desc->offsetHeader = d2->offsetHeader; } @@ -450,7 +450,7 @@ static void ConstructDesc (TYPE_DESC *desc) #if defined(CPP_FRONTEND) desc->size = 0; #endif - desc->hasHeader = FALSE; + desc->hasHeader = false; desc->offsetHeader = 0; } @@ -495,7 +495,7 @@ static int NormalizeDesc (TYPE_DESC *desc) /* check for overlapping elements */ if (! CheckOverlapEls(desc)) - return FALSE; + return false; # ifndef DebugNoStructCompress @@ -543,7 +543,7 @@ static int NormalizeDesc (TYPE_DESC *desc) } # endif - return TRUE; + return true; } @@ -716,7 +716,7 @@ void DDD_Library::TypeDefine (DDD_TYPE typ, ...) if (typ==0) /* i.e. typ==EL_DDDHDR */ { /* DDD_HDR also contains a DDD_HDR (sic!) */ - desc->hasHeader = TRUE; + desc->hasHeader = true; } # ifdef DebugTypeDefine @@ -852,14 +852,14 @@ void DDD_Library::TypeDefine (DDD_TYPE typ, ...) argsize = va_arg(ap, size_t); argno++; /* initialize ELEM_DESC */ - if (CPP_STRUCT(desc) CPP_AND TRUE) + if (CPP_STRUCT(desc) CPP_AND true) { ConstructEl(&desc->element[i], argtyp, (int)(argp-adr), argsize, 0); } #if defined(CPP_FRONTEND) - if (CPP_ARRAY(desc) CPP_AND TRUE) + if (CPP_ARRAY(desc) CPP_AND true) { size += argsize; ConstructEl(&desc->element[i], @@ -877,13 +877,13 @@ void DDD_Library::TypeDefine (DDD_TYPE typ, ...) i++; # ifdef DebugTypeDefine - if (CPP_STRUCT(desc) CPP_AND TRUE) + if (CPP_STRUCT(desc) CPP_AND true) { sprintf(cBuffer," DAT, %05d, %06d\n", argp-adr, argsize); } #if defined(CPP_FRONTEND) - if (CPP_ARRAY(desc) CPP_AND TRUE) + if (CPP_ARRAY(desc) CPP_AND true) { sprintf(cBuffer," DAT, %08x, %06d\n", argp, argsize); @@ -953,7 +953,7 @@ void DDD_Library::TypeDefine (DDD_TYPE typ, ...) /* check whether given DDD_TYPE has been defined already */ if (theTypeDefs[argtyp].mode==DDD_TYPE_DEFINED) { - if (CPP_STRUCT(desc) CPP_AND TRUE) + if (CPP_STRUCT(desc) CPP_AND true) { /* do recursive TypeDefine */ i = RecursiveRegister(desc, @@ -1030,7 +1030,7 @@ void DDD_Library::TypeDefine (DDD_TYPE typ, ...) #endif - if (CPP_STRUCT(desc) CPP_AND TRUE) + if (CPP_STRUCT(desc) CPP_AND true) { /* do normalization */ if (! NormalizeDesc(desc)) @@ -1203,14 +1203,14 @@ void DDD_Library::TypeDisplay (DDD_TYPE id) } /* print header */ - if (CPP_STRUCT(desc) CPP_AND TRUE) + if (CPP_STRUCT(desc) CPP_AND true) { sprintf(cBuffer, "/ Structure of %s--object '%s', id %d, %d byte\n", desc->hasHeader ? "DDD" : "data", desc->name, id, desc->size); } #if defined(CPP_FRONTEND) - if (CPP_ARRAY(desc) CPP_AND TRUE) + if (CPP_ARRAY(desc) CPP_AND true) { sprintf(cBuffer, "/ Structure of %s--object '%s', id %d, %d byte, %d elements\n", @@ -1230,7 +1230,7 @@ void DDD_Library::TypeDisplay (DDD_TYPE id) { ELEM_DESC *e = &desc->element[i]; - if (CPP_STRUCT(desc) CPP_AND TRUE) + if (CPP_STRUCT(desc) CPP_AND true) { int realnext = (i==desc->nElements-1) ? desc->size : (e+1)->offset; int estinext = e->offset+e->size; @@ -1310,7 +1310,7 @@ void DDD_Library::TypeDisplay (DDD_TYPE id) } #if defined(CPP_FRONTEND) - if (CPP_ARRAY(desc) CPP_AND TRUE) + if (CPP_ARRAY(desc) CPP_AND true) { sprintf(cBuffer, "|%5d %5d ", i, e->size); diff --git a/parallel/ddd/prio/pcmds.cc b/parallel/ddd/prio/pcmds.cc index 090736c9d..8ef2d153a 100644 --- a/parallel/ddd/prio/pcmds.cc +++ b/parallel/ddd/prio/pcmds.cc @@ -181,11 +181,11 @@ static int PrioStepMode (int old) sprintf(cBuffer, "wrong prio-mode (currently in %s, expected %s)", PrioModeName(prioGlobals.prioMode), PrioModeName(old)); DDD_PrintError('E', 8200, cBuffer); - return FALSE; + return false; } PrioSetMode(PrioSuccMode(prioGlobals.prioMode)); - return TRUE; + return true; } diff --git a/parallel/ddd/xfer/cmds.cc b/parallel/ddd/xfer/cmds.cc index 069a214cf..5b391fc09 100644 --- a/parallel/ddd/xfer/cmds.cc +++ b/parallel/ddd/xfer/cmds.cc @@ -259,7 +259,7 @@ static int unify_XIModCpl (XIModCpl **i1p, XIModCpl **i2p) /* if items are different in gid or dest, take first item */ if ((i1->to != i2->to) || (i1->te.gid != i2->te.gid)) - return TRUE; + return true; /* items have equal to and gid, we must check priority */ ret = PriorityMerge(&theTypeDefs[i1->typ], @@ -281,7 +281,7 @@ static int unify_XIModCpl (XIModCpl **i1p, XIModCpl **i2p) i2->te.prio = newprio; } - return FALSE; + return false; } @@ -494,11 +494,11 @@ DDD_RET DDD_Library::XferEnd (void) obsolete += prunedXIDelCmd; remXIDelCmd -= prunedXIDelCmd; - DelCmds_were_pruned = TRUE; + DelCmds_were_pruned = true; } else { - DelCmds_were_pruned = FALSE; + DelCmds_were_pruned = false; } /* @@ -839,7 +839,7 @@ exit: } #ifdef XferMemFromHeap - xferGlobals.useHeap = FALSE; + xferGlobals.useHeap = false; ReleaseHeap(xferGlobals.theMarkKey); LC_SetMemMgrDefault(); #endif @@ -1328,8 +1328,8 @@ void DDD_XferAddDataX (int cnt, DDD_TYPE typ, size_t *sizes) avoid unnecessary work, \eg, for counting the number of additional data objects. - @return #TRUE# if additional data objects will be gathered, sent - and scattered; #FALSE# otherwise. + @return #true# if additional data objects will be gathered, sent + and scattered; #false# otherwise. */ int DDD_XferWithAddData (void) { @@ -1442,7 +1442,7 @@ void DDD_Library::XferBegin (void) #ifdef XferMemFromHeap MarkHeap(&xferGlobals.theMarkKey); - xferGlobals.useHeap = TRUE; + xferGlobals.useHeap = true; LC_SetMemMgrRecv(xfer_AllocHeap, NULL); LC_SetMemMgrSend(xfer_AllocSend, xfer_FreeSend); #endif diff --git a/parallel/ddd/xfer/unpack.cc b/parallel/ddd/xfer/unpack.cc index fe2cfcfd0..16f2ce0fd 100644 --- a/parallel/ddd/xfer/unpack.cc +++ b/parallel/ddd/xfer/unpack.cc @@ -164,7 +164,7 @@ static int sort_ObjTabPtrs (const void *e1, const void *e2) used by PutDepData() ). */ -static void LocalizeObject (BOOL merge_mode, TYPE_DESC *desc, +static void LocalizeObject (bool merge_mode, TYPE_DESC *desc, const char *msgmem, DDD_OBJ objmem, const SYMTAB_ENTRY *theSymTab) @@ -408,7 +408,7 @@ static void PutDepData (char *data, /* insert pointers into copy using SymTab */ if (descDep->nPointers>0) { - LocalizeObject(FALSE, descDep, + LocalizeObject(false, descDep, curr, (DDD_OBJ)curr, theSymTab); @@ -453,7 +453,7 @@ static void PutDepData (char *data, { curr = table[i]; if (descDep->nPointers>0) - LocalizeObject(FALSE, descDep, + LocalizeObject(false, descDep, curr, (DDD_OBJ)curr, theSymTab); @@ -1167,7 +1167,7 @@ static void LocalizeObjects (LC_MSGHANDLE xm, int required_newness) if (desc->nPointers>0) { - LocalizeObject(FALSE, desc, + LocalizeObject(false, desc, (char *)(OTE_OBJ(theObjects,&(theObjTab[i]))), obj, theSymTab); @@ -1194,7 +1194,7 @@ static void LocalizeObjects (LC_MSGHANDLE xm, int required_newness) #endif /* execute Localize in merge_mode */ - LocalizeObject(TRUE, desc, + LocalizeObject(true, desc, (char *)(OTE_OBJ(theObjects,&(theObjTab[i]))), obj, theSymTab); diff --git a/parallel/ddd/xfer/xfer.cc b/parallel/ddd/xfer/xfer.cc index 7f06fcf67..2847ee739 100644 --- a/parallel/ddd/xfer/xfer.cc +++ b/parallel/ddd/xfer/xfer.cc @@ -1029,11 +1029,11 @@ int XferStepMode (enum XferMode old) sprintf(cBuffer, "wrong xfer-mode (currently in %s, expected %s)", XferModeName(xferGlobals.xferMode), XferModeName(old)); DDD_PrintError('E', 6200, cBuffer); - return FALSE; + return false; } XferSetMode(XferSuccMode(xferGlobals.xferMode)); - return TRUE; + return true; } @@ -1043,7 +1043,7 @@ int XferStepMode (enum XferMode old) void ddd_XferInit (void) { /* switch off heap usage, will be switched on during XferBegin/End */ - xferGlobals.useHeap = FALSE; + xferGlobals.useHeap = false; /* set kind of TMEM alloc/free requests */ xfer_SetTmpMem(TMEM_ANY); diff --git a/parallel/dddif/debugger.cc b/parallel/dddif/debugger.cc index 583436d95..269ff7a9e 100644 --- a/parallel/dddif/debugger.cc +++ b/parallel/dddif/debugger.cc @@ -388,7 +388,7 @@ static void buggy_Search (MULTIGRID *theMG, DDD_GID gid) { int level, found; - found = FALSE; + found = false; for(level=0; level<=TOPLEVEL(theMG); level++) { GRID *theGrid = GRID_ON_LEVEL(theMG,level); @@ -404,7 +404,7 @@ static void buggy_Search (MULTIGRID *theMG, DDD_GID gid) me, gid, e, level); buggy_ShowCopies(PARHDRE(e)); buggy_ElemShow(e); - found = TRUE; + found = true; } } @@ -418,7 +418,7 @@ static void buggy_Search (MULTIGRID *theMG, DDD_GID gid) me, gid, n, level); buggy_ShowCopies(PARHDR(n)); buggy_NodeShow(n); - found = TRUE; + found = true; } } } diff --git a/parallel/dddif/handler.cc b/parallel/dddif/handler.cc index 827f6340c..1440e12e7 100644 --- a/parallel/dddif/handler.cc +++ b/parallel/dddif/handler.cc @@ -1336,8 +1336,8 @@ static void ElementDelete (DDD_OBJ obj) "ncon=%d\n", me,EID_PRTX(pe),OBJT(pe),level,NC(theGrid))) - /* dispose element without connections (FALSE) */ - if (DisposeElement(theGrid, pe, FALSE)) ASSERT(0); + /* dispose element without connections (false) */ + if (DisposeElement(theGrid, pe, false)) ASSERT(0); } @@ -1568,14 +1568,14 @@ static void ElemScatterEdge (ELEMENT *pe, int cnt, char *data, int newness) ASSERT(NBNODE(LINK0(ecopy)) != NULL); ASSERT(NBNODE(LINK1(ecopy)) != NULL); if (newness == XFER_NEW) { - enew = CreateEdge(theGrid,pe,i, FALSE); + enew = CreateEdge(theGrid,pe,i, false); SETEDSUBDOM(enew,EDSUBDOM(ecopy)); } else { enew = GetEdge(NBNODE(LINK0(ecopy)), NBNODE(LINK1(ecopy))); if (enew == NULL) { - enew = CreateEdge(theGrid,pe,i,FALSE); + enew = CreateEdge(theGrid,pe,i,false); SETEDSUBDOM(enew,EDSUBDOM(ecopy)); /* TODO: remove this check if the first call is with XFER_NEW */ ASSERT(0); diff --git a/parallel/dddif/initddd.cc b/parallel/dddif/initddd.cc index ebb71dc5b..ed20ad55d 100644 --- a/parallel/dddif/initddd.cc +++ b/parallel/dddif/initddd.cc @@ -243,7 +243,7 @@ static void ddd_InitGenericElement (INT tag, DDD_TYPE dddType, int etype) /* init type mapping arrays */ MAP_TYPES(MAPPED_INNER_OBJT_TAG(tag), dddType); - dddctrl.dddObj[MAPPED_INNER_OBJT_TAG(tag)] = TRUE; + dddctrl.dddObj[MAPPED_INNER_OBJT_TAG(tag)] = true; } else { @@ -253,7 +253,7 @@ static void ddd_InitGenericElement (INT tag, DDD_TYPE dddType, int etype) /* init type mapping arrays */ MAP_TYPES(MAPPED_BND_OBJT_TAG(tag), dddType); - dddctrl.dddObj[MAPPED_BND_OBJT_TAG(tag)] = TRUE; + dddctrl.dddObj[MAPPED_BND_OBJT_TAG(tag)] = true; } /* set mergemode to maximum */ @@ -332,19 +332,19 @@ static void ddd_DeclareTypes (void) TypeVector = DDD_TypeDeclare("Vector"); MAP_TYPES(VEOBJ, TypeVector); - dddctrl.dddObj[VEOBJ] = TRUE; + dddctrl.dddObj[VEOBJ] = true; TypeIVertex = DDD_TypeDeclare("IVertex"); MAP_TYPES(IVOBJ, TypeIVertex); - dddctrl.dddObj[IVOBJ] = TRUE; + dddctrl.dddObj[IVOBJ] = true; TypeBVertex = DDD_TypeDeclare("BVertex"); MAP_TYPES(BVOBJ, TypeBVertex); - dddctrl.dddObj[BVOBJ] = TRUE; + dddctrl.dddObj[BVOBJ] = true; TypeNode = DDD_TypeDeclare("Node"); MAP_TYPES(NDOBJ, TypeNode); - dddctrl.dddObj[NDOBJ] = TRUE; + dddctrl.dddObj[NDOBJ] = true; #ifdef __TWODIM__ TypeTrElem = DDD_TypeDeclare("TrElem"); @@ -369,7 +369,7 @@ static void ddd_DeclareTypes (void) /* edge is DDD data object for 2D */ TypeEdge = DDD_TypeDeclare("Edge"); MAP_TYPES(EDOBJ, TypeEdge); - dddctrl.dddObj[EDOBJ] = TRUE; + dddctrl.dddObj[EDOBJ] = true; /* 2. DDD data objects (without DDD_HEADER) */ @@ -873,7 +873,7 @@ static void InitDDDTypes (void) /* prevent from multiple execution */ if (dddctrl.allTypesDefined) return; - dddctrl.allTypesDefined = TRUE; + dddctrl.allTypesDefined = true; ddd_DefineTypes(); @@ -1080,7 +1080,7 @@ int NS_DIM_PREFIX InitDDD (void) for(i=0; i<MAXOBJECTS; i++) { dddctrl.types[i] = -1; - dddctrl.dddObj[i] = FALSE; + dddctrl.dddObj[i] = false; } for(i=0; i<MAXDDDTYPES; i++) { @@ -1090,7 +1090,7 @@ int NS_DIM_PREFIX InitDDD (void) /* declare DDD_TYPES, definition must be done later */ ddd_DeclareTypes(); - dddctrl.allTypesDefined = FALSE; + dddctrl.allTypesDefined = false; DomInitParallel(TypeBndP,TypeBndS); diff --git a/parallel/dddif/overlap.cc b/parallel/dddif/overlap.cc index f640e3028..316722313 100644 --- a/parallel/dddif/overlap.cc +++ b/parallel/dddif/overlap.cc @@ -451,7 +451,7 @@ INT ConnectGridOverlap (GRID *theGrid) UserWriteF(PFMT "ConnectGridOverlap(): disposing useless yellow ghost e=" EID_FMTX "f=" EID_FMTX "this ghost is useless!\n", me,EID_PRTX(theSon),EID_PRTX(theElement)); - DisposeElement(UPGRID(theGrid),theSon,TRUE); + DisposeElement(UPGRID(theGrid),theSon,true); } else { diff --git a/parallel/ppif/MPI/ppif.cc b/parallel/ppif/MPI/ppif.cc index fa0a3076f..cb4a0806b 100644 --- a/parallel/ppif/MPI/ppif.cc +++ b/parallel/ppif/MPI/ppif.cc @@ -54,14 +54,6 @@ #include <ctime> #include <cmath> - -#define TRUE 1 -#define FALSE 0 - -/* MPI library */ -/* - #include <mpp/mpi.h> - */ #include <mpi.h> #include "../ppif_general.h" @@ -523,7 +515,7 @@ int PPIF::DiscASync (void* v) int PPIF::InfoADisc (void* v) { - return (TRUE); + return (true); } #define REQUEST_HEAP @@ -539,7 +531,7 @@ msgid PPIF::SendASync (void* v, void *data, int size, int *error) if (MPI_SUCCESS == MPI_Isend (data, size, MPI_BYTE, ((MPIVChannel*)v)->p, ((MPIVChannel*)v)->chanid, COMM, req) ) { - *error = FALSE; + *error = false; return ((msgid) req); } } @@ -549,12 +541,12 @@ msgid PPIF::SendASync (void* v, void *data, int size, int *error) if (MPI_SUCCESS == MPI_Isend (data, size, MPI_BYTE, ((MPIVChannel*)v)->p, ((MPIVChannel*)v)->chanid, COMM, &Req) ) { - *error = FALSE; + *error = false; return ((msgid) Req); } # endif - *error = TRUE; + *error = true; return NULL; } @@ -570,7 +562,7 @@ msgid PPIF::RecvASync (void* v, void *data, int size, int *error) if (MPI_SUCCESS == MPI_Irecv (data, size, MPI_BYTE, ((MPIVChannel*)v)->p, ((MPIVChannel*)v)->chanid, COMM, req) ) { - *error = FALSE; + *error = false; return ((msgid) req); } } @@ -581,13 +573,13 @@ msgid PPIF::RecvASync (void* v, void *data, int size, int *error) if (MPI_SUCCESS == MPI_Irecv (data, size, MPI_BYTE, ((MPIVChannel*)v)->p, ((MPIVChannel*)v)->chanid, COMM, &Req) ) { - *error = FALSE; + *error = false; return ((msgid) Req); } # endif - *error = TRUE; + *error = true; return (NULL); } @@ -605,7 +597,7 @@ int PPIF::InfoASend (void* v, msgid m) { if (complete) free (m); - return (complete); /* complete is TRUE for completed send, FALSE otherwise */ + return (complete); /* complete is true for completed send, false otherwise */ } } @@ -614,7 +606,7 @@ int PPIF::InfoASend (void* v, msgid m) if (MPI_SUCCESS == MPI_Test (&Req, &complete, &status) ) { - return (complete); /* complete is TRUE for completed send, FALSE otherwise */ + return (complete); /* complete is true for completed send, false otherwise */ } # endif @@ -635,7 +627,7 @@ int PPIF::InfoARecv (void* v, msgid m) { if (complete) free (m); - return (complete); /* complete is TRUE for completed receive, FALSE otherwise */ + return (complete); /* complete is true for completed receive, false otherwise */ } } @@ -644,7 +636,7 @@ int PPIF::InfoARecv (void* v, msgid m) if (MPI_SUCCESS == MPI_Test (&Req, &complete, &status) ) { - return (complete); /* complete is TRUE for completed receive, FALSE otherwise */ + return (complete); /* complete is true for completed receive, false otherwise */ } # endif diff --git a/tools/xugv.cc b/tools/xugv.cc index 52fc2cc39..39ec9b146 100644 --- a/tools/xugv.cc +++ b/tools/xugv.cc @@ -2300,8 +2300,8 @@ int main (int argc, char* argv[]) XawDialogAddButton(xexit, "cancel", exit_cancel, (XtPointer)NULL); /* add event handler for expose events */ - XtAddEventHandler( picture, ExposureMask, FALSE, (XtEventHandler) exposeCB, (XtPointer)NULL); - XtAddEventHandler(viewport, ButtonPressMask, FALSE, (XtEventHandler) exit_dial, (XtPointer)NULL); + XtAddEventHandler( picture, ExposureMask, false, (XtEventHandler) exposeCB, (XtPointer)NULL); + XtAddEventHandler(viewport, ButtonPressMask, false, (XtEventHandler) exit_dial, (XtPointer)NULL); /* install work if film is tailed */ if (auto_nb>=0) @@ -2417,10 +2417,10 @@ int main (int argc, char* argv[]) XawDialogAddButton(xexit, "cancel", exit_cancel, (XtPointer)NULL); /* add event handler for expose events */ - XtAddEventHandler( picture, ExposureMask, FALSE, (XtEventHandler) exposeCB, (XtPointer)NULL); + XtAddEventHandler( picture, ExposureMask, false, (XtEventHandler) exposeCB, (XtPointer)NULL); /* add event handler for button press event */ - XtAddEventHandler(viewport, ButtonPressMask, FALSE, (XtEventHandler) exit_dial, (XtPointer)NULL); + XtAddEventHandler(viewport, ButtonPressMask, false, (XtEventHandler) exit_dial, (XtPointer)NULL); /* register a work procedure to display the film */ film_work_id = XtAppAddWorkProc(kontext,(XtWorkProc) run_film,applShell); diff --git a/ui/cmdint.cc b/ui/cmdint.cc index 13ecd55c7..380694781 100644 --- a/ui/cmdint.cc +++ b/ui/cmdint.cc @@ -120,8 +120,8 @@ static char seperators[] = ";{}"; /* static char tokenseperators[] = " \n\t;{}()"; */ static char terminators[] = ";}"; /* terminators for commands */ -static INT scriptpaths_set=FALSE; -static INT dontexit=FALSE; /* if TRUE set ':cmdstatus' rather than exiting */ +static bool scriptpaths_set = false; +static bool dontexit = false; /* if true set ':cmdstatus' rather than exiting */ static INT UseWithPerl=0; /****************************************************************************/ @@ -180,7 +180,7 @@ static const char *cmdPtr,*cmdStart; static long executePos=0; static char *cmdBuffer; static char *executeBuffer; -static INT programFlag=FALSE; +static INT programFlag=false; static long programbufsize=PROGRAMBUFSIZE; static char *programBuffer; static char fileBuffer[FILEBUFSIZE+1]; @@ -638,7 +638,7 @@ static INT GetValueOfOperand (DOUBLE *t, OPERAND *term) { case NUMBERID : *t=term->ro.value; - error=FALSE; + error=false; break; case ALPHAID : @@ -654,7 +654,7 @@ static INT GetValueOfOperand (DOUBLE *t, OPERAND *term) break; default : - error=TRUE; + error=true; } if (error) @@ -792,11 +792,11 @@ static INT GetFactor (OPERAND *result) /* get signs */ sign=1; - signflag=FALSE; + signflag=false; while (c=='-') { - signflag=TRUE; + signflag=true; sign=-sign; cmdPtr++; c=SkipBlanks(); @@ -929,7 +929,7 @@ static INT GetFactor (OPERAND *result) { /* check wether a string variable or a struct is defined */ - INT deref=FALSE; + INT deref=false; char *p; c=SkipBlanks(); @@ -943,7 +943,7 @@ static INT GetFactor (OPERAND *result) c=SkipBlanks(); if (c=='@') { - deref = TRUE; + deref = true; cmdPtr++; } GetToken(buffer); @@ -1675,24 +1675,24 @@ INT NS_DIM_PREFIX InterpretCommand (const char *cmds) if ((strcmp(cmds,"program")==0)||(strcmp(cmds,"program\n")==0)) { - programFlag=TRUE; + programFlag=true; programBuffer[0]=0; return(DONE); } if ((strcmp(cmds,"endprogram")==0)||(strcmp(cmds,"endprogram\n")==0)) { - programFlag=FALSE; + programFlag=false; cmds=programBuffer; } - if (programFlag==TRUE) + if (programFlag==true) { pLength=strlen(programBuffer); if (pLength+strlen(cmds)+1>programbufsize-1) { programBuffer[0]=(char) 0; - programFlag=FALSE; + programFlag=false; PrintErrorMessage('E',"InterpretCommand","unexpected end"); return(8512); @@ -1792,7 +1792,7 @@ static INT InterpretString (void) status=MULTIPLE; StatusPos=0; RepeatPos=0; - termFlag=FALSE; + termFlag=false; do { @@ -1806,7 +1806,7 @@ static INT InterpretString (void) { if (status&MULTIPLE) { - termFlag=FALSE; /* leave terminating mode */ + termFlag=false; /* leave terminating mode */ continue; } @@ -1821,7 +1821,7 @@ static INT InterpretString (void) status0=StatusStack[StatusPos-1]; if ((status0&SKIPMODE)==0) status=(status^SKIPMODE); /* if-else active: switch to opposite */ - termFlag=FALSE; /* leave terminating mode */ + termFlag=false; /* leave terminating mode */ continue; } @@ -1848,7 +1848,7 @@ static INT InterpretString (void) else { cmdPtr=RepeatPtr[RepeatPos-1]; /* status is already ok */ - termFlag=FALSE; + termFlag=false; continue; } } @@ -1902,7 +1902,7 @@ static INT InterpretString (void) else { cmdPtr++; - termFlag=TRUE; /* in single mode ; has terminating effect */ + termFlag=true; /* in single mode ; has terminating effect */ continue; } } @@ -1920,7 +1920,7 @@ static INT InterpretString (void) { cmdPtr++; status=StatusStack[--StatusPos]; - termFlag=TRUE; + termFlag=true; continue; } } @@ -2102,7 +2102,7 @@ static INT InterpretString (void) return(1); } } - while (TRUE); + while (true); SetMuteLevel(oldmute); continue; @@ -2399,7 +2399,7 @@ static INT InterpretString (void) continue; } } - while (TRUE); + while (true); return(DONE); @@ -2470,7 +2470,7 @@ void NS_DIM_PREFIX ParCommandLoop (char *inpLine) INT error; char dummy[256]; - while (GetDoneFlag() == FALSE) + while (GetDoneFlag() == false) { if (interactiveFlag) UserIn(dummy); error=ParExecCommand(inpLine); @@ -2500,7 +2500,7 @@ void NS_DIM_PREFIX CommandLoop (int argc, char **argv) char c,errLine[256],spcLine[256],buffer[256]; char *inpLine; const char *strStart; - int batch = FALSE; + int batch = false; /* reset doneFlag */ ResetDoneFlag(); @@ -2521,7 +2521,7 @@ void NS_DIM_PREFIX CommandLoop (int argc, char **argv) for (i=1; i<argc; i++) if (argv[i][0]!='-') - batch = TRUE; + batch = true; PrintVersionString(); @@ -2552,7 +2552,7 @@ void NS_DIM_PREFIX CommandLoop (int argc, char **argv) if (!batch) { - while (GetDoneFlag() == FALSE) + while (GetDoneFlag() == false) { if (UseWithPerl) WriteString("EOO\n"); @@ -2566,7 +2566,7 @@ void NS_DIM_PREFIX CommandLoop (int argc, char **argv) PrintErrorMessage('E',"CommandLoop","process event error"); continue; } - if (GetDoneFlag() == TRUE) break; + if (GetDoneFlag() == true) break; #ifdef ModelP InterpretCommand("noninteractive"); #endif @@ -2623,7 +2623,7 @@ void NS_DIM_PREFIX CommandLoop (int argc, char **argv) else { i = 1; /* first argument */ - while (i<argc && GetDoneFlag()==FALSE) + while (i<argc && GetDoneFlag()==false) { /* execute batch file */ if (argv[i][0]!='-') @@ -2720,7 +2720,7 @@ else \param none DESCRIPTION: - Sets done flag to TRUE/FALSE + Sets done flag to true/false RETURN VALUE: none @@ -2729,12 +2729,12 @@ else void NS_DIM_PREFIX SetDoneFlag (void) { - doneFlag = TRUE; + doneFlag = true; } void NS_DIM_PREFIX ResetDoneFlag (void) { - doneFlag = FALSE; + doneFlag = false; } int NS_DIM_PREFIX GetDoneFlag (void) @@ -2806,11 +2806,11 @@ INT NS_DIM_PREFIX InitCommandInterpreter (INT argc, char **argv) programBuffer[0] = (char) 0; /* read scriptpaths from defaults file (iff) */ - scriptpaths_set=FALSE; + scriptpaths_set=false; if (ReadSearchingPaths(DEFAULTSFILENAME,"scriptpaths")==0) - scriptpaths_set=TRUE; + scriptpaths_set=true; - dontexit=FALSE; + dontexit=false; SetStringValue(":oldmute",GetMuteLevel()); diff --git a/ui/commands.cc b/ui/commands.cc index 589130905..5a9a934bd 100644 --- a/ui/commands.cc +++ b/ui/commands.cc @@ -303,7 +303,7 @@ static INT piccounter=1; /*@{*/ static INT theArrayDirID; static INT theArrayVarID; -static INT arraypathes_set=FALSE; +static INT arraypathes_set=false; /*@}*/ REP_ERR_FILE; @@ -587,13 +587,13 @@ static INT DateCommand (INT argc, char **argv) INT i,svopt; /* check options */ - svopt = FALSE; + svopt = false; fmt = "%a %b %d %H:%M:%S %Y"; for (i=1; i<argc; i++) switch (argv[i][0]) { case 's' : - svopt = TRUE; + svopt = true; break; case 'S' : @@ -792,7 +792,7 @@ static INT SetCommand (INT argc, char **argv) #endif /* ModelP */ /* check options */ - ropt = FALSE; + ropt = false; for (i=1; i<argc; i++) switch (argv[i][0]) { @@ -802,7 +802,7 @@ static INT SetCommand (INT argc, char **argv) PrintHelp("set",HELPITEM," (the r option applies not with setting a value)"); return (PARAMERRORCODE); } - ropt = TRUE; + ropt = true; break; default : @@ -1265,7 +1265,7 @@ static INT LogOnCommand (INT argc, char **argv) int ropt; /* check options */ - popt = pext = meext = rename = FALSE; + popt = pext = meext = rename = false; for (i=1; i<argc; i++) switch (argv[i][0]) { @@ -1275,18 +1275,18 @@ static INT LogOnCommand (INT argc, char **argv) PrintErrorMessage('E',"logon","no protocol file open"); return (PARAMERRORCODE); } - popt = TRUE; + popt = true; break; case 'e' : #ifdef ModelP - pext = TRUE; + pext = true; #endif break; case 'a' : #ifdef ModelP - meext = TRUE; + meext = true; #endif break; @@ -1296,7 +1296,7 @@ static INT LogOnCommand (INT argc, char **argv) case 'r' : res = sscanf(argv[i]," r %d",&ropt); - if (res==0 || (res==1 && ropt==1)) rename = TRUE; + if (res==0 || (res==1 && ropt==1)) rename = true; break; default : @@ -1319,11 +1319,11 @@ static INT LogOnCommand (INT argc, char **argv) return(PARAMERRORCODE); } #ifdef ModelP - if (pext == TRUE) + if (pext == true) { sprintf(logfile,"%s.p%04d",logfile,procs); } - if (meext == TRUE) + if (meext == true) { sprintf(logfile,"%s.%04d",logfile,me); } @@ -1359,7 +1359,7 @@ static INT LogOffCommand (INT argc, char **argv) INT i,popt; /* check options */ - popt = FALSE; + popt = false; for (i=1; i<argc; i++) switch (argv[i][0]) { @@ -1369,7 +1369,7 @@ static INT LogOffCommand (INT argc, char **argv) PrintErrorMessage('E',"logoff","no protocol file open"); return (PARAMERRORCODE); } - popt = TRUE; + popt = true; break; default : @@ -1504,12 +1504,12 @@ static INT CloseCommand (INT argc, char **argv) if (ResetPrintingFormat()) REP_ERR_RETURN(CMDERRORCODE); - closeonlyfirst = TRUE; + closeonlyfirst = true; for (i=1; i<argc; i++) switch (argv[i][0]) { case 'a' : - closeonlyfirst = FALSE; + closeonlyfirst = false; break; default : @@ -1530,7 +1530,7 @@ static INT CloseCommand (INT argc, char **argv) PrintErrorMessage('W',"close","no open multigrid"); return (OKCODE); } - closeonlyfirst = FALSE; + closeonlyfirst = false; break; } @@ -1586,9 +1586,9 @@ INT NS_DIM_PREFIX NewCommand (INT argc, char **argv) /* get problem, domain and format */ heapSize = 0; - bopt = fopt = hopt = FALSE; - IEopt = TRUE; - emptyGrid = FALSE; + bopt = fopt = hopt = false; + IEopt = true; + emptyGrid = false; for (i=1; i<argc; i++) switch (argv[i][0]) { @@ -1598,7 +1598,7 @@ INT NS_DIM_PREFIX NewCommand (INT argc, char **argv) PrintHelp("new",HELPITEM," (cannot read BndValProblem specification)"); return(PARAMERRORCODE); } - bopt = TRUE; + bopt = true; break; case 'f' : @@ -1607,15 +1607,15 @@ INT NS_DIM_PREFIX NewCommand (INT argc, char **argv) PrintHelp("new",HELPITEM," (cannot read format specification)"); return(PARAMERRORCODE); } - fopt = TRUE; + fopt = true; break; case 'n' : - IEopt = FALSE; + IEopt = false; break; case 'e' : - emptyGrid = TRUE; + emptyGrid = true; break; case 'h' : @@ -1624,7 +1624,7 @@ INT NS_DIM_PREFIX NewCommand (INT argc, char **argv) PrintHelp("new",HELPITEM," (cannot read heapsize specification)"); return(PARAMERRORCODE); } - hopt = TRUE; + hopt = true; break; default : @@ -1673,7 +1673,7 @@ static INT OpenCommand (INT argc, char **argv) strcpy(type,"asc"); theBVP = theFormat = theMGName = NULL; heapSize = force = autosave = fqn = 0; - try_load = FALSE; + try_load = false; for (i=1; i<argc; i++) switch (argv[i][0]) { @@ -1704,7 +1704,7 @@ static INT OpenCommand (INT argc, char **argv) break; case 'n' : - IEopt = FALSE; + IEopt = false; break; case 'm' : @@ -1719,7 +1719,7 @@ static INT OpenCommand (INT argc, char **argv) case 't' : if (strncmp(argv[i],"try",3)==0) { - try_load = TRUE; + try_load = true; break; } if (sscanf(argv[i],expandfmt(CONCAT3("t %",NAMELENSTR,"[ -~]")),type)!=1) @@ -2858,17 +2858,17 @@ static INT MGListCommand (INT argc, char **argv) return (OKCODE); } - longformat = TRUE; + longformat = true; for (i=1; i<argc; i++) switch (argv[i][0]) { case 's' : - longformat = FALSE; + longformat = false; break; case 'l' : /* old syntax */ - longformat = TRUE; + longformat = true; break; default : @@ -2942,12 +2942,12 @@ static INT NListCommand (INT argc, char **argv) /* check options */ idopt = LV_ID; - dataopt = boundaryopt = neighbouropt = verboseopt = mode = FALSE; + dataopt = boundaryopt = neighbouropt = verboseopt = mode = false; for (i=1; i<argc; i++) switch (argv[i][0]) { case 'i' : - if (mode!=FALSE) + if (mode!=false) { PrintErrorMessage('E',"nlist","specify either the a, s or i option"); return (PARAMERRORCODE); @@ -2986,7 +2986,7 @@ static INT NListCommand (INT argc, char **argv) break; case 's' : - if (mode!=FALSE) + if (mode!=false) { PrintErrorMessage('E',"nlist","specify either the a, s or i option"); return (PARAMERRORCODE); @@ -2995,7 +2995,7 @@ static INT NListCommand (INT argc, char **argv) break; case 'a' : - if (mode!=FALSE) + if (mode!=false) { PrintErrorMessage('E',"nlist","specify either the a, s or i option"); return (PARAMERRORCODE); @@ -3004,19 +3004,19 @@ static INT NListCommand (INT argc, char **argv) break; case 'd' : - dataopt = TRUE; + dataopt = true; break; case 'b' : - boundaryopt = TRUE; + boundaryopt = true; break; case 'n' : - neighbouropt = TRUE; + neighbouropt = true; break; case 'v' : - verboseopt = TRUE; + verboseopt = true; break; default : @@ -3075,12 +3075,12 @@ static INT EListCommand (INT argc, char **argv) /* check options */ idopt = LV_ID; - dataopt = boundaryopt = neighbouropt = verboseopt = levelopt = mode = FALSE; + dataopt = boundaryopt = neighbouropt = verboseopt = levelopt = mode = false; for (i=1; i<argc; i++) switch (argv[i][0]) { case 'i' : - if (mode!=FALSE) + if (mode!=false) { PrintErrorMessage('E',"elist","specify either the a, s or i option"); return (PARAMERRORCODE); @@ -3119,7 +3119,7 @@ static INT EListCommand (INT argc, char **argv) break; case 's' : - if (mode!=FALSE) + if (mode!=false) { PrintErrorMessage('E',"elist","specify either the a, s or i option"); return (PARAMERRORCODE); @@ -3128,7 +3128,7 @@ static INT EListCommand (INT argc, char **argv) break; case 'a' : - if (mode!=FALSE) + if (mode!=false) { PrintErrorMessage('E',"elist","specify either the a, s or i option"); return (PARAMERRORCODE); @@ -3137,23 +3137,23 @@ static INT EListCommand (INT argc, char **argv) break; case 'l' : - levelopt = TRUE; + levelopt = true; break; case 'd' : - dataopt = TRUE; + dataopt = true; break; case 'b' : - boundaryopt = TRUE; + boundaryopt = true; break; case 'n' : - neighbouropt = TRUE; + neighbouropt = true; break; case 'v' : - verboseopt = TRUE; + verboseopt = true; break; default : @@ -3213,24 +3213,24 @@ static INT SelectionListCommand (INT argc, char **argv) } /* check options */ - dataopt = boundaryopt = neighbouropt = verboseopt = FALSE; + dataopt = boundaryopt = neighbouropt = verboseopt = false; for (i=1; i<argc; i++) switch (argv[i][0]) { case 'd' : - dataopt = TRUE; + dataopt = true; break; case 'b' : - boundaryopt = TRUE; + boundaryopt = true; break; case 'n' : - neighbouropt = TRUE; + neighbouropt = true; break; case 'v' : - verboseopt = TRUE; + verboseopt = true; break; default : @@ -3269,14 +3269,14 @@ static INT RuleListCommand (INT argc, char **argv) char etype[32]; rn = -1; - allopt = FALSE; + allopt = false; /* check options */ for (i=1; i<argc; i++) switch (argv[i][0]) { case 'a' : - allopt = TRUE; + allopt = true; break; default : @@ -3286,7 +3286,7 @@ static INT RuleListCommand (INT argc, char **argv) } /* scan parameters */ - if (allopt == FALSE) + if (allopt == false) rv = sscanf(argv[0],"rlist %31[triquatethexa] %d",etype,&rn); else rv = sscanf(argv[0],"rlist %31[triaquadtetrahexa]",etype); @@ -3307,13 +3307,13 @@ static INT RuleListCommand (INT argc, char **argv) return (CMDERRORCODE); } - if (rn==-1 && allopt==FALSE || rn>=0 && allopt==TRUE) + if (rn==-1 && allopt==false || rn>=0 && allopt==true) { PrintErrorMessage('E',"rlist","specify rulenumber OR $a option!"); return (CMDERRORCODE); } - if (allopt == TRUE) + if (allopt == true) for (i=0; i<MaxRules[tag]; i++) ShowRefRule(tag,i); else @@ -3331,7 +3331,7 @@ static INT PrintValueCommand (INT argc, char **argv) double val; char name[NAMESIZE]; char value[VALUELEN]; - int found = FALSE; + int found = false; int idx; int n; @@ -3360,7 +3360,7 @@ static INT PrintValueCommand (INT argc, char **argv) { val = VVALUE(vec,VD_CMP_OF_TYPE(theVD,VTYPE(vec),0)); idx = VINDEX(vec); - found = TRUE; + found = true; } } if (found) @@ -3477,13 +3477,13 @@ static INT VMListCommand (INT argc, char **argv) /* check options */ datatypes = 0; idopt = LV_ID; - dataopt = matrixopt = mode = FALSE; + dataopt = matrixopt = mode = false; fl = tl = CURRENTLEVEL(theMG); for (i=1; i<argc; i++) switch (argv[i][0]) { case 'i' : - if (mode!=FALSE) + if (mode!=false) { PrintErrorMessage('E',"vmlist","specify either the a, s or i option"); return (PARAMERRORCODE); @@ -3525,7 +3525,7 @@ static INT VMListCommand (INT argc, char **argv) if (strncmp(argv[i],"skip",4)==0) /* handled by ReadArgvINT */ break; - if (mode!=FALSE) + if (mode!=false) { PrintErrorMessage('E',"vmlist","specify either the a, s or i option"); return (PARAMERRORCODE); @@ -3534,7 +3534,7 @@ static INT VMListCommand (INT argc, char **argv) break; case 'a' : - if (mode!=FALSE) + if (mode!=false) { PrintErrorMessage('E',"vmlist","specify either the a, s or i option"); return (PARAMERRORCODE); @@ -3559,7 +3559,7 @@ static INT VMListCommand (INT argc, char **argv) break; case 'd' : - dataopt = TRUE; + dataopt = true; break; case 't' : @@ -3570,11 +3570,11 @@ static INT VMListCommand (INT argc, char **argv) break; case 'm' : - matrixopt = TRUE; + matrixopt = true; break; case 'z' : - matrixopt = -TRUE; + matrixopt = -true; break; case 'p' : @@ -3934,7 +3934,7 @@ static INT InsertGlobalNodeCommand (INT argc, char **argv) MULTIGRID *theMG; BNDP *bndp; int i; - int ropt = FALSE; + int ropt = false; int err = OKCODE; DOUBLE resolution; INT n = 2; @@ -3955,7 +3955,7 @@ static INT InsertGlobalNodeCommand (INT argc, char **argv) /* assemble command line for bn */ if (ReadArgvDOUBLE("r",&resolution,argc,argv)==0) { - ropt = TRUE; + ropt = true; n++; } my_argv = (char**)malloc(n*sizeof(char*)); @@ -4057,12 +4057,12 @@ static INT DeleteNodeCommand (INT argc, char **argv) } /* check options */ - sopt = FALSE; + sopt = false; for (i=1; i<argc; i++) switch (argv[i][0]) { case 's' : - sopt = TRUE; + sopt = true; break; default : @@ -4144,7 +4144,7 @@ static INT MoveNodeCommand (INT argc, char **argv) } /* check options */ - relative = FALSE; + relative = false; for (i=1; i<argc; i++) switch (argv[i][0]) { @@ -4195,7 +4195,7 @@ static INT MoveNodeCommand (INT argc, char **argv) break; case 'r' : - relative = TRUE; + relative = true; break; default : @@ -4220,7 +4220,7 @@ static INT MoveNodeCommand (INT argc, char **argv) for (j=0; j<DIM; j++) xc[j] += CVECT(myVertex)[j]; } - if (MoveNode(theMG,theNode,xc,TRUE)!=GM_OK) + if (MoveNode(theMG,theNode,xc,true)!=GM_OK) { PrintErrorMessage('E',"move","failed moving the node"); return (CMDERRORCODE); @@ -4486,12 +4486,12 @@ static INT DeleteElementCommand (INT argc, char **argv) } /* check options */ - sopt = FALSE; + sopt = false; for (i=1; i<argc; i++) switch (argv[i][0]) { case 's' : - sopt = TRUE; + sopt = true; break; default : @@ -4568,7 +4568,7 @@ static INT AdaptCommand (INT argc, char **argv) /* check options */ theElemEvalDirection = NULL; mode = GM_REFINE_TRULY_LOCAL; - mark = FALSE; + mark = false; for (i=1; i<argc; i++) switch (argv[i][0]) { @@ -5025,12 +5025,12 @@ static INT MarkCommand (INT argc, char **argv) } /* check options */ - mode = FALSE; + mode = false; for (i=1; i<argc; i++) switch (argv[i][0]) { case 'a' : - if (mode!=FALSE) + if (mode!=false) { PrintErrorMessage('E',"mark","specify only one option of a, b, i, s"); return (PARAMERRORCODE); @@ -5039,7 +5039,7 @@ static INT MarkCommand (INT argc, char **argv) break; case 'i' : - if (mode!=FALSE) + if (mode!=false) { PrintErrorMessage('E',"mark","specify only one option of a, b, i, s"); return (PARAMERRORCODE); @@ -5055,7 +5055,7 @@ static INT MarkCommand (INT argc, char **argv) break; case 's' : - if (mode!=FALSE) + if (mode!=false) { PrintErrorMessage('E',"mark","specify only one option of a, b, i, s"); return (PARAMERRORCODE); @@ -5069,7 +5069,7 @@ static INT MarkCommand (INT argc, char **argv) return (PARAMERRORCODE); } - if (mode==FALSE) + if (mode==false) { PrintErrorMessage('E',"mark","specify exactly one option of a, b, i, s"); return (PARAMERRORCODE); @@ -5235,7 +5235,7 @@ static INT SmoothGridCommand (INT argc, char **argv) /* options */ lowLevel = CURRENTLEVEL(theMG); option = 0; - GridReset = FALSE; + GridReset = false; LimitLocDis = 0.3; bnd_num = 0; for (i=1; i<argc; i++) @@ -5243,7 +5243,7 @@ static INT SmoothGridCommand (INT argc, char **argv) { case 'r' : if (strcmp(argv[i],"reset")==0) - GridReset=TRUE; + GridReset=true; else { PrintErrorMessageF('E',"smoothgrid","(invalid option '%s')",argv[i]); @@ -5349,7 +5349,7 @@ static INT SmoothGridCommand (INT argc, char **argv) option = 4; } UserWriteF("option = %d\n",option); - if (GridReset==TRUE) + if (GridReset==true) { if (SmoothGridReset(theMG,lowLevel,CURRENTLEVEL(theMG))!=0) return(CMDERRORCODE); } @@ -5401,45 +5401,45 @@ static INT OrderNodesCommand (INT argc, char **argv) PrintHelp("ordernodes",HELPITEM," (specify DIM chars out of 'rlud' or 'rlbfud' resp.)"); return(PARAMERRORCODE); } - error = xused = yused = zused = FALSE; + error = xused = yused = zused = false; for (i=0; i<DIM; i++) switch (ord[i]) { case 'r' : - if (xused) error = TRUE; - xused = TRUE; + if (xused) error = true; + xused = true; order[i] = _X_; sign[i] = 1; break; case 'l' : - if (xused) error = TRUE; - xused = TRUE; + if (xused) error = true; + xused = true; order[i] = _X_; sign[i] = -1; break; #ifdef __TWODIM__ case 'u' : - if (yused) error = TRUE; - yused = TRUE; + if (yused) error = true; + yused = true; order[i] = _Y_; sign[i] = 1; break; case 'd' : - if (yused) error = TRUE; - yused = TRUE; + if (yused) error = true; + yused = true; order[i] = _Y_; sign[i] = -1; break; #else case 'b' : - if (yused) error = TRUE; - yused = TRUE; + if (yused) error = true; + yused = true; order[i] = _Y_; sign[i] = 1; break; case 'f' : - if (yused) error = TRUE; - yused = TRUE; + if (yused) error = true; + yused = true; order[i] = _Y_; sign[i] = -1; break; case 'u' : - if (zused) error = TRUE; - zused = TRUE; + if (zused) error = true; + zused = true; order[i] = _Z_; sign[i] = 1; break; case 'd' : - if (zused) error = TRUE; - zused = TRUE; + if (zused) error = true; + zused = true; order[i] = _Z_; sign[i] = -1; break; #endif } @@ -5450,7 +5450,7 @@ static INT OrderNodesCommand (INT argc, char **argv) } /* check options */ - AlsoOrderLinks = FALSE; + AlsoOrderLinks = false; for (i=1; i<argc; i++) switch (argv[i][0]) { @@ -5471,7 +5471,7 @@ static INT OrderNodesCommand (INT argc, char **argv) break; case 'L' : - AlsoOrderLinks = TRUE; + AlsoOrderLinks = true; break; default : @@ -5543,36 +5543,36 @@ static INT LexOrderVectorsCommand (INT argc, char **argv) PrintHelp("lexorderv",HELPITEM," (specify DIM chars out of 'rlud', 'IOPN' or 'rlbfud' resp.)"); return(PARAMERRORCODE); } - error = xused = yused = zused = rused = pused = FALSE; + error = xused = yused = zused = rused = pused = false; for (i=0; i<DIM; i++) switch (ord[i]) { case 'r' : - if (xused) error = TRUE; - xused = TRUE; + if (xused) error = true; + xused = true; order[i] = _X_; sign[i] = 1; break; case 'l' : - if (xused) error = TRUE; - xused = TRUE; + if (xused) error = true; + xused = true; order[i] = _X_; sign[i] = -1; break; case 'u' : - if (yused) error = TRUE; - yused = TRUE; + if (yused) error = true; + yused = true; order[i] = _Y_; sign[i] = 1; break; case 'd' : - if (yused) error = TRUE; - yused = TRUE; + if (yused) error = true; + yused = true; order[i] = _Y_; sign[i] = -1; break; #ifdef __THREEDIM__ case 'b' : - if (zused) error = TRUE; - zused = TRUE; + if (zused) error = true; + zused = true; order[i] = _Z_; sign[i] = 1; break; case 'f' : - if (zused) error = TRUE; - zused = TRUE; + if (zused) error = true; + zused = true; order[i] = _Z_; sign[i] = -1; break; #endif @@ -5580,23 +5580,23 @@ static INT LexOrderVectorsCommand (INT argc, char **argv) /* polar coordiante directions */ case 'I' : /* capital i */ - if (rused) error = TRUE; - rused = TRUE; + if (rused) error = true; + rused = true; order[i] = 0; sign[i] = 1; break; case 'O' : - if (rused) error = TRUE; - rused = TRUE; + if (rused) error = true; + rused = true; order[i] = 0; sign[i] = -1; break; case 'P' : - if (pused) error = TRUE; - pused = TRUE; + if (pused) error = true; + pused = true; order[i] = 1; sign[i] = 1; break; case 'N' : - if (pused) error = TRUE; - pused = TRUE; + if (pused) error = true; + pused = true; order[i] = 1; sign[i] = -1; break; #endif } @@ -5616,7 +5616,7 @@ static INT LexOrderVectorsCommand (INT argc, char **argv) mode = OV_POLAR; /* check options */ - AlsoOrderMatrices = SpecialTreatSkipVecs = FALSE; + AlsoOrderMatrices = SpecialTreatSkipVecs = false; which = GM_TAKE_SKIP | GM_TAKE_NONSKIP; for (i=1; i<argc; i++) switch (argv[i][0]) @@ -5638,7 +5638,7 @@ static INT LexOrderVectorsCommand (INT argc, char **argv) break; case 'm' : - AlsoOrderMatrices = TRUE; + AlsoOrderMatrices = true; break; case 'w' : @@ -5655,7 +5655,7 @@ static INT LexOrderVectorsCommand (INT argc, char **argv) else if (strchr(argv[i],'>')!=NULL) SpecialTreatSkipVecs = GM_PUT_AT_END; else if (strchr(argv[i],'0')!=NULL) - SpecialTreatSkipVecs = FALSE; + SpecialTreatSkipVecs = false; else { PrintErrorMessage('E',"lexorderv","use < or > with s-option"); @@ -5770,9 +5770,9 @@ static INT OrderVectorsCommand (INT argc, char **argv) } levels = GM_CURRENT_LEVEL; - mode = FALSE; + mode = false; dep = dep_opt = cut = NULL; - PutSkipFirst = FALSE; + PutSkipFirst = false; for (i=1; i<argc; i++) switch (argv[i][0]) { @@ -5819,7 +5819,7 @@ static INT OrderVectorsCommand (INT argc, char **argv) break; case 's' : - PutSkipFirst = TRUE; + PutSkipFirst = true; if (sscanf(argv[i],"s %x",&iValue)!=1) { PrintErrorMessage('E',"orderv","could not read skip pattern"); @@ -5838,7 +5838,7 @@ static INT OrderVectorsCommand (INT argc, char **argv) return (PARAMERRORCODE); } - if (mode==FALSE) + if (mode==false) { PrintErrorMessage('E',"orderv","the m option is mandatory"); return (PARAMERRORCODE); @@ -6049,7 +6049,7 @@ static INT FindCommand (INT argc, char **argv) xc[i] = x[i]; /* check options */ - select = isNode = isElement = isVector = FALSE; + select = isNode = isElement = isVector = false; for (i=1; i<argc; i++) switch (argv[i][0]) { @@ -6067,7 +6067,7 @@ static INT FindCommand (INT argc, char **argv) PrintErrorMessage('W',"find","no node is matching"); return (CMDERRORCODE); } - isNode = TRUE; + isNode = true; break; case 'v' : @@ -6084,7 +6084,7 @@ static INT FindCommand (INT argc, char **argv) PrintErrorMessage('W',"find","no vector is matching"); return (CMDERRORCODE); } - isVector = TRUE; + isVector = true; break; case 'e' : @@ -6094,11 +6094,11 @@ static INT FindCommand (INT argc, char **argv) PrintErrorMessage('W',"find","no element is matching"); return (CMDERRORCODE); } - isElement = TRUE; + isElement = true; break; case 's' : - select = TRUE; + select = true; break; default : @@ -6133,13 +6133,13 @@ static INT FindCommand (INT argc, char **argv) else { if (isNode) - ListNode(theMG,theNode,FALSE,FALSE,FALSE,FALSE); + ListNode(theMG,theNode,false,false,false,false); if (isVector) - ListVector(theMG,theVector,FALSE,FALSE,LV_MOD_DEFAULT); + ListVector(theMG,theVector,false,false,LV_MOD_DEFAULT); if (isElement) - ListElement(theMG,theElement,FALSE,FALSE,FALSE,FALSE); + ListElement(theMG,theElement,false,false,false,false); } return (OKCODE); @@ -6381,12 +6381,12 @@ static INT ExtraConnectionCommand (INT argc, char **argv) } /* check options */ - Delete = FALSE; + Delete = false; for (i=1; i<argc; i++) switch (argv[i][0]) { case 'd' : - Delete = TRUE; + Delete = true; break; default : @@ -6449,10 +6449,10 @@ static INT CheckCommand (INT argc, char **argv) } /* set default options */ - checkgeom = TRUE; - checkalgebra = checklists = checkbvp = checknp = FALSE; + checkgeom = true; + checkalgebra = checklists = checkbvp = checknp = false; #ifdef ModelP - checkif = FALSE; + checkif = false; #endif /* read options */ @@ -6460,36 +6460,36 @@ static INT CheckCommand (INT argc, char **argv) switch (argv[i][0]) { case 'a' : - checkgeom = checkalgebra = checklists = checknp = TRUE; + checkgeom = checkalgebra = checklists = checknp = true; #ifdef ModelP - checkif = TRUE; + checkif = true; #endif break; case 'g' : - checkgeom = TRUE; + checkgeom = true; break; case 'c' : - checkalgebra = TRUE; + checkalgebra = true; break; case 'l' : - checklists = TRUE; + checklists = true; break; #ifdef ModelP case 'i' : - checkif = TRUE; + checkif = true; break; #endif case 'b' : - checkbvp = TRUE; + checkbvp = true; break; case 'n' : - checknp = TRUE; + checknp = true; break; case 'w' : @@ -6506,7 +6506,7 @@ static INT CheckCommand (INT argc, char **argv) err = 0; /* check BVP if */ - if (checkbvp==TRUE) + if (checkbvp==true) if (BVP_Check (MG_BVP(theMG))) err++; @@ -6565,19 +6565,19 @@ INT NS_DIM_PREFIX QualityElement (MULTIGRID *theMG, ELEMENT *theElement) if ((lessopt && (min<themin)) && (greateropt && (max>themax))) { UserWrite(minmaxtext); - ListElement(theMG,theElement,FALSE,FALSE,FALSE,FALSE); + ListElement(theMG,theElement,false,false,false,false); if (selectopt) AddElementToSelection(theMG,theElement); } else if (lessopt && (min<themin)) { UserWrite(mintext); - ListElement(theMG,theElement,FALSE,FALSE,FALSE,FALSE); + ListElement(theMG,theElement,false,false,false,false); if (selectopt) AddElementToSelection(theMG,theElement); } else if (greateropt && (max>themax)) { UserWrite(maxtext); - ListElement(theMG,theElement,FALSE,FALSE,FALSE,FALSE); + ListElement(theMG,theElement,false,false,false,false); if (selectopt) AddElementToSelection(theMG,theElement); } @@ -6604,12 +6604,12 @@ static INT QualityCommand (INT argc, char **argv) } /* check options */ - lessopt = greateropt = selectopt = mode = FALSE; + lessopt = greateropt = selectopt = mode = false; for (i=1; i<argc; i++) switch (argv[i][0]) { case 'a' : - if (mode!=FALSE) + if (mode!=false) { PrintErrorMessage('E',"quality","specify either the a, s or i option"); return (PARAMERRORCODE); @@ -6618,7 +6618,7 @@ static INT QualityCommand (INT argc, char **argv) break; case 'i' : - if (mode!=FALSE) + if (mode!=false) { PrintErrorMessage('E',"quality","specify either the a, s or i option"); return (PARAMERRORCODE); @@ -6642,7 +6642,7 @@ static INT QualityCommand (INT argc, char **argv) break; case '<' : - lessopt = TRUE; + lessopt = true; if (sscanf(argv[i],"< %lf",&angle)!=1) { PrintErrorMessage('E',"quality","could not get angle of < option"); @@ -6652,7 +6652,7 @@ static INT QualityCommand (INT argc, char **argv) break; case '>' : - greateropt = TRUE; + greateropt = true; if (sscanf(argv[i],"> %lf",&angle)!=1) { PrintErrorMessage('E',"quality","could not get angle of > option"); @@ -6662,7 +6662,7 @@ static INT QualityCommand (INT argc, char **argv) break; case 's' : - if (mode!=FALSE) + if (mode!=false) { PrintErrorMessage('E',"quality","specify either the a, s or i option"); return (PARAMERRORCODE); @@ -6671,7 +6671,7 @@ static INT QualityCommand (INT argc, char **argv) break; case 'S' : - selectopt = TRUE; + selectopt = true; ClearSelection(theMG); break; @@ -6799,7 +6799,7 @@ static INT MakeGridCommand (INT argc, char **argv) } MarkKey = MG_MARK_KEY(theMG); if (MG_COARSE_FIXED(theMG)) { - MG_COARSE_FIXED(theMG) = FALSE; + MG_COARSE_FIXED(theMG) = false; MarkTmpMem(MGHEAP(theMG),&MarkKey); MG_MARK_KEY(theMG) = MarkKey; if ((MGNDELEMPTRARRAY(theMG) = @@ -7111,7 +7111,7 @@ static INT CADGridConvertCommand(INT argc, char **argv) /* get problem, domain and format */ theFormat = NULL; heapSize = 0; - hopt = FALSE; + hopt = false; for (i=1; i<argc; i++) switch (argv[i][0]) { @@ -7130,7 +7130,7 @@ static INT CADGridConvertCommand(INT argc, char **argv) PrintHelp("new",HELPITEM," (cannot read heapsize specification)"); return(PARAMERRORCODE); } - hopt = TRUE; + hopt = true; break; default : @@ -7226,7 +7226,7 @@ static INT ScreenSizeCommand (INT argc, char **argv) NO_OPTION_CHECK(argc,argv); - if (GetScreenSize(size)==FALSE) + if (GetScreenSize(size)==false) { PrintErrorMessage('W',"screensize","there is no monitor"); return (OKCODE); @@ -7365,7 +7365,7 @@ static INT CloseWindowCommand (INT argc, char **argv) theWin = currWin; /* check options */ - aopt = FALSE; + aopt = false; for (i=1; i<argc; i++) switch (argv[i][0]) { @@ -7383,7 +7383,7 @@ static INT CloseWindowCommand (INT argc, char **argv) break; case 'a' : - aopt = TRUE; + aopt = true; break; default : @@ -7522,7 +7522,7 @@ static INT DrawTextCommand (INT argc, char **argv) pos.x = x; pos.y = y; /* check options */ - centeropt = FALSE; + centeropt = false; mode = TEXT_REGULAR; size = 0; for (i=1; i<argc; i++) @@ -7559,7 +7559,7 @@ static INT DrawTextCommand (INT argc, char **argv) break; case 'c' : - centeropt = TRUE; + centeropt = true; break; default : @@ -7603,7 +7603,7 @@ static INT OpenPictureCommand (INT argc, char **argv) /* check options */ picname[0] = '\0'; - sopt = FALSE; + sopt = false; for (i=1; i<argc; i++) switch (argv[i][0]) { @@ -7629,7 +7629,7 @@ static INT OpenPictureCommand (INT argc, char **argv) break; case 's' : - sopt = TRUE; + sopt = true; if (sscanf(argv[i],"s %d %d %d %d",&h,&v,&dh,&dv)!=4) { PrintErrorMessage('E',"openpicture","specify h, v, dh, dv with s option"); @@ -7849,13 +7849,13 @@ static INT ClosePictureCommand (INT argc, char **argv) } /* check options */ - aopt = wopt = FALSE; + aopt = wopt = false; picname[0] = '\0'; for (i=1; i<argc; i++) switch (argv[i][0]) { case 'w' : - wopt = TRUE; + wopt = true; if (sscanf(argv[i],expandfmt(CONCAT5("w %",NAMELENSTR,"[a-zA-Z0-9_] %",NAMELENSTR,"[a-zA-Z0-9_]")),winname,picname)<1) { PrintErrorMessage('E',"closepicture","specify a window name with w option"); @@ -7869,7 +7869,7 @@ static INT ClosePictureCommand (INT argc, char **argv) break; case 'a' : - aopt = TRUE; + aopt = true; break; default : @@ -8321,16 +8321,16 @@ static INT CopyViewCommand (INT argc, char **argv) PrintErrorMessage('E',"cpview","there's no current picture"); return (CMDERRORCODE); } - all = cut = FALSE; + all = cut = false; for (i=1; i<argc; i++) switch (argv[i][0]) { case 'a' : - all = TRUE; + all = true; break; case 'c' : - cut = TRUE; + cut = true; break; default : @@ -9101,7 +9101,7 @@ static INT ClearCommand (INT argc, char **argv) } /* check options */ fl = tl = CURRENTLEVEL(theMG); - skip = FALSE; + skip = false; xflag = -1; value = 0.0; j = -1; @@ -9113,7 +9113,7 @@ static INT ClearCommand (INT argc, char **argv) break; case 's' : - skip = TRUE; + skip = true; break; case 'x' : @@ -9605,7 +9605,7 @@ static INT ReInitCommand (INT argc, char **argv) char BVPName[NAMESIZE]; /* check options */ - bopt = FALSE; + bopt = false; for (i=1; i<argc; i++) switch (argv[i][0]) { @@ -9616,7 +9616,7 @@ static INT ReInitCommand (INT argc, char **argv) PrintErrorMessage('E',"reinit","could not read BndValProblem string"); return(PARAMERRORCODE); } - bopt = TRUE; + bopt = true; break; /* no default because param list is passed to reinit function */ @@ -9835,12 +9835,12 @@ static INT NumProcDisplayCommand (INT argc, char **argv) } /* check options */ - All = Class = FALSE; + All = Class = false; for (i=1; i<argc; i++) switch (argv[i][0]) { case 'a' : - All = TRUE; + All = true; break; case 'c' : @@ -9852,7 +9852,7 @@ static INT NumProcDisplayCommand (INT argc, char **argv) return (CMDERRORCODE); return (OKCODE); } - Class = TRUE; + Class = true; break; default : @@ -10212,10 +10212,10 @@ static INT SetCommandKeyCommand (INT argc, char **argv) } /* show bar before in keylist? */ - ShowBar = FALSE; + ShowBar = false; if (argv[begin][0]=='-') { - ShowBar = TRUE; + ShowBar = true; begin++; } @@ -11301,9 +11301,9 @@ static INT InitArray (void) theArrayVarID = GetNewEnvVarID(); /* path to dir for 'array' files */ - arraypathes_set = FALSE; + arraypathes_set = false; if (ReadSearchingPaths(DEFAULTSFILENAME,"arraypathes")==0) - arraypathes_set = TRUE; + arraypathes_set = true; return (0); } diff --git a/ui/helpmsg.cc b/ui/helpmsg.cc index ed6982122..f8fbedfa4 100644 --- a/ui/helpmsg.cc +++ b/ui/helpmsg.cc @@ -142,7 +142,7 @@ static void WriteFormatted (const char *text) { char buffer[LONGBUFFSIZE]; INT tp,bp; - static INT verbatim = FALSE; + static INT verbatim = false; tp = bp = 0; buffer[0] = '\0'; @@ -152,7 +152,7 @@ static void WriteFormatted (const char *text) { if (END_VERBATIM(text)) { - verbatim = FALSE; + verbatim = false; /* end verbatim: skip this line */ return; @@ -170,7 +170,7 @@ static void WriteFormatted (const char *text) } else if (BEGIN_VERBATIM(text)) { - verbatim = TRUE; + verbatim = true; /* begin verbatim: skip this line */ return; @@ -421,7 +421,7 @@ INT NS_DIM_PREFIX CheckHelp () rv = 0; for (theCmd=GetFirstCommand(); theCmd!=NULL; theCmd=GetNextCommand(theCmd)) { - found = FALSE; + found = false; strcpy(cmdname,ENVITEM_NAME(theCmd)); /* case INSENSITIVE: convert the command name to lower case */ @@ -455,7 +455,7 @@ INT NS_DIM_PREFIX CheckHelp () /* scan first word */ if ((sscanf(ToLower(buffer),"%s",HelpItem)==1)&&(strcmp(HelpItem,cmdname)==0)) { - found = TRUE; + found = true; break; } } diff --git a/ui/uginterface.cc b/ui/uginterface.cc index 3243637ad..508b2d745 100644 --- a/ui/uginterface.cc +++ b/ui/uginterface.cc @@ -460,7 +460,7 @@ INT NS_DIM_PREFIX DelCmdKey (char c) theCmdKey = (CMDKEY *) SearchEnv(theCmdKeyName,"/Cmd Keys",theCmdKeyVarID,theCmdKeyDirID); if (theCmdKey != NULL) { - ENVITEM_LOCKED(theCmdKey) = FALSE; + ENVITEM_LOCKED(theCmdKey) = false; if (RemoveEnvItem((ENVITEM *)theCmdKey)) return (1); } @@ -570,7 +570,7 @@ INT NS_DIM_PREFIX DelAllCmdKeys (void) for (theCmdKey = (CMDKEY *) theDir->down; theCmdKey!=NULL; theCmdKey=(CMDKEY *) NEXT_ENVITEM(theCmdKey)) if (ENVITEM_TYPE(theCmdKey) == theCmdKeyVarID) { - ENVITEM_LOCKED(theCmdKey) = FALSE; + ENVITEM_LOCKED(theCmdKey) = false; if (RemoveEnvItem((ENVITEM *)theCmdKey)) return (1); } @@ -875,7 +875,7 @@ static INT ProcessEvent (char *String, INT EventMask) { if (use_bullet) { if (BulletDrawUgPicture(thePic, offset_factor)) { - autoRefresh = FALSE; + autoRefresh = false; PrintErrorMessage('W',"ProcessEvent","autorefresh is switched OFF"); return (PE_OTHER); } @@ -883,7 +883,7 @@ static INT ProcessEvent (char *String, INT EventMask) else { if (DrawUgPicture(thePic)) { - autoRefresh = FALSE; + autoRefresh = false; PrintErrorMessage('W',"ProcessEvent","autorefresh is switched OFF"); return (PE_OTHER); } @@ -1273,7 +1273,7 @@ INT NS_DIM_PREFIX UserIn (char *String) EventMask = EVERY_EVENT; /* loop till string is entered */ - while (TRUE) + while (true) { Code = ProcessEvent(String,EventMask); #ifdef ModelP @@ -1321,7 +1321,7 @@ INT NS_DIM_PREFIX UserRead (char *String) EventMask = TERM_STRING; /* loop till string is entered */ - while (TRUE) + while (true) { Code = ProcessEvent(String,EventMask); #ifdef ModelP @@ -1347,7 +1347,7 @@ INT NS_DIM_PREFIX UserRead (char *String) INT SetRefreshState (INT status) PARAMETERS: - . status - 'TRUE' or 'FALSE' + status - 'true' or 'false' DESCRIPTION: If autoRefresh is on then invalid pictures will be updated automatically -- GitLab