diff options
author | joye <joye> | 2014-04-24 19:01:30 (GMT) |
---|---|---|
committer | joye <joye> | 2014-04-24 19:01:30 (GMT) |
commit | 6a107486197fabb64f1e5bc07972ac29c75a1d16 (patch) | |
tree | c38a9fcb3dce633dc4d48abd492e7d4a7e423e31 /src/bltGrMarkerOp.C | |
parent | 0bc6589c10da2193d451ab2419ec87255c696c0d (diff) | |
download | blt-6a107486197fabb64f1e5bc07972ac29c75a1d16.zip blt-6a107486197fabb64f1e5bc07972ac29c75a1d16.tar.gz blt-6a107486197fabb64f1e5bc07972ac29c75a1d16.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src/bltGrMarkerOp.C')
-rw-r--r-- | src/bltGrMarkerOp.C | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/bltGrMarkerOp.C b/src/bltGrMarkerOp.C index 61c56f3..b02c421 100644 --- a/src/bltGrMarkerOp.C +++ b/src/bltGrMarkerOp.C @@ -27,6 +27,11 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include <iostream> +#include <sstream> +#include <iomanip> +using namespace std; + extern "C" { #include "bltInt.h" #include "bltBind.h" @@ -97,19 +102,19 @@ static int CreateMarker(Graph* graphPtr, Tcl_Interp* interp, int objc, Tcl_Obj* const objv[]) { int offset = 5; - char* name =NULL; - char ident[128]; + const char* name =NULL; + ostringstream str; if (objc == 4) { offset = 4; - sprintf_s(ident, 128, "marker%d", graphPtr->nextMarkerId_++); - name = ident; + str << "marker" << graphPtr->nextMarkerId_++ << ends; + name = str.str().c_str(); } else { name = Tcl_GetString(objv[4]); if (name[0] == '-') { offset = 4; - sprintf_s(ident, 128, "marker%d", graphPtr->nextMarkerId_++); - name = ident; + str << "marker" << graphPtr->nextMarkerId_++ << ends; + name = str.str().c_str(); } } |