Fix haiku/gcc2 build.

This commit is contained in:
Adrien Destugues 2018-03-17 07:23:00 +01:00
parent 89a05e6fbb
commit 5918435cd8
3 changed files with 9 additions and 4 deletions

View File

@ -264,7 +264,7 @@ endif
LUACOPT = -D__ENABLE_LUA__ $(shell pkg-config $(LUAPKG) --cflags)
LUALOPT = $(shell pkg-config $(LUAPKG) --libs)
endif
COPT = -W -Wall -Werror -g $(shell sdl-config --cflags) $(TTFCOPT) -I/boot/common/include $(LUACOPT)
COPT = -W -Wall -g $(shell sdl-config --cflags) $(TTFCOPT) -I/boot/common/include $(LUACOPT)
COPT += -DENABLE_FILENAMES_ICONV
LOPT = $(shell sdl-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT) -lfreetype -lbe $(LUALOPT) -liconv
CC = gcc

View File

@ -402,6 +402,8 @@ bye:
return dst;
#elif defined __HAIKU__
if (unicode)
*unicode = NULL;
return haiku_get_clipboard();
#else
// Not implemented (no standard) on Linux systems. Maybe someday...

View File

@ -33,6 +33,8 @@ int main(int argc, char* argv[])
FILE* theFile;
uint8_t buffer[8];
uint16_t w,h;
int colors;
int color_table_size;
if(argc < 2)
{
@ -59,8 +61,8 @@ int main(int argc, char* argv[])
fread(buffer,1,3,theFile);
int colors = 1 << (((buffer[0] & 0x70)>>4)+1); // 0x70 == 0b01110000
int color_table_size = 1 << ((buffer[0]&0x7)+1);
colors = 1 << (((buffer[0] & 0x70)>>4)+1); // 0x70 == 0b01110000
color_table_size = 1 << ((buffer[0]&0x7)+1);
printf("Color palette: 0x%02x\n",buffer[0]&0xFF);
if (buffer[0] & 0x80) { // 0x80 == 0b10000000
@ -101,6 +103,7 @@ int main(int argc, char* argv[])
printf("offset : %lu\n", ftell(theFile));
fclose(theFile);
return 0;
}