summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/String.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/String.cc b/lib/String.cc
index 969d335..36e6c52 100644
--- a/lib/String.cc
+++ b/lib/String.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: String.cc,v 1.42 2006-02-02 11:01:13 pixel Exp $ */
+/* $Id: String.cc,v 1.43 2006-02-09 17:03:07 pixel Exp $ */
#include <stdio.h>
#include <string.h>
@@ -234,11 +234,12 @@ int String::scanf(const ugly_string & s, ...) const {
}
#endif
-const char * String::to_charp(size_t from, ssize_t to) const {
+const char * String::to_charp(size_t from, ssize_t to) const throw (GeneralException) {
if (to < 0) {
- if (from)
+ if (from) {
+ throw GeneralException("This usage of String is deprecated.");
strncpy(t, &(str[from]), BUFSIZ);
- else
+ } else
return str;
} else {
if (((size_t) to) >= siz) {
@@ -259,6 +260,7 @@ const char * String::to_charp(size_t from, ssize_t to) const {
t[0] = '\0';
}
}
+ throw GeneralException("This usage of String is deprecated.");
return t;
}