-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | noncore/unsupported/qpdf/gooStub.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -1,72 +1,72 @@ default: dynamic all: default docs LIBS=library libopie COMPONENTS=$(LOCALCOMPONENTS) inputmethods/keyboard \ inputmethods/pickboard \ inputmethods/handwriting \ inputmethods/unikeyboard \ inputmethods/jumpx \ inputmethods/dvorak \ launcher/batteryapplet \ launcher/irdaapplet \ launcher/volumeapplet \ launcher/clockapplet \ launcher/netmonapplet \ launcher/screenshotapplet \ launcher/vmemo \ netsetup/dialup \ netsetup/lan \ opiemail/ifaces/pop3 opiemail/ifaces/smtp \ mpegplayer/libmpeg3 \ mpegplayer/libmad \ mpegplayer/wavplugin \ cardmon \ sdmon APPS=$(LOCALAPPS) core/addressbook calculator clock datebook \ filebrowser helpbrowser minesweep mpegplayer \ settings/light-and-power \ settings/language \ settings/rotation \ settings/appearance \ settings/security \ settings/sound \ settings/systemtime \ solitaire spreadsheet tetrix textedit \ todo wordgame embeddedkonsole launcher sysinfo \ parashoot snake citytime showimg netsetup tableviewer \ qipkg mindbreaker go qasteroids qcop fifteen keypebble today opiemail/converter opiemail \ - noncore/tictac noncore/opieftp noncore/drawpad noncore/kcheckers noncore/appskey + noncore/tictac noncore/opieftp noncore/drawpad noncore/kcheckers noncore/appskey noncore/qpdf DOCS = docs/src/opie-policy single: mpegplayer/libmpeg3 dynamic: $(APPS) docs: $(DOCS) $(COMPONENTS): $(LIBS) $(APPS): $(LIBS) $(COMPONENTS) $(LIBS) $(COMPONENTS) $(APPS) $(DOCS) single: $(MAKE) -C $@ -f Makefile showcomponents: @echo $(LIBS) $(APPS) $(COMPONENTS) single clean: $(MAKE) -C single -f Makefile $@ for dir in $(APPS) $(LIBS) $(COMPONENTS) $(DOCS); do $(MAKE) -C $$dir -f Makefile $@ || exit 1; done lupdate: for dir in $(APPS) $(LIBS) $(COMPONENTS); do $(MAKE) -C $$dir -f Makefile $@ || exit 1; done lrelease: for dir in $(APPS) $(LIBS) $(COMPONENTS); do $(MAKE) -C $$dir -f Makefile $@ || exit 1; done .PHONY: default dynamic $(LIBS) $(APPS) $(COMPONENTS) $(DOCS) single showcomponents clean diff --git a/noncore/unsupported/qpdf/gooStub.cpp b/noncore/unsupported/qpdf/gooStub.cpp index cc29685..edbea55 100644 --- a/noncore/unsupported/qpdf/gooStub.cpp +++ b/noncore/unsupported/qpdf/gooStub.cpp @@ -1,60 +1,60 @@ extern "C" { #include <stdlib.h> #include <string.h> #include <unistd.h> #include <stdio.h> #include <dirent.h> #include <fcntl.h> #include <gmem.h> } #include <gfile.h> #include <GString.h> #include <qdir.h> // replacement stubs to simplify (and speed up) operations void *gmalloc ( int size ) { return malloc ( size ); } void *grealloc ( void *p, int size ) { return realloc ( p, size ); } void gfree ( void *p ) { free ( p ); } char *copyString ( char *str ) { return strdup ( str ); } char *getLine(char *buf, int size, FILE *f) { return fgets ( buf, size, f ); } GString *getHomeDir ( ) { return new GString ( QDir::home ( ). absPath ( ). local8Bit ( )); } GString *appendToPath ( GString *path, char *fileName ) { return new GString ( QDir ( path-> getCString ( )). absFilePath ( fileName ). local8Bit ( )); } // mostly taken from XPDF, but simplified... GBool openTempFile ( GString **name, FILE **f, char *mode, char *ext ) { char *s, *p; int fd; if ( !ext ) ext = ".tmp"; if (!( s = tmpnam ( 0 ))) return gFalse; - *name = new GString ( "qpdf_" ); - (*name)-> append ( s ); + *name = new GString ( s ); s = (*name)-> getCString ( ); if (( p = strrchr ( s, '.' ))) (*name)-> del ( p - s, (*name)-> getLength ( ) - ( p - s )); + (*name)-> append ( "_qpdf" ); (*name)-> append ( ext ); fd = open ((*name)-> getCString ( ), O_WRONLY | O_CREAT | O_EXCL, 0600 ); if ( fd < 0 || !( *f = fdopen ( fd, mode ))) { delete *name; return gFalse; } return gTrue; } |