Blob Blame Raw
diff -up OS-2.10.1/src/OSCommonInterfaces/OSMatrix.cpp.orig OS-2.10.1/src/OSCommonInterfaces/OSMatrix.cpp
--- OS-2.10.1/src/OSCommonInterfaces/OSMatrix.cpp.orig	2016-03-17 12:26:50.735880890 -0300
+++ OS-2.10.1/src/OSCommonInterfaces/OSMatrix.cpp	2016-03-17 12:27:01.395881298 -0300
@@ -2297,7 +2297,7 @@ ExpandedMatrixBlocks* MatrixType::getBlo
 
     if (!processBlocks(rowPartition, rowPartitionSize,
                        colPartition, colPartitionSize, false, symmetry))
-       return false;
+       return NULL;
     return ExpandedMatrixByBlocks.back();
 }// end of MatrixType::getBlocks
 
diff -up OS-2.10.1/src/OSParsers/OSParseosil.y.orig OS-2.10.1/src/OSParsers/OSParseosil.y
--- OS-2.10.1/src/OSParsers/OSParseosil.y.orig	2016-03-17 12:26:57.922881165 -0300
+++ OS-2.10.1/src/OSParsers/OSParseosil.y	2016-03-17 12:31:37.978891889 -0300
@@ -131,9 +131,9 @@ char *parseBase64( const char **p, int *
 
 #define	ISDIGIT(_c) ((_c) >= '0' && (_c) <= '9')
 
-#define GETATTRIBUTETEXT  	\
+#define GETATTRIBUTETEXT(TYPE)  	\
 	for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ; \
-	if( *ch != '=') {  osilerror_wrapper( ch, osillineno, "found an attribute not defined"); return false;}  \
+	if( *ch != '=') {  osilerror_wrapper( ch, osillineno, "found an attribute not defined"); return (TYPE)0;}  \
 	ch++; \
 	for(; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;	\
 	if(*ch == '\"'){ \
@@ -149,7 +149,7 @@ char *parseBase64( const char **p, int *
 	        *p = ch; \
 	        for( ; *ch != '\''; ch++); \
 	    } \
-	    else {  osilerror_wrapper( ch, osillineno,"missing quote on attribute"); return false;} \
+	    else {  osilerror_wrapper( ch, osillineno,"missing quote on attribute"); return (TYPE)0;} \
 	}\
 	numChar = ch - *p; \
 	attText = new char[numChar + 1]; \
@@ -6446,7 +6446,7 @@ bool parseVariables( const char **p,  OS
     while(*c_numberOfVariables++  == *ch) ch++;
     if( (ch - *p) != 17) {  osilerror_wrapper( ch,osillineno,"incorrect numberOfVariables attribute in <variables tag>"); return false;}    
     // buf_index should be pointing to the first character after numberOfVariables
-    GETATTRIBUTETEXT;
+    GETATTRIBUTETEXT(bool);
     ch++;
     numberOfVariables = atoimod1( osillineno, attText, attTextEnd);
     delete [] attText;
@@ -6496,7 +6496,7 @@ bool parseVariables( const char **p,  OS
                     name -= 5;
                     if(varnameattON == true) {  osilerror_wrapper( ch,osillineno,"too many variable name attributes"); return false;}
                     varnameattON = true;
-                    GETATTRIBUTETEXT;
+                    GETATTRIBUTETEXT(bool);
                     osinstance->instanceData->variables->var[varcount]->name=attText;
                     delete [] attText;
                     break;
@@ -6507,7 +6507,7 @@ bool parseVariables( const char **p,  OS
                     type -= 5;
                     if(vartypeattON == true) {  osilerror_wrapper( ch,osillineno,"too many variable type attributes"); return false;}
                     vartypeattON = true;
-                    GETATTRIBUTETEXT;
+                    GETATTRIBUTETEXT(bool);
                     vt = returnVarType(attText[0]);
                     if( vt == 0 ) {  osilerror_wrapper( ch,osillineno,"variable type not recognized"); return false;}
                     osinstance->instanceData->variables->var[varcount]->type = attText[0];
@@ -6518,7 +6518,7 @@ bool parseVariables( const char **p,  OS
                     if(*ch++ != 'b') {  osilerror_wrapper( ch,osillineno,"error in variables lower bound attribute"); return false;}
                     if(varlbattON == true) {  osilerror_wrapper( ch,osillineno,"too many variable lb attributes"); return false;}
                     varlbattON = true;
-                    GETATTRIBUTETEXT;
+                    GETATTRIBUTETEXT(bool);
                     osinstance->instanceData->variables->var[varcount]->lb = atofmod1( osillineno,attText, attTextEnd);
                     delete [] attText;
                     break;
@@ -6527,7 +6527,7 @@ bool parseVariables( const char **p,  OS
                     if(*ch++ != 'b') {  osilerror_wrapper( ch,osillineno,"error in variables upper bound attribute"); return false;}
                     if(varubattON == true) {  osilerror_wrapper( ch,osillineno,"too many variable ub attributes"); return false;}
                     varubattON = true;
-                    GETATTRIBUTETEXT;
+                    GETATTRIBUTETEXT(bool);
                     osinstance->instanceData->variables->var[varcount]->ub = atofmod1( osillineno,attText, attTextEnd);
                     delete [] attText;
                     break;
@@ -6538,7 +6538,7 @@ bool parseVariables( const char **p,  OS
                     mult -= 5;
                     if(varmultattON == true) {  osilerror_wrapper( ch,osillineno,"too many variable mult attributes"); return false;}
                     varmultattON = true;
-                    GETATTRIBUTETEXT;
+                    GETATTRIBUTETEXT(bool);
                     varmult = atoimod1( osillineno,attText, attTextEnd);
                     delete [] attText;
                     break;
@@ -6742,7 +6742,7 @@ bool parseObjectives( const char **p, OS
         *p = ch;
         while( *c_numberOfObjectives++  == *ch) ch++;
         if( (ch - *p) != 18) {  osilerror_wrapper( ch,osillineno,"incorrect numberOfObjectives attribute in <objectives> tag"); return false;}    
-        GETATTRIBUTETEXT;
+        GETATTRIBUTETEXT(bool);
         numberOfObjectives = atoimod1( osillineno, attText, attTextEnd);
         delete [] attText;
         ch++;
@@ -6797,7 +6797,7 @@ bool parseObjectives( const char **p, OS
                     else{
                         if(objnumberOfObjCoefattON == true) {  osilerror_wrapper( ch,osillineno,"too many obj numberOfObjCoef attributes"); return false;}
                         objnumberOfObjCoefattON = true;
-                        GETATTRIBUTETEXT;
+                        GETATTRIBUTETEXT(bool);
                         osinstance->instanceData->objectives->obj[objcount]->numberOfObjCoef=atoimod1( osillineno,attText, attTextEnd);
                         if(osinstance->instanceData->objectives->obj[objcount]->numberOfObjCoef > 0 && osinstance->instanceData->variables->numberOfVariables == 0){  osilerror_wrapper( ch,osillineno,"we have zero variables, but have objective function coefficients"); return false;}
                         osinstance->instanceData->objectives->obj[objcount]->coef = new ObjCoef*[osinstance->instanceData->objectives->obj[ objcount]->numberOfObjCoef];
@@ -6813,7 +6813,7 @@ bool parseObjectives( const char **p, OS
                     else{
                         if(objnameattON == true) {  osilerror_wrapper( ch,osillineno,"too many obj name attributes"); return false;}
                         objnameattON = true;
-                        GETATTRIBUTETEXT;
+                        GETATTRIBUTETEXT(bool);
                         osinstance->instanceData->objectives->obj[objcount]->name=attText;
                         delete [] attText;
                     }
@@ -6827,7 +6827,7 @@ bool parseObjectives( const char **p, OS
                 else{
                     if(objconstantattON == true) {  osilerror_wrapper( ch,osillineno,"too many obj constant attributes"); return false;}
                     objconstantattON = true;
-                    GETATTRIBUTETEXT;
+                    GETATTRIBUTETEXT(bool);
                     osinstance->instanceData->objectives->obj[objcount]->constant=atofmod1( osillineno,attText, attTextEnd);
                     delete [] attText;
                 }
@@ -6840,7 +6840,7 @@ bool parseObjectives( const char **p, OS
                 else{
                     if(objweightattON == true) {  osilerror_wrapper( ch,osillineno,"too many obj weight attributes"); return false;}
                     objweightattON = true;
-                    GETATTRIBUTETEXT;
+                    GETATTRIBUTETEXT(bool);
                     osinstance->instanceData->objectives->obj[objcount]->weight=atofmod1( osillineno,attText, attTextEnd);
                     delete [] attText;
                 }
@@ -6854,7 +6854,7 @@ bool parseObjectives( const char **p, OS
                     else{
                         if(objmaxOrMinattON == true) {  osilerror_wrapper( ch,osillineno,"too many obj maxOrMin attributes"); return false;}
                         objmaxOrMinattON = true;
-                        GETATTRIBUTETEXT;
+                        GETATTRIBUTETEXT(bool);
                         if( (strcmp("max", attText) != 0 ) && (strcmp("min", attText) != 0 ) ){osilerror_wrapper( ch,osillineno,"maxOrMin attribute in objective must be a max or min"); return false;}
                         osinstance->instanceData->objectives->obj[objcount]->maxOrMin = attText;
                         delete [] attText;
@@ -6868,7 +6868,7 @@ bool parseObjectives( const char **p, OS
                     else{
                         if(objmultattON == true) {  osilerror_wrapper( ch,osillineno,"too many obj mult attributes"); return false;}
                         objmultattON = true;
-                        GETATTRIBUTETEXT;
+                        GETATTRIBUTETEXT(bool);
                         objmult = atoimod1( osillineno,attText, attTextEnd);
                         delete [] attText;
                     }
@@ -7059,7 +7059,7 @@ bool parseConstraints( const char **p, O
     while( *c_numberOfConstraints++  == *ch) ch++;
     if( (ch - *p) != 19) {  osilerror_wrapper( ch,osillineno,"incorrect numberOfConstraints attribute in <constraints> tag"); return false;}    
     // ch should be pointing to the first character after numberOfConstraints
-    GETATTRIBUTETEXT;
+    GETATTRIBUTETEXT(bool);
     ch++;
     numberOfConstraints = atoimod1( osillineno, attText, attTextEnd);
     delete [] attText;
@@ -7103,7 +7103,7 @@ bool parseConstraints( const char **p, O
                 if(connameattON == true) {  osilerror_wrapper( ch,osillineno,"too many con name attributes"); return false;}
                 name -= 5;
                 connameattON = true;
-                GETATTRIBUTETEXT;
+                GETATTRIBUTETEXT(bool);
                 osinstance->instanceData->constraints->con[concount]->name=attText;
                 delete [] attText;
                 break;
@@ -7114,7 +7114,7 @@ bool parseConstraints( const char **p, O
                 if(conconstantattON == true) {  osilerror_wrapper( ch,osillineno,"too many con constant attributes"); return false;}
                 constant -= 9;
                 conconstantattON = true;
-                GETATTRIBUTETEXT;
+                GETATTRIBUTETEXT(bool);
                 osinstance->instanceData->constraints->con[concount]->constant=atofmod1( osillineno,attText, attTextEnd);
                 delete [] attText;
                 break;
@@ -7123,7 +7123,7 @@ bool parseConstraints( const char **p, O
                 if(*ch++ != 'b') {   osilerror_wrapper( ch,osillineno,"error in constraint lb attribute"); return false;}
                 if(conlbattON == true) {  osilerror_wrapper( ch,osillineno,"too many con lb attributes"); return false;}
                 conlbattON = true;
-                GETATTRIBUTETEXT;
+                GETATTRIBUTETEXT(bool);
                 osinstance->instanceData->constraints->con[concount]->lb = atofmod1( osillineno,attText, attTextEnd);
                 delete [] attText;
                 break;
@@ -7132,7 +7132,7 @@ bool parseConstraints( const char **p, O
                 if(*ch++ != 'b') {  osilerror_wrapper( ch,osillineno,"error in constraint ub attribute"); return false;}
                 if(conubattON == true) {  osilerror_wrapper( ch,osillineno,"too many con ub attributes"); return false;}
                 conubattON = true;
-                GETATTRIBUTETEXT;
+                GETATTRIBUTETEXT(bool);
                 osinstance->instanceData->constraints->con[concount]->ub = atofmod1( osillineno,attText, attTextEnd);
                 delete [] attText;
                 break;
@@ -7143,7 +7143,7 @@ bool parseConstraints( const char **p, O
                 if(conmultattON == true) {  osilerror_wrapper( ch,osillineno,"too many con mult attributes"); return false;}
                 mult -= 5;
                 conmultattON = true;
-                GETATTRIBUTETEXT;
+                GETATTRIBUTETEXT(bool);
                 conmult = atoimod1( osillineno,attText, attTextEnd);
                 delete [] attText;
                 break;
@@ -7311,7 +7311,7 @@ bool parseLinearConstraintCoefficients(
     while( *c_numberOfValues++  == *ch) ch++;
     if( (ch - *p) != 14) {  osilerror_wrapper( ch,osillineno,"incorrect numberOfValues attribute in <linearConstraintCoefficients> tag"); return false;}
     // ch should be pointing to the first character after numberOfValues
-    GETATTRIBUTETEXT;
+    GETATTRIBUTETEXT(bool);
     ch++;
     numberOfValues = atoimod1( osillineno, attText, attTextEnd);
     if(numberOfValues > 0 && osinstance->instanceData->variables->numberOfVariables == 0){  osilerror_wrapper( ch,osillineno,"we have zero variables, but A matrix coefficients"); return false;}
@@ -7462,7 +7462,7 @@ bool parseStart(const char **p, OSInstan
                     if(elincrattON == true) {  osilerror_wrapper( ch,osillineno,"too many el incr attributes"); return false;}
                     incr -= 5;
                     elincrattON = true;
-                    GETATTRIBUTETEXT;
+                    GETATTRIBUTETEXT(bool);
                     elincr = atoimod1( osillineno,attText, attTextEnd);
                     delete [] attText;
                     break;
@@ -7473,7 +7473,7 @@ bool parseStart(const char **p, OSInstan
                     if(elmultattON == true) {  osilerror_wrapper( ch,osillineno,"too many el mult attributes"); return false;}
                     mult -= 5;
                     elmultattON = true;
-                    GETATTRIBUTETEXT;
+                    GETATTRIBUTETEXT(bool);
                     elmult = atoimod1( osillineno,attText, attTextEnd);
                     delete [] attText;
                     break;
@@ -7669,7 +7669,7 @@ bool parseRowIdx( const char **p, OSInst
                     if(elincrattON == true) {  osilerror_wrapper( ch,osillineno,"too many el incr attributes"); return false;}
                     incr -= 5;
                     elincrattON = true;
-                    GETATTRIBUTETEXT;
+                    GETATTRIBUTETEXT(bool);
                     elincr = atoimod1( osillineno,attText, attTextEnd);
                     delete [] attText;
                     break;
@@ -7680,7 +7680,7 @@ bool parseRowIdx( const char **p, OSInst
                     if(elmultattON == true) {  osilerror_wrapper( ch,osillineno,"too many el mult attributes"); return false;}
                     mult -= 5;
                     elmultattON = true;
-                    GETATTRIBUTETEXT;
+                    GETATTRIBUTETEXT(bool);
                     elmult = atoimod1( osillineno,attText, attTextEnd);
                     delete [] attText;
                     break;
@@ -7871,7 +7871,7 @@ bool parseColIdx( const char **p, OSInst
                     if(elincrattON == true) {  osilerror_wrapper( ch,osillineno,"too many el incr attributes"); return false;}
                     incr -= 5;
                     elincrattON = true;
-                    GETATTRIBUTETEXT;
+                    GETATTRIBUTETEXT(bool);
                     elincr = atoimod1( osillineno,attText, attTextEnd);
                     delete [] attText;
                     break;
@@ -7882,7 +7882,7 @@ bool parseColIdx( const char **p, OSInst
                     if(elmultattON == true) {  osilerror_wrapper( ch,osillineno,"too many el mult attributes"); return false;}
                     mult -= 5;
                     elmultattON = true;
-                    GETATTRIBUTETEXT;
+                    GETATTRIBUTETEXT(bool);
                     elmult = atoimod1( osillineno,attText, attTextEnd);
                     delete [] attText;
                     break;
@@ -8075,7 +8075,7 @@ bool parseValue( const char **p, OSInsta
                     if(elincrattON == true) {  osilerror_wrapper( ch,osillineno,"too many el incr attributes"); return false;}
                     incr -= 5;
                     elincrattON = true;
-                    GETATTRIBUTETEXT;
+                    GETATTRIBUTETEXT(bool);
                     elincr = atofmod1( osillineno,attText, attTextEnd);
                     delete [] attText;
                     break;
@@ -8086,7 +8086,7 @@ bool parseValue( const char **p, OSInsta
                     if(elmultattON == true) {  osilerror_wrapper( ch,osillineno,"too many el mult attributes"); return false;}
                     mult -= 5;
                     elmultattON = true;
-                    GETATTRIBUTETEXT;
+                    GETATTRIBUTETEXT(bool);
                     elmult = atoimod1( osillineno,attText, attTextEnd);
                     delete [] attText;
                     break;
@@ -8204,7 +8204,7 @@ bool parseObjCoef( const char **p, int o
         if( (ch - *p) != 3) {  osilerror_wrapper( ch,osillineno,"incorrect idx attribute in objective function <idx> tag"); return false;}    
         c_idx -= 4;
         // ch should be pointing to the first character after idx attribute
-        GETATTRIBUTETEXT;
+        GETATTRIBUTETEXT(bool);
         osinstance->instanceData->objectives->obj[objcount]->coef[ k]->idx  = atoimod1( osillineno, attText, attTextEnd);
         delete [] attText;
         ch++;    
@@ -8257,9 +8257,9 @@ char *parseBase64(const char **p, int *d
     // eat the white space
     for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
     for(i = 0; sizeOf[i]  == *ch; i++, ch++);
-    if(i != 6) {  osilerror_wrapper( ch,osillineno,"incorrect sizeOf attribute in <base64BinaryData> element"); return false;}    
+    if(i != 6) {  osilerror_wrapper( ch,osillineno,"incorrect sizeOf attribute in <base64BinaryData> element"); return NULL;}    
     // ch should be pointing to the first character after sizeOf
-    GETATTRIBUTETEXT;
+    GETATTRIBUTETEXT(char*);
     ch++;
     *dataSize = atoimod1( osillineno, attText, attTextEnd);
     delete [] attText;
@@ -8267,7 +8267,7 @@ char *parseBase64(const char **p, int *d
     // eat the white space
     for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
     // better have an > sign or not valid
-    if(*ch != '>' ) {  osilerror_wrapper( ch,osillineno,"<base64BinaryData> element does not have a proper closing >"); return false;}
+    if(*ch != '>' ) {  osilerror_wrapper( ch,osillineno,"<base64BinaryData> element does not have a proper closing >"); return NULL;}
     ch++;
     // we are now pointing start of the data
     const char *b64textstart = ch;
@@ -8276,7 +8276,7 @@ char *parseBase64(const char **p, int *d
     const char *b64textend = ch;
     // we should be pointing to </base64BinaryData>
     for(i = 0; endBase64BinaryData[i]  == *ch; i++, ch++);
-    if(i != 18) { osilerror_wrapper( ch,osillineno," problem with <base64BinaryData> element"); return false;}
+    if(i != 18) { osilerror_wrapper( ch,osillineno," problem with <base64BinaryData> element"); return NULL;}
     int b64len = b64textend - b64textstart;
     b64string = new char[ b64len + 1]; 
     for(ki = 0; ki < b64len; ki++) b64string[ki] = b64textstart[ ki]; 
@@ -8284,7 +8284,7 @@ char *parseBase64(const char **p, int *d
     // burn the white space
     for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
     // better have an > sign or not valid
-    if(*ch != '>' ) {  osilerror_wrapper( ch,osillineno,"</base64BinaryData> element does not have a proper closing >"); return false;}
+    if(*ch != '>' ) {  osilerror_wrapper( ch,osillineno,"</base64BinaryData> element does not have a proper closing >"); return NULL;}
     ch++;
     for( ; ISWHITESPACE( *ch) || isnewline( *ch, osillineno); ch++ ) ;
     *p = ch;