diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index f66b93ae..480a1f9e 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -6,7 +6,7 @@ DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = ELinks -PROJECT_NUMBER = 0.13.GIT +PROJECT_NUMBER = @VERSION@ OUTPUT_DIRECTORY = api CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English diff --git a/doc/release.txt b/doc/release.txt index 8eb76f5a..f51f9b9c 100644 --- a/doc/release.txt +++ b/doc/release.txt @@ -15,6 +15,7 @@ When releasing a new version - Change VERSION in the top of configure.in to hold the new version number. - Update the manpages so the will have the new release number by first building the source, followed by making the `update-man' target in doc/. + - Update po files by running `make update-po` in po/`. - Commit these changes. - Create a signed tag having the version ("ELinks X.X.X") as the subject and using the changelog create above as the body. Use something like: diff --git a/src/mime/backend/default.c b/src/mime/backend/default.c index 3e24b137..92fd88eb 100644 --- a/src/mime/backend/default.c +++ b/src/mime/backend/default.c @@ -72,7 +72,8 @@ static struct option_info default_mime_options[] = { "program", 0, "", /* xgettext:no-c-format */ N_("External viewer for this file type. '%' in this string will be\n" - "substituted by a file name.")), + "substituted by a file name.\n" + "Do _not_ put single- or double-quotes around the % sign.")), INIT_OPT_TREE("mime", N_("File extension associations"), diff --git a/src/mime/backend/mailcap.c b/src/mime/backend/mailcap.c index 752c626c..76ea78b9 100644 --- a/src/mime/backend/mailcap.c +++ b/src/mime/backend/mailcap.c @@ -498,13 +498,24 @@ format_command(unsigned char *command, unsigned char *type, int copiousoutput) while (*command) { unsigned char *start = command; - while (*command && *command != '%' && *command != '\\') + while (*command && *command != '%' && *command != '\\' && *command != '\'') command++; if (start < command) add_bytes_to_string(&cmd, start, command - start); - if (*command == '%') { + switch (*command) { + case '\'': /* Debian's '%s' */ + command++; + if (!strncmp(command, "%s'", 3)) { + command += 3; + add_char_to_string(&cmd, '%'); + } else { + add_char_to_string(&cmd, '\''); + } + break; + + case '%': command++; if (!*command) { done_string(&cmd); @@ -522,13 +533,16 @@ format_command(unsigned char *command, unsigned char *type, int copiousoutput) add_to_string(&cmd, type); } command++; + break; - } else if (*command == '\\') { + case '\\': command++; if (*command) { add_char_to_string(&cmd, *command); command++; } + default: + break; } } #if 0 diff --git a/src/protocol/smb/smb2.c b/src/protocol/smb/smb2.c index cae5f3f4..5cd7def6 100644 --- a/src/protocol/smb/smb2.c +++ b/src/protocol/smb/smb2.c @@ -62,6 +62,8 @@ struct module smb_protocol_module = struct_module( /* done: */ NULL ); +static FILE *header_out, *data_out; + /* The child process generally does not bother to free the memory it * allocates. When the process exits, the operating system will free * the memory anyway. There is no point in changing this, because the @@ -71,8 +73,8 @@ struct module smb_protocol_module = struct_module( static void smb_error(int error) { - fprintf(stderr, "text/x-error"); - printf("%d\n", error); + fputs("text/x-error", header_out); + fprintf(data_out, "%d\n", error); exit(1); } @@ -168,7 +170,8 @@ display_entry(const struct smbc_dirent *entry, const unsigned char dircolor[]) /* unknown type */ break; } - puts(string.source); + fputs(string.source, data_out); + fputc('\n', data_out); done_string(&string); } @@ -253,10 +256,11 @@ smb_directory(int dir, struct uri *uri) smb_error(-S_OUT_OF_MEM); } - fprintf(stderr, "text/html"); - fclose(stderr); + fputs("text/html", header_out); + fclose(header_out); - puts(buf.source); + fputs(buf.source, data_out); + fputc('\n', data_out); if (get_opt_bool("document.browse.links.color_dirs", NULL)) { color_to_string(get_opt_color("document.colors.dirs", NULL), @@ -264,7 +268,7 @@ smb_directory(int dir, struct uri *uri) } sort_and_display_entries(dir, dircolor); - puts("