From 86b54e728bdde11ee40cf1fe4c2b950055db4e89 Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Sun, 6 Mar 2011 02:21:46 +0100 Subject: [PATCH] Update Makefile --- document.c | 6 +++--- ft/djvu/Makefile | 5 ++--- ft/pdf/Makefile | 5 ++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/document.c b/document.c index 72e8851..0d62532 100644 --- a/document.c +++ b/document.c @@ -73,7 +73,6 @@ zathura_document_plugins_load(void) if (closedir(dir) == -1) { fprintf(stderr, "error: could not close plugin directory: %s\n", PLUGIN_DIR); } - } void @@ -83,6 +82,7 @@ zathura_document_plugins_free(void) zathura_document_plugin_t* plugin = zathura_document_plugins; while (plugin) { zathura_document_plugin_t* tmp = plugin->next; + free(plugin->file_extension); free(plugin); plugin = tmp; } @@ -91,7 +91,7 @@ zathura_document_plugins_free(void) } bool -zathura_document_register_plugin(char* file_extension, zathura_document_open_t open_function) +zathura_document_plugin_register(char* file_extension, zathura_document_open_t open_function) { if( (file_extension == NULL) || (open_function == NULL) ) { fprintf(stderr, "plugin: could not register\n"); @@ -120,7 +120,7 @@ zathura_document_register_plugin(char* file_extension, zathura_document_open_t o return false; } - new_plugin->file_extension = file_extension; + new_plugin->file_extension = strdup(file_extension); new_plugin->open_function = open_function; new_plugin->next = NULL; diff --git a/ft/djvu/Makefile b/ft/djvu/Makefile index 83193ab..46f0612 100644 --- a/ft/djvu/Makefile +++ b/ft/djvu/Makefile @@ -33,10 +33,9 @@ ${PLUGIN}: ${OBJECTS} ${PLUGIN}-debug: ${DOBJECTS} @echo LD $@ - @${CC} -shared ${LDFLAGS} -o ${PLUGIN}-debug.so $(DOBJECTS) ${LIBS} + @${CC} -shared ${LDFLAGS} -o ${PLUGIN}.so $(DOBJECTS) ${LIBS} clean: - @rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so ${PLUGIN}-debug.so + @rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so debug: options ${PLUGIN}-debug - @make -C debug diff --git a/ft/pdf/Makefile b/ft/pdf/Makefile index e260d91..444888f 100644 --- a/ft/pdf/Makefile +++ b/ft/pdf/Makefile @@ -33,10 +33,9 @@ ${PLUGIN}: ${OBJECTS} ${PLUGIN}-debug: ${DOBJECTS} @echo LD $@ - @${CC} -shared ${LDFLAGS} -o ${PLUGIN}-debug.so $(DOBJECTS) ${LIBS} + @${CC} -shared ${LDFLAGS} -o ${PLUGIN}.so $(DOBJECTS) ${LIBS} clean: - @rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so ${PLUGIN}-debug.so + @rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so debug: options ${PLUGIN}-debug - @make -C debug