fix error messages and formatting
Stefan Schuermans

Stefan Schuermans commited on 2018-08-14 11:42:52
Showing 1 changed files, with 6 additions and 4 deletions.

... ...
@@ -270,7 +270,7 @@ static int readDXF(std::string const &strDxfFileName,
270 270
   std::map<unsigned int, Layer>::const_iterator itDistri;
271 271
   for (itDistri = gLayerDistributors.begin();
272 272
        itDistri != gLayerDistributors.end(); ++itDistri)
273
-    std::cout << "    " << itDistri->first << ": "
273
+    std::cout << "    0x" << std::hex << itDistri->first << std::dec << ": "
274 274
               << itDistri->second.mObjects.size() << std::endl;
275 275
 
276 276
   return SUCCESS;
... ...
@@ -374,7 +374,8 @@ static int createDistri(Distri &distri, const Layer *pLayer,
374 374
   // must have exactly one object
375 375
   if (pLayer->mObjects.size() != 1) {
376 376
     std::cerr << "layer of distributor 0x" << std::hex << distri.getNo()
377
-              << "contains no object or multiple objects" << std::endl;
377
+              << std::dec << " contains no object or multiple objects"
378
+              << std::endl;
378 379
     return ERR_PROC;
379 380
   }
380 381
   const Object *pObjDistri = pLayer->mObjects[0];
... ...
@@ -383,7 +384,7 @@ static int createDistri(Distri &distri, const Layer *pLayer,
383 384
   std::vector<Layer::Intersection> intersectsNet;
384 385
   gLayerNetwork.getIntersections(pObjDistri, intersectsNet);
385 386
   if (intersectsNet.size() != 1) {
386
-    std::cerr << "distributor 0x" << std::hex << distri.getNo()
387
+    std::cerr << "distributor 0x" << std::hex << distri.getNo() << std::dec
387 388
               << "has no network connection or multiple network connections"
388 389
               << std::endl;
389 390
     return ERR_PROC;
... ...
@@ -613,7 +614,8 @@ int main(int argc, char *argv[])
613 614
           std::cerr << "error: missing argument for \"-s\"" << std::endl;
614 615
         }
615 616
       } else {
616
-        std::cerr << "error: unknown option \"" << argv[argi] << "\", call without arguments for usage" << std::endl;
617
+        std::cerr << "error: unknown option \"" << argv[argi]
618
+                  << "\", call without arguments for usage" << std::endl;
617 619
         arg_err = true;
618 620
       }
619 621
     } // for argi
620 622