From c68f05cda5451eee4c72051c1a2960f63abdcf95 Mon Sep 17 00:00:00 2001 From: mazzearos Date: Thu, 2 Aug 2012 13:02:00 +0000 Subject: [PATCH] Some fixes for AROS: src/text.c: Added path for truetype fonts. src/Makefile: Create GrafX2 binary in the root directory. This allows running without any prior installation. src/readline.c: Added ':' to the forbidden charactersS. src/const.h: Use '/' as indicator for parent directory. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1972 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/Makefile | 6 +++--- src/const.h | 2 +- src/readline.c | 2 +- src/text.c | 4 ++++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Makefile b/src/Makefile index c6eb2f5d..c93abcfa 100644 --- a/src/Makefile +++ b/src/Makefile @@ -317,10 +317,10 @@ endif else ifdef AROS32CROSS #cross compile an Aros 32 bit executable - BIN = ../bin/grafx2 - COPT = -Wall -g `i386-linux-aros-sdl-config --cflags` $(TTFCOPT) + BIN = ../GrafX2 + COPT = -Wall -Wno-pointer-sign -Wno-unused-but-set-variable -g `i386-linux-aros-sdl-config --cflags` $(TTFCOPT) LOPT = -lSDL_image `i386-linux-aros-sdl-config --libs` -lpng -ljpeg -lz $(TTFLOPT) -lfreetype2shared - CC = i386-aros-gcc + CC = i386-linux-aros-gcc OBJDIR = ../obj/aros STRIP = strip --strip-unneeded --remove-section .comment PLATFORM = AROS diff --git a/src/const.h b/src/const.h index 11642084..b7ffbd59 100644 --- a/src/const.h +++ b/src/const.h @@ -92,7 +92,7 @@ #define INITIAL_SEPARATOR_PROPORTION 0.3 ///< Proportion of the normal view width, relative to the whole screen width. #define NB_ZOOMED_PIXELS_MIN 4 ///< Minimal number of pixel shown (in width) by the zoomed view. (Note: below 4, you can't scroll!) -#if defined(__MORPHOS__) || defined(__amigaos4__) || defined(__amigaos__) +#if defined(__MORPHOS__) || defined(__amigaos4__) || defined(__amigaos__) || defined(__AROS__) #define PARENT_DIR "/" #else /// Filename that means "parent directory" for your operating system. diff --git a/src/readline.c b/src/readline.c index dd5a3800..b39f2483 100644 --- a/src/readline.c +++ b/src/readline.c @@ -139,7 +139,7 @@ int Valid_character(word c, int input_type) // AmigaOS4: Pas de ':' car utilisé pour les volumes. #if defined(__WIN32__) char forbidden_char[] = {'/', '|', '?', '*', '<', '>', ':', '\\'}; -#elif defined (__amigaos4__) +#elif defined (__amigaos4__) || defined(__AROS__) char forbidden_char[] = {'/', '|', '?', '*', '<', '>', ':'}; #else char forbidden_char[] = {'/', '|', '?', '*', '<', '>'}; diff --git a/src/text.c b/src/text.c index 54d59f47..00644526 100644 --- a/src/text.c +++ b/src/text.c @@ -349,6 +349,10 @@ void Init_text(void) #ifndef NOTTF For_each_file( "FONTS:_TrueType", Add_font ); #endif + #elif defined(__AROS__) + #ifndef NOTTF + For_each_file( "FONTS:TrueType", Add_font ); + #endif #elif defined(__BEOS__) #ifndef NOTTF For_each_file("/etc/fonts/ttfonts", Add_font);