From 36193aaf9a0f1d37de8663ba53fa05227f015547 Mon Sep 17 00:00:00 2001 From: maxcodehack Date: Tue, 15 Dec 2020 07:15:55 +0000 Subject: [PATCH] Fix hardcoded path, blitter stub git-svn-id: svn://kolibrios.org@8411 a494cfbc-eb01-0410-851d-a64ba20cac60 --- contrib/media/updf_newlib/apps/kolibri.c | 5 ++++- contrib/media/updf_newlib/apps/kos_main.c | 9 ++++----- contrib/media/updf_newlib/apps/resource.h | 2 +- contrib/media/updf_newlib/compile.sh | 5 ++--- contrib/media/updf_newlib/fitz/Makefile | 2 +- contrib/media/updf_newlib/libopenjpeg/Makefile | 2 +- contrib/media/updf_newlib/pdf/pdf_font.c | 2 +- 7 files changed, 14 insertions(+), 13 deletions(-) diff --git a/contrib/media/updf_newlib/apps/kolibri.c b/contrib/media/updf_newlib/apps/kolibri.c index 47583f8b6b..e4e2059561 100755 --- a/contrib/media/updf_newlib/apps/kolibri.c +++ b/contrib/media/updf_newlib/apps/kolibri.c @@ -469,6 +469,8 @@ struct blit_call void kos_blit(int dstx, int dsty, int w, int h, int srcx, int srcy,int srcw, int srch, int stride, char *d) { + // Page fault + /* struct blit_call image; image.dstx=dstx; image.dsty=dsty; @@ -480,6 +482,7 @@ void kos_blit(int dstx, int dsty, int w, int h, int srcx, image.srch=srch; image.stride=stride; image.d=d; - asm ("int $0x40"::"a"(73),"b"(0),"c"(&image)); + asm("int $0x40"::"a"(73),"b"(0),"c"(&image)); + */ } diff --git a/contrib/media/updf_newlib/apps/kos_main.c b/contrib/media/updf_newlib/apps/kos_main.c index c0b9f3d9ca..f1f8af9b7d 100755 --- a/contrib/media/updf_newlib/apps/kos_main.c +++ b/contrib/media/updf_newlib/apps/kos_main.c @@ -356,18 +356,17 @@ void PageRotateRight(void) DrawPageSides(); } -int main (void) +int main (int argc, char* argv[]) { char ii, mouse_wheels_state; - char* original_command_line = *(char**)0x1C; - if (*original_command_line == 0) { + if (argc == 1) { kol_board_puts("uPDF: no param set, showing OpenDialog"); RunOpenApp(); __menuet__sys_exit(); } - kol_board_puts(original_command_line); + kol_board_puts(argv[1]); kol_board_puts("\n"); char buf[128]; @@ -381,7 +380,7 @@ int main (void) gapp.resolution = resolution; gapp.pageno = pageno; kol_board_puts("PDF Open\n"); - pdfapp_open(&gapp, original_command_line, 0, 0); + pdfapp_open(&gapp, argv[1], 0, 0); kol_board_puts("PDF Opened\n"); wintitle(&gapp, 0); diff --git a/contrib/media/updf_newlib/apps/resource.h b/contrib/media/updf_newlib/apps/resource.h index 58b369f110..74bd3f129f 100755 --- a/contrib/media/updf_newlib/apps/resource.h +++ b/contrib/media/updf_newlib/apps/resource.h @@ -53,7 +53,7 @@ struct rlimit { long rlim_max; /* maximum value for rlim_cur */ }; -/// ZAGLUSHKA /// +/// STUB /// int getrusage(int _who, struct rusage *_rusage) {}; #endif /* !_POSIX_SOURCE */ diff --git a/contrib/media/updf_newlib/compile.sh b/contrib/media/updf_newlib/compile.sh index 42ea5fe501..7ae3888c3a 100755 --- a/contrib/media/updf_newlib/compile.sh +++ b/contrib/media/updf_newlib/compile.sh @@ -1,3 +1,5 @@ +# BUILD ONLY LIBRARIES + cd SYSCALL/src make cd ../.. @@ -22,7 +24,4 @@ cd draw make cd .. -cd apps -make - sleep 100 diff --git a/contrib/media/updf_newlib/fitz/Makefile b/contrib/media/updf_newlib/fitz/Makefile index 2fff0a4f0b..68030dab29 100755 --- a/contrib/media/updf_newlib/fitz/Makefile +++ b/contrib/media/updf_newlib/fitz/Makefile @@ -5,7 +5,7 @@ SDK_DIR = $(abspath ../../../sdk) CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -fno-ident -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I $(SDK_DIR)/sources/freetype/include -I /media/maxim/E22406D62406AE1B/SVNKOS/contrib/sdk/sources/zlib -I ../libopenjpeg -I ../include +INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I $(SDK_DIR)/sources/freetype/include -I $(SDK_DIR)/sources/zlib -I ../libopenjpeg -I ../include FITZ_SRC := $(notdir $(wildcard *.c)) OBJECTS = $(patsubst %.c, %.o, $(FITZ_SRC)) diff --git a/contrib/media/updf_newlib/libopenjpeg/Makefile b/contrib/media/updf_newlib/libopenjpeg/Makefile index a0145616b3..87deeb9a2a 100755 --- a/contrib/media/updf_newlib/libopenjpeg/Makefile +++ b/contrib/media/updf_newlib/libopenjpeg/Makefile @@ -1,7 +1,7 @@ CC = kos32-gcc LD = kos32-ld -SDK_DIR = /media/maxim/E22406D62406AE1B/SVNKOS/contrib/sdk +SDK_DIR = ../../../sdk CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -fno-ident -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I $(SDK_DIR)/sources/freetype/include -I $(SDK_DIR)/sources/zlib -I . diff --git a/contrib/media/updf_newlib/pdf/pdf_font.c b/contrib/media/updf_newlib/pdf/pdf_font.c index 6b91682160..92ed383662 100755 --- a/contrib/media/updf_newlib/pdf/pdf_font.c +++ b/contrib/media/updf_newlib/pdf/pdf_font.c @@ -87,7 +87,7 @@ enum { UNKNOWN, TYPE1, TRUETYPE }; static int ft_kind(FT_Face face) { - /// ZAGLUSHKA /// + /// STUB /// //const char *kind = FT_Get_X11_Font_Format(face); const char *kind = "TrueType";