summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <Pixel>2002-07-22 22:12:46 +0000
committerPixel <Pixel>2002-07-22 22:12:46 +0000
commit8cc5bf50f11bca8ee945e6716c68d609fdaa9e8f (patch)
tree3017fa30dbb2db40d2c2077f21413aed3f16162b
parent8f8105e69223b8380054275b0a04963eba79759e (diff)
bleehCVS: ----------------------------------------------------------------------
-rwxr-xr-xgeneric/Makefile2
-rw-r--r--generic/String.cpp4
-rw-r--r--includes/Handle.h4
-rw-r--r--includes/Image.h5
-rw-r--r--includes/Input.h3
-rw-r--r--includes/Output.h3
-rw-r--r--includes/String.h2
7 files changed, 20 insertions, 3 deletions
diff --git a/generic/Makefile b/generic/Makefile
index dc47586..98317b8 100755
--- a/generic/Makefile
+++ b/generic/Makefile
@@ -3,7 +3,7 @@
CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -pedantic-errors -I../includes
CXX=g++
-OBJECTS = Buffer.o Exceptions.o Handle.o Image.o Input.o Output.o String.o generic.o fileutils.o
+OBJECTS = Buffer.o Exceptions.o Handle.o Image.o Input.o Output.o generic.o fileutils.o String.o
TARGET = generic.a
all: ${TARGET}
diff --git a/generic/String.cpp b/generic/String.cpp
index 786c623..49b4e4d 100644
--- a/generic/String.cpp
+++ b/generic/String.cpp
@@ -3,7 +3,9 @@
#include <stdarg.h>
#include "String.h"
#include "Exceptions.h"
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
extern "C" {
double dateCalc(char *, char *);
@@ -43,6 +45,7 @@ String::String(unsigned int i) {
siz = ::strlen(str);
}
+#ifdef USE_LONGLONG
String::String(long long l) {
char t[40];
@@ -58,6 +61,7 @@ String::String(unsigned long long l) {
str = Base::strdup(t);
siz = ::strlen(str);
}
+#endif
String::String(double d) {
char t[30];
diff --git a/includes/Handle.h b/includes/Handle.h
index 6e26e9c..fdaea2c 100644
--- a/includes/Handle.h
+++ b/includes/Handle.h
@@ -22,6 +22,9 @@ class Handle : public Base {
void SetNonBlock(void);
virtual bool CanRead();
virtual bool CanWrite();
+ virtual bool CanSeek();
+ virtual off_t seek(off_t, int) throw (GeneralException);
+ virtual off_t tell();
virtual String GetName();
virtual ssize_t GetSize();
virtual time_t GetModif();
@@ -39,6 +42,7 @@ class Handle : public Base {
bool closed, nonblock;
gzFile zfile;
int z;
+ off_t itell;
};
Handle & operator<<(Handle &, const String &);
diff --git a/includes/Image.h b/includes/Image.h
index 8dc6788..fc94a12 100644
--- a/includes/Image.h
+++ b/includes/Image.h
@@ -3,6 +3,7 @@
#ifdef __cplusplus
#include <Buffer.h>
+#include <generic.h>
enum {
FORMAT_TGA_BASIC
@@ -42,13 +43,13 @@ class Image : public Buffer {
Word IS_Height;
Byte IS_Depth;
Byte IS_Descriptor;
- } __attribute__((packed));
+ } PACKED;
struct TGAFooter {
DWord ExtOffset;
DWord DevOffset;
char Sig[18];
- } __attribute__((packed));
+ } PACKED;
unsigned int x, y;
bool r;
diff --git a/includes/Input.h b/includes/Input.h
index 7091258..f8cf9be 100644
--- a/includes/Input.h
+++ b/includes/Input.h
@@ -14,6 +14,9 @@ class Input : public Handle {
virtual ~Input() {}
virtual bool CanWrite();
virtual bool CanRead();
+ virtual bool CanSeek();
+ virtual off_t seek(off_t, int) throw (GeneralException);
+ virtual off_t tell();
virtual String GetName();
virtual ssize_t GetSize();
virtual time_t GetModif();
diff --git a/includes/Output.h b/includes/Output.h
index 32d4e66..ef6806c 100644
--- a/includes/Output.h
+++ b/includes/Output.h
@@ -12,6 +12,9 @@ class Output : public Handle {
virtual ~Output() {}
virtual bool CanWrite();
virtual bool CanRead();
+ virtual bool CanSeek();
+ virtual off_t seek(off_t, int) throw (GeneralException);
+ virtual off_t tell();
virtual String GetName();
protected:
diff --git a/includes/String.h b/includes/String.h
index f8db2c7..1fd6183 100644
--- a/includes/String.h
+++ b/includes/String.h
@@ -13,8 +13,10 @@ class String : public Base {
String(char);
String(int);
String(unsigned int);
+#ifdef USE_LONGLONG
String(long long);
String(unsigned long long);
+#endif
String(double);
~String();
const char * set(const char *, ...);