summaryrefslogtreecommitdiff
path: root/ycurses/src/curses/tool.cpp
diff options
context:
space:
mode:
authorPaul Buetow (mars.fritz.box) <paul@buetow.org>2013-12-15 11:49:02 +0100
committerPaul Buetow (mars.fritz.box) <paul@buetow.org>2013-12-15 11:49:02 +0100
commit3a96ab7e91145b367d05e98533b5f426f762f83f (patch)
treeac7758a706066e14b785ab6e5f7071a54baa856b /ycurses/src/curses/tool.cpp
parent332d7b2107833018b3ef67b64ffe121bff1ef4fb (diff)
add packagespackages
Diffstat (limited to 'ycurses/src/curses/tool.cpp')
-rw-r--r--ycurses/src/curses/tool.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/ycurses/src/curses/tool.cpp b/ycurses/src/curses/tool.cpp
deleted file mode 100644
index 1bce76f..0000000
--- a/ycurses/src/curses/tool.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef TOOL_CPP
-#define TOOL_CPP
-
-#include "tool.h"
-
-string
-tool::int2string(int i_int)
-{
- char buf[64];
- sprintf(buf, "%d", i_int);
- return buf;
-}
-
-int
-tool::string2int(string s)
-{
- const char *p = s.c_str();
- int i_res = 0;
-
- // Convert each digit char and add into result.
- while (*p >= '0' && *p <='9')
- {
- i_res = (i_res * 10) + (*p - '0');
- p++;
- }
-
- // Check that there were no non-digits at end.
- if (*p != 0)
- {
- return -1;
- }
-
- return i_res;
-}
-
-#endif
-