summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/font.h4
-rw-r--r--include/gettext.h10
-rw-r--r--lib/font.cc8
-rw-r--r--lib/texture.cc2
-rw-r--r--src/test.cc4
5 files changed, 9 insertions, 19 deletions
diff --git a/include/font.h b/include/font.h
index 3a1d1c7..a557f6e 100644
--- a/include/font.h
+++ b/include/font.h
@@ -16,7 +16,7 @@ namespace mogltk {
virtual void drawentry(Uint16, int, int, ColorP = WHITE);
void putcursor(int, int);
void putentry(Uint16, ColorP = WHITE);
- void putchar(char, ColorP = WHITE);
+ void drawchar(char, ColorP = WHITE);
void newline(void);
int printf(const ugly_string &, ...);
int printf(const char *, ...);
@@ -24,7 +24,7 @@ namespace mogltk {
void setcolor(ColorP);
void setshadow(int);
void setwspace(int);
- int getchar(char) const;
+ int findchar(char) const;
int singletextsize(const String &) const;
protected:
diff --git a/include/gettext.h b/include/gettext.h
index 662a424..b530d9c 100644
--- a/include/gettext.h
+++ b/include/gettext.h
@@ -27,16 +27,6 @@
#else
-/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
- chokes if dcgettext is defined as a macro. So include it now, to make
- later inclusions of <locale.h> a NOP. We don't include <libintl.h>
- as well because people using "gettext.h" will not include <libintl.h>,
- and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
- is OK. */
-#if defined(__sun)
-# include <locale.h>
-#endif
-
/* Disabled NLS.
The casts to 'const char *' serve the purpose of producing warnings
for invalid uses of the value returned from these functions.
diff --git a/lib/font.cc b/lib/font.cc
index efdd9bd..014abde 100644
--- a/lib/font.cc
+++ b/lib/font.cc
@@ -244,7 +244,7 @@ void mogltk::font::putentry(Uint16 entry, ColorP c) {
cx += sizes[entry] + wspace;
}
-void mogltk::font::putchar(char ch, ColorP c) {
+void mogltk::font::drawchar(char ch, ColorP c) {
Uint16 * p;
int i;
@@ -256,7 +256,7 @@ void mogltk::font::putchar(char ch, ColorP c) {
}
}
-int mogltk::font::getchar(char ch) const {
+int mogltk::font::findchar(char ch) const {
Uint16 * p;
int i;
@@ -289,7 +289,7 @@ int mogltk::font::printf(const ugly_string & m, va_list ap) {
if (*p == '\n') {
newline();
} else {
- putchar(*p, textcolor);
+ drawchar(*p, textcolor);
}
}
@@ -338,7 +338,7 @@ int mogltk::font::singletextsize(const String & s) const {
int r = 0;
for (i = 0; i < s.strlen(); i++) {
- r += sizes[getchar(s[i])];
+ r += sizes[findchar(s[i])];
}
return r;
diff --git a/lib/texture.cc b/lib/texture.cc
index 43c8ac3..d7cfa7c 100644
--- a/lib/texture.cc
+++ b/lib/texture.cc
@@ -264,7 +264,7 @@ void mogltk::texture::Taint(void) {
SDL_Surface * mogltk::texture::LoadNTEX(Handle * h) throw (GeneralException) {
SDL_Surface * r;
- char buffer[4];
+ char buffer[5];
Uint16 height, width;
h->read(buffer, 4);
diff --git a/src/test.cc b/src/test.cc
index aafdbf8..892148f 100644
--- a/src/test.cc
+++ b/src/test.cc
@@ -1,10 +1,11 @@
#include <sys/types.h>
+#include <math.h>
#include <SDL.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#else
#endif
-#include "gettext.h"
+//#include "gettext.h"
#include <generic.h>
#include <Main.h>
#include <Input.h>
@@ -17,7 +18,6 @@
#include "glsprite.h"
#include "glshape.h"
-
CODE_BEGINS
virtual int startup() throw (GeneralException) {
int sx1, sx2, sy1, sy2;