📄 changelog
字号:
1997-08-31 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Version 2.5 released.1997-07-21 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Bump to 2.4.4. * pch.c (there_is_another_patch), NEWS: Report an error if the patch input contains garbage but no patches. * pch.c (open_patch_file): Check for patch file too long (i.e., its size doesn't fit in a `long', and LFS isn't available). * inp.c (plan_a): Cast malloc return value, in case malloc returns char *.1997-07-16 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Bump to 2.4.3. * NEWS, patch.man, pch.c (intuit_diff_type, get_line, pget_line): Now demangles RFC 934 encapsulation. * pch.c (p_rfc934_nesting): New var. * pch.c (intuit_diff_type): Don't bother to check file names carefully if we're going to return NO_DIFF. * inp.c (plan_a): Count the number of lines before allocating pointer-to-line buffer; this reduces memory requirements considerably (roughly by a factor of 5 on 32-bit hosts). Decrease `size' only when read unexpectedly reports EOF. (i_buffer): New var. (too_many_lines): New fn. (re_input): Free i_buffer if using plan A. Free buffers unconditionally; they can't be zero. * inp.c (plan_a, plan_b): Check for overflow of line counter. * pch.c (malformed), util.h (memory_fatal, read_fatal, write_fatal): Declare as noreturn.1997-07-10 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Bump to 2.4.2. * util.c (ok_to_reverse), NEWS: The default answer is now `n'; this is better for Emacs. * Makefile.in (dist): Use cp -p, not ln; some hosts do the wrong thing with ln if the source is a symbolic link. * patch.man: Fix typo: -y -> -Y.1997-07-05 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Bump to 2.4.1. * patch.c: (main, get_some_switches), NEWS, patch.man: Version control is now independent of whether backups are made. * patch.c (option_help): Put version control options together. (get_some_switches): With CVS 1.9 hack, treat -b foo like -b -z foo, not just -z foo. This change is needed due to recent change in -z. * backupfile.c (find_backup_file_name): backup_type == none causes undefined behavior; this undoes the previous change to this file. * patch.c (locate_hunk): Fix bug when locating context diff hunks near end of file with nonzero fuzz. * util.c (move_file): Don't assume that ENOENT is reported when both ENOENT and EXDEV apply; this isn't true with DJGPP, and Posix doesn't require it. * pch.c (there_is_another_patch): Suggest -p when we can't intuit a file.1997-06-19 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Version 2.4 released. * NEWS: Patch is now verbose when patches do not match exactly.1997-06-17 Paul Eggert <eggert@twinsun.com> * pc/djgpp/configure.sed (config.h): Remove redundant $(srcdir). * configure.in (VERSION): Bump to 2.3.9. * patch.c (main): By default, warn about hunks that succeed with nonzero offset. * patch.man: Add LC_ALL=C advice for making patches. * pc/djgpp/configure.sed (config.h): Fix paths to dependent files.1997-06-17 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Bump to 2.3.8. * pch.c (open_patch_file): Test stdin for fseekability. (intuit_diff_type): Missing context diff headers are now warnings, not errors; some people use patches with them (e.g. when retrying rejects). * patch.c (struct outstate): New type, collecting together some output state vars. (apply_hunk, copy_till, spew_output, init_output): Use it. Keep track of whether some output has been generated. (backup_if_mismatch): New var. (ofp): Remove, in favor of local struct outstate vars. (main): Use struct outstate. Initialize backup_if_mismatch to be the inverse of posixly_correct. Keep track of whether mismatches occur, and use this to implement backup_if_mismatch. Report files that are not empty after patching, but should be. (longopts, option_help, get_some_switches): New options --backup-if-mismatch, --no-backup-if-mismatch. (get_some_switches): -B, -Y, -z no longer set backup_type. * backupfile.c (find_backup_file_name): Treat backup_type == none like simple. * Makefile.in (CONFIG_HDRS): Remove var; no longer needed by djgpp port. (DISTFILES_PC_DJGPP): Rename pc/djgpp/config.sed to pc/djgpp/configure.sed; remove pc/djgpp/config.h in favor of new file that edits it, called pc/djgpp/config.sed. * pc/djgpp/configure.bat: Rename config.sed to configure.sed. * pc/djgpp/configure.sed (CONFIG_HDRS): Remove. (config.h): Add rule to build this from config.hin and pc/djgpp/config.sed. * pc/djgpp/config.sed: Convert from .h file to .sed script that generates .h file. * NEWS: Describe --backup-if-mismatch, --no-backup-if-mismatch. * patch.man: Describe new options --backup-if-mismatch, --no-backup-if-mismatch and their ramifications. Use unreadable backup to represent nonexistent file.1997-06-12 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Bump to 2.3.7. (AC_CHECK_FUNCS): Add `raise'. * Makefile.in (inp.o): No longer depends on quotearg.h. * common.h (outfile): New decl (was private var named `output'). (invc): New decl. (GENERIC_OBJECT): Renamed from VOID. (NULL_DEVICE, TTY_DEVICE): New macros. * patch.c (output): Remove; renamed to `outfile' and moved to common.h. (main): `failed' is count, not boolean. Say "Skipping patch." when deciding to skip patch. (get_some_switches): Set invc when setting inname. * inp.c: Do not include <quotearg.h>. (SCCSPREFIX, GET, GET_LOCKED, SCCSDIFF1, SCCSDIFF2, SCCSDIFF3, RCSSUFFIX, CHECKOUT, CHECKOUT_LOCKED, RCSDIFF1, RCSDIFF2): Move to util.c. (get_input_file): Invoke new functions version_controller and version_get to simplify this code. (plan_b): "/dev/tty" -> NULL_DEVICE * pch.h (pch_timestamp): New decl. * pch.c (p_timestamp): New var; takes over from global timestamp array. (pch_timestamp): New function to export p_timestamp. (there_is_another_patch): Use blander wording when you can't intuit the file name. Say "Skipping patch." when deciding to skip patch. (intuit_diff_type): Look for version-controlled but nonexistent files when intuiting file names; set invc accordingly. Ignore Index: line if either old or new line is present, and if POSIXLY_CORRECT is not set. (do_ed_script): Flush stdout before invoking popen, since it may send output to stdout. * util.h (version_controller, version_get): New decls. * util.c: Include <quotearg.h> earlier. (raise): New macro, if ! HAVE_RAISE. (move_file): Create empty unreadable file when backing up a nonexistent file. (DEV_NULL): New constant. (SCCSPREFIX, GET. GET_LOCKED, SCCSDIFF1, SCCSDIFF2, RCSSUFFIX, CHECKOUT, CHECKOUT_LOCKED, RCSDIFF1): Moved here from inp.c. (version_controller, version_get): New functions. (ask): Look only at /dev/tty for answers; and when standard output is not a terminal and ! posixly_correct, don't even look there. Remove unnecessary fflushes of stdout. (ok_to_reverse): Say "Skipping patch." when deciding to skip patch.. (sigs): SIGPIPE might not be defined. (exit_with_signal): Use `raise' instead of `kill'. (systemic): fflush stdout before invoking subsidiary command. * patch.man: Document recent changes. Add "COMPATIBILITY ISSUES" section. * NEWS: New COMPATIBILITY ISSUES for man page. Changed verbosity when fuzz is found. File name intuition is changed, again. Backups are made unreadable when the file did not exist. * pc/djgpp/config.h (HAVE_STRUCT_UTIMBUF): Define. (HAVE_RAISE): New macro. (HAVE_UTIME_H): Define. (TZ_is_unset): Do not define; it's not a serious problem with `patch' to have TZ be unset in DOS.1997-06-08 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Bump to 2.3.6. (AC_CHECK_HEADERS): Add utime.h. * acconfig.h, configure.in, pc/djgpp/config.h (HAVE_STRUCT_UTIMBUF): New macro. * pc/djgpp/config.h (HAVE_UTIME_H, TZ_is_unset): New macros. * NEWS, patch.man: Describe new -Z, -T options, new numeric option for -G, retired -G, and more verbose default behavior with fuzz. * pch.c (intuit_diff_type): Record times reported for files in headers. Remove head_says_nonexistent[x], since it's now equivalent to !timestamp[x]. * util.h (fetchname): Change argument head_says_nonexistent to timestamp. * util.c: #include <partime.h> for TM_LOCAL_ZONE. Don't include <time.h> since common.h now includes it. (ok_to_reverse): noreverse and batch cases now output regardless of verbosity. (fetchname): Change argument head_says_nonexistent to pstamp, and store header timestamp into *pstamp. If -T or -Z option is given, match time stamps more precisely. (ask): Remove unnecessary close of ttyfd. When there is no terminal at all, output a newline to make the output look nicer. After reporting EOF, flush stdout; when an input error, report the error type. * inp.c (get_input_file): Ask user whether to get file if patch_get is negative. * Makefile.in (clean): Don't clean */*.o; clean core* and *core.1997-06-04 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Bump to 2.3.5. * util.c (ok_to_reverse): Be less chatty if verbosity is SILENT and we don't have to ask the user. If force is nonzero, apply the patch anyway. * pch.c (there_is_another_patch): Before skipping rest of patch, skip to the patch start, so that another_hunk can skip it properly. (intuit_diff_type): Slight wording change for missing headers, to regularize with other diagnostics. Fix off-by-one error when setting p_input_line when scanning the first hunk to check for deleted files.1997-06-03 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Bump to 2.3.4. * NEWS: Now matches more generously against nonexistent or empty files. * pch.c (there_is_another_patch): Move warning about not being able to intuit file names here from skip_to. (intuit_diff_type): Fatal error if we find a headless unified or context diff. * util.c (ask): Null-terminate buffer properly even if it grew. (fetchname): No need to test for null first argument.1997-06-02 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Bump to 2.3.3. * pch.c (p_says_nonexistent, pch_says_nonexistent): Is now 1 for empty, 2 for nonexistent. (intuit_diff_type): Set p_says_nonexistent according to new meaning. Treat empty files like nonexistent files when reversing. (skip_to): Output better diagnostic when we can't intuit a file name. * patch.c (main): Count bytes, not lines, when testing whether a file is empty, since it may contain only non-newline chars. pch_says_nonexistent now returns 2 for nonexistent files.1997-06-01 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Bump to 2.3.2. * pch.c (open_patch_file): Fix bug when computing size of patch read from a pipe.1997-05-30 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Bump to 2.3.1. * Makefile.in (transform, patch_name): New vars, for proper implementation of AC_ARG_PROGRAM. (install, uninstall): Use them. (install-strip): New rule. * pc/djgpp/config.sed (program_transform_name): Set to empty.1997-05-30 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION), NEWS: Version 2.3 released. * patch.man: Fix two font typos. * util.c (doprogram): Fix misspelled decl.1997-05-26 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Bump to 2.2.93. * pch.c (open_patch_file): Fatal error if binary_transput and stdin is a tty. * pc/djgpp/config.sed (chdirsaf.c): Use sed instead of cp, since cp might not be installed. * pc/djgpp/configure.bat: Prepend %srcdir% to pathname of config.sed, for crosscompiles.1997-05-25 Paul Eggert <eggert@twinsun.com> * configure.in (VERSION): Bump to 2.2.92. (D_INO_IN_DIRENT): New macro. * pc/djgpp/config.h, acconfig.h (D_INO_IN_DIRENT): New macro. * backupfile.c (REAL_DIR_ENTRY): Depend on D_INO_IN_DIRENT, not _POSIX_VERSION. * addext.c (addext): Adjust slen when adjusting s for DOS 8.3 limit. Do not use xxx.h -> xxxh~ hack. * util.c: (move_file): Avoid makedirs test when possible even if FILESYSTEM_PREFIX_LEN (p) is nonzero. Don't play case-changing tricks to come up with backup file name; it's not portable to case-insensitive file systems. * common.h (ISLOWER): Remove. * inp.c (scan_input): Don't use Plan A if (debug & 16). * patch.c (shortopts): Add -g, -G. (longopts): --help now maps to 132, not 'h', to avoid confusion. (get_some_switches): Likewise. Don't invoke setmode on input if --binary; wait until needed. Don't ever invoke setmode on stdout.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -