Remove some references to <allegro.h>

This commit is contained in:
David Capello 2014-06-28 11:17:22 -03:00
parent b37ec489f6
commit 901b2acc06
2 changed files with 6 additions and 11 deletions

View File

@ -8,9 +8,6 @@
#include "config.h"
#endif
#include <allegro.h>
#include <allegro/internal/aintern.h>
#include "gfx/point.h"
#include "gfx/size.h"
#include "she/font.h"
@ -146,7 +143,7 @@ void drawTextBox(Graphics* g, Widget* widget,
// Without word-wrap
if (!(widget->getAlign() & JI_WORDWRAP)) {
end = ustrchr(beg, '\n');
end = strchr(beg, '\n');
if (end) {
chr = *end;
*end = 0;
@ -156,7 +153,7 @@ void drawTextBox(Graphics* g, Widget* widget,
else {
old_end = NULL;
for (beg_end=beg;;) {
end = ustrpbrk(beg_end, " \n");
end = strpbrk(beg_end, " \n");
if (end) {
chr = *end;
*end = 0;

View File

@ -19,7 +19,6 @@
#include "ui/intern.h"
#include "ui/ui.h"
#include <allegro.h>
#include <cctype>
#include <climits>
#include <cstdarg>
@ -139,21 +138,20 @@ void Widget::setText(const std::string& text)
void Widget::setTextf(const char *format, ...)
{
char buf[4096];
// formatted string
if (format) {
va_list ap;
va_start(ap, format);
char buf[4096];
vsprintf(buf, format, ap);
va_end(ap);
setText(buf);
}
// empty string
else {
ustrcpy(buf, empty_string);
setText("");
}
setText(buf);
}
void Widget::setTextQuiet(const std::string& text)