|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51014 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2009-02-04 14:28:31
Author: jewillco
Date: 2009-02-04 14:28:31 EST (Wed, 04 Feb 2009)
New Revision: 51014
URL: http://svn.boost.org/trac/boost/changeset/51014
Log:
Fixed qcc errors
Text files modified:
trunk/boost/graph/read_dimacs.hpp | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
Modified: trunk/boost/graph/read_dimacs.hpp
==============================================================================
--- trunk/boost/graph/read_dimacs.hpp (original)
+++ trunk/boost/graph/read_dimacs.hpp 2009-02-04 14:28:31 EST (Wed, 04 Feb 2009)
@@ -18,6 +18,7 @@
#include <iostream>
#include <cstdio>
#include <cstring>
+#include <cstdlib>
#include <boost/graph/graph_traits.hpp>
@@ -134,13 +135,13 @@
if (
/* reading problem line: type of problem, no of nodes, no of arcs */
- sscanf ( in_line.c_str(), "%*c %3s %ld %ld", pr_type, &n, &m )
+ std::sscanf ( in_line.c_str(), "%*c %3s %ld %ld", pr_type, &n, &m )
!= P_FIELDS
)
/*wrong number of parameters in the problem line*/
{ err_no = EN2; goto error; }
- if ( strcmp ( pr_type, PROBLEM_TYPE ) )
+ if ( std::strcmp ( pr_type, PROBLEM_TYPE ) )
/*wrong problem type*/
{ err_no = EN3; goto error; }
@@ -160,7 +161,7 @@
{ err_no = EN8; goto error; }
/* reading source or sink */
- k = sscanf ( in_line.c_str(),"%*c %ld %c", &i, &nd );
+ k = std::sscanf ( in_line.c_str(),"%*c %ld %c", &i, &nd );
--i; // index from 0
if ( k < NODE_FIELDS )
/* node line is incorrect */
@@ -208,8 +209,8 @@
if (
/* reading an arc description */
- sscanf ( in_line.c_str(),"%*c %ld %ld %ld",
- &tail, &head, &cap )
+ std::sscanf ( in_line.c_str(),"%*c %ld %ld %ld",
+ &tail, &head, &cap )
!= ARC_FIELDS
)
/* arc description is not correct */
@@ -269,10 +270,10 @@
/* ---------------------------------- */
error: /* error found reading input */
- printf ( "\nline %ld of input - %s\n",
- no_lines, err_message[err_no] );
+ std::printf ( "\nline %ld of input - %s\n",
+ no_lines, err_message[err_no] );
- exit (1);
+ std::exit (1);
return (0); /* to avoid warning */
}
/* -------------------- end of parser -------------------*/
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk