Index: html-url.c =================================================================== RCS file: DeepVacuum/wget-src/html-url.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -r1.1.1.1 -r1.2 672a673,680 > > const char *line_end_cr = memchr (text, '\r', text_end - text); > > if (!line_end) > line_end = line_end_cr; > else if (line_end_cr) // and line_end > line_end = (line_end < line_end_cr) ? line_end : line_end_cr; // whichever occurs first > 674c682 < line_end = text_end; --- > line_end = text_end; 676c684,685 < ++line_end; --- > while (line_end < text_end && IS_VSPACE (*line_end)) // strip all CR/LF marks (including empty lines) > ++line_end; Index: main.c =================================================================== RCS file: DeepVacuum/wget-src/main.c,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -r1.1.1.1 -r1.3 52a53,57 > #ifdef HAVE_SETJMP_H > # include > #endif > > 76a82,83 > static sigjmp_buf abort_request_env; > 82a90 > static RETSIGTYPE abort_signal PARAMS ((int)); 922a931 > signal (SIGTERM, abort_signal); 932a942,947 > > > #ifdef HAVE_SIGNAL > if (setjmp(abort_request_env) == 0) /* When program is receives SIGTERM, make sure that links get converted to local */ > { > #endif /* HAVE_SIGNAL */ 965a981,988 > #ifdef HAVE_SIGNAL > } /* SETJMP */ > else > { > logprintf (LOG_VERBOSE, _("\n\n--- SIGTERM ---\n")); > } > #endif /* HAVE_SIGNAL */ > 1021a1045,1052 > > static RETSIGTYPE > abort_signal (int sig) > { > signal(SIGTERM, SIG_DFL); > longjmp(abort_request_env, 1); > } > Index: utils.c =================================================================== RCS file: DeepVacuum/wget-src/utils.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -r1.1.1.1 -r1.2 481a482,520 > /* > Preserve Mac OS X extensions that are not longer than 5 chars. > If a file doesn't exist return original name. > If a file extists try to find a unoccupied name in form: > base_name.1.ext, base_name.2.ext, base_name.3.ext, ... > */ > > static char * > unique_name_1_ext (const char *prefix) > { > int plen = strlen(prefix); > int extDotLocation; > int extLen; > > for (extDotLocation=plen-1; extDotLocation >= 0; extDotLocation--) > if (prefix[extDotLocation] == '.') > break; > > extLen = plen - extDotLocation - 1; > if (0 < extLen && extLen <= 5 && extDotLocation) { > const char *ext = prefix + extDotLocation + 1; > char *base_name = alloca(extDotLocation + 1); > char *template = alloca(plen + 24 + 1); > > memcpy(base_name, prefix, extDotLocation); > base_name[extDotLocation] = '\0'; > > int count = 1; > > do { > sprintf(template, "%s.%d.%s", base_name, count++, ext); > } while (file_exists_p(template)); > > return xstrdup (template); > } > else > return unique_name_1(prefix); > } > 508c547 < return unique_name_1 (file); --- > return unique_name_1_ext (file);