k,_8_8by nameby named ki(_8_8_8,,./lpp_name4 R I gnu.patch { gnu.patch.rte 2.5.0.0 1 N U en_US GNU pre-compiled patch utility [ % /usr/local/bin 456 /usr/local/lib/patch-2.5 208 /usr/local/man/man1 72 % ] } k3j(A_8_8_8,,./usrna/A k4k(A_8_8_8,,./usr/local/A k~l(A_8_8_8,,./usr/local/lib/A kmm(A_8_8_8,,./usr/local/lib/patch-2.5/A kF#_($WF_8]_8_8,Q,WF./usr/local/lib/patch-2.5/COPYING/$ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. R k`(]_8]_8_8,V,./usr/local/lib/patch-2.5/ChangeLog/1997-08-31 Paul Eggert * configure.in (VERSION): Version 2.5 released. 1997-07-21 Paul Eggert * 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 * 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 * 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 * 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 * configure.in (VERSION): Version 2.4 released. * NEWS: Patch is now verbose when patches do not match exactly. 1997-06-17 Paul Eggert * 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 * 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 * 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 . (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 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 * 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 for TM_LOCAL_ZONE. Don't include 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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. * pch.c (open_patch_file): Setmode stdin to binary if binary_transput. * patch.man: Fix documentation of backup file name to match behavior. Add advice for ordering of patches of derived files. Add /dev/tty to list of files used. * README: Adjust instructions for building on DOS. * pc/djgpp/README: Remove tentative wording. * NEWS: The DOS port is now tested. Backup file names are no longer computed by switching case. * pc/chdirsaf.c (ERANGE): Include to define it. (restore_wd): chdir unconditionally. (chdir_safer): Invoke atexit successfully at most once. * pc/djgpp/config.sed: Use chdirsaf.o, not pc/chdirsaf.o. Replace CONFIG_HDRS, don't append. Use $(srcdir) in CONFIG_STATUS. Don't apply $(SHELL) to $(CONFIG_STATUS). Append rules for chdirsaf.o, chdirsaf.c; clean chdirsaf.c at the end. * pc/djgpp/configure.bat: Append CR to each line; DOS needs this. Don't use | as sed s delimiter; DOS can't handle it. 1997-05-21 Paul Eggert * configure.in (VERSION): Bump to 2.2.91. * pch.c (another_hunk): Fix bug with computing size of prefix and suffix context with ordinary context diffs. Report malformed patch if a unified diff has nothing but context. * inp.c (get_input_file): Use patch_get, not backup_type, to decide whether to get from RCS or SCCS. Use the word `get' in diagnostics. * patch.c (main): Initialize patch_get from PATCH_GET. Omit DEFAULT_VERSION_CONTROL hook; it just leads to nonstandarization. (longopts, option_help, get_some_switches): Add support for -g, -G. (option_help): Add bug report address. * common.h (patch_get): New decl. * patch.man: Add -g and -G options; use `get' instead of `check out'. Add PATCH_GET. Recommend -Naur instead of -raNU2 for diff. * NEWS: Describe -g, -G, PATCH_GET. * version.c (copyright_string): Use only most recent copyright year, as per GNU standards. * Makefile.in (DISTFILES_PC): Remove pc/quotearg.c. * pc/djgpp/config.sed: Remove unnecessary hooks for quotearg and SHELL. 1997-05-18 Paul Eggert * configure.in (VERSION): Increase to 2.2.9. (AC_TYPE_MODE_T): Add. * pch.h (another_hunk): New parameter REV. * pch.c (hunkmax): Now of type LINENUM. (malformed): Add decl. (there_is_another_patch): Skip inname-detection if skip_rest_of_patch. (intuit_diff_type): To determine whether file appears to have been deleted, look at replacement, not pattern. If there is a mismatch between existence of file and whether the patch claims to change whether the file exists, ask whether to reverse the patch. (another_hunk): New parameter REV specifying whether to reverse the hunk. All callers changed. (do_ed_script): Add assertion to ensure input file exists. * util.h (create_file): New function. (copy_file): Now takes mode, not struct stat. (makedirs): No longer exported. (move_file): Now takes mode, not struct stat. * util.c (makedirs): No longer exported. (move_file): Accept mode of destination, not struct stat. All callers changed. Quote file names in diagnostics. Create parent dir of destination if necessary. Don't use ENOTDIR. Don't unlink source; it will be unlinked later. Unlink destination if FROM is zero. (create_file): New function. (copy_file): Accept mode of destination, not struct stat. All callers changed. Use create_file to create file. (ok_to_reverse): Moved here from patch.c. Now accepts format and args; all callers changed. (mkdir): 2nd arg is now mode_t, for better compatibility. (replace_slashes): Ignore slashes at the end of the filename. * common.h (noreverse): New decl. (ok_to_reverse): Remove decl. * patch.c (noreverse): Now extern. (main): New environment var PATCH_VERSION_CONTROL overrides VERSION_CONTROL. Don't assert(hunk) if we're skipping the patch; we may not have any hunks. When removing a file, back it up if backups are desired. Don't chmod output file if input file did not exist. chmod rej file to input file's mode minus executable bits. (locate_hunk): Go back to old way of a single fuzz parameter, but handle it more precisely: context diffs with partial contexts can only match file ends, since the partial context can occur only at the start or end of file. All callers changed. (create_output_file): Use create_file to create files. (ok_to_reverse): Move to util.c. * inp.c (scan_input, get_input_file): Quote file names in diagnostics. (get_input_file): Set inerrno if it's not already set. Don't create file; it's now the caller's responsibility. (plan_b): Use /dev/null if input size is zero, since it might not exist. Use create_file to create temporary file. * NEWS: Add PATCH_VERSION_CONTROL; DOS port is untested. * pc/djgpp/config.h: Add comment for mode_t. * pc/djgpp/README: Note that it's not tested. * patch.man: PATCH_VERSION_CONTROL overrides VERSION_CONTROL. 1997-05-15 Paul Eggert * configure.in: Add AC_PREREQ(2.12). (VERSION): Bump to 2.2.8. (ed_PROGRAM): Rename from ED_PROGRAM. * pch.c (prefix_components): Support DOS file names better. Fix typo that caused fn to almost always yield 0. * util.c (, ): Include. (move_file, copy_file): Add support for DOS filenames. Preserve mode of input files when creating temp files. Add binary file support. (doprogram, rmdir): New functions. (mkdir): Use doprogram. (replace_slashes): Add support for DOS filenames. (removedirs): New function. (init_time)): New function. (initial_time): New var. (fetchname): Add support for deleted files, DOS filenames. * basename.c (FILESYSTEM_PREFIX_LEN, ISSLASH): New macros, for DOS port. (base_name): Use them. * addext.c (HAVE_DOS_FILE_NAMES): New macro. : Include if HAVE_LIMITS_H. (addext): Handle hosts with DOS file name limits. * common.h (LONG_MIN): New macro. (FILESYSTEM_PREFIX_LEN, ISSLASH): New macros, for DOS port. (ok_to_create_file): Remove. (reverse): Now int. (ok_to_reverse): New function decl. (O_WRONLY, _O_BINARY, O_BINARY, O_CREAT, O_TRUNC): New macros. (binary_transput): New var decl. * Makefile.in (ed_PROGRAM): Renamed from ED_PROGRAM. (CONFIG_HDRS, CONFIG_STATUS): New vars. (SRCS): Add maketime.c, partime.c. (OBJS): Likewise. (HDRS): Add maketime.h, partime.h. (DISTFILES_PC, DISTFILES_PC_DJGPP): New vars. (Makefile, config.status): Use CONFIG_STATUS, not config.status. (clean): Remove */*.o. (dist): Add pc and pc/djgpp subdirectories. ($(OBJS)): Depend on $(CONFIG_HDRS) instead of config.h. (maketime.o, partime.o): New rules. (util.o): Depend on maketime.h. * patch.c (main): Call init_time. Add DEFAULT_VERSION_CONTROL hook for people who prefer the old ways. Build temp file names before we might invoke cleanup. Add support for deleted files and clean up the patch-swapping code a bit. Delete empty ancestors of deleted files. When creating temporaries, use file modes of original files. (longopts, get_some_switches): New option --binary. (get_some_switches): Report non-errno errors with `fatal', not `pfatal'. (create_output_file): New function, which preserves modes of original files and supports binary transput. (init_output, init_reject): Use it. (ok_to_reverse): New function. (TMPDIR): New macro. (make_temp): Use $TMPDIR, $TMP, $TEMP, or TMPDIR, whichever comes first. * pch.c (p_says_nonexistent): New var. (open_patch_file): Add binary transput support. Apply stat to file names retrieved from user. Reject them if they don't exist. (intuit_diff_type): Add support for deleting files. Don't treat trivial directories any differently. Avoid stating the same file twice in common case of context diffs. (prefix_components): Don't treat trivial directories any differently. Add support for DOS filenames. (pch_says_nonexistent): New function. (do_ed_script): Preserve mode of input files when creating temp files. Add support for binary transput. * pch.h (pch_says_nonexistent): New decl. * util.h (replace_slashes): No longer exported. (fetchname): Add support for deleted files. (copy_file, move_file): Add support for preserving file modes. (init_time, removedirs): New functions. * argmatch.c: Converge with fileutils. * backupfile.c: Converge with fileutils. (find_backup_file_name): Treat .~N~ suffix just like any other suffix when handling file names that are too long. * inp.c: In messages, put quotes around file names and spaces around "--". (get_input_file): Allow files to be deleted. Do the expense of makedirs only if we can't create the file. (plan_a, plan_b): Add support for binary transput. * pc/chdirsaf.c, pc/djgpp/README, pc/djgpp/config.h, pc/djgpp/config.sed, pc/djgpp/configure.bat, pc/quotearg.c: New file. * NEWS: New methods for removing files; adjust file name intuition again. Add description of MS-DOS and MS-Windows ports. * patch.man: Simplify file name intuition slightly (no distinction for trivial dirs). Add --binary. Describe how files and directories are deleted. Suggest diff -a. Include caveats about what context diffs cannot represent. 1997-05-06 Paul Eggert * configure.in (VERSION): Now 2.2.7. (CPPFLAGS, LDFLAGS, LIBS): If the user has not set any of these vars, prefer support for large files if available. * common.h (_LARGEFILE_SOURCE): Define. (file_offset): New typedef. (file_seek, file_tell): New macros. * patch.c (main): Remove empty files by default unless POSIXLY_CORRECT is set. * util.c, util.h (Fseek): Use file_offset instead of long, for portability to large-file hosts. * pch.c: (p_base, p_start, next_intuit_at, skip_to, open_patch_file, intuit_diff_type, another_hunk, incomplete_line, do_ed_script): Use file_offset instead of long, for portability to large-file hosts. (prefix_components): Renamed from path_name_components; count only nontrivial prefix components, and take a 2nd EXISTING arg. (existing_prefix_components): Remove; subsumed by prefix_components. (intuit_diff_type): When creating files, try for the creation of the fewest directories. * configure.in (VERSION): Now 2.2.6. * pch.c (existing_prefix_components): New function. (intuit_diff_type): When creating a file, use a name whose existing directory prefix contains the most nontrivial path name components. (best_name): Don't check for null 2nd arg. * util.h (replace_slashes): New decl. * util.c (replace_slashes): Now external. (fetchname): Don't assume chars are nonnegative. * patch.man: When creating a file, use a name whose existing directory prefix contains the most nontrivial path name components. Add advice for creating patches and applying them. 1997-05-06 Paul Eggert * configure.in (VERSION): Now 2.2.6. * pch.c (existing_prefix_components): New function. (intuit_diff_type): When creating a file, use a name whose existing directory prefix contains the most nontrivial path name components. (best_name): Don't check for null 2nd arg. * util.h (replace_slashes): New decl. * util.c (replace_slashes): Now external. (fetchname): Don't assume chars are nonnegative. * patch.man: Describe above change to pch.c. Add advice for creating patches and applying them. 1997-05-05 Paul Eggert * configure.in (VERSION): Update to 2.2.5. * quotearg.h, quotearg.c: New files. * Makefile.in (SRCS, OBJS, HDRS): Mention new files. (inp.o, util.o): Now depends on quotearg.h. (quotearg.o): New makefile rule. * common.h (posixly_correct): New var. * patch.c (main): Initialize it. If ! posixly_correct, default backup type is now `existing'. SIMPLE_BACKUP_SUFFIX no longer affects backup type. (backup): Remove var. * util.h: (countdirs): Remove. (systemic): New decl. * util.c (move_file): Try making the parent directory of TO if backup prefix or suffix contain a slash. (ask): Remove arbitrary limit on size of result. (systemic): New function. (mkdir): Work even if arg contains shell metacharacters. (replace_slashes): Return 0 if none were replaced. Don't replace slash after . or .. since it's redundant. (countdirs): Remove. (makedirs): Ignore mkdir failures. * NEWS, patch.man: More POSIXLY_CORRECT adjustments. Describe new rules for how file names are intuited. 1997-04-17 Paul Eggert * configure.in (VERSION): Version 2.2 released. * Makefile.in (config.hin): Remove before building; we always want the timestamp updated. * inp.c (get_input_file): Look for RCS files only if backup_type == numbered_existing. * NEWS, patch.man: Remove mention of never-implemented -V rcs and -V sccs options. * patch.man: `pathname' -> `file name' Correct the description of how file names are found in diff headers. Clarify the distinction between ordinary and unified context diffs. 1997-04-13 Paul Eggert * configure.in (VERSION): Update to 2.1.7. * patch.c (numeric_optarg): New function. (get_some_switches): Use it. * pch.c (intuit_diff_type): When creating a file, prefer a name whose existing dir prefix is the longest. * util.h (countdirs): New function. * util.c (replace_slashes, countdirs): New functions. (makedirs): Use replace_slashes, to be more like countdirs. * patch.man: Explain -pN vs -p N. Recommend --new-file. Explain possible incompatibility with strip count. 1997-04-10 Paul Eggert * configure.in (VERSION): Bump to 2.1.6. (AC_CHECK_HEADERS): Remove stdlib.h (i.e. remove HAVE_STDLIB_H). * Makefile.in: (HDRS, patchlevel.h, TAGS, distclean, maintainer-clean): Don't distribute patchlevel.h; let the user do it. This works around some obscure (possibly nonexistent?) `make' bugs. * common.h (program_name): extern, not XTERN. (): Include if STDC_HEADERS, not if HAVE_STDLIB_H. (atol, getenv, malloc, realloc): Don't worry whether they're #defined. * patch.c (get_some_switches): Add special hack for backwards compatibility with CVS 1.9. (-B, -Y, -z): Now set backup_type = simple. * NEWS: Fix misspellings; minor reformatting. * README: Report POSIX.2 compliance. 1997-04-06 Paul Eggert Move all old RCS $Log entries into ChangeLog. #include all files with < >, not " ". * addext.c, argmatch.c, argmatch.h, memchr.c, install-sh: New files. * EXTERN.h, INTERN.h: Removed. * config.hin: Renamed from config.h.in. * acconfig.h (NODIR): Remove. (HAVE_MEMCHR): Add. * configure.in (AC_ARG_PROGRAM, AC_PROG_MAKE_SET, HAVE_MEMCHR): Add. (AC_CHECK_HEADERS): Replaces obsolescent AC_HAVE_HEADERS. Add stdlib.h, string.h, unistd.h, varargs.h. Delete obsolete call to AC_UNISTD_H. (AC_CONFIG_HEADER): Rename config.h.in to config.hin. (AC_C_CONST): Replaces obsolescent AC_CONST. (AC_CHECK_FUNC): Check for getopt_long; define LIBOBJS and substitute for it accordingly. (AC_CHECK_FUNCS): Replaces obsolescent AC_HAVE_FUNCS. Add _doprintf, isascii, mktemp, sigaction, sigprocmask, sigsetmask. Remove strerror. (AC_FUNC_CLOSEDIR_VOID, AC_FUNC_VPRINTF): Add. (AC_HEADER_DIRENT): Replaces obsolescent AC_DIR_HEADER. (AC_HEADER_STDC): Replaces obsolescent AC_STDC_HEADERS. (AC_SYS_LONG_FILE_NAMES): Replaces obsolescent AC_LONG_FILE_NAMES. (AC_TYPE_OFF_T): Replaces obsolescent AC_OFF_T. (AC_TYPE_SIGNAL): Replaces obsolescent AC_RETSIGTYPE. (AC_TYPE_SIZE_T): Replaces obsolescent AC_SIZE_T. (AC_XENIX_DIR): Remove. (ED_PROGRAM): New var. (NODIR): Remove. (PACKAGE, VERSION): New vars; substitute them with AC_SUBST. * Makefile.in: Conform to current GNU build standards. Redo dependencies. Use library getopt_long if available. Use `&&' instead of `;' inside shell commands where applicable; GNU make requires this. Use double-colon rules for actions that do not build files. (@SET_MAKE@): Added. (CFLAGS, LDFLAGS, prefix, exec_prefix): Base on @ versions of symbols. (COMPILE, CPPFLAGS, DEFS, ED_PROGRAM, LIBOBJS, LIBSRCS, PACKAGE, VERSION): New symbols. (SRCS, OBJS, HDRS, MISC): Add new files. (man1dir): Renamed from mandir. (man1ext): Renamed from manext. (patch): Put -o first. (install): Use $(transform) to allow program to be renamed by configure. (patchlevel.h): Build from $(VERSION). (dist): Get version number from $(VERSION) and package name from $(PACKAGE). (TAGS): Scan $(HDRS). (maintainer-clean): Renamed from realclean. Remove patchlevel.h. * backupfile.h (simple_backup_suffix): Now const *. (find_backup_file_name, base_name, get_version): Args are now const *. (base_name): New decl. * backupfile.c (): Include only if HAVE_CONFIG_H. (): Include. (): Include if HAVE_STRING_H, not if STDC_HEADERS. (): Include if !HAVE_STRING_H. (): Do not include. (): Redo include as per current autoconf standards. (): Include if HAVE_LIMITS_H. Define CHAR_BIT if not defined. (NLENGTH): Now returns size_t. (CLOSEDIR, INT_STRLEN_BOUND): New macros. (ISDIGIT): Use faster method. (find_backup_file_name): No longer depends on NODIR. Remove redundant code. (make_version_name): Remove; do it more portably. (max_backup_version): Args are now const *. (version_number): Simplify digit checking. (basename, concat, dirname): Remove. (argmatch, invalid_arg): Move to argmatch.c. Simplify test for ambiguous args. When reporting an error, use program_name not "patch". (addext): Move to addext.c. Treat all negative values from pathconf like -1. Always use long extension if it fits, even if the filesystem does not support long file names. (backup_types): Now const. * common.h, inp.h (XTERN): Renamed from EXT to avoid collision with errno.h reserved name space. * common.h (DEBUGGING): Now an integer; default is 1. (enum diff): New type. (diff_type): Use it instead of small integers. (CONTEXT_DIFF, NORMAL_DIFF, ED_DIFF, NEW_CONTEXT_DIFF, UNI_DIFF): Now enumerated values instead of macros. (NO_DIFF): New enumerated value (used instead of 0). (volatile): Default to the empty string if __STDC__ is not defined. (): Do not include. (Chmod, Close, Fclose, Fflush, Fputc, Signal, Sprintf, Strcat, Strcpy, Unlink, Write): Remove these macros; casts to void are not needed for GNU coding standards. (INITHUNKMAX): Move to pch.c. (malloc, realloc, INT_MIN, MAXLINELEN, strNE, strnNE, Reg1, Reg2, Reg3, Reg4, Reg5, Reg6, Reg7, Reg8, Reg9, Reg10, Reg11, Reg12, Reg13, Reg14, Reg15, Reg16): Remove these macros. (S_IXOTH, S_IWOTH, S_IROTH, S_IXGRP, S_IWGRP, S_IRGRP, S_IXUSR, S_IWUSR, S_IRUSR, O_RDONLY, O_RDWR): Define these macros, if not defined. (CTYPE_DOMAIN, ISLOWER, ISSPACE, ISDIGIT, PARAMS): New macros. (instat): Renamed from filestat; used for input file now. (bufsize, using_plan_a, debug, strippath): Not statically initialized. (debug): #define to 0 if not DEBUGGING, so that users of `debug' no longer need to be surrounded by `#if DEBUGGING'. (out_of_mem, filec, filearg, outname, toutkeep, trejkeep): Remove. (inname, inerrno, dry_run, origbase): New variables. (origprae): Now const*. (TMPOUTNAME, TMPINNAME, TMPPATNAME): Now const*volatile. (verbosity): New variable; subsumes `verbose'. (DEFAULT_VERBOSITY, SILENT, VERBOSE): Values in a new enum. (verbose): Removed. (VOID): Use `#ifdef __STDC__' instead of`#if __STDC__', for consistency elsewhere. (__attribute__): New macro (empty if not a recent GCC). (fatal_exit): Renamed from my_exit. (errno): Don't define if STDC_HEADERS. (): Include if either STDC_HEADERS or HAVE_STRING_H. (memcmp, memcpy): Define if !STDC_HEADERS && !HAVE_STRING_H && !HAVE_MEMCHR. (): Include if HAVE_STDLIB_H, not if STDC_HEADERS. (atol, getenv, malloc, realloc, lseek): Declare only if not defined as a macro. (popen, strcpy, strcat, mktemp): Do not declare. (lseek): Declare to yield off_t, not long. (): Include only if HAVE_FCNTL_H. * inp.h (get_input_file): New decl. * inp.c (SCCSPREFIX, GET, GET_LOCKED, SCCSDIFF, RCSSUFFIX, CHECKOUT, CHECKOUT_LOCKED, RCSDIFF): Moved here from common.h. (i_ptr): Now char const **. (i_size): Remove. (TIBUFSIZE_MINIMUM): Define only if not already defined. (plan_a, plan_b): Arg is now const *. (report_revision): Declare before use. It's now the caller's responsibility to test whether revision is 0. (scan_input, report_revision, get_input_file): Be less chatty unless --verbose. (get_input_file): New function, split off from plan_a. Reuse file status gotten by pch if possible. Allow for dry run. Use POSIX bits for creat, not number. Check for creation and close failure, and use fstat not stat. Use memcpy not strncpy. (plan_a): Rewrite for speed. Caller now assigns result to using_plan_a. Don't bother reading empty files; during dry runs they might not exist. Use ISSPACE, not isspace. (plan_b): Allow for dry runs. Use ISSPACE, and handle sign extension correctly on arg. Use POSIX symbol for open arg. * patch.c (backup, output, patchname, program_name): New vars. (last_frozen_line): Moved here from inp.h. (TMPREJNAME): Moved here from common.h. (optind_last): Removed. (do_defines, if_defined, not_defined, else_defined, end_defined): Now char const. Prepend with \n (except for not_defined) to allow for files ending in non-newline. (Argv): Now char*const*. (main, get_some_switches): Exit status 0 means success, 1 means hunks were rejected, 2 means trouble. (main, locate_hunk, patch_match): Keep track of patch prefix context separately from suffix context; this fixes several bugs. (main): Initialize bufsize, strippath. Be less chatty unless --verbose. No more NODIR; always have version control available. Require environment variables to be nonempty to have effect. Add support for --dry-run, --output, --verbose. Invoke get_input_file first, before deciding among do_ed_script, plan_a, or plan_b. Clear ofp after closing it, to keep discipline that ofp is either 0 or open, to avoid file descriptor leaks. Conversely, rejfp doesn't need this trick since static analysis is enough to show when it needs to be closed. Don't allow file-creation patches to be applied to existing files. Misordered hunks are now not fatal errors; just go on to the next file. It's a fatal error to fall back on plan B when --output is given, since the moving hand has writ. Add support for binary files. Check for I/O errors. chmod output file ourselves, rather than letting move_file do it; this saves global state. Use better grammar when outputting hunks messages, e.g. avoid `1 hunks'. (main, reinitialize_almost_everything): Remove support for multiple file arguments. Move get_some_switches call from reinitialize_almost_everything to main. (reinitialize_almost_everything): No need to reinitialize things that are no longer global variables, e.g. outname. (shortopts): Remove leading "-"; it's no longer important to return options and arguments in order. '-b' no longer takes operand. -p's operand is no longer optional. Add -i, -Y, -z. Remove -S. (longopts): --suffix is now pared with -z, not -b. --backup now means -b. Add --input, --basename-prefix, --dry-run, --verbose. Remove --skip. --strip's operand is now required. (option_help): New variable. Use style of current coding standards. Change to match current option set. (usage): Use it. (get_some_switches): Get all switches, since `+' is defunct. New options -i, -Y, -z, --verbose, --dry-run. Option -S removed. -b now means backup (backup_type == simple), not simple_backup_suffix. -B now implies backup, and requires nonempty operand. -D no longer requires first char of argument to be an identifier. `-o -' is now disallowed (formerly output to regular file named "-"). -p operand is now required. -v no longer needs to cleanup (no temp files can exist at that point). -V now implies backup. Set inname, patchname from file name arguments, if any; do not set filearg. It's now an error if extra operands are given. (abort_junk): Check for write errors in reject file. (apply_hunk, copy_till): Return error flag, so that failure to apply out-of-order hunk is no longer fatal. (apply_hunk): New arg after_newline, for patching files not ending in newline. Cache ofp for speed. Check for write errors. (OUTSIDE, IN_IFNDEF, IN_IFDEF, IN_ELSE): Now part of an enumerated type instead of being #defined to small integers. Change while-do to do-while when copying !-part for R_do_defines, since condition is always true the first time through the loop. (init_output, init_reject): Arg is now const *. (copy_till, spew_output): Do not insert ``missing'' newlines; propagate them via new after_newline argument. (spew_output): Nothing to copy if last_frozen_line == input lines. Do not close (ofp) if it's null. (dump_line): Remove. (similar): Ignore presence or absence of trailing newlines. Check for only ' ' or '\t', not isspace (as per POSIX.2). (make_temp): Use tmpnam if mktemp is not available. (cleanup): New function. (fatal_exit): Use it. Renamed from my_exit. Take signal to exit with, not exit status (which is now always 2). * pch.h, pch.c (pch_prefix_context, pch_suffix_context): New fns replacing pch_context. (another_hunk): Now yields int, not bool; -1 means out of memory. Now takes difftype as argument. (pch_write_line): Now returns boolean indicating whether we're after a newline just after the write, for supporting non-text files. * pch.c (isdigit): Remove; use ISDIGIT instead. (INITHUNKMAX): Moved here from common.h. (p_context): Removed. We need to keep track of the pre- and post- context separately, in: (p_prefix_context, p_suffix_context): New variables. (bestguess): Remove. (open_patch_file): Arg is now char const *. Copy file a buffer at a time, not a char at a time, for speed. (grow_hunkmax): Now returns success indicator. (there_is_another_patch, skip_to, another_hunk, do_ed_script): Be less chatty unless --verbose. (there_is_another_patch): Avoid infinite loop if user input keeps yielding EOF. (intuit_diff_type): New returns enum diff, not int. Strip paths as they're being fetched. Set ok_to_create_file correctly even if patch is reversed. Set up file names correctly with unidiff output. Use algorithm specified by POSIX 1003.2b/D11 to deduce name of file to patch, with the exception of patches that can create files. (skip_to): Be verbose if !inname, since we're about to ask the user for a file name and the context will help the user choose. (another_hunk): Keep context as LINENUM, not int. If the replacement is missing, calculate its context correctly. Don't assume input ends in newline. Keep track of patch prefix context separately from suffix context; this fixes several bugs. Don't assume blank lines got chopped if the replacement is missing. Report poorly-formed hunks instead of aborting. Do not use strcpy on overlapping strings; it's not portable. Work even if lines are incomplete. Fix bugs associated with context-less context hunks, particularly when patching in reverse. (pget_line): Now takes just 1 arg; instead of second arg, just examine using_plan_a global. Return -1 if we ran out of memory. (do_ed_script): Now takes output FILE * argument. Take name of editor from ED_PROGRAM instead of hardwiring /bin/ed. Don't bother unlinking TMPOUTNAME. Check for popen failure. Flush pipe to check for output errors. If ofp is nonzero, copy result to it, instead of trying to move the result. * util.h, util.c (say1, say2, say3, say4, fatal1, fatal2, fatal3, fatal4, pfatal1, pfatal2, pfatal3, pfatal4, ask1, ask2, ask3, ask4): Remove; replaced with following. (ask, say, fatal, pfatal): New stdarg functions. (fetchname): Remove last, `assume_exists' parameter. (savebuf, savestr, move_file, copy_file): Args are now const *. (exit_with_signal): New function, for proper process status if a signal is received as per POSIX.2. (basename): Rename to `base_name' and move to backupfile. * util.c (): Include here, not in common.h. (vararg_start): New macro. (va_dcl, va_start, va_arg, va_end): Define if neither nor are available. (SIGCHLD): Define to SIGCLD if SIGCLD is defined and SIGCHLD isn't. (private_strerror): Remove. (move_file): Remove option of moving to stdout. Add support for -Y, -z. Don't assume chars in file name are nonnegative. Use copy_file if rename fails due to EXDEV; report failure if rename fails for any other reason. (copy_file, makedirs): Use POSIX symbols for permissions. (copy_file): Open source before destination. (remove_prefix): New function. (vfprintf): New function, if !HAVE_VPRINTF. (afatal, apfatal, zfatal, zpfatal, errnum): Remove. (fatal, pfatal, say): New functions that use stdarg. All callers changed. (zask): Renamed from `ask'. Now uses stdarg. Output to stdout, and read from /dev/tty, or if that cannot be opened, from stderr, stdout, stdin, whichever is first a tty. Print "EOF" when an EOF is read. Do not echo input. (sigs): New array. (sigset_t, sigemptyset, sigmask, sigaddset, sigismember, SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK, sigprocmask, sigblock, sigsetmask): Define substitutes if not available. (initial_signal_mask, signals_to_block): New vars. (fatal_exit_handler): New function, if !HAVE_SIGACTION. (set_signals, ignore_signals): Use sigaction and sigprocmask style signal-handling if possible; it doesn't lose signals. (set_signals): Default SIGCHLD to work around SysV fork+wait bug. (mkdir): First arg is now const *. (makedirs): Handle multiple adjacent slashes correctly. (fetchname): Do not worry about whether the file exists (that is now the caller's responsibility). Treat a sequence of one or more slashes like one slash. Do not unstrip leading directories if they all exist and if no -p option was given; POSIX doesn't allow this. (memcmp): Remove (now a macro in common.h). * version.c (copyright_string, free_software_msgid, authorship_msgid): New constants. (version): Use them. Use program_name instead of hardwiring it. * patch.man: Generate date from RCS Id. Rewrite to match the above changes. Fri Jul 30 02:02:51 1993 Paul Eggert (eggert@twinsun.com) * configure.in (AC_HAVE_FUNCS): Add mkdir. * common.h (Chmod, Fputc, Write, VOID): New macros. (malloc, realloc): Yield `VOID *', not `char *'. * util.h (makedirs): Omit `striplast' argument. Remove `aask'. * inp.c (plan_a): Remove fixed internal buffer. Remove lint. * util.c (set_signals, ignore_signals): Trap SIGTERM, too. (makedirs): Removed fixed internal buffer. Omit `striplast' argument. (mkdir): New function, if !HAVE_MKDIR. (fetchname): Remove fixed internal buffer. Remove lint from various functions. * patch.c, pch.c: Remove lint. Thu Jul 29 20:52:07 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * Makefile.in (config.status): Run config.status --recheck, not configure, to get the right args passed. Thu Jul 29 07:46:16 1993 Paul Eggert (eggert@twinsun.com) * The following changes remove all remaining fixed limits on memory, and fix bugs in patch's handling of null bytes and files that do not end in newline. `Patch' now works on binary files. * backupfile.c (find_backup_file_name): Don't dump core if malloc fails. * EXTERN.h, INTERN.h (EXITING): New macro. * backupfile.[ch], patch.c, pch.c: Add PARAMS to function declarations. * common.h (bool): Change to int, so ANSI C prototype promotion works. (CANVARARG): Remove varargs hack; it wasn't portable. (filearg): Now a pointer, not an array, so that it can be reallocated. (GET*, SCCSDIFF, CHECKOUT*, RCSDIFF): Quote operands to commands. (my_exit): Declare here. (BUFFERSIZE, Ctl, filemode, Fseek, Fstat, Lseek, MAXFILEC, MAXHUNKSIZE, Mktemp, myuid, Null, Nullch, Nullfp, Nulline, Pclose, VOIDUSED): Remove. All invokers changed. (Argc, Argv, *define[sd], last_offset, maxfuzz, noreverse, ofp, optind_last, rejfp, rejname): No longer externally visible; all definers changed. (INT_MAX, INT_MIN, STD*_FILENO, SEEK_SET): Define if the underlying system doesn't. Include for this. * configure.in: Add limits.h, memcmp. Delete getline. * inp.c (tibufsize): New variable; buffers grow as needed. (TIBUFSIZE_MINIMUM): New macro. (report_revision): New function. (plan_a): Do not search patch as a big string, since that fails if it contains null bytes. Prepend `./' to filenames starting with `-', for RCS and SCCS. If file does not match default RCS/SCCS version, go ahead and patch it anyway; warn about the problem but do not report a fatal error. (plan_b): Do not use a fixed buffer to read lines; read byte by byte instead, so that the lines can be arbitrarily long. Do not search lines as strings, since they may contain null bytes. (plan_a, plan_b): Report I/O errors. * inp.c, inp.h (rev_in_string): Remove. (ifetch): Yield size of line too, since strlen no longer applies. (plan_a, plan_b): No longer exported. * patch.c (abort_hunk, apply_hunk, patch_match, similar): Lines may contain NUL and need not end in newline. (copy_till, dump_line): Insert newline if appending after partial line. All invokers changed. (main, get_some_switches, apply_hunk): Allocate *_define[ds], filearg, rejname dynamically. (make_temp): New function. (main): Use it. (main, spew_output, dump_line) Check for I/O errors. * pch.c (open_patch_file): Don't copy stdin to a temporary file if it's a regular file, since we can seek on it directly. (open_patch_file, skip_to, another_hunk): The patch file may contain NULs. (another_hunk): The patch file may contain lines starting with '\', which means the preceding line lacked a trailing newline. (pgetline): Rename to pget_line. (get_line, incomplete_line, pch_write_line): New functions. (pch_line_len): Return size_t, not short; lines may be very long. (do_ed_script): Check for I/O errors. Allow scripts to contain 'i' and 's' commands, too. * pch.h (pfp, grow_hunkmax, intuit_diff_type, next_intuit_at, skip_to, pfetch, pgetline): No longer exported. (pch_write_line): New declaration. (getline): Removed. * util.c (move_file, fetchname): Use private stat buffer, so that filestat isn't lost. Check for I/O errors. (savestr): Use savebuf. (zask): Use STD*_FILENO instead of 0, 1, 2. (fetchname): strip_leading defaults to INT_MAX instead of 957 (!). (memcmp): Define if !HAVE_MEMCMP. * util.c, util.h (say*, fatal*, pfatal*, ask*): Delete; these pseudo-varargs functions weren't ANSI C. Replace by macros that invoke [fs]printf directly, and invoke new functions [az]{say,fatal,pfatal,ask} before and after. (savebuf, read_fatal, write_fatal, memory_fatal, Fseek): New functions. (fatal*): Output trailing newline after message. All invokers changed. * version.c (version): Don't exit. * Makefile.in (SRCS): Remove getline.c. Thu Jul 22 15:24:24 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * EXTERN.h, INTERN.h (PARAMS): Define. * backupfile.h, common.h, inp.h, pch.h, util.h: Use. * backupfile.c: Include EXTERN.h. Wed Jul 21 13:14:05 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * getline.c: New file. * configure.in: Check for getline (GNU libc has it). * pch.c: Use it instead of fgets. (pgetline): Renamed from pgets. Change callers. * pch.h: Change decl. * pch.c (pgets): Tab adjusts by 8 - (indent % 8), not % 7. Be consistent with similar code in pch.c::intuit_diff_type. * common.h (MEM): Typedef removed. inp.c, pch.c, util.c: Use size_t instead of MEM. inp.c, pch.c: Use off_t. configure.in: Add AC_SIZE_T and AC_OFF_T. * common.h: Make buf a pointer and add a bufsize variable. * util.c, pch.c, inp.c: Replace sizeof buf with bufsize. * patch.c: malloc buf to bufsize bytes. Tue Jul 20 20:40:03 1993 Paul Eggert (eggert@twinsun.com) * common.h (BUFFERSIZE): Grow it to 8k too, just in case. (buf): Turn `buf' back into an array; making it a pointer broke things seriously. * patch.c (main): Likewise. Tue Jul 20 20:02:40 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * Move Reg[1-16] and CANVARARG decls from config.h.in to common.h. * acconfig.h: New file. * Makefile (HDRS): Add it. Tue Jul 20 16:35:27 1993 Paul Eggert (eggert@twinsun.com) * Makefile.in: Remove alloca.[co]; getopt no longer needs it. * configure.in (AC_ALLOCA): Remove. * util.c (set_signals, ignore_signals): Do nothing if SIGHUP and SIGINT aren't defined. Tue Jul 20 17:59:56 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * patch.c (main): Call xmalloc, not malloc. xmalloc buf. * common.h: Declare xmalloc. Make buf a pointer, not an array. * util.c (xmalloc): Call fatal1, not fatal. * common.h [MAXLINELEN]: Bump from 1k to 8k. Thu Jul 8 19:56:16 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * Makefile.in (installdirs): New target. (install): Use it. (Makefile, config.status, configure): New targets. Wed Jul 7 13:25:40 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * patch.c (get_some_switches, longopts): Recognize --help option, and call usage. (usage): New function. Fri Jun 25 07:49:45 1993 Paul Eggert (eggert@twinsun.com) * backupfile.c (find_backup_file_name): Don't use .orig if numbered_existing with no existing numbered backup. (addext): Don't use ext if !HAVE_LONG_FILE_NAMES, even if it would fit. This matches patch's historical behavior. (simple_backup_suffix): Default to ".orig". * patch.c (main): Just use that default. Tue Jun 15 22:32:14 1993 Paul Eggert (eggert@twinsun.com) * config.h.in (HAVE_ALLOCA_H): This #undef was missing. * Makefile.in (info, check, installcheck): New rules. Sun Jun 13 14:31:29 1993 Paul Eggert (eggert@twinsun.com) * config.h.in (index, rindex): Remove unused macro definitions; they get in the way when porting to AIX. * config.h.in, configure.in (HAVE_STRING_H): Remove unused defn. Thu Jun 10 21:13:47 1993 Paul Eggert (eggert@twinsun.com) * patchlevel.h: PATCH_VERSION 2.1. (The name `patch-2.0.12g12' is too long for traditional Unix.) * patchlevel.h (PATCH_VERSION): Renamed from PATCHLEVEL. Now contains the entire patch version number. * version.c (version): Use it. Wed Jun 9 21:43:23 1993 Paul Eggert (eggert@twinsun.com) * common.h: Remove declarations of index and rindex. * backupfile.c: Likewise. (addext, basename, dirname): Avoid rindex. Tue Jun 8 15:24:14 1993 Paul Eggert (eggert@twinsun.com) * inp.c (plan_a): Check that RCS and working files are not the same. This check is needed on hosts that do not report file name length limits and have short limits. Sat Jun 5 22:56:07 1993 Paul Eggert (eggert@twinsun.com) * Makefile.in (.c.o): Put $(CFLAGS) after other options. (dist): Switch from .z to .gz. Wed Jun 2 10:37:15 1993 Paul Eggert (eggert@twinsun.com) * backupfile.c (find_backup_file_name): Initialize copy of file name properly. Mon May 31 21:55:21 1993 Paul Eggert (eggert@twinsun.com) * patchlevel.h: Patch level 12g11. * pch.c (p_Char): Renamed from p_char, which is a system type in Tex XD88's . * backupfile.c: Include "config.h" first, so that `const' is treated consistently in system headers. Mon May 31 16:06:23 1993 Paul Eggert (eggert@twinsun.com) * patchlevel.h: Patch level 12g10. * configure.in: Add AC_CONST. * config.h.in: Add `const'. * Makefile.in (.c.o): Add -DHAVE_CONFIG_H. (getopt.o getopt1.o): Depend on config.h. * util.c (xmalloc): New function; alloca.c needs this. Mon May 31 00:49:40 1993 Paul Eggert (eggert@twinsun.com) * patchlevel.h: PATCHLEVEL 12g9. * backupfile.c, backupfile.h (addext): New function. It uses pathconf(), if available, to determine maximum file name length. * patch.c (main): Use it for reject file name. * common.h (ORIGEXT): Moved to patch.c. * config.h.in (HAVE_PATHCONF): New macro. * configure.in: Define it. * Makefile.in (dist): Use gzip, not compress. Sat May 29 09:42:18 1993 Paul Eggert (eggert@twinsun.com) * patch.c (main): Use pathconf to decide reject file name. * common.h (REJEXT): Remove. * inp.c (plan_a): Don't lock the checked-out file if `patch -o' redirected the output elsewhere. * common.h (CHECKOUT_LOCKED, GET_LOCKED): New macros. GET and CHECKOUT now just checkout unlocked copies. Fri May 28 08:44:50 1993 Paul Eggert (eggert@twinsun.com) * backupfile.c (basename): Define even if NODIR isn't defined. * patch.c (main): Ask just once to apply a reversed patch. Tue Nov 24 08:09:04 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * config.h.in, common.h: Use HAVE_FCNTL_H and HAVE_STRING_H instead of USG. * backupfile.c: Use SYSDIR and NDIR instead of USG. Define direct as dirent, not vice-versa. Wed Sep 16 17:11:48 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * patch.c (get_some_switches): optc should be int, not char. Tue Sep 15 00:36:46 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * patchlevel.h: PATCHLEVEL 12g8. Mon Sep 14 22:01:23 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * Makefile.in: Add uninstall target. * util.c (fatal, pfatal): Add some asterisks to make fatal messages stand out more. Tue Aug 25 22:13:36 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * patch.c (main, get_some_switches), common.h, inp.c (plan_a, plan_b), pch.c (there_is_another_patch): Add -t --batch option, similar to -f --force. Mon Jul 27 11:27:07 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * common.h: Define SCCSDIFF and RCSDIFF. * inp.c (plan_a): Use them to make sure it's safe to check out the default RCS or SCCS version. From Paul Eggert. Mon Jul 20 14:10:32 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * util.h: Declare basename. * inp.c (plan_a), util.c (fetchname): Use it to isolate the leading path when testing for RCS and SCCS files. Fri Jul 10 16:03:23 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * util.c (makedirs): Only make the directories that don't exist. From chip@tct.com (Chip Salzenberg). Wed Jul 8 01:20:56 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * patch.c (main): Open ofp after checking for ed script. Close ofp and rejfp before trying plan B. From epang@sfu.ca (Eugene Pang). * util.c (fatal, pfatal): Print "patch: " before message. * pch.c, inp.c, patch.c, util.c: Remove "patch: " from the callers that had it. * common.h (myuid): New variable. * patch.c (main): Initialize it. * inp.c (myuid): Function removed. (plan_a): Use the variable, not the function. * patch.c: Add back -E --remove-empty-files option. Tue Jul 7 23:19:28 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * inp.c (myuid): New function. (plan_a): Call it. Optimize stat calls. Be smarter about detecting checked out RCS and SCCS files. From Paul Eggert (eggert@twinsun.com). * inp.c, util.c, patch.c: Don't bother checking for stat() > 0. Mon Jul 6 13:01:52 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * util.c (move_file): Use rename instead of link and copying. * util.c (pfatal): New function. * util.h: Declare it and pfatal[1-4] macros. * various files: Use it instead of fatal where appropriate. * common.h, patch.c: Replace Arg[cv]_last with optind_last. * patch.c (main, get_some_switches): Use getopt_long. Update usage message. (nextarg): Function removed. * Rename FLEXFILENAMES to HAVE_LONG_FILE_NAMES, VOIDSIG to RETSIGTYPE. * backupfile.c, common.h: Use STDC header files if available. backupfile.h: Declare get_version. * COPYING, COPYING.LIB, INSTALL, Makefile.in, alloca.c, config.h.in, configure, configure.in, getopt.[ch], getopt1.c, rename.c: New files. * Configure, MANIFEST, Makefile.SH, config.H, config.h.SH, malloc.c: Files removed. * version.c (version): Don't print the RCS stuff, since we're not updating it regularly. * patchlevel.h: PATCHLEVEL 12u7. * Makefile.SH (dist): New target. Makedist: File removed. * inp.c (plan_a): Check whether the user can write to the file, not whether anyone can write to the file. Sat Jul 4 00:06:58 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * inp.c (plan_a): Try to check out read-only files from RCS or SCCS. * util.c (move_file): If backing up by linking fails, try copying. From cek@sdc.boeing.com (Conrad Kimball). * patch.c (get_some_switches): Eliminate -E option; always remove empty output files. * util.c (fetchname): Only undo slash removal for relative paths if -p was not given. * Makefile.sh: Add mostlyclean target. Fri Jul 3 23:48:14 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * util.c (fetchname): Accept whitespace between `Index:' and filename. Also plug a small memory leak for diffs against /dev/null. From eggert@twinsun.com (Paul Eggert). * common.h: Don't define TRUE and FALSE if already defined. From phk@data.fls.dk (Poul-Henning Kamp). Wed Apr 29 10:19:33 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * backupfile.c (get_version): Exit if given a bad backup type. Fri Mar 27 09:57:14 1992 Karl Berry (karl at hayley) * common.h (S_ISDIR, S_ISREG): define these. * inp.c (plan_a): use S_ISREG, not S_IFREG. * util.c (fetchname): use S_ISDIR, not S_IFDIR. Mon Mar 16 14:10:42 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * patchlevel.h: PATCHLEVEL 12u6. Sat Mar 14 13:13:29 1992 David J. MacKenzie (djm at frob.eng.umd.edu) * Configure, config.h.SH: Check for directory header and unistd.h. * patch.c (main): If -E was given and output file is empty after patching, remove it. (get_some_switches): Recognize -E option. * patch.c (copy_till): Make garbled output an error, not a warning that doesn't change the exit status. * common.h: Protect against system declarations of malloc and realloc. * Makedist: Add backupfile.[ch]. * Configure: Look for C library where NeXT and SVR4 put it. Look in /usr/ucb after /bin and /usr/bin for utilities, and look in /usr/ccs/bin, to make SVR4 happier. Recognize m68k predefine. * util.c (fetchname): Test of stat return value was backward. From csss@scheme.cs.ubc.ca. * version.c (version): Exit with status 0, not 1. * Makefile.SH: Add backupfile.[cho]. * patch.c (main): Initialize backup file generation. (get_some_switches): Add -V option. * common.h, util,c, patch.c: Replace origext with simple_backup_suffix. * util.c (move_file): Use find_backup_file_name. Tue Dec 3 11:27:16 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) * patchlevel.h: PATCHLEVEL 12u5. * Makefile.SH: Change clean, distclean, and realclean targets a little so they agree with the GNU coding standards. Add Makefile to addedbyconf, so distclean removes it. * Configure: Recognize Domain/OS C library in /lib/libc. From mmuegel@mot.com (Michael S. Muegel). * pch.c: Fixes from Wayne Davison: Patch now accepts no-context context diffs that are specified with an assumed one line hunk (e.g. "*** 10 ****"). Fixed a bug in both context and unified diff processing that would put a zero-context hunk in the wrong place (one line too soon). Fixed a minor problem with p_max in unified diffs where it would set p_max to hunkmax unnecessarily (the only adverse effect was to not supply empty lines at eof by assuming they were truncated). Tue Jul 2 03:25:51 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) * Configure: Check for signal declaration in /usr/include/sys/signal.h as well as /usr/include/signal.h. * Configure, common.h, config.h.SH: Comment out the sprintf declaration and tests to determine its return value type. It conflicts with ANSI C systems' prototypes in stdio.h and the return value of sprintf is never used anyway -- it's always cast to void. Thu Jun 27 13:05:32 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu) * patchlevel.h: PATCHLEVEL 12u4. Thu Feb 21 15:18:14 1991 David J. MacKenzie (djm at geech.ai.mit.edu) * pch.c (another_hunk): Fix off by 1 error. From iverson@xstor.com (Tim Iverson). Sun Jan 20 20:18:58 1991 David J. MacKenzie (djm at geech.ai.mit.edu) * Makefile.SH (all): Don't make a dummy `all' file. * patchlevel.h: PATCHLEVEL 12u3. * patch.c (nextarg): New function. (get_some_switches): Use it, to prevent dereferencing a null pointer if an option that takes an arg is not given one (is last on the command line). From Paul Eggert. * pch.c (another_hunk): Fix from Wayne Davison to recognize single-line hunks in unified diffs (with a single line number instead of a range). * inp.c (rev_in_string): Don't use `s' before defining it. From Wayne Davison. Mon Jan 7 06:25:11 1991 David J. MacKenzie (djm at geech.ai.mit.edu) * patchlevel.h: PATCHLEVEL 12u2. * pch.c (intuit_diff_type): Recognize `+++' in diff headers, for unified diff format. From unidiff patch 1. Mon Dec 3 00:14:25 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * patch.c (get_some_switches): Make the usage message more informative. Sun Dec 2 23:20:18 1990 David J. MacKenzie (djm at albert.ai.mit.edu) * Configure: When checking for C preprocessor, look for 'abc.*xyz' instead of 'abc.xyz', so ANSI C preprocessors work. * Apply fix for -D from ksb@mentor.cc.purdue.edu (Kevin Braunsdorf). 1990-05-01 Wayne Davison * patch.c, pch.c: unidiff support added Wed Mar 7 23:47:25 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) * pch.c: Call malformed instead of goto malformed (just allows easier debugging). Tue Jan 23 21:27:00 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) * common.h (TMP*NAME): Make these char *, not char []. patch.c (main): Use TMPDIR (if present) to set TMP*NAME. common.h: Declare getenv. Sun Dec 17 17:29:48 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) * patch.c (reverse_flag_specified): New variable. (get_some_switches, reinitialize_almost_everything): Use it. 1988-06-22 Larry Wall patch12: * common.h: sprintf was declared wrong * patch.c: rindex() wasn't declared * patch.man: now avoids Bell System Logo 1988-06-03 Larry Wall patch10: * common.h: support for shorter extensions. * inp.c: made a little smarter about sccs files * patch.c: exit code improved. better support for non-flexfilenames. * patch.man: -B switch was contributed. * pch.c: Can now find patches in shar scripts. Hunks that swapped and then swapped back could core dump. 1987-06-04 Larry Wall * pch.c: pch_swap didn't swap p_bfake and p_efake. 1987-02-16 Larry Wall * patch.c: Short replacement caused spurious "Out of sync" message. 1987-01-30 Larry Wall * patch.c: Improved diagnostic on sync error. Moved do_ed_script() to pch.c. * pch.c: Improved responses to mangled patches. * pch.h: Added do_ed_script(). 1987-01-05 Larry Wall * pch.c: New-style context diffs caused double call to free(). 1986-11-21 Larry Wall * patch.c: Fuzz factor caused offset of installed lines. 1986-11-14 Larry Wall * pch.c: Fixed problem where a long pattern wouldn't grow the hunk. Also restored p_input_line when backtracking so error messages are right. 1986-11-03 Larry Wall * pch.c: New-style delete triggers spurious assertion error. 1986-10-29 Larry Wall * patch.c: Backwards search could terminate prematurely. * pch.c: Could falsely report new-style context diff. 1986-09-17 Larry Wall * common.h, inp.c, inp.h, patch.c, patch.man, pch.c, pch.h, util.h, version.c, version.h: Baseline for netwide release. 1986-08-01 Larry Wall * patch.c: Fixes for machines that can't vararg. Added fuzz factor. Generalized -p. General cleanup. Changed some %d's to %ld's. Linted. * patch.man: Documented -v, -p, -F. Added notes to patch senders. 1985-08-15 van%ucbmonet@berkeley Changes for 4.3bsd diff -c. 1985-03-26 Larry Wall * patch.c: Frozen. * patch.man: Frozen. 1985-03-12 Larry Wall * patch.c: Now checks for normalness of file to patch. Check i_ptr and i_womp to make sure they aren't null before freeing. Also allow ed output to be suppressed. Changed pfp->_file to fileno(pfp). Added -p option from jromine@uci-750a. Added -D (#ifdef) option from joe@fluke. * patch.man: Documented -p, -D. 1984-12-06 Larry Wall * patch.c: Made smarter about SCCS subdirectories. 1984-12-05 Larry Wall * patch.c: Added -l switch to do loose string comparison. * patch.man: Added -l switch, and noted bistability bug. 1984-12-04 Larry Wall Branch for sdcrdcf changes. * patch.c: Failed hunk count not reset on multiple patch file. * patch.man: Baseline version. 1984-11-29 Larry Wall * patch.c: Linted. Identifiers uniquified. Fixed i_ptr malloc() bug. Fixed multiple calls to mktemp(). Will now work on machines that can only read 32767 chars. Added -R option for diffs with new and old swapped. Various cosmetic changes. 1984-11-09 Larry Wall * patch.c: Initial revision Local Variables: mode: indented-text left-margin: 8 version-control: never end: I C pr kwa($J_8]_8_8,h,J./usr/local/lib/patch-2.5/NEWSe/$Known problems: * The diffutils 2.7 documentation for `patch' is obsolete; this should be fixed in diffutils 2.8. Until then, see `patch --help' or `man patch'. Changes in version 2.5: * Version control is now independent of whether backups are made. The -V or --version-control option and the VERSION_CONTROL and PATCH_VERSION_CONTROL environment variables no longer affect whether backups are made; they affect only the names of the backup files. * When asking the user whether to reverse a patch, the default answer is now `no' instead of `yes'. * `patch' can now recognize context diffs that have been encapsulated by prepending "- " to lines beginning with "-" (as per Internet RFC 934). * `patch' now reports an error if the input contains garbage and no patches. Changes in version 2.4: * New options: -Z or --set-utc sets times of patched files, assuming diff uses UTC (GMT). -T or --set-time is similar, assuming local time (not recommended). --backup-if-mismatch makes a backup if the patch does not match exactly --no-backup-if-mismatch makes a backup only if otherwise requested * The default is now --backup-if-mismatch unless POSIXLY_CORRECT is set. * The -B or --prefix, -Y or --basename-prefix, and -z or --suffix options no longer affect whether backups are made (as they did in patch 2.2 and 2.3); they now merely specify the file names used when simple backups are made. * When patching a nonexistent file and making backups, an empty backup file is now made (just as with traditional patch); but the backup file is unreadable, as a way of indicating that it represents a nonexistent file. * `patch' now matches against empty and nonexistent files more generously. A patch against an empty file applies to a nonexistent file, and vice versa. * -g or --get and PATCH_GET now have a numeric value that specifies whether `patch' is getting files. If the value is positive, working files are gotten from RCS or SCCS files; if zero, `patch' ignores RCS and SCCS and working files are not gotten; and if negative, `patch' asks the user whether to get each file. The default is normally negative, but it is zero if POSIXLY_CORRECT is set. * The -G or --no-get option introduced in GNU patch 2.3 has been removed; use -g0 instead. * The method used to intuit names of files to be patched is changed again: `Index:' lines are normally ignored for context diffs, and RCS and SCCS files are normally looked for when files do not exist. The complete new method is described in the man page. * By default, `patch' is now more verbose when patches do not match exactly. * The manual page has a new COMPATIBILITY ISSUES section. Changes in version 2.3: * Unless the POSIXLY_CORRECT environment variable is set: - `patch' now distinguishes more accurately between empty and nonexistent files if the input is a context diff. A file is assumed to not exist if its context diff header suggests that it is empty, and if the header timestamp looks like it might be equivalent to 1970-01-01 00:00:00 UTC. - Files that ``become nonexistent'' after patching are now removed. When a file is removed, any empty ancestor directories are also removed. * Files are now automatically gotten from RCS and SCCS if the -g or --get option is specified. (The -G or --no-get option, also introduced in 2.3, was withdrawn in 2.4.) * If the PATCH_VERSION_CONTROL environment variable is set, it overrides the VERSION_CONTROL environment variable. * The method used to intuit names of files to be patched is changed. (It was further revised in 2.4; see above.) * The new --binary option makes `patch' read and write files in binary mode. This option has no effect on POSIX-compliant hosts; it is useful only in on operating systems like DOS that distinguish between text and binary I/O. * The environment variables TMP and TEMP are consulted for the name of the temporary directory if TMPDIR is not set. * A port to MS-DOS and MS-Windows is available; see the `pc' directory. * Backup file names are no longer ever computed by uppercasing characters, since this isn't portable to systems with case-insensitive file names. Changes in version 2.2: * Arbitrary limits removed (e.g. line length, file name length). * On POSIX.1-compliant hosts, you can now patch binary files using the output of GNU `diff -a'. * New options: --dry-run --help --verbose -i FILE or --input=FILE -Y PREF or --basename-prefix=PREF * patch is now quieter by default; use --verbose for the old chatty behavior. * Patch now complies better with POSIX.2 if your host complies with POSIX.1. Therefore: - By default, no backups are made. (But this was changed again in patch 2.4; see above.) - The simple backup file name for F defaults to F.orig regardless of whether the file system supports long file names, and F~ is used only if F.orig is too long for that particular file. - Similarly for the reject file names F.rej and F#. Also: - The pseudo-option `+' has been withdrawn. - -b is equivalent to --version-control=simple; `-z SUFF' has the meaning that `-b SUFF' used to. - Names of files to be patched are taken first from *** line and then from --- line of context diffs; then from Index: line; /dev/tty is consulted if none of the above files exist. However, if the patch appears to create a file, the file does not have to exist: instead, the first name with the longest existing directory prefix is taken. (These rules were changed again in patch 2.3 and 2.4; see above.) - Exit status 0 means success, 1 means hunks were rejected, 2 means trouble. - `-l' ignores changes only in spaces and tabs, not in other white space. - If no `-p' option is given, `-pINFINITY' is assumed, instead of trying to guess the proper value. - `-p' now requires an operand; use `-p 0' to get the effect of the old plain `-p' option. - `-p' treats two or more adjacent slashes as if it were one slash. - The TERM signal is caught. - New option `-i F' reads patch from F instead of stdin. * The `patch' options and build procedure conform to current GNU standards. For example, the `--version' option now outputs copyright information. * When the patch is creating a file, but a nonempty file of that name already exists, `patch' now asks for confirmation before patching. * RCS is used only if the version control method is `existing' and there is already an RCS file. Similarly for SCCS. (But this was changed again in patch 2.3 and 2.4; see above.) * Copyright notices have been clarified. Every file in this version of `patch' can be distributed under the GNU General Public License. See README for details. Changes in version 2.1: * A few more portability bugs have been fixed. The version number has been changed from 2.0.12g11 to 2.1, because the name `patch-2.0.12g10' was too long for traditional Unix file systems. Versions 2.0.12g9 through 2.0.12g11 fix various portability bugs. Changes in version 2.0.12g8: * Start of the 12g series, with a GNU-style configure script and long-named options. * Added the -t --batch option, similar to -f. * Improved detection of files that are locked under RCS or SCCS. * Reinstate the -E option to remove output files that are empty after being patched. * Print the system error message when system calls fail. * Fixed various bugs and portability problems. n in 2 kzb($Q _8]_8_8,j,Q ./usr/local/lib/patch-2.5/READMEog/$This version of `patch' has many changes made by the Free Software Foundation. They add support for: * handling arbitrary binary data and large files * the unified context diff format that GNU diff can produce * making GNU Emacs-style backup files * improved interaction with RCS and SCCS * the GNU conventions for option parsing and configuring and compilation. * better POSIX.2 compliance They also fix some bugs. See the NEWS and ChangeLog files for details. Tutorial-style documentation for patch is included in the GNU diffutils package. Unfortunately, the diffutils 2.7 documentation for `patch' is obsolete; this should be fixed in diffutils 2.8. In the mean time, see `patch --help', or consult the man page in this distribution. For GNU and Unix build and installation instructions, see the file INSTALL. For MS-DOS using DJGPP tools, see the file pc/djgpp/README. For other systems, copy config.hin to config.h and change #undef statements in it to #define as appropriate for your system, and copy Makefile.in to Makefile and set the variables that are enclosed in @ signs as appropriate for your system. Please send bug reports for this version of patch to bug-gnu-utils@prep.ai.mit.edu. The Free Software Foundation is distributing this version of patch independently because as of this writing, Larry Wall has not released a new version of patch since mid-1988. We have heard that he has been too busy working on other things, like Perl. He has graciously agreed to let GNU `patch' be distributed under the terms of the GNU General Public License. ------ Copyright 1984, 1985, 1986, 1987, 1988 Larry Wall Copyright 1989, 1990, 1991, 1992, 1993, 1997 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this file; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. thod is k:Z7PA_8_8_8,T./usr/local/bin/A k$f(yw_8w_8_8,n,y./usr/local/bin/patch2./8^lJwH 564 :P d ;1L.textPP5P͌ 2 .data d d66df,@.bss =X =X4.loadermX.debugJ/\ "$|nx|#x|+x|1B(9 e)-*@H`H0HA|nxAA| QN!A89}sx}{x~xHi`,Ab HgA| @__startb|,!HAcA}hcCN!Ab ,Ac|CN!Ab,Ac|CN!Ab,Ac|CN!Ab,Ac|CN!AH8!@}N 8!@N A__threads_init,4A L| N |!`b cH9`tdH08`dH  }HAc`d`,@8H=}`Hb cH9q`xdH̀8`dHx8`d(Hh8`dHb c888HHb c8D8HdH`b cH8`xd HD8`dH48`dH$d8`dHb c8XH`,@8H=e`b cH8u`dHЀb c8\8H퀂dHb cH89`xdHt8`dxd$H|l8`dHlp8`dH\8`dHL8`dHda8caa8H!`8 aHHa܀88$|c:HAa8@H̀A,|`&Tc?,@Ha܀880|c:HAa8@HA,|`&Tc?,AaT(AaH TdacaaL,A8aH 8xaaaa쀁H1AcHAc`d`|c"a쀁cH`c`d`|c"a쀁8`daX(AaH Xdacaa8pH`a8ca老cH`c`d`|c"aa耡8dHUAcH ՀAc`d`|c"a老HcH%`c`d`|c"a老8`>da8caa8H`88aaHmAaaH8|8!0N Aversion_controller|!ahhcH A`dc8HAa@HX|8!PN APsavestr0 |!Dahlah(Aal(AH888H iAalHAa@a@(@b c,@KmHa@hlH Y`a@aDHX|8!PN Asavebuf0 |!Dax|a|aH8`aLaxcHɀA,AHH,ax8caxaxcHA,AK܀bcpcAx|8Haxa@axaDaDc(ATaDc(/@XaDc(/@ aD8caDaDc(/AaH8caHaH,AaD8ca@HԀaDcH݀A,Abb|+yALc,A8`aTH <`aTaTaPaDTPH)`aLHLaDT<8H)`aLL8`| AL<8|(AaLD8`dH aD8caDaDc(@a@c(@ 8`Hdax8HG`,@$a(A8`d8`H,a(AaLda@KIaXHh|8!`N A fetchname0|!Dax|!A8}a@88~@HA8a|aDxD8~@HH!A8~@HŀAca@d8HH%Ac8c@HA8`K`Hh|8!`N Apfatal|!Dahlptx|!A88~@HрA8ala@h@8~@HGEAcD8DD,@8@8` HGiAH$d@aD8cd@D8` db8c@HA8`K`HX|8!PN Afatal0|!ahlptx|!A8ala@h@8 HFUAc8c HAHX|8!PN Axsay0 |!Dax|!A8a|aDxD8~ HEAc8c H]A,@PbTc,@8`HEA,A88H}AaLH 8`aLaL,@08$HE݀Ab䀣8 8`dH8`aH䀝耾8H|(|2H!Acc`e`@@8H|0|0@@ c8|c ( AHH̀d8caHdTc@N @strcpyA L| N |!ax|axK`a@a@K5AaDa|K%AaH8`aLaDH|c"(A8`aLHda@x| @@c8H!AaLH@D|d)@aD88`|d)Hh|8!`N AaddextA L| N ĐA L| N ȐA L| N ̐A L| N АA L| N ԐA L| N ؐA L| N ܐA L| N A L| N A L| N A L| N A L| N A L| N A L| N !ax|8`aDa|a@a@caHaHaTaT8c(@ȀaT,@|"dDa@8ca@a@,AL8`a@a@,Aa|@|c (@a|caTHLa@|acD|@|(| @AHa@8ca@Ka|8ca|KHh|8!`N Aplookup|!XahlptxahlxH ahah(A8apx| A$axct| Aaha@H 8`a@a@aDHX|8!PN A parse_ranged0 |!0aaca@a@,@ 8`H8`aLacaHaHH}A,A 8`aLaL,@ aH(-AaH(+AHHaH(@$aKр8`daaXH@a8ca8`aPacaHaHHA,A 8`aPaP,@ aH(-AaH(+AKta@Tc:|cPaDaD(Aa@8ca@aaTaKaDcaHaH(@(aD8caDa@daTa\HdaD8caDaTHHaTaT(@a@Tc:|cPaDaD(@`a@8ca@8`Hx|8!pN A parse_prefix0 |!`08aaaa8c('ATc:|~.<|c"|hN a,=AALa,/AA a,$Ada,-AxHa,4Aa,:A\H4a,AAa,DAa,EAa,NA`Hac8c( A 8`HHac| @Aa8ca8`Ha8caHda88HaHHa(-|&T?|c"aH(aca\a8caa\aa,AA,a,PA@a,aAa,pA(HLac, @8`dH4ac, A`d8c dH 8`Hacaa,MAa,mAHa8caHacHAA,A 8`H8H(a8 888K}aHa8888nKYadd8cdH̀aah8`a@ac8c( A ac8c( A 8`a@a@8a8 ah88KݐaHda9!X98888HaaaX8<`H2`eaXH2`dHa!9 888;8DK%AH0aHTc>Dx|8x|daH, @a@HcUA| A8TK`Ha@8K!`a8cd$H|8!N Askip_to0 !aX\aXda\d H8!@N @,next_intuit_at|!b$b䀣8pK`HH|8!@N AH malformed0|!Tc<b (A (Ac(AH88d8KϙA~ T:KA~ ~ (A\~T:KA~~(A8~KmAc`d`c(A 8`H$b c,@ K9`8`HH|8!@N A grow_hunkmax0 |!pbc`a@a@H`рAaHa@aXa\c8c\daXc,@a@H`AaLH,a@a`cad8c`dadcaLaL,\@,a@ahalc8cldahc,@a@H`IAaPH,a@apcat8cpdatcaPaPaDaD, AaD,AHHHa@axa|c8c|daxc,@a@H_AaTH,a@aca8cdacaTaTaDaD, AaD,AKt8`H(bc`H8K`8`HH|8!N Aincomplete_line0 |!XdPH9a@HX|8!PN A4get_line0 |!PaȐ̀bc`a@8`aHa@adahc8chdadc,@a@H^IAa`H,a@alcap8cldapca`a`aDaD,@$a@cpc A K`8`HaȀH| AHTaD, AaD,X@aH8caHH(aD, @aH8cTc8aHHHK8`aH䀄LD,-@ 8̀| AHHTa@ataxc8cxdatc,@a@H] AaXH,a@a|ca8c|dacaXaXaDaD,@H8aD, A8`aHL8`-dHa@aac8cdac,@a@H\eAa\H,a@aca8cdaca\a\aDaD,@HaD,-@$a8cà8`| AKbcaPaHP8| @@haPTcLH|d)aH8caHaD, @Ha@aac8cdac,@a@H[AaTH,a@aca8cdacaTaTaDaD,@H4K؀LH8`|d)d$8cd$aHaH0a@cpc A Ku`8 K`8`H|8!N Ad pget_line0|!0a萁8`a@aaac(Aa8caac(AȀac(/@ac(/Aa,Ata;a8HKyAc`d`8/aĀa,@aPTc&(@@ 8`aĀa,@H,a@8ca@a8caac(@@a@aH|8!ЃN A8prefix_components0|!a<`8caT8`adat8`a@a@,ATa@T:|c .(A$a|c .,@a|c .8K)@T:|"dHaT@T:|"H| @HԀa@Tc:|acHaTa@T:|c .K`KA@T:|"dXad@T:|"X| @@Hpa@Tc:|acXada@T:|c.K)Ac|"dhat@T:|"h| @@Ha@Tc:|achata@8ca@a@,@8`a@a@,Aa@Tc:|.(AT|.,@D|HT|(@0|Xd|(@@|acht| @@Ha@8ca@a@,@a@axH|8!N AH best_name0|!8`aL8TaXa\a`adahaxxttp~PLLH~\~\~X~`8K`cd 8cd$aLaPa`a\ahad~`HUyAaL8`aH8`8Kc(@HaT,A aTdaXd8`aH 4aLdd$d8`HXbca@a@c( Aa@c( @Ha@c(X@HHxa@c( @aH8cTc8aHHaH8caHa@8ca@a@c( Aa@c( @Ha@c(X@Ka@aDaDc8c( @aDc(,@HH̀Ac`d`LL(@8PK `~`H=QAaDKucaPaP(@aD$KQHbca@a@c8c( @a@c(,@HHK%Aa`HȐ8daca`a`,@ KoE`aTaac8cdac,@aTH99AadH,aTaca8cdacadadaXaX,@aTcpc @aTH9ɀA,A Kr`H|8!N A do_ed_script0 !ahbhT:|c"cHa@H8!PN @, pch_timestamp0!ahbchT:|c .a@H8!PN @, pch_line_len0 !ahbhT:|c"cXa@H8!PN @,pch_says_nonexistent0 |!a8`aD,AT| @H bc T:|c .KрA8c,@,@H888KA8`d0a,Aa,@bc`H6Aa8`aaaa8aa;ēȐa̐aaaaaaaKYcaHaH| @AaH(AH$bc88KA,A@a$KH8`|@@ aH 8`aaaH(d$8cd0| @KֵaHH8`|@@H'؀aH(@la,Aa,A8`aHbc0|d,@$bc8K=`8`aHH8K`8c| @(H4%`db$b8KQ`| @H888:KeAb䀃|9T:8|9. T:|1.cca`a`8c(@ a`8c( ATc:|~.|c"|hN H bc88KA,@@$( A(cc( Ab$8 Ka`aHaX8`adaT| @Kq,A 8`adad8aX|daHaHTT:|d).bcH8cK\1`c TT:|*\|d).a\c(@aT8c8`H4bT8`+|d)aT8caTaT| @a,AH,@8 Ka`bcpcA8`aLaL| AaL8| @8`^aPH 8` aPbcL|(P88}@KrAaL8@Hc8c@KẁAaL8caLaL| @|8|@b8`^|d)8`H|8!N A) another_hunk0 !ahbch|c a@H8!PN @(pch_char0 !ahbc hT:|c .a@H8!PN @,pfetch|!d,A8dD| A(blc,@8K_!`8`Hblc,@8K^`K%`dbc,@|blc,@KhA,A 8`aaaP8`aTHLaT8| @AKhqA,AHH 8`aTa@aac8cdac,@a@KQAalH,a@aca8cdacalalaDaD,@Xbc(A aPKa@88K<`b8 cL| @@(HbT<cL| @A~LH2~aL~~Tcpdap8capaD, @apt|ddHa@aac8cdac,@a@KAa|H,a@aca8cdaĈca|a|aDaD,@(apt|dda`8ca`HK a`8ca`Ka@cpc @a@K9A,A K19`a`H2`,A0K`yAc| @A K,`a`8cdH|8!лN ATplan_b|!padaT8`aXaT| @@PaT(AaTa`H 8`a`a`a\a\K[ AaLaL(A 8`aXaX,@ 8`H4aT(Aa8K_Aa|8`aa|,@8\KFQ`aT|d(Aa|LT|(|2K^Aaa(@aaTHXa8| @@$a|K]AaLK]A8`Hpa|c"aaT|d(@ta|K]uA,A K/ `LaT|c"aD8`aPaLa@Da@| 8 H Aa@a@(AXaP8caPaP,@ aK a@8ca@Da@| 8 H Aa@a@(@8`adaPTc:Td𾀡P|(@@$KYAaHaH(A 8`adad,@aLK\A8`H48`aPaLa@a@HP8PPT:|d).Da@| 8 H Aa@a@(@Ha@8ca@KaT(A4aDc( A$aDHP8PPT:|d).aP8cdb(APcahahcal8`apahKLAatatT| @A aDt||c"axaLa@lxa@|(HAa@a@(AȀa@htHA,@0a@L| @Aa@cK`]A,A@HH8a@x8c| @A a@t|c K`%A,AHH8`apH8a@8ca@lxa@|(H5Aa@a@(@@apKŀaLd aHd8`H|8!N Aplan_a|!ax8`a@bcpc@axK,A 8`a@@b c,@ axK1blcaLaL,AhaL,AaL,A H`H\b c,AcaHH 8aHaHaDxD8KCE`Hx8KC1`HHh|8!`N A scan_input|!b c,A(~ KXAccKXAHHKXA;~KXAcc8`ddHX|8!PN Are_input0 |!aaKu`a@bc,@DbcKIUA,@8`aPHb8caPaPdbc,Abc,Apbc,@\a@,@Lbp(A4p(@HEAc`d`| @AHHHH|bc,A8`aXH baXaXaTa@T8H8LK4`aDaD(b|&T?hc,Abc,@a@,@,bcpc(AD8K?e`blc,@D8K@I`aHK1`,A D88K@!`8`aDaD(AHaD,@L|&T?K2)`c,A 8`daLKUAaHKUAHT~,ADbtcK5`c`d`,@ c8d8DK=m`bc,A8`d8`dH(bcTc&(A8K> `Hx|8!pN A<get_input_file|!aa,Aa| @8`d8aPHb c,ALbT:|(.Dc8T:|c .D|ddaDaTHaH2`aHaH|daLL| @8`aHL| @8`aHaLT:|"daLH2`e`|)8HAc,A,T:|"KT)A,@ K$`bT:|"H|1|*D|(@cdH\aDa@a@c( A$a@8ca@Ha@c( @a@8ca@a@D|ddaDaXHHx|8!pN AXifetchA L| N A L| N A L| N A L| N A L| N  A L| N |!Xahlptxahlptx9H`a@HX|8!PN AXgetopt_long_only0 |!Xahlptxahlptx9Ha`a@HX|8!PN AX getopt_long0 |!ahlpbc~~~8`~cKՀAcdapc(-@8`d ap8capHXapc(+@ 8`d ap8capH,d(A8`d H8`d apa@HX|8!PN A_getopt_initialize!axb@caDbcaHaHD| @aD@| @HH؀aHD|aD@|e|@ؐaX8`a\a\X| @ax@\|*T:|c .aLaxHD@|(| \|*T:|c .x@\|2T:|d).aLxHD@|0|(\|2T:|d).a\8ca\a\X| A`aHX|daHHaHD|daP8`aTaTP| @ax@T|*T:|c .aLaxDT|*T:|c .x@T|2T:|d).aLxDT|2T:|d).aT8caTaTP| Aa@P|c"a@aHD| @aD@| @K0b|0|2cdH8!`N @Xexchange0 !ahlahc(A@ahcl| @@aha@H(ah8cahahc(@8`H8!PN @hmy_index0 |!@aؐܐ쀂 8`dbc,Ab$c,@<d,@ 8`da؀܀Kma$8`db(Acc(@0b|0@ cdb|0@ cdb ,@|(A$c| AaKH$b|0A cdd|(@8a܀T:|c .c(-@a|c .c(@HHHH`d8cdd|(@8a܀T:|c .c(-@a|c .c(@HHKbcd~| Aa܀T:|c .8Ky`c,@xd8cdb|0A c| AaKH$d|(@bcda؀da؀dd|(@(b|0A cd8`Ha܀T:|c .c(-@a|c .c(@Lbc ,@ 8`Hda܀T:|c(. ed8cd8`H4a܀T:|c(.8ca8`aa(A(a܀T:|c .c(-@ 8`aa|c*da(Ala܀T:|c(.c(-AHa,A8a|c(.c(@ a|(.KA(@HHHH8`apatax8`a|bcahahc(Aahc(=AHH4ah8cahahc(Aahc(=AKԀaal8`aalc(Àalch|(K@Ac,@xahalcK8AAc`d`| @@ alapaa|8`atHTap(@alapaa|H 8`axal8cala8caalc(@AH@b܀܀T:|0.8T8c@K>iA8tdd8cd,8`d8`?H~ca@~8c~a@K-c`d`Dcc(@d8cdaD(Aa@(:@|b(c,AXbc(A(b܀@8x8c@K=AH$b܀@88c@K=eAa@,d8`?HaDc(W@,aDc(;@8`aPaTaXa\b(A$c dd8cdHbc| @pb(c,A$b܀@888c@K>>>>>>>18>4P (`D<\x @PpTdtx@(#)61 1.11 src/bos/usr/ccs/lib/libc/__threads_init.c, libcthrd, bos43K, 9823A_43K 6/12/98 12:37:06 ; :POSIXLY_CORRECTPATCH_GETPATCH_GET valueSIMPLE_BACKUP_SUFFIXPATCH_VERSION_CONTROLVERSION_CONTROL%sUnreversed%s patch detected!lost hunk on alloc error!Hunk #%d ignored at %ld. Hunk #%d FAILED at %ld. Hunk #%d FAILED at %ld. Hunk #%d succeeded at %ld with fuzz %lds (offset %ld line%s). out of memory using Plan Ahunkpatch.cSkipping patch. Removing file `%s'%s. ignoredFAILED%d out of %d hunk%s %ss.rej -- saving rejects to %s backupprefixcontextdirectoryifdefedremove-empty-filesforcefuzzgetinputignore-whitespacenormalforwardoutputstripreject-filereversequietsilentbatchset-timeunifiedversionversion-controldebugbasename-prefixsuffixset-utcdry-runverbosebinaryhelpbackup-if-mismatchno-backup-if-mismatchInput options:Output options:Miscellaneous options: --help Output this help.%s -bbackup prefix is emptycan't change directory to `%s'fuzz factorget option value-strip countdebugging optionbackup basename prefix is emptybackup suffix is empty%s: extra operand `%s' %s `%s' is not a number%s `%s' is too large%s `%s' is negative **** ---- -----*************** *** 0%s *** %ld%s *** %ld,%ld%s --- 0%s --- %ld%s --- %ld,%ld%s %c outstate->after_newlinepatch.coldchar = '%c', newchar = '%c' outstate->after_newlinepatch.coutstate->after_newlinepatch.cpch_char(new) == ' 'patch.cwcan't create `%s'il=%ld lfl=%ld TMPDIRTMPTEMP/tmp%s/p%cXXXXXXmktemp #endif /* %s */ #else #ifndef %s #ifdef %s Not enough memory to try swapped hunk! Assuming unswapped. Reversed (or previously applied)Patch attempted to create file `%s', which already exists. Ran out of memory using Plan A -- trying again... and any empty ancestor directoriesFile `%s' is not empty after patch, as expected. not setting time of file `%s' (time mismatch) not setting time of file `%s' (contents mismatch) can't set timestamp on file `%s'can't set permissions on file `%s'can't set permissions on file `%s' -p NUM --strip=NUM Strip NUM leading components from file names. -F LINES --fuzz LINES Set the fuzz factor to LINES for inexact matching. -l --ignore-whitespace Ignore white space changes between patch and input. -c --context Interpret the patch as a context difference. -e --ed Interpret the patch as an ed script. -n --normal Interpret the patch as a normal difference. -u --unified Interpret the patch as a unified difference. -N --forward Ignore patches that appear to be reversed or already applied. -R --reverse Assume patches were created with old and new files swapped. -i PATCHFILE --input=PATCHFILE Read patch from PATCHFILE instead of stdin. -o FILE --output=FILE Output patched files to FILE. -r FILE --reject-file=FILE Output rejects to FILE. -D NAME --ifdef=NAME Make merged if-then-else output using NAME. -E --remove-empty-files Remove output files that are empty after patching. -Z --set-utc Set times of patched files, assuming diff uses UTC (GMT). -T --set-time Likewise, assuming local time.Backup and version control options: -b --backup Back up the original contents of each file. --backup-if-mismatch Back up if the patch does not match exactly. --no-backup-if-mismatch Back up mismatches only if otherwise requested. -V STYLE --version-control=STYLE Use STYLE version control. STYLE is either 'simple', 'numbered', or 'existing'. -B PREFIX --prefix=PREFIX Prepend PREFIX to backup file names. -Y PREFIX --basename-prefix=PREFIX Prepend PREFIX to backup file basenames. -z SUFFIX --suffix=SUFFIX Append SUFFIX to backup file names. -g NUM --get=NUM Get files from RCS or SCCS if positive; ask if negative. -t --batch Ask no questions; skip bad-Prereq patches; assume reversed. -f --force Like -t, but ignore bad-Prereq patches, and assume unreversed. -s --quiet --silent Work silently unless an error occurs. --verbose Output extra information about the work being done. --dry-run Do not actually change any files; just print what would happen. -d DIR --directory=DIR Change the working directory to DIR first. --binary Read and write data in binary mode (no effect on this platform). -v --version Output version info.Report bugs to .%s: Try `%s --help' for more information. Usage: %s [OPTION]... [ORIGFILE [PATCHFILE]] warning: the `-b %s' option is obsolete; use `-b -z %s' instead can't output patches to standard outputOffset changing from %ld to %ld Offset changing from %ld to %ld fatal internal error in abort_hunkOut-of-sync patch, lines %ld,%ld -- mangled text or line numbers, maybe?misordered hunks! output would be garbled @ P   @ T    @ X   \  ` d t p  x  ( | x    X   , d   <   ( h   D   b B c d D e E $f ,F 4g 8i @l Tn \N do lp tr R s s t T u v V x Y z Z   (bB:cd:D:eEfF:g:i:lnNo:p:r:RstTuvV:x:Y:z:Zcan't create file `%s'can't close `%s'renaming `%s' to `%s' can't rename `%s' to `%s'renaming `%s' to `%s' can't remove `%s'can't rename `%s' to `%s'removing `%s' can't remove `%s'can't create `%s'can't reopen `%s'./RCS/%s%sRCS/%s%s%sRCSSCCS/%s%s%s%sSCCS with lockGet file `%s' from %s%s? [y] with lockGetting file `%s' from %s%s... can't get file `%s' from %s%ss && sizeutil.c%s: **** out of memoryread errorwrite error%s: **** /dev/tty EOF tty read Skipping patch. Applying it anyway. Ignoring -R. Assuming -R. Ignore -R? [n] Assume -R? [n] Apply anyway? [n] Skipping patch. + %s Removed empty directory `%s'. fetchname %s %d /dev/nullfseek rcsdiff %sco -l %sco %s,v|diff - %sget -p get -e get s./dev/nullcreating empty unreadable file `%s' can't do dry run on nonexistent version-controlled file `%s'; invoke `%s' and try again.orig..~%d~neversimplenilexistingtnumberedversion control type " "$ ", "0 "< "@%s: invalidambiguous %s `%s' patch ".;Zx0NmE_n_yxE_nn_Ent:m:s_At:m_At_Ay/N/D$y-N-D$4ND$Y-N$RND$-R=N$-R$--N=D$N=DT--N$---D$DTY-d$4d$R=d$-d$dTy-W-XyWXy=W-r-W-Xr-W-XT-rWXrWXT-W=XW=XT-W-w-Xw-XT---X$XT4$Th:m:s$hms$h:m$hm$h$-m:s$-ms$-m$--s$YZ # # #$ #( #, #0 #8 #@ #D #L #T #\ #d #l #t #x # # # # # # # # # # # # # # # # # # # # $ $ $ $ $ $ $( $0 $8 $< $@ $H $P $T $\ $`hsthasthadtakstakdt pst pdt\mst\mdtcstcdtestedtastadtLnst.ndtjutcuctcututzgmtbst i0 != NONEpch.c, when reversed,deleteempty outcreatedoes not existis already emptyalready existsp_base <= file_pospch.c-------------------------- malformed patch at line %ld: %sp_end == -1pch.c******** unexpected end of file in patchp_end < hunkmaxpch.c********0,0PrematureOverdue pch.c%s %s %s the new style...)pch.cpch.c@@ -*** %ld,%ld **** --- %ld,%ld ---- unexpected end of file in patch*** %ld,%ld --- %ld,%ld %3ld %c %c p_Char[0] == '='pch.ctp_char[0] == '*'pch.ci == p_ptrn_lines + 1pch.c! inerrnopch.c- %s %s%swcan't open pipe to `%s'. w q %s FAILEDrcan't open `%s'}/bin/ed Ignoring the trailing garbage. done I can't seem to find a patch in there anywhere. Only garbage was found in the patch input.(Patch is indented %d space%s.) can't find file to patch at input line %ld Perhaps you should have used the -p or --strip option? Perhaps you used the wrong -p or --strip option? No file to patch. Skipping patch. missing header for unified diff at line %ld of patch missing header for context diff at line %ld of patch The next patch%s would %s the file `%s', which %s!The text leading up to this was: -------------------------- unterminated hunk starting at line %ld; giving up at line %ld: %sunexpected end of hunk at line %ldunexpected `***' at line %ld: %s%s `---' at line %ld; check line numbers at line %ldduplicate `---' at line %ld; check line numbers at line %ldno `---' found in patch at line %ldp_prefix_context != -1 && p_suffix_context != -1(Fascinating -- this is really a new-style context diff but withoutthe telltale extra asterisks on the *** line that usually indicatereplacement text or line numbers mangled in hunk at line %ldreplacement text or line numbers mangled in hunk at line %ldfillsrc %ld, filldst %ld, rb %ld, e+1 %ld fillsrc==p_end+1 || fillsrc==repl_beginningfilldst==p_end+1 || filldst==repl_beginningunexpected end of file in patch at line %ld`<' expected at line %ld of patchunexpected end of file in patch at line %ld`---' expected at line %ld of patchunexpected end of file in patch at line %ld`>' expected at line %ld of patchNot enough memory to swap next hunk! patch unexpectedly ends in middle of line ABpatching file `%s' abortedFile `%s' has too many lines.can't find file `%s'can't open file `%s'/dev/nullrcan't open file `%s'Patching file `%s' using Plan %s... Good. This file appears to be the %s version. Warning: this file doesn't appear to be the %s version -- patching anyway. This file doesn't appear to be the %s version -- aborting.This file doesn't appear to be the %s version -- patch anyway? [n] file `%s' seems to be locked by somebody else under %sComparing file `%s' to default %s version... warning: patching file `%s', which does not match default %s version `%s' is not a regular file -- can't patchPOSIXLY_CORRECT--%s: option `%s' is ambiguous %s: unrecognized option `--%s' %s: unrecognized option `%c%s' %s: illegal option -- %c %s: invalid option -- %c %s: option `--%s' doesn't allow an argument %s: option `%c%s' doesn't allow an argument %s: option `%s' requires an argument %s: option requires an argument -- %c %s: option `-W %s' is ambiguous %s: option `-W %s' doesn't allow an argument %s: option `%s' requires an argument %s: option requires an argument -- %c ?%s %s %s %s %s 2.5written by Larry Wall with lots o' patches by Paul EggertThis program comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of this program under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING.Copyright 1988 Larry Wall Copyright 1997 Free Software Foundation, Inc.P ; ;8, ;4P ;4\ ;4d ; =X h    : =` =x =| = " " " " " " = = = = = = = = " = #4x = = > > > > > NH NL NP NT NX '@ N` N N N N N N5P OL 2` OP Ot5P 5 5 Ox 7 7 7 7 @ 7(N,eerrno@chdir@ chmod@ close@ creat@ lseek@ mkdir@ open@ rename@ rmdir@ @ unlink@ @__divss2@__divus2@_iob@exit@ free@ malloc@ strlen@ fopen@ isatty@ realloc@ getenv@ write@ fflush@ fclose@ __flsbuf@ vfprintf@ sprintf@ printf@ fprintf@ fwrite@ __filbuf@ read@ strncmp@ isupper@ tolower@ signal@ (@ 6@ B@ perror@ isspace@ memchr@ raise@ fread@ atol@ ftell@ fseek@ stat@ fstat@ N@ gmtime@ system@ isalpha@ isalnum@ opendir@ readdir@ closedir@ geteuid@ memcmp@ mktemp@ pclose@ popen@ fdopen@ time@ __assert@ setbuf@ utime@ pathconf@ Z@ __crt0v@__dbargs 8__start :! __dbsubc : __dbsubg ; __dbsubn ;                                         $ ( , 0 4 8 < @ D H L P T X \ ` d h l p t             0 @ P ` p             0 @ P ` p    " " " " " " " $h $l $p $t $x $| $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ % % % %  % % % % %  %$ %( %, %0 %4 : : : : : : : ; ; ; ;  ; ;8 ;<K ;@ ;D ;HJ ;L ;P ;T  ;X ;\ ;`* ;d) ;h ;l, ;p+ ;t  ;x ;|  ; ;5 ; ; ; ;& ;< ;= ;> ; ; ; ; ;" ; ; ; ; ;  ; ;I ; ; ; ; ;  ; ;E ;0 ;  ; ; <% < <4 <  <9 < < <F <  <$. <( <, <0 <4 <8: <<' <@( BP ZBf~B [B BB:BBRf ˙  ^ ߙ  &B2^BBR:b~ Bz^8   "P.BFNT ^Bj@vB>^ - 0B$ .4 >J` jp zڏҏBBҏB [*2Bd nVvd ҏԏ ?bLh rJx N B   B 0 zT rv^^B ? 6B ?B ?B ?B ?.B@ ?NBd ?rB| 6 ?B P B  :!$ !4!| ! "*"4 ˙"P ˙"l ˙" 5" " ]" " #:#B#R#ZB#d ˙#nB#v#P# v# '8 z''z' ?'(($ ?(< ((B) ˙)<) ) * *ZB** z*B* + 6+( 6+P 6+d 6+ 6+ Й, ?,P ?,p , P,B, 6-8 ?-p ?- - P- 6- 6-. 6. 6.4 ˙.< .P .l .| 6. Й. Й/ ?/4 /X P/jB/ 6/ ?/ / P0 60, 60L Й0 ?0 0 61\ ?1 ?1 2 2X 2h P2 62 ?3 3b3h 3vB3 z3 3 j44&B44B5B55B6N6^B6l ˙6zB66B6 ˙7 B77f7 J7 7 8P 8\ 0:p4:;:;B;L9;p>;z;9;C;<H< CE9FHFMF(fF4 0FF {FFF GG( qGFGNGT Gp G GHH^HfHҏHHkHI8WI@ IX {IIJ:JVJJ KfKÙK 5K ݙLP Lp ]L L ]L L ]M M ]M 5N ݙNl ]N| 5N ݙN O ]O OP ]O` O ]O 5P ݙPl P ݙP ]P 5P ݙQ( Q< Q 5RR@ ЙRL XRf R "RS lS4 lSJS lTTTJTT%TjTx%T UUUҏUԏU ?UpUV/V$V0V~VҏVԏV ?VpV WҏW&ҏW,W8WҏWpWXXFҏXTpXdXz0XuX {X*XY YY( YYYYYY ZX*Zt/Z~ҏZZ Z[ [68[J:[Z[ҏ[p[8[*[<[:[[*\ >\@\Z@\\\<]L X]]]^"^J^r^^^_ _a Db Ic 5c NcP 5c Nc Sd*Ώd\)dd 0dΏe 5eڏe$ 5e` Xe eޏeÙe fH ]f` ftffggBgzЏgҏgԏg ?g ?gҏg ?gҏg ?h\ 5h Dh 5iiij jk kBkTÙkd 5kt 5k :k :lX lm m2mZmmmmn"nJnrnnnr rsD &sujvHv`w,wtxy z8zLz{B}} &~T(4      p "$ ,@      | H0 \  lH l 2Z &( *:,b.246D*HbRnTzҏ ЙVT 6 ˙ L  g ՙ<   ˙ 6TTfRjTr| RT ЙT(Ll  T D g gL gT 6TjRvT g ՙ g gLf t  gbT ՙ ˙p  Ù 5p 5RT( 6ZT` TT DFT  DFT 4 DJFX t D l l\ ll l\\ d DF T^ T2^X DjT`rTTT T ˙, DF^f^ DT TRTp 6T T6T@ ˙N^ D DTV0@   &8 Jz00&PH   d0 Vp | T@H ЙR@ @T@b.VZbrdf nRrTˆ XšT° XT X"R&TÆRü   ҏ .TBNL bbT| ĎĖĞҏĤľT   ҏ2ҏ@ vP ՙZT`ňŘ Ŭ bźT T  TzRƎ<ƞbƼ ЙVJf (J, ]6ҏ<L x ǂTLj Ǿ6  FX h ~Ɉ ɺT  %4 JJT bʀ ʸ g< ː  g( v8 ՙ̆TT&T͆R͊vT  Й*TJTP  DT6TϢTϺ   T D ЙNZTx DT$ ^Tfp тш 5ўTѴ Ҍ DҤ ʙҰҺT|ӆTӞTӺTTTT&fTԦTT&T4 NTd ՆTՌ ժհ 5 "T6ּTHRTjT׆TךTTTTJvz، jTzTپT .TT.TBL ۚTT>zT &T6TzTݎݜ TH bTގTޠ T 62TTTZT ЙT ˙^vTTT TT D* Й ЙT ( D>TvT TJTTTRTTTTT"TB\ ]h 5 T ] 5 fTT  6bl ~ TT nT TT:TL vT TTd T  T*T< TTBTfT~TT T.4JTTT>T\TNTj ] 5 TFTP ZT TT ^TT T   ]( 5>TT TT JTT T T` ˙jTҏT ?.TTTR"TBT ˙fx ˙^T ˙T <&T4 6VfT^^^^4 ˙>NTT ˙VT ˙F ˙TV":2>D ˙N<` ֙jx Vf bdV/ V ֙&8 ˙B<RVT  vRTTT T, :TP ^TnT.TTTJTl ЙvT ЙTT*TL ЙVT   T6TrTTT*TfTRXZ*`RhzjlnprBtz| |\ ˙:*:\D ˙R>b\l z\ ֙ |f, bL VLd J\ 5  g l ` l g \ 6 *~ J~ j~ t   ~    q (  ` g ~ g z~ v ՙ ~  q "n|vf X {4 h     ՙ,   X 8 \ 5( L t l l ~j|z  0 ˙D ˙| ~   ~ Z|l zbVf bdbf, Zbvf ddbf , ˙8 AT ˙zbf V  b@  "b2fJfd | ~^~d~  0 ՙ:~f"JrH  "2:T ˙2F N V!:!V!b!r!!!!!!""">"Z"b"z"#*#2#:#` #######$&$V$r$$$%%&"&0 D&X 5&' ҏ''0 ?':'D 5'f'v''''(ҏ(0 ?(>ҏ(N(t ?(~( 5((())"ҏ)2)L ?)V)` 5))) 5*R*v***ҏ** ?*ҏ*+ + ?+"+.+>+R++++ҏ+ ?,ҏ, ?,*,n,,,,,ҏ, ?,-&-6-J-Z-- D. 5..ҏ.. ?./ 5/&/v//ҏ/ ?// 500&0>0Nҏ0^0x ?00 500 51^1111111222*2:ҏ2P ?2^2223r33ԏ3*44*4h                                        $ ( , 0 4 8 < @ D H L P T X \ ` d h l p t             0 @ P ` p             0 @ P ` p    " " " " " " " $h; $l; $p; $t; $x; $|; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; $; %; %; %; % ; %; %; %; %; % ; %$; %(; %,; %0; %4; : : : : : : :  ; ;  ; ;  ; ;8 ;< ;@ ;D ;H ;L ;P ;T  ;X  ;\j ;`R ;dP ;h  ;lV ;pT ;t ;x* ;| ;= ;h ;U ;d ; ;J ;v ;x ;z ; ;7 ;" ;O ;B ;$ ; ;( ; ;> ; ; ;a ; ; ; ; ;& ; ;^ ; ; ; <H <4 <f < 6 <p < <4 < < C <$Z <(F <,I <0N <4S <8r <<L <@N ?@BDEFGIKM@N\OPRSMW [\ ](^pp  8 <LPy    dx    (Xh  !4#H%\'d+-/0245 80:<;D<H=\>l?(LX p  08`t "ssss8sP sl s| sssssttt t,t8!tD$tT%tX&th'tp(t)t*t+t,t-t/t0t1t4t7u8u:u$;upu|uuv,vvvww wXw w w w x(xTxhxtxxxxxy8yLyy y"y$z %z'z$*zH+z`,zzzz{ {@ {T {{{{{{|%|,|-}.}/}0}2}3}5}6~7%~L~h~p~~~1~~0Ld   0CPP P h   ,PtPd|  $DTtx  P  , 4@LX (4!T$%  04 !"&'(+-1 24(50649T:X=x>?BDI J<KPMTPxQ|TUWXWY\],^0aHbTcXeXgph|inoqtxz| pt(,L`d (@LdpxLPXd$4 @ L $8H h t   4X`lx   (HTp|4 @\!|"#%&'(+/ 2,386<9T;|<=>?@BCD(ETF\HpIxJKMN(,4DL l x \dl    $@Plx !"%&')*(,8/D1d6l7p8t9;<>?@BC F4GDHXK\MdPQTWX^_abcd e<fhgthjklmnpq$s(v4w@xP{\|}  ( D P X t             , < P T h l x          , ` l^            D T ` l t        4 D d        Hd,@Tt   (0@ ! #0$@%`(p*+-0432345678ht    #PX`lt  +L\4><LXdx| @8dt!"$%&(,)0+<,@.L/P1\2`4x5|78:;=>@ACDFGH(I,KHLLNdOhQtR|SUVXY[\^_abcefij m n,oDpHrHs\thuvxy{|~(@t G`pO ,Pt    p,Llp #$&() +_ H P X     !!!,!p!!!!!!u"0"@"\"x""""" ""#@#P#l#### # # ##$@$$%%@ %X% % % %%&0&H&d&h&&&&','8'L't' ' ' ''((L(T(|(((()) ) )$ )H)T)* **8*D *T*`*h*******+ + +@ +L +x ++++++,,$,,,0,<,X,`,p,x,,!,",#,$,%,',(-)- *-+-$,-@--H.-L/-X0-x2-4-5-7-8-9-:-;-<. =.<?.tB.xC.D.E.F.G/H/I/$J/4K/<L/DQ/PR/hT/xU/W/Y/Z/[/\/]/b/c0e0f0$g0(i0Tj0`k0ll0m0o0p0q0r0 0v1w1$x1,y18z1D{1d}1l~1p1|111112X2`2x2222233333h3333333 4 4$ 4D 4T 4d4t444444455 !5"5,#5<$5\&5d'5x*5-5051525455686;6 <60=6L>6\?6t@6A6C6D6E6F7G7H7$;7@K7HL7777778<8@8L8X8dlx  t $h@d  *,2t    $48P`l8 D!H"T$\%h&l()*-$183D4X5d7t8|9;<>?@A<BHCL/PF`GpH|J|KLMNOA0P \ h OT`hl   ,HL`  !4"H#Ld%p&`4@HPXlt "#$%()*-.(/<1H-34356P5`7x89:<=>@(ADBhCDEDFG<H@GIJLMNOQS$T(SXUtW|XY[\`abcde$f,g0iLjhmtn|opqrtuvwx w0y@zLy\{p|}~ DTdt$P\dx 4HLht<HPd|Hdxh@X l x ,P` !("4#X$%(+./1T3p4|.7897;@ AD4EHF`GxHKLMKO$Pp€˜¨$048<DHLÌÔ,4<@htĄļ0 P!X"|#Ř$Š&Ť)*+,-/02$3(4ƀƈƌƜ4 D d p ǀǔǠǬǸǼ,LȰ$8 D!h"p#ɘ$ɜɰ'ɴ)*-./012,3<5H7l9x:ʈ;<ː=˘;>8?@Ā̠$@͔ͨ͜͸   $0H\dhlpx|΀ΈΌ ΐ!Δ%ΰ'μ()*+,4.D/T0\1l2p3|4ϔ5Ϝ6Ϡ8ϸ9:;<?@A$CLDhE|FЌGIJ KLO,R8SPTXU\WxZр[Ѱ\]^`4a8`lb|cҀdҜeҬfghgij0k<jdltmxnӘoӜpӬqӸstvwxywz {$}8~<HPXdԘԤԴ@Lpx|Մ՘ՠը  4lpִָ֤,0Ddhxׄאט׬׼,4<@HHXd؄ؔ؜ؼ ,4Tٔ٠ٸ  (,8HT`xژڠڤ(@ۀی۔۬      ,L\d܄ܐܜܸ !#P$\"t%݌&'(*,-. 0/$4$5<6P8\;h<p=ތ>ި=?CDEFGH K0LXMtNߘOߤKߴTUVWZ[\]$^0_@``acdefghlp q(r<sTttuvutuwxz4{L|l}s,L8Ht$0DHTp,8LP\x0@dT\d (4X`x|$,h|(,4HXt(<\t     (Hdpt  !,"4#<d&t'x().01234,6P7l8p79:;<;=?$@0A<BLChD|EDFGIJKLM N,P4Q8MHSTThUVWXY[\]^(`4a8cDdXfghijHkTl\np\pqrtuwxz{}$~PH\ (DP\hx,<D 6 ? H @P\dt      $@LTdt<!L#\$%')*+/0 1@2L3X4\6h78:<=>ABCFGH$I4J@KLLP0`PhQ P$0 [x    (4@LXdl |!"#%&')*+-.@/X0l1|2-45678<9H;t<=>?=CD E(F8GDE`HxIJKLMH$OTP`QhRpS|TUVWXYZ j r4D zp   (8 dt  oo$o,o8 o ppppp4!pP#ph%pt'p(p*p,p-p/p0p1p2q3q 4q-q 6q89qD:qT;q`=ql?qxAqCqDqEqGqIqJqKq=rNrOr,Pr<TrHUrXVrdrtX 888888 8 9 99 9,9<9L9P9l99999 9!9" :(:4:@ :X :h :x: : :: ;@;H;T;\ ;h ;x;;;;;;<<(<@  >D>T>>> ?? ?t???@ @, @X @h @x@@@@@AA$APAhAxAAAAA A!A$A'A(A)A*B+B -B4.B@/BH0BP+Bp2B3B4B7B8B9B;B<B=B>C9CBC$EC0GC@HCPJChLCpNCOCQCRCSCTCWCYC[C\D]D^D$`D0aD8bDHcDLfD\hD`iDlkD|lDmDnDp DD E@EL EE EEFFF$F0F< (FFFFGGGG< G@Gl G G GG 6GHH AHdHtHHH JHIII0IHIdIpI|I VIIJJ8JLJT Jd Jp JJJJJJJKKK dK|KKKKKKLL L4 L@ LHLXLLM$M8MLM`MtM M!M"N#N($N4'N@)N`*Nt+N,N-N.N1N2N3O84O|6O8O9O:P;P,<P8?PDAPdBPtCPDPEPFPGQHQ IQ0LQ8OQDPQPQ QQ RRHRXRdRtRxR| R R RRSS S,SHSXSh Sp S SSSSSSSTTTd T!T"T%T&T T*T+T.U0U1U 2U(5U46U@8UP9 UUUUUVV V V, V8 VVVVW$W4W@ WWWW X<XDX`XlXx XXXXXXXXYY`YY Y!Y"Y#YZH%ZT&Zd'Zp)Z|*Z+Z,Z-Z/Z1 [,[4[|[[ [ [[[[[[[\\\\L\T\X\\ \"\#\%\&\'\,]- ]H]X]d]h]t -33 N0X [ 0HPd t |  9: 0<DP!x#&*,-.<*X2h3l7|;=>?; C (! LI lJ tK       ! !T!`!!!!!!!!" """('"L("X)"p*"x/"0"/#(1#89#t;#=#>#?#@#A#C#I#M$N$O$ U$TW$dX$lY$Z$`$a%s%t%0u%|y%z%{%|%%%&&D&t&|&&&&&&&&&&''8'd't'''''''''((<(|(((((()) )T)))))***(*0*@*p****+ +,+<+H+P+l++++++, ,$ ,0,8,X,`,d,h,l,,!,",#,%,(,+,,--- /-0- 5-H:-:-?-@.B.4E.<F.DG.LH.PJ.\M.dN.lO.pR.x?.T.V.W.Y/$Z/4[/<]/H_/P`/`d/pe/h/i/m/n/p/q0s0t0<w0Lx0{0|0111 101D1L1\1h1p11111111112222(282X2d2t222222 3 3Derrnochdir chmod close creat lseek mkdir open rename rmdir  unlink __divss2.__divss2__divus2.__divus2_iobexit free malloc strlen fopen isatty realloc getenv write fflush fclose __flsbuf vfprintf sprintf printf fprintf fwrite __filbuf read strncmp isupper tolower signal & 2 < perror isspace memchr raise fread atol ftell fseek stat fstat F gmtime system isalpha isalnum opendir readdir closedir geteuid memcmp mktemp pclose popen fdopen time __assert setbuf utime pathconf P __crt0vTOC ;k[ ;8k__crt0v ;<k_$STATIC ;@kp ;DkP ;Hkerrno ;Lk_$STATIC ;Pkmkdir ;Tk_$STATIC ;Xkz ;\k& ;`ksignal ;dk ;hk< ;lk2 ;pk ;tkstrlen ;xkrmdir ;|k ;kstat ;korigprae ;korigbase ;k ;kstrncmp ;kopendir ;kreaddir ;kclosedir ;k_$STATIC ;k_$STATIC ;k_iob ;k ;kfprintf ;kexit ;k ;kmalloc ;k ;ksprintf ;k_$STATIC ;kpathconf ;kdebug ;kunlink ;kcreat ;kclose ;krename ;kfree ;ktime ;kraise ;kopen ;kbuf ;kbufsize ;kread <kwrite <kfseek <kfflush < ksystem <k <kdry_run <k__assert <k < kisspace <$kset_time <(kset_utc <,k_$STATIC <0k <4kisalpha <8kisupper <<ktolower <@k_$STATIC hlp:40@.ef$eLJ@ k3+.bfPe.ef ej< kX34%.bfLecname:p7X.efpedw k4 >8T.bfeXname:p7hKl.efe[$ k04(GZ.bf<eUoptc:-1@.ef0e.cleanupT k|6Os.bf`e.efe kX6_.bfewi:34@DHLPTstars:7X`.ef e ( k7u.bf He  value:-1@p:7Dsign:-1H.bb d v10:-1Tdigit:-1X .\ @`.eb!d.ef!e" k8 P.bf"0e _hr:4@tmpdir:7D.ef#e#( k8H l.bf#@eKh.ef$e.similar$, k8 } .bf$@ea:p7xalen:p53|b:p7blen:p53.ef&e'  k9 #.bf',ebase:p34 pline:34@iline:34D Hsize:53Lp:7P.ef(e( k9b %|.bf(emK @fp:14Ds:7Hsize:53L.ef*|e* k9!'\.bf*eK!!old:34@!-Dnew:34H!;L!JPTfp:14X.ef30eB3P k0<![0.bf3he$fuzz:p34!m@!~D HLPT!\!`!d!h!l!p!t.ef7\eo7 k="4@.bf7eJname:p7hfd:-1@f:14D.ef8eO8, l="4.bf8<esig:p-1X.ef8xe 5Pk_$STATIC k .bs"-"?"N"^"l"~"".es >k8.bs"8"""" #Argv:V68Argc:V-1# # #3$#P(#i,#~0#4.esbufsize =#buf =buf:G4 NH# =# =# NL## NP#- NT$ outfile NX$inname N$) >$58 N$Mdry_run =$^reverse > $kforce >force:G8 =x$yinstat Nt$ =$set_time =$set_utc =$inerrno N$ "$revision N$origprae =|$B OL% =%batch >batch:G8debug =%%origbase =%1invc Ninvc:G-1z :  .file gpch.c%?:t29=-10:t22=-1:t17=-7:t15=-3:t9=-8:t7=-4:t4=-5:t1=-11M:t5=k-5:t6=*5%X%l%%%%%%%%&&&)&9&L&^&p((*(8(D(P(:t37=*-5((())!)3)E)W)i)u:t48=k37:t49=*48:t50=k-1:t51=*50))))))*x:t60=*59******:t67=*37:t68=*30*****+ ++#+/+;+G+S+_+kf+w++++:t94=f6;+++++,,,,,,9,F,T,b,p,},,,,,,-<I- --'-4-A-N-[-h-u----:t269=ZPke.skip_toP k>-.bfle--i:60@o:60Dc:-1H.efe6 kP>-.bfe-X-\.ef0eFT kd>..bfhe.efeQ k4>.h.bfe.efe_ k>*.%.bfe fp:60@c:-1D.;H.efep kP?>2.N.bfe.ef<ezX k?PA.].bfte.m.zfp:60@c:-1Di:-1Hb:37Ls:30P.efe k`@O. .bfep..count:-1@.H.f:37.efe< khA`. .bfTename:p49.i:39@/H/T/&X/8dlen:54h/Nt.efe kA/[T.bfes:37@t:37D/rH/~L/P/T/X/\/`/d0 hi:39lname:40pst:4100/0G.bbdcoldc:-5.ebdh.bbtdn0S.ebdw.bbLdti:24x.eb d.bbPd0bp0st.ebd.bbdi0:39.bbd nope:39L.bbdcs:6P0T0X0\.ebd/.ebd/.bbdB000.ebdW.ebdW.ef8eg\ G0# .bfpe.efe XG00#.bf$eT.efXe[t Gf1 $$.bfÌec1 1.@st:28H.bbdp1;.bb@dz1I.ebŠd.ebŤd.ef@eh H,1X'.bfƀe ofp:p60t:37@1lD1H1L1P.bs 1.es.bbHd?ifp:60Tc:-1X.eb@dI.efXeI| PI|1-,.bf̄e1h.ef̨e PI1-|.bfeline:p38h.efe XI2-.bf$e1h.efHet *I 62.$.bf͔e2/rev:p-1s:37@2>D1H.bb0d.;2K2_2l2y2222223 3383Q3j.ebd.bbd.;p2lt2yxch:-5|.ebd%.bbd%3}Qi:-1Tmin:38Xmax:38\.;`.ebDd.bbhdi:38L3P.ebd.efXe,| HV ?3X,.bfeline:p38h.efe.pfetch HV H3Xt.bfeline:p38h.efe6  V P3X.bf e.ef|eN XX [3]T.bfeline:p38hfile:p60l3@.ef@e^d X| j3^.bfxe(4 @4D4"Hi:38Ln:38P4/Ts:37X.efeh @ZJ r4>c.bfe.ef e|0 <Z\ z4Wc.bf4e.efLel <Zn 4ld.bfpe.efe @Z 4dX.bfe.efe <Z 4d.bfe.efe$ <Z 4d.bf(e.ef@e` 8Z 4e.bfde.ef|e.pch_end @Z 4eH.bfe.efe5k8_$STATIC '@k .bs 4445.es N`kd.bs 55%535@ 5N5Z5i5v5 5$5(5,5054586<6@6!D62H6DP6[Xpfp:V60`.es.file gquotearg.c6t:t4=-5:t1=-106:t3=f2;:t5=*-5:t6=k-5:t7=*6:t19=Zoko Z 6.bfoe&6xarg:p7|a:7@len:2D.bbo,d-c:-5H.ebrtd}.efre}.file gutil.c6:t28=-10:t20=-4:t16=-7:t14=-3:t10=-1:t7=-8:t3=-5:t1=-11:t4=k-5:t5=*4:t6=*-56667 77*7;7M7[&7i777779k9|:t32=f5;:t33=k27:t34=*33:t35=*69:t37=*27:t38=f6;:t39=f6;9\9999999:::t53=*52::-:9:n:;=:t60=*59*:t62=*61;P;;;< >>)>6>C>Q>^>k>y>>>,>>>>>>I- >??? ?--[?;?I?V?c?q???????@ @@$@1@>@K@X@e@y:t303=Z8k%8 k[ @.bf8e1 xf:6@@D@H.bb9dslash:6L.eb9d.ef9e.: k\ @.bf:(e1 hf:6@flim:6D.ef:e8: T\ @<.bf:e.ef;eE;( p\ @.bf;@eAi:-1@A HAX.bb;dA-h.eb<@d .efe^>8 ] AT.bf>Dep:p6hAils:5@.ef>em? P] Ayh.bf?e.ef?4ey?P ]  A.bf?teRfrom:p5to:p6mode:p9 A$to_st:27@A.bb?dVAA.bb@d[p:5b:5o:5plen:29tlen:29blen:29osize:29.ebAdp.bbAdxfd:-1.ebBd.ebC$d.bbChdA.ebD\d.efDeD T_  A H.bfDe.efEeE4 H_  B .bfE@e.efE`eE| X_  B .bfEe!.efEe(E _ ( B1 <.bfEe/sig:p-1hs:65@.efFPe5Fx \` 6 BI .bfFefrom:p5hto:p5lmode:p9ptofd:-1@BZDi:29H.efGe.FseekG x`h A Bf<.bfGe5BshBlBp.efH0e7HL ` J B.bfHde;Bh.efHe?H ` V B@.bfHefile:p5hBlmode:p9pfd:-1@.efIeI ` d B(.bfIe| xcs:p5|BBCC.efK0eKT 8aR C#.bfK|e HBLC;PCJTCWXcstat:27@CeCrCCCCCCCtrybuf:6r:5.bbMd;p:6.ebN4dB.bbN@dDp:6.ebNdL.bbOdSp:6.ebP8dZ.bbPDd\p:6.ebQ0dg.efQdel.savestrQ pb C.bfQes:p5h.efQe.savebufQ b Cd.bfRes:p5hsize:p29lrv:6@.efReR b D8.bfReat:p6xD|D(name:6@t:6DD5Hstamp:23L.efUde#.pfatalU c DC.bfUe DQxD]|Dl@args:43D.efVPe.fatalVl d Dx.bfVeDQhD]largs:43@.efWXe.sayWt d@ say:F-11.bfWe%DQhD]largs:43@.efWe).askX d^ ask:F-11p.bfX<e;DQxD]|r:-1@args:43D.bs D.es.bbXdUs:29H.ebZdk.efZek Z @e D"`.bf[,exDQD]r:-1@.bb[|d}args:43X.eb[d.ef]e.xmalloc]8 le  D$.bf]He)size:p29hp:6@.ef]e-_$STATIC k.bs sigs:V84(D@DLDXD^DdEpExGET:V92E'E8.es =`k.bs EGEZEq.es.file <gversion.cE:t9=-1:t3=-5:t1=-11:t4=k-5EEEE:t10=*4E:t27=Z3kh.version3 he 5 +E.bf3e.ef3e_$STATIC 7(k.bs 5FFTF1@.es.file hggetopt1.cFG:t3=-5:t1=-1:t2=f-1;:t4=*-5:t5=*4:t6=*-1F_:t8=*7:t9=f-1;F:t25=Zk6 f [ LF.bf0e[argc:p-1hargv:p5lFpFtFx.efhe\H |f h LF.bfeKargc:p-1hargv:p5lFpFtFx.efeL.file ggetopt.cG :t21=-4:t20=-3:t5=-11:t4=-1:t1=-5:t2=*-5:t3=f2;Y:t7=*2:t8=f2;:t9=f-1;:t10=*-1G":t12=*11GlGxGG:t17=f2;GSGGHH:t55=Zk`U kf& H.bf0eargc:p-1hargv:p7lHp.efei( kxf H.bf0e5argv:p7xH@HDtop:-1Htem:2L.bbdZlen:-1Xi:-1\.ebldk.bbldklen:-1Pi:-1T.eb Ld}.ef es  kg" H.bf estr:p2hchr:p-1l.ef!e}!( gR I.bf!Te argc:p-1argv:p7HII)I7.bb%|dIGhp:12lISpexact:-1tambig:-1xI_|Im.eb+Pd.bb+Pdc:-5@temp:2D.bb,Xd IGHp:12LISPexact:-1Tambig:-1XI_\Im`.eb1pd.eb2d.ef2e.getopt3 hl8 I.bf3 eargc:p-1hargv:p7lHp.ef3Te_$STATIC 5k Oxk.bs IIII I.esoptind 5 Ioptarg 7I[ 7Iopterr 7Joptopt 7 J$dbxxx.s  g4P$4\ 4d dbxxx 8k,__dbargs 8 __dbsubc : __dbsubg ; __dbsubn ;  strcpy.s  g.strcpyj)strcmp.s  g.strcmp0)moveeq.s ( g.bcopy_).ovbcopy_ ._moveeq_ .memcpy_ .memmove_ glink.s - gk( )glink.s 2 g.exitik(.exiti .glink.s 7 g.strlen^k(.strlen^ 3glink.s < glk(l 8glink.s A g.fprintfik(.fprintfi =glink.s F g.strncmpfk(.strncmpf Bglink.s K g.opendirfk(.opendirf Gglink.s P g.readdirgk(.readdirg Lglink.s U gg@k(g@ Qglink.s Z g.mallocik(.malloci Vglink.s _ g.sprintfkk(.sprintfk [glink.s d g.fopenxk(.fopenx `glink.s i gk( eglink.s n g.isspacerk(.isspacer jglink.s s g.writenpk(.writenp oglink.s x g.fclosek(.fclose tglink.s } g.openn k(.openn  yglink.s g.readnHk(.readnH ~glink.s g.closemXk(.closemX glink.s g.freemk(.freem glink.s g.memchr k(.memchr  glink.s g.memcmpHk(.memcmpH glink.s g.stat^k(.stat^ glink.s g.geteuidpk(.geteuidp glink.s g.lseekk(.lseek glink.s g.gmtimek(.gmtime glink.s gk( glink.s g.isalphak(.isalpha glink.s g.isupperk(.isupper glink.s g.tolower0k(.tolower0 glink.s g.isalnumXk(.isalnumX glink.s g.setbufk(.setbuf glink.s g.getenv(k(.getenv( glink.s grk(r glink.s g.utimek(.utime glink.s g.chmodk(.chmod glink.s g.chdir3pk(.chdir3p glink.s g.unlinkmk(.unlinkm glink.s g.mktemp4k(.mktemp4 glink.s g`k(` glink.s g.fwritek(.fwrite glink.s g.fdopen4(k(.fdopen4( glink.s g.ftellk(.ftell glink.s g.reallock(.reallocglink.s g.atol(k(.atol(glink.s g.fstatPk(.fstatP glink.s g.freadk(.freadglink.s g.fflushnk(.fflushnglink.s g.fseeknk(.fseeknglink.s" g.popenk(.popenglink.s' g.pclose@k(.pclose@#glink.s, g.printfk(.printf(glink.s1 g.perror8k(.perror8-glink.s6 g.mkdir]k(.mkdir]2glink.s; g]k(]7glink.s@ g.signal]k(.signal]<glink.sE g ^ k( ^ Aglink.sJ g ^Hk( ^HFglink.sO g ^pk( ^pKglink.sT g.rmdir^k(.rmdir^Pglink.sY g.creatm0k(.creatm0Uglink.s^ g.renamemk(.renamemZglink.sc g.timemk(.timem_glink.sh g.raisemk(.raisemdglink.sm g.systemnk(.systemniglink.sr g &k( &nglink.s g.isattyk(.isattys 0sigprocmask_system_configurationsigemptysetsigaddsetsigactionlocaltime__mod_init__C_runtime_pstartupcrt0_datafatal_exit_$STATIC_BSSverbosityprogram_namesimple_backup_suffixbackup_typepatch_getusing_plan_aposixly_correctnoreverseskip_rest_of_patchstrippathTMPOUTNAMETMPINNAMETMPPATNAMEdiff_typecanonicalizeinput_lines__getopt_initializedcrt0main.s../../../../../../../src/bos/usr/ccs/lib/libc/__threads_init.cTue Aug 18 09:04:53 1998 C Set ++ for AIX Compiler Version 4.1.0.0 --- .__threads_init_pthread_init_routine_bsd_init_routine_xti_tli_init_routine_nsl_init_routine__dce_compat_init_routineMon Jan 24 09:16:14 2000 IBM C and C++ Compilers Version 3.6.6.0 --- .invalid_arg.argmatchMon Jan 24 09:16:15 2000 .version_number.max_backup_version.get_version.find_backup_file_name.base_name.too_many_lines.report_revision.scan_input.re_input.get_input_fileMon Jan 24 09:16:16 2000 .maketime.month_days.str2timeMon Jan 24 09:16:17 2000 .undefine.merge_partime.parse_ranged.parse_prefix.parse_pattern_letter.parse_fixed.parse_decimal.reinitialize_almost_everything.init_reject.init_output.get_some_switches.abort_hunk.numeric_string.make_temp.spew_output.patch_match.copy_till.apply_hunk.locate_hunk.create_output_file.fatal_exitMon Jan 24 09:16:18 2000 .next_intuit_at.malformed.grow_hunkmax.incomplete_line.get_line.pget_line.prefix_components.best_name.intuit_diff_type.set_hunkmax.re_patch.open_patch_file.do_ed_script.pch_timestamp.pch_line_len.pch_says_nonexistent.another_hunk.pch_char.there_is_another_patch.pch_write_line.pch_swap.pch_suffix_context.pch_repl_lines.pch_ptrn_lines.pch_prefix_context.pch_newfirst.pch_hunk_beg.pch_firstMon Jan 24 09:16:19 2000 .quote_system_argMon Jan 24 09:16:20 2000 .replace_slashes.makedirs.write_fatal.set_signals.removedirs.remove_prefix.read_fatal.move_file.memory_fatal.init_time.ignore_signals.exit_with_signal.copy_file.systemic.create_file.version_get.version_controller.fetchname.ok_to_reverseMon Jan 24 09:16:21 2000 .getopt_long_only.getopt_long._getopt_initialize.exchange.my_index._getopt_internal.__dbsubc.__dbsubg.__dbsubn.__mod_init.pathconf.closedir.__filbuf.localtime.__assert.__flsbuf.sigemptyset.sigaction.sigaddset.sigprocmask.vfprintf kkn(A_8_8_8,,./usr/local/man/A ko(A_8_8_8,,./usr/local/man/man12./A k^yg(tw_8w_8_8,,t./usr/local/man/man1/patch.1DME/.\" patch man page .de Id .ds Dt \\$4 .. .Id $Id: patch.man,v 1.23 1997/07/16 12:26:36 eggert Exp $ .ds = \-\^\- .de Sp .if t .sp .3 .if n .sp .. .TH PATCH 1 \*(Dt GNU .ta 3n .SH NAME patch \- apply a diff file to an original .SH SYNOPSIS .B patch .RI [ options ] .RI [ originalfile .RI [ patchfile ]] .Sp but usually just .Sp .BI "patch \-p" "num" .BI < patchfile .SH DESCRIPTION .B patch takes a patch file .I patchfile containing a difference listing produced by the .B diff program and applies those differences to one or more original files, producing patched versions. Normally the patched versions are put in place of the originals. Backups can be made; see the .B \-b or .B \*=backup option. The names of the files to be patched are usually taken from the patch file, but if there's just one file to be patched it can specified on the command line as .IR originalfile . .PP Upon startup, patch attempts to determine the type of the diff listing, unless overruled by a \fB\-c\fP (\fB\*=context\fP), \fB\-e\fP (\fB\*=ed\fP), \fB\-n\fP (\fB\*=normal\fP), or \fB\-u\fP (\fB\*=unified\fP) option. Context diffs (old-style, new-style, and unified) and normal diffs are applied by the .B patch program itself, while .B ed diffs are simply fed to the .BR ed (1) editor via a pipe. .PP .B patch tries to skip any leading garbage, apply the diff, and then skip any trailing garbage. Thus you could feed an article or message containing a diff listing to .BR patch , and it should work. If the entire diff is indented by a consistent amount, or if a context diff is encapsulated one or more times by prepending "\fB\- \fP" to lines starting with "\fB\-\fP" as specified by Internet RFC 934, this is taken into account. .PP With context diffs, and to a lesser extent with normal diffs, .B patch can detect when the line numbers mentioned in the patch are incorrect, and attempts to find the correct place to apply each hunk of the patch. As a first guess, it takes the line number mentioned for the hunk, plus or minus any offset used in applying the previous hunk. If that is not the correct place, .B patch scans both forwards and backwards for a set of lines matching the context given in the hunk. First .B patch looks for a place where all lines of the context match. If no such place is found, and it's a context diff, and the maximum fuzz factor is set to 1 or more, then another scan takes place ignoring the first and last line of context. If that fails, and the maximum fuzz factor is set to 2 or more, the first two and last two lines of context are ignored, and another scan is made. (The default maximum fuzz factor is 2.) If .B patch cannot find a place to install that hunk of the patch, it puts the hunk out to a reject file, which normally is the name of the output file plus a .B \&.rej suffix, or .B # if .B \&.rej would generate a file name that is too long (if even appending the single character .B # makes the file name too long, then .B # replaces the file name's last character). (The rejected hunk comes out in ordinary context diff form regardless of the input patch's form. If the input was a normal diff, many of the contexts are simply null.) The line numbers on the hunks in the reject file may be different than in the patch file: they reflect the approximate location patch thinks the failed hunks belong in the new file rather than the old one. .PP As each hunk is completed, you are told if the hunk failed, and if so which line (in the new file) .B patch thought the hunk should go on. If the hunk is installed at a different line from the line number specified in the diff you are told the offset. A single large offset .I may indicate that a hunk was installed in the wrong place. You are also told if a fuzz factor was used to make the match, in which case you should also be slightly suspicious. If the .B \*=verbose option is given, you are also told about hunks that match exactly. .PP If no original file .I origfile is specified on the command line, .B patch tries to figure out from the leading garbage what the name of the file to edit is, using the following rules. .TP 3 .B " \(bu" If the header is that of a context diff, .B patch takes the old and new file names in the header. Any .B /dev/null names are ignored. .TP .B " \(bu" If there is an .B Index:\& line in the leading garbage and if either the old and new names are both absent or the .B POSIXLY_CORRECT environment variable is set, .B patch takes the name in the .B Index:\& line. .TP .B " \(bu" For the purpose of the following rules, the names are considered to be in the order (old, new, index), regardless of the order that they appear in the header. .TP .B " \(bu" If some of the named files exist, .B patch uses the first name if the .B POSIXLY_CORRECT environment variable is set, and the best name otherwise. .TP .B " \(bu" If .B patch is not ignoring \s-1RCS\s0 and \s-1SCCS\s0 (see the .BI "\-g\ " num or .BI \*=get= num option), and no named files exist but an \s-1RCS\s0 or \s-1SCCS\s0 master is found, .B patch uses the first named file with an \s-1RCS\s0 or \s-1SCCS\s0 master. .TP .B " \(bu" If no named files exist, no \s-1RCS\s0 or \s-1SCCS\s0 master was found, some names are given, .B POSIXLY_CORRECT is not set, and the patch appears to create a file, .B patch uses the best name requiring the creation of the fewest directories. .TP .B " \(bu" If no file name results from the above heuristics, you are asked for the name of the file to patch. .LP To determine the .I best of a nonempty list of file names, .B patch first takes all the names with the fewest path name components; of those, it then takes all the names with the shortest basename; of those, it then takes all the shortest names; finally, it takes the first remaining name. .PP Additionally, if the leading garbage contains a .B Prereq:\& line, .B patch takes the first word from the prerequisites line (normally a version number) and checks the original file to see if that word can be found. If not, .B patch asks for confirmation before proceeding. .PP The upshot of all this is that you should be able to say, while in a news interface, something like the following: .Sp \fB| patch \-d /usr/src/local/blurfl\fP .Sp and patch a file in the .B blurfl directory directly from the article containing the patch. .PP If the patch file contains more than one patch, .B patch tries to apply each of them as if they came from separate patch files. This means, among other things, that it is assumed that the name of the file to patch must be determined for each diff listing, and that the garbage before each diff listing contains interesting things such as file names and revision level, as mentioned previously. .SH OPTIONS .TP 3 \fB\-b\fP or \fB\*=backup\fP Make backup files. That is, when patching a file, rename or copy the original instead of removing it. When backing up a file that does not exist, an empty, unreadable backup file is created as a placeholder to represent the nonexistent file. See the .B \-V or .B \*=version\-control option for details about how backup file names are determined. .TP .B \*=backup\-if\-mismatch Back up a file if the patch does not match the file exactly and if backups are not otherwise requested. This is the default unless the .B POSIXLY_CORRECT environment variable is set. .TP .B \*=no\-backup\-if\-mismatch Do not back up a file if the patch does not match the file exactly and if backups are not otherwise requested. This is the default if the .B POSIXLY_CORRECT environment variable is set. .TP \fB\-B\fP \fIpref\fP or \fB\*=prefix=\fP\fIpref\fP Prefix .I pref to a file name when generating its simple backup file name. For example, with .B "\-B\ /junk/" the simple backup file name for .B src/patch/util.c is .BR /junk/src/patch/util.c . .TP \fB\*=binary\fP Read and write all files in binary mode, except for standard output and .BR /dev/tty . This option has no effect on \s-1POSIX\s0-compliant systems. On systems like \s-1DOS\s0 where this option makes a difference, the patch should be generated by .BR "diff\ \-a\ \*=binary" . .TP \fB\-c\fP or \fB\*=context\fP Interpret the patch file as a ordinary context diff. .TP \fB\-d\fP \fIdir\fP or \fB\*=directory=\fP\fIdir\fP Change to the directory .I dir immediately, before doing anything else. .TP \fB\-D\fP \fIdefine\fP or \fB\*=ifdef=\fP\fIdefine\fP Use the .BR #ifdef " .\|.\|. " #endif construct to mark changes, with .I define as the differentiating symbol. .TP .B "\*=dry\-run" Print the results of applying the patches without actually changing any files. .TP \fB\-e\fP or \fB\*=ed\fP Interpret the patch file as an .B ed script. .TP \fB\-E\fP or \fB\*=remove\-empty\-files\fP Remove output files that are empty after the patches have been applied. Normally this option is unnecessary, since .B patch can examine the time stamps on the header to determine whether a file should exist after patching. However, if the input is not a context diff or if the .B POSIXLY_CORRECT environment variable is set, .B patch does not remove empty patched files unless this option is given. When .B patch removes a file, it also attempts to remove any empty ancestor directories. .TP \fB\-f\fP or \fB\*=force\fP Assume that the user knows exactly what he or she is doing, and do not ask any questions. Skip patches whose headers do not say which file is to be patched; patch files even though they have the wrong version for the .B Prereq:\& line in the patch; and assume that patches are not reversed even if they look like they are. This option does not suppress commentary; use .B \-s for that. .TP \fB\-F\fP \fInum\fP or \fB\*=fuzz=\fP\fInum\fP Set the maximum fuzz factor. This option only applies to diffs that have context, and causes .B patch to ignore up to that many lines in looking for places to install a hunk. Note that a larger fuzz factor increases the odds of a faulty patch. The default fuzz factor is 2, and it may not be set to more than the number of lines of context in the context diff, ordinarily 3. .TP \fB\-g\fP \fInum\fP or \fB\*=get=\fP\fInum\fP This option controls .BR patch 's actions when a file is under \s-1RCS\s0 or \s-1SCCS\s0 control, and does not exist or is read-only and matches the default version. If .I num is positive, .B patch gets (or checks out) the file from the revision control system; if zero, .B patch ignores \s-1RCS\s0 and \s-1SCCS\s0 and does not get the file; and if negative, .B patch asks the user whether to get the file. The default value of this option is given by the value of the .B PATCH_GET environment variable if it is set; if not, the default value is zero if .B POSIXLY_CORRECT is set, negative otherwise. .TP .B "\*=help" Print a summary of options and exit. .TP \fB\-i\fP \fIpatchfile\fP or \fB\*=input=\fP\fIpatchfile\fP Read the patch from .IR patchfile . If .I patchfile is .BR \- , read from standard input, the default. .TP \fB\-l\fP or \fB\*=ignore\-whitespace\fP Match patterns loosely, in case tabs or spaces have been munged in your files. Any sequence of one or more blanks in the patch file matches any sequence in the original file, and sequences of blanks at the ends of lines are ignored. Normal characters must still match exactly. Each line of the context must still match a line in the original file. .TP \fB\-n\fP or \fB\*=normal\fP Interpret the patch file as a normal diff. .TP \fB\-N\fP or \fB\*=forward\fP Ignore patches that seem to be reversed or already applied. See also .BR \-R . .TP \fB\-o\fP \fIoutfile\fP or \fB\*=output=\fP\fIoutfile\fP Send output to .I outfile instead of patching files in place. .TP \fB\-p\fP\fInum\fP or \fB\*=strip\fP\fB=\fP\fInum\fP Strip the smallest prefix containing .I num leading slashes from each file name found in the patch file. A sequence of one or more adjacent slashes is counted as a single slash. This controls how file names found in the patch file are treated, in case you keep your files in a different directory than the person who sent out the patch. For example, supposing the file name in the patch file was .Sp \fB/u/howard/src/blurfl/blurfl.c\fP .Sp setting .B \-p0 gives the entire file name unmodified, .B \-p1 gives .Sp \fBu/howard/src/blurfl/blurfl.c\fP .Sp without the leading slash, .B \-p4 gives .Sp \fBblurfl/blurfl.c\fP .Sp and not specifying .B \-p at all just gives you \fBblurfl.c\fP. Whatever you end up with is looked for either in the current directory, or the directory specified by the .B \-d option. .TP \fB\-r\fP \fIrejectfile\fP or \fB\*=reject\-file=\fP\fIrejectfile\fP Put rejects into .I rejectfile instead of the default .B \&.rej file. .TP \fB\-R\fP or \fB\*=reverse\fP Assume that this patch was created with the old and new files swapped. (Yes, I'm afraid that does happen occasionally, human nature being what it is.) .B patch attempts to swap each hunk around before applying it. Rejects come out in the swapped format. The .B \-R option does not work with .B ed diff scripts because there is too little information to reconstruct the reverse operation. .Sp If the first hunk of a patch fails, .B patch reverses the hunk to see if it can be applied that way. If it can, you are asked if you want to have the .B \-R option set. If it can't, the patch continues to be applied normally. (Note: this method cannot detect a reversed patch if it is a normal diff and if the first command is an append (i.e. it should have been a delete) since appends always succeed, due to the fact that a null context matches anywhere. Luckily, most patches add or change lines rather than delete them, so most reversed normal diffs begin with a delete, which fails, triggering the heuristic.) .TP \fB\-s\fP or \fB\*=silent\fP or \fB\*=quiet\fP Work silently, unless an error occurs. .TP \fB\-t\fP or \fB\*=batch\fP Suppress questions like .BR \-f , but make some different assumptions: skip patches whose headers do not contain file names (the same as \fB\-f\fP); skip patches for which the file has the wrong version for the .B Prereq:\& line in the patch; and assume that patches are reversed if they look like they are. .TP \fB\-T\fP or \fB\*=set\-time\fP Set the modification and access times of patched files from time stamps given in context diff headers, assuming that the context diff headers use local time. This option is not recommended, because patches using local time cannot easily be used by people in other time zones, and because local time stamps are ambiguous when local clocks move backwards during daylight-saving time adjustments. Instead of using this option, generate patches with \s-1UTC\s0 and use the .B \-Z or .B \*=set\-utc option instead. .TP \fB\-u\fP or \fB\*=unified\fP Interpret the patch file as a unified context diff. .TP \fB\-v\fP or \fB\*=version\fP Print out .BR patch 's revision header and patch level, and exit. .TP \fB\-V\fP \fImethod\fP or \fB\*=version\-control=\fP\fImethod\fP Use .I method to determine backup file names. The method can also be given by the .B PATCH_VERSION_CONTROL (or, if that's not set, the .BR VERSION_CONTROL ) environment variable, which is overridden by this option. The method does not affect whether backup files are made; it affects only the names of any backup files that are made. .Sp The value of .I method is like the \s-1GNU\s0 Emacs `version-control' variable; .B patch also recognizes synonyms that are more descriptive. The valid values for .I method are (unique abbreviations are accepted): .RS .TP 3 \fBexisting\fP or \fBnil\fP Make numbered backups of files that already have them, otherwise simple backups. This is the default. .TP \fBnumbered\fP or \fBt\fP Make numbered backups. The numbered backup file name for .I F is .IB F .~ N ~ where .I N is the version number. .TP \fBsimple\fP or \fBnever\fP Make simple backups. The .B \-B or .BR \*=prefix , .B \-Y or .BR \*=basename\-prefix , and .B \-z or .BR \*=suffix options specify the simple backup file name. If none of these options are given, then a simple backup suffix is used; it is the value of the .B SIMPLE_BACKUP_SUFFIX environment variable if set, and is .B \&.orig otherwise. .PP With numbered or simple backups, if the backup file name is too long, the backup suffix .B ~ is used instead; if even appending .B ~ would make the name too long, then .B ~ replaces the last character of the file name. .RE .TP \fB\*=verbose\fP Output extra information about the work being done. .TP \fB\-x\fP \fInum\fP or \fB\*=debug=\fP\fInum\fP Set internal debugging flags of interest only to .B patch patchers. .TP \fB\-Y\fP \fIpref\fP or \fB\*=basename\-prefix=\fP\fIpref\fP Prefix .I pref to the basename of a file name when generating its simple backup file name. For example, with .B "\-Y\ .del/" the simple backup file name for .B src/patch/util.c is .BR src/patch/.del/util.c . .TP \fB\-z\fP \fIsuffix\fP or \fB\*=suffix=\fP\fIsuffix\fP Use .I suffix as the simple backup suffix. For example, with .B "\-z\ -" the simple backup file name for .B src/patch/util.c is .BR src/patch/util.c- . The backup suffix may also be specified by the .B SIMPLE_BACKUP_SUFFIX environment variable, which is overridden by this option. .TP \fB\-Z\fP or \fB\*=set\-utc\fP Set the modification and access times of patched files from time stamps given in context diff headers, assuming that the context diff headers use Coordinated Universal Time (\s-1UTC\s0, often known as \s-1GMT\s0). Also see the .B \-T or .B \*=set\-time option. .Sp The .B \-Z or .B \*=set\-utc and .B \-T or .B \*=set\-time options normally refrain from setting a file's time if the file's original time does not match the time given in the patch header, or if its contents do not match the patch exactly. However, if the .B \-f or .B \*=force option is given, the file time is set regardless. .Sp Due to the limitations of .B diff output format, these options cannot update the times of files whose contents have not changed. Also, if you use these options, you should remove (e.g. with .BR "make\ clean" ) all files that depend on the patched files, so that later invocations of .B make do not get confused by the patched files' times. .SH ENVIRONMENT .TP 3 \fBPATCH_GET\fP This specifies whether .B patch gets missing or read-only files from \s-1RCS\s0 or \s-1SCCS\s0 by default; see the .B \-g or .B \*=get option. .TP .B POSIXLY_CORRECT If set, .B patch conforms more strictly to the \s-1POSIX\s0 standard: it takes the first existing file from the list (old, new, index) when intuiting file names from diff headers, it does not remove files that are empty after patching, it does not ask whether to get files from \s-1RCS\s0 or \s-1SCCS\s0, it requires that all options precede the files in the command line, and it does not backup files when there is a mismatch. .TP .B SIMPLE_BACKUP_SUFFIX Extension to use for simple backup file names instead of .BR \&.orig . .TP \fBTMPDIR\fP, \fBTMP\fP, \fBTEMP\fP Directory to put temporary files in; .B patch uses the first environment variable in this list that is set. If none are set, the default is system-dependent; it is normally .B /tmp on Unix hosts. .TP \fBVERSION_CONTROL\fP or \fBPATCH_VERSION_CONTROL\fP Selects version control style; see the .B \-v or .B \*=version\-control option. .SH FILES .TP 3 .IB $TMPDIR "/p\(**" temporary files .TP .B /dev/tty controlling terminal; used to get answers to questions asked of the user .SH "SEE ALSO" .BR diff (1), .BR ed (1) .Sp Marshall T. Rose and Einar A. Stefferud, Proposed Standard for Message Encapsulation, Internet RFC 934 (1985-01). .SH "NOTES FOR PATCH SENDERS" There are several things you should bear in mind if you are going to be sending out patches. .PP Create your patch systematically. A good method is the command .BI "diff\ \-Naur\ " "old\ new" where .I old and .I new identify the old and new directories. The names .I old and .I new should not contain any slashes. The .B diff command's headers should have dates and times in Universal Time using traditional Unix format, so that patch recipients can use the .B \-Z or .B \*=set\-utc option. Here is an example command, using Bourne shell syntax: .Sp \fBLC_ALL=C TZ=UTC0 diff \-Naur gcc\-2.7 gcc\-2.8\fP .PP Tell your recipients how to apply the patch by telling them which directory to .B cd to, and which .B patch options to use. The option string .B "\-Np1" is recommended. Test your procedure by pretending to be a recipient and applying your patch to a copy of the original files. .PP You can save people a lot of grief by keeping a .B patchlevel.h file which is patched to increment the patch level as the first diff in the patch file you send out. If you put a .B Prereq:\& line in with the patch, it won't let them apply patches out of order without some warning. .PP You can create a file by sending out a diff that compares .B /dev/null or an empty file dated the Epoch (1970-01-01 00:00:00 \s-1UTC\s0) to the file you want to create. This only works if the file you want to create doesn't exist already in the target directory. Conversely, you can remove a file by sending out a context diff that compares the file to be deleted with an empty file dated the Epoch. The file will be removed unless the .B POSIXLY_CORRECT environment variable is set and the .B \-E or .B \*=remove\-empty\-files option is not given. An easy way to generate patches that create and remove files is to use \s-1GNU\s0 .BR diff 's .B \-N or .B \*=new\-file option. .PP If the recipient is supposed to use the .BI \-p N option, do not send output that looks like this: .Sp .ft B .ne 3 diff \-Naur v2.0.29/prog/README prog/README .br \-\^\-\^\- v2.0.29/prog/README Mon Mar 10 15:13:12 1997 .br +\^+\^+ prog/README Mon Mar 17 14:58:22 1997 .ft .Sp because the two file names have different numbers of slashes, and different versions of .B patch interpret the file names differently. To avoid confusion, send output that looks like this instead: .Sp .ft B .ne 3 diff \-Naur v2.0.29/prog/README v2.0.30/prog/README .br \-\^\-\^\- v2.0.29/prog/README Mon Mar 10 15:13:12 1997 .br +\^+\^+ v2.0.30/prog/README Mon Mar 17 14:58:22 1997 .ft .Sp .PP Avoid sending patches that compare backup file names like .BR README.orig , since this might confuse .B patch into patching a backup file instead of the real file. Instead, send patches that compare the same base file names in different directories, e.g.\& .B old/README and .BR new/README . .PP Take care not to send out reversed patches, since it makes people wonder whether they already applied the patch. .PP Try not to have your patch modify derived files (e.g. the file .B configure where there is a line .B "configure: configure.in" in your makefile), since the recipient should be able to regenerate the derived files anyway. If you must send diffs of derived files, generate the diffs using \s-1UTC\s0, have the recipients apply the patch with the .B \-Z or .B \*=set\-utc option, and have them remove any unpatched files that depend on patched files (e.g. with .BR "make\ clean" ). .PP While you may be able to get away with putting 582 diff listings into one file, it may be wiser to group related patches into separate files in case something goes haywire. .SH DIAGNOSTICS Diagnostics generally indicate that .B patch couldn't parse your patch file. .PP If the .B \*=verbose option is given, the message .B Hmm.\|.\|.\& indicates that there is unprocessed text in the patch file and that .B patch is attempting to intuit whether there is a patch in that text and, if so, what kind of patch it is. .PP .BR patch 's exit status is 0 if all hunks are applied successfully, 1 if some hunks cannot be applied, and 2 if there is more serious trouble. When applying a set of patches in a loop it behooves you to check this exit status so you don't apply a later patch to a partially patched file. .SH CAVEATS Context diffs cannot reliably represent the creation or deletion of empty files, empty directories, or special files such as symbolic links. Nor can they represent changes to file metadata like ownership, permissions, or whether one file is a hard link to another. If changes like these are also required, separate instructions (e.g. a shell script) to accomplish them should accompany the patch. .PP .B patch cannot tell if the line numbers are off in an .B ed script, and can detect bad line numbers in a normal diff only when it finds a change or deletion. A context diff using fuzz factor 3 may have the same problem. Until a suitable interactive interface is added, you should probably do a context diff in these cases to see if the changes made sense. Of course, compiling without errors is a pretty good indication that the patch worked, but not always. .PP .B patch usually produces the correct results, even when it has to do a lot of guessing. However, the results are guaranteed to be correct only when the patch is applied to exactly the same version of the file that the patch was generated from. .SH "COMPATIBILITY ISSUES" The \s-1POSIX\s0 standard specifies behavior that differs from .BR patch 's traditional behavior. You should be aware of these differences if you must interoperate with .B patch versions 2.1 and earlier, which are not \s-1POSIX\s0-compliant. .TP 3 .B " \(bu" In traditional .BR patch , the .B \-p option's operand was optional, and a bare .B \-p was equivalent to .BR \-p0. The .B \-p option now requires an operand, and .B "\-p\ 0" is now equivalent to .BR \-p0 . For maximum compatibility, use options like .B \-p0 and .BR \-p1 . .Sp Also, traditional .B patch simply counted slashes when stripping path prefixes; .B patch now counts pathname components. That is, a sequence of one or more adjacent slashes now counts as a single slash. For maximum portability, avoid sending patches containing .B // in file names. .TP .B " \(bu" In traditional .BR patch , backups were enabled by default. This behavior is now enabled with the .B \-b or .B \*=backup option. .Sp Conversely, in \s-1POSIX\s0 .BR patch , backups are never made, even when there is a mismatch. In \s-1GNU\s0 .BR patch , this behavior is enabled with the .B \*=no\-backup\-if\-mismatch option or by setting the .B POSIXLY_CORRECT environment variable. .Sp The .BI \-b "\ suffix" option of traditional .B patch is equivalent to the .BI "\-b\ \-z" "\ suffix" options of \s-1GNU\s0 .BR patch . .TP .B " \(bu" Traditional .B patch used a complicated (and incompletely documented) method to intuit the name of the file to be patched from the patch header. This method was not \s-1POSIX\s0-compliant, and had a few gotchas. Now .B patch uses a different, equally complicated (but better documented) method that is optionally \s-1POSIX\s0-compliant; we hope it has fewer gotchas. The two methods are compatible if the file names in the context diff header and the .B Index:\& line are all identical after prefix-stripping. Your patch is normally compatible if each header's file names all contain the same number of slashes. .TP .B " \(bu" When traditional .B patch asked the user a question, it sent the question to standard error and looked for an answer from the first file in the following list that was a terminal: standard error, standard output, .BR /dev/tty , and standard input. Now .B patch sends questions to standard output and gets answers from .BR /dev/tty . Defaults for some answers have been changed so that .B patch never goes into an infinite loop when using default answers. .TP .B " \(bu" Traditional .B patch exited with a status value that counted the number of bad hunks, or with status 1 if there was real trouble. Now .B patch exits with status 1 if some hunks failed, or with 2 if there was real trouble. .TP .B " \(bu" Limit yourself to the following options when sending instructions meant to be executed by anyone running \s-1GNU\s0 .BR patch , traditional .BR patch , or a \s-1POSIX\s0-compliant .BR patch . Spaces are significant in the following list, and operands are required. .Sp .nf .in +3 .ne 11 .B \-c .BI \-d " dir" .BI \-D " define" .B \-e .B \-l .B \-n .B \-N .BI \-o " outfile" .BI \-p num .B \-R .BI \-r " rejectfile" .in .fi .SH BUGS .B patch could be smarter about partial matches, excessively deviant offsets and swapped code, but that would take an extra pass. .PP If code has been duplicated (for instance with \fB#ifdef OLDCODE\fP .\|.\|. \fB#else .\|.\|. #endif\fP), .B patch is incapable of patching both versions, and, if it works at all, will likely patch the wrong one, and tell you that it succeeded to boot. .PP If you apply a patch you've already applied, .B patch thinks it is a reversed patch, and offers to un-apply the patch. This could be construed as a feature. .SH COPYING Copyright .if t \(co 1984, 1985, 1986, 1988 Larry Wall. .br Copyright .if t \(co 1997 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. .PP Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. .PP Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the copyright holders instead of in the original English. .SH AUTHORS Larry Wall wrote the original version of .BR patch . Paul Eggert removed .BR patch 's arbitrary limits; added support for binary files, setting file times, and deleting files; and made it conform better to \s-1POSIX\s0. Other contributors include Wayne Davison, who added unidiff support, and David MacKenzie, who added configuration and backup support. ntaini k4p(A_8_8_8,,./usr/lppl/man//A kq(A_8_8_8,,./usr/lpp/gnu.patch/pat/A k2r( _8_8_8,, ./usr/lpp/gnu.patch/liblpp.aDME/ 2504 0 68 696 0 298 472 0 948723594 0 0 644 16 gnu.patch.rte.al` ./usr ./usr/local ./usr/local/lib ./usr/local/lib/patch-2.5 ./usr/local/lib/patch-2.5/COPYING ./usr/local/lib/patch-2.5/ChangeLog ./usr/local/lib/patch-2.5/NEWS ./usr/local/lib/patch-2.5/README ./usr/local/bin ./usr/local/bin/patch ./usr/local/man ./usr/local/man/man1 ./usr/local/man/man1/patch.1 107 696 68 948723594 0 0 644 23 gnu.patch.rte.copyright` This software is convered under the GNU Public License. See /usr/local/lib/patch-2.5/COPYING for details. 1691 2504 472 948723594 0 0 644 23 gnu.patch.rte.inventory` /usr: class=apply,inventory,gnu.patch.rte owner=root group=system mode=755 type=DIRECTORY /usr/local: class=apply,inventory,gnu.patch.rte owner=root group=system mode=755 type=DIRECTORY /usr/local/lib: class=apply,inventory,gnu.patch.rte owner=root group=system mode=755 type=DIRECTORY /usr/local/lib/patch-2.5: class=apply,inventory,gnu.patch.rte owner=root group=system mode=755 type=DIRECTORY /usr/local/lib/patch-2.5/COPYING: class=apply,inventory,gnu.patch.rte owner=root group=system mode=444 type=FILE size=18007 checksum=45435 18 /usr/local/lib/patch-2.5/ChangeLog: class=apply,inventory,gnu.patch.rte owner=root group=system mode=644 type=FILE size=VOLATILE checksum=VOLATILE /usr/local/lib/patch-2.5/NEWS: class=apply,inventory,gnu.patch.rte owner=root group=system mode=444 type=FILE size=7498 checksum=28244 8 /usr/local/lib/patch-2.5/README: class=apply,inventory,gnu.patch.rte owner=root group=system mode=444 type=FILE size=2385 checksum=07524 3 /usr/local/bin: class=apply,inventory,gnu.patch.rte owner=root group=system mode=755 type=DIRECTORY /usr/local/bin/patch: class=apply,inventory,gnu.patch.rte owner=root group=staff mode=755 type=FILE size=VOLATILE checksum=VOLATILE /usr/local/man: class=apply,inventory,gnu.patch.rte owner=root group=system mode=755 type=DIRECTORY /usr/local/man/man1: class=apply,inventory,gnu.patch.rte owner=root group=system mode=755 type=DIRECTORY /usr/local/man/man1/patch.1: class=apply,inventory,gnu.patch.rte owner=root group=staff mode=644 type=FILE size=VOLATILE checksum=VOLATILE 113 0 696 0 0 0 0 0 ` 3 68 472 696 gnu.patch.rte.algnu.patch.rte.copyrightgnu.patch.rte.inventoryendsk e(E _ ( B1 <.bfEe/sig:p-1hs:65@.efFPe5Fx \` 6 BI .bfFefrom:p5hto:p5lmode:p9ptofd:-1@BZDi:29H.efGe.FseekG x`h A Bf<.bfGe5BshBlBp.efH0e7HL ` J B.bfHde;Bh.efHe?H ` V B@.bfHefile:p5hBlmode:p9pfd:-1@.efIeI ` d B(.bfIe| xcs:p5|BBCC.efK0eKT 8aR C#.bfK|e HBLC;PCJTCWXcstat:27@CeCrCCC