Fix haiku/gcc2 build.
This commit is contained in:
parent
89a05e6fbb
commit
5918435cd8
@ -264,7 +264,7 @@ endif
|
|||||||
LUACOPT = -D__ENABLE_LUA__ $(shell pkg-config $(LUAPKG) --cflags)
|
LUACOPT = -D__ENABLE_LUA__ $(shell pkg-config $(LUAPKG) --cflags)
|
||||||
LUALOPT = $(shell pkg-config $(LUAPKG) --libs)
|
LUALOPT = $(shell pkg-config $(LUAPKG) --libs)
|
||||||
endif
|
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
|
COPT += -DENABLE_FILENAMES_ICONV
|
||||||
LOPT = $(shell sdl-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT) -lfreetype -lbe $(LUALOPT) -liconv
|
LOPT = $(shell sdl-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT) -lfreetype -lbe $(LUALOPT) -liconv
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
|||||||
@ -402,6 +402,8 @@ bye:
|
|||||||
return dst;
|
return dst;
|
||||||
|
|
||||||
#elif defined __HAIKU__
|
#elif defined __HAIKU__
|
||||||
|
if (unicode)
|
||||||
|
*unicode = NULL;
|
||||||
return haiku_get_clipboard();
|
return haiku_get_clipboard();
|
||||||
#else
|
#else
|
||||||
// Not implemented (no standard) on Linux systems. Maybe someday...
|
// Not implemented (no standard) on Linux systems. Maybe someday...
|
||||||
|
|||||||
@ -33,6 +33,8 @@ int main(int argc, char* argv[])
|
|||||||
FILE* theFile;
|
FILE* theFile;
|
||||||
uint8_t buffer[8];
|
uint8_t buffer[8];
|
||||||
uint16_t w,h;
|
uint16_t w,h;
|
||||||
|
int colors;
|
||||||
|
int color_table_size;
|
||||||
|
|
||||||
if(argc < 2)
|
if(argc < 2)
|
||||||
{
|
{
|
||||||
@ -59,8 +61,8 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
fread(buffer,1,3,theFile);
|
fread(buffer,1,3,theFile);
|
||||||
|
|
||||||
int colors = 1 << (((buffer[0] & 0x70)>>4)+1); // 0x70 == 0b01110000
|
colors = 1 << (((buffer[0] & 0x70)>>4)+1); // 0x70 == 0b01110000
|
||||||
int color_table_size = 1 << ((buffer[0]&0x7)+1);
|
color_table_size = 1 << ((buffer[0]&0x7)+1);
|
||||||
|
|
||||||
printf("Color palette: 0x%02x\n",buffer[0]&0xFF);
|
printf("Color palette: 0x%02x\n",buffer[0]&0xFF);
|
||||||
if (buffer[0] & 0x80) { // 0x80 == 0b10000000
|
if (buffer[0] & 0x80) { // 0x80 == 0b10000000
|
||||||
@ -101,6 +103,7 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
printf("offset : %lu\n", ftell(theFile));
|
printf("offset : %lu\n", ftell(theFile));
|
||||||
fclose(theFile);
|
fclose(theFile);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user