summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/BString.h7
-rw-r--r--include/GMPString.h18
-rw-r--r--include/Makefile.am2
3 files changed, 22 insertions, 5 deletions
diff --git a/include/BString.h b/include/BString.h
index 8dd71c5..ab4f5e5 100644
--- a/include/BString.h
+++ b/include/BString.h
@@ -2,6 +2,7 @@
#define __STRING_H__
#include <string.h>
+#include <stdarg.h>
#include <iostream>
#include <string>
#include <Exceptions.h>
@@ -15,9 +16,6 @@ class String : public Base {
public:
String(const String &);
String(const char * = "");
-#if 0
- String(const char * = "", ...);
-#endif
String(char);
String(int);
String(unsigned int);
@@ -25,6 +23,7 @@ class String : public Base {
String(uint64);
String(double);
~String();
+ const char * set(const char *, va_list);
const char * set(const char *, ...);
const char * set(const ugly_string &, ...);
int scanf(const char *, ...) const;
@@ -65,7 +64,7 @@ class String : public Base {
private:
String(int hs, char *);
static char t[];
- char * str, * ostr;
+ char * str;
size_t siz;
};
diff --git a/include/GMPString.h b/include/GMPString.h
new file mode 100644
index 0000000..77364bf
--- /dev/null
+++ b/include/GMPString.h
@@ -0,0 +1,18 @@
+#ifndef __GMPSTRING_H__
+#define __GMPSTRING_H__
+#include <gmpxx.h>
+#include "BString.h"
+
+class GMPString : public Base {
+ public:
+ GMPString(const GMPString &);
+ GMPString(const mpz_class &);
+ GMPString(const mpq_class &);
+ GMPString(const mpf_class &);
+ ~GMPString();
+ operator String() const;
+ private:
+ char * str;
+};
+
+#endif
diff --git a/include/Makefile.am b/include/Makefile.am
index c8c5036..583a97d 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -2,6 +2,6 @@ pkginclude_HEADERS = \
Exceptions.h Handle.h BString.h Output.h Socket.h HttpServ.h Variables.h Menu.h \
Action.h Message.h Form.h Confirm.h Table.h IRC.h Task.h Buffer.h generic.h \
CopyJob.h ReadJob.h Regex.h TaskMan.h InPipe.h OutPipe.h Input.h Image.h \
-Main.h Color.h
+Main.h Color.h GMPString.h
noinst_HEADERS = gettext.h