From f77a201e0bcba455e65866644c4dd5b12798edf1 Mon Sep 17 00:00:00 2001 From: Tigran Aivazian Date: Fri, 28 Sep 2012 23:23:49 +0100 Subject: [PATCH 1/4] Typo: --disable-largefiles -> --disable-largefile As a result of a simple typo we were continuing to include LFS support unnecessarily... --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d6b7724c2..fa9344655 100644 --- a/Makefile +++ b/Makefile @@ -185,9 +185,9 @@ $(MUPDFLIBS) $(THIRDPARTYLIBS): $(MUPDFDIR)/cmapdump.host $(MUPDFDIR)/fontdump.h $(DJVULIBS): -mkdir $(DJVUDIR)/build ifdef EMULATE_READER - cd $(DJVUDIR)/build && ../configure --disable-desktopfiles --disable-shared --enable-static --disable-xmltools --disable-largefiles + cd $(DJVUDIR)/build && ../configure --disable-desktopfiles --disable-shared --enable-static --disable-xmltools --disable-largefile else - cd $(DJVUDIR)/build && ../configure --disable-desktopfiles --disable-shared --enable-static --host=$(HOST) --disable-xmltools --disable-largefiles + cd $(DJVUDIR)/build && ../configure --disable-desktopfiles --disable-shared --enable-static --host=$(HOST) --disable-xmltools --disable-largefile endif make -C $(DJVUDIR)/build From db077b2f34c2532f66979de6a69aee169d06812e Mon Sep 17 00:00:00 2001 From: Tigran Aivazian Date: Sat, 29 Sep 2012 10:02:55 +0100 Subject: [PATCH 2/4] Optimize compilation of cre.cpp 1. Remove unused "-lsdtc++" from the compilation stage as no linking is done then. 2. Add our standard CFLAGS to the compilation of cre.cpp which brings in -O3 -march=armv6 which enables optimizations. It seemed strange that we compile a cpp file with gcc (as opposed to g++), but I left it as is for now. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fa9344655..d13a35541 100644 --- a/Makefile +++ b/Makefile @@ -124,7 +124,7 @@ djvu.o: %.o: %.c $(CC) -c $(KPDFREADER_CFLAGS) -I$(DJVUDIR)/ $< -o $@ cre.o: %.o: %.cpp - $(CC) -c -I$(CRENGINEDIR)/crengine/include/ -I$(LUADIR)/src $< -o $@ -lstdc++ + $(CC) -c $(CFLAGS) -I$(CRENGINEDIR)/crengine/include/ -I$(LUADIR)/src $< -o $@ lfs.o: $(LFSDIR)/src/lfs.c $(CC) -c $(CFLAGS) -I$(LUADIR)/src -I$(LFSDIR)/src $(LFSDIR)/src/lfs.c -o $@ From 24e9d77a375b61fea0c451bd97773866d970a443 Mon Sep 17 00:00:00 2001 From: Tigran Aivazian Date: Sat, 29 Sep 2012 10:07:04 +0100 Subject: [PATCH 3/4] Comment out debug printf() in pdf.c The printf() about the number of links on a page is very useful, but only for debugging. As other instances of debugging printf() in djvu.c and pdf.c are commented out, it seemed consistent to do the same with this one. --- pdf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdf.c b/pdf.c index d20a12b86..dd0de744b 100644 --- a/pdf.c +++ b/pdf.c @@ -623,7 +623,7 @@ static int getPageLinks(lua_State *L) { lua_rawseti(L, -2, ++link_count); } - printf("## getPageLinks found %d links in document\n", link_count); + //printf("## getPageLinks found %d links in document\n", link_count); fz_drop_link(page->doc->context, page_links); From 5959c569377c9d38f6711b7bebf89da570555810 Mon Sep 17 00:00:00 2001 From: Tigran Aivazian Date: Sat, 29 Sep 2012 12:12:52 +0100 Subject: [PATCH 4/4] Remove "-d" switch from reader.lua invocation. --- launchpad/kpdf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launchpad/kpdf.sh b/launchpad/kpdf.sh index 173e5f7e4..c1f81c700 100755 --- a/launchpad/kpdf.sh +++ b/launchpad/kpdf.sh @@ -22,7 +22,7 @@ fi killall -stop cvm # finally call reader -./reader.lua -d "$1" 2> /mnt/us/kindlepdfviewer/crash.log || cat /mnt/us/kindlepdfviewer/crash.log +./reader.lua "$1" 2> /mnt/us/kindlepdfviewer/crash.log || cat /mnt/us/kindlepdfviewer/crash.log # unmount system fonts if grep /mnt/us/kindlepdfviewer/fonts/host /proc/mounts; then