diff options
Diffstat (limited to 'coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src')
26 files changed, 60650 insertions, 0 deletions
diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/ABOUT-NLS b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/ABOUT-NLS new file mode 100644 index 0000000..8ffb467 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/ABOUT-NLS @@ -0,0 +1,716 @@ +Notes on the Free Translation Project +************************************* + +Free software is going international! The Free Translation Project is +a way to get maintainers of free software, translators, and users all +together, so that will gradually become able to speak many languages. +A few packages already provide translations for their messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work at translations should contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +Quick configuration advice +========================== + +If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias, message inheritance, automatic +charset conversion or plural form handling) as the implementation here. +It is also not possible to offer this additional functionality on top +of a `catgets' implementation. Future versions of GNU `gettext' will +very likely convey even more functionality. So it might be a good idea +to change to GNU `gettext' as soon as possible. + + So you need _not_ provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +INSTALL Matters +=============== + +Some packages are "localizable" when properly installed; the programs +they contain can be made to speak your own native language. Most such +packages use GNU `gettext'. Other packages have their own ways to +internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU `gettext' functions. If not, the GNU `gettext' own +library will be used. This library is wholly contained within this +package, usually in the `intl/' subdirectory, so prior installation of +the GNU `gettext' package is _not_ required. Installers may use +special options at configuration time for changing the default +behaviour. The commands: + + ./configure --with-included-gettext + ./configure --disable-nls + +will respectively bypass any pre-existing `gettext' to use the +internationalizing routines provided within this package, or else, +_totally_ disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might be not what is desirable. You +should use the more recent version of the GNU `gettext' library. I.e. +if the file `intl/VERSION' shows that the library which comes with this +package is more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + The configuration process will not test for the `catgets' function +and therefore it will not be used. The reason is that even an +emulation of `gettext' on top of `catgets' could not provide all the +extensions of the GNU `gettext' library. + + Internationalized packages have usually many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +Using This Package +================== + +As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, +and `CC' is an ISO 3166 two-letter country code. For example, let's +suppose that you speak German and live in Germany. At the shell +prompt, merely execute `setenv LANG de_DE' (in `csh'), +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). +This can be done from your `.login' or `.profile' file, once and for +all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of `LL_CC', with `LL' denoting the +language and `CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of +locales supported by your system for your country by running the command +`locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' +for the purpose of message handling, but you still need to have `LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather +read translations in German than English for when Swedish is not +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + + In the `LANGUAGE' environment variable, but not in the `LANG' +environment variable, `LL_CC' combinations can be abbreviated as `LL' +to denote the language's main dialect. For example, `de' is equivalent +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' +(Portuguese as spoken in Portugal) in this context. + +Translating Teams +================= + +For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" +area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +_actively_ in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skill are praised more than +programming skill, here. + +Available Packages +================== + +Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of December +2003. The matrix shows, in regard of each package, for which languages +PO files have been submitted to translation coordination, with a +translation percentage of at least 50%. + + Ready PO files am az be bg ca cs da de el en en_GB eo es + +-------------------------------------------+ + a2ps | [] [] [] [] | + aegis | () | + ant-phone | () | + anubis | | + ap-utils | | + bash | [] [] [] [] | + batchelor | | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] | + bluez-pin | [] [] | + clisp | | + clisp | [] [] [] | + coreutils | [] [] [] [] | + cpio | [] [] [] | + darkstat | [] () [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] | + error | [] [] [] [] [] | + fetchmail | [] () [] [] [] [] | + fileutils | [] [] [] | + findutils | [] [] [] [] [] [] [] | + flex | [] [] [] [] | + fslint | | + gas | [] | + gawk | [] [] [] [] | + gbiff | [] | + gcal | [] | + gcc | [] [] | + gettext | [] [] [] [] [] | + gettext-examples | [] [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] [] | + gimp-print | [] [] [] [] [] | + gliv | | + glunarclock | [] [] | + gnubiff | [] | + gnucash | [] () [] [] | + gnucash-glossary | [] () [] | + gnupg | [] () [] [] [] [] | + gpe-aerial | [] | + gpe-beam | [] [] | + gpe-calendar | [] [] | + gpe-clock | [] [] | + gpe-conf | [] [] | + gpe-contacts | [] [] | + gpe-edit | [] | + gpe-go | [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] | + gpe-sketchbook | [] [] | + gpe-su | [] [] | + gpe-taskmanager | [] [] | + gpe-timesheet | [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | [] [] [] [] | + gprof | [] [] [] | + gpsdrive | () () () | + gramadoir | [] | + grep | [] [] [] [] [] [] | + gretl | [] | + gtick | () | + hello | [] [] [] [] [] [] | + id-utils | [] [] | + indent | [] [] [] [] | + jpilot | [] [] [] | + jtag | | + jwhois | [] | + kbd | [] [] [] [] [] | + latrine | () | + ld | [] [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] [] | + libiconv | [] [] [] [] [] | + lifelines | [] () | + lilypond | [] | + lingoteach | | + lingoteach_lessons | () () | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | [] [] | + make | [] [] [] | + man-db | [] () [] [] () | + minicom | [] [] [] | + mysecretdiary | [] [] [] | + nano | [] () [] [] [] | + nano_1_0 | [] () [] [] [] | + opcodes | [] | + parted | [] [] [] [] [] | + ptx | [] [] [] [] [] | + python | | + radius | [] | + recode | [] [] [] [] [] [] [] | + rpm | [] [] | + screem | | + scrollkeeper | [] [] [] [] [] [] | + sed | [] [] [] [] [] | + sh-utils | [] [] [] | + shared-mime-info | | + sharutils | [] [] [] [] [] [] | + silky | () | + skencil | [] () [] | + sketch | [] () [] | + soundtracker | [] [] [] | + sp | [] | + tar | [] [] [] [] | + texinfo | [] [] [] | + textutils | [] [] [] [] | + tin | () () | + tuxpaint | [] [] [] [] [] [] [] | + util-linux | [] [] [] [] [] | + vorbis-tools | [] [] [] [] | + wastesedge | () | + wdiff | [] [] [] [] | + wget | [] [] [] [] [] [] | + xchat | [] [] [] [] | + xfree86_xkb_xml | [] | + xpad | [] | + +-------------------------------------------+ + am az be bg ca cs da de el en en_GB eo es + 0 0 8 3 37 38 56 73 15 1 5 12 64 + + et fa fi fr ga gl he hr hu id is it ja + +----------------------------------------+ + a2ps | [] [] [] () | + aegis | | + ant-phone | | + anubis | [] | + ap-utils | [] | + bash | [] [] | + batchelor | [] | + bfd | [] | + binutils | [] [] | + bison | [] [] [] [] | + bluez-pin | [] [] [] [] [] | + clisp | | + clisp | [] | + coreutils | [] [] [] [] [] [] | + cpio | [] [] [] | + darkstat | () [] [] [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | | + enscript | [] [] | + error | [] [] [] [] | + fetchmail | [] | + fileutils | [] [] [] [] [] [] | + findutils | [] [] [] [] [] [] [] [] [] [] | + flex | [] [] | + fslint | | + gas | [] | + gawk | [] [] [] | + gbiff | | + gcal | [] | + gcc | [] | + gettext | [] [] | + gettext-examples | [] [] | + gettext-runtime | [] [] [] [] | + gettext-tools | [] [] | + gimp-print | [] [] | + gliv | () | + glunarclock | [] [] [] [] | + gnubiff | | + gnucash | () [] | + gnucash-glossary | [] | + gnupg | [] [] [] [] [] [] [] | + gpe-aerial | [] | + gpe-beam | [] | + gpe-calendar | [] [] [] | + gpe-clock | [] | + gpe-conf | [] | + gpe-contacts | [] [] | + gpe-edit | [] [] | + gpe-go | [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] [] | + gpe-sketchbook | [] | + gpe-su | [] | + gpe-taskmanager | [] | + gpe-timesheet | [] [] [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | [] [] [] | + gprof | [] [] | + gpsdrive | () [] () () | + gramadoir | [] | + grep | [] [] [] [] [] [] [] [] [] [] [] | + gretl | [] | + gtick | [] [] | + hello | [] [] [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] [] | + indent | [] [] [] [] [] [] [] [] [] | + jpilot | [] () | + jtag | | + jwhois | [] [] [] [] | + kbd | [] | + latrine | | + ld | [] | + libc | [] [] [] [] [] | + libgpewidget | [] [] [] [] | + libiconv | [] [] [] [] [] [] [] [] [] | + lifelines | () | + lilypond | [] | + lingoteach | [] [] | + lingoteach_lessons | | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | | + make | [] [] [] [] [] | + man-db | () () | + minicom | [] [] [] [] | + mysecretdiary | [] [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] | + opcodes | [] | + parted | [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + radius | [] | + recode | [] [] [] [] [] [] | + rpm | | + screem | | + scrollkeeper | [] | + sed | [] [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] [] [] [] [] | + shared-mime-info | [] | + sharutils | [] [] [] [] [] | + silky | [] () | + skencil | [] | + sketch | [] | + soundtracker | [] [] [] [] | + sp | [] () | + tar | [] [] [] [] [] [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] [] [] [] | + tin | [] () | + tuxpaint | [] [] [] [] [] [] [] [] | + util-linux | [] [] [] [] () [] | + vorbis-tools | [] | + wastesedge | () | + wdiff | [] [] [] [] [] [] | + wget | [] [] [] [] [] [] [] | + xchat | [] [] [] | + xfree86_xkb_xml | | + xpad | [] | + +----------------------------------------+ + et fa fi fr ga gl he hr hu id is it ja + 21 1 25 86 24 24 8 10 38 31 1 23 32 + + ko lg lt lv ms nb nl nn no pl pt pt_BR ro + +-------------------------------------------+ + a2ps | () [] [] () () [] [] | + aegis | () () | + ant-phone | [] [] | + anubis | [] [] [] [] [] | + ap-utils | [] () [] | + bash | [] [] | + batchelor | [] | + bfd | [] | + binutils | | + bison | [] [] [] [] | + bluez-pin | [] [] [] | + clisp | | + clisp | [] | + coreutils | [] | + cpio | [] [] [] [] [] | + darkstat | [] [] [] [] | + diffutils | [] [] [] [] | + e2fsprogs | [] | + enscript | [] [] [] | + error | [] [] [] | + fetchmail | [] [] () | + fileutils | [] [] | + findutils | [] [] [] [] [] | + flex | [] [] [] [] | + fslint | [] [] | + gas | | + gawk | [] [] [] | + gbiff | [] [] | + gcal | | + gcc | | + gettext | [] [] [] | + gettext-examples | [] [] | + gettext-runtime | [] [] [] | + gettext-tools | [] [] [] | + gimp-print | [] | + gliv | [] [] [] | + glunarclock | [] [] [] | + gnubiff | | + gnucash | [] [] () | + gnucash-glossary | [] [] | + gnupg | [] | + gpe-aerial | [] [] [] | + gpe-beam | [] [] [] | + gpe-calendar | [] [] [] | + gpe-clock | [] [] [] | + gpe-conf | [] [] [] | + gpe-contacts | [] [] [] | + gpe-edit | [] [] [] | + gpe-go | [] [] | + gpe-login | [] [] [] | + gpe-ownerinfo | [] [] [] | + gpe-sketchbook | [] [] [] | + gpe-su | [] [] [] | + gpe-taskmanager | [] [] [] | + gpe-timesheet | [] [] [] | + gpe-today | [] [] [] | + gpe-todo | [] [] [] | + gphoto2 | [] | + gprof | [] [] | + gpsdrive | () () () [] | + gramadoir | [] | + grep | [] [] [] [] | + gretl | | + gtick | [] [] | + hello | [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] | + indent | [] [] [] | + jpilot | () () | + jtag | | + jwhois | [] [] [] [] | + kbd | [] [] [] | + latrine | [] | + ld | | + libc | [] [] [] [] [] | + libgpewidget | [] [] [] | + libiconv | [] [] [] [] | + lifelines | | + lilypond | | + lingoteach | | + lingoteach_lessons | | + lynx | [] [] | + m4 | [] [] [] [] | + mailutils | [] [] | + make | [] [] [] [] | + man-db | [] | + minicom | [] [] [] | + mysecretdiary | [] [] [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] [] | + opcodes | [] [] | + parted | [] [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + radius | [] | + recode | [] [] [] | + rpm | [] [] | + screem | | + scrollkeeper | [] [] [] [] | + sed | [] [] [] | + sh-utils | [] | + shared-mime-info | [] | + sharutils | [] | + silky | | + skencil | [] [] | + sketch | [] [] | + soundtracker | | + sp | | + tar | [] [] [] [] [] [] | + texinfo | [] [] [] | + textutils | [] [] | + tin | | + tuxpaint | [] [] [] [] [] [] [] [] [] | + util-linux | [] [] | + vorbis-tools | [] [] | + wastesedge | | + wdiff | [] [] [] [] | + wget | [] [] | + xchat | [] [] | + xfree86_xkb_xml | [] | + xpad | [] [] | + +-------------------------------------------+ + ko lg lt lv ms nb nl nn no pl pt pt_BR ro + 12 0 1 2 12 10 60 4 4 38 25 35 76 + + ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW + +-------------------------------------------+ + a2ps | [] [] [] [] [] | 16 + aegis | () | 0 + ant-phone | | 2 + anubis | [] [] [] | 9 + ap-utils | () | 3 + bash | [] | 9 + batchelor | | 2 + bfd | [] [] | 6 + binutils | [] [] [] | 7 + bison | [] [] [] | 14 + bluez-pin | [] [] [] | 13 + clisp | | 0 + clisp | | 5 + coreutils | [] [] [] [] [] | 16 + cpio | [] [] [] | 14 + darkstat | [] [] [] () () | 12 + diffutils | [] [] [] [] | 22 + e2fsprogs | [] [] | 5 + enscript | [] [] [] | 12 + error | [] [] [] | 15 + fetchmail | [] [] [] | 11 + fileutils | [] [] [] [] [] [] | 17 + findutils | [] [] [] [] [] [] [] | 29 + flex | [] [] [] | 13 + fslint | | 2 + gas | [] | 3 + gawk | [] [] | 12 + gbiff | | 3 + gcal | [] [] | 4 + gcc | [] | 4 + gettext | [] [] [] [] [] [] | 16 + gettext-examples | [] [] [] [] | 11 + gettext-runtime | [] [] [] [] [] [] [] [] [] | 21 + gettext-tools | [] [] [] [] [] [] | 14 + gimp-print | [] [] | 10 + gliv | | 3 + glunarclock | [] [] [] [] | 13 + gnubiff | | 1 + gnucash | [] [] [] | 9 + gnucash-glossary | [] [] [] | 8 + gnupg | [] [] [] [] | 17 + gpe-aerial | [] [] | 7 + gpe-beam | [] [] | 8 + gpe-calendar | [] [] [] [] [] | 13 + gpe-clock | [] [] [] [] | 10 + gpe-conf | [] [] [] | 9 + gpe-contacts | [] [] [] [] | 11 + gpe-edit | [] [] [] [] [] [] | 12 + gpe-go | [] | 5 + gpe-login | [] [] [] [] [] [] | 13 + gpe-ownerinfo | [] [] [] [] [] | 13 + gpe-sketchbook | [] [] [] | 9 + gpe-su | [] [] [] [] | 10 + gpe-taskmanager | [] [] [] [] | 10 + gpe-timesheet | [] [] [] [] [] | 12 + gpe-today | [] [] [] [] [] [] | 13 + gpe-todo | [] [] [] [] [] | 12 + gphoto2 | [] [] [] | 11 + gprof | [] [] | 9 + gpsdrive | [] [] | 4 + gramadoir | | 3 + grep | [] [] [] [] [] | 26 + gretl | | 2 + gtick | [] | 5 + hello | [] [] [] [] [] | 33 + id-utils | [] [] [] | 12 + indent | [] [] [] [] [] | 21 + jpilot | [] [] [] [] [] | 9 + jtag | [] | 1 + jwhois | () () [] [] | 11 + kbd | [] [] | 11 + latrine | | 1 + ld | [] [] | 5 + libc | [] [] [] [] | 20 + libgpewidget | [] [] [] [] | 13 + libiconv | [] [] [] [] [] [] [] [] [] | 27 + lifelines | [] | 2 + lilypond | [] | 3 + lingoteach | | 2 + lingoteach_lessons | () | 0 + lynx | [] [] [] [] | 14 + m4 | [] [] [] | 15 + mailutils | [] | 5 + make | [] [] [] [] | 16 + man-db | [] | 5 + minicom | [] | 11 + mysecretdiary | [] [] | 10 + nano | [] [] [] [] [] | 17 + nano_1_0 | [] [] [] [] | 17 + opcodes | [] [] | 6 + parted | [] [] [] | 15 + ptx | [] [] [] | 22 + python | | 0 + radius | [] | 4 + recode | [] [] [] [] | 20 + rpm | [] [] [] | 7 + screem | [] [] | 2 + scrollkeeper | [] [] [] [] | 15 + sed | [] [] [] [] [] [] | 23 + sh-utils | [] [] [] | 14 + shared-mime-info | [] [] | 4 + sharutils | [] [] [] [] [] | 17 + silky | () | 2 + skencil | [] | 6 + sketch | [] | 6 + soundtracker | [] [] | 9 + sp | [] | 3 + tar | [] [] [] [] [] | 24 + texinfo | [] [] [] [] | 14 + textutils | [] [] [] [] [] | 16 + tin | | 1 + tuxpaint | [] [] [] [] [] | 29 + util-linux | [] [] [] | 15 + vorbis-tools | [] | 8 + wastesedge | | 0 + wdiff | [] [] [] [] | 18 + wget | [] [] [] [] [] [] [] [] | 23 + xchat | [] [] [] [] [] | 14 + xfree86_xkb_xml | [] [] [] [] [] [] | 8 + xpad | | 4 + +-------------------------------------------+ + 51 teams ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW + 120 domains 59 42 16 25 81 0 56 12 1 10 21 22 1260 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If December 2003 seems to be old, you may fetch a more recent copy +of this `ABOUT-NLS' file on most GNU archive sites. The most +up-to-date matrix with full percentage details can be found at +`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. + +Using `gettext' in new packages +=============================== + +If you are writing a freely available program and want to +internationalize it you are welcome to use GNU `gettext' in your +package. Of course you have to respect the GNU Library General Public +License which covers the use of the GNU `gettext' library. This means +in particular that even non-free programs can use `libintl' as a shared +library, whereas only free software can use `libintl' as a static +library or use modified versions of `libintl'. + + Once the sources are changed appropriately and the setup can handle +the use of `gettext' the only thing missing are the translations. The +Free Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +`translation@iro.umontreal.ca' to make the `.pot' files available to +the translation teams. diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/AUTHORS b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/AUTHORS new file mode 100644 index 0000000..8239da0 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/AUTHORS @@ -0,0 +1,92 @@ +Here are the names of the programs in this package, +each followed by the name(s) of its author(s). + +basename: FIXME unknown +cat: Torbjorn Granlund, Richard M. Stallman +chgrp: David MacKenzie, Jim Meyering +chmod: David MacKenzie, Jim Meyering +chown: David MacKenzie, Jim Meyering +chroot: Roland McGrath +cksum: Q. Frank Xia +comm: Richard Stallman, David MacKenzie +cp: Torbjorn Granlund, David MacKenzie, Jim Meyering +csplit: Stuart Kemp, David MacKenzie +cut: David Ihnat, David MacKenzie, Jim Meyering +date: David MacKenzie +dd: Paul Rubin, David MacKenzie, Stuart Kemp +df: Torbjorn Granlund, David MacKenzie, Paul Eggert +dir: Richard Stallman, David MacKenzie +dircolors: H. Peter Anvin +dirname: David MacKenzie, Jim Meyering +du: Torbjorn Granlund, David MacKenzie, Paul Eggert, Jim Meyering +echo: FIXME unknown +env: Richard Mlynarik, David MacKenzie +expand: David MacKenzie +expr: Mike Parker +factor: Paul Rubin +false: Jim Meyering +fmt: Ross Paterson +fold: David MacKenzie +ginstall: David MacKenzie +groups: David MacKenzie +head: David MacKenzie, Jim Meyering +hostid: Jim Meyering +hostname: Jim Meyering +id: Arnold Robbins, David MacKenzie +join: Mike Haertel +kill: Paul Eggert +link: Michael Stone +ln: Mike Parker, David MacKenzie +logname: FIXME: unknown +ls: Richard Stallman, David MacKenzie +md5sum: Ulrich Drepper, Scott Miller +mkdir: David MacKenzie +mkfifo: David MacKenzie +mknod: David MacKenzie +mv: Mike Parker, David MacKenzie, Jim Meyering +nice: David MacKenzie +nl: Scott Bartram, David MacKenzie +nohup: Jim Meyering +od: Jim Meyering +paste: David M. Ihnat, David MacKenzie +pathchk: Paul Eggert, David MacKenzie, Jim Meyering +pinky: Joseph Arceneaux, David MacKenzie, Kaveh Ghazi +pr: Pete TerMaat, Roland Huebner +printenv: David MacKenzie, Richard Mlynarik +printf: David MacKenzie +ptx: F. Pinard +pwd: Jim Meyering +readlink: Dmitry V. Levin +rm: Paul Rubin, David MacKenzie, Richard Stallman, Jim Meyering +rmdir: David MacKenzie +seq: Ulrich Drepper +sha1sum: Ulrich Drepper, Scott Miller +shred: Colin Plumb +sleep: Jim Meyering, Paul Eggert +sort: Mike Haertel, Paul Eggert +split: Torbjorn Granlund, Richard M. Stallman +stat: Michael Meskes +stty: David MacKenzie +su: David MacKenzie +sum: Kayvan Aghaiepour, David MacKenzie +sync: Jim Meyering +tac: Jay Lepreau, David MacKenzie +tail: Paul Rubin, David MacKenzie, Ian Lance Taylor, Jim Meyering +tee: Mike Parker, Richard M. Stallman, David MacKenzie +test: Kevin Braunsdorf, Matthew Bradburn +touch: Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, Randy Smith +tr: Jim Meyering +true: Jim Meyering +tsort: Mark Kettenis +tty: David MacKenzie +uname: David MacKenzie +unexpand: David MacKenzie +uniq: Richard Stallman, David MacKenzie +unlink: Michael Stone +uptime: Joseph Arceneaux, David MacKenzie, Kaveh Ghazi +users: Joseph Arceneaux, David MacKenzie +vdir: Richard Stallman, David MacKenzie +wc: Paul Rubin, David MacKenzie +who: Joseph Arceneaux, David MacKenzie, Michael Stone +whoami: Richard Mlynarik +yes: David MacKenzie diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/COPYING b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/COPYING new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/COPYING @@ -0,0 +1,340 @@ + 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. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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) year 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. + + <signature of Ty Coon>, 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. diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/ChangeLog b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/ChangeLog new file mode 100644 index 0000000..19f78f2 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/ChangeLog @@ -0,0 +1,8597 @@ +2005-01-08 Jim Meyering <jim@meyering.net> + + * Version 5.3.0. + + `pr --columns=N' was not equivalent to `pr -N' when also using + either -s or -w. + + * src/pr.c (main): Set `explicit_columns' for --columns=N, + not just for -N. This bug has existed since the introduction + of the --columns=N option on 1998-08-15. + * NEWS: Document this. + * tests/pr/Test.pm (test_vector): For each -N test, automatically + create a new test vector using --columns=N. + +2005-01-07 Paul Eggert <eggert@twinsun.com> + + * src/pr.c (main): Check for column count overflow with + usages like "pr -2147483648". + +2005-01-07 Jim Meyering <jim@meyering.net> + + * src/pr.c (init_fps): Use xnmalloc, rather than xmalloc. + +2005-01-06 Jim Meyering <jim@meyering.net> + + * README: List the precise HP-UX version numbers that are affected. + Suggestion from Bob Proulx. + + * Makefile.maint (sc_changelog): Specify find's `-maxdepth 2' + predicate before `-name ChangeLog' to avoid a harmless warning + from find-4.2.10. + +2005-01-05 Jim Meyering <jim@meyering.net> + + * tests/help-version: Punt on the uptime test, since it fails when + it can't get boot time, and I don't want that to stop `make check'. + + * src/du.c (process_file): Evaluate exclusion rules against + the entire file name, not just the last component. + Reported by Robert Lindgren. + * tests/du/exclude: Test for this. + * NEWS: Document this. + + Ensure that tests/Makefile.am's check-root actions stay up to date. + * Makefile.maint (sc_root_tests): New rule. + (syntax-check-rules): Add it to the list. + +2005-01-04 Jim Meyering <jim@meyering.net> + + * man/shred.x: Change one-line summary to reflect that shred does + not remove files by default. Suggestion from Helen Faulkner in + http://bugs.debian.org/288552 + + * README: Request VERBOSE=yes output when reporting test failures. + Other minor changes. + + * tests/Makefile.am (check-root): Update. + +2005-01-03 Paul Eggert <eggert@cs.ucla.edu> + + * src/system.h: Undo previous change; we now use Autoconf. + +2005-01-03 Jim Meyering <jim@meyering.net> + + * tests/stty/row-col-1: Don't set rows or columns to zero, to avoid + a bug in the TIOCGWINSZ ioctl on at least Solaris5.9 systems. Setting + either (or both) to zero would succeed, but subsequent `stty size' + would say `no size information for this device' due to the ioctl + failing with EINVAL. + + * src/system.h: If PRIdMAX, PRIoMAX, PRIuMAX, and PRIxMAX are + not all defined and either ULONG_MAX or ULLONG_MAX is not defined, + then fail at compile-time rather than let tools like od produce + invalid results at run time. + +2004-12-21 Jim Meyering <jim@meyering.net> + + * src/csplit.c (usage): Say the default names are `xx00, xx01, ...', + not `xx01, xx02, ...'. + Reported by Matt Kraai in http://bugs.debian.org/286605 + + * tests/misc/split-fail: Avoid spurious failure on x86 Solaris5.9 + when using c89. + +2004-12-20 Paul Eggert <eggert@cs.ucla.edu> + + * src/split.c (usage): Mention default size. Suggested by Dan Jacobson. + +2004-12-19 Paul Eggert <eggert@cs.ucla.edu> + + * NEWS: Mention that one should eval "`dircolors`" rather than + `dircolors`. + +2004-12-17 Jim Meyering <jim@meyering.net> + + * tests/mv/hard-link-1: Rearrange to use newer trap-handling code, + so temporary directories aren't left behind upon e.g., interrupt. + +2004-12-16 Paul Eggert <eggert@cs.ucla.edu> + + * src/ls.c (print_dir): Use "%s: not listing already-listed + directory", not "not listing already-listed directory: %s", to + format already-listed directories, to be consistent with other + diagnostics involving file names and colons. + +2004-12-15 Jim Meyering <jim@meyering.net> + + * src/Makefile.am (__LDADD): Define, so that building `[' on + Solaris still uses the -lgen library that it requires in order + to get a definition of eaccess. + +2004-12-14 Jim Meyering <jim@meyering.net> + + tac would exit immediately upon I/O or temp-file creation failure. + Now it continues on, processing any remaining command line arguments. + + * src/tac.c: Include quotearg.h. + Use quotearg_colon in most diagnostics. + (copy_to_temp): Rewrite not to exit upon I/O or temp-file-creation + failure. Before, this command (with /full/tmp being a full partition) + TMPDIR=/full/tmp ./tac /proc/modules tac.c + would exit immediately upon the write error while trying to copy + non-seekable /proc/modules to the full partition. Now it still + reports the failure but continues on with the remaining file. + (tac_nonseekable): Return false also if copy_to_temp fails. + [DONT_UNLINK_WHILE_OPEN]: Add a FIXME comment explaining that + using atexit like this is wrong. + * NEWS: Document this. + * tests/misc/tac-continue: New test for this. + * tests/misc/Makefile.am (TESTS): Add tac-continue. + + * tests/chown/basic: Add a few more tests. + +2004-12-13 Paul Eggert <eggert@cs.ucla.edu> + + * src/ls.c (gobble_file): Change arg name to be command_line_arg + rather than explicit_arg, for consistency with copy.c. + (extract_dirs_from_files): Remove ignore_dot_and_dot_dot arg, since + it is deducible from dirname arg. All callers changed. + (extract_dirs_from_files, print_dir, queue_directory): + Add command_line_arg arg. All callers changed. + (struct pending): Add command_line_arg member. + (main): Use NULL rather than 0 when appropriate. + (set_exit_status, file_failure): New functions. + (queue_directory): Store command_line_arg into new structure. + (print_dir, gobble_file, get_link_name): + Use file_failure to report problems in accessing files, + so that the exit status is set consistently. + (print_dir): Simplify readdir failure code yet again. + If closedir fails, report "closing directory" rather than "reading + directory" failure. + (xstrcoll): Use set_exit_status to set status on failure. + * tests/ls-2/tests (no-a-isdir-b): This now exits with status 2, + not status 1. + +2004-12-11 Jim Meyering <jim@meyering.net> + + Avoid a race condition vulnerability in chown, when used with + --from=O:G and without the (-h) --no-dereference option. + * src/chown-core.c (restricted_chown): New function. + (change_file_owner): Call it. + Reported by Ulrich Drepper. + * NEWS: Mention this. + +2004-12-09 Paul Eggert <eggert@cs.ucla.edu> + + * ls now exits with status 1 on minor problems, 2 if serious trouble. + * NEWS: Document this. + * src/ls.c (LS_MINOR_PROBLEM, LS_FAILURE): New constants. + All uses of EXIT_FAILURE replaced with LS_FAILURE, unless + specified below. + (main): Initialize exit failure to LS_FAILURE. + (print_dir, gobble_file, get_link_name, xstrcoll): + Set exit status to LS_MINOR_PROBLEM if the failure is minor. + (print_dir): Do not give up on entire directory merely because readdir + returns EOVERFLOW. + (usage): Explain exit status. + * tests/help-version: ls and variants now exit with status 2 + on serious trouble. + +2004-12-08 Paul Eggert <eggert@cs.ucla.edu> + + * NEWS: Document new UTC+HH:MM date syntax, and put date changes + together. + +2004-12-07 Paul Eggert <eggert@cs.ucla.edu> + + * src/factor.c (factor): Don't list 1 as a factor of 1. + Problem reported by Thomas Folz-Donahue. + +2004-12-06 Jim Meyering <jim@meyering.net> + + * tests/du/files0-from: Sanitize environment. + Otherwise, e.g., BLOCKSIZE=k would cause a failure, and that + setting is the default (exported from /etc/profile) on at least one + NetBSD 1.6 system. + * tests/du/no-deref: Likewise. + * tests/cp/symlink-slash: Likewise. + * tests/ls/symlink-slash: Likewise + +2004-12-05 Jim Meyering <jim@meyering.net> + + * tests/tail/Test.pm (err-6) ["tail -c"]: Avoid test failure when + _POSIX2_VERSION=199209 is in the environment, or when building on + e.g., OpenBSD 3.2. + +2004-12-04 Jim Meyering <jim@meyering.net> + + * NEWS: Mention cut's new --complement option. + +2004-10-01 Paolo Bonzini <bonzini@gnu.org> + + * cut.c (complement, COMPLEMENT_OPTION): New. + (longopts): Add --complement. + (usage): Say not that -b, -c, and -f `print' fields, + but rather that they `select' fields for printing. + Describe the new --complement option. + (mark_range_start): Extracted from set_fields. + (print_kth): Support --complement. + (compare_ranges): New function. + (set_fields): Rewrite the part that populates range_start_ht, + merging it with the part that populates printable_field. + (main): Handle --complement. + +2004-12-03 Paul Eggert <eggert@cs.ucla.edu> + + * src/tail.c (tail_file): Set errnum to -1 if the initial "tail" + failed. This works around an assertion failure reported by + Roberto Nibali in: + http://lists.gnu.org/archive/html/bug-coreutils/2004-12/msg00012.html + +2004-12-02 Jim Meyering <jim@meyering.net> + + With using --color and with LS_COLORS saying not to color + executables, don't stat every file. + * src/ls.c (is_colored): New function. + (gobble_file): Use it. + (main): Use it here, in place of too-strict tests against NULL: + if either ORPHAN or MISSING was set to 0 from LS_COLORS, the + old test would fail. + +2004-12-01 Paul Eggert <eggert@cs.ucla.edu> + + * src/comm.c (compare_files): Assume setlocale exists. + * src/join.c (keycmp): Likewise. + * src/seq.c (decimal_point): Treat like sort. Now char. + All uses changed. + (main): Assume localeconv exists. Use same code as sort. + * src/sort.c (C_DECIMAL_POINT): Remove. Use changed to '.'. + Assume setlocale exists. + (thousands_sep): Renamed from th_sep. + (IS_THOUSANDS_SEP): Remove. All uses replaced by comparisons. + (NONZERO): Parenthesize use of arg. + (numcompare): Avoid duplicate loads. Use ISDIGIT as boolean, for + consistency. Avoid unnecessary negation by reversing + fraccompare args. + (main): Rewrite localeconv call to match seq.c. + * src/system.h: Assume locale.h exists. + (HAVE_SETLOCALE): Remove. + * src/uniq.c (different): Assume setlocale exists. + + * src/ls.c (sort_files): Minor cleanup. Remove an unnecessary + 'volatile' on a local variable. Rewrite to avoid unnecessary + double-assignment to 'func' in the usual case where strcoll does + not fail. + +2004-11-30 Paul Eggert <eggert@cs.ucla.edu> + + * src/pinky.c (gethostname): Remove decl. + (scan_entries): Use IS_USER_PROCESS instead of by-hand code. + * src/uptime.c (print_uptime): Use IS_USER_PROCESS and + UT_TYPE_BOOT_TIME instead of by-hand code. + * src/users.c (list_entries_users): Use IS_USER_PROCESS + instead of by-hand code. + * src/who.c (USER_PROCESS, RUN_LVL, INIT_PROCESS, LOGIN_PROCESS, + DEAD_PROCESS, BOOT_TIME, NEW_TIME, UT_TYPE_UNDEF, UT_TYPE): Remove. + (IS_USER_PROCESS): Move to ../lib/readutmp.h. + (UT_TYPE_RUN_LVL, UT_TYPE_INIT_PROCESS, UT_TYPE_LOGIN_PROCESS, + UT_TYPE_DEAD_PROCESS, UT_TYPE_NEW_TIME): New macros. + (gethostname): Remove decl. + (list_entries_who, scan_entries): Use the new macros defined above, + for consistency with pinky, uptime, and users. + +2004-11-25 Paul Eggert <eggert@cs.ucla.edu> + + Fix problem reported by Scott S. Tinsley for HP-UX 11.11 using + HP's ANSI C compiler. Declaring int functions causes warnings on + some modern systems and shouldn't be needed to compile on ancient + ones. + * src/copy.h (stat, lstat, rename): Remove decls. + * src/install.c (stat): Remove decl. + * src/ln.c (link, symlink): Remove decls. + +2004-11-25 Jim Meyering <jim@meyering.net> + + * man/help2man: Import help2man-1.35.1. + * man/Makefile.am (.x.1): Remove now-unnecessary use of + locally-added --program-name=NAME option. Now, help2man gets + the name from the [NAME] section (i.e. from our .x file). + * man/install.x: Use `install', not `ginstall' in the one-line + description. Reported by Brendan O'Dea. + * man/sha1sum.x: Use `sha1sum', not `shasum'. + +2004-11-24 Jim Meyering <jim@meyering.net> + + Since the changes of 2004-05-22, the u.saved_cwd member at + the bottom of the active-directory stack was no longer + strictly necessary. This change removes that member and uses + the newer cwd_state parameter for the final restore_cwd. + + * src/remove.c (struct AD_ent) [u]: Remove now-unnecessary union. + [dev_ino]: Rename from `a'. + (AD_pop_and_chdir): Add a parameter to play the role of just-removed + bottom-of-stack cwd-state member. + (AD_pop_and_chdir): No longer return boolean. Adjust caller. + (AD_push_initial): Remove CWD parameter. Adjust caller. + +2004-11-23 Paul Eggert <eggert@cs.ucla.edu> + + Minor performance improvements and cleanups for "touch". + * src/touch.c (posix_date): Remove; not needed as a static var. + All uses rewritten. + (touch): Use new futimens function to operate more efficiently + in some cases. Don't stat/fstat existing file when + (!amtime_now && change_times == (CH_ATIME | CH_MTIME)); the + old time stamps aren't needed in that case. + (main): change_times is int, not bool. Simplify test for + change_times. + +2004-11-20 Paul Eggert <eggert@cs.ucla.edu> + + * src/install.c (usage): Avoid usage that runs afoul of Docbook + translation. Problem reported by Eric S. Raymond. + + Restore dd's noctty flag, reverting the change of 2004-04-08. + POSIX does not allow "dd" to use O_NOCTTY by default. + * NEWS: Add noctty flag to dd. + * doc/coreutils.texi (dd invocation): Likewise. + * src/dd.c (flags, usage, main): Likewise. + +2004-11-19 Alfred M. Szmidt <ams@gnu.org> + + * src/ls.c (usage): Clarified description of --no-group (-G), + --human-readable (-h), --inode (-i), --size (-s), --time, + and --time-style. + +2004-11-19 Jim Meyering <jim@meyering.net> + + * src/ls.c (usage): Clarify description of --author. + Tweak indentation so that help2man creates better nroff. + Reported by Dan Jacobson. + + * src/uniq.c (check_file): Don't check stdout for errors here. + + * src/pwd.c (find_dir_entry): Update comment to match reality. + +2004-11-18 Jim Meyering <jim@meyering.net> + + * src/pwd.c (robust_getcwd): Correct the comment: this function + constructs the directory name. The caller prints it. + +2004-11-16 Paul Eggert <eggert@cs.ucla.edu> + + * src/stat.c (STATFS): New macro, for portability to Solaris 9. + (do_statfs): Use it. + + * src/basename.c, src/chroot.c, src/cksum.c, src/dd.c, src/dirname.c, + src/factor.c, src/hostid.c, src/hostname.c, src/link.c, src/logname.c, + src/nohup.c, src/printenv.c, src/pwd.c, src/setuidgid.c, src/sleep.c, + src/sync.c, src/tsort.c, src/unlink.c, src/uptime.c, src/users.c, + src/whoami.c, src/yes.c (main): Use getopt_long rather than getopt. + * src/readlink.c (main): argv is not const. + + * src/cut.c (usage): Improve documentation along the lines suggested + by Debian 5.2.1-2. + * src/echo.c (usage): Likewise. + * src/expr.c (usage): Likewise. + + * src/dircolors.hin: Add putty, screen-bce. + + * src/pinky.c (print_entry): Fix memory leak. + * src/who.c (print_user): Likewise. + +2004-11-15 Paul Eggert <eggert@cs.ucla.edu> + + * NEWS: New dd operand "status=noxfer". + * src/dd.c (C_ASCII, C_EBCDIC, C_IBM, C_BLOCK, C_UNBLOCK, + C_LCASE, C_UCASE, C_SWAB, C_NOERROR, C_NOTRUNC, C_SYNC, C_TWOBUFS, + C_NOCREAT, C_EXCL, C_FDATASYNC, C_FSYNC): Now constants, not + macros. + (STATUS_NOXFER, statuses): New constants. + (usage, print_stats, scanargs): Add support for status=noxfer. + (usage): Update status output to match new behavior. + (print_stats): Always output complete byte count. + Put space between numbers and units, as SI requires. + Use ngettext so that i18n can use plurals for "byte" and "second". + Don't multiply by 1e-9 (inexact); divide by 1e9 (which is exact). + (iflag_error_msgid, oflag_error_msgid): Remove; replace uses by + the string. + * tests/dd/skip-seek (@Tests): Use status=noxfer to avoid + problems with regression testing. + +2004-11-14 Paul Eggert <eggert@cs.ucla.edu> + + * NEWS: dd now outputs total bytes, seconds, and bytes per second. + * src/Makefile.am (dd_LDADD): Add $(LIB_CLOCK_GETTIME). + * src/dd.c: Include "human.h". + (w_bytes, start_time): New vars. + (usage): Document new I/O statistics output + (print_stats): Output new I/O statistics. + (cleanup): Do statistics after closing stdin and stdout, so that + the times are more accurate. + (write_output, dd_copy): Count output bytes. + (main): Get initial value of clock. + +2004-11-14 Jim Meyering <jim@meyering.net> + + Backslash-escape `-'s in email addresses, so that they are + rendered properly in UTF-locales. + * man/help2man (escape_hyphens): New function. + (main): Call it on email addresses. + + * src/sort.c (zaptemp): Mark new diagnostic for translation. + + * tests/misc/close-stdout: New file. Test today's closeout.c change. + * tests/misc/Makefile.am (TESTS): Add close-stdout. + +2004-11-13 Jim Meyering <jim@meyering.net> + + * src/test.c (usage): Put the description of `[-n] STRING' + on two lines, one for `-n STRING' and one for `STRING' so that + help2man properly escapes the `-'. Otherwise, the hyphen is + rendered inappropriately in UTF-8 locales. + Reported by Uwe Zeisberger in http://bugs.debian.org/281069. + +2004-11-12 Paul Eggert <eggert@cs.ucla.edu> + + * NEWS: Document the following changes. + + * src/sort.c: Avoid O(N**2) behavior when there are many temporary + files. + (temptail): New variable, so that we can easily append to list. + (create_temp_file): Create new files at end of list, so that + searching the list has O(N*NMERGE) behavior instead of O(N**2). + (zaptemp): Update temptail if needed. + (mergefps, merge): Accept new arg that counts temp files, and keep it + up to date as we create and remove temporaries. This is for + efficiency, so that we don't call zaptemp so often. + All callers changed. + (sort): Don't create array in reverse order, since the list of + temporaries is now in the correct order. + + (zaptemp): Protect against race condition: if 'sort' is + interrupted in the middle of zaptemp, it might unlink the + temporary file twice, and the second time this happens the file + might already have been created by some other process. + + (zaptemp): Warn if a temporary file is not removed. + + (create_temp_file): Use offsetof for clarity. + (die): Move it up earlier, to clean up the code a bit. + + * src/pr.c (strtoumax): Declare if not declared. + (skip_to_page, first_page_number, last_page_number, page_number, + first_last_page, print_header): + Use uintmax_t for page numbers. + (first_last_page): Remove unnecessary forward declaration. + Do not modify arg (it is now a const pointer). + Return a true if successful, false (without print a diagnostic) + otherwise. + (main): If +XXX does not specify a valid page range, treat it + as a file name. This follows the response to Open Group XCU ERN 41 + <http://www.opengroup.org/sophocles/show_mail.tpl?source=L&listname=austin-group-l&id=7717>, + which says the behavior is allowed. + (skip_to_page): When starting page number exceeds page count, + print both numbers in the diagnostic. + (print_header): Detect page number overflow. + +2004-11-07 Jim Meyering <jim@meyering.net> + + * src/uname.c [__APPLE__]: Include <mach/machine.h> and <mach-o/arch.h>. + (main) [__APPLE__]: Get the processor type via syscall rather than + hard-coding "powerpc". From Toby Peterson. + + * src/sort.c (merge): Remove declarations of now-unused variables. + +2004-11-06 Paul Eggert <eggert@cs.ucla.edu> + + * src/sort.c (first_same_file): Remove. Move most of the code to.... + (avoid_trashing_input): New function. + (merge): Avoid some silly merges, e.g., copying a single file to + a temporary file when there are exactly 17 input files to merge. + Take a count of temporary files rather than a max_merge arg. + All uses changed. + +2004-11-06 Jim Meyering <jim@meyering.net> + + * src/sort.c (xfclose): Don't close stdout here (just flush it), + since close_stdout now closes stdout unconditionally. + +2004-11-05 Paul Eggert <eggert@cs.ucla.edu> + + * src/sort.c (inittables, sort_buffer_size, getmonth, mergefps, + first_same_file, merge, sort, main): Use size_t for indexes to arrays. + This fixes some unlikely havoc-wreaking bugs (e.g., more than INT_MAX + temporary files). + (getmonth, keycompare, compare): Rewrite to avoid need for alloca, + thus avoiding unchecked stack overflow in some cases. As a side + effect this improve the performance of "sort -M" by a factor of 4 + on my benchmarks. + +2004-11-03 Paul Eggert <eggert@cs.ucla.edu> + + * src/stty.c: Include "vasprintf.h" since we use vasprintf now. + + * src/Makefile.am (check-AUTHORS): Don't assume \? works in a sed + expression; it's not portable. Problem reported by Albert Chin. + Don't invoke a program more than once. + * src/groups.sh (version): New variable, containing author info, + for benefit of AUTHORS check. Use it when acting on --version option. + * AUTHORS: Remove duplicate lines. Remove bogus "chroot:" + in groups line. + + * src/system.h: Don't #define and #undef getopt around <stdlib.h>, + as this breaks the new regime that does "#define getopt rpl_getopt". + Problem reported by Albert Chin for Solaris 9 with Sun cc in: + http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00019.html + I suppose this may cause problems on ancient hosts with + incompatible getopt declarations, but we'll cross that bridge if + the problem gets reported to us by someone who can test the fix. + +2004-11-03 Jim Meyering <jim@meyering.net> + + * src/tac.c: quote(...) file names in diagnostics. + +2004-10-29 Paul Eggert <eggert@cs.ucla.edu> + + * NEWS: Document getdate changes. + +2004-10-29 Jim Meyering <jim@meyering.net> + + * src/tac.c (tac_file): Remove temporary prototype and move this + function `down' so that it precedes definition of tac_nonseekable. + + `tac /proc/modules' would print nothing + Reported by Harald Dunkel in http://bugs.debian.org/278604. + + * src/tac.c (copy_to_temp): Renamed from save_stdin, since + now it copies a general file descriptor, not just stdin. + (tac_nonseekable): Renamed/adapted from tac_stdin. + (tac_file): Get fd via `open' directly rather than via fopen/fileno, + since we never used the stream. Perform "-" to stdin mapping here + rather than in main. Determine whether a file is seekable, + by trying to `lseek' to its end, and dispatch to tac_seekable or + tac_nonseekable accordingly. + (main): Rewrite argument handling now that it uses only tac_file. + * NEWS: Mention it here. + +2004-10-21 Jim Meyering <jim@meyering.net> + + * tests/mv/leak-fd: New file. + * tests/mv/Makefile.am (TESTS): Add it. + * tests/rm/dot-rel: New file. + * tests/rm/Makefile.am (TESTS): Add it. + + Correct my patch of 2004-10-18. + * src/remove.c (rm): Destroy the saved_cwd here (via cwd_state), + if necessary, not in remove_dir. Otherwise, removing multiple + `.'-relative nonempty directories no longer worked. + +2004-10-20 Paul Eggert <eggert@cs.ucla.edu> + + * src/fmt.c (usage): Improve description of --prefix. + Problem reported by Edward Welbourne. + + * man/uniq.x: Change summary so that it doesn't imply that + uniq writes to its input file. Problem reported by + Dan Jacobson. + +2004-10-18 Jim Meyering <jim@meyering.net> + + Plug a leak that would cause a cross-device mv to fail when + operating on too many command-line-specified nonempty directories. + * src/remove.c (remove_dir): Destroy the `struct saved_cwd' on the + top of the stack before returning. This usually closes the file + descriptor that was used to return to the original working directory. + Reported by Cyril Bouthors in + http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/3048 + * NEWS: Mention it here. + + * src/pathchk.c (validate_file_name): Give a more descriptive + diagnostic when pathconf fails. This also avoids an unwarranted + warning from gcc-3.3.5 about a format not being a string literal. + + * src/sleep.c (main): Remove declaration of unused local, c. + * src/printenv.c (main): Likewise. + * src/logname.c (main): Likewise. + * src/uptime.c (main): Likewise, for optc. + * src/tsort.c (main): Likewise, for opt. + +2004-10-17 Paul Eggert <eggert@cs.ucla.edu> + + * AUTHORS: Add self to pathchk. + * src/pathchk.c (AUTHORS): Add self. + Change "path" to "file name" whenever possible. + Remove usage comment, as it was a duplication of the code or doc. + Include <wchar.h> if available. + (mbrlen, mbstate_t) [! (HAVE_MBRLEN && HAVE_MBSTATE_T)]: Define. + (NEED_PATHCONF_WRAPPER, PATH_MAX, PATH_MAX_FOR, NAME_MAX, + pathconf_wrapper, portable_chars, dir_ok): Remove. + (NAME_MAX_MINIMUM, PATH_MAX_MINIMUM): New macros. + (pathconf, _PC_NAME_MAX, _PC_PATH_MAX): Define if nonexistent. + (portable_chars_only): New arg FILELEN. + Don't assume ASCII; we might be on an EBCDIC host. + Don't assume unibyte locale in diagnostic. + (component_start, component_len): New functions. + (validate_file_name): Renamed from validate_path. All uses changed. + Pretty much a complete rewrite. + Don't make copy of file arg. Always append trailing slash to + pathconf arg, just in case it's a symlink (this is pure paranoia; + we don't know of any hosts where the trailing slash is required). + Use size_t instead of long int when possible. + Avoid need to call pathconf in most practical cases. + Don't use euidaccess several times to test searchability; + just use lstat once. Reword diagnostic to put the (often very long) + file names last. + +2004-10-15 Paul Eggert <eggert@cs.ucla.edu> + + * src/printf.c (usage): Mention Unicode, and use H for hex digits. + +2004-10-13 Jim Meyering <jim@meyering.net> + + * NEWS: Mention today's fts.c fix. + +2004-10-13 Paul Eggert <eggert@cs.ucla.edu> + + * tests/stty/row-col-1: Set LC_ALL=C. + +2004-10-12 Jim Meyering <jim@meyering.net> + + * src/dircolors.hin: Add .flac and .mpc as audio suffixes. + From Jesus Climent in http://bugs.debian.org/276149. + +2004-10-05 Paul Eggert <eggert@cs.ucla.edu> + + * src/ls.c (ignore_mode): Renamed from ignore, to avoid shadowing + problems. All uses changed. + +2004-10-05 Jim Meyering <jim@meyering.net> + + * .x-sc_trailing_blank: Add an exclusion for config/texinfo.tex, + since Karl says its trailing blanks are there to stay :-) + +2004-10-04 Paul Eggert <eggert@cs.ucla.edu> + + * src/expr.c (NEW, OLD): Remove, partly to avoid + reference to obsolescent macro XMALLOC. + All uses replaced by xmalloc and free. + +2004-09-28 Jim Meyering <jim@meyering.net> + + * src/tail.c (usage): Clarify: --retry works only with --follow=name. + Reported by Nik A. Melchior in http://bugs.debian.org/273781. + +2004-09-27 Paul Eggert <eggert@cs.ucla.edu> + + * src/od.c (format_address_paren): c is optional, so don't output + it if it's '\0'. + +2004-09-26 Paul Eggert <eggert@cs.ucla.edu> + + Add support for ls --hide. Idea suggested by Bardur Arantsson. + * NEWS: Document this. + * src/ls.c (file_ignored): Renamed from file_interesting, with + inverted return value. Accept the file name, not a struct dirent *. + All uses changed. Avoid the expense of calling fnmatch if the + file is ignorable due to leading '.'. + (all_files, really_all_files): Removed; replaced by: + (ignore): New variable. All uses changed. + (IGNORE_DEFAULT, IGNORE_DOT_AND_DOTDOT, IGNORE_MINIMAL, HIDE_OPTION): + New constants. + (hide_patterns): New variable. + (long_options, decode_switches, file_ignored, usage): + Add support for --hide. + (patterns_match): New function. + (usage): Replace "hide" with "ignore" in explanation, to avoid + confusion. + +2004-09-25 Paul Eggert <eggert@cs.ucla.edu> + + * src/ls.c (gobble_file, print_long_format): Don't assume that + human-readable output has a byte count equal to its column width; + this isn't always true in locales where the radix character is not + '.' or ','. + (format_user_or_group): Revamp code to match the above fix; + this avoids the (very faint) possibility of integer overflow. + +2004-09-24 Paul Eggert <eggert@cs.ucla.edu> + + * NEWS: Mention that "chmod -r -w x" now works as expected. + * src/chmod.c (main): Revamp option processing to support this. + * tests/chmod/Makefile.am (TESTS): Add 'usage'. + * tests/chmod/usage: New set of tests for usage like that. + +2004-09-24 Jim Meyering <jim@meyering.net> + + * Makefile.maint (CVS_LIST): Use --types=AFGM option so that + it lists only cvs-controlled regular files. + + * src/csplit.c (xalloc_die): Declare to be `extern', not `static' + to avoid a warning from gcc-3.4.1. Reported by Paul Eggert. + +2004-09-23 Paul Eggert <eggert@cs.ucla.edu> + + * Makefile.maint (CVS_LIST): New macro. + (sc_space_tab, sc_prohibit_atoi_atof, sc_file_system, + sc_prohibit_jm_in_m4, sc_system_h_headers, sc_sun_os_names, + sc_trailing_blank, po-check): Use it instead of the + nonstandard "cvsu --list". + + * src/tail.c (parse_obsolete_option): Bring back support + for obsolete option followed by non-obsolete, or by more + than one file. When obsolete, conform to SUSv2 rather than + original POSIX 1003.2-1992, as SUSv2 corrected the case of + "tail -c". Add support for the SUSv2 "b" modifier. + * NEWS: Mention the above. + * tests/tail/Test.pm: New test case obs-b to check the above. + err-[134] no longer need _POSIX2_VERSION=199209. + Fix comments to match revised behavior. + +2004-09-22 Jim Meyering <jim@meyering.net> + + * Use automake-1.9.2. Regenerate dependent files. + + * src/remove.c (struct dirstack_state) [current_arg_jumpbuf]: + Improve the comment. + + Clean up scoping etc. so that some make `distcheck' tests pass. + * src/csplit.c (xalloc_die): Declare to be static. + * src/chown-core.c (chown_files): Declare as `extern'. + * src/cp-hash.c (remember_created): Likewise. + * src/copy.c (copy): Likewise. + * src/checksum.h (enum) [ALG_MD5]: Define to be 1, not 0. + + * src/id.c, src/nl.c, src/expand.c: Remove trailing blanks. + * src/unexpand.c: Likewise. + + * src/Makefile.am (check-AUTHORS): New rule. + (check): Depend on it. + * AUTHORS: Update. + + * Makefile.maint (syntax-check-rules): Remove duplicate sc_tight_scope. + (sc_system_h_headers): Also exclude copy.h; it includes <stdbool.h>. + +2004-09-22 Paul Eggert <eggert@cs.ucla.edu> + + * src/ls.c (decode_switches): Don't compare a short value + to SIZE_MAX: GCC sometimes complains. + +2004-09-21 Paul Eggert <eggert@cs.ucla.edu> + + * NEWS: The following commands now reject unknown options: + basename dirname factor hostname link nohup sync unlink yes + Also, pathchk no longer accepts trailing options. + + * src/basename.c: Include <getopt.h>. + * src/chroot.c: Likewise. + * src/dirname.c: Likewise. + * src/factor.c: Likewise. + * src/hostid.c: Likewise. + * src/hostname.c: Likewise. + * src/nohup.c: Likewise. + * src/pwd.c: Likewise. + * src/setuidgid.c: Likewise. + * src/sync.c: Likewise. + + * src/basename.c (main): Reject unknown options. + * src/dirname.c (main): Likewise. + * src/factor.c (main): Likewise. + * src/hostid.c (main): Likewise. + * src/hostname.c (main): Likewise. + * src/link.c (main): Likewise. + * src/nohup.c (main): Likewise. + * src/pwd.c (main): Likewise. + * src/setuidgid.c (main): Likewise. + * src/sync.c (main): Likewise. + * src/unlink.c (main): Likewise. + * src/yes.c (main): Likewise. + + * src/cat.c (main): Remove unused "case 0". + * src/chgrp.c (main): Likewise. + * src/chmod.c (main): Likewise. + * src/chown.c (main): Likewise. + * src/comm.c (main): Likewise. + * src/cp.c (main): Likewise. + * src/csplit.c (main): Likewise. + * src/cut.c (main): Likewise. + * src/date.c (main): Likewise. + * src/df.c (main): Likewise. + * src/du.c (main): Likewise. + * src/env.c (main): Likewise. + * src/expand.c (main): Likewise. + * src/fold.c (main): Likewise. + * src/head.c (main): Likewise. + * src/id.c (main): Likewise. + * src/install.c (main): Likewise. + * src/join.c (main): Likewise. + * src/ln.c (main): Likewise. + * src/ls.c (decode_switches): Likewise. + * src/mkdir.c (main): Likewise. + * src/mkfifo.c (main): Likewise. + * src/mknode.c (main): Likewise. + * src/mv.c (main): Likewise. + * src/nl.c (main): Likewise. + * src/paste.c (main): Likewise. + * src/pinky.c (main): Likewise. + * src/pr.c (main): Likewise. + * src/ptx.c (main): Likewise. + * src/readlink.c (main): Likewise. + * src/rm.c (main): Likewise. + * src/rmdir.c (main): Likewise. + * src/seq.c (main): Likewise. + * src/shred.c (main): Likewise. + * src/split.c (main): Likewise. + * src/sum.c (main): Likewise. + * src/tac.c (main): Likewise. + * src/tail.c (main): Likewise. + * src/tee.c (main): Likewise. + * src/touch.c (main): Likewise. + * src/tr.c (main): Likewise. + * src/tty.c (main): Likewise. + * src/uname.c (main): Likewise. + * src/unexpand.c (main): Likewise. + * src/wc.c (main): Likewise. + * src/who.c (main): Likewise. + + * src/chroot.c (main): Use getopt where it suffices, not getopt_long. + * src/cksum.c (main): Likewise. + * src/dd.c (main): Likewise. + * src/logname.c (main): Likewise. + * src/printenv.c (main): Likewise. + * src/sleep.c (main): Likewise. + * src/tsort.c (main): Likewise. + * src/uptime.c (main): Likewise. + * src/users.c (main): Likewise. + * src/whoami.c (main): Likewise. + + * src/du.c (long_options): Standardize on NULL vs 0. + * src/rm.c (long_opts): Likewise. + + * src/logname.c (long_options): Remove. + * src/printenv.c (long_options): Likewise. + * src/sleep.c (long_options): Likewise. + * src/tsort.c (long_options): Likewise. + * src/uptime.c (longopts): Likewise. + * src/users.c (longopts): Likewise. + * src/whoami.c (long_options): Likewise. + + * src/pathchk.c (longopts): Add --help, --version. + (main): Use longopts rather than parse_long_options. + * src/stty.c (longpts, main): Likewise. + + * src/pathchk.c (main): Don't reorder arguments, so that + we can check weird file names. + + * src/readlink.c: Don't include "long-options.h". + * src/sort.c: Likewise. + * src/stty.c: Likewise. + + * src/split.c (verbose): Now bool, not int. + (VERBOSE_OPTION): New enum. + (longopts, main): Use it. + + * tests/factor/basic: Adjust to new wording in diagnostic + that results from the above changes. + +2004-09-21 Jim Meyering <jim@meyering.net> + + * man/rm.x: Say "the response is affirmative" rather than "the + response begins with y or Y", so that the documentation is + accurate in non-English locales. Problem reported by Munzir Taha. + +2004-09-19 Paul Eggert <eggert@cs.ucla.edu> + + * src/echo.c (main): Don't pass NULL to strcmp when + POSIXLY_CORRECT and given no arguments. + + * src/md5sum.c (STRING_OPTION): Remove. + (long_options, main): Remove support for undocumented and + obsolete --string option, as suggested in the 1996-09-26 patch. + * NEWS: Document this. + + * tests/rm/fail-eperm: Don't try to remove writeable files in a + sticky /tmp directory, as SVR4-like systems (e.g., Solaris 9) let + you remove such files. Problem reported by Bert Fischer in: + http://lists.gnu.org/archive/html/bug-coreutils/2004-09/msg00074.html + +2004-09-18 Paul Eggert <eggert@cs.ucla.edu> + + * src/md5sum.c (STATUS_OPTION, STRING_OPTION): New enums. + (long_options, main): Use them instead of magic numbers 2 and 1. + For --string, optarg can't possibly be NULL. + + * src/dd.c (usage): Distinguish between options and operands. + (scanargs): Don't mess with argc, argv; getopt_long handles this now. + Say "operands" for operands, not "options". + (main): Use getopt_long, so that "dd --" works as POSIX requires. + * tests/dd/misc: Check for "dd --". + + * src/chroot.c (main): Reject unknown options instead of + interpreting them as a directory to chroot to. + + * src/cksum.c: Remove obsolete comment about POSIX 1003.2/D11.2. + The current standard (POSIX 1003.1-2004) is correct. + (crc_remainder) [defined CRCTAB]: Renamed from "remainder" to avoid + collision with builtin function. + (main) [defined CRCTAB]: Output in lowercase hexadecimal, and + output the first 0 as 8 digits, to make it easier to compare to + the text of the standard. Output crctab to be a const array. + (crctab): Use result of above changes. + (long_options): Remove; not needed if empty. + (main): getopt_long can't return 0 here, so simplify the code. + +2004-09-13 Jim Meyering <jim@meyering.net> + + * src/Makefile.am (localedir.h): Don't redirect directly to target. + +2004-09-13 Paul Eggert <eggert@cs.ucla.edu> + + * src/id.c (print_full_info): Don't exit with failure status simply + because a user or group number can't be turned into a name. + Problem reported by Felipe Kellermann in: + http://lists.gnu.org/archive/html/bug-coreutils/2004-09/msg00081.html + +2004-09-12 Jim Meyering <jim@meyering.net> + + * Makefile.maint (my-distcheck): When building with -Werror, also + require -Wshadow. + +2004-09-10 Paul Eggert <eggert@cs.ucla.edu> + + * NEWS: "tail" now handles obscure POSIX 1003.2-1992 cases better. + * src/tail.c (parse_obsolete_option): Renamed from + parse_obsolescent_option, since the options are obsolete now. + Remove bool *arg; just exit if there's an error. Revamp to follow + POSIX 1003.2-1992 more precisely, to handle cases like "tail - + file" and "tail -10 -- file" correctly when we are conforming to + the older standard. + (main): Adjust to this change. + * tests/tail/Test.pm (test_vector): minus-* requires + _POSIX2_VERSION=199209 now, to work correctly if there is + an input file. err-1 and err-3 no longer errors if there + is another file. + +2004-09-09 Paul Eggert <eggert@cs.ucla.edu> + + * src/test.c (usage): Document -r, -w, -x more carefully. + +2004-09-08 Paul Eggert <eggert@cs.ucla.edu> + + * src/test.c (usage): Document "test" (with no args) and "[ ]". + Document that -h and -L don't dereference. + + * NEWS: Document that "tr xy -z" now works as per POSIX. + Sort the descriptions. + * src/tr.c (main): Don't reorder options. + * tests/tr/Test.pm (fowler-1): New test case. + +2004-09-06 Paul Eggert <eggert@cs.ucla.edu> + + * src/touch.c (main): Fix POSIX-conformance bug: "touch -- + MMDDhhmm file" must be treated like "touch MMDDhhmm file" when + conforming to pre-2001 POSIX. + * NEWS: Document this. + * tests/touch/obsolescent: Test for this bug. Also, set + _POSIX2_VERSION=199209 and POSIXLY_CORRECT=1 so that it's + a better test for obsolescent features. + + * src/sort.c (main): Emulate Solaris 8 and 9 "sort -y", so that + "sort -y abc" is like "sort abc" whereas "sort -y 100" is like + plain "sort". + + * src/od.c: Several changes for POSIX and FreeBSD compatibility. + (COMMON_SHORT_OPTIONS): Add -B, -D, -e, -F, -H, -I, -L, -O, -s, -X. + (long_options, main): --strings is now -S, not -s. + (usage): Reflect the usage changes. + (parse_old_offset): Do not issue a diagnostic on failure; + callers now do this as necessary. + (main): Support POSIX syntax. Remove unused case 0 from getopt_long. + Add support for new short options (many undocumented) for + compatibility with FreeBSD. Remove FIXME for -s; it's now + POSIX-compatible. Default format is now oS, not o2. + * NEWS: Describe the above. + +2004-09-05 Paul Eggert <eggert@cs.ucla.edu> + + * src/stty.c (valid_options): Remove. + (main): Fix some bugs in handling invalid option-combinations + like "stty -F". + (recover_mode): Arg is now char const *, not char *. + (main): Use STDIN_FILENO, not 0. + Simplify option-parsing code a tad. + * tests/stty/basic-1: Check for the fixed bugs. + +2004-09-03 Paul Eggert <eggert@cs.ucla.edu> + + * src/stat.c (HAVE_STRUCT_STATXFS_F_TYPE): Fix typo that prevented + it from ever being nonzero. Reported by Pozsar Balazs in: + http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00189.html + (human_fstype): Add ramfs, squashfs, sysfs. + Reported by Pozsar Balazs in: + http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00188.html + (human_fstype): Return char const *, not char *. + Simplify internals a bit, and avoid casts. + + * src/dd.c (usage): "alternated EBCDIC" -> "alternate EBCDIC". + (bit_count): Remove. All uses changed to.... + (multiple_bits_set): New function. + (scanargs): Use it, and check separately for each set of + incompatible options, to improve diagnostics. + (MX): Remove. + (apply_translations): Move checks for incompatible options + to scanargs, so that they're done consistently. + +2004-09-02 Paul Eggert <eggert@cs.ucla.edu> + + Output correct errno-related diagnostic on "paste" I/O errors. + * src/paste.c (write_error, xputchar): New functions. + (paste_parallel): Use correct errno value after input error. + (paste_parallel, paste_serial): Report errno value after output error. + + Port to diet libc. Problem reported by Felix von Leitner in: + http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00171.html + * src/paste.c (dummy_closed, CLOSED, dummy_endlist, ENDLIST): Remove; + it's not portable C to assume FILE is a complete type. + (paste_parallel): Use index test instead of ENDLIST, and NULL + instead of CLOSED. + +2004-08-24 Paul Eggert <eggert@cs.ucla.edu> + + POSIX-conformance fixes for "expand" and "unexpand". + Also, consistently use "tab stop" rather than "tabstop". + * NEWS: Document fixes. + * src/expand.c: Revamp to resemble the new unexpand.c better. + (usage): -i does not convert tabs after non-tabs. + (add_tab_stop): Renamed from add_tabstop. All uses changed. + (parse_tab_stop): Renamed from parse_tabstop. All uses changed. + (validate_tab_stop): Renamed from validate_tabstop. All uses changed. + (next_file, main): Check fclose against 0, not EOF. + (expand): Remove unnecessary casts. + Add another loop nesting level, for lines, so that per-line variables + are initialized cleanly. + Revamp tab checking. Check for write error immediately, rather + than just once at the end of the program. + * src/unexpand.c: Lkewise (for the expand.c changes). + (TAB_STOP_SENTINEL): Remove. + (tab_size): Now size_t, not uintmax_t, since we need to store + the sequences of blanks. + (max_column_width): New var. + (usage): Say "blank" where POSIX requires this. + (add_tab_stop): Calculate maximum column width. + (unexpand): Store the pending blanks, instead of merely counting them. + Follow POSIX's rules about -a requiring two blanks before a tab stop. + Get rid of internal label and goto. + * tests/unexpand/basic-1: Fix infloop-3 to match POSIX. + Add blanks-1 through blanks-13. + +2004-08-19 Paul Eggert <eggert@cs.ucla.edu> + + * NEWS: "chown : file", "chown '' file", and "chgrp '' file" now + succeed without changing the uid and gid, like FreeBSD. + * src/chgrp.c (parse_group): Return gid_t rather than storing it + through a pointer. Treat "chgrp '' file" as a no-op change, + as FreeBSD does. + (main): Set chopt.group_name to NULL if the group is the empty + string. + * src/chown-core.c (describe_change): Describe changes to -1:-1 + without using "to OWNERSHIP" phrase. + * src/chown.c (usage): "chown '' file" is now allowed. + (main): Do not set user name to the empty string if the group + name is null. + * tests/chgrp/basic: Test "chgrp '' file". + * tests/chown/Makefile.am (TESTS): Add separator. + * tests/chown/separator: New file, partly taken from + Dmitry V. Levin's suggestion in + <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html> + +2004-08-11 Paul Eggert <eggert@cs.ucla.edu> + + * tests/install/basic-1: Test for the -d regression. + +2004-08-11 Dmitry V. Levin <ldv@altlinux.org> + + * src/install.c (main): Fix -d regression introduced with + --target-directory support at 2004-06-25. + +2004-08-11 Paul Eggert <eggert@cs.ucla.edu> + + * src/copy.c (copy_internal): When preserving links, unlink + a destination with link count greater than one. This is so + that commands like "cp -a" don't get confused when copying into + a destination that already contains many hard links. Problem + reported by Tim Waugh in: + http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00053.html + +2004-08-10 Paul Eggert <eggert@cs.ucla.edu> + + Convert all files to UTF-8. + * tests/fmt/basic (8-bit-pfx): Use UTF-8, not Latin-1. + * tests/sort/Test.pm (16a): Likewise. + * tests/uniq/Test.pm (8): Likewise. + * tests/misc/printf-hex: Use ASCII, not Latin-1. + + * NEWS: Document "sort -o -" and "tee -" POSIX-conformance fixes. + * src/shred.c (usage): "-" is an operand, not an option. + * src/sort.c (die, xfopen, mergefps, first_same_file, merge): + A null file arg means standard output. + (main): "-o -" means to write to a file named "-", + not to standard output. + * src/tee.c (usage, tee): "tee -" writes to standard output, not + to a file named "-". + +2004-08-10 Dmitry V. Levin <ldv@altlinux.org> + + * src/install.c (change_timestamps): Fix int->bool conversion + bugs introduced on 2004-07-29. + +2004-08-09 Paul Eggert <eggert@cs.ucla.edu> + + * src/shred.c (wipename): Work even if the directory is writeable + and not readable. Prefer write access, since this should work + better with fdatasync. + + * src/csplit.c (xalloc_die): New function. + (main): Remove now-obsolete initialization of xalloc_fail_func. + + * src/md5sum.c: Adjust to sha->sha1 renaming. + +2004-08-08 Dmitry V. Levin <ldv@altlinux.org> + + Minor code cleanup. + * src/readlink.c (canonicalize_fname): Remove unneeded proxy function. + (can_mode): Make variable local. + +2004-08-07 Paul Eggert <eggert@cs.ucla.edu> + + * src/system.h (O_BINARY) [!O_BINARY && defined O_BINARY]: + Do not define, to avoid annoying compiler messages on QNX 6.3. + Problem reported by Johan in: + http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00050.html + +2004-08-04 Paul Eggert <eggert@cs.ucla.edu> + + * src/system.h (PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): + Define to a concatenation of string literals, not to an expression; + needed for concatenation contexts. + (INTMAX_MAX, INTMAX_MIN): New macros. + + * src/stat.c (print_stat): Don't assume st_ino / st_dev fits in + unsigned long; this isn't true for st_ino on Solaris 9. + +2004-08-03 Paul Eggert <eggert@cs.ucla.edu> + + * src/uname.c: Do not depend on HAVE_SYSCTL when deciding + whether to include files. Include <sys/param.h> if + HAVE_SYS_PARAM_H (not HAVE_SYSCTL). + (main) [defined __POWERPC__]: Add a kludge to work around a + Mac OS X bug, so that uname -p defaults to "powerpc" if + sysctl ((int[]) {CTL_HW, HW_MACHINE_ARCH}, 2, buffer, &bufsize, 0, 0) + fails. Problem reported by Petter Reinholdtsen in: + http://lists.gnu.org/archive/html/bug-gnu-utils/2003-02/msg00201.html + + * src/uniq.c (hard_LC_COLLATE, ignore_case, different, check_file, + main): Use bool for booleans. + (writeline, check_file): Use uintmax_t for line counts. + (check_file): Check for and report line number overflow, + when that matters. + * src/wc.c (iswspace, wc): Use to_uchar rather than a cast. + (print_lines, print_words, print_chars, print_bytes, print_linelength, + have_read_stdin, wc, wc_file, main): + Use bool for booleans. + (exit_status): Remove. + (wc, wc_file): Return bool status. All callers changed. + * src/who.c (scan_entries): 0 -> STDIN_FILENO. + * src/whoami.c (main): Print uids using unsigned long int, not + unsigned int. + + * src/unexpand.c: Int cleanup and minor reorganization to be more + like src/expand.c. + Include quote.h, xstrndup.h. + (TAB_STOP_SENTINEL): Increase from INT_MAX to INTMAX_MAX. + (convert_entire_line, have_read_stdin, parse_tabstops, next_file, + unexpand, main): + Use bool for booleans. + (tab_size, tab_list, add_tabstop, validate_tabstops, unexpand): + Use uintmax_t for column counts. + (first_free_tab, validate_tabstops, unexpand): Use size_t for sizes. + (add_tabstop, parse_tabstops, main): Don't reserve UINTMAX_MAX + as a tab stop. + (parse_tabstops): Don't use ISBLANK on possibly-signed char. + Detect overflow in tab stop string. + (next_file, main): Use EXIT_FAILURE/EXIT_SUCCESS instead of 1/0. + (unexpand): Concatenate input files the same way expand does. + + * src/touch.c (no_create, use_ref, posix_date, amtime_now, + touch, main): Use bool for booleans. + (main): Avoid integer overflow when given more than INT_MAX + options. + * src/tsort.c (struct item, n_strings): Use size_t for sizes. + (have_read_stdin, count_items, scan_zeros, detect_loop, + recurse_tree, walk_tree, tsort, main): + Use bool for booleans. + (exit_status): Remove. + (tsort): Return a success flag instead of storing into a global. + (main): Use it. + * src/tty.c (silent, main): Use bool for booleans. + (main): 0 -> STDIN_FILENO. + * src/uname.c (print_element): Use bool for booleans. + + * src/test.c (TRUE, FALSE, SHELL_BOOLEAN, TRUTH_OR, TRUTH_AND): + Remove. All uses replaced by C99 boolean primitives. + (TEST_TRUE, TEST_FALSE): New constants, for readability. + (test_unop, binop, unary_operator, binary_operator, two_arguments, + three_arguments, posixtest, expr, term, and, or, is_int, age_of, + one_argument, main): Use bool for booleans. + (advance, unary_advance): Now inline procedures rather than a macros. + (is_int): Renamed from isint, to avoid namespace clash with ctype.h. + (term, and, or): When it's easy, loop instead of recursing. + (term): Avoid integer overflow if there are INT_MAX-3 args (!). + (binary_operator, unary_operator): Simplify by systematically rewriting + true==FOO to FOO (where FOO is a boolean). + (unary_operator): Don't consider a file to be a regular file + merely because its mode&S_IFMT is zero. Just use S_ISREG. + Remove unnecessary casts. Remove ifdefs for things like + S_ISSOCK that are no longer needed, since stat-macros.h always + defines them now. + + * src/tac-pipe.c (buf_init_from_stdin, find_bol, tac_mem): + Use bool for booleans. + (buf_init_from_stdin, buf_free, find_bol, print_line): + Use size_t for sizes. + * src/tac.c (separator_ends_record, tac_seekable, tac_file, + tac_stdin, tac_stdin_to_mem, main): Use bool for booleans. + (match_length, G_buffer_size, tac_seekable, main): Use size_t for sizes. + (tac_seekable): Use ptrdiff_t for pointer subtraction. + Report an error if the result is out of range. + (tac_seekable, main): Check for integer overflow in buffer size + calculations. + (main): Remove unnecessary casts. + + * src/su.c (run_shell): Pass a new n_additional_args arg, so that + the callee doesn't have to count 'em. All callers changed. + Don't allocate more space for the arg vector than we'll need. + Use memcpy to copy the args rather than rolling our own loop. + Use size_t for sizes. + (fast_startup, simulate_login, change_environment, log_su, + correct_password, restricted_shell, main): Use bool for booleans. + (longopts): Don't assume change_environment is an int. + Use NULL, not 0, for pointers. + (xsetenv): New function, replacing xputenv and concat. + All callers changed. + (elements): Remove; no longer needed. + (log_su, correct_passwd, main): Prefer !x to x==NULL. + (log_su): 2 -> STDERR_FILENO. + (modify_environment, main): Don't assume that getenv's returned value + has an indefinite lifetime. + (modify_environment): Allocate a larger environ. + (main): Remove an impossible 'case 0'; if it happens now, it'll + get diagnosed. Don't assume getpwnam results outlive endpwent. + Check for null or empty pw_name, pw_dir and for null pw_passwd. + + * src/stty.c (VA_START): Remove. All callers now use va_start. + (_POSIX_VDISABLE): Remove unnecessary cast. + (struct control_info, visible): Use cc_t for control chars. + (struct control_info): Use size_t for sizes. + (recover_mode, set_mode, display_speed, display_window_size, + valid_options, main, display_changed): + Use bool for booleans. + (integer_arg): Return unsigned long int, not long int. + Accept new max arg; all callers changed, to specify a maximum + value for integer parameters instead of silently overflowing. + (wrap): Do not overrun the stack buffer if the output contains + more than 1024 bytes. Instead, malloc a buffer. + (main): Remove a "what is this?!?" FIXME. Nobody knows what it is. + Remove unnecessary casts. + (set_control_char): Allow int values only up to cc_t range. + (screen_columns): Don't reject INT_MAX. + (display_changed, display_all, display_speed, recover_mode): + Don't assume cc_t fits in int. + + * src/remove.h: Add copyright notice. + (struct rm_options): Use bool for booleans. + * src/rmdir.c (empty_paths, ignore_fail_on_non_empty, verbose, + errno_rmdir_non_empty, remove_parents, main): Likewise. + * src/sum.c (have_read_stdin, bsd_sum_file, sysv_sum_file, + main): Likewise. + (main): Don't dump core if invoked with argv[0]==NULL. + * src/tee.c (tee, append, ignore_interrupts, main, tee): + Use bool for booleans. + (tee): Use ssize_t for read returns. + + * src/ptx.c: Add a FIXME mentioning that there are many + unchecked integer overflows in this file. + (gnu_extensions, auto_reference, input_reference, right_reference, + ignore_case, initialize_regex, fix_output_parameters, + output_one_roff_line, output_one_text_line, output_one_dumb_line, main): + Use bool for booleans. + (SKIP_SOMETHING, compare_words, digest_break_file, + find_occurs_in_text, fix_output_parameters): + Use to_uchar instead of a caset. + (print_field): Rewrite to avoid cast. + + * src/printf.c (posixly_correct): Use bool for booleans. + (verify, main): Use EXIT_FAILURE/EXIT_SUCCESS instead of 1/0. + (STRTOX): Rewrite to avoid casts. + (print_esc_char): Arg is char, not int. + * src/readlink.c (canonicalize): Remove. All uses now merely inspect + can_mode. + (no_newline, verbose): Use bool for booleans. + (can_mode): Now of type int; use -1 to denote otherwise-uninitialized. + * src/shred.c (struct Options, main): Use bool for booleans. + (isaac_seed_data, fillpattern, wipefile): Rewrite to avoid casts. + * src/split.c (cwrite, bytes_split, lines_split, line_bytes_split): + Use bool for booleans. + * src/stat.c (G_fail): Remove. + (print_statfs): Print various gotta-be-nonnegative values using + unsigned long int, not long int or int. + (do_statfs, do_stat): Return a boolean success flag. + (do_stat, main): Use bool for booleans. + + * src/pr.c: Add a FIXME mentioning that there are many + unchecked integer overflows in this file. + (TRUE, FALSE): Remove. All uses replaced by true and false. + (struct COLUMN, read_line, print_page, print_stored, open_file, + skip_to_page, init_fps, parallel_files, align_empty_cols, + empty_line, FF_only, explicit_columns, extremities, keep_FF, + print_a_FF, print_a_header, use_form_feed, have_read_stdin, + print_across_flag, storing_columns, balance_columns, + truncate_lines, join_lines, untabify_input, failed_opens, + numbered_lines, skip_count, use_esc_sequence, use_cntrl_prefix, + double_space, ignore_failed_opens, use_col_separator, + pad_vertically, last_line, main, init_parameters, skip_read, + read_line, print_stored): + Use bool for booleans. + (struct COLUMN, char_to_clump, store_char, print_char): + Use char for chars. + (clump_buff, print_clump): Use char[], not int[], for an array whose + elements are always chars. + (first_last_page, main, getoptarg, balance, add_line_number, + char_to_uclump): Remove unnecessary casts. + (init_parameters): Allocate chars, not ints, for clump_buff. + (print_char): Use to_uchar before invoking ISPRINT. + (char_to_clump): Convert to unsigned char before invoking ISPRINT. + + * src/nohup.c (main): Use bool for booleans. + * src/paste.c (paste_parallel, paste_serial, main): Likewise. + * src/pathchk.c (validate-path, main, portable_chars_only): Likewise. + (portable_chars_only): Use to_uchar rather than a cast. + * src/printenv.c (main): Use bool for booleans. + Do not assume that the environ has at most one matching entry + for each option (integer overflow was possible otherwise). + + * src/od.c (FMT_BYTES_ALLOCATED): Now an enum, not a decimal + constant. Do not assume PRIdMAX etc. are strings of length 3 or + less. + (struct tspec): Use it. fmt_string is now an array, not + a pointer, as there's little point to the indirection here. + (struct tspec, flag_dump_strings, + traditional, flag_pseudo_start, limit_bytes_to_format, + abbreviate_duplicate_blocks, have_read_stdin, simple_strtoul, + decode_one_format, open_next_file, check_and_close, + decode_format_string, skip, write_block, read_char, read_block, + parse_old_offset, dump, dump_strings, main): + Use bool for booleans. + (struct tspec): Use void *, not char *, for generic pointers. + (bytes_to_oct_digits, bytes_to_signed_dec_digits, + bytes_to_unsigned_dec_digits, bytes_to_hex_digits): + Use char, not unsigned int, since char suffices. + (print_s_char, print_char, print_s_short, print_short, + print_int, print_long, print_long_long, print_float, + print_double, print_long_double): Rewrite to avoid casts. + These now take void * arguments, instead of char *. + Use the same body for all functions, except for the choice + of type. Assume C89 to simplify handling of signed char. + (dump_hexl_mode_trailer, print_named_ascii, print_ascii): + Rewrite to avoid casts. + (print_named_ascii, print_ascii): Now takes void *, not char *. + (decode_one_format): Use int for printf field widths, not + unsigned int. Pass void * to subsidiary printers, + not char *. Simplify handling of floating-point formats + by factoring out common code dealing with precision and field width. + (decode_format_string): Avoid need for temporary copy of + each decoded struct tspec. + (get_lcm): Remove unnecessary cast. + (main): Fix bug where more than INT_MAX failed decodes were ignored. + +2004-08-02 Paul Eggert <eggert@cs.ucla.edu> + + * src/nl.c (TRUE, FALSE): Remove; all uses changed to true, false. + (enum number_format): Remove. + (FORMAT_RIGHT_NOLZ, FORMAT_RIGHT_LZ, FORMAT_LEFT): Now strings, + not enum values. + (DEFAULT_SECTION_DELIMITERS): Now an array constant, not a macro. + (section_del): Now const. + (print_fmt): Remove. + (starting_line_number, page_incr, blank_join, line_no, + print_lineno, proc_text, main): + Use intmax_t for line numbers. + (reset_numbers, have_read_stdin, build_type_arg, nl_file, main): + Use bool for booleans. + (lineno_format): Now a string, not an enum value. + (build_print_fmt): Remove. All calls removed. This work is + now done within print_lineno. + (build_type_arg): Use size_t for sizes. + (print_lineno): Check for line number overflow. + (proc_text, main): Remove unnecessary cast. + + * src/ln.c (symbolic_link, interactive, remove_existing_files, + verbose, hard_dir_link, dereference_dest_dir_symlinks, + do_link, main): Use bool for booleans. + + * src/ls.c (struct fileinfo, file_interesting, + extract_dirs_from_files, color_symlink_as_referent, + FILE_OR_LINK_MODE, sort_reverse, print_owner, print_group, + numeric_ids, print_block_size, dired, print_with_color, + check_symlink_color, print_inode, recursive, immediate_dirs, + all_files, really_all_files, qmark_funny_chars, + print_dir_name, format_needs_stat, format_needs_type, visit_dir, + main, decode_switches, parse_ls_color, print_dir, file_interesting, + gobble_file, make_link_path, basename_is_dot_or_dotdot, + extract_dirs_from_files, print_long_format): + Use bool for booleans. + (dir_defaulted): Remove; no longer needed. + (main): Use int to count files, since it suffices for argv. + Rewrite to avoid need for dir_defaulted. + (main, print_dir, gobble_file, get_link_name, + xstrcoll): + Set exit status to EXIT_SUCCES/EXIT_FAILURE rather than 0/1. + (decode_switches): Put back check for ws.ws_col <= SIZE_MAX. + Remove unnecessary cast to int. Use int instead of unsigned + int to count from 0 to 1. + (get_funky_string, print_type_indicator): Use char for bytes, not int. + (make_link_path): Use NULL for null pointers. + (quote_name): Use to_uchar instead of cast. + + * src/id.c (use_name, main, print_user, xgetgroups, print_group_list, + print_full_info): Use bool for booleans. + (problems): Remove, replacing with.... + (ok): New var (inverted from old sense). + (print_user, print_group, print_full_info): + Print uids/gids with %lu, not %u. + (xgetgroups): Don't run out of memory if getgroups or getugroups + returns -1. + * src/setuidgid.c (main): Print uids/gids with %lu, not %ld. + + * src/factor.c (wheel_tab): Use unsigned char instead of unsigned + int, since it suffices. + (factor, print_factors): Use size_t for sizes. + (print_factors, do_stdin, main): Use bool for booleans. + * src/fold.c (TAB_WIDTH): New macro; use it instead of "8". + (fold_file, main): Use bool for booleans. + (fold_file, main): Use size_t for sizes. + (main): Allow -w options up to SIZE_MAX - TAB_WIDTH - 1, instead + of prohibiting widths greater than INT_MAX. + * src/head.c (presume_input_pipe, print_headers, have_read_stdin, + write_header, elide_tail_bytes_pipe, elide_tail_bytes_file, + elide_tail_lines_pipe, elide_tail_lines_seekable, + elide_tail_lines_file, head_bytes, head_lines, head, head_file, + string_to_integer, main): + Use bool for booleans. + (main): Rewrite to avoid cast. + + * src/csplit.c (struct line): Use size_t for sizes. + (main): Remove unnecessary cast. + * src/cut.c (cut_fields): Use to_uchar rather than a cast. + * src/cut.c (cut_file, main): Use bool for booleans. + * src/date.c (show_date, rfc_format, batch_convert, main): Likewise. + * src/env.c (main): Likewise. + * src/expr.c (nextarg): Likewise. + * src/env.c (main): Remove unused and nonstandard envp arg. + + * src/fmt.c (COST, MAXWORDS): Add a comment describing some of + fmt's arbitrary limits. + (TRUE, FALSE): Remove; all uses changed to (true, false). + (main): Use bool for booleans. + Limit maximum width to MAXCHARS / 2. Use xstrtoul, not xstrtol, + to parse width. + (copy_rest): Remove unnecessary cast. + (get_prefix): Rewrite to avoid cast. + (check_punctuation): Use char *, not unsigned char *; C89 requires + this. Avoid off-by-one buffer read overrun when line is empty. + (flush_paragraph): Don't assume wptr-parabuf is <= INT_MAX. + Remove unnecessary casts. + * tests/fmt/basic (wide-1, wide-2, bad-suffix): Adjust to above + changes. + + * src/expand.c (convert_entire_line, have_read_stdin, parse_tabstops, + next_file, expand, main): + Use bool for booleans. + (tab_size, tab_list, add_tabstop, parse_tabstops, validate_tabstops, + expand, main): + Use uintmax_t for column counts. + (add_tabstop): Don't reserve -1 (now UINTMAX_MAX) as a special value. + All callers changed. + (parse_tabstops): Don't pass a negative char to isblank. + Avoid memory leak with large tab stops. + (validate_tabstops, expand): Don't assume number of tab stops is + <= INT_MAX. + (next_file, main): Use EXIT_SUCCESS/EXIT_FAILURE rather than 0/1 when + storing values into exit_status. + (expand): Use same pattern as unexpand for reading chars. + Report an error when input line is too long, instead of silently + screwing up. Do not mishandle tab stops when backspacing left + over start of line. + + * src/dircolors.c (have_read_stdin, append_quoted, + dc_parse_stream, dc_parse_file, main): Use bool for booleans. + (dc_parse_stream): Use enum for state, rather than int. + Use ssize_t to store getline result. + + * src/dd.c (translation_needed, parse_integer, scanargs, + apply_translations, char_is_saved, swab_buffer, skip_via_lseek): + Use bool for booleans. + (translate_buffer): Use to_uchar rather than a cast. + (swab_buffer, copy_simple, copy_with_unblock): + Use size_t for sizes. + + * src/seq.c (equal_width, valid_format, main): Use bool for booleans. + * src/sleep.c (apply_suffix): Likewise. + * src/tail.c (struct File_spec, reopen_inaccessible_files, count_lines, + forever, from_start, print_headers, have_read_stdin, valid_file_spec, + write_header, file_lines, pipe_lines, pipe_bytes, recheck, + tail_forever, tail_bytes, tail_lines, tail, tail_file, + parse_obsolescent_option, parse_options, main): Likewise. + * src/sleep.c (apply_suffix): Invert sense of result. + Use int (not unsigned int) for multiplier, as this generates better + code with some compilers. Simplify code a bit. + * src/tail.c (struct File_spec, max_n_unchanged_stats_between_opens, + parse_options): Use uintmax_t, not unsigned int or unsigned long int, + for state counters. + (tail_bytes, tail_lines): Redo test of return value (-1, 0, 1) to + make it a bit clearer. + + * src/hostname.c: Include "xgethostname.h". + (xgethostname): Remove decl; xgethostname.h has it. + (sethostname) [!defined(HAVE_SETHOSTNAME) && defined(HAVE_SYSINFO) + && defined (HAVE_SYS_SYSTEMINFO_H) && defined(HAVE_LIMITS_H)]: Use + prototypes rather than K&R form. Assume any negative value from + sysinfo denotes failure, not just -1. + (main): Simplify use of sethostname. + + * src/pinky.c (include_idle, include_heading, include_fullname, + include_project, include_plan, include_home_and_shell, do_short_format, + include_where, main): Use bool for booleans. + (count_ampersands, create_fullname, scan_entries, short_pinky): + Use size_t for sizes. + (create_fullname): Check for overflow in size calculations. + (idle_string): Don't assume that the number of idle days + is less than 10**8 and/or INT_MAX/(24*60*60). + (main): No need to pass a non-NULL last arg to getopt_long. + * src/uptime.c (print_uptime, uptime): Use size_t for sizes. + (print_uptime): Remove unused local variable. + (main): No need to pass a non-NULL last arg to getopt_long. + * src/users.c (list_entries_users, users): Use size_t for sizes. + (list_entries_users): Use char for bytes. + (main): No need to pass a non-NULL last arg to getopt_long. + * src/who.c (do_lookup, short_list, short_output, include_idle, + include_heading, include_mesg, include_exit, need_boottime, + need_deadprocs, need_login, need_initspawn, need_clockchange, + need_runlevel, need_users, my_line_only, main): Use bool for booleans. + (print_runlevel): Use unsigned char for bytes. + (list_entries_who, scan_entries, who): Use size_t for sizes. + (main): No need to pass a non-NULL last arg to getopt_long. + + * src/install.c (isdir): Remove decl. + (install_file_to_path): Rely on make_path to fail if the destination + is not a directory, by passing preserve_existing==true to it. + Hence we no longer need to call isdir. + Free dest_dir immediately when it's no longer needed, rather than + waiting until the end of the function. + (copy_file): Don't bother calling isdir, as copy will do the + right thing if the destination is a directory. + + * src/du.c (fts_debug, opt_all, apparent_size, opt_count_all, + print_grand_total, opt_separate_dirs, hash_ins, process_file, main): + Use bool for booleans. + (max_depth): Now size_t, not int, to avoid an arbitrary limit + of INT_MAX on depth. + (G_fail): Remove: no longer needed, now that the relevant + functions return bool. + (process_file): Use return value to signal success rather than + setting a global. Remove first_call static var; not needed, since + we can look at n_alloc. Use size_t for depths. Remove FIXME + about size_t casts, as it's now fixed. Use xnrealloc rather + than the obsolescent XREALLOC. Don't bother to check whether + reallocation is needed unless level > prev_level. + (du_files): Invert sense of result, for consistency with + other coreutils code. All callers changed. + (main): Allow --max-depth values up to SIZE_MAX. + + * src/df.c (inode_format, show_all_fs, show_local_fs, + show_listed_fs, posix_format, require_sync, print_type, + selected_fstype, excluded_fstype, show_dev, show_point, main): + Use bool for booleans. + (df_readable, show_dev): Use UINTMAX_MAX instead of -1. + (show_dev, show_point, main): + Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1. + Don't assume disk name lengths are <= INT_MAX. + Rewrite pct calculation to avoid cast. + (show_point): Don't assume resolved length is <= SSIZE_MAX. + + * src/cut.c (hash_int) [!defined UINTPTR_MAX]: Use size_t + instead of uintptr_t. + * src/shred.c (UINT_MAX_32_BITS): Remove. + (word32): Remove. All uses changed to uint32_t. + (isaac_seed_data): Remove unnecessary cast. + * src/system.h (ptr_align): Use size_t; in practice, this is just as + good as uintptr_t in checking for alignments, and has fewer + configuration hassles. + + * src/Makefile.am (localedir.h): Make it readonly; this + undoes part of the 2004-07-27 patch. + +2004-07-30 Paul Eggert <eggert@cs.ucla.edu> + + * src/sort.c (UCHAR): Remove; all uses changed to to_uchar. + (IS_THOUSANDS_SEP): Use bool when appropriate. + (numcompare, main): Use char, not int, when the value is always a char. + (numcompare): Remove "register"; compilers are smart enough these days. + * src/system.h (errno, CHAR_BIT): Remove decls; + no longer needed now we assume C89 or better. + Include <inttypes.h> before <stdint.h>, as it's the + Autoconf-recommended pattern. + (to_uchar): New inline function, moved here from tr.c. + Use full names for int types, e.g. "long int" rather than "long". + * src/tr.c (to_uchar): Remove; now in system.h. + (is_char_class_member): Use bool when appropriate. + + * src/mkdir.c (create_parents, main): Use bool when appropriate. + (main): Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1. + +2004-07-29 Paul Eggert <eggert@cs.ucla.edu> + + * src/mkfifo.c (main): Use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1. + + * src/chmod.c (recurse, force_silent, process_file, process_files, + main): Use bool when appropriate. + * src/cksum.c (cksum, main): Likewise. + * src/comm.c (hard_LC_COLLATE, only_file_1, only_file_2, both, + compare_files, main): Likewise. + + * src/copy.h (struct cp_options): Likewise. + * src/copy.c (copy_internal, is_ancestor, copy_dir, copy_reg, + same_file_ok, seen_file, copy_internal, valid_options, copy): Likewise. + * src/cp-hash.h (remember_created): Likewise. + * src/cp-hash.c (remember_created): Likewise. + * src/cp.c (struct dir_attr, flag_path, remove_trailing_slashes, + re_protect, make_path_private, target_directory_operand, do_copy, + cp_option_init, decode_preserve_arg, main): Likewise. + * src/install.c (isdir, change_timestamps, change_attributes, + copy_file, install_file_to_path, install_file_in_dir, + install_file_in_file, strip_files, dir_arg, cp_option_init, main, + change_attributes, change_timestamps): Likewise. + * src/mv.c (remove_trailing_slashes, rm_option_init, + cp_option_init, do_move, movefile, main): Likewise. + * src/remove.c (right_justify), full_filename_, AD_pop_and_chdir, + AD_push, prompt, remove_dir): Likewise. + * src/rm.c (rm_option_init, main): Likewise. + + * src/remove.c (top_dir, pop_dir, full_filename_): + Use size_t for sizes. + * src/cp.c (target_directory_operand): Do not clear *NEW_DST if stat + succeeds. It's not necessary in that case, as *NEW_DST is always + false already. + (do_copy): Rewrite slightly to avoid need for "unreachable" comment. + (main): Use EXIT_SUCCESS, EXIT_FAILURE instead of 0, 1. + * src/rm.c (main): Likewise. + + md5sum, sha1sum integer cleanups. + + * src/checksum.h: Don't include config.h, sys/types.h, stdio.h: + not needed. + (ALG_UNSPECIFIED): Remove. + (ALG_MDT): Don't make it equal to CHAR_MAX + 1; this isn't necessary. + * src/md5.c: Don't include any files other than checksum.h. + * src/sha1sum.c: Likewise. + * src/md5sum.c (OPENOPTS, have_read_stdin, status_only, warn, + bsd_split_3, split_3, hex_digits, digest_file, digest_check, main): + Use bool when appropriate. + (digest_check): Increase limit of number of input lines to + UINTMAX_MAX from INT_MAX. Diagnose any overflows of this counter. + Use ngettext instead of hard-to-i18nize hardcoded stuff for plurals. + +2004-07-28 Paul Eggert <eggert@cs.ucla.edu> + + * src/cat.c (exit_status): Remove. Now done by passing a boolean + 'ok' flag around. + (simple_cat, cat): Return true if successful. All callers changed. + (simple_cat, cat, main): Use bool for booleans. + (simple_cat): Use size_t for sizes. + (cat, main): Use the same names for parameters that we use for + long options, to avoid confusion. This inverts the sense of the + show_tabs (formerly output_tabs) and number_nonblank + (formerly numbers_at_empty_lines) variables. + (main): Don't mess up (due to integer overflow) if we are given + INT_MAX - INT_MIN + 1 options. + [O_BINARY]: Don't invoke isatty unless the other options require it. + (main): When deciding whether to use simple_cat, don't worry + about binary option; it's irrelevant. + + * src/dcgen: Remove comments, trailing white space, and empty + lines from the output strings, to save space. + Use a narrower type like 'unsigned char' for line lengths, if + that will do. + Make the output variables static, not extern. + + * src/chgrp.c (parse_group): Require base 10 when parsing + groups as integers. + (main): int -> bool when appropriate. + * src/chown.c (main): Likewise. + * src/chown-core.c: Include inttostr.h. + (UINT_MAX_DECIMAL_DIGITS, uint_to_string): Remove. + (gid_to_name, uid_to_name): Use imaxtostr/umaxtostr + instead of uint_to_string). + (describe_change): Instead of an int flag, use a char * + auxiliary; this avoids the need for casts. + Assume free (NULL) works. + (change_file_owner): Return true/false, not 0/-1, since + we don't set errno. All callers changed. + Use bool when appropriate. + (chown_files): Likewise. + * src/chown-core.h (chown_files): Likewise. + + * tests/chown/basic: Test for proper handling of uids like + "010", which must be parsed as decimal. + + * tests/misc/pwd: Don't assume that Perl's getpwd agrees with our + pwd when there are multiple names for the working directory + (which can happen with an automounter, sigh). + + * src/Makefile.am ($(SCRIPTS)): Don't depend on Makefile; + this causes Solaris 8 'make' to refuse to build "groups". + (localedir.h): Don't depend on Makefile: this causes Solaris + 8 'make' to build localedir.h unnecessarily. The dependence + on Makefile is ineffective anyway, since $(localedir) might + change even if Makefile hasn't. + + * src/remove.c (remove_dir): If we can't save the state of the + working directory, pretend we started from "/", not ".". + This avoids a bug on hosts like Solaris that don't let you + remove the working directory. + +2004-07-27 Paul Eggert <eggert@cs.ucla.edu> + + * src/printf.c (strtiomax, strtoumax): Declare if not already + declared: this fixes a portability bug with Solaris 8 + GCC. + (STRTOX): Parenthesize use of macro arg as expression. + (vstrtoimax, vstrtoumax, vstrtold): Remove now-unnecessary + parentheses. + * configure.ac: Check for declaration of strtoumax, for + src/printf.c. + + * src/Makefile.am (cp_LDADD, ginstall_LDADD, mv_LDADD, + pathchk_LDADD, rm_LDADD, test_LDADD): New vars, for eaccess. + + * tests/readlink/can-e: Don't assume that we can remove the + working directory: this isn't possible under Solaris 8, say. + * tests/readlink/can-f: Likewise. + * tests/readlink/can-m: Likewise. + + * src/copy.c (copy_internal): find_backup_file_name no longer + returns NULL, so don't bother to check for this. + * src/cp.c (do_copy): Likewise. + * src/ln.c (do_link): Likewise. + +2004-07-25 Paul Eggert <eggert@cs.ucla.edu> + + * src/nice.c (GET_NICE_VALUE): Renamed from GET_PRIORITY. + All uses changed. + (NZERO): New macro, if system doesn't define it already. + (usage): Distinguish priorities from nice values. + Don't assume NZERO is 20. + (main): Use bool instead of int where appropriate. + If user specifies an adjustment out of range, always truncate it + to an inrange value instead of sometimes giving an error message + and sometimes not. + Do not assume that -1 is an error return from "nice" or + "getpriority", as it might be the current nice value minus NZERO. + If nice/setpriority fails with errno == EPERM, go ahead and run + the command anyway; POSIX requires this. + + * src/pathchk.c: Include euidaccess.h. + (dir_ok): Use euidaccess, not access. + * src/test.c (R_OK, W_OK, X_OK, FOK): Remove; system.h defines them. + (eaccess): Remove. All users changed to use euidaccess instead. + +2004-07-24 Paul Eggert <eggert@cs.ucla.edu> + + * src/uptime.c (print_uptime) [defined BOOT_MSG]: + Don't assume ut_line is null-terminated. + * src/who.c (print_line): New arguments USERLEN and LINELEN, + since USER and LINE might not be null terminated. All callers + changed. + +2004-07-23 Paul Eggert <eggert@cs.ucla.edu> + + Fix bug with "tail -f" reported by Rob Holland in + <http://lists.gnu.org/archive/html/bug-coreutils/2004-07/msg00054.html>. + Also, remove the undocumented and unsupported-since-2000 + --max-consecutive-size-changes options. Fix another related bug: + "tail" got confused if stdin, stdout, or stderr were closed. + Also, use output buffering even with "tail -f". + + * NEWS: Document this, plus yesterday's patch. + * doc/coreutils.texi (tail invocation): "size has remained the same" + -> "file has not changed", which is more accurate for fifos. + * src/tail.c: Include fcntl-safer.h. + (COPY_TO_EOF): Set to UINTMAX_MAX, not OFF_T_MAX (which was wrong). + (COPY_A_BUFFER): New macro. + (struct File_spec): New members mtime, mode, blocking. + Remove member n_consecutive_size_changes. + (DEFAULT_MAX_N_CONSECUTIVE_SIZE_CHANGES, + max_n_consecutive_size_changes_between_opens, + MAX_CONSECUTIVE_SIZE_CHANGES_OPTION): Remove. + (long_options, tail_forever, parse_options): + Remove (non-)support for --max-consecutive-size-changes. + (record_open_fd): New function. + (recheck, tail_file): Use it. Don't assume that stdin is open. + (dump_remainder): Add support for new COPY_A_BUFFER special value. + Treat errno==EAGAIN like EOF, since it might be a nonblocking read. + (recheck): New arg BLOCKING, specifying whether to use blocking reads. + All uses changed. + (n_live_files): Remove, replacing with... + (any_live_files): New function. All uses changed. + (tail_forever): Use nonblocking I/O unless we know that blocking I/O + is safe; this avoids some hangs when reading from a fifo. + Avoid invoking fstat or sleep when using blocking I/O. + Do not check for changes to size if the file is not a regular file, + as the size is undefined in that case. + Check for changes to mtime or mode, too; this works for non-regular + files. + (tail_forever, main): Redo fflush strategy to work even when input + is nonblocking. Don't use unbuffered output; just flush when needed. + +2004-07-22 Paul Eggert <eggert@cs.ucla.edu> + + * src/tail.c (main): Ignore -f if no file operand is specified + and standard input is a pipe. + * doc/coreutils.texi (tail invocation): Do not ignore -f for + all pipes, just for when standard input is a pipe and no + file operand is specified. + * tests/tail/Test.pm: Reinstate f-1 test, since we now pass. + Add a new commented-out f-2 test, which we still fail. + (test_vector): All f-* tests are special cases, not just f-1. + +2004-07-12 Paul Eggert <eggert@cs.ucla.edu> + + * src/uptime.c: Include c-strtod.h. + (print_uptime): Use c_strtod instead of setlocale and sscanf. + Use long int rather than int to count days (for 64-bit hosts), + and check for arithmetic overflow when converting double to time_t. + +2004-07-11 Paul Eggert <eggert@cs.ucla.edu> + + * src/printf.c (vstrtold): Renamed from vstrtod. + Now returns long double. All uses changed. + (print_direc): Use "L" length modifier when printing floating point + numbers, since we're now printing long double. + +2004-07-06 Paul Eggert <eggert@cs.ucla.edu> + + printf cleanup, to avoid undefined behavior, to add support for + formats that Bash supports, and to support wide integers like + Bash does. + + * NEWS: Document this. + * src/printf.c (UNSPECIFIED): Remove. All uses now replaced by + booleans, so that we don't reserve any values for precision or + width (like Bash). + (STRTOX): Use prototype, not K&R-style definition. + (vstrtoimax): Renamed from xstrtol (to avoid confusion with xstrtol + in ../lib), with type change to intmax_t. + All uses changed. + (vstrtoumax): Renamed from xstrtoul, with type change to uintmax_t. + All uses changed. + (vstrtod): Renamed from xstrtod. All uses changed. + (print_direc): Use boolean arg instead of special value to indicate + a missing precision or width. LENGTH no longer includes + length modifiers or conversion character. New arg CONVERSION + now specifies conversion character. + Use intmax_t-width formatting for integers (like Bash). + Add support for C99 %a, %A, %F (like Bash). + Add support for field width with %c (POSIX requires this). + Add a FIXME for lack of support for field width and precision + for %b. + Add support for '\'', '0' flags. + Check for invalid combinations of flags, field width, precision, + and conversion, to prevent use of undefined behavior. + Allow multiple length modifiers, for formats like "%lld" (like Bash). + Add support for C99 'j', 't', 'z' length modifiers (like Bash). + In error message, output entire invalid conversion specification, + instead of merely outputting % followed by the conversion char. + * tests/misc/printf: Add tests for the above. + +2004-04-03 Dmitry V. Levin <ldv@altlinux.org> + + Change "readlink -f" to be more compatible with prior implementations. + Add more canonicalize options, -e and -m. + Add comprehensive tests for all readlink modes. + + * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): + Do not add canonicalize.c here. + + * src/readlink.c (longopts): Add new options. + (usage): Document them. + (canonicalize_fname): New proxy function. + (main): Handle new options. + * doc/coreutils.texi (readlink invocation): Document new + "readlink -f" behaviour and new canonicalize options, -e and -m. + + * configure.ac (AC_CONFIG_FILES): Add tests/readlink/Makefile. + * tests/Makefile.am (SUBDIRS): Add readlink. + * tests/readlink/Makefile.am: New file. + * tests/readlink/{rl-1,can-e,can-f,can-m}: New readlink tests. + * tests/misc/Makefile.am (TESTS): Remove basic readlink test. + * tests/misc/readlink: Remove file. + +2004-07-04 Jim Meyering <jim@meyering.net> + + * src/copy.c (copy_internal): Add a FIXME comment. + +2004-07-02 Paul Eggert <eggert@cs.ucla.edu> + + * src/copy.c (copy_dir): Assume path_concat returns non-NULL. + * src/cp.c (do_copy): Likewise. + * src/mv.c (movefile): Likewise. + + * src/cp.c (make_path_private): 2nd arg is now size_t, not int, + to avoid problem when path_concat dir name is longer than 2 GiB (!). + + * src/nohup.c (main): Don't pass NULL first argument to path_concat. + This cleans up the semantics a bit, as we no longer try to open the + same file twice. + +2004-07-01 Paul Eggert <eggert@cs.ucla.edu> + + * NEWS: Add short names -t and -T for --target-directory + and --no-target-directory options, respectively. + + * src/cp.c (NO_TARGET_DIRECTORY_OPTION, TARGET_DIRECTORY_OPTION): + Remove. All uses changed to 'T' and 't', respectively. + * src/install.c, src/ln.c, src/mv.c: Likewise. + + * src/cp.c (long_opts, usage, do_copy, main): Add -t and -T as + aliases for --target-directory and --no-target-directory, + respectively. + * src/install.c (long_options, main, usage): Likewise. + * src/ln.c, src/mv.c: Likewise. + +2004-07-01 Jim Meyering <jim@meyering.net> + + * Makefile.maint (sc_file_system): New target. + (syntax-check-rules): Add it. + .x-sc_file_system: New file. + * Makefile.am (EXTRA_DIST): Add it. + + * man/sync.x: Use "file system" rather than "filesystem". + * man/stat.x, man/df.x: Likewise. + +2004-06-30 Paul Eggert <eggert@cs.ucla.edu> + + * src/df.c (usage, main): Output "file system" rather than + "filesystem". + * src/du.c (usage): Likewise. + * src/shred.c (usage): Likewise. + * src/stat.c (usage): Likewise. + * src/stat.c (long_options, usage): Rename "--filesystem" to + "--file-system". But keep the old name around, for compatibility + reasons. + +2004-06-29 Paul Eggert <eggert@cs.ucla.edu> + + Add support for --no-target-directory option. + + * NEWS: Document it. + * doc/coreutils.texi (Common options, Target directory, cp + invocation, install invocation, mv invocation, ln invocation): + Likewise. + (link invocation): Explain how to rewrite link using ln now + that we have --no-target-directory. + (ln invocation): Explain that --no-target-directory subsumes + --no-dereference. + (unlink invocation): Modify wording to match new wording in + link invocation. + + * src/cp.c (NO_TARGET_DIRECTORY_OPTION): New constant. + (long_opts, usage, do_copy, main): Add support for + --no-target-directory, + * src/install.c (NO_TARGET_DIRECTORY_OPTION, long_options, main, + usage): Likewise. + * src/ln.c (NO_TARGET_DIRECTORY_OPTION, long_options, usage, + main): Likewise. + * src/mv.c (NO_TARGET_DIRECTORY_OPTION, long_options, usage, + main): Likewise. + * src/mv.c (enum): Sort values. + +2004-06-29 Jim Meyering <jim@meyering.net> + + Don't let verbose-mode output from a subshell obscure actual differences. + * tests/rm/inaccessible: Turn off command-echoing just before + invoking subshell, then turn it back on if VERBOSE=yes afterward. + +2004-06-25 Paul Eggert <eggert@cs.ucla.edu> + + Add support for 'install --target-directory', an option + that has been documented for years but not implemented (!). + * doc/coreutils.texi (install invocation): Document + --target-directory in synopsis, too. + * src/install.c (TARGET_DIRECTORY_OPTION): New var. + (long_options, main, usage): Add --target-directory. + (target_directory_operand): New function, stolen from mv.c. + (main): Use it. Check for -d and --target-directory. + Alter wording of diagnostics to match other programs. + +2004-06-28 Jim Meyering <jim@meyering.net> + + * src/cp.c (usage): Fix copy+paste error in description of + --target-directory: s/move/copy/. From Paul Jarc. + +2004-06-27 Paul Eggert <eggert@cs.ucla.edu> + + Use more-consistent rules among cp, ln, and mv when dealing with + last operands that are (or look like) directories. + + * src/cp.c (target_directory_operand): New, nearly-common function, + It reports an error if the destination appears to be a directory + (e.g., because it has a trailing slash) but is not. + * src/ln.c, src/mv.c: Likewise. + * src/cp.c (do_copy): Use it. + * src/ln.c (main): Likewise. + * src/mv.c (main): Likewise. + + * src/cp.c (do_copy): Don't assume argc is positive. + Don't bother to lstat dest, since copy() will do that for us. + Use "const" to avoid the need for cast. + + * src/cp.c (do_copy): Don't output a usage message because of file + problems (e.g., an operand is not a directory). Use it only for + syntax. Standardize on "target %s is not a directory" for the + diagnostic. + * src/ln.c (main): Likewise. + * src/mv.c (main): Likewise. + + * src/cp.c (do_copy): Remove test for trailing slash, since + target_directory_operand now does this. + * src/ln.c (main): Likewise. + * src/mv.c (movefile): Likewise. + + * src/cp.c (main): Reject multiple target directories. + Check whether a specified target is a directory when parsing the + options, using stat. This gives more-accurate diagnostics. + * src/ln.c (main): Likewise. + + * src/ln.c (isdir): Remove decl; no longer needed. + * src/mv.c (isdir, lstat): Likewise. + + * src/ln.c (do_link): New arg dest_is_dir. All uses changed. + Don't check the destination ourself; rely on dest_is_dir. + This way we can avoid lstatting the destination in the + usual case, and in the worst case we lstat 1, not 3 times. + Don't bother to unlink unless link failed; this saves a syscall. + Remove unnecessary backup_succeeded flag; + it was identical to "dest_backup != NULL". + + * src/ln.c (main): Use int to count to argc, not unsigned int. + This handles negative operand counts. + * src/mv.c (main): Likewise. + + * src/mv.c (do_move): Don't call hash_init; expect the caller to + do it, for consistency with cp.c and ln.c. All callers changed. + (movefile): dest_is_dir parameter is now bool, not int. + (main): Standardize on "missing destination file operand after %s" + for the diagnostic, for consistency with cp.c. + + * tests/mv/diag: Don't assume "mv --target=nonexistentdir" + will complain about the arg count. + Adjust to new (briefer) diagnostics. + * tests/cp/fail-perm: Add a test to verify that we get the new + diagnostic when failing to copy through a symlink-to-inaccessible-dir. + +2004-06-27 Paul Eggert <eggert@cs.ucla.edu> + + Fix a bug: formerly, if d/x was a directory and x a file, "ln x + d/" incorrectly created a link d/x/x. It also saves some system + calls. + + * NEWS: Document the fix. + + * src/ln.c (main): Don't append basename to dest if this + results in an existing directory name. + * tests/ln/misc: See whether a trailing slash is followed too far. + +2004-06-26 Jim Meyering <jim@meyering.net> + + * src/printf.c (main): When given no arguments, print the standard + "missing operand\nTry printf --help..." message -- to be consistent. + +2004-06-26 Jim Meyering <jim@meyering.net> + + * src/mknod.c (main): Add \n at the end of message output via fprintf. + +2004-06-25 Jim Meyering <jim@meyering.net> + + * tests/ln/misc: Add test for ln subscript error. + +2004-06-23 Paul Eggert <eggert@cs.ucla.edu> + + * src/ln.c (do_link): Remove unnecessary call to lstat. + (main): Avoid subscript error when the destination is "". + +2004-06-23 Jim Meyering <jim@meyering.net> + + * tests/*: Replace all occurrences of `(exit N); exit' with + `(exit N); exit N'. Otherwise, those many tests could exit with + improper exit status when exiting via e.g., a trapped interrupt. + Thanks to a report from Bob Proulx. + +2004-06-22 Paul Eggert <eggert@cs.ucla.edu> + + * src/who.c (idle_string, print_user): New arg boottime, + specifying the most recent boot time. All uses changed. + (idle_string) Consider a line to be "old" if it hasn't been used + since the last boot time. Watch out for overflow when computing + times, and for times in the future. + (idle_string): Record latest boot time. + +2004-06-22 Jim Meyering <jim@meyering.net> + + * src/test.c (usage): Correct description of `-t FD'. The file + descriptor, FD, is no longer optional. Reported by Ton Nijkes. + +2004-06-21 Paul Eggert <eggert@cs.ucla.edu> + + The 2004-06-19 fix for who and pinky was incomplete, as ctime + has undefined behavior if the year precedes -999 or follows 9999. + Since we have to stop using ctime anyway, we might as well use + strftime and fix the FIXME, and support internationalized dates. + + * NEWS: Document the new behavior. + * src/who.c: Include "hard-locale.h". + (time_format, time_format_width): New vars. + (time_string, print_line): Use them. + (main): Set them. + (time_string): Use localtime + strftime instead of + ctime, to avoid problems with years before -999 or after 9999. + * src/pinky.c: Likewise. + +2004-06-21 Paul Eggert <eggert@cs.ucla.edu> + + Fix bug: GNU 'ls' didn't count columns correctly if user or group + names contained multibyte characters where the column count + differed from the byte count. This patch also corrects + some comments. + + * src/ls.c (format_user_or_group): New function, which counts + columns correctly. + (format_user, format_group): Use it. + (format_user_or_group_width): New function, which counts columns + correctly. + (format_user_width, format_group_width): Use it. + +2004-06-21 Jim Meyering <jim@meyering.net> + + * tests/priv-check: Quote "$PATH" in PATH=$PATH. + Suggestion from Andreas Schwab. + + * tests/priv-check: When running as root, be sure to propagate + PATH through to the process we exec as non-root. + Reported by michael@aplatform.com. + + * src/mknod.c (main): Don't segfault when calculating the + expected number of operands for `mknod NAME'. + +2004-06-20 Jim Meyering <jim@meyering.net> + + * src/dd.c (input_seek_errno): Declare file-scoped variable as static. + +2004-06-20 Paul Eggert <eggert@cs.ucla.edu> + + * src/basename.c (main): + Standardize on the diagnostics given when someone gives + too few operands ("missing operand after `xxx'") or + too many operands ("extra operand `xxx'"). + Include "quote.h" and/or "error.h" if it wasn't already being included. + * src/chgrp.c (main): Likewise. + * src/chmod.c (main): Likewise. + * src/chown.c (main): Likewise. + * src/chroot.c (main): Likewise. + * src/comm.c (main): Likewise. + * src/cp.c (do_copy): Likewise. + * src/csplit.c (main): Likewise. + * src/date.c (main): Likewise. + * src/dircolors.c (main): Likewise. + * src/dirname.c (main): Likewise. + * src/du.c (main): Likewise. + * src/expr.c (main): Likewise. + * src/hostid.c (main): Likewise. + * src/hostname.c (main): Likewise. + * src/id.c (main): Likewise. + * src/install.c (main): Likewise. + * src/join.c (add_file_name, main): Likewise. + * src/link.c (main): Likewise. + * src/ln.c (main): Likewise. + * src/logname.c (main): Likewise. + * src/md5sum.c (main): Likewise. + * src/mkdir.c (main): Likewise. + * src/mkfifo.c (main): Likewise. + * src/mknod.c (main): Likewise. + * src/mv.c (main): Likewise. + * src/nohup.c (main): Likewise. + * src/od.c (main): Likewise. + * src/pathchk.c (main): Likewise. + * src/ptx.c (main): Likewise. + * src/readlink.c (main): Likewise. + * src/rm.c (main): Likewise. + * src/rmdir.c (main): Likewise. + * src/seq.c (main): Likewise. + * src/setuidgid.c (main): Likewise. + * src/shred.c (main): Likewise. + * src/sleep.c (main): Likewise. + * src/sort.c (main): Likewise. + * src/split.c (main): Likewise. + * src/stat.c (main): Likewise. + * src/test.c (beyond, main): Likewise. + * src/touch.c (main): Likewise. + * src/tr.c (main): Likewise. + * src/tsort.c (main): Likewise. + * src/tty.c (main): Likewise. + * src/uname.c (main): Likewise. + * src/uniq.c (main): Likewise. + * src/unlink.c (main): Likewise. + * src/uptime.c (main): Likewise. + * src/users.c (main): Likewise. + * src/who.c (main): Likewise. + * src/whoami.c (main): Likewise. + + * tests/basename/basic: Adjust to new diagnostics. + * tests/du/files0-from: Likewise. + * tests/expr/basic: Likewise. + * tests/mv/diag: Likewise. + * tests/tsort/basic-1: Likewise. + +2004-06-20 Jim Meyering <jim@meyering.net> + + * src/ln.c: Remove declaration of yesno. + Instead, include yesno.h. + * src/copy.c: Likewise. + + * src/remove.c: Remove declaration of yesno. + Instead, include yesno.h. + (top_dir): Remove now-unnecessary cast of obstack_base. + (pop_dir): Likewise. + (full_filename_): Likewise. + +2004-06-19 Paul Eggert <eggert@cs.ucla.edu> + + Don't dump core if ctime returns NULL; this is possible on + hosts with 64-bit time_t and 32-bit int. + * src/who.c: Include "inttostr.h". + (time_string): If ctime fails, print the raw time as an integer + instead of dumping core. + * src/pinky.c: Likewise, as follows: + Include "inttostr.h". + (time_string): New function, copied from who.c. + (print_entry): Use it. + +2004-06-19 Paul Eggert <eggert@cs.ucla.edu> + + * src/who.c (print_line): Don't truncate user names at 8 bytes. + Problem reported by Guido Leenders in: + http://lists.gnu.org/archive/html/bug-coreutils/2004-06/msg00056.html + * NEWS: document this. + +2004-06-19 Jim Meyering <jim@meyering.net> + + * src/system.h (case_GETOPT_VERSION_CHAR): Switch back to + using GNU_PACKAGE (from PACKAGE) once again. This restores + `GNU' to the parenthesized package name in --version output. + Before, the first argument from AC_INIT, `GNU coreutils', would + be propagated to the PACKAGE variable. Now, `GNU ' is trimmed. + Reported by Richard Stallman. + +2004-06-17 Jim Meyering <jim@meyering.net> + + * src/tr.c (to_uchar): Rename function from `uchar'. The latter + would clash with a typedef in Tru64's <sys/types.h>. From Albert Chin. + +2004-06-15 Paul Eggert <eggert@cs.ucla.edu> + + * NEWS: Remove more special cases for POSIXLY_CORRECT when POSIX + allows the GNU behavior. "--" is now supported by chroot, hostid, + hosname, pwd, sync, yes. + * doc/coreutils.texi (yes invocation, false invocation, + true invocation): Document this. + * src/chroot.c (main): Handle "--". + * src/hostid.c (main): Likewise. + * src/hostname.c (main): Likewise. + * src/pwd.c (main): Likewise. + * src/sync.c (main): Likewise. + * src/yes.c (main): Likewise. + * src/true.c (main): Recognize --help and --version even if + POSIXLY_CORRECT is set. + * src/yes.c (main): Likewise. + +2004-06-09 Paul Eggert <eggert@cs.ucla.edu> + + * NEWS: Remove special cases for POSIXLY_CORRECT when POSIX allows + the GNU behavior. + * doc/coreutils.texi (pr invocation, unlink invocation): Document this. + * src/ls.c (decode_switches): Pay attention to TABSIZE even if + POSIXLY_CORRECT is set. POSIX reserves upper-case environment + variables to the implementation, so it's OK for ls to depend on + TABSIZE. + * src/pr.c: Include "hard-locale.h". + (main): When in a non-POSIX locale, ignore POSIXLY_CORRECT, since + POSIX specifies the behavior only in the POSIX locale. + * src/printf.c (print_esc): Support \x, \u, \U even if POSIXLY_CORRECT, + since POSIX says the behavior is unspecified here. + * src/tail.c (parse_obsolescent_option): Support multiple file operands + even if POSIXLY_CORRECT, since POSIX does not require a diagnostic. + * src/printf.c (main): Recognize --help, --version even if + POSIXLY_CORRECT. POSIX does not specify any options, but it + does not prohibit options either, so "printf" is like "expr" here. + * src/unlink.c (main): Likewise. + * tests/misc/printf: Adjust to the new semantics for \x if + POSIXLY_CORRECT. + +2004-06-14 Jim Meyering <jim@meyering.net> + + * tests/misc/pwd: New test, for fix of 2004-04-19. + * tests/misc/Makefile.am (TESTS): Add pwd. + (BUILD_SRC_DIR): Define BUILD_SRC_DIR. + + * src/copy.c: Remove declaration of euidaccess. + Instead, include "euidaccess.h". + +2004-06-13 Paul Eggert <eggert@cs.ucla.edu> + + * src/who.c (PIDSTR_DECL_AND_INIT): Don't assume pid_t fits in int. + (UT_ID) [!HAVE_STRUCT_XTMP_UT_ID]: Remove bogus comment, + as (sizeof "??") reliably returns 3. + (print_line): Guard against idle and pid being too long + (which is possible when printing headers). + (print_user): Allocate enough bytes for idlestr. Use IDLESTR_LEN. + Avoid unnecessary cast of sizeof to int. + (make_id_equals_comment): Do not assume that UT_ID returns + a string; it might return a non-null-terminated array. + Use strncat instead. It's not very often where strncat is + exactly what you want, but this is one of those rare cases. + +2004-06-11 Paul Eggert <eggert@cs.ucla.edu> + + * src/who.c (list_entries_who): Don't output a trailing space. + +2004-06-09 Jim Meyering <jim@meyering.net> + + * src/touch.c (usage): Improve wording in description of the + --time=WORD option. Reported by Dan Jacobson. + + * src/chown-core.c (change_file_owner): Change names of parameters + old_uid and old_gid to required_uid and required_gid respectively. + + * src/chmod.c (mode_changed): Return false, not 0, now that the + function returns `bool'. + +2004-06-08 Paul Eggert <eggert@cs.ucla.edu> + + Adjust chmod and chown to be similar if -c or -v are given. In + particular, a no-op chown is no longer reported as a change; this + reverts to previous behavior. Also, fix both commands so that -v + report failures even if the failure is not due to the chmod or + chown syscalls. + + * src/chmod.c (CH_NOT_APPLIED): New constant. + (describe_change): Handle it. + (process_file): Use it, if a symlink wasn't changed. + (mode_changed): Return bool, not int. Accept new argument + NEW_MODE; all callers changed. This lets us avoid statting the + file unless the new mode has unusual bits. + (process_file): Return -1 on error. With -v, report all errors + verbosely, not just some. + + * src/chown-core.c (change_file_owner): Return -1 on error, not + 1 sometimes and -1 on others. Our caller ORs together our results, + and (-1 | 1) == 0 on ones-complement hosts. + With -v report all errors verbosely, not just some. + Fix bug when chopt->root_dev_ino && !chopt->affect_symlink_referent: + file_stats wasn't set properly in that case. + + * tests/chgrp/basic: Adjust to above changes. + +2004-05-20 Paul Eggert <eggert@cs.ucla.edu> + + * tests/chgrp/basic: Test that chgrp -h does not fail on + symlinks, even on hosts where that's not supported. + Test that if -R is specified without -H or L, -h is assumed. + Test that chown() is not optimized away. + +2004-05-18 Paul Eggert <eggert@cs.ucla.edu> + + Several fixes to chgrp and chown for compatibility with POSIX and BSD: + + Check for incompatible options. When -R and --dereference are + both used, then either -H or -L must also be used. When -R and -h + are both used, then -P must be in effect. + + -H, -L, and -P have no effect unless -R is also specified. + If -P and -R are both specified, -h is assumed. + + Do not optimize away the chown() system call when the file's owner + and group already have the desired value. This optimization was + incorrect, as it failed to updated the last-changed time and reset + special permission bits, as POSIX requires. + + Do not report an error if the owner or group of a + recursively-encountered symbolic link cannot be updated because + the file system does not support it. + + * NEWS: Document the above. + + * src/chgrp.c (main): Check for incompatible options. -R --dereference + requires either -H or -L, and -R -h requires -P. If -H, specify + FTS_PHYSICAL as well as FTS_COMFOLLOW; this is faster. Make this + file as much like chown.c as possible. + * src/chown.c (main): Likewise. + + * src/chown-core.c (change_file_owner): Use ent->fts_statp only if + needed. Chown a directory only after chowning its children; this + avoids problems if the new directory ownership doesn't permit + access to the children. Dereference symlinks before doing + ROOT_DEV_INO_CHECK, not after, so that we catch symlinks to /. + Do not optimize away the chown() system call when the file's owner + and group already have the desired value. POSIX does not permit + this optimization. Rely on chown and lchown to do the right + thing with symlinks and/or -1 arguments, now that we have wrappers + to do this. Use ENOTSUPP not ENOSYS, and ignore all ENOTSUPP + errors, not just command-line errors. + (chown_files): Pass FTS_NOSTAT to xfts_open if we don't need file status. + + * src/system.h (ENOTSUP): Remove. + + * tests/chgrp/basic: Use chown --from to discover whether the + group changed, since chgrp now changes unconditionally. This + complicates the sed script a bit. Do not specify --dereference, + since it's the default (and we want to test this). Adjust output + to match the fact that chgrp no longer optimizes the case of + changing a file's group to the same value as before. + * tests/chgrp/posix-H: Do not attempt to combine -h and -H; these + options are incompatible, and their behavior is undefined with POSIX. + (changed, not_changed): Adjust to match the fact that -h is no longer + specified. Sort names. + * tests/chown/deref: Adjust error-diagnostic spelling to match new + behavior. + +2004-06-07 Paul Eggert <eggert@cs.ucla.edu> + + * src/uname.c (main): Fix typo introduced on 2003-05-10 that + prevented a diagnostic of any operands. + +2004-06-08 Jim Meyering <jim@meyering.net> + + * src/shred.c (direct_mode): Turn it on/off with directio, too. + +2004-06-07 Jim Meyering <jim@meyering.net> + + Enable direct-mode I/O (bypassing the buffer cache), if possible. + Prompted by a suggestion from Kalle Olavi Niemitalo + in http://bugs.debian.org/207035. + * src/shred.c (direct_mode): New function. + (do_wipefd): Turn on direct-mode I/O. + (dopass): If a file's first write fails with EINVAL, + turn off direct-mode I/O and retry the write. + +2004-06-05 Paul Eggert <eggert@cs.ucla.edu> + + * src/tr.c (main): "tr -d a b" is now a fatal error even if + POSIXLY_CORRECT is set. The POSIX SYNOPSIS does not allow this + option combination. + +2004-06-04 Paul Eggert <eggert@cs.ucla.edu> + + * src/shred.c (dopass): Don't subtract 1 from the offset after + a write error. Problem reported by Jon Peatfield in: + http://lists.gnu.org/archive/html/bug-coreutils/2004-06/msg00020.html + +2004-06-02 Paul Eggert <eggert@cs.ucla.edu> + + Fix bug reported by Buciuman Adrian in + <http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00105.html> + where 'dd' created a file that was too large. The bug was that dd + assumed that the input file offset does not advance after a failed + read; but POSIX says that the input file offset is undefined after + a failed read. + + * src/dd.c (MAX_BLOCKSIZE): New macro. + (input_seekable, input_seek_errno, input_offset, + input_offset_overflow): New vars. + (scanargs): Reject block sizes greater than MAX_BLOCKSIZE. + (advance_input_offset): New function. + (skip_via_lseek): Set errno to zero when reporting our failure, + so that we don't report based on garbage errno. + (skip): If fdesc is standard input, advance the input offset. + Do not quit if reading, and if noerror was specified; + POSIX seems to require this. + If read fails on output file, report the earlier lseek failure + instead; this fixes a FIXME in dd_copy. + (advance_input_after_read_error): New function. + (dd_copy): Use it, instead of assuming that failed reads + do not advance the file pointer. Advance input offset + after nonfailed reads. Advance only a partial block if + the previous read (before the failed read) succeeded, and + do not generate an output block of zeros in this case. + (main): Determine initial input offset, seekability of input, + and error if it wasn't seekable. + +2004-06-02 Jim Meyering <jim@meyering.net> + + rm (without -f) could hang unnecessarily when attempting to + remove a symlink to a file on an off-line NFS-mounted partition. + Reported by David Howells in https://bugzilla.redhat.com/124699. + * src/remove.c (write_protected_non_symlink): New function. + Don't invoke euidaccess on symlinks. + (prompt): Use write_protected_non_symlink rather than using + euidaccess directly, being careful not to call lstat twice for a file. + + Fix a bug in how the --output-delimiter=D option works with + abutting byte or character ranges. Reported by David Krider in + http://lists.gnu.org/archive/html/bug-coreutils/2004-05/msg00132.html + * src/cut.c (print_kth): Remove special case for open-ended range. + (set_fields): Record the range start index for an interval even + when it abuts another interval on its low side. + Also record the range start index of the longest right-open-interval. + * tests/cut/Test.pm: Add tests of --output-delimiter=S with + abutting and overlapping byte ranges. + +2004-06-01 Paul Eggert <eggert@cs.ucla.edu> + + Some POSIX-conformance cleanups for tr. + + * src/tr.c (posix_pedantic): Remove; no longer needed since + we need to test this in just one place now. + (usage): Mention -C. + (unquote): Note that \055, \n, etc are escaped. + Do not worry about POSIXLY_CORRECT when warning about ambiguous + escape sequences. + \ at end of string stands for itself. + Do not diagnose invalid backslash escapes: POSIX says the behavior + is unspecified in this case, so we don't need to diagnose it. + (main): Add support for -C (currently an alias for -c). + Do not diagnose 'tr [:upper:] [:upper:], as POSIX does not require + a diagnostic here. + * tests/tr/Test.pm: New tests bs-055, bs-at-end, repeat-Compl. + Fix comment for range-a-a. + +2004-05-25 Paul Eggert <eggert@cs.ucla.edu> + + Improve the efficiency (and in one case, correctness) of code + that reads symlinks. + + * src/copy.c (copy_internal): Don't use alloca, as it can mess up + royally if the link length is long (e.g., GNU/Hurd). Use + xreadlink instead, it's safer. Don't bother to read the link if + it's the wrong size. Add a FIXME because this area is a bit murky + and undocumented. + * src/ls.c (get_link_name): Update use of xreadlink. + * src/readlink.c (main): Likewise. + * src/stat.c (print_stat): Likewise. + +2004-06-01 Jim Meyering <jim@meyering.net> + + * src/env.c (main): Prefer the notation `STREQ (a, b)' + over `!strcmp (a, b)'. + * src/sort.c (main, sort_buffer_size): Prefer the notation + `STREQ (a, b)' over `strcmp (a, b) == 0'. + * src/date.c (batch_convert): Likewise. + * src/expr.c (nextarg): Likewise. + * src/su.c (correct_password, restricted_shell, main): Likewise. + * src/ptx.c (swallow_file_in_memory, main): Likewise. + * src/test.c (binary_operator, and, or, main): Likewise. + +2004-05-13 Paul Eggert <eggert@cs.ucla.edu> + + * NEWS: echo compatibility cleanup. + * doc/coreutils.texi (echo invocation): Document the changes. + * src/echo.c (V9_ECHO): Remove; always enabled. + (DEFAULT_ECHO_TO_XPG): Renamed from V9_DEFAULT, so that + we use the same naming convention as bash. Now an enum, + not a macro. + (usage): Reword to mention -e/-E more accurately. + Mention \0NNN (the POSIX syntax) rather than \NNN (nonstandard). + (hextobin): New function. + (main): Use bool rather than int for local vars when appropriate. + Do not allow options if POSIXLY_CORRECT, unless we are using + BSD semantics and the first argument is "-n". + Don't pass unnecessary extra arg to parse_long_options. + do_v9 now defaults to DEFAULT_ECHO_TO_XPG, not to allow_options. + Do not look for options if !allow_options. + Use size_t rather than int when appropriate. + Open-code option test rather than using strrchr. + Use faster test for "-". + Avoid redundant argc test. + Add support for \x, for Bash compatibility. + Use e.g. '\a' rather than '\007', for portability to EBCDIC hosts. + When '\c' is encountered, stop printing immediately, as POSIX + requires. + Add support for \xhh syntax. + Add support for \0ooo syntax; POSIX requires this. + +2004-06-01 Jim Meyering <jim@meyering.net> + + * Use automake-1.8b. Regenerate dependent files. + +2004-05-31 Jim Meyering <jim@meyering.net> + + * tests/Makefile.am.in (TESTS_ENVIRONMENT): Define PATH to include + the build src/ directory -- at the front. + ($(srcdir)/$x-tests): Depend on Makefile.am. + Use $x as the program name, except when it would be `test' (test is + the sole program tested via mk-script that is also a shell built-in). + In that case, use the old ../../src/$x. + +2004-05-30 Jim Meyering <jim@meyering.net> + + Work around HPUX /bin/cc compiler bug that is exposed, now that + sets are arrays of type `bool'. More details here: + http://lists.gnu.org/archive/html/bug-gnulib/2004-05/msg00094.html + FIXME: verify that the above URL points to the right message + + * src/tr.c (card_of_complement): Use cleaner `sizeof in_set' + rather than `N_CHARS * sizeof(in_set[0])'. Using HPUX's /bin/cc + (aC++/ANSI C B3910B A.05.55 [Dec 04 2003]) on an ia64-hp-hpux11.22 + system, those two expressions are not the same (256 vs. 1024). + The effect of this problem was that `tr -c x y' would fail: + tr: when not truncating set1, string2 must be non-empty + (set_initialize): Remove unnecessary initialization of the `in_set' + buffer; that initialization triggered the same compiler bug as above. + +2004-05-29 Paul Eggert <eggert@cs.ucla.edu> + + tr cleanup, mostly having to do with integer type ranges. + Remove all casts. + + * tests/tr/Test.pm: Add a few tests for the below. Alas, most of + the test cases wouldn't be portable, or would take too much CPU + time, or both. + + * src/tr.c (N_CHARS, N_CHAR_CLASSES): Now an enum, not a macro. + This is safe since the code already assumes N_CHARS fits in int. + (Filter): Remove: we want to prototype everything. + (ORD, CHR): Remove. All uses removed. Some replaced with: + (uchar): New function. All places where a char must be converted + to an unsigned char are now done this way, not by ad-hoc methods. + (count): New type. Use it whenever counts or states are needed. + (BEGIN_STATE): Increase from INT_MAX - 1 (which was bogus, anyway, + since we used it in an unsigned int context) to UINTMAX_MAX - 1. + (REPEAT_COUNT_MAXIMUM): New macro. Use it in place of BEGIN_STATE + whenever appropriate. + (NOT_A_CHAR): Remove global macro; now a local enum. + (UL_LOWER, UL_UPPER, UL_NONE): No longer specify values, since + the rest of the code no longer depends on them. + (class_ok): Remove; all uses changed to use inline comparisons. + (RE_NO_TYPE): Remove; wasn't used or needed. + (struct List_element): normal_char and equiv_code are now unsigned + char, not int. + first_char, last_char, and the_repeated_char are now unsigned char, + not unsigned int. repeat_count is now count, not size_t. + All uses changed. + (struct Spec_list): state is now count, not unsigned int. + lengthis now count, not size_t. + n_indefinite_repeats is now size_t, not int. + has_equiv_class, has_char_class, and has_restricted_char_class + are now bool, not int. All uses changed. + (struct E_string): s is now char *, not unsigned char *. + escaped is now bool *, not int *. All uses changed. + (ES_MATCH): Remove macro, replacing with: + (es_match): New inline function. All uses changed. + (squeeze_repeats, complement, posix_pedantic, truncate_set1, + translating): Now bool, not int. + (io_buf): Now char array, not unsigned char. + (SET_TYPE): Remove. All uses replaced with bool. + (is_equiv_class_member, unquote, append_range, append_char_class, + append_equiv_class, find_closing_delim, star_digits_closebracket, + build_spec_list, parse_str, homogeneous_spec_list): + Now returns bool, not int. All uses changed. + (is_equiv_class_member): Now inline. + (is_equiv_class_member, is_char_class_member, make_printable_str, + append_normal_char, append_range, append_repeated_char, + get_s2_spec_stats): + Args are now of proper integer type. + (unquote, look_up_char_class, make_printable_str, + append_equiv_class, build_spec_list, squeeze_filter): + Avoid unsigned char *p; gently convert *p to unsigned char instead. + (unquote, get_spec_stats): Do not jump past declarations and then + use them; C doesn't allow this in portable programs. + (make_printable_str): Check for overflow in size calculations. + (xmemdup): Remove. All uses rewritten. + (find_bracketed_repeat): Args are now of proper pointer-to-integer + type. Do not reject [c*0]. Use xstrtoumax, not xstrtoul. + (find_bracketed_repeat, star_digits_closebracket): Check that the + digits are not escaped. + (build_spec_list): Don't bother to copy opnd_str; not needed. + (build_spec_list, get_next): Simplify internal logic a bit. + (card_of_complement): Fix bug due to char overflow. + (get_spec_stats): Don't assume len fits into int. + Check for integer overflow. Use abort() rather than assert(0). + (string2_extend): Fix subscript error: is_char_class_member (..., 255) + was being invoked. + (squeeze_filter): READER is never null now; simplify code. + READER arg now has a simpler type. Remove unnecessary casts. + (squeeze_filter, main): Calls to fwrite improperly checked result + against zero, rather than against requested size. + (plain_read): New function. + (read_and_delete, read_and_xlate): + Remove unused filter arg, and don't worry about hit_eof. + Simplify by using plain_read. + (set_initialize): Args are bool and bool *, not int and SET_TYPE *. + (main): Always pass a non-null procedure to squeeze_filter. + Rewrite so that class_ok isn't needed. + +2004-05-29 Paul Eggert <eggert@cs.ucla.edu> + + * src/shred.c (dosync): Ignore EBADF errors, as IRIX 6.5 + fdatasync reports EBADF when syncing (unwritable) directories. + Problem reported by Albert Chin-A-Young in: + http://lists.gnu.org/archive/html/bug-coreutils/2004-05/msg00165.html + +2004-05-29 Jim Meyering <jim@meyering.net> + + * tests/chown/deref: Fix typo: use ls -ldo, not ls -ldg. + Patch from Albert Chin. + + * src/ptx.c (text_buffer_maxend): Remove declaration of unused variable. + + * src/remove.c (push_dir): Merge declaration and adjacent assignment + into a single statement. + +2004-05-28 Jim Meyering <jim@meyering.net> + + * src/remove.c (AD_mark_helper): Eliminate an unnecessary comparison. + +2004-05-22 Jim Meyering <jim@meyering.net> + + rm -r would get a failed assertion when run from an inaccessible + directory and with two or more command line arguments including an + absolute-named directory followed by a relative-named directory. + + * src/remove.h (struct rm_options) [require_restore_cwd]: New member. + * src/remove.c (struct cwd_state): Define. + (AD_pop_and_chdir): Redesign interface so that a restore_cwd failure + can be detected by the caller. Instead of returning a malloc'd + directory name, communicate it to caller via a new parameter, and + return an indication of whether restore_cwd failed. Update caller. + Eliminate an unnecessary call to AC_stack_top. + (remove_dir): Change type of cwd_state parameter to `struct cwd_state' + so we can now communicate to caller whether/how functions like + restore_cwd have failed. Update caller. + (rm_1): Fail if we've failed to restore the working directory + and the name of the next file to remove is `.'-relative. + (rm): Fail if the require_restore_cwd flag is true and we've + failed to restore the working directory. + * src/mv.c (rm_option_init): Initialize new member, + x->require_restore_cwd. + * src/rm.c (rm_option_init): Likewise. + +2004-05-21 Jim Meyering <jim@meyering.net> + + * tests/rm/inaccessible: New test for the above fix. + * tests/rm/Makefile.am (TESTS): Add inaccessible. + + * src/remove.c (rm): Use free rather than XFREE. + (remove_dir): Use xmalloc, not XMALLOC. + (ds_init): Likewise. + +2004-05-20 Jim Meyering <jim@meyering.net> + + * Makefile.maint (sc_unmarked_diagnostics): Now that the unmarked + diagnostics in shred.c have been fixed, don't exempt shred.c from + this check. + + * src/shred.c: Use translatable diagnostics, e.g. + change "%s: remove" to _("%s: failed to remove") and + change "%s: close" to _("%s: failed to close"). + +2004-05-17 Paul Eggert <eggert@cs.ucla.edu> + + * src/shred.c (names): Bring back lower-case letters, "_", and + ".". But continue to omit +, =, %, @, #, as they're either + shell metacharacters (for some shells) or are not in some + character sets, or (in the case of '%') must be a + metacharacter somewhere. + +2004-05-16 Paul Eggert <eggert@cs.ucla.edu> + + * src/cut.c (cut_fields): Adjust to new signature of getndelim2. + +2004-05-17 Jim Meyering <jim@meyering.net> + + * src/shred.c (incname): Decrement `len' only once per loop iteration. + + chgrp and chown now dereference symlinks by default, per POSIX. + Reported by Michal Politowski as http://bugs.debian.org/249177. + + * src/chown-core.c (chopt_init): Affect each symlink referent by default. + * src/chown.c (usage): Update to reflect this. + * src/chgrp.c (usage): Likewise. + * NEWS: Describe the change. + Adapt tests accordingly. + * tests/chgrp/basic: Use -h where necessary to retain semantics. + * tests/chgrp/deref: Likewise. + * tests/chgrp/posix-H: Likewise. + +2004-05-15 Paul Eggert <eggert@cs.ucla.edu> + + In shred, check for errors from fdatasync more carefully. If + fdatasync fails with errno==EINVAL, it means this implementation + does not support synchronized I/O for this file. Do not report + this as an error, as (for example) AIX 5.2 fdatasync reports it + for raw disk devices. Problem reported by Albert Chin in + <http://mail.gnu.org/archive/html/bug-gnu-utils/2004-05/msg00028.html>. + + Check for write errors, though: the old code ignored them. + Improve error checking in a few other cases, too (e.g., close of a + directory). + + Also, change several 'int' values to 'bool', so that the error + checking is a bit clearer. Similarly, change unsigned values + to size_t where appropriate. + + * src/shred.c: Include "dirname.h". + (datasync) [!HAVE_FDATASYNC]: Remove. + (dosync): New function. + (dopass): Use it. Return 1 on write error, -1 on other error. + All callers changed. Report write error if dosync does. + (do_wipefd, wipefd, wipename, wipefile): Return bool (true/false), + not int (0/-1). All callers changed. Return false if there's a + write error. + (incname): Return bool (true/false), not int (0/1). Accept + size_t length, not unsigned. All callers changed. Do not + bother checking for non-digits; it can't happen. Replace + recursion with iteration. + (wipename): Use dir_name, base_name, etc. instead of assuming + Unix file names. Use size_t for length, not unsigned. + Report error if unlink or close fails. + (wipename, main): Use bool for booleans. + + (names): Use only digits and uppercase letters, for greater + portability. + +2004-05-16 Jim Meyering <jim@meyering.net> + + * tests/chown/deref: New test for the yesterday's change. + * tests/chown/Makefile.am (TESTS): Add deref. + +2004-05-15 Jim Meyering <jim@meyering.net> + + chown --dereference did nothing when the owner/group of a + symlink matched the desired owner/group. Reported by David Malone. + Also reported in 1999 as http://bugs.debian.org/39642. + + * src/chown-core.c (change_file_owner): When --dereference has + been specified, and when processing a symlink, stat it to get the + owner and group of the referent. + +2004-05-14 Jim Meyering <jim@meyering.net> + + * man/pwd.x, man/echo.x, man/printf.x: Fix typo: + s/supercede/supersede/ reported by Andrew Fabbro. + +2004-05-13 Paul Eggert <eggert@cs.ucla.edu> + + Improve performance of `sort -m' on large files, at the cost of + making some contrived examples unsafe. POSIX allows this + optimization. Performance problem reported by Jonathan Baker in + <http://mail.gnu.org/archive/html/bug-coreutils/2004-05/msg00071.html>. + + * src/sort.c (first_same_file): Do not treat input pipes + differently from other files. + * doc/coreutils.texi (sort invocation): Document that "sort -m -o F" + might write F before reading all the input. + * NEWS: Likewise. + +2004-05-12 Paul Eggert <eggert@cs.ucla.edu> + + * src/od.c (print_ascii, dump_strings): Use e.g. '\a' rather than + '\007', for portability to EBCDIC hosts. + * src/printf.c (print_esc_char): Likewise. + * src/tr.c (unquote, make_printable_str): Likewise. + +2004-05-12 Jim Meyering <jim@meyering.net> + + * src/remove.c (AD_pop_and_chdir): Move lstat-`.' into if-block + where the result is used. This avoids one unnecessary lstat call + per command line argument. + +2004-05-12 Paul Eggert <eggert@cs.ucla.edu> + + Don't assume that "make -C" works; Solaris "make" doesn't have -C. + + * src/Makefile.am (all_programs.list): New rule, copied from + man/Makefile.am and tests/Makefile.am, except that we use the + system tr rather than ./tr and we don't use tr -s. + * tests/Makefile.am (all_programs): Use it. + * man/Makefile.am (all_programs): Likewise. Renamed from programs, + for consistency. All uses changed. + +2004-05-11 Jim Meyering <jim@meyering.net> + + * tests/rm/unread3: New test, for the above fix and today's + lib/save-cwd.c improvement. + * tests/rm/Makefile.am (TESTS): Add unread3. + + * src/rm.c: Don't include "save-cwd.h". It's no longer used. + +2004-05-10 Jim Meyering <jim@meyering.net> + + * tests/install/trap: New file. Test for bug fix of 2004-04-18. + * tests/install/Makefile.am (TESTS): Add trap. + + * src/remove.c (AD_push): Don't use errno in diagnostic about + `changed dev/ino'. + + Remove these generated files from CVS. + * tests/cut/cut-tests, tests/date/date-tests, tests/join/join-tests: + * tests/ls/ls-tests, tests/pr/pr-tests, tests/tac/tac-tests: + * tests/tail/tail-tests, tests/test/test-tests, tests/tr/range-tests: + * tests/tr/tr-tests, tests/wc/wc-tests: + +2004-05-09 Jim Meyering <jim@meyering.net> + + * src/tr.c (unquote): Use xcalloc rather than xmalloc and + a loop initializing the just-allocated memory to zero. + +2004-05-08 Jim Meyering <jim@meyering.net> + + * tests/rm/no-give-up: New file; check for today's fix. + * tests/rm/Makefile.am (TESTS): Add no-give-up. + +2004-05-08 Paul Eggert <eggert@cs.ucla.edu> + + Fix bug where "rm" gave up too easily, reported by Dan Jacobsen in + <http://mail.gnu.org/archive/html/bug-coreutils/2004-05/msg00013.html>. + + * src/remove.c (remove_entry): Check for errno values like ENOENT + that show the file cannot be directory, instead of for errno + values like EPERM that show the file might be a directory. This + is necessary because, when a single unlink() call has multiple + reasons to fail, it can set errno to any of those reasons; it's + only the rare errno value like ENOENT that excludes all the other + possible reasons to fail even when the file is a directory. + (remove_cwd_entries): Don't attempt chdir if the file is known + to not be a directory. + (remove_dir): Use the same method that remove_cwd_entries uses + (for some reason they differed). Don't assert that saved_errno + must be EPERM; it might be just about anything. + +2004-05-06 Jim Meyering <jim@meyering.net> + + * src/id.c (xgetgroups): Use xnmalloc, rather than xmalloc. + Don't add `1' to the buffer size (it was to protect against malloc + implementations that fail to allocate a buffer of size zero). + That is no longer necessary, since we use a malloc wrapper + on such systems. + + * src/wc.c (get_input_fstatus): Use xnmalloc, rather than xmalloc. + * src/head.c (elide_tail_bytes_pipe): Likewise. + * src/df.c (main): Likewise. + * src/shred.c (do_wipefd): Likewise. + * src/users.c (list_entries_users): Likewise. + * src/tail.c (main): Likewise. + * src/md5sum.c (main): Likewise. + +2004-04-29 Paul Eggert <eggert@cs.ucla.edu> + + * src/df.c (show_disk, show_point): If several filesystems are + mounted on the same mount point, prefer the last one, not the first. + Problem reported by Christian Jones in + <http://mail.gnu.org/archive/html/bug-coreutils/2004-04/msg00200.html>. + (show_disk): Remove unused statp arg. Return bool, not int. + (show_point): Rewrite to avoid gotos. Use the same algorithm + for lofs and dummies for each pass through the mount table, + rather than subtly different algorithms (which are probably + inadvertent). + +2004-05-03 Jim Meyering <jim@meyering.net> + + * Makefile.am (EXTRA_DIST): Add m4/ChangeLog, now that we no longer + have m4/Makefile*. + +2004-05-01 Jim Meyering <jim@meyering.net> + + When chown or chgrp is modifying the referent of a symlink, + use the chown(2) function, if possible. + * src/chown-core.c (change_file_owner): Don't hard-code the + open/fchown/close kludge here. Use `chown' instead. + The chown function works just fine on conforming systems. + Other systems now go through the new chown wrapper that + resorts to the old kludge. + + * src/chown-core.c (change_file_owner): Add a comment. + +2004-04-27 Jim Meyering <jim@meyering.net> + + * src/ptx.c: Make over 40 global extern variables `static'. + (syntax_table, re_syntax_table): Remove declarations of two unused + variables (they were exposed by the above change). + + * src/du.c (G_fail, opt_nul_terminate_output): Declare `static'. + * src/ln.c (backup_type): Likewise. + + * src/remove.c (rm): Add `extern' keyword. + * src/cp-hash.c (forget_created, remember_created) + (src_to_dest_lookup, remember_copied, hash_init, forget_all): Likewise. + * src/copy.c (dest_info_init, src_info_init, copy): Likewise. + * src/chown-core.c (chopt_init, chopt_free, gid_to_name) + (uid_to_name, chown_files): Likewise. + + * src/Makefile.am (sc_tight_scope): New rule. + * Makefile.maint (sc_tight_scope): New rule. + (syntax-check-rules): Add it. + +2004-04-26 Jim Meyering <jim@meyering.net> + + * Use automake-1.8.4. Regenerate dependent files. + + * src/sort.c (limfield): Make a comment clearer. + +2004-04-25 Paul Eggert <eggert@twinsun.com> + + Fix POSIX-conformance bug: "sort -k 3,3.5b" is supposed to skip + leading blanks when computing the location of the field end; + it is not supposed to skip trailing blanks. Solaris 8 "sort" + does conform to POSIX. Also fix the documentation to clarify + this and related issues. + + * doc/coreutils.texi (sort invocation): Mention -k earlier, so + that the options are in alphabetical order. Describe how -b works + more-accurately; this involves fixing some examples, too. Mention + what happens if the start field falls after an end field or after + a line end. Warn about using -k without -b, -g, -M, -n, or -t. + Add an example of how to sort IPv4 addresses and Apache Common + Log Format dates. Remove a duplicate example. + (Putting the tools together): Use separate options rather + than agglomerating them. + * src/sort.c (limfield): Use skipeblanks, not skipsblanks, to + decode whether to skip leading blanks. + (trailing_blanks): Remove. + (fillbuf, getmonth, keycompare): Don't trim trailing blanks. + + * tests/pr/Test.pm: Fix typo in env_default comment. + * tests/sort/Test.pm: Likewise. + (18c, 18d): Reverse the order of output lines, so that the + test cases conform to POSIX. + +2004-04-22 Paul Eggert <eggert@twinsun.com> + + More signal-handling cleanup for ls.c. Do not allow signals to + happen between arbitrary output bytes, as the + restore-default-color sequence can bollix up multibyte chars or + color-change sequences in the ordinary output. Instead, process + signals only between printing a file name and changing the color + back to non_filename_text color. That way, if the signal handler + changes the color (to the default), 'ls' will change it back when + 'ls' continues (after being suspended). + + Also, do not bother with signal-handling unless stdout is a + controlling terminal; this lets stdio buffer better when "ls + --color" is piped or sent to a file. + + * src/ls.c (sigprocmask, sigset_t) [!defined SA_NOCLDSTOP]: New macros. + Do not include "full-write.h"; no longer needed. + (tcgetpgrp) [! HAVE_TCGETPGRP]: New macro. + (put_indicator_direct): Remove. All callers changed to use + put_indicator. + (caught_signals, interrupt_signal, stop_signal_count): New vars. + (restore_default_color): Don't bother checking for put_indicator + failure. + (sighandler): Don't handle SIGTSTP; that's another handler now. + Simply set interrupt_signal to the signal, then exit. + (stophandler, process_signals): New functions. + (main): Don't output any color changes until _after_ the signal + handlers are set up. This fixes a race condition where 'ls' + could be interrupted while initializing colors, and leaving the + terminal in an undesirable state. + Don't mess with signal-handling if standard output is not a + controlling terminal. + When exiting, restore the default color, then restore the + default signal handling, then act on any signals that weren't + acted on yet. + Do not print //DIRED// etc. in colors; this avoids the need + to catch signals when printing them. + (print_name_with_quoting): Process signals just before switching + color back to non_filename_text. + +2004-04-23 Jim Meyering <jim@meyering.net> + + Avoid segfault on systems for which SIZE_MAX != (size_t) -1. + * src/ls.c (quote_name): Use SIZE_MAX, not -1, in calls + of quotearg_buffer. Patch by Mikulas Patocka. + +2004-04-18 Paul Eggert <eggert@twinsun.com> + + tee ignored SIGPIPE, but POSIX doesn't allow this. + + * src/tee.c (main): Do not ignore SIGPIPE, as POSIX 1003.1-2001 + does not allow this. This undoes the 1996-10-24 patch. + +2004-04-18 Paul Eggert <eggert@twinsun.com> + + Signal-handling cleanup for coreutils. Here are the highlights: + + - csplit sometimes failed to remove files when interrupted. + - csplit didn't clean up if two signals arrived nearly simultaneously. + - install -s would infloop on System V if SIGCHLD was ignored. + - ls could incorrectly restore color if multiple signals + arrived nearly simultaneously. + + * src/csplit.c (sigprocmask, sigset_t) [!defined SA_NOCLDSTOP]: + Define. + (filename_space, prefix, suffix, digits, files_created, remove_files): + Now volatile. + (caught_signals): New var. + (cleanup): Block signals while deleting all files. + (cleanup_fatal, handle_line_error, regexp_error): + Mark with ATTRIBUTE_NORETURN. + (create_output_file, close_output_file, interrupt_handler): + Block signals while changing the number of output files, + to fix some race conditions. + (delete_all_files): Do nothing if remove_files is zero. + Clear files_created. + (main): Don't mess with signals until after argument processing + is done. + + * src/csplit.c (main): Rewrite signal-catching code to make it + similar to other coreutils programs. When processing signals, + block all signals that we catch, but do not block signals that we + don't catch. Avoid problems with unsigned int warnings. + * src/ls.c (main): Likewise. + * src/sort.c (main): Likewise. + + * src/csplit.c (interrupt_handler): + Use void, not (obsolete) RETSIGTYPE. + * src/shred.c (sigill_handler, isaac_seed_machdep): Likewise. + + * src/csplit.c (interrupt_handler) [defined SA_NOCLDSTOP]: + Use simpler "signal (sig, SIG_DFL)" rather than sigaction equivalent. + * src/ls.c (sighandler) [defined SA_NOCLDSTOP]: Likewise. + * src/sort.c (sighandler) [defined SA_NOCLDSTOP]: Likewise. + * src/nohup.c (main) [!defined _POSIX_SOURCE]: Likewise, except + for SIG_IGN. + * src/tee.c (main) [!defined _POSIX_SOURCE]: Likewise. + + * src/install.c: Include <signal.h>. + (main) [defined SIGCHLD]: Set SIGCHLD handler to the default, if -s is + given, since System V fork+wait does not work if SIGCHLD is ignored. + + * src/ls.c (sighandler) [!defined SA_NOCLDSTOP]: Reset signal + handler to self, not to SIG_IGN, since SIGTSTP can be received + more than once. + (main): Use SA_RESTART, as that is simpler than checking for EINTR + failures all over the place. + +2004-04-20 Jim Meyering <jim@meyering.net> + + * src/remove.c (is_empty_dir): Clarify comment. + + * man/help2man: Accept new option: --program-name=NAME, so that we + can override the one in --version output. This is needed solely + so that test.1 doesn't refer to `[' as the program name. + Reported by Benjamin Cutler as http://bugs.debian.org/205251. + * man/Makefile.am (.x.1): Use help2man's new --program-name option. + + * src/pwd.c: Don't include pathmax.h; system.h already does it. + + * src/cut.c (cut_fields): Free buffer upon getndelim2 failure. + +2004-04-19 Jim Meyering <jim@meyering.net> + + * src/shred.c (isaac_seed_start) [AVOID_USED_UNINITIALIZED_WARNINGS]: + Initialize a buffer to avoid warnings from tools like valgrind. + + * Makefile.maint (sc_trailing_blank): New rule. + (syntax-check-rules): Add it. + * .x-sc_trailing_blank: New file. + + Make pwd work even if the resulting name is so long that getcwd fails. + * src/pwd.c: (path_free, path_init, path_prepend): New functions. + (nth_parent, find_dir_entry, robust_getcwd): New functions. + (main): First try getcwd, then, upon failure, robust_getcwd. + +2004-04-18 Jim Meyering <jim@meyering.net> + + * src/who.c (print_user): Use xrealloc here, rather than + unchecked realloc. Remove anachronistic casts. + + * src/remove.c (full_filename_): Don't leak upon failed realloc. + + * src/system.h (readdir_ignoring_dot_and_dotdot): New inline function, + from remove.c. + * src/remove.c (readdir_ignoring_dotdirs): Move function to system.h, + renaming it. Update uses. + +2004-04-17 Jim Meyering <jim@meyering.net> + + * configure.ac: Depend on automake-1.8.3. + + * src/join.c (add_file_name): Declare function to be `static'. + (string_to_join_field): Likewise. + * src/remove.c (ds_init, ds_free): Likewise. + + * Makefile.maint (sc_prohibit_jm_in_m4): New rule. + (syntax-check-rules): Add to the list. + +2004-04-13 Paul Eggert <eggert@twinsun.com> + + Use page-aligned buffers whenever we bother to do I/O using buffer + sizes that are tailored for the files. + + * src/cat.c: Include getpagesize.h. + * src/copy.c: Likewise. + * src/shred.c: Likewise. + * src/split.c: Likewise. + * src/cat.c (main): Align I/O buffers to page boundaries. + * src/copy.c (copy_reg): Likewise. + * src/shred.c (dopass): Likewise. + * src/split.c (main): Likewise. + * src/dd.c (ROUND_UP_OFFSET, PTR_ALIGN): Remove. + All uses replaced by ptr_align. + * src/od.c (gcd, lcm): Remove; now in system.h. + * src/system.h (gcd, lcm, ptr_align): New functions, moved from od.c. + +2004-04-14 Jim Meyering <jim@meyering.net> + + Remove m4/Makefile.am: it's no longer needed, with newer automake + * configure.ac (AC_CONFIG_FILES): Remove m4/Makefile.in from the list. + * Makefile.am (SUBDIRS): Remove `m4' from the list. + +2004-04-13 Jim Meyering <jim@meyering.net> + + * configure.ac: Change `jm_' in AC_DEFINE'd names to `gl_'. + +2004-03-27 Paul Eggert <eggert@twinsun.com> + + * NEWS: cp -pu and mv -u (when copying) now take the destination + file system time stamp resolution into account. + * doc/coreutils.texi (mv invocation): Document this. + (cp invocation): Document -u (it was missing!) with new behavior. + + * src/copy.c: Include "utimecmp.h". + (copy_internal): Compare time stamps using utimecmp rather than + MTIME_CMP. + +2004-04-09 Jim Meyering <jim@meyering.net> + + * Makefile.maint (.re-list): New rule/file, to replace + hard-coded list of header file names. + (sc_system_h_headers): Use the new file. + Don't look for sys2.h anymore. + + * src/system.h: Include new "stat-macros.h" rather than hard-coding + all of its macro definitions -- the list was slightly out of date. + Suggestion from Dmitry V. Levin. + +2004-04-08 Paul Eggert <eggert@cs.ucla.edu> + + * NEWS: Remove noctty flag from dd. Suggested by Philippe Troin. + * doc/coreutils.texi (dd invocation): Likewise. + * src/shred.c (O_NOCTTY): Remove redundant decl. + * src/dd.c (flags, usage): Remove noctty flag. + (main): Always use O_NOCTTY when opening files. + +2004-04-08 Jim Meyering <jim@meyering.net> + + * src/dd.c (dd_copy): Mark two diagnostics for translations. + (set_fd_flags): Undo part of today's change: it's a little + cleaner -- and more efficient in the common case -- to go + ahead and OR in the -1 when fcntl fails. + + * Makefile.maint (sc_dd_max_sym_length): New target. + (syntax-check-rules): Add it. + + * src/md5sum.c (PROGRAM_NAME) [algorithm == ALG_SHA1]: + Correct spelling: s/shasum/sha1sum. Reported by Jesse Kornblum. + + * src/dd.c (set_fd_flags): Don't OR in -1 when fcntl fails. + Rename parameter, flags, to avoid shadowing global. + (LONGEST_SYMBOL): Tweak comment. + +2004-04-07 Paul Eggert <eggert@twinsun.com> + + * NEWS: New dd conv= symbols nocreat, excl, fdatasync, fsync, + and new dd options iflag= and oflag=. + * src/dd.c (usage): Likewise. + * src/Makefile.am (dd_LDADD, shred_LDADD): Add fdatasync's lib. + * src/dd.c (fdatasync) [!HAVE_FDATASYNC]: New macro. + (C_NOCREAT, C_EXCL, C_FDATASYNC, C_FSYNC): New macros. + (input_flags, output_flags): New vars. + (LONGEST_SYMBOL): New macro. + (struct symbol_value): Renamed from struct conversion. Members + symbol and value renamed from convname and conversion. The + symbol value is now an array instead of a pointer; this saves + a bit of space and time in practice. All uses changed. + (conversions): Add nocreat, excl, fdatasync, fsync. Now const. + (flags): New constant array. + (iflag_error_msgid, oflag_error_msgid): New constants. + (parse_symbols): Renamed from parse_conversion and generalized + to handle either conversion or flag symbols. + (scanargs): Adjust uses of parse_symbols accodingly. Add + support for iflag= and oflag=. Reject attempts to use + both excl and nocreat. + (set_fd_flags): New function. + (dd_copy): Just return X rather than calling quit (X), since our + caller invokes quit with the returned value. Add support for + fdatasync and fsync. + (main): Add support for iflag=, oflag=, and new conv= symbols. + * src/system.h (O_DIRECT, O_DSYNC, O_NDELAY, O_NOFOLLOW, + O_RSYNC, O_SYNC): Define to 0 if not already defined. + + * NEWS: Remove duplicate mention of BLOCKSIZE. + +2004-04-02 Andreas Schwab <schwab@suse.de> + + * src/stty.c: Add support for IUTF8 input flag. + +2004-04-06 Jim Meyering <jim@meyering.net> + + * src/system.h (makedev) [mkdev && !makedev]: Define in terms of mkdev. + Interix spells it `mkdev'. Reported by Mark Funkenhauser. + +2004-04-04 Jim Meyering <jim@meyering.net> + + A specified format is no longer automatically newline terminated. + If you want a newline at the end of your format, use `\n'. + * src/stat.c (print_it): Don't print a newline at the end of + every format. + (do_statfs): Add a newline at end of each default format string. + +2004-03-30 Paul Eggert <eggert@twinsun.com> + + * src/nohup.c (main): Adjust to new calling convention + for set_cloexec_flag. + +2004-03-31 Jim Meyering <jim@meyering.net> + + * tests/Fetish.pm (run_tests): Remove `.orig' file. + Remove debugging diagnostic. + + Specifying an invalid --width=N (-w) or --gap-size=N (-g) + would not elicit an error. + * src/ptx.c: Include "xstrtol.h" and "quotearg.h". + (main): Don't use atoi. Use xstrtoul instead. + +2004-03-30 Jim Meyering <jim@meyering.net> + + * Makefile.maint (sc_prohibit_atoi_atof): New rule. + (syntax-check-rules): Add it. + * .x-sc_prohibit_atoi_atof: New file. + +2004-03-29 Jim Meyering <jim@meyering.net> + + * tests/du/files0-from: Use new OUT_SUBST directive, so that this + test is not sensitive to system-dependent block size differences. + Prompted by a report of Solaris 8 differences from Paul Eggert. + + * tests/Fetish.pm: Accept new directives: OUT_SUBST, ERR_SUBST. + Rename `%tmp' to `%actual'. Reverse order of last two args to + _compare_files (to $actual, $expected) so as to match declaration. + +2004-03-28 Paul Eggert <eggert@twinsun.com> + + Fix some gotchas encountered when porting to Solaris 8, using + the Forte 6u2 compiler. + + * src/hostname.c [HAVE_SETHOSTNAME && !defined sethostname]: + Declare sethostname, since no Solaris header does it. + * src/who.c: Include "vasprintf.h", for asprintf. + +2004-03-28 Jim Meyering <jim@meyering.net> + + Minor optimization: + * src/du.c (process_file): Don't record dev/inode for directories. + + Under some circumstances, without -c, du would mistakenly count the + space of hard-linked files, not just the first one it encountered. + Reported by Anthony Thyssen. + * src/du.c (du_files): Don't ever clear the set of `seen' dev/inodes. + + * src/du.c: Rename global `print_totals' to `print_grand_total'. + + * src/du.c (main): Rearrange filtering loop to be a tiny bit + more efficient. + + * src/chown-core.c: Don't include savedir.h -- no longer needed. + * src/chmod.c: Likewise. + +2004-03-25 Jim Meyering <jim@meyering.net> + + * src/du.c (main): Remove now-unused declaration of `i'. + +2004-03-24 Paul Eggert <eggert@twinsun.com> + + * src/du.c (main): Filter out file names of length zero before + invoking fts, so that they don't cause fatal errors. + +2004-03-25 Jim Meyering <jim@meyering.net> + + * tests/du/files0-from (zero-len): Add a test for the above. + +2004-02-25 Paul Eggert <eggert@twinsun.com> + + * NEWS: New environment var BLOCKSIZE. + * lib/human.c (humblock): Support BLOCKSIZE as well as BLOCK_SIZE. + * tests/envvar-check: Test for it. Factor the code to simplify it. + +2004-03-23 Paul Eggert <eggert@twinsun.com> + + * NEWS: Shorten the du --files0-from announcement, and say + "NUL-terminated" rather than "NUL-separated". + * src/du.c (EXPECTED_BYTES_PER_FILE_NAME, DEFAULT_PROJECTED_N_FILES): + Remove: not used. + (usage): Say "NUL-terminated", not "NUL-separated". + (main): Check for I/O error when istream is closed. + Allow --files0-from=F even if F is empty; this specifies no files. + (du_files): Now that we allow the list of files to be empty, + handle that case. + * tests/du/files0-from: Adjust to above changes to src/du.c. + +2004-03-24 Jim Meyering <jim@meyering.net> + + * tests/tail-2/assert: Avoid race condition that could cause + spurious failure. Based on a patch from Andreas Schwab. + +2004-03-23 Jim Meyering <jim@meyering.net> + + * src/du.c (main): Free the hash table, too. + +2004-03-22 Jim Meyering <jim@meyering.net> + + * man/Makefile.am (.x.1): Remove --info-page= option, reverting + the change of 2004-01-22. I can no longer reproduce the problem + that prompted that change, and `info coreutils pr' would display the + `printing text' section of the manual, not the one on `pr invocation'. + + * tests/du/files0-from (nul-1, nul-2): Adjust expected diagnostics + to match corrected output. + + * src/du.c: Include "readtokens0.h" rather than "readtokens.h". + (main): Use readtoken0 functions rather than readtokens. + Don't use errno when diagnosing readtokens0 failure. + Fix off-by-one error in the token number reported in a diagnostic. + (du_files): Return bool, rather than int. + (main): Call readtokens0_free. + +2004-03-21 Jim Meyering <jim@meyering.net> + + * src/remove.c (ds_free): Plug a small leak. + + * tests/Fetish.pm: Fix typo in comment. + +2004-03-07 Jim Meyering <jim@meyering.net> + + * NEWS: du accepts a new option --files0-from=FILE, where FILE + contains a list of NUL-separated file names. + + * src/du.c: Include "readtokens.h". + (usage): Describe the new option, and adjust the `Usage': + with this option, no FILE may be specified on the command line. + (main): Handle the new option. + + * tests/du/files0-from: New tests, for the above. + * tests/du/Makefile.am (TESTS): Add files0-from. + + * src/factor.c (do_stdin): Reflect changes in use of readtoken. + * src/tsort.c (tsort): Likewise. + +2004-02-29 Paul Eggert <eggert@twinsun.com> + + * NEWS: Add support for a new notation @N to get_date to represent + the time stamp with numeric value N. Improve support for + fractional time stamps. date's -d and -f options now accept them. + Likewise for touch -t. date has a new option --iso-8601=ns. + + * doc/coreutils.texi (touch invocation): + Describe use of fractional seconds. + (date invocation, Options for date): Likewise. + * doc/getdate.texi (General date syntax, Time of day items): Likewise. + * doc/coreutils.texi (date invocation): Mention effect of LC_TIME. + (Options for date): Describe new --iso-8601=ns option. + + * doc/getdate.texi: Add copyright notice. Change getdate to + get_date when talking about the function name. + (Seconds since the Epoch): New section, containing the time_t + info moved from Date input formats section, along with new + info about the @ syntax. Mention negative time stamps, + fractional time stamps, and leap seconds. + (General date syntax): Modernize examples a bit to reflect new + features. + (General date syntax, Relative items in date strings): + Use ' rather than " to quote formats. + (Time of day items): Add an example with fractional seconds. + Describe fractional-second syntax. + + * src/Makefile.am (touch_LDADD): New macro, since `touch' now + needs clock_gettime. + + * src/date.c (enum Time_spec): New enum TIME_SPEC_NS. + (time_spec_string, time_spec, show_date): Support it. + (usage): Remove description of -ITIMESPEC, as it's obsolete and + confusing. Mention --iso-8601=ns. + (batch_convert): getline returns ssize_t, not int. + + * src/touch.c (newtime): Now an array of two timespecs, one + for access and one for modification. + (ref_stats): Remove. + (get_reldate): Use get_date's parameter profile. + (touch, main): Adjust to above changes. + (main): Work even if tm_year == INT_MAX (so long as long int is wider). + Use gettime instead of gettimeofday, for new get_date signature. + + * tests/date/Test.pm (test_vector): New tests epoch, ns-10, ns-max32, + ns-relative. + +2004-03-15 Jim Meyering <jim@meyering.net> + + * Makefile.maint (alpha beta major): `Make' the emit_upload_commands + target before updating $(prev_version_file). + + * tests/misc/date-sec: New file, to test for just-fixed bug in date. + See today's change in lib/getdate.y. + * tests/misc/Makefile.am (TESTS): Add date-sec. + +2004-03-14 Jim Meyering <jim@meyering.net> + + * announce-gen (print_changelog_deltas): Use `.sig' suffix for + signature files, not `.asc'. Reported by angico@yahoo.com. + +2004-03-13 Jim Meyering <jim@meyering.net> + + * src/cp.c (do_copy): Tweak wording in a diagnostic. + Suggestion from Karl Berry. + Include "quoatearg.h". + (do_copy): Use quotearg_colon (not quote) for diagnostics + that begin with `"%s:'. + + * src/nl.c (usage): Specify that nl uses _basic_ regular expressions. + Suggestion from Dan Jacobson. + +2004-03-12 Jim Meyering <jim@meyering.net> + + * Version 5.2.1. + + Sometimes, when source and destination partition are different, + mv mistakenly fails to preserve a hard link. Reported by IIDA Yosiaki. + + * src/copy.c: When moving a set of N hard-linked files between + partitions, via two or more command line arguments where the + command line argument containing the Nth link contains no other + link to that same file, mv would mistakenly copy the file, rather + than hard-linking it to the other(s). That happens because when the + final link is processed, its link count has been reduced to 1 since + the other links have been `copied' to the destination partition + and the source links have been removed. + (copy_internal): When in move mode, use the source dev/inode + pair to look up destination name even when st_nlink == 1. + * src/cp-hash.c (src_to_dest_lookup): New function. + * src/cp-hash.h (src_to_dest_lookup): Add prototype. + * tests/mv/part-hardlink: New file. Test for the above fix. + * tests/mv/Makefile.am (TESTS): Add part-hardlink. + + * announce-gen: Sync with autoconf. + + * tests/ls/time-1: Exit 77 (not 1) if we can't set up for the test. + This was triggered on a Linux-2.2.19 system using a file system + NFS-mounted from some sort of Sun. + +2004-03-11 Jim Meyering <jim@meyering.net> + + * Use automake-1.8.3. Regenerate dependent files. + +2004-03-10 Jim Meyering <jim@meyering.net> + + * tests/du/deref-args: Also convert sizes in the 70-79 kB range, + so that this test works with SELinux-enabled systems. + Based on a patch from Tim Waugh. + + `join -1 x' would give a misleading diagnostic + * src/join.c (string_to_join_field): Report that a non-numeric field + number is invalid, rather than `so large that it is not representable'. + * tests/join/Test.pm (invalid-j): New partial test for the above fix. + +2004-03-06 Jim Meyering <jim@meyering.net> + + cp --sparse=always sparse-image-file.img /dev/hda1 could + produce an invalid copy on the destination device. + + * src/copy.c (copy_reg): Even with --sparse=always, try to + make `holes' only if the destination is a regular file. + Reported by Szakacsits Szabolcs. + +2004-03-03 Paul Eggert <eggert@twinsun.com> + + * src/nohup.c (main): Don't invoke set_cloexec_flag with + a file descriptor of -1. + +2004-03-02 Dmitry V. Levin <ldv@altlinux.org> + + * src/nohup.c: Include "cloexec.h". + (main): Set the copy of stderr to close on exec. + +2004-03-01 Paul Eggert <eggert@twinsun.com> + + * configure.ac: Include <signal.h> when checking for strsignal, + sys_siglist, and friends. Problem reported by Tony Leneis in + <http://mail.gnu.org/archive/html/bug-coreutils/2004-02/msg00136.html>. + +2004-02-25 Paul Eggert <eggert@twinsun.com> + + * tests/du/deref-args, tests/du/exclude, tests/du/slash: + * tests/du/trailing-slash: Run envvar-check in case BLOCK_SIZE + etc. are set. + +2004-02-23 Paul Eggert <eggert@twinsun.com> + + * NEWS: Document how chown's USER.GROUP argument is now parsed. + +2004-02-23 Jim Meyering <jim@meyering.net> + + * src/seq.c (usage): Remove stray space after \n in --help output. + +2004-02-22 Jim Meyering <jim@meyering.net> + + * src/du.c (usage): Separate -H and --si. Say that the meaning + of -H will soon change to that of --dereference-args (-D). + +2004-02-21 Jim Meyering <jim@meyering.net> + + * src/comm.c (usage): Tell what comm does when there are no options. + Reword in terms of FILE1 and FILE2 rather than `left file' and + `right file'. Suggestion from Dan Jacobson. + +2004-02-15 Paul Eggert <eggert@twinsun.com> + + Fix some POSIX-conformance bugs in expr. + + * NEWS: document the following changes to src/expr.c. + * doc/coreutils.texi (expr invocation): Likewise. + Document what forms integers may take, and say "integer" + consistently instead of "number". Warn about operands + that "expr" can misinterpret, and how to work around the + problem. + * src/expr.c (eval, eval7, eval6, eval5, eval4, eval3, eval2, eval1): + Accept a bool argument specifying whether to evaluate the + expression. This is to allow short-circuit evaluation. All + callers changed. + (null): Report that a string is zero even if it has + a form like "-0" or "00". + (eval1, eval): Use short-circuit evaluation for | and &. + (eval): Return 0 if both arguments are null or zero, instead + of returning the first argument. + * tests/expr/basic: Add some tests for the above. + +2004-02-17 Jim Meyering <jim@meyering.net> + + * Version 5.2.0. + + `make check' from a build inside a chroot environment would fail + * tests/help-version: Specify an argument (`/') for df, in the + unusual event that there is no valid entry in /etc/mtab. + Likewise for id: add the -u option, so we don't get spurious + failures when there are no user or group names. + Patch by Tim Waugh. + + * src/sort.c (usage) [-u]: Add punctuation so that the description in + the help2man-generated (line-joined) man page is more readable. + Reported by Tim Waugh. + [-T]: Add a semicolon, for the same reason. + +2004-02-15 Jim Meyering <jim@meyering.net> + + * Makefile.am (dist-hook): Qualify target with $(srcdir)/ prefix. + +2004-02-11 Jim Meyering <jim@meyering.net> + + * tests/Makefile.am.in ($(srcdir)/Makefile.am): Use more portable + $(srcdir)/../Makefile.am.in, rather than $<. + Suggestion from Michael Elizabeth Chastain. + +2004-02-10 Jim Meyering <jim@meyering.net> + + * config/install-sh: Make this script executable. + * Makefile.am (dist-hook): New target, to ensure that config/install-sh + is executable. Otherwise, on systems that lack a suitable install + binary, `make install' would fail, because of the way this script + is invoked (without `$SHELL ' prefix). + Reported by Bob Proulx. + +2004-02-08 Jim Meyering <jim@meyering.net> + + * Version 5.1.3. + + * tests/rm/rm5: Avoid triggering a bug in OSF/Tru64's sed + that would cause an unwarranted test failure. + * tests/rm/rm3: Likewise. + +2004-02-07 Jim Meyering <jim@meyering.net> + + Remove xstat function pointer member. The way it was used was not + portable, since some systems (OSF V5.1, Solaris 2.5.1) provide static + inline `stat' and `lstat' functions, thus making the tests of + `xstat == lstat' in copy.c always fail. + * src/copy.h (struct cp_options) [xstat]: Remove member. + (XSTAT): New macro. + * src/copy.c (copy_dir): Set `.dereference' member, not .xstat. + (copy_internal): Use `XSTAT (x, ...)' in place of `*(x->xstat) (...)'. + Use `x->dereference == DEREF_NEVER' in place of `x->xstat == lstat'. + (valid_options): Remove now-obsolete FIXME comments. + + * src/cp.c (re_protect): Use `XSTAT (x, ...)' in place of + `*(x->xstat) (...)'. + (do_copy): Declare/use local xstat rather than x->xstat. + (main): Remove code that set x.xstat. + * src/mv.c (cp_option_init): Don't initialize xstat member. + * src/install.c (cp_option_init): Likewise. + + * Makefile.cfg (gnu_ftp_host-alpha, etc.): Un-factor .gnu.org suffix, + so that emit_upload_commands can use these variables, too. + +2004-02-06 Jim Meyering <jim@meyering.net> + + * tests/rm/deep-1: Remove `du' stack space test. + Apparently, `ulimit -s N' isn't portable enough. + This test will be restored (with a guard against losing ulimit) + in its own file later. + + * tests/rm/deep-1 (deep): Remove progress-style diagnostics, + since this test doesn't take long enough to merit them. + Run du on $tmp (the containing dir), not $deep, the full path to leaf. + + * Makefile.maint (signatures): Remove definition. + Now, automake's gnupload handles this. + (%.sig: %): Remove now-unused rule. + (rel-files): Use automake's $(DIST_ARCHIVES), rather than + `$(distdir).tar.bz2 $(distdir).tar.gz'. + (emit-upload-commands): Adjust to use gnupload. + +2004-02-05 Jim Meyering <jim@meyering.net> + + * src/system.h (ST_TIME_CMP_NS, ST_TIME_CMP): Remove definitions. + (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise. + Now, those are all defined in timespec.h. + Include timespec.h. + + * src/date.c: Don't include timespec.h, now that system.h does it. + +2004-02-02 Paul Eggert <eggert@twinsun.com> + + Don't dump core if localtime returns NULL (possible on + hosts with 64-bit time_t and 32-bit int). + * src/date.c: Include "inttostr.h". + (batch_convert, main): + If time conversion fails, exit with nonzero status. + (show_date): Return int to report conversion failure. + Print the time as an int if localtime fails. + * src/uptime.c: Print "??" if the current clock can't + be converted by localtime. This won't happen until the year + 2*31 + 1900, but we don't want to dump core even if the current + clock has the wrong value. + + * src/stat.c: Include "inttostr.h". + (human_time): Print the date/time as a number of seconds since the + epoch if it can't be converted by localtime. This is better than + just saying "invalid", and is consistent with what "ls" does. + Don't dump core if the year has more than 48 digits; this isn't + possible on any contemporary host, but we might as well do it right. + +2004-01-31 Paul Eggert <eggert@twinsun.com> + + * src/stat.c (human_time): Accept time rather than + pointer-to-const-time parameter, for clarity. All callers changed. + +2004-02-02 Jim Meyering <jim@meyering.net> + + * src/stat.c (do_stat): Remove extra trailing newline from + default formats. Reported by Nelson H. F. Beebe. + + Print actual fractional seconds in time stamps, not just `.00000000'. + * src/stat.c (human_time): Add and use new parameter, t_ns. + (print_stat): Update callers. + * src/ls.c (TIMESPEC_NS): Remove definition. + * src/system.h (TIMESPEC_NS): Define here, instead, now that stat.c + also uses this macro. + Nelson H. F. Beebe noticed that ls --full-time printed nonzero + fractional seconds for files on an XFS file system, but that stat's + fractional seconds were always zero. + +2004-01-28 Paul Eggert <eggert@twinsun.com> + + * src/seq.c (print_numbers): Use 'double' for loop index, not + 'int', to avoid problems with integer overflow. On almost all + machines 'double' works in every case where 'int' works, and + it works on other cases besides. + +2004-01-27 Jim Meyering <jim@meyering.net> + + * src/seq.c (usage): Mention that if INCREMENT is omitted, + it defaults to 1, even when FIRST is larger than LAST. + Reword so as not to exclude the possibility that INCREMENT be zero. + +2004-01-25 Jim Meyering <jim@meyering.net> + + * Version 5.1.2. + + * Makefile.maint (signatures): Comment out definition. + +2004-01-23 Jim Meyering <jim@meyering.net> + + * Makefile.maint (header_regexp): Add exitfail. + + * man/Makefile.am (EXTRA_DIST): Add help2man. + Reported by Nelson H. F. Beebe. + + * man/Makefile.am (.x.1): Prefix help2man invocation with `$(PERL) --' + so it works on systems with Perl installed somewhere other than in + /usr/bin. + + * src/paste.c (paste_parallel): Declare local, chr, to be of type + `int', not `char', since it must hold EOF. This bug would make + paste infloop on some systems. Test failures reported by + Nelson H. F. Beebe and Christian Krackowizer. + +2004-01-22 Jim Meyering <jim@meyering.net> + + * tests/rmdir/fail-perm: New file. Test for just-fixed rmdir bug. + * tests/rmdir/Makefile.am (TESTS): Add fail-perm. + + * man/help2man: Fix it so using --info-page='coreutils PROG' works. + * man/Makefile.am (.x.1): Invoke our own (tweaked) copy of help2man. + Use --info-page='coreutils PROG' option. + Now, readlink.1 refers the user to `info coreutils readlink' + rather than to `info readlink'. Reported by Matt Swift. + +2004-01-21 Paul Eggert <eggert@twinsun.com> + + Exit status cleanup. + + * src/basename.c (usage): Use EXIT_SUCCESS, not 0, for clarity. + * src/cat.c, src/chgrp.c, src/chmod.c, src/chown.c, src/chroot.c, + * src/cksum.c, src/comm.c, src/cp.c, src/csplit.c, src/cut.c, + * src/date.c, src/dd.c, src/df.c, src/dircolors.c, src/dirname.c, + * src/du.c, src/echo.c, src/env.c, src/expand.c, src/expr.c, + * src/factor.c, src/fmt.c, src/fold.c, src/head.c, src/hostid.c, + * src/hostname.c, src/id.c, src/install.c, src/join.c, src/kill.c, + * src/link.c, src/ln.c, src/logname.c, src/ls.c, src/md5sum.c, + * src/mkdir.c, src/mkfifo.c, src/mknod.c, src/mv.c, src/nice.c, + * src/nl.c, src/nohup.c, src/od.c, src/paste.c, src/pathchk.c, + * src/pinky.c, src/pr.c, src/printenv.c, src/printf.c, src/pwd.c, + * src/rm.c, src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, + * src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c, + * src/su.c, src/sum.c, src/sync.c, src/tac.c, src/tail.c, src/tee.c, + * src/test.c, src/touch.c, src/tr.c, src/tsort.c, src/tty.c, + * src/uname.c, src/unexpand.c, src/uniq.c, src/unlink.c, src/uptime.c, + * src/users.c, src/wc.c, src/who.c, src/whoami.c, src/yes.c: Likewise. + + * src/cat.c (usage): Don't bother normalizing exit status + since the arg is already the correct exit status now. + * src/cksum.c, src/comm.c, src/csplit.c, src/cut.c, + * src/dircolors.c, src/expand.c, src/fmt.c, src/fold.c, src/head.c, + * src/join.c, src/md5sum.c, src/nl.c, src/od.c, src/paste.c, + * src/pr.c, src/split.c, src/sum.c, src/tac.c, src/tail.c, src/tr.c, + * src/tsort.c, unexpand.c, src/src/uniq.c, src/src/wc.c: Likewise. + + * src/chown.c (main): Removed unused local 'fail'. + + * src/chroot.c (CHROOT_FOUND_BUT_CANNOT_INVOKE, CHROOT_FAILURE): + Remove. + + * src/chroot.c (main): Initialize exit_failure to EXIT_FAIL. + * src/env.c, src/nice.c, src/su.c: Likewise. + * src/nohup.c (main): Likewise, to NOHUP_FAILURE. + * src/setuidgid.c (main): Likewise, to SETUIDGID_FAILURE. + * src/expr.c (main): Use initialize_exit_failure rather than + setting exit_failure directly; this optimizes away redundant + assignments. + * src/printenv.c, src/sort.c, src/test.c, src/tty.c: Likewise. + + * src/chroot.c (main): Exit with status 1 rather than 127 + if chroot itself fails, as per documentation. + + * src/chroot.c (main): Use EXIT_ENOENT and EXIT_CANNOT_INVOKE + rather than roll-your-own symbols or integers. + * src/env.c (main): Likewise. + * src/nohup.c (main): Likewise. + * src/su.c (run_shell): Likewise. + + * src/cp.c (exit_status): Remove static var.... + (main): Making it local here instead. Use =, not |=, to set it. + + * src/cut.c (FATAL_ERROR, main): Exit with status EXIT_FAILURE, + not 2, on errors. + * src/date.c (batch_convert, main): Likewise. + * src/dd.c (dd_copy): Likewise. + * src/pr.c (first_last_page, main, getoptarg): Likewise. + * src/tr.c (main): Likewise. + * src/date.c (main): Don't assume EXIT_FAILURE == 1, as + POSIX doesn't require it. + * src/dd.c (write_output, skip, dd_copy): Likewise. + * src/df.c (main): Likewise. + * src/id.c (main): Likewise. + * src/install.c (main): Likewise. + * src/ln.c (main): Likewise. + * src/ls.c (main): Likewise. + * src/mv.c (main): Likewise. + * src/shred.c (main): Likewise. + + * src/env.c (main): Exit with status 1, not 2, on errors detected + by env proper. + * src/hostname.c (main): Likewise. + * src/nl.c (main): Likewise. + * src/stty.c (main): Likewise. + + * src/expr.c (EXPR_FAILURE): Renamed from EXPR_ERROR, for + consistency with the other programs' naming conventions. + All uses changed. + + * src/factor.c (main): Do not report a usage error simply + because stdin has bad numbers. + + * src/id.c (problems): Now a boolean int, not a counter, + so that we don't have to worry about int overflow. All uses changed. + * src/touch.c (err): Likewise. + + * src/md5sum.c (main): Use int, not size_t, to store boolean int. + + * src/mkfifo.c (main): Exit with status 1, not 4, if not implemented. + * src/mknod.c: Likewise. + + * src/nice.c (main): Exit with status EXIT_FAIL, not EXIT_FAILURE, + on error; this is in case EXIT_FAILURE is unusual. + * src/su.c (main): Likewise. + + * src/nohup.c (NOHUP_FOUND_BUT_CANNOT_INVOKE): Remove; all uses + changed to EXIT_CANNOT_INVOKE. + + * src/printenv.c (PRINTENV_FAILURE): New constant. + (main): Exit with status PRINTENV_FAILURE, not EXIT_FAILURE, on + command-line syntax problems. + + * src/rmdir.c (remove_parents): Don't set 'fail' to a negative number. + (main): Avoid integer overflow when seeing whether errors occurred. + + * src/seq.c (print_numbers): Now returns void, not (zero) int. + All callers changed. + (main): Remove unused local variable 'errs'. Always exit successfully + if we reach the end. + + * src/setuidgid.c (SETUIDGID_FAILURE): Renamed from FAIL_STATUS, + for consistency with other programs here. All uses changed. + (main): Use 'error' to exit rather than invoking 'exit' here. + + * src/sort.c: Don't include <assert.h>. + (SORT_OUT_OF_ORDER, SORT_FAILURE): Now enums, not macros. + (usage): Don't use 'assert'. + (main): Remove redundant assignment to exit_failure. + + * src/system.h (EXIT_FAIL, EXIT_CANNOT_INVOKE, EXIT_ENOENT): + New enum values. + (initialize_exit_failure): New inline function. + Include exitfail.h here, since we refer to exit_failure. + All callers changed to not include exitfail.h. + + * src/tty.c (TTY_FAILURE, TTY_WRITE_ERROR): New enum values; + substitute them for the corresponding integer constants. + + * tests/help-version (expected_failure_status_date): Remove, as + 'date' is now normal. + (expected_failure_status_nohup): New var. + +2004-01-21 Jim Meyering <jim@meyering.net> + + * tests/touch/relative: Remove `command' syntax. + Thanks to Nelson H. F. Beebe and Paul Eggert. + + * tests/touch/relative: Test only year/month/day, not hours/min/sec, + so as to avoid problems with systems using TAI clocks. + Although it's no longer necessary, set TZ=UTC0 also for the + initial touch command. Reported by Paul Jarc here: + http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/1504 + +2004-01-20 Diego Biurrun <diego@biurrun.de> + + * src/dircolors.hin: Add .mov to the list of media files. + +2004-01-19 Paul Eggert <eggert@twinsun.com> + + * tests/touch/relative: Use TZ=UTC0, not TZ=utc (which isn't + portable). Problem reported by Christian Krackowizer. Also, use + +0000 rather than +0 to specify a time zone, as the documentation + requires four digits. + +2004-01-19 Jim Meyering <jim@meyering.net> + + * tests/mv/hard-4: Run envvar-check in case SIMPLE_BACKUP_SUFFIX is set. + * tests/mv/backup-is-src: Likewise. + Problem reported by Peter Horst + +2004-01-17 Jim Meyering <jim@meyering.net> + + * announce-gen (print_changelog_deltas): Use .sig suffix, not .asc. + + * Version 5.1.1. + +2003-12-15 Paul Eggert <eggert@twinsun.com> + + * NEWS, doc/coreutils.texi: touch -r and -d can now both be specified, + with -r specifying the origin for -d. + * src/touch.c (flexible_date): Remove static var. + (get_reldate): New function. + (main): Use it, to implement this new behavior. + +2004-01-16 Jim Meyering <jim@meyering.net> + + * tests/touch/relative: New test for the above. + * tests/touch/Makefile.am (TESTS): Add relative. + +2004-01-13 Jim Meyering <jim@meyering.net> + + * src/system.h: Include contents of sys2.h. + * src/sys2.h: Remove file. + * src/Makefile.am (noinst_HEADERS): Remove sys2.h. + + * Use automake-1.8.2. Regenerate dependent files. + + * Update to gettext-0.13.1. + * configure.ac: Use gettext-0.13.1. + * .x-sc_space_tab: Add m4/po.m4 to the list of exceptions. + +2004-01-12 Jim Meyering <jim@meyering.net> + + * Makefile.maint (%.sig): Use .sig suffix rather than .asc. + + * Makefile.maint (po-check): Ensure that cvsu works before using it. + Reported by Alexandre Duret-Lutz. + + * src/tail.c (main): Warn about following stdin only when it's a tty. + + * configure.ac: Use gl_DEFAULT_POSIX2_VERSION. + +2004-01-10 Jim Meyering <jim@meyering.net> + + * tests/misc/stat-fmt: Use backticks, not `$()' notation. + +2004-01-09 Jim Meyering <jim@meyering.net> + + * configure.ac: Quote underquoted `jm_DUMMY_1' to avoid new warning. + +2004-01-08 Jim Meyering <jim@meyering.net> + + * src/stat.c (human_fstype): Use %lx, not %x format for `unsigned long'. + From Andreas Schwab. + + * tests/Makefile.am (TESTS_ENVIRONMENT): Remove `/vg' (prerelease test + remnant) from PATH component. That would cause tests in this directory + not to run the just-built binaries, but rather whatever happened + to be in one's PATH. Reported by Christian Krackowizer. + +2004-01-04 Jim Meyering <jim@meyering.net> + + * src/csplit.c (new_control_record): Use x2nrealloc + rather than xrealloc. + + * src/cp.c (re_protect): Use ASSIGN_STRDUPA rather than + alloca and strcpy. + (make_path_private): Likewise. + +2004-01-03 Jim Meyering <jim@meyering.net> + + * src/paste.c: Use `bool' (not int) as the type for a few + global variables. + (collapse_escapes): Rewrite to set globals rather than modifying + its parameter. + Use size_t (not int) for all counters and related index variables. + (paste_parallel): Remove needless complexity of + using xrealloc in the loop; just allocate the buffers up front. + Free the two temporary buffers. + Move declarations of locals `down' into scope where used. + (paste_serial): Remove `register' attributes. + (main): Simplify delim-related code. + Free `delims', now that it's malloc'd. + +2004-01-02 Jim Meyering <jim@meyering.net> + + * src/chroot.c: Include "quote.h". + (CHROOT_FOUND_BUT_CANNOT_INVOKE, CHROOT_FAILURE): Define. + (main): Exit with status of 127, not 1, for too-few-args, + chroot failure, or chdir failure. + Give a better diagnostic upon execvp failure. + + * src/du.c (usage): Mention that, with its current meaning, + -H is deprecated. + + * src/tail.c (main): Warn about following stdin when it's a tty. + Fail when following by name but no names are specified. + +2003-12-30 Jim Meyering <jim@meyering.net> + + * src/fold.c (main): Use memcpy, not strcpy. + + * src/copy.c (copy_internal): Use ASSIGN_STRDUPA rather than + alloca and strcpy. + +2003-12-28 Jim Meyering <jim@meyering.net> + + * src/unexpand.c (n_tabs_allocated): New global. + (add_tabstop): Use x2nrealloc rather than xrealloc. + * src/expand.c: Likewise. + + * tests/misc/expand: New file. + * tests/misc/Makefile.am (TESTS): Add expand. + + * src/sort.c (add_temp_dir): Use x2nrealloc rather than xrealloc. + (fillbuf): Use x2nrealloc rather than xrealloc. + (sort): Use xnmalloc rather than xmalloc. + (main): Likewise. + +2003-12-27 Jim Meyering <jim@meyering.net> + + * src/tee.c (tee): Use xnmalloc rather than xmalloc. + +2003-12-29 Paul Eggert <eggert@twinsun.com> + + * NEWS: Remove support for join -j1 FIELD, -j2 FIELD, and -o LIST1 + LIST2 in POSIX 1003.1-2001 hosts, as required by POSIX. + + * doc/coreutils.texi (join invocation): Remove documentation + accordingly. Document that -t makes all separators significant. + + * src/join.c: Include posixver.h. + (obsolete_usage): New var. + (longopts): Put obsolete options first. + (OBSOLETE_LONG_OPTIONS): New constant. + (get_option, add_file_name): New functions. + (main): Use them to support new behavior. + (usage): Remove documentation for -j1 FIELD and -j2 FIELD. + Do not mark -j FIELD as obsolescent; it is longstanding + UNIX tradition and is a valid extension to POSIX. + + * tests/join/Test.pm (tv): Avoid obsolete -o usage. + +2003-12-28 Paul Eggert <eggert@twinsun.com> + + * src/join.c (add_field_list): Don't use alloca with unbounded + size; just modify the argument, which is no longer const *. + + Various other minor cleanups, mostly to avoid the need for casts. + + (extract_field): Renamed from ADD_FIELD, as it's now a function. + + (struct field.beg): Now char *, not unsigned char const *. All + uses changed. It shouldn't be const since xmemcoll writes on its + arguments. + (extract_field): Likewise, for 2nd arg. + (keycmp): Remove now-unnecessary cast of xmemcoll args. + + (is_blank): New function, to avoid need to cast arg to unsigned char. + (extract_field): Use it. + + (xfields): Rewrite pretty much from scratch. + + (hard_LC_COLLATE): Now bool, not int. + (get_line, getseq, add_field_list): Now returns bool, not int. + (decode_field_spec, add_field_list): Return true on success (not + false), for consistency with the rest of the code. All uses changed. + + (tab): Now char, not unsigned char. This wasn't 100% necessary + but is slightly cleaner. + (prjoin): Hoist (tab ? tab : ' ') expression, to help the compiler. + + (empty_filler): Now const *. + + (make_blank): Remove; wasn't needed. Remove all calls. + (main): Don't set uni_blank.nfields; zero is fine. + +2003-12-27 Jim Meyering <jim@meyering.net> + + * src/join.c: Include "quote.h". + (min, max): Remove definitions. + Make a few function parameters and corresponding + locals `const'. Use bool for boolean variables. + Use size_t (not int) for all counters and related index variables. + (prjoin): Remove now-useless assertion. + (string_to_join_field): New function. + (main): Accept join fields as large as SIZE_MAX. + (keycmp): Rename `min' to MIN and max to MAX. + +2003-12-26 Jim Meyering <jim@meyering.net> + + fold -s didn't work on e.g., alpha-based systems. + * src/fold.c (fold_file): Adjust types (int->size_t) so that using + x2nrealloc works properly on systems with differing sizes for int + and size_t. Reported by Nelson Beebe. + + * src/fold.c: Use `bool' (not int) as the type for a few + global variables. + +2003-12-23 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (length_of_file_names_and_frills): + Remove forward decl; not needed. + (print_file_name_and_frills, length_of_file_name_and_frills): + With -m, don't output spaces before inum or size. + (print_with_commas): Don't output space just before newline. + +2003-12-24 Jim Meyering <jim@meyering.net> + + * tests/ls/Makefile.am (TESTS): Add m-option. + * tests/ls/m-option: New file. Test for above fixes. + +2003-12-20 Jim Meyering <jim@meyering.net> + + * Version 5.1.0. + + * src/pr.c: Change type of global, buff_allocated, to size_t. + + * src/join.c [struct seq]: Change types of members count and alloc + from `int' to `size_t'. + + * tests/Makefile.am (root-hint): Tweak wording. + + * src/du.c: Accept new option (-0, --null) that makes it so each + output line is NUL-terminated rather than newline-terminated. + + * src/dd.c (apply_translations): Don't prohibit conv=unblock,sync. + Reported by Volker Paul. + * tests/dd/Makefile.am (TESTS): Add unblock-sync. + * tests/dd/unblock-sync: New test for the above. + +2003-12-19 Jim Meyering <jim@meyering.net> + + * tests/misc/nohup: Double quote back-ticked expression, + in case it ends up having an unexpected value. + + * tests/ls/no-arg: Use ls's -1 option in both runs. + + * src/du.c (fts_debug): New global. + (FTS_CROSS_CHECK, DEBUG_OPT): Define. + (main): Make fts use FTS_TIGHT_CYCLE_CHECK. + (main) [DU_DEBUG]: Accept -d option. + +2003-12-18 Jim Meyering <jim@meyering.net> + + * src/ls.c (format_user): Increment dired_pos via two statements, + `dired_pos += width; dired_pos++;' rather than one, + `dired_pos += width + 1;' since the latter could conceivably overflow. + (format_group): Likewise. + From Paul Eggert. + + * configure.ac: Require automake-1.8. + +2003-12-12 Jim Meyering <jim@meyering.net> + + * Use automake-1.8. Regenerate dependent files. + +2003-12-08 Jim Meyering <jim@meyering.net> + + * Makefile.maint (news-date-check): New rule. + (alpha beta major): Depend on it. + +2003-12-03 Paul Eggert <eggert@twinsun.com> + + * NEWS: ls -l (and similar options) now adjust all columns to + fit the data. Generalized from a suggestion by Leah Q for file sizes. + * src/ls.c (INODE_DIGITS, LOGIN_NAME_MAX, ID_LENGTH_MAX): Remove. + (format_user_width, format_group_width, unsigned_file_size, + format_group): New functions. + (block_size_width): Renamed from block_size_size. + (inode_number_width, nlink_width, owner_width, group_width, + author_width, major_device_number_width, minor_device_number_width, + file_size_width): New vars. + (clear_files): Initialize them. + (gobble_file): Set them. Don't ceiling block_size_width to 7. + (print_long_file): Use them. + (gobble_file): Use a new local variable 'f' to make the code + smaller and more consistent with other functions. + (format_user): Output to stdout, not to a buffer, so that we + don't have to worry about buffer overrun. Update dired_pos. + (print_long_file): Don't put owner, group, author into buffer; + just print them directly. Don't assume link counts and + major and minor numbers fit into unsigned long int. + * tests/cp/same-file, tests/mv/part-symlink: Don't assume that + 'ls' output is fixed-width. + +2003-12-02 Jim Meyering <jim@meyering.net> + + * src/md5sum.c: Include sha1.h (reflect renaming: sha.h -> sha1.h. + +2003-11-27 Jim Meyering <jim@meyering.net> + + * Use automake-1.7f. Regenerate dependent files. + +2003-11-24 Paul Eggert <eggert@twinsun.com> + + Parse floating-point operands and options in the C locale. + POSIX requires this for printf, and we might as well be + consistent elsewhere (tail, sleep, seq). + + * src/printf.c: Remove decls of strtod, strtol, strtoul; no longer + needed now that we assume C89. Include "c-strtod.h". + (xstrtod): Call c_strtod, not strtod. + * src/sleep.c: Include "c-strtod.h". + (main): Update xstrtod call to include new argument, c_strtod. + * src/seq.c (scan_double_arg): Likewise. + * src/tail.c (parse_options): Likewise. + +2003-11-24 Jim Meyering <jim@meyering.net> + + * tests/rm/fail-2eperm: Handle another errno variant (HPUX, EPERM). + Reported by Mark Conty. + +2003-11-22 Jim Meyering <jim@meyering.net> + + * Makefile.maint (sc_xalloc_h_in_src): Remove rule. Subsumed by... + (sc_system_h_headers): Do this test only if sys2.h exists. + +2003-11-20 Jim Meyering <jim@meyering.net> + + * tests/help-version: Ensure that the bug-reporting address is + included in the --help output for every program. + * tests/Makefile.am (TESTS_ENVIRONMENT): Add $PACKAGE_BUGREPORT. + + * src/ptx.c (usage): Output bug-reporting address. + Reported by Dan Jacobson. + +2003-11-19 Jim Meyering <jim@meyering.net> + + * src/join.c (usage): Mention that FILE1 and FILE2 must be sorted + on the join fields. Suggestion from Bruce Robertson. + +2003-11-18 Jim Meyering <jim@meyering.net> + + `od -c -w9999999' could segfault + * src/od.c (dump): Use xnmalloc/free, not alloca. + +2003-11-16 Jim Meyering <jim@meyering.net> + + * Use autoconf-2.59. Regenerate dependent files. + + * tests/du/hard-link: Minor tweak: use mkdir -p. + + Fix read-from-free'd-buffer error detected by valgrind. + * src/csplit.c (remove_line): Don't return a pointer to data in + a freed buffer. Instead, arrange to free the buffer on the + subsequent call. + + * tests/misc/csplit: New test for above fix. + +2003-11-11 Jim Meyering <jim@meyering.net> + + * src/ls.c (extract_dirs_from_files): Avoid useless copy operations. + This avoids a warning from valgrind about memcpy with overlapping + source and destination. + + * configure.ac: Require automake-1.7.8. + +2003-11-09 Jim Meyering <jim@meyering.net> + + * Use automake-1.7.9. Regenerate dependent files. + + * src/rm.c: Support new options: --preserve-root and --no-preserve-root. + * src/chown.c: Likewise. + + * src/chown-core.c: Include "root-dev-ino.h". + (chopt_init): Initialize new member. + (change_file_owner): Support rm's new --preserve-root option. + + * src/remove.c: Include "root-dev-ino.h". + (remove_cwd_entries): Remove now-obsolete FIXME comment. + (remove_dir): Support rm's new --preserve-root option. + + * src/chown.c: Include "root-dev-ino.h". + Add new options: --preserve-root and --no-preserve-root. + + * src/chmod.c: Include "root-dev-ino.h". + (process_file): Use newly-factored-out ROOT_DEV_INO_CHECK and + ROOT_DEV_INO_WARN macros. + (get_root_dev_ino): Remove function definition, now that it's + been moved to a separate file. + (usage): Describe new options. + + * src/mv.c (rm_option_init): Initialized new member. + + * src/remove.h: Include "dev-ino.h". + (struct rm_options): Add new member: root_dev_ino. + * src/chown-core.h: Include "dev-ino.h". + (struct Chown_option): Add new member: root_dev_ino. + +2003-11-06 Jim Meyering <jim@meyering.net> + + * src/paste.c (paste_parallel): Use `sizeof *var' rather than + hard-coding `sizeof FILE*'. + +2003-11-05 Dennis Smit <ds@nerds-incorporated.org> + + * src/wc.c (main): Free `fstatus' so there is no confusion about + whether it's leaked or not. + * src/who.c (who): Likewise for `utmp_buf'. + +2003-11-05 Paul Eggert <eggert@twinsun.com> + + Fix 'cut' problems with size_t overflow and unsigned int. + More generally, resize integer variables to fit use more precisely. + * src/cut.c (ADD_RANGE_PAIR): Remove unnecessary parens. + (struct range_pair): Make members to be of type size_t, not unsigned. + (max_range_endpoint, eol_range_start): Now size_t, not unsigned. + (suppress_non_delimited, output_delimiter_specified, + have_read_stdin, print_kth, set_fields): Now bool, nt int. + (delim): Now unsigned char, not int. + (mark_printable_field, is_printable_field, is_range_start_index, + set_fields, set_fields, cut_bytes, cut_fields): + Use size_t, not unsigned, for field and byte counts. + (hash_int): Use uintptr_t, not unsigned, for pointers converted + to integers. This squeezes more info out of them. + (set_fields, cut_bytes, cut_fields, main): + Use bool, not int, for booleans. + (set_fields): Allocate zeroed byte array with xzalloc, not xcalloc. + +2003-11-05 Paul Eggert <eggert@twinsun.com> + + * man/Makefile.am (check-programs-vs-x): + Work even if $(programs) contains '$'. + Work even if 'missing=1' in environment. + Don't report an error simply because $(programs) outputs nothing. + +2003-11-05 Jim Meyering <jim@meyering.net> + + * Use autoconf-2.58. Regenerate dependent files. + + * src/tr.c (spec_init): Fix typo in last change. + + * src/sys2.h (case_GETOPT_VERSION_CHAR): Cast NULL to `(char *)' in + call to variadic version_etc function, so that it works even on systems + for which sizeof char* != sizeof int. + * src/true.c (main): Likewise. + * basename.c, chroot.c, cksum.c, dd.c, dirname.c, echo.c, expr.c: + * factor.c, hostid.c, hostname.c, link.c, logname.c, nice.c, nohup.c: + * pathchk.c, printenv.c, printf.c, pwd.c, setuidgid.c, sleep.c, stty.c: + * sync.c, test.c, tsort.c, unlink.c, uptime.c, users.c, whoami.c, yes.c: + Similarly, cast NULL to `(char *)' in call to variadic function, + parse_long_options, so that it works even on systems for which + sizeof char* != sizeof int. + A similar problem was reported by Harti Brandt in + http://mail.gnu.org/archive/html/bug-gnu-utils/2003-10/msg00320.html. + + * src/users.c (users): Free `utmp_buf' explicitly so that people + don't mistake this for a real leak. + Patch by Dennis Smit <ds@nerds-incorporated.org. + +2003-11-04 Paul Eggert <eggert@twinsun.com> + + * README: Document _POSIX2_VERSION. + +2003-11-04 Jim Meyering <jim@meyering.net> + + * src/tac.c (memrchr): Remove #if-0'd function. + (tac_stdin_to_mem): Clean up #if-0'd code. + + * src/od.c (decode_format_string): Remove unnecessary casts. + Use more maintainable `sizeof *var'. + (main): Call decode_format_string rather than decode_one_format, + now that `spec' may be NULL. + + * src/chmod.c (AUTHORS): Add my name. + + * src/split.c (next_file_name): Use `sizeof *var' rather than + hard-coding `sizeof size_t'. + + * src/sort.c (new_key): Use xzalloc, not xcalloc (1, ...). + + * src/cut.c (ADD_RANGE_PAIR): Use x2nrealloc rather than xrealloc, + to avoid potential overflow in pointer arithmetic. + (set_fields): Use not `1', but rather `sizeof *printable_field' as + second argument to xcalloc. + * src/od.c (decode_format_string, dump_strings): Use x2nrealloc + rather than xrealloc. + * src/date.c (show_date): Likewise. + * src/join.c (ADD_FIELD, initseq, getseq): Likewise. + * src/pr.c (store_char): Likewise. + * src/fold.c (fold_file): Likewise. + + * src/copy.c (triple_hash, triple_hash_no_name): Adjust to reflect + type changes (unsigned int -> size_t) in hash.c. + * src/cp-hash.c (src_to_dest_hash): Likewise. + * src/du.c (entry_hash): Likewise. + * src/ls.c (dev_ino_hash): Likewise. + * src/cut.c (hash_int): Likewise. Declare function as static. + +2003-11-03 Jim Meyering <jim@meyering.net> + + * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define PACKAGE_VERSION. + * tests/misc/fold: Fail the test immediately if we're not running + the expected version of fold. + +2003-11-02 Jim Meyering <jim@meyering.net> + + * src/tr.c (append_normal_char, append_range, append_char_class) + (append_repeated_char, append_equiv_class, spec_init): Use `sizeof *var' + rather than `sizeof EXPLICIT_TYPE'. The former is more maintainable + and usually shorter. + * src/copy.c (copy_internal): Likewise. + * src/join.c (initseq, add_field, make_blank): Likewise. + * src/od.c (main): Likewise. + * src/cp.c (make_path_private): Likewise. + * src/tsort.c (new_item, record_relation): Likewise. + + * src/df.c (add_fs_type, add_excluded_fs_type, main): Likewise. + (main): Also remove anachronistic cast of xmalloc return value. + * src/ptx.c (alloc_and_compile_regex, main): Likewise. + (main): Also remove anachronistic cast of xmalloc return value. + * src/sort.c (inittables): Likewise. + (sort): Also Split a long line. + +2003-10-25 Jim Meyering <jim@meyering.net> + + * src/copy.c (triple_hash, triple_hash_no_name): Adjust to reflect + type changes (unsigned int -> size_t) in hash.c. + * src/cp-hash.c (src_to_dest_hash): Likewise. + * src/du.c (entry_hash): Likewise. + * src/ls.c (dev_ino_hash): Likewise. + * src/cut.c (hash_int): Likewise. Declare function as static. + +2003-10-21 Jim Meyering <jim@meyering.net> + + Don't fail when run with VERBOSE=yes. + * tests/chgrp/basic: Do `set +x' before starting the subshell + from which we invoke chgrp. Otherwise, the output from the + VERBOSE=yes-induced `set -x' would result in spurious differences. + Reported by Russel Coker via Michael Stone. + +2003-10-19 Jim Meyering <jim@meyering.net> + + chmod now uses fts to perform a directory traversal when -R is + specified. Before, it operated on full path names, and as such + would encounter the PATH_MAX (often 4096) limit. + + * src/chmod.c: Include "xfts.h". + (process_file): Rename from change_file_mode. + Adapt to be used with fts. + (process_files): New function. + +2003-10-18 Jim Meyering <jim@meyering.net> + + * tests/du/deref-args: Ensure that du -D now dereferences all + symlinks specified on the command line, not just those that + reference directories. + + * basename.c, cat.c, chroot.c, cksum.c, comm.c, cp.c, csplit.c, cut.c: + * dd.c, df.c, dirname.c, du.c, echo.c, env.c, expr.c, factor.c, head.c: + * hostid.c, hostname.c, id.c, link.c, ln.c, logname.c, ls.c, md5sum.c: + * mv.c, nice.c, nl.c, nohup.c, paste.c, pathchk.c, pinky.c, pr.c: + * printenv.c, printf.c, pwd.c, rm.c, setuidgid.c, sleep.c, sort.c: + * split.c, stty.c, sum.c, sync.c, tac.c, tail.c, tee.c, test.c: + * touch.c, tsort.c, uniq.c, unlink.c, uptime.c, users.c, wc.c: + * who.c, whoami.c, yes.c (AUTHORS): Revert the WRITTEN_BY/AUTHORS change + of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. + Update the call to parse_long_options so that `AUTHORS, NULL' are the + last parameters. + * src/true.c (main): Append NULL to version_etc argument list. + * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise. + +2003-10-17 Andreas Schwab <schwab@suse.de> + + * tests/mk-script: Get $srcdir from first parameter instead of + hardcoding it. + (main): Update usage. + + * tests/Makefile.am.in ($(srcdir)/$x-tests): Pass $(srcdir) as + first argument of mk-script. + ($(srcdir)/Makefile.am): Likewise. Prepend $(srcdir) to target. + +2003-10-17 Jim Meyering <jim@meyering.net> + + * src/mv.c (usage): Tweak descriptions of -i and -f so that the + generated `man' page is more readable. Suggestion from Dan Jacobson. + + * src/chown-core.c (change_file_owner): Handle the cases in + which fts_info indicates an error with the given entry. + + * src/du.c (main): Simply assign to bit_flags. + Don't bother with bit arithmetic. + + * tests/chmod/no-x: New file. + * tests/chgrp/no-x: New file. + * tests/chmod/Makefile.am (TESTS): Add no-x. + * tests/chgrp/Makefile.am (TESTS): Likewise. + + * src/du.c: Include "xfts.h". + (du_files): Use xfts_open, rather than fts_open. + * src/chown-core.c (chown_files): Likewise. + +2003-10-16 Jim Meyering <jim@meyering.net> + + * src/chgrp.c (main): Simply assign to bit_flags. + Don't bother with bit arithmetic. + * src/chown.c (main): Likewise. + Rename a couple of local variables. + Remove unnecessary casts. + + * src/tail.c (start_bytes): Rename local, remainder, to avoid + gcc's warning about shadowing a global. + +2003-10-15 Jim Meyering <jim@meyering.net> + + chown and chgrp now accept POSIX-mandated -H, -L, -P options and + use fts to perform a directory traversal when -R is specified. + Before, they operated on full path names, and as such would + encounter the PATH_MAX (often 4096) limit. + They are more efficient. For example, before, chgrp -R would + take almost 5 seconds to change about 2000 directories and fail + (with `File name too long'), while now it succeeds on a hierarchy + of depth 20,000 in 1/10 the time. + + * src/chown.c: Include "userspec.h" and "fts_.h". + (WRITTEN_BY): Add my name. + (getpwnam, getgrnam, getgrgid): Remove declarations. + (endpwent): Remove definition. + (usage): Update. + (main): Handle new options. + Call new function, chown_files rather than change_file_owner. + + * src/chgrp.c: Include "fts_.h". + (WRITTEN_BY): Add my name. + (MAXUID, MAXGID): Remove definitions. Use GID_T_MAX instead of + the latter. + (usage): Update. + (main): Handle new options. + Call new function, chown_files rather than change_file_owner. + + Rewrite to iterate through hierarchies using fts rather than + via explicit recursion. + * src/chown-core.c: Include "fts_.h" + (change_file_owner): Rewrite to use FTS* and FTSENT* and to operate + on a single file at a time. + (chown_files): New function. + * src/chown-core.h [enum Dereference_symlink]: Remove declaration. + [struct Chown_option] (recurse, force_silent): Change type to `bool'. + [struct Chown_option] (dereference): Remove member with ambiguous name. + [struct Chown_option] (affect_symlink_referent): New member. + (chown_files): New prototype. + + * tests/chgrp/recurse: Update tests accordingly. + * tests/chgrp/posix-H: New tests for the above. + * tests/chgrp/Makefile.am (TESTS): Add posix-H. + + * src/ln.c (usage): Clarify that --directory, -d, -F probably won't + work even for superuser. Suggestion from Dan Jacobson. + +2003-10-14 Paul Eggert <eggert@twinsun.com> + + Fix some number-parsing bugs, e.g., "head -n 100k@" wasn't + properly diagnosed. + * lib/human.c, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, + lib/xstrtoul.c, lib/xstrtoumax.c: Sync with gnulib. + * src/sort.c (parse_field_count): Handle the case where overflow + and invalid suffix char are both reported. + +2003-10-14 Jim Meyering <jim@meyering.net> + + * src/ls.c (decode_switches) [TIOCGWINSZ]: Comment out the + warning-inducing test, ws.ws_col <= SIZE_MAX, since it was always + true on Linux. + +2003-10-13 Paul Eggert <eggert@twinsun.com> + + Fix to avoid a denial-of-service attack if the display width is + enormous. Also, clean up the code a bit by removing duplicate code. + + * src/ls.c (init_column_info): Remove forward decl; no longer needed. + (calculate_columns): New function, that contains code that used + to be common to print_many_per_line and print_horizontal. + (print_many_per_line, print_horizontal): Use it. + (decode_switches): Set max_idx here, not in calculate_columns. + (print_current_files): Don't call init_column_info; calculate_columns + now does that. + (init_column_info): Don't allocate a lot more space than is needed + to represent the current set of files. Allocate all the new + size_t cells in one call to xnmalloc, rather than a row at a time. + +2003-10-13 Jim Meyering <jim@meyering.net> + + * src/ls.c (init_column_info): Add another FIXME comment. + +2003-10-13 Paul Eggert <eggert@twinsun.com> + + Fix address-arithmetic bug in 'ls', reported by Georgi Guninski. + Remove several arbitrary limits on hosts where int cannot represent + all size_t values. + + * src/ls.c (struct bin_str.len, length_of_file_name_and_frills, indent, + nfiles, files_index, tabsize, line_length, struct column_info.line_len, + struct column_info.col_arr[0], max_idx): + Now size_t, not int. + (get_funky_string): Return bool indicating success, instead of + a negative count to indicate failure. Store number of columns + through new parameter OUTPUT_COUNT; that way, they can never + go negative. Change equals_end from int to bool. All uses + changed. + (struct column_info.valid_len): Now bool, not int. All uses changed. + (dired_dump_obstack, get_funky_string, clear_files, + extract_dirs_from_files, print_current_files, + print_many_per_line, print_horizontal, init_column_info, + put_indicator, length_of_file_name_and_frills, + print_with_commas): Use size_t, not int, for local variables + that count sizes. + (decode_switches): Decode sizes using xstrtoul, not xstrtol. + Check for TIOCGWINSZ returing negative values (or values greater + than SIZE_MAX!). + (visit_dir, main, parse_ls_color, queue_directory, add_ignore_pattern, + init_column_info): + Use xmalloc and xnmalloc, not XMALLOC. + (gobble_file): Use xnrealloc, not XREALLOC. + (print_color_indicator): Remove now-unnecessary cast to size_t. + +2003-10-12 Paul Eggert <eggert@twinsun.com> + + * tests/du/no-x: Change wording of diagnostic to match latest du.c. + * tests/sort/sort-tests: Remove from CVS; assume that people + brave enough to check coreutils out from CVS can rebuild it. + +2003-10-12 Jim Meyering <jim@meyering.net> + + New options: --preserve-root and --no-preserve-root. + * src/chmod.c (change_file_mode): Honor new option. + (change_file_mode): Strip trailing slashes on directory + argument passed to change_dir_mode. + (get_root_dev_ino): New function. + (main): Initialize global, root_dev_ino. + + * src/copy.c (copy_internal): Don't #ifdef-out simple uses of + S_ISLNK or S_ISSOCK. The S_IS* macros are guaranteed to be defined + via system.h. + * src/chmod.c (change_file_mode): Likewise. + +2003-10-08 Jim Meyering <jim@meyering.net> + + * src/csplit.c (main): Remove obsolete FIXME. + +2003-10-07 Jim Meyering <jim@meyering.net> + + * Use automake-1.7.8. Regenerate dependent files. + +2003-09-29 Paul Eggert <eggert@twinsun.com> + + csplit cleanup. + + * doc/coreutils.texi (csplit invocation): + The regexp offset need not have a sign; POSIX requires support + for signless offets. + + Be more careful about int widths. For example, remove some + arbitrary limits by replacing 'unsigned' with 'size_t', + 'uintmax_t', etc. Use standard bool rather than a homegrown type. + * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c. + * src/csplit.c (FALSE, TRUE, boolean): Remove. All uses changed + to <stdbool.h> usage. + (struct control): offset is now intmax_t, not int. + repeat_forever is now bool, not int. + (struct cstring): len is now size_t, not unsigned int. + (struct buffer_record): bytes_alloc, bytes_used, num_lines are now + size_t, not unsigned. start_line, first_available are now + uintmax_t, not unsigned. + (hold_count, control_used): Now size_t, not unsigned. + (last_line_number, current_line, bytes_written): + Now uintmax_t, not unsigned. + (save_to_hold_area, red_input, keep_new_line, record_line_starts, + create_new_buffer, get_new_buffer, load_buffer, find_line, + process_regexp, split_file, new_control_record, extract_regexp, + get_format_width, get_format_prec, max_out): + size args, locals, and returned values are now size_t, not unsigned + or int. + (get_first_line_in_buffer, find_line, write_to_file, + handle_line_error, process_line_count, regexp_error, process_regexp, + split_file): + File line, byte, and repetition counts are now uintmax_t, not unsigned. + (check_for_offset): Don't require a sign before the offset. + Use xstrtoimax to do the real work. + (extract_regexp): Remove harmful cast of size to unsigned. + 256 -> 1<<CHAR_BIT, for clarity. + (get_format_flags): Return at most 3, to avoid worries about overflow. + + (bytes_to_octal_digits): Remove. + + (cleanup): Don't check whether output_stream is NULL, since + close_output_file does that for us. + + (new_line_control, create_new_buffer): Use "foo *p = xmalloc + (sizeof *p);" instead of the more long-winded alternatives. + + (get_new_buffer): Use O(1) algorithm for resizing a buffer + to a much larger size, instead of an O(N) algorithm. + + (process_regexp): Use plain NULL rather than casted 0. + + (make_filename): Use %u, not %d, to format unsigned file number. + + (new_control_record): Use xrealloc exclusively, since it handles + NULL reliably. + + (extract_regexp): Change misspelled word in diagnostic. + + (get_format_width): Even if a minimum field width is specified, + allow room for enough octal digits to represent the value of + the maximum representible integer. This fixes a potential + buffer overrun. Calculate this room at compile-time, not + at run-time; this removes the need for bytes_to_octal_digits. + Check for overflow; this removes a FIXME. + + (get_format_prec): Don't allow precision to be signed; it's + not ANSI. Check for overflow. Remove hardcoded "11" as + default precision; this fixes a potential buffer overrun + on hosts with wider size_t. + + (get_format_conv_type): Change local variable to be of type + unsigned char, not int; this removes a potential subscript + violation on hosts where char is signed. + + (max_out): Replace "for (;*p;)" with more-standard "while (*p)". + Allow "%%" in format. Don't overflow when + counting lots of percents. + + (usage): Default sprintf format is %02u, not %d. + +2003-10-05 Jim Meyering <jim@meyering.net> + + * src/chown-core.c (change_file_owner): Remove set-but-not-used local. + + * src/du.c (du_files): Mark diagnostic for translation. + +2003-10-04 Jim Meyering <jim@meyering.net> + + * src/du.c (du_files): Ignore any failure of fts_close. + Give better diagnostics for failed fts_open. + + * src/du.c (MAX_N_DESCRIPTORS): Remove now-unused definition. + + Deprecate existing use of -H (aka --si). + * src/du.c (enum) [HUMAN_SI_OPTION]: New member. + [long_options]: Use HUMAN_SI_OPTION, not 'H'. + (main): Warn that the meaning of -H will soon change to be + POSIX compliant. + +2003-10-03 Jim Meyering <jim@meyering.net> + + * src/du.c: Accept --no-dereference (-P). + +2003-10-02 Jim Meyering <jim@meyering.net> + + * tests/du/trailing-slash: Adjust for slightly different output. + + Rewrite du.c to use fts. + * src/du.c: Include "fts_.h", not ftw.h. + (opt_dereference_arguments, arg_length, suffix_length): Remove globals. + (IS_FTW_DIR_TYPE): Remove definition. + (IS_DIR_TYPE): Define. + (is_symlink_to_dir): Remove now-unnecessary function. + (process_file, du_files): Rewrite to use fts. + + * tests/du/inaccessible-cwd: Ensure that even when run from an + inaccessible directory, du can still operate on accessible + directories elsewhere. + * tests/du/Makefile.am (TESTS): Add inaccessible-cwd. + + * tests/rm/deep-1: Ensure that du can process a hierarchy + of depth 400 while using no more than 50KB of stack space. + +2003-10-01 Akim Demaille <akim@epita.fr> + + * announce-gen (print_news_deltas): New function, extracted from main. + (main): Make `news_file' an array. + Use '...=s' => \@var for --news and --url-directory specs. + Before there were a couple of portability problems. + +2003-09-28 Jim Meyering <jim@meyering.net> + + * Makefile.maint (sc_cast_of_alloca_return_value): New rule. + (syntax-check-rules): Add it. + + * src/copy.c: Remove unnecessary cast of alloca, since now it's + guaranteed to be (void *). + * src/cp.c: Likewise. + * src/join.c: Likewise. + * src/ln.c: Likewise. + * src/ls.c: Likewise. + * src/od.c: Likewise. + * src/sys2.h (ASSIGN_STRDUPA): Likewise. + +2003-09-27 Jim Meyering <jim@meyering.net> + + Don't exhaust virtual memory when processing large inputs. + Fix this by removing csplit's internal free-list management; + instead rely on malloc for that. + + * src/csplit.c (free_list): Remove global. + (clear_all_line_control): Remove function. + (get_new_buffer): Always use create_new_buffer to obtain a + new buffer, rather than searching free_list. + (free_buffer): Just call free. + Reported by Nikola Milutinovic. + +2003-09-26 Jim Meyering <jim@meyering.net> + + * man/rm.x: Also list `chattr' in SEE ALSO section. + Suggestion from Mark Hubbart. + +2003-09-25 Jim Meyering <jim@meyering.net> + + * configure.ac: Don't invoke AC_AIX or AC_MINIX explicitly, now + that we use gl_USE_SYSTEM_EXTENSIONS, since it AC_REQUIREs them. + + * Use autoconf-2.57d. Regenerate dependent files. + +2003-09-24 Jim Meyering <jim@meyering.net> + + Minor efficiency tweak. + * src/ln.c (PATH_BASENAME_CONCAT): Use memcpy rather than strcpy. + (do_link): Likewise. + +2003-09-23 Jim Meyering <jim@meyering.net> + + * src/paste.c (paste_serial): Save errno after input error, + to report proper errno value. + Based on a patch from Paul Eggert. + + * src/tee.c (tee): Adjust fwrite arguments so that the return + value is the number of bytes written. + +2003-09-16 Paul Eggert <eggert@twinsun.com> + + Don't assume ferror sets errno. Bug reported by Bruno Haible. + + * src/comm.c (compare_files): Save errno after input error, + to report proper errno value. + * src/fold.c (fold_file): Likewise. + * src/od.c (check_and_close, skip, read_char, read_block): Likewise. + * src/unexpand.c (unexpand): Likewise. + + * src/csplit.c (close_output_file): Don't report bogus errno value + after ferror discovers an output error. We don't know the proper + errno value, since it might have been caused by any of a whole + bunch of calls, and it might have been trashed in the meantime. + Fixing this problem will require much more extensive changes; + in the meantime just say "write error". + * src/od.c (check_and_close, dump, dump_strings): Likewise. + * src/uniq.c (check_file): Likewise. + + * src/join.c (get_line): Report error right away if I/O fails, + so that the proper errno value is used. + * src/tac.c (tac_seekable, tac_file, save_stdin): Likewise. + * src/tee.c (tee): Likewise. + * src/uniq.c (check_file): Likewise. + + * src/od.c (skip): If a read fails, don't retry it later, so + that we report the proper errno. + + * src/tac.c (tac_mem): Don't return a value; nobody uses it. + + * src/tee.c (tee): Once a write failure has occurred, don't bother + writing anything more to that stream. + + * src/uniq.c (check_file): Check for ferror (stdout) even if + ostream == stdout. + + * src/yes.c (UNROLL): Remove. + (main): Exit immediately when write failure is detected. + Simplify code by assigning to argv when argc == 1. + +2003-09-21 Paul Eggert <eggert@twinsun.com> + + * src/ptx.c: Switch encoding from Latin-1 to UTF-8. + (WRITTEN_BY): Change "Franc,ois" (actually using + c-with-cedilla in Latin-1) to "F.", so that it's ASCII, as + xgettext requires. + +2003-09-19 Jim Meyering <jim@meyering.net> + + `du -D symlink-to-dir' would mistakenly omit the slash in + lines like this: 24 symlink-to-dir/subdir + * src/du.c (process_file): Fix offset calculation. + Reported by Jeff Sheinberg as Debian bug #211591; + http://bugs.debian.org/205251 + + * tests/du/deref-args: New file/test for the above. + * tests/du/Makefile.am (TESTS): Add deref-args. + + * src/du.c (process_file): Remove useless disjunct. + + * src/sys2.h (case_GETOPT_VERSION_CHAR): Rename parameter, Authors, + to Written_by. + * nearly all src/*.c files (WRITTEN_BY): Rename from AUTHORS. + Begin each WRITTEN_BY string with `Written by ' and end it with `.'. + Mark each WRITTEN_BY string as translatable. + + * basename.c, cat.c, chroot.c, cksum.c, comm.c, cp.c, csplit.c, cut.c: + * dd.c, df.c, dirname.c, du.c, echo.c, env.c, expr.c, factor.c, head.c: + * hostid.c, hostname.c, id.c, link.c, ln.c, logname.c, ls.c, md5sum.c: + * mv.c, nice.c, nl.c, nohup.c, paste.c, pathchk.c, pinky.c, pr.c: + * printenv.c, printf.c, pwd.c, rm.c, setuidgid.c, sleep.c, sort.c: + * split.c, stty.c, sum.c, sync.c, tac.c, tail.c, tee.c, test.c: + * touch.c, tsort.c, uniq.c, unlink.c, uptime.c, users.c, wc.c: + * who.c, whoami.c, yes.c: Revert yesterday's changes. + Instead, a subsequent change will embed `Written by ' in + each string along with the author names. + + * src/true.c: Revert yesterday's changes. + * src/sys2.h: Likewise. + +2003-09-18 Jim Meyering <jim@meyering.net> + + * basename.c, cat.c, chroot.c, cksum.c, comm.c, cp.c, csplit.c, cut.c: + * dd.c, df.c, dirname.c, du.c, echo.c, env.c, expr.c, factor.c, head.c: + * hostid.c, hostname.c, id.c, link.c, ln.c, logname.c, ls.c, md5sum.c: + * mv.c, nice.c, nl.c, nohup.c, paste.c, pathchk.c, pinky.c, pr.c: + * printenv.c, printf.c, pwd.c, rm.c, setuidgid.c, sleep.c, sort.c: + * split.c, stty.c, sum.c, sync.c, tac.c, tail.c, tee.c, test.c: + * touch.c, tsort.c, uniq.c, unlink.c, uptime.c, users.c, wc.c: + * who.c, whoami.c, yes.c: Update AUTHORS definition to be a + comma-separated list of strings and/or update the call to + parse_long_options so that `AUTHORS, NULL' are the last parameters. + * src/true.c (main): Append NULL to version_etc argument list. + * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise. + + * src/sort.c (numcompare): Rename local, logb, to log_b to avoid + shadowing the math function name. Also rename loga to log_a. + +2003-09-14 Jim Meyering <jim@meyering.net> + + * src/factor.c (print_factors): Give a separate diagnostic + for numbers that are too large, but otherwise valid. + Reported by Dániel Varga. + +2003-09-10 Jim Meyering <jim@meyering.net> + + * Use automake-1.7.7. Regenerate dependent files. + + * tests/Makefile.am (all_programs): Use ../src/tr -s ' ' '\n' in place + of `fmt -1'. Using the just-built tr is a little cleaner. + Christian Krackowizer reported that HPUX 10.20 doesn't have fmt. + * man/Makefile.am (programs, check-x-vs-1): Likewise. + +2003-09-09 Jim Meyering <jim@meyering.net> + + * src/copy.c: Alphabetize includes. + Remove duplicate inclusion of "same.h". + +2003-09-08 Jim Meyering <jim@meyering.net> + + * Makefile.maint (GZIP_ENV): Remove --rsyncable. + Didn't give enough of a benefit, mainly because it's not yet + in wide enough use. + + * Version 5.0.91. + + * man/Makefile.am (programs): Use ../src, not $(srcdir)/../src. + (check-programs-vs-x): Fail if $(programs) is empty. + + * src/remove.c: Add a comment. + +2003-09-07 Jim Meyering <jim@meyering.net> + + * src/remove.c (D_INO, ENABLE_CYCLE_CHECK) [D_INO_IN_DIRENT]: + Don't define. These symbols are no longer used. + + * tests/misc/tty-eof: Write ^D as \cD. + Complete the change of 2003-08-02. + + * Makefile.maint (po-check): Use cvsu, so that a temporary source + file in lib/ or src/ doesn't induce an unwarranted failure. + Add a kludge to filter out the sole generated source file that + also has translatable messages: src/false.c. + +2003-09-06 Jim Meyering <jim@meyering.net> + + * src/tail.c (enum): Add ALLOW_MISSING_OPTION. + (parse_options): Give a diagnostic for (but still accept) the + deprecated --allow-missing option. + +2003-09-04 Paul Eggert <eggert@twinsun.com> + + Don't ignore -S if input is a pipe. Bug report by Michael McFarland in + <http://mail.gnu.org/archive/html/bug-coreutils/2003-09/msg00008.html>. + + * src/sort.c (sort_buffer_size): Omit SIZE_BOUND arg. Compute the + size_bound ourselves. if an input file is a pipe and the user + specified a size, use that size instead of trying to guess the + pipe size. This has the beneficial side effect of avoiding the + overhead of default_sort_size in that case. All callers changed. + (sort): Remove static var size; now done by sort_buffer_size. + +2003-09-05 Jim Meyering <jim@meyering.net> + + * Use automake-1.7.6b and autoconf-2.57b. Regenerate dependent files. + + * tests/tail-2/tail-n0f: Wait .5 seconds for backgrounded process + to start, rather than just .1. Upon failure, print unexpected state. + +2003-09-04 Paul Eggert <eggert@twinsun.com> + + * src/head.c (elide_tail_lines_pipe): Don't assign 0 or + SAFE_READ_ERROR to tmp->nbytes. + * src/tail.c (pipe_lines, pipe_bytes): Likewise. + + * src/head.c (struct linebuffer): Change nbytes and nlines + from unsigned int to size_t. unsigned int is safe (after the + 2003-09-03 patch) but size_t is cleaner. + * src/tail.c (struct linebuffer, struct charbuffer): Likewise. + (pipe_bytes): Likewise for local variable 'i', which was 'int'. + + Standardize on BUFSIZ as opposed to other macro names and values. + * src/head.c (BUFSIZE): Remove. All uses changed to BUFSIZ. + * src/tail.c (BUFSIZ) [!defined BUFSIZ]: Remove. + stdio.h has always defined it, + and other code already assumes it's defined. + * src/tr.c (BUFSIZ) [!defined BUFSIZ]: Likewise. + (IO_BUF_SIZE): Remove; replace all uses with sizeof io_buf. + (io_buf): IO_BUF_SIZE -> BUFSIZ. + +2003-09-04 Paul Eggert <eggert@twinsun.com> + + * src/seq.c (step): Default to 1. + (print_numbers): Allow the output to be empty. + (main): The default step is 1, even if LAST < FIRST; + as per documentation. + * tests/seq/basic (onearg-2): Output should be empty. + +2003-09-05 Jim Meyering <jim@meyering.net> + + * Makefile.cfg (wget_files): Temporarily disable, until master + versions are restored to ftp.gnu.org. + + * configure.ac (AM_INIT_AUTOMAKE): Specify automake-1.7.6. + + Make seq's --width (-w) option work properly even when the + endpoint requiring the larger width is negative and smaller than + the other endpoint. + * src/seq.c (get_width_format): Include `-' in the set of bytes + allowed in a `simple' number (no decimal point, no exponent). + Reported by Patrick Mauritz. + +2003-09-02 Paul Eggert <eggert@twinsun.com> + + * NEWS: sort -t '\0' now uses a NUL tab. + sort option order no longer matters, unless POSIX requires it. + * src/sort.c (usage): Say "blanks" instead of "whitespace", + Similar fixes for many comments. + (TAB_DEFAULT): New constant, so that we can support NUL as + the field separator. + (tab): Now int, not char. Initialize to TAB_DEFAULT. + (specify_sort_size): If multiple sizes are specified, use the largest. + (begfield, limfield): Support NUL tab char. + (set_ordering): Do not let -i override -d. + (main): Report an error if incompatible -o or -t options are given. + Report an error for "-t ''". Allow "-t '\0'" to specify a NUL tab. + +2003-09-05 Jim Meyering <jim@meyering.net> + + * tests/sort/Test.pm [o2, nul-tab]: New tests for the above. + +2003-09-03 Andreas Schwab <schwab@suse.de> + + Bug report and patch here: + <http://mail.gnu.org/archive/html/bug-coreutils/2003-09/msg00009.html> + * src/tail.c (pipe_lines): Don't truncate return value from safe_read. + * src/head.c (elide_tail_lines_pipe): Likewise. + +2003-09-03 Jim Meyering <jim@meyering.net> + + * src/du.c (AUTHORS): Remove Larry McVoy's name, since the relatively + small amount of code from him was first moved to lib/human.c, and was + subsequently rewritten entirely. + * src/df.c (AUTHORS): Likewise. + +2003-08-22 Lawrence Teo <lcteo@uncc.edu> + + * src/md5sum.c (split_3): Accept the BSD format for generic + message digest modes. Currently works with BSD's MD5 and SHA1 + formats since these are the two algorithms presently used in + coreutils. Updated comments to reflect this change. + (bsd_split_3): Updated comments. + + * tests/md5sum/basic-1: New test to make sure that + `md5sum --check' doesn't accept the BSD SHA1 format (adapted + from `check-bsd' test in tests/sha1sum/basic-1). + + * tests/sha1sum/basic-1 (check-bsd2, check-bsd3): New tests for + --check exit status and BSD SHA1 format (adapted from tests + in tests/md5sum/basic-1). + +2003-08-30 Jim Meyering <jim@meyering.net> + + * src/ln.c (do_link): Use SAME_INODE rather than open-coding it. + + When source and destination arguments refer to the same file, reside + on a partition (e.g. VFAT) on which distinct names may refer to the + same directory entry (often due to variations in case), and when the + link count for the file is 1, mv no longer unlinks the file. Instead, + it gives the expected diagnostic that the source and destination are + the same. WARNING: this is an incomplete fix. If the file happens + to have a link count of 2 or greater, such an erroneous mv command + will still unlink it. + Although that is not possible on vfat or umsdos, it is possible on + other file system types, e.g., ntfs, and hpfs. + * src/copy.c (same_file_ok): Invoke same_name (which might still + return false for names that refer to the same directory entry) + only if the link count is 2 or more. + * tests/mv/vfat: Show how to demonstrate the above problem. + This test is not run. + * tests/mv/Makefile.am (EXTRA_DIST): Add vfat. + +2003-08-27 Jim Meyering <jim@meyering.net> + + * src/who.c: Change meaning of -l from --lookup to --login, per POSIX. + who's -l option has been eliciting an unconditional warning about + this impending change since sh-utils-2.0.12 (April 2002). + + * src/paste.c (paste_parallel): Don't output `EOF' (aka -1) as a `char'. + This would happen for nonempty files not ending with a newline. + Reported by Dan Jacobson. + * tests/misc/paste-no-nl: New file. Test for above-fixed bug. + * tests/misc/Makefile.am (TESTS): Add paste-no-nl. + + * src/stat.c (print_it): Avoid buffer overrun that would + occur when the user-specified format string ends with `%'. + Patch by Tommi Kyntola. + * tests/misc/stat-fmt: New file. Test for above-fixed bug. + * tests/misc/Makefile.am (TESTS): Add stat-fmt. + +2003-08-26 Jim Meyering <jim@meyering.net> + + Apply changes from bison. + * GNUmakefile (SHELL): Define to `sh', if necessary. + Add copyright. + * Makefile.maint (WGETFLAGS): Define to `-C off'. + Update all uses of $(WGET). + +2003-08-22 Akim Demaille <akim@epita.fr> + + * Makefile.cfg (local-checks-to-skip): New. + * Makefile.maint (local-check): Rename as... + (local-checks-available): this. + (local-check): New. + +2003-08-26 Akim Demaille <akim@epita.fr> + + * announce-gen (print_changelog_deltas): Neutralize "<#" as + "<\#" to avoid magic from Gnus when posting parts of this script. + +2003-08-25 Jim Meyering <jim@meyering.net> + + * src/stat.c (main): Warn about use of deprecated `-l' option. + +2003-08-22 Jim Meyering <jim@meyering.net> + + * src/stat.c (do_stat): For link count at end of line, use %h format, + instead of %-5h. The latter would make stat emit trailing spaces. + Reported by Dan Jacobson. + +2003-08-20 Jim Meyering <jim@meyering.net> + + * Makefile.am (EXTRA_DIST): Add .x-sc_space_tab .x-sc_sun_os_names + +2003-08-19 Jim Meyering <jim@meyering.net> + + * src/system.h: Include stdlib.h unconditionally, + as we're now assuming that part of hosted C89. + +2003-08-18 Jim Meyering <jim@meyering.net> + + * src/sys2.h (textdomain, bindtextdomain) [! ENABLE_NLS]: Define away, + to avoid warnings from gcc. + +2003-08-17 Jim Meyering <jim@meyering.net> + + Avoid unnecessary and sometimes time-consuming hostname lookups. + * src/who.c (print_user): Use strchr, not strrchr. + * src/pinky.c (print_entry): Likewise. + Patch by Michael Stone. + This fixes a typo I introduced in who-users.c on 1996-02-23. + + * Makefile.maint (makefile-check): Add 0-9 to the range of characters + disallowed between `@...@'. + +2003-08-16 Paul Eggert <eggert@twinsun.com> + + * configure.ac (fu_cv_sys_truncating_statfs): Remove; now + done by gnulib .m4 files. + (jm_DUMMY_1): Require gl_READUTMP, not jm_PREREQ_READUTMP. + * src/sys2.h (strtoull): Remove unused declaration. + +2003-08-16 Jim Meyering <jim@meyering.net> + + * man/Makefile.am (.x.1): Ensure that generated PROGRAM.1 files + are read-only. + + * src/tail.c (tail_lines): Fix a potential (but very hard to exercise) + race condition bug. The bug would be triggered when tailing a file + with file pointer not at beginning of file, and where the file was + truncated to have a length of less than the initial offset at just + the right moment (between the two lseek calls in this function). + + An invalid initial value for *read_pos would result in + `tail -n0 -f FILE' and `tail -c0 -f FILE' doing what amounted to a + busy-wait rather than sleeping between iterations. The bug manifests + itself only when tailing regular files that are initially nonempty. + * src/tail.c (tail_bytes): Set *read_pos to new file offset after + each xlseek call. + (tail_lines): Likewise, after lseek calls. + Reported by Nick Estes. See http://bugs.debian.org/205251 for details. + * tests/tail-2/tail-n0f: New file. Test for above fix. + * tests/tail-2/Makefile.am (TESTS): Add tail-n0f. + +2003-08-15 Jim Meyering <jim@meyering.net> + + * Makefile.maint (sc_space_tab): Use exclusion list in separate file. + (sc_sun_os_names): Likewise. + * .x-sc_space_tab, .x-sc_sun_os_names: New files. + + * man/help2man: Remove some SPACEs before TAB. + +2003-08-14 Paul Eggert <eggert@twinsun.com> + + * Makefile.maint (LC_ALL): Set to C. + * man/Makefile.am (ASSORT): New var. + (check-x-vs-1, programs): Use it. + * src/Makefile.am (ASSORT, check-README, ../AUTHORS): Likewise. + * tests/Makefile.am (ASSORT, all_programs): Likewise. + +2003-08-11 Jim Meyering <jim@meyering.net> + + fold -s -wN would infloop for N < 8 with TABs in the input. + E.g., this would not terminate: printf 'a\tb' | fold -w2 -s + * src/fold.c (fold_file): Move contents of `else'-block + out of conditional so it's used also for --spaces (-s). + * tests/misc/fold: Test for the above fix. + * tests/misc/Makefile.am (TESTS): Add fold. + +2003-08-10 Jim Meyering <jim@meyering.net> + + * src/nice.c [!NICE_PRIORITY]: Include <sys/resource.h> after + system.h so the types from time.h and sys/time.h are available. + It appears that this is necessary for OpenBSD, NetBSD, and + Darwin 6.5 (MacOS 10.2.5). Reported by Nelson Beebe. + +2003-08-06 Paul Eggert <eggert@twinsun.com> + + * NEWS: Add support for setting file timestamps to microsecond + resolution, on hosts that support this. + * src/copy.c, src/cp.c, src/install.c, src/touch.c: Include utimens.h. + * src/copy.c (copy_internal): + Set file timestamps with utimens, not utime. + * src/cp.c (re_protect): Likewise. + * src/install.c (change_timestamps): Likewise. + * src/touch.c (newtime, touch, main): Likewise. + +2003-08-09 Jim Meyering <jim@meyering.net> + + * Makefile.maint (sc_sun_os_names): New rule based on a regexp + from Paul Eggert. + (syntax-check-rules): Add it. + + * src/tail.c (main): Tweak Solaris OS version number in comment. + * src/wc.c (wc): Likewise + * tests/tail-2/fflush: Likewise. + + * src/tail.c: Add new undocumented option, --presume-input-pipe. + (pipe_lines): Use memchr to skip lines, rather than an explicit loop. + +2003-08-08 Paul Eggert <eggert@twinsun.com> + + Use new gnulib 'extensions' module. + * configure.ac: Invoke gl_USE_SYSTEM_EXTENSIONS instead of + AC_GNU_SOURCE. + +2003-08-08 Paul Eggert <eggert@twinsun.com> + + * tests/du/basic: Ensure that a/b/F has at least 65 bytes too. + +2003-08-09 Jim Meyering <jim@meyering.net> + + * tests/misc/split-fail: Reflect that `split -a 0' is now accepted. + For tests of obsolete behavior, don't presume that unsetting + _POSIX2_VERSION is equivalent to _POSIX2_VERSION=199209. + +2003-08-07 Paul Eggert <eggert@twinsun.com> + + * doc/coreutils.texi (split invocation): + Add -d or --numeric-suffixes option to 'split'. + From a suggestion by Jesse Kornblum. + * src/split.c (suffix_alphabet): New var. + (longopts, usage, next_file_name, main): Support -d. + (next_file_name, main): Allow -a0, as POSIX requires. + (next_file_name): Don't assume ASCII-like encoding; + 'a' through 'z' are not contiguous in EBCDIC. + +2003-08-05 Paul Eggert <eggert@twinsun.com> + + Merge getline from gnulib. + * lib/getline.h, lib/getline.c, m4/getline.m4: Merge from gnulib. + * lib/getndelim2.h, lib/getndelim2.c, m4/getndelim2.m4, m4/ssize_t.m4: + New files, from gnulib. + * lib/getdelim2.c, lib/getdelim2.h: Remove. + * lib/Makefile.am (libfetish_a_SOURCES): Change getdelim2.c and + getdelim2.h to getndelim2.c and getndelim2.h. + * m4/jm-macros.m4 (jm_MACROS): Use gl_GETNDELIM2 rather than + checking for getdelim. + (jm_CHECK_ALL_TYPES): Use gt_TYPE_SSIZE_T for ssize_t rather + than rolling our own. + * src/cut.c: Include getndelim2.h rather than getdelim2.h. + (cut_fields): Invoke getndelim2 rather than getdelim2. + +2003-08-04 Jim Meyering <jim@meyering.net> + + * src/sort.c (main): Use unsigned int instead of int for `nsigs' + and for the indices to iterate through nsigs. + +2003-08-02 Paul Eggert <eggert@twinsun.com> + + * src/sort.c: Minor code cleanups, mostly to use more accurate + types and to remove unnecessary casts. + (min, max): Remove. All uses changed to MIN and MAX. + (hard_lc_collate, hard_LC_TIME, struct buffer.eof, struct + keyfield.skipsblanks, struct keyfield.skipeblanks, struct + keyfield.numeric, struct keyfield.general_numeric, struct + keyfield.month, struct keyfield.reverse, reverse, unique, + have_read_stdin): Now bool, not int. All uses changed. + (eolchar): Now char, not int. + (struct keyfield.ignore): Now bool const *, not int *. + (struct keyfield.translate): Now char const *, not char *. + (struct month.name): Likewise. + (blanks, nonprinting, nondictionary): Now bool[], not int[]. + (cleanup, inittables, keycompare, check, mergefps, first_same_file, + check, sort, main): Use const * pointers when possible. + (month_cmp): Rewrite to avoid casts. + (inittables): Initialize tables unconditionally, to avoid branches. + (fillbuf): Return bool, not int. All uses changed. + (fillbuf, keycompare, new_key, main): + Use SIZE_MAX rather than (size_t) -1. + (trailing_blanks): Renamed from trim_trailing_blanks. + Return the number of blanks to trim. All uses changed. + (getmonth): Use trailing_blanks rather than open code. + (keycompare): Do not cast char * to unsigned char *; not needed. + CMP_WITH_IGNORE converts args to UCHAR, so no need to convert it + ourselves. + (compare, main): Use | rather than || to avoid jumps. + Replace "diff = NONZERO (alen)" with "diff = 1", since alen must + be nonzero there. + (check, first_same_file, sort, main): + Use bool instead of int local vars when possible. + (check): Merge the old 'checkfp' and 'check' into a single function, + that returns a boolean (true if the file was ordered). + All uses changed. + (main): Use int instead of unsigned for iterating through nsigs. + Rename local var "posix_pedantic" to "posixly_correct". + +2003-08-02 Jim Meyering <jim@meyering.net> + + * src/nice.c [!NICE_PRIORITY]: Include <time.h> before <sys/resource.h> + to avoid compilation error on Ultrix. Reported by Christian Krackowizer. + + * src/cut.c (cut_fields): Don't read again after encountering an + initial EOF. E.g., `cut -f2' would do so. + * tests/misc/tty-eof: Add a test for the above fix. + + * src/sort.c (sortlines): Add description and references. + From Paul Eggert. + + * tests/Makefile.am (TESTS_ENVIRONMENT): Set PATH so that + the tests in help-version will use the just-built binaries. + Reported by Christian Krackowizer. + +2003-07-31 Paul Eggert <eggert@twinsun.com> + + * NEWS: Add --rfc-2822 option to GNU date. + * doc/coreutils.texi (Time directives, Options for date, Examples + of date): Likewise. + * src/date.c (long_options, usage, main): Likewise. + * doc/getdate.texi (General date syntax): Likewise. + * doc/coreutils.texi (Options for date): Fix a typo in format: + it's now %d not %_d. Add URLs. + +2003-08-01 Jim Meyering <jim@meyering.net> + + * tests/shred/remove: Ensure that $? is 0 for the final `exit 0'. + Otherwise, with at least the /bin/sh from HPUX 10.20, + the trap code would end up converting that to exit 1 and thus an + unexpected test failure. Reported by Christian Krackowizer. + +2003-07-31 Paul Eggert <eggert@twinsun.com> + + * src/ptx.c: Do not include bumpalloc.h. + (WORD_TABLE): New member alloc. + (ALLOC_NEW_WORD): Remove. + (occurs_alloc): New var. + (digest_word_file, find_occurs_in_text): Check for arithmetic + overflow when computing table size. Use xrealloc rather than + bumpalloc primitives. + +2003-07-29 Jim Meyering <jim@meyering.net> + + * Version 5.0.90. + + * README: When running tests as root, suggest using + sudo with NON_ROOT_USERNAME=$USER. + + * tests/Makefile.am (all_programs): Makefile is in ../src, not + $(srcdir)/../src. + +2003-07-28 Jim Meyering <jim@meyering.net> + + * Makefile.maint (GZIP_ENV): Try Debian/gzip's new --rsyncable option. + +2003-07-28 Paul Eggert <eggert@twinsun.com> + + * lib/stdbool.hin (_Bool): Make it signed char, instead of + an enum type, so that it's guaranteed to promote to int. + * src/sort.c (sortlines_temp): Undo previous change. + +2003-07-28 Jim Meyering <jim@meyering.net> + + * src/sort.c (sortlines_temp): Declare local `swap' to be `int', not + `bool'. Otherwise, at least one buggy compiler (alpha gcc-2.95.4) + would cause lines[-1 - swap] (with swap = false) to evaluate to + lines[4294967295]. + +2003-07-27 Jim Meyering <jim@meyering.net> + + * tests/priv-check (my_uid): Use `!', not `^' in case pattern `[!0-9]', + since /bin/sh of at least NetBSD 1.6 and OpenBSD 3.2 don't accept `^'. + + * src/remove.c (prompt) [! recursive]: Don't prompt about unwritable + directories, as required by POSIX. Reported by Karl Berry. + * tests/rm/dir-no-w: New file. Test for the above fix. + * tests/rm/Makefile.am (TESTS): Add dir-no-w. + + * tests/mk-script: Emit `$xx', not its expansion. + +2003-07-27 Paul Eggert <eggert@twinsun.com> + + This change was inspired by a similar proposal by Stepan Kasal. + * src/sort.c (mergelines, sortlines_temp): New functions. + (sortlines): Use them, to reduce the number of times that + we need to copy 'struct line' values. This improved CPU + performance by about 30% on one 18 MB test. + (sort): Don't invoke sortlines unless we have 2 or more lines. + +2003-07-26 Stepan Kasal <kasal@ucw.cz> + + * src/sort.c (sort): Don't require two `struct line's per text line, + the new sort algorithm requires just 1.5. + +2003-07-27 Jim Meyering <jim@meyering.net> + + * src/pathchk.c (validate_path): Use %lu, not %ld. + From Paul Eggert. + * src/cut.c (is_printable_field): Simplify bit arithmetic. + From Paul Eggert. + * src/ls.c (sort_files): Put `volatile' in the right place. + From Paul Eggert. + +2003-07-26 Jim Meyering <jim@meyering.net> + + Use only one bit per field/offset in array, not one `int'. + * src/cut.c (printable_field): Change type to `unsigned char'. + (mark_printable_field, is_printable_field): New functions. + Use them in place of all direct accesses of `printable_field'. + + * src/expand.c (parse_tabstops): Detect overflow properly. + * src/cut.c (set_fields): Likewise. + + * src/rm.c: Include "dirname.h". + (usage): Use base_name (program_name) in body of --help output. + This lets me... + * man/Makefile.am (.x.1): ...back out the kludge of 2003-07-22. + Idea from Brendan O'Dea, who suggested using + `program_name = basename (argv[0]);' everywhere -- + can't do that, but using base_name works just fine here. + + * src/Makefile.am (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Exempt test. + +2003-07-24 Paul Eggert <eggert@twinsun.com> + + Fix some POSIX-compliance problems with 'test'. This makes + 'test' more compatible with Bash. + + * NEWS, doc/coreutils.texi: Document the following. + * src/test.c: Include exitfail.h. + (TEST_FAILURE): New constant, used for exit status if 'test' fails. + (test-syntax_error): Use it. + (binary_operator): Now takes bool arg specifying whether left operand + is -l ARG, so that caller determines this rather than us. + All uses changed. + (term): Use posixtest to evaluate parenthesized subexpressions. + (unary_operator, one_argument): Remove support for -t without operand. + (one_argument): Take argument from argv[pos]. + (one_argument, two_arguments, three_arguments): Advance pos. + All callers changed. + (three_arguments): Look for binary ops before "!". Then look + for parenthesized one_argument expressions, instead of trusting + expr () to do the right thing. + (posixtest): Now takes number of args. All callers changed. + Treat "( A B )" like "A B". + (main): Set exit_failure to TEST_FAILURE. Don't depend on + POSIXLY_CORRECT, as we now conform to POSIX by default. + (main) [!LBRACKET]: Do not recognize "--help" or "--verbose" unless. + * tests/test/Test.pm (test_vector): Add several tests to check + the above. Syntax errors now exit with status 2, not 1. + * man/Makefile.am (mapped_name): Use `../src/[' binary to create test.1. + +2003-07-26 Jim Meyering <jim@meyering.net> + + * tests/help-version: Adjust for above change in test behavior: + `[' exits with 2, not 1, and test doesn't accept --help or --version. + + * Makefile.maint (ME): Don't use trick suggested in Make manual. + It doesn't work for make-3.79.1. Reported by Christian Krackowizer. + + * Makefile.maint (sc_system_h_headers): Another syntax check. + (syntax-check-rules): Add it to the list. + + * src/pathchk.c (validate_path): Cast strlen value to `unsigned long' + so it matches `%ld' format even on 32-bit systems. + + * src/fmt.c (flush_paragraph): Cast field width to `int' to + avoid warning on 64-bit systems. + + * src/ls.c (sort_files): Make `func' volatile, so it can't be + clobbered by a `longjmp' into this function. + +2003-07-25 Jim Meyering <jim@meyering.net> + + * src/pathchk.c (validate_path): Use %ld format (not %d) for size_t + value. + + * tests/misc/split-fail: Disable the --line-bytes=$_4gb test, + because it'd evoke spurious failure on 64-bit systems. + +2003-07-24 Jim Meyering <jim@meyering.net> + + * src/dd.c (usage): Document the fact that SIGUSR1 makes dd + output its current record counts. Reported by Jurriaan. + + * tests/wc/Test.pm (test_vector): Disable the `PIPE' tests when running + `wc' with no options. This goes along with the change of 2003-07-20. + +2003-07-23 Jim Meyering <jim@meyering.net> + + Don't include headers already included by system.h: + * src/tr.c: Don't include errno.h. + * src/true.c: Don't include version-etc.h. + * src/test.c: Don't include limits.h or error.h. + * src/stat.c: Don't include unistd.h or time.h. + * src/readlink.c: Don't include stdlib.h, unistd.h, or limits.h. + * src/pr.c: Don't include time.h. + * src/pathchk.c: Don't include errno.h. + * src/nice.c: Don't include sys/time.h. + * src/ls.c: Don't include stdlib.h. + + * basename.c, cat.c, chroot.c, cksum.c, comm.c, csplit.c, cut.c, date.c: + * dd.c, dirname.c, echo.c, env.c, expand.c, expr.c, factor.c, fmt.c: + * fold.c, head.c, hostid.c, hostname.c, id.c, join.c, kill.c, logname.c: + * md5sum.c, nice.c, nl.c, nohup.c, od.c, paste.c, pathchk.c, pinky.c: + * pr.c, printenv.c, printf.c, ptx.c, pwd.c, seq.c, setuidgid.c, shred.c: + * sleep.c, sort.c, split.c, stat.c, stty.c, su.c, sum.c, tac.c, tail.c: + * tee.c, test.c, tr.c, true.c, tsort.c, tty.c, uname.c, unexpand.c: + * uniq.c, uptime.c, users.c, wc.c, who.c, whoami.c, yes.c: + Don't include closeout.h. + + * tests/rm/fail-2eperm: Add a check for whether $NON_ROOT_USERNAME + can access the required version of rm. + * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Define PACKAGE_VERSION. + + * tests/cut/Test.pm (out-delim3a): New test. + + * man/help2man: Update to version 1.33. + + * src/expand.c (parse_tabstops): Detect overflow in tabstop sizes. + + * src/dircolors.c: Include xstrndup.h. + (xstrndup): Remove function, now that it's been factored out into + it's own file. + +2003-07-22 Paul Eggert <eggert@twinsun.com> + + * src/wc.c (wc): Fix typo in computation of file from file_x, + which caused the former to be used uninitialized if file_x was + nonzero. + +2003-07-22 Jim Meyering <jim@meyering.net> + + * src/cut.c (set_fields): Use xcalloc in place of xmalloc+memset. + + * man/Makefile.am (.x.1): Substitute 's,$t/$*,$*,' on output of + help2man, to avoid having `rm.td/rm' appear in rm.1. Reported by + Thomas Luzat. See http://bugs.debian.org/202413 for details. + + * src/cut.c (main) [lint]: Initialize spec_list_string to avoid warning. + + * src/hostid.c: Don't include <unistd.h>. system.h already does that. + + * src/cut.c (set_fields): Mark all selected indices before trying to + determine range endpoints. + * tests/cut/Test.pm: New test for the above fix. + + Begin to address this comment: What if someone wants to + extract the 1,000,000-th field of some huge input file? + The first step is to rearrange things so that the values + in the printable_field array are all 0/1 rather than 0/1/2. + * src/cut.c (RANGE_START_SENTINEL): Remove. + Store range-start indices in a hash table, rather than + overloading the `printable_field' array. + (range_start_ht): New global. + (hash_int, hash_compare_ints, is_range_start_index): New functions. + (print_kth): Use is_range_start_index; don't test printable_field. + (set_fields): Detect overflow. + (set_fields): Insert each range-start index into range_start_ht. + (main): Call set_fields only once, and only after + output_delimiter_specified and (if required) range_start_ht have + been defined. + +2003-07-20 Paul Eggert <eggert@twinsun.com> + + * src/wc.c (get_input_fstatus): Fix typo: `stat' was being + invoked with a null pointer when there were no file arguments. + +2003-07-20 Jim Meyering <jim@meyering.net> + + * Makefile.maint (sc_changelog): Add another nit-picky check. + + * src/wc.c (write_counts): Add a comment. + (wc): Rename `file' parameter. + Set new local, `file', to be the file name, or (when it's NULL) + _("standard output") so that all uses of `file' use the proper value. + Use STREQ, not strcmp. + +2003-07-20 Paul Eggert <eggert@twinsun.com> + + wc count field widths now are heuristically adjusted depending + on the input size, if known. If only one count is printed, it + is guaranteed to be printed without leading spaces. + + Previously, wc did not align the count fields if + POSIXLY_CORRECT was set, but POSIX did not actually require + this undesirable behavior, so it has been removed. + + * NEWS: Document this. + * doc/coreutils.texi (wc invocation): Likewise. + + * src/wc.c (number_width): New var. + (posixly_correct): Remove. + (struct fstatus): New struct. + (write_counts): Output fields of width number_width. + Do not worry about POSIXLY_CORRECT. + Use null file, not empty-string file, to denote stdin, + since "" is a valid file name on some hosts. + (wc, wc_file): New arg fstatus. Use it to avoid invoking fstat + if possible. + (wc): Avoid problems if end_pos - current_pos overflows. + Do not print odd message if stdin has a read error. + (get_input_fstatus, compute_number_width): New functions. + (main): Use them to implement the new behavior. + Ignore POSIXLY_CORRECT. + + * tests/wc/Test.pm: Adjust to the new output widths. + +2003-07-19 Jim Meyering <jim@meyering.net> + + * tests/rm/fail-eperm: Don't create temporary directory -- + we don't use it. + + * tests/shred/remove: Don't open-code test for UID != 0. + Use priv-check's require-non-root instead. + Update to use newer framework. + + * tests/help-version (expected_failure_status_expr): Record that + expr exits with status of 3 for e.g., a write error. + + * tests/priv-check: Use `id -u' to see if we're running as root, + rather than trying go write to an write-protected file. + When running as root, ensure $NON_ROOT_USERNAME is valid. + When running as root with `require-non-root', ensure that `.' + is writable by $NON_ROOT_USERNAME, then reinvoke $0 set-user-ID + to $NON_ROOT_USERNAME. If `.' is not writable, then skip the test. + + * src/printenv.c: Include "exitfail.h". + (main): Set exit_failure rather than calling close_stdout_set_status. + * src/date.c: Likewise. + * src/sort.c: Likewise. + * src/tty.c: Likewise. + +2003-07-18 Jim Meyering <jim@meyering.net> + + * tests/touch/not-owner: Update to use newer framework. + + * tests/rm/fail-eperm: Use $srcdir/../priv-check, create a temporary + directory, and remove Perl-coded `you may not run as root' test. + * tests/cp/fail-perm: Use $srcdir/../priv-check, rather than + hard-coding something not quite equivalent. + Paul Jarc reported the inconsistent diagnostics. + + * src/sort.c (main): Use close_stdout via atexit. + Now `sort --version' and `sort --help' fail, as they should + when their output is redirected to /dev/full. + + * src/su.c (usage): Don't call close_stdout here. + (main): Use close_stdout via atexit. + Now `su --version > /dev/full' fails, as it should. + Somehow, the change of 2000-05-07 that purports to fix this + was not checked in. + + * tests/help-version (--help/--version vs. /dev/full): Special-case + `[' to protect it from expected_failure_status-`eval'. + + * src/uniq.c (writeline): Use a SPACE, not a TAB between the + count and the corresponding line, as required by POSIX. + Reported by Clement Wang. + * tests/uniq/Test.pm (101, 102): Update tests of -c accordingly. + + * tests/expr/basic: Add tests for when exit status is 2. + + * src/nohup.c (NOHUP_FOUND_BUT_CANNOT_INVOKE, NOHUP_FAILURE): + Use an anonymous `enum', rather than #define. + +2003-07-17 Paul Eggert <eggert@twinsun.com> + + * src/expr.c: Include "exitfail.h", "quotearg.h". + (EXPR_INVALID, EXPR_ERROR): New constants. + (nomoreargs, null, toarith, nextarg): Return bool, not int. + (syntax_error): New function, exiting with status 2. Use it + insteading of printing "syntax error" ourselves. + (main): Initialize exit_failure to EXPR_ERROR. + Exit with EXPR_INVALID on syntax error (too few arguments). + (nextarg): Use strcmp, not strcoll; strcoll might return + an undesirable 0, or might fail. + (docolon, eval4, eval3): Exit with status 3 on invalid argument type + or other such error. + (eval2): Report an error if strcoll fails in a string comparison. + * src/sort.c: Include "exitfail.h". + (main): Set exit_failure, not xalloc_exit_failure and + xmemcoll_exit_failure. + * tests/expr/basic: Invalid value exits with status 3, not 2. + +2003-07-16 Jim Meyering <jim@meyering.net> + + * configure.ac (AC_INIT): Use 5.0.90 as the version, rather than 5.0.2, + per GNU maintainer guidelines. The next non-beta release will be 5.1. + + This script would have caught at least two recent bugs: + those in [ and kill. + * tests/help-version: Revive this script. + It wasn't doing anything useful, since $all_programs wasn't being + defined by the invoking Makefile.am. + Reflect that nohup is no longer a script, so don't exclude it. + Add framework to handle the programs added since it was last run: + kill, stat, unlink, [, link, readlink. + Fix path-related problems deriving from the move of this script + from src/ to its present location. + * tests/Makefile.am (all_programs): Define. + (TESTS_ENVIRONMENT): Use it. + + * src/kill.c (main): Fix bug introduced on 2003-05-10 (for 5.0.1) + whereby kill would always attempt to operate on argv[0] and fail. + + * src/test.c (integer_expected_error): Improve diagnostic -- now, + it also matches the one from bash's builtin test. + (binary_operator): Add \n at end of diagnostic. + + * tests/rm/fail-2eperm: Remove setuidgid-related code. Move it to ... + * tests/priv-check: Move setuidgid-related and + NON_ROOT_USERNAME-checking code to this file. + + * README: Update section on testing as `root'. + Suggestion from Paul Jarc. + + * src/test.c (AUTHORS): Replace 3-letter usernames with the actual + names of authors that I just found in bash's builtins/test.def. + + Running `[' with no arguments would evoke a segfault. + * src/test.c (main) [LBRACKET]: Move initialization of argv to + precede potential use via test_syntax_error. + + * src/Makefile.am (AM_CPPFLAGS): Rename from `INCLUDES', to avoid + warning from automake -Wall. + +2003-07-15 Jim Meyering <jim@meyering.net> + + * Version 5.0.1. + + * Makefile.maint (%.asc): Remove target first, so gpg doesn't + prompt us about it. + + * announce-gen (print_changelog_deltas): Relax tests for matching + version-number line in NEWS. + Change the .sig suffix to .asc here, too. + +2003-07-14 Jim Meyering <jim@meyering.net> + + * Makefile.maint (%.asc): Renamed from %.sig. + Generate and use ascii-armored signatures. + Use gpg's -o option. + +2003-07-13 Jim Meyering <jim@meyering.net> + + * src/nohup.c (NOHUP_FAILURE, NOHUP_FOUND_BUT_CANNOT_INVOKE): Define. + (main): Use them. + + * Makefile.maint (syntax-check): Move each individual check into + its own target. + (syntax-check-rules): This is the list of syntax-check targets. + (sc_unmarked_diagnostics, sc_cast_of_argument_to_free): + (sc_cast_of_x_alloc_return_value, sc_space_tab): + (sc_error_exit_success, sc_xalloc_h_in_src): New targets. + +2003-07-12 Jim Meyering <jim@meyering.net> + + * configure.ac: Remove uses of OPTIONAL_BIN_ZCRIPTS and last + traces of the nohup script. + + * src/Makefile.am (bin_SCRIPTS): Remove use of just-removed + $(OPTIONAL_BIN_ZCRIPTS). + + * src/Makefile.am (localedir.h): Put the `2>&1' after the redirect + target, not before the `>'. + + * src/remove.c (remove_dir): Give a diagnostic upon failed save_cwd, + now that that function no longer calls `error'. + + * src/df.c (find_mount_point): Emit a diagnostic for each + failed syscall, rather than relying on caller to do that. + The caller couldn't do a good job, anyhow -- too many different + ways to fail (each with a different referent). + Give a diagnostic upon failed save_cwd, now that that function + no longer calls `error'. + (show_point): Don't diagnose find_mount_point's errors, now that + it handles them itself. + + * src/df.c (find_mount_point): Don't let free clobber errno upon + failed chdir. + + * src/sys2.h: Remove alloca-related block. + * src/system.h: Include <alloca.h> here, instead. + + It appears that the `#pragma alloca' included via "system.h" is + adequate, since join.c uses alloca, yet lacked an in-file #pragma. + * src/copy.c, src/cp.c, src/df.c, src/install.c, src/ln.c: + * src/ls.c, src/mv.c, src/remove.c: Remove `#pragma alloca'. + + * src/chown-core.c (change_file_owner): Do not restore any special + permission bits (e.g., set-user-ID, set-group-ID) that are reset + by chown(2) on some systems. Suggestion and insistence :-) from + Michael Stone. + + * tests/input-tty: Also check `test -t 1'. + This is necessary on linux-2.4.21. Otherwise, the stty/basic-1 + test would block when run in the background. + +2003-07-11 Jim Meyering <jim@meyering.net> + + * tests/sample-test: Also fail if cat-to-create-expected-output + fails. Otherwise, if both `exp' and `out' were to end up empty + because of e.g., a full disk, they would mistakenly compare equal. + + * src/nohup.c: New file. Rewrite of nohup.sh in C. + This solves a portability problem: on at least Solaris systems, + when nohup.sh used the vendor /bin/sh, it would exit with status + of `1' rather than the required 126 or 127 upon failure to exec + the specified program. + + * src/Makefile.am (EXTRA_SCRIPTS): Remove definition. + (bin_PROGRAMS): Add nohup. + (EXTRA_DIST): Remove nohup.sh. + (all_programs): Remove use of $(EXTRA_SCRIPTS). + * src/nohup.sh: Remove file. + * man/Makefile.am (nohup.1): Depend on nohup.c, rather than nohup.sh. + + * tests/misc/nohup: Tests for the above. + * tests/misc/Makefile.am (TESTS): Add nohup. + + * src/head.c (diagnose_copy_fd_failure): New function, renamed from + the macro, COPY_FD_DIAGNOSE. + (diagnose_copy_fd_failure): Enclose diagnostic in _(...). + (head_file): Likewise. + + * src/date.c: Include "quote.h". + (batch_convert): Use the quote function rather than using literal `...' + in a diagnostic. + + * src/setuidgid.c (main): Enclose diagnostic in _(...). + * src/fmt.c (main): Likewise. + * src/mknod.c (main): Likewise. + * src/tac.c (tac_seekable): Likewise. + * src/yes.c (main): Likewise. + * src/od.c (main): Likewise. + * src/install.c (change_attributes): Likewise. + +2003-07-10 Jim Meyering <jim@meyering.net> + + * src/head.c (usage): Use 1024*1024 in place of 1048576. + * src/tail.c (usage): Likewise. + + * tests/rm/fail-2eperm: Now that we have setuidgid, use it in + place of the kludge in this test. Suggestion from Paul Jarc. + + * src/Makefile.am (noinst_PROGRAMS): Define to setuidgid. + * src/setuidgid.c: New program, solely for testing (not installed). + + * src/chown-core.c (change_file_owner): Don't leak file descriptors + when dereferencing symlinks. + +2003-07-09 Jim Meyering <jim@meyering.net> + + * tests/du/slash: New file/test for today's lib/ftw.c fix. + * tests/du/Makefile.am (TESTS): Add slash + + * src/tail.c (xlseek): Avoid warning about ``return without value + from function returning non-void''. + +2003-07-08 Jim Meyering <jim@meyering.net> + + * man/help2man: Update to version 1.29. + + * man/help2man: Add END handler to close STDOUT and check for errors. + +2003-06-30 Paul Eggert <eggert@twinsun.com> + + Add support for a "[" that conforms to the GNU coding standards, + i.e., that does not depend on its name. + * src/lbracket.c: New file. + * README: Add "[". + * man/Makefile.am (programs): Ignore "[", since it doesn't have + a separate man page. + * src/Makefile.am (bin_PROGRAMS): Add "[". + (__SOURCES): New var. + * src/test.c (LBRACKET): Define to 0 if not defined. + (main): Use LBRACKET rather than argv[0]. + + * src/test.c (one_argument): Do not check for -t if POSIXLY_CORRECT. + Reported by Paul Jarc and Dan Jacobson. + + * src/test.c (main): Do not recognize --help or --version if + POSIXLY_CORRECT, when invoked as "test". Handle "[ ]" correctly. + Do not bother testing that margv[margc] is non-null. + +2003-07-04 Jim Meyering <jim@meyering.net> + + * src/who.c (print_line): Rewrite to use asprintf, in order to be + able to avoid emitting trailing spaces. Reported by Dan Jacobson. + + * tests/misc/head-elide-tail: Add tests of head's new --lines=-N + option, and perform the +1600 invocations of head IFF the envvar + RUN_EXPENSIVE_TESTS is set. + +2003-07-03 Jim Meyering <jim@meyering.net> + + * src/cp.c (do_copy): Give a better diagnostic when failing due + to nonexistent destination directory. Reported by Dmitry Rutsky. + See http://bugs.debian.org/199730 for details. + +2003-06-27 Jim Meyering <jim@meyering.net> + + split's --verbose option did nothing [broken in 4.5.10 and 5.0] + * src/split.c (longopts): Use `1', not `0' as the value for + for &verbose. Reported by Keith Thompson. + + Test for the above fix. + * tests/misc/split-a: Also use --verbose and compare stderr + output with what we'd expect. + +2003-06-20 Jim Meyering <jim@meyering.net> + + * src/copy.c (copy_internal) [HAVE_STRUCT_STAT_ST_AUTHOR]: + Use `error_t' (rather than int) as type for local `err'. + From Alfred M. Szmidt. + +2003-06-19 Marcus Brinkmann <marcus@gnu.org> + + * src/copy.c (copy_internal) [HAVE_STRUCT_STAT_ST_AUTHOR]: + Fix author preservation code. + +2003-06-19 Jim Meyering <jim@meyering.net> + + * src/ln.c (ENABLE_HARD_LINK_TO_SYMLINK_WARNING): Define to 0. + (do_link): Don't warn about hard link to symlink. + +2003-06-18 Jim Meyering <jim@meyering.net> + + * src/cut.c: Include "getdelim2.h", not "getstr.h". + Reflect renaming: getstr -> getdelim2. + + * src/comm.c, src/join.c, src/nl.c, src/uniq.c: Reflect renaming: + readline -> readlinebuffer. + +2003-06-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + * src/readlink.c: Include <sys/types.h> before system.h (because + the latter includes <sys/stat.h>). Required on Ultrix 4.3. + +2003-06-17 Jim Meyering <jim@meyering.net> + + * src/system.h (initialize_main): Define. + Use it in every `main'. Applied via this: + p='initialize_main (&argc, &argv);' + perl -ni -e '/program_name.=.argv.0/ and print " '"$p"'\n"; print' \ + $(grep -l program_name.=.argv.0 *.c) + test.c uses margc/margv, so I made the change manually for that file. + Based on a patch from Bernard Giroud. + +2003-06-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + Fix for build failure on Ultrix 4.3. + * src/stat.c: Include sys/statvfs.h in preference to sys/vfs.h. + Include sys/param.h and sys/mount.h on ultrix. + +2003-06-16 Jim Meyering <jim@meyering.net> + + * src/touch.c (O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): Remove + definitions. + * src/system.h (O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): Define + them here instead, but with one change: define EISDIR to -1, not 0. + + * src/cat.c (cat): Remove `#ifndef ENOSYS', now that it's + guaranteed to be defined. + * src/system.h (ENOSYS, ENOTSUP): Define to -1 if not defined. + + * README: Mention the CVS repository. + Encourage addition of test cases. + +2003-06-12 Jim Meyering <jim@meyering.net> + + * src/touch.c (touch): Call close only if necessary. + From Bruno Haible. + + * src/wc.c (usage): Correct wording: wc prints counts in the order + `newline, word, byte'. Reported by Keith M. Briggs. + * man/wc.x: Fix it here, too. And change `lines' to `newlines'. + +2003-06-10 Jim Meyering <jim@meyering.net> + + * tests/date/Test.pm: Add a test for the new format, e.g., May-23-2003. + +2003-06-07 Jim Meyering <jim@meyering.net> + + * Makefile.maint (syntax-check): Add commented-out (over-aggressive) + rule. + +2003-06-06 Jim Meyering <jim@meyering.net> + + * src/extract-magic (main): Avoid newer 3-arg form of open, + so this script works also with e.g., perl5.005_03. + Patch by John David Anglin. + +2003-06-04 Paul Eggert <eggert@twinsun.com> + + * src/system.h: Include <stdbool.h> unconditionally. + +2003-06-04 Jim Meyering <jim@meyering.net> + + * man/Makefile.am (check-programs-vs-x): Rename target + from check-programs-vs-1. Adjust rule to check for the + primary (.x) file, not the generated one (.1). + +2003-06-03 Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu> + + * man/kill.x: New file. + * man/Makefile.am (dist_man_MANS): Add kill.1. + (kill.1): New rule. + +2003-06-04 Jim Meyering <jim@meyering.net> + + Ensure that the .x file for a new program is never forgotten again. + * man/Makefile.am (programs): Define. + (check-programs-vs-1): New phony target. + (check-local): Depend on it. + +2003-06-03 Jim Meyering <jim@meyering.net> + + Avoid unnecessary copying of environment. + * src/env.c (main): Rather than clearing the environment and -- + unless told to ignore environment -- copying all settings from + the saved, original environment, clear the environment only when + that is requested. Suggested by Jens Elkner. + +2003-06-02 Jim Meyering <jim@meyering.net> + + * src/system.h: Always include <string.h>, since we assume C89. + Include <limits.h> without checking for HAVE_LIMITS_H. + + * src/test.c [!TEST_STANDALONE]: Remove #if-0'd block. + (STREQ, S_IXUGO): Remove redundant (in system.h) definitions. + +2003-06-01 Jim Meyering <jim@meyering.net> + + Avoid a race condition in `tail -f' described by Ken Raeburn in + http://mail.gnu.org/archive/html/bug-textutils/2003-05/msg00007.html + * src/tail.c (file_lines): Add new parameter, *read_pos, and set it. + (pipe_lines, pipe_bytes, start_bytes, start_lines): Likewise. + (tail_bytes, tail_lines, tail): Likewise. + (tail_file): Use the new `read_pos' value as the size, + rather than stats.st_size from the fstat call. + +2003-05-28 Jim Meyering <jim@meyering.net> + + * src/extract-magic: Allow expansion of `$file' in the here- + document corresponding to the comment at the top of fs.h. + +2003-05-26 Jim Meyering <jim@meyering.net> + + * src/stat.c: Fix portability problem on FreeBSD5.0: don't include + <sys/statvfs.h> on systems without HAVE_STRUCT_STATVFS_F_BASETYPE. + Use #if/#elif/... cascade so we get only one set of include files. + Reported by Nelson Beebe. + +2003-05-24 Jim Meyering <jim@meyering.net> + + * src/md5sum.c (split_3): Accept the BSD format only when in MD5 mode. + * tests/sha1sum/basic-1: Make sure `sha1sum --check' doesn't + accept the BSD format. + +2003-03-28 Joe Orton <jorton@redhat.com> + + * src/md5sum.c (bsd_split_3): New function. + (split_3): Detect checksums from BSD 'md5' command and handle them + using bsd_split_3. + + * tests/md5sum/basic-1: New tests for --check exit status, and for + BSD-style checksum files. + +2003-05-21 Jim Meyering <jim@meyering.net> + + * src/head.c (elide_tail_lines_pipe): Fix a thinko. + This sort of thing is why it'd be *Really Good* to factor + out the common code used here and in tail.c. + +2003-05-14 Jim Meyering <jim@meyering.net> + + * src/head.c (usage): Document new feature: --bytes=-N and --lines=-N. + + * tests/du/slink: Skip this test if `.' is on an XFS file system. + + * tests/du/fd-leak: New file. Test for the bug in du that + was fixed by the 2003-05-12 change to lib/ftw.c. + * tests/du/Makefile.am (TESTS): Add fd-leak. + + * src/head.c (AUTHORS): Enclose string in N_(...), now that it + includes a translatable word, `and'. + + * src/dd.c (usage): Don't use `,' as the thousands separator + in e.g. 1,000,000 and 1,048,576. Instead, do this: + `SIZE may be ..., MB 1000*1000, M 1024*1024 and so on...' + * src/df.c (usage): Likewise. + * src/du.c (usage): Likewise. + * src/ls.c (usage): Likewise. + + * Makefile.maint (syntax-check): Add another check. + +2003-05-13 Paul Eggert <eggert@twinsun.com> + + Fix uniq to conform to POSIX, which requires that "uniq -d -u" + must output nothing. Problem reported by Josh Hyman. + + * src/uniq.c (enum output_mode, mode): Remove, replacing with: + (output_unique, output_first_repeated, output_later_repeated): + New vars. All uses of "mode" changed to use these variables, + which are not mutually exclusive as "mode" was. + (writeline): New arg "match", used to control whether to + obey output_first_repeated or output_later_repeated. + All callers changed. + (check_file, main): Adjust to above changes. + + * tests/uniq/Test.pm: Test that 'uniq -d -u' outputs nothing. + +2003-05-14 Jim Meyering <jim@meyering.net> + + * tests/rm/rm3: Use tr's \n notation rather than \012. + This package can afford to do that, since its tests are guaranteed use + GNU tr, which has accepted the more modern notation for 10 years. + * tests/rm/rm5: Likewise. + * tests/cp/same-file: Likewise. + * tests/stty/row-col-1: Likewise. + * tests/stty/basic-1: Likewise. + * tests/rm/deep-1: Likewise. + * tests/mv/part-symlink: Likewise. + * tests/mkdir/perm: Likewise. + * tests/misc/nice: Likewise. + +2003-05-13 Jim Meyering <jim@meyering.net> + + * src/copy.c (struct F_triple) [name]: Remove const attribute. + (triple_free): Don't apply cast to argument of free. + (seen_file): Add cast here instead. + + * src/cp-hash.c (struct Src_to_dest) [name]: Remove const attribute. + (src_to_dest_free): Don't apply cast to argument of free. + + * src/sort.c (zaptemp): Don't apply cast to argument of free. + * src/pr.c (init_fps, init_store_cols): Likewise. + * src/join.c (delseq, freeline): Likewise. + * src/expr.c (OLD): Likewise. + * src/sort.c (sort): Likewise. + * src/head.c (elide_tail_lines_pipe): Likewise. + + * src/tail.c: Include "quote.h". + Use quote in diagnostics. Change many error format strings + from just `%s' to e.g., `error reading %s'. + (pipe_lines): Change type of parameter, n_lines, to uintmax_t. + Rewrite newline-counting loop to use memchr. + + * src/head.c (elide_tail_lines_pipe): Use `if', not assert. + Now that assert is no longer used, don't include <assert.h>. + +2003-05-12 Jim Meyering <jim@meyering.net> + + * src/head.c: Include <assert.h>. + (AUTHORS): Add my name. + (elide_tail_lines_pipe): New function. + +2003-05-10 Jim Meyering <jim@meyering.net> + + * Makefile.maint (syntax-check): Check for `error (EXIT_SUCCESS,'. + + * src/readlink.c (main): Set program_name before first use. + Remove that (redundant) first use. + Don't exit successfully just because --verbose was specified. + Pass 0, not EXIT_SUCCESS, as first argument to error; when that + parameter is 0, error does not exit. + + * src/uname.c (main): When failing due to too many arguments, also say + that, rather than just "Try `uname --help' for more information.". + * src/comm.c (main): Likewise, but for too few arguments. + * src/logname.c: Include error.h. + (main): Say why we're failing. + + * src/uniq.c (main): Don't segfault when argc < optind. + * src/who.c (main): Handle argc < optind. + * src/df.c (main): Likewise. + * src/install.c (main): Likewise. + * src/mv.c (main): Likewise. + * src/pwd.c (main): Likewise. + * src/tty.c (main): Likewise. + * src/chroot.c (main): Likewise. + * src/hostname.c: Likewise. + * src/du.c (main): Likewise. + * src/expand.c (main): Likewise. + * src/env.c (main): Likewise. + * src/unexpand.c (main): Likewise. + * src/printenv.c (main): Likewise. + * src/sync.c (main): Handle argc == 0. + * src/expr.c (main): Likewise. + * src/printf.c (main): Likewise. + * src/basename.c (main): Likewise. + * src/ln.c (main): Test for `missing argument' before computing n_files. + * src/tail.c (main): Test for the case of no arguments before + computing n_files. + + * src/kill.c (send_signals): Don't check command line arguments here. + (main): Check them here instead. Handle argc < optind. + + * src/logname.c (main): Use error, rather than fprintf, for the sake + of consistency. + + * src/rm.c (main): Don't overrun array bound if argc is 0. + +2003-05-09 Jim Meyering <jim@meyering.net> + + * src/sort.c (main): Don't overrun array bound if argc is 0. + That would happen when invoked via: execl ("/usr/bin/sort", NULL); + Reported by Wartan Hachaturow. + +2003-05-07 Jim Meyering <jim@meyering.net> + + Implement support so that `head --lines=-N' works on seekable files. + * src/head.c (enum Copy_fd_status): Define. + (COPY_FD_DIAGNOSE): New macro. + (elide_tail_lines_seekable): New funtion. + (elide_tail_lines_file): Call it here. + +2003-05-06 Jim Meyering <jim@meyering.net> + + * src/sys2.h (CHAR_BIT): Remove duplicate definition. + +2003-05-04 Jim Meyering <jim@meyering.net> + + * tests/head/Test.pm: Remove tests of --bytes=-N; using that framework + caused the addition of thousands of small files to the tar archive. + * tests/misc/head-elide-tail: New file. Add them here instead. + * tests/misc/Makefile.am (TESTS): Add head-elide-tail. + +2003-05-04 Paul Eggert <eggert@twinsun.com> + + * src/remove.c (HAVE_WORKING_READDIR): Define to 0 if not defined. + (IF_READDIR_NEEDS_REWINDDIR): Remove. + (remove_cwd_entries): Rewrite to avoid IF_READDIR_NEEDS_REWINDDIR, + which was a bit weird because it couldn't be emulated by a function. + +2003-05-03 Jim Meyering <jim@meyering.net> + + Extend head to accept --lines=-N (--bytes=-N) and to print all + but the N lines (bytes) at the end of the file. + * src/head.c: Include full-write.h, full-read.h, inttostr.h, quote.h. + Use quote() in diagnostics, rather than literal `' marks. + (copy_fd, elide_tail_bytes_pipe, elide_tail_bytes_file): + New functions. + (elide_tail_lines_pipe, elide_tail_lines_file): New functions. + (head_file): Reorganize so as to call head from only one place. + (main): Likewise, for head_file. + Handle new, undocumented option, --presume-input-pipe. + Handle negative line and byte counts. + * tests/head/Test.pm: Add lots of tests to exercise --bytes=-N. + + * tests/du/8gb: Skip test if the file system of `.' doesn't support + sparse files -- otherwise it'd create a file of size 8GB. + +2003-05-02 Jim Meyering <jim@meyering.net> + + * src/fmt.c (usage): Don't mention obsolescent -WIDTH option. + Instead explain about `-' and standard input. + (main): Give a proper diagnostic for e.g., `fmt -c -72'. + Reported by Keith Thompson. + * tests/fmt/basic: Add test for the above fix. + + * src/fmt.c: Include "quote.h". + Use quote() in diagnostics, rather than literal `' marks. + (main): Exit nonzero when unable to open an input file. + * tests/fmt/basic: Add test for the above fix. + + * src/fmt.c (main): Diagnose invalid suffix on obsolescent width + specifications like `-72x'. + * tests/fmt/basic: Add test for the above fix. + + Work around nasty readdir bug on Darwin6.5. + * src/remove.c (IF_READDIR_NEEDS_REWINDDIR): Define. + [! HAVE_WORKING_READDIR] (remove_cwd_entries): If readdir has just + returned NULL and there has been at least one successful unlink or + rmdir call since the opendir or previous rewinddir, then call + rewinddir and reiterate the loop. + + Factor out common code. + * src/remove.c (readdir_ignoring_dotdirs): New function. + (is_empty_dir): Use it here. + (remove_cwd_entries): Use it here. + +2003-05-01 Jim Meyering <jim@meyering.net> + + * tests/rm/r-3: Create 500 rather than just 300 files. + There's a bug in Darwin6.5's readdir that shows up only with + 338 or more files. + Fix a bug in this test: `cd $pwd' (not to `..'), now that $tmp + has two components. + + * src/tail.c: + Change type of n_units, n_bytes, n_lines to be `uintmax_t'. + (dump_remainder): Move two declarations `down' into the scope + where they are used. + (xlseek): Return the resulting offset. + (file_lines): Rename parameter, file_length, to end_pos. + (pipe_lines): Don't coerce safe_read return value to `int'. + Adapt tests accordingly. + (pipe_bytes) [struct charbuffer] (nbytes): Change type from `int' + to `unsigned int'. + Change type of `total_bytes' from `int' to `size_t', + since the former wouldn't always be wide enough. + Don't coerce safe_read return value to `int', + and adapt tests accordingly. + Now that testing for a read error no longer involves + using `tmp', handle that case *after* freeing `tmp'. + (start_bytes): Clean up. + (tail_bytes): Now that `n_bytes' may be larger than + OFF_T_MAX, test for that condition and, if it's true, don't + use lseek optimizations. + (parse_options): Don't fail just because N_UNITS is larger than + the maximum size of a file -- tail may be applied to an input + stream (e.g., a pipe) with more data than that. + + * Makefile.maint (syntax-check): Rename from alloc-check. + Also check for SPACE-TAB sequences. + Also check for malloc/calloc/realloc casts. + +2003-05-01 Jim Meyering <jim@meyering.net> + + * src/tail.c (start_lines): Rewrite to use memchr. Clean up. + +2003-04-28 Jim Meyering <jim@meyering.net> + + * tests/misc/tty-eof: Send two tokens, not just one, so we don't + make the now-more-picky tsort fail. + +2003-04-24 Jim Meyering <jim@meyering.net> + + * src/tsort.c (tsort): Remove unnecessary test of have_read_stdin. + (main): Minor syntactic clean-up. + + * src/tsort.c (tsort): Fail if the input contains an odd number of + tokens. Reported by junkio@cox.net. + + * tests/tsort/basic-1: Test for the above fix. + +2003-04-21 Jim Meyering <jim@meyering.net> + + * tests/misc/printf: Add tests for the printf fixes below. + + * Makefile.cfg (cvs_files): Add $(srcdir)/config/depcomp to the list. + +2003-04-20 Paul Eggert <eggert@twinsun.com> + + Fix printf POSIX compatibility bug reported by Ben Harris in + <http://mail.gnu.org/archive/html/bug-coreutils/2003-04/msg00070.html>. + * doc/coreutils.texi (printf invocation): It's \NNN in the format, + \0NNN in the %b operand. + * src/printf.c (usage): Likewise. + (print_esc): New arg OCTAL0 to specify whether \0NNN or \NNN + is desired. All uses changed. Behave like Bash printf if %b + operand uses \NNN where the initial N is not 0. + +2003-04-17 Jim Meyering <jim@meyering.net> + + * src/stty.c: Remove uses of PROTOTYPE macro. + +2003-04-15 Jim Meyering <jim@meyering.net> + + * Makefile.maint: Remove (or replace-with-TAB(s) to retain alignment) + each sequence of spaces before a TAB character. + +2003-04-13 Jim Meyering <jim@meyering.net> + + * src/remove.c (is_empty_dir): Don't closedir (NULL). + +2003-04-12 Jim Meyering <jim@meyering.net> + + Giving nl an invalid STYLE argument (in --header-numbering=STYLE (-h), + --body-numbering=STYLE (-b), or --footer-numbering=STYLE (-f)) or + FORMAT (--number-format=FORMAT (-n)) would not give a useful diagnostic. + * src/nl.c (main): Fix those problems and remove literal quote marks + (e.g., "`%s'") from format string; instead use "%s" in each format + string and `quote (optarg)' as the corresponding argument. + Also, diagnose all invalid command line options before failing. + + * src/nl.c (proc_text): Fix a bug that would make nl output extra + newlines in some cases. Details here: http://bugs.debian.org/177256. + This bug was introduced on 2001-11-10 for textutils-2.0.17. + * tests/misc/nl: Add test for the above-fixed bug. + + * tests/misc/readlink: New file. Test the --canonicalize option. + * tests/misc/Makefile.am (TESTS): Add readlink. + +2003-04-11 Jim Meyering <jim@meyering.net> + + Clean up. + * src/chown.c, src/cp.c, src/dircolors.hin, src/du.c, src/ln.c: + * src/mkfifo.c, src/ptx.c, src/spline.c, src/stty.c, src/tail.c: + * src/test.c, src/unexpand.c: Remove (or replace-with-TAB(s) to + retain alignment) each sequence of spaces before a TAB character. + + * src/ls.c: Include <stdlib.h> unconditionally. + + * Makefile.maint (xalloc-check): Rename from header-check. + + * src/yes.c: Include error.h after system.h, not before. + + Clean up. + * src/copy.c, src/cp-hash.c, src/cp.c, src/csplit.c, src/cut.c: + * src/date.c, src/df.c, src/du.c, src/expand.c, src/expr.c, src/id.c: + * src/join.c, src/md5sum.c, src/nl.c, src/od.c, src/paste.c, src/pr.c: + * src/ptx.c, src/sort.c, src/split.c, src/su.c, src/tail.c, src/tee.c: + * src/tr.c: * src/unexpand.c, src/users.c: + Remove anachronistic casts of xmalloc, xrealloc, and xcalloc + return values and of xrealloc's first argument. + Fix the former with this: + perl -pi -e 's/\([^(]*?\*\) *(x(m|c|re)alloc)\b/$1/' + +2003-04-10 Jim Meyering <jim@meyering.net> + + * src/stty.c (wrapf): Declare with format attribute. + + The S_MAGIC_... names shouldn't be maintained in two places (prior + to this change, one would have to keep stat.c and fs.h in sync). + This change makes it so those names and the corresponding + hexadecimal constants all reside in stat.c. fs.h is now generated. + * src/Makefile.am (fs.h): New rule to generate fs.h from stat.c. + (BUILT_SOURCES): Add fs.h, now that it's generated. + (EXTRA_DIST): Add extract-magic. + * src/extract-magic: New script to extract fs.h definitions from stat.c. + * src/stat.c (human_fstype) [__linux__]: Append each hex constant from + fs.h in a comment after the corresponding `case S_MAGIC_...:' statement. + + * tests/tail-2/big-4gb: Skip this test (don't fail) if creating a + file with nominal length > 4GB fails. Reported by Michael Deutschmann. + + * man/unexpand.x: Add `SEE ALSO' reference to expand. + * man/expand.x: Add `SEE ALSO' reference to unexpand. + Suggestion from Dan Jacobson. + +2003-04-10 Maciej W. Rozycki <macro@ds2.pg.gda.pl> + + * src/fs.h (S_MAGIC_DEVPTS): New magic for Linux's devpts. + * src/stat.c (human_fstype): Handle Linux's devpts. + +2003-04-09 Paul Eggert <eggert@twinsun.com> + + * src/split.c (line_bytes_split): Arg is of type size_t, since + that's all that is supported for now. + (main): Check for overflow in obsolescent line count option. + +2003-04-09 Jim Meyering <jim@meyering.net> + + * tests/misc/split-fail: Add a new test for the above fix. + + * src/split.c (bytes_split): Use size_t temporary (rather than + uintmax_t original) in remaining computations. From Paul Eggert. + + Handle command line option arguments larger than 2^31. + This allows e.g., splitting into files of size 2GB and larger, + and running split --lines=N with N=2^31 or more. + But for --line-bytes=N, the restriction that N <= SIZE_MAX + remains (for now), due to the way it is implemented. + + * src/split.c: Include "inttostr.h". + (bytes_split, lines_split, line_bytes_split, main): + Use uintmax_t, not size_t, for file sizes. + (main): Give a better diagnostic for option arguments == 0. + Use umaxtostr to print file sizes. + Reported by Luke Hassell. + +2003-04-08 Jim Meyering <jim@meyering.net> + + * src/rm.c (usage): Mention that --directory (-d) works only + on some systems. Suggestion from Samuel Tardieu. + + * tests/basename/basic: Run $PERL to see if it is available, + rather than testing its value. + * tests/sum/sysv, tests/tsort/basic-1, tests/unexpand/basic-1: + * tests/basename/basic, tests/dd/skip-seek, tests/dircolors/simple: + * tests/expr/basic, tests/factor/basic, tests/fmt/basic: + * tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1: + * tests/misc/sort, tests/misc/tty-eof, tests/mv/i-1: + * tests/rm/empty-name, tests/rm/fail-eperm, tests/rm/unreadable: + * tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec: + * tests/sum/basic-1, tests/seq/basic: Likewise. + + * tests/misc/Makefile.am (TESTS): Add split-fail. + * tests/misc/split-fail: New file. + + * src/split.c: Rename local variables: nchars -> n_bytes. + (lines_split): Rename local, nlines -> n_lines. + (main): Rename local variable: s/accum/n_units/. + (main): Use STDIN_FILENO, not literal `0'. + +2003-04-07 Jim Meyering <jim@meyering.net> + + * src/stat.c: Add #include directives for Ultrix 4.4. + Based on a suggested change from Bert Deknuydt. + +2003-04-06 Jim Meyering <jim@meyering.net> + + * Makefile.maint (makefile-check): New rule. + (local-check): Add it. + +2003-04-05 Jim Meyering <jim@meyering.net> + + * Makefile.am (nearly all of them): + Use $(VAR) rather than @VAR@, now that we can rely on automake to + emit a definition for each substituted variable. + * tests/Makefile.am.in: Likewise. + + * tests/rm/rm5: Add a comment explaining why this test fails when + using Tru64's broken sed. + * tests/rm/rm3: Likewise. + + Make `kill -t' output signal descriptions (not `?') on Tru64. + * src/kill.c (sys_siglist): Also check for __sys_siglist. + Patch by Tony Leneis. + * configure.ac: Also check for declaration of __sys_siglist. + Required for Tru64 4.0D, 4.0F, and 5.1. + Reported by Tony Leneis. + +2003-04-04 Jim Meyering <jim@meyering.net> + + * src/Makefile.am (PERL): Remove unnecessary definition. + + Because of inappropriate (but POSIX-mandated) behavior of rename, + `mv a b' would not remove `a' in some unusual cases. Work around + this by unlinking `a' when necessary. + + * src/copy.c (same_file_ok): Add an output parameter. + Set it in the offending case. + (copy_internal): When necessary, unlink SRC_PATH and inform caller. + Reported by Ed Avis. + * tests/mv/hard-4: New test for the above. + * tests/mv/Makefile.am (TESTS): Add hard-4. + + Clean up rules for automatically generated sources: + * src/Makefile.am (dircolors.h, wheel-size.h, wheel.h, false.c): + Make each generated file be read-only. + Add each file name to BUILT_SOURCES separately. + (MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES). + + Put LOCALEDIR macro definition in new file: localedir.h. + * src/Makefile.am (DEFS): Remove definition. + (localedir.h): New rule. + (BUILT_SOURCES, DISTCLEANFILES): Add localedir.h. + * src/system.h: Include "localedir.h". + +2003-04-02 Jim Meyering <jim@meyering.net> + + * Version 5.0. + + * tests/misc/Makefile.am (TESTS): Add false. + + * Makefile.maint (TMPDIR): Make sure it's defined. + (my-distcheck): Build in $(TMPDIR), not `.'. + + * src/Makefile.am (false.c): Change all occurrences of + `(EXIT_SUCCESS)' to `(EXIT_FAILURE)' so that false exits + unsuccessfully also with --help. Reported by Paul Jarc, + * tests/misc/false: New test for the above. + +2003-03-30 Jim Meyering <jim@meyering.net> + + * NEWS: Note the location of older NEWS files. + + * src/remove.c (is_empty_dir): Don't let a failing closedir + clobber errno. Spotted by Arnold Robbins. + + * src/env.c: Fix typo in comment. From Arnold Robbins. + +2003-03-29 Jim Meyering <jim@meyering.net> + + * Version 4.5.12. + + * README: Note to expect build problems for stat.c on Ultrix 4.3. + Note that there are some harmless test failures when running + `make check' as root on some systems. + +2003-03-28 Jim Meyering <jim@meyering.net> + + * tests/stty/row-col-1: Skip this test if stty can't get window size. + This happens when connecting to sparc-solaris5.7 via ssh from within + emacs. Reported by Karl Berry. + + * tests/du/basic: Use seq, not `yes' to generate 4KB of data. + Otherwise, on systems (DJGPP) that emulate pipes using files, + this test would never complete, waiting for `yes' to terminate. + * tests/du/slink: As above, use seq, not `yes' to generate link target. + * tests/rm/hash: As above, use seq, not `yes' to generate dir name. + Reported by Rich Dawe. + +2003-03-27 Jim Meyering <jim@meyering.net> + + * src/id.c: Remove Arnold Robbins' obsolete e-mail address + from `written by...' comment, at his request. + +2003-03-24 Paul Eggert <eggert@twinsun.com> + + Fix buffer overrun problem reported by TAKAI Kousuke, along + with some other POSIX incompatibilities. + + * src/printf.c (print_esc): Do not treat \x specially if + POSIXLY_CORRECT. Avoid buffer overrun if the format ends + in backslash. Treat incomplete escape sequences as strings + of characters, as POSIX requires. + (print_formatted): Allow multiple flags. Avoid buffer overrun + if the format is incomplete. + +2003-03-24 Jim Meyering <jim@meyering.net> + + * tests/misc/printf: Add tests for the above fixes and changes. + +2003-03-26 Jim Meyering <jim@meyering.net> + + * src/copy.h (struct cp_options): Add a comment. + +2003-03-23 Jim Meyering <jim@meyering.net> + + * README: Describe problem with 64-bit mode on HPUX 11.x, + with patch for /usr/include/inttypes.h. + * TODO: Plan to add an autoconf test to work around the bug. + +2003-03-22 Jim Meyering <jim@meyering.net> + + * src/stat.c: Don't include <sys/sysmacros.h>. + That is already done via system.h. Otherwise, the multiple + inclusion would evoke redefinition warnings from Cray's /bin/cc, + aka Cray Standard C Version 4.0.3 (057126) Mar 22 2003 22:02:28. + (human_fstype): Factor some directives `up', out of this function. + Cast away `const' to avoid error from Cray's /bin/cc. + +2003-03-20 Jim Meyering <jim@meyering.net> + + * announce-gen (print_changelog_deltas): Ensure that a newline + precedes each row of `*'s. + +2003-03-20 Jim Meyering <jim@meyering.net> + + * Version 4.5.11. + + * src/seq.c (valid_format): Also accept ` ' and `'' as valid + format flag characters. + Do not require that a field width be specified. + Do not fail when given a field width of `0'. + Reported by Dan Jacobson. + * tests/seq/basic: Add new tests for the above-fixed bug. + + * src/Makefile.am (all-local): Append $(EXEEXT) to use of `su' + (install-root): Likewise. + (install-exec-local): Likewise. + Based on a patch from Richard Dawe. + +2003-03-19 Jim Meyering <jim@meyering.net> + + * man/Makefile.am (.x.1): Use $(LN_S) instead of 'ln -s', + because the DJGPP 2.03 port of 'ln -s' doesn't work. + Include $(EXEEXT) in program names. + Since $(LN_S) may degenerate to `cp -p', be careful + to invoke it from the destination directory. + Mostly from Richard Dawe. + * configure.ac: Use AC_PROG_LN_S. + + * tests/mv/part-symlink: Unset CDPATH. Otherwise, having the + CDPATH shell variable set could cause this test to fail. + Reported by Karl Berry. + +2003-03-18 Jim Meyering <jim@meyering.net> + + * src/fmt.c [struct Word] (paren, period, punct, final): Change the + type of each member from bool <MEMBER>:1 to unsigned int <MEMBER>:1. + AIX 5.1's xlc could not compile the former. + Patch by Petter Reinholdtsen. Also reported by Mike Jetzer. + +2003-03-17 Richard Dawe <rich@phekda.freeserve.co.uk> + + * configure.ac: Include $(EXEEXT) in OPTIONAL_BIN_PROGS' + program names, since automake only adds $(EXEEXT) to programs + in its *_PROGRAMS. + +2003-03-16 Jim Meyering <jim@meyering.net> + + * src/remove.c (rm): Put two local variables in static storage, + so they can't be clobbered by the potential longjmp. + +2003-03-15 Jim Meyering <jim@meyering.net> + + * Makefile.cfg (gnu_rel_host): Fix code to match the comment + so that a version number with a two-digit component can still count + as an alpha release. Reported by Richard A Downing. + (gnu_rel_host): Define in terms of $(RELEASE_TYPE) instead. + +2003-03-14 Jim Meyering <jim@meyering.net> + + * src/ansi2knr.c: Remove no-longer-used file. + * src/ansi2knr.1: Likewise. + + * Makefile.maint (prev_version_file): Don't use ?= for this particular + assignment, since it causes trouble with old versions of GNU make + (e.g. 3.76.1). The other uses of `?=' are inoffensive. Details here. + http://mail.gnu.org/archive/html/bug-coreutils/2003-03/msg00028.html + Patch from Alexandre Duret-Lutz. + + * Use patched automake-1.7.3. Regenerate Makefile.in files in + subdirectories so that each includes a definition of ACLOCAL_M4. + + * announce-gen (main): Label the compressed source URLs. + + * Version 4.5.10. + + * tests/du/slink: Relax the test for the `local'ness of a file system, + so that now it works also for tmpfs. + + * tests/du/hard-link: Transform output from first du, so that this + test doesn't fail on file systems like tmpfs that order directory + entries differently. + +2003-03-13 Jim Meyering <jim@meyering.net> + + * tests/du/8gb: Work around what appears to be an NFS failure that + would make this test fail on some systems. + +2003-03-11 Jim Meyering <jim@meyering.net> + + * tests/du/basic: Make the test file exactly 4k bytes long. + + * src/split.c (longopts): Don't hard-code `2' here. + Instead, just specify `&verbose', and ... + (main): ... remove the `case 2:' block for --verbose. + + * tests/du/basic: Make the test file larger than 64 bytes, so that + we don't immediately disqualify file systems (e.g., NetApp) on which + smaller files take up zero disk blocks. Reported by Vin Shelton. + +2003-03-10 Jim Meyering <jim@meyering.net> + + Don't segfault for a negative field width or precision in format string. + Note that this is just a stopgap fix. The longer term solution may + involve adapting bash's builtins/printf.def. + + * src/printf.c: (UNSPECIFIED): Define. + (print_direc): Use the special value, UNSPECIFIED, to indicate + that field_width or precision has not been specified. + (print_formatted): Fail if field_width or precision is the + special value, UNSPECIFIED. + Reported by Oliver Kiddle <okiddle@yahoo.co.uk> + + * src/sys2.h (INT_MIN): Define, if necessary. + * tests/misc/printf: Add a test for the above-fixed bug. + +2003-03-09 Jim Meyering <jim@meyering.net> + + * src/remove.c (AD_stack_pop): Cast sizeof... to int before + changing its sign. This avoids a warning from gcc on 64-bit systems. + Reported by Bob Proulx. + (pop_dir): Reverse order of sign change and cast, to be consistent + with the above. + +2003-03-08 Jim Meyering <jim@meyering.net> + + * tests/Makefile.am (evar-check): Check for POSIXLY_CORRECT not as a + shell variable, but only in the environment. With /bin/sh->bash, the + shell variable is set to `y', and that would cause a spurious warning. + Reported by Bob Proulx. + + * tests/Makefile.am (check-root): Remove touch/fifo. + It doesn't appear to have to be run as root. + + * tests/rm/fail-2eperm: Rather than simply using the first non-root + user name, make sure that the selected user name has a usable shell. + Reported by Paul Jarc. + + Before, when using shred on a device, one had to specify --exact, + or be careful to choose a size that would not be rounded up and + exceed the maximum value; that could result in a failure of + the final write. + * src/shred.c (do_wipefd): --exact is now the default for non-regular + files. Suggestion from Ben Elliston. + (usage): Say it. + + * tests/misc/tty-eof: Require at least version 1.11 of Expect.pm. + Old versions of Expect.pm (e.g., 1.07) lack the log_user function. + Patch by Bob Proulx. + + * src/Makefile.am (check-misc): Check for use of `defined' in + #define directives. + Change to $(srcdir) before running grep. + + * src/sleep.c: Remove now-unused #include and #define directives. + + * src/du.c (process_file): If a file's size is not being counted + e.g., because it's a hard link to a file we've already counted, + then don't print a line for it. + + * tests/du/hard-link: New test for the above-fixed bug. + * tests/du/Makefile.am (TESTS): Add hard-link. + + `du -S' didn't work + * src/du.c: Revert most of the `reorganization' change of 2003-02-20, + and make the two-array approach work. + + * tests/du/basic: Correct/add tests for the above fix. + Set LC_ALL, etc., now that we use sort. + Check the block/size of a small file, too. + Correct expected results for simple dir1/dir2/file case. + Add another test of du -S. + +2003-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + Avoid build failure with gcc on hppa1.1-hp-hpux10.20 (see GCC PR + middle-end/9986). As one of GCC's optimizations, it transforms a + fputs_unlocked call to a fputc_unlocked call when the string is + one character long. However, hpux doesn't have fputc_unlocked. + + * expr.c (usage): Use putchar, not fputs, to output a single character. + * ls.c (dired_dump_obstack): Likewise. + * ptx.c (output_one_tex_line, output_one_dumb_line): Likewise. + * stat.c (print_it): Likewise. + +2003-03-07 Jim Meyering <jim@meyering.net> + + * src/cp.c: Remove everything associated with mmap-stack.c. + This reverts the two changes of 2003-02-21. + * src/du.c: Remove everything associated with mmap-stack.c. + This reverts the change of 2003-02-19. + +2003-03-06 Jim Meyering <jim@meyering.net> + + * tests/cp/same-file: Unset CDPATH. Otherwise, having the + CDPATH shell variable set could cause this test to fail. + Reported by Karl Berry. + +2003-03-05 Jim Meyering <jim@meyering.net> + + * Version 4.5.9. + + * src/printf.c (print_esc): Remove pointless comparison of unsigned + integer with zero, to avoid a warning from Intel's ecc. + Reported by Nelson Beebe. + + * src/du.c (process_file): Sizes must all be of type uintmax_t. + Otherwise, for files or totals that are too big, numbers would + be truncated. Patch mostly by Michael Stone. + Reported by Ingo Saitz as Debian bug #183210. + + * tests/du/8gb: New test for the above-fixed bug. + * tests/du/Makefile.am (TESTS): Add 8gb. + + * src/du.c (MAX_N_DESCRIPTORS): Use 3 * UTILS_OPEN_MAX / 4 + rather than UTILS_OPEN_MAX - 10. + +2003-03-04 Jim Meyering <jim@meyering.net> + + * README: Refer new feature discussion to bug-coreutils@gnu.org, + rather than bug-gnu-utils, now that the former is better known. + Suggestion from Göran Uddeborg. + + * src/stat.c (usage): Capitalize consistently. + Reported by Göran Uddeborg. + + * Makefile.maint (rel-files): Include $(signatures), so that + those files are also copied into $(release_archive_dir). + + * src/df.c (find_mount_point): Call error here, now that restore_cwd + no longer does it. + * src/remove.c (AD_pop_and_chdir): Likewise. + + * tests/Makefile.am (check-root): Add fail-2eperm. + +2003-03-03 Jim Meyering <jim@meyering.net> + + * src/remove.c (remove_cwd_entries): Include the full filename of + the offending file, not just the basename. + + * tests/misc/tty-eof: Set $ME properly. + + * Makefile.maint (THIS_VERSION_REGEXP, PREV_VERSION_REGEXP): + Remove now-unused variables. + (tag-prev-version, prev-cvs-tag): Likewise. + + * src/remove.c (remove_cwd_entries) [!ROOT_CAN_UNLINK_DIRS]: Give an + accurate diagnostic when failing to remove a file owned by some other + user. Reported by Ivo Timmermans via Michael Stone. + This fixes Debian bug# 178471. + + * tests/rm/Makefile.am (TESTS): Add fail-2eperm. + * tests/rm/fail-2eperm: New test, for the above-fixed bug. + Based on a report from Ivo Timmermans. + +2003-03-02 Jim Meyering <jim@meyering.net> + + * src/copy.c (copy_internal) [un_backup]: When recovering from a + failure to create a hard link, do not remove the entry associating + the source dev/ino with the destination file name. + * tests/mv/Makefile.am (TESTS): Add hard-3. + * tests/mv/hard-3: New test, for the above-fixed bug. + Inspired by a report from Iida Yosiaki. + +2003-03-01 Jim Meyering <jim@meyering.net> + + * src/df.c (print_header): Don't embed spaces in a separate `Type' + header string. Instead, put `Filesystem' and `Type' headers in the + same string, so translators can use horizontal space as needed. + Reported by Jean Charles Delepine. + +2003-02-28 Jim Meyering <jim@meyering.net> + + * src/copy.c (copy_internal): When link fails because of an + existing destination file, unlink that file and try again. + Reported by Iida Yosiaki. + + * tests/mv/Makefile.am (TESTS): Add hard-2. + * tests/mv/hard-2: New test for the above-fixed bug. + Based on a test case from Iida Yosiaki. + +2003-02-26 Jim Meyering <jim@meyering.net> + + * tests/du/basic: Don't test du's -b option here. Directory byte + counts are smaller (512 rather than 4096) on at least OSF/1 5.1 + and IBM AIX 4.2. Reported by Nelson Beebe. + +2003-02-25 Jim Meyering <jim@meyering.net> + + * Makefile.maint (announcement): Now that ChangeLog entries + are output by announce-gen, don't do it here. + * announce-gen (print_changelog_deltas): New function. + (main): Use it. + +2003-02-22 Jim Meyering <jim@meyering.net> + + * announce-gen: New option: --release-type=TYPE + * Makefile.maint (beta, major): New targets. Remove `release'. + Put them all together on a line. + Pass the release type (via RELEASE_TYPE envvar) to the MAKE + invocation of `announcement'. + (announcement): Invoke announce-gen with --release-type=$RELEASE_TYPE. + + * announce-gen: New option: --news=NEWS_FILE. + Extract NEWS entries here, not via rules in Makefile.maint. + * Makefile.maint (announcement): Now that NEWS entries are + extracted by announce-gen, don't do it here. + (news-r1, news-r2): Remove now-unused definitions. + +2003-02-21 Jim Meyering <jim@meyering.net> + + * Version 4.5.8. + + Merge in changes from autoconf's version of this file. + * Makefile.maint (www-gnu): Define. + (standards.texi-url_prefix): Use $(www-gnu). + (make-stds.texi-url_prefix): Likewise. + + * src/cp.c: Include "mmap-stack.h". + (main): Invoke `run' through a macro that (when possible) runs it + with a large, mmap'd stack. + + * src/cp.c (run): New function, preparing for the above. + Exit from this function, not from main + (main): Call run. + + * src/du.c: New option: --apparent-size. + (enum) [APPARENT_SIZE_OPTION]: New member. + (long_options): Add it. + (usage): Describe it. + (main): Handle it. + ['b']: Set apparent_size. + David Eisner reported that the behavior of --bytes had changed. + Paul Eggert proposed the use of a new option, --apparent-size. + + * src/du.c (apparent_size): New global. + (print_only_size): Reflect the fact that we're printing byte counts, + not ST_NBLOCKSIZE-byte-block counts. + (print_size): Call print_only_size rather than duplicating its code. + (process_file): Accumulate byte counts, rather than block counts. + + * src/du.c (process_file): Always reset size_to_propagate_to_parent + for --separate-dirs (-S). + +2003-02-20 Jim Meyering <jim@meyering.net> + + * Use automake-1.7.3. Regenerate dependent files. + + * src/stat.c (print_stat): New format: %B (to print ST_NBLOCKSIZE). + This makes %b (number of ST_NBLOCKSIZE-byte blocks) more useful. + (usage) [%B]: Describe it. + [%b]: Refer to %B. + + * src/du.c (process_file): Reorganize the code to use only + one `sum' array, and change how -S works back to the way it was + before 2003-01-31. Patch by Bruno Haible. + + * tests/du/basic: New test. + * tests/du/Makefile.am (TESTS): Add basic. + + * tests/envvar-check: Add checks for the following: + BLOCK_SIZE, DU_BLOCK_SIZE, DF_BLOCK_SIZE, LS_BLOCK_SIZE. + + * tests/Makefile.am: Rename phony target envvar-check to evar-check + so as not to conflict with the distributed file by the same name. + + * src/du.c (process_file): Set info->skip before any possible return. + + Report correct usage for directories, not 0. + * src/du.c (process_file): Return for `file_type == FTW_DPRE' + _before_ recording the dev/ino of a directory. + Reported by Bruno Haible. + + Now, df always displays the device file name corresponding to the + listed mount point under `Filesystem'. Before, for an unmounted + block- or character-special file argument, it would display the + command-line argument instead. + * src/df.c (show_disk): Return a value indicating whether + there was a match. Don't try to find a mount point here. + (show_entry): If show_disk doesn't find a match, call show_point. + +2003-02-19 Jim Meyering <jim@meyering.net> + + * src/du.c: Include "mmap-stack.h". + (du_files): Add prototype with ATTRIBUTE_NORETURN. + Exit from this function, not from... + (main): ...here. + Instead, if possible, invoke du_files through a macro that + runs it with a large, mmap'd stack. + + * src/join.c (usage): Change wording in --help output: + use FILENUM instead of `SIDE' and say what FILENUM means. + Reported by Bernhard Gabler. + + * src/df.c (print_header): Rather than using a hard-coded literal + string of spaces matching the length of the English `...Type' header, + output the right number of spaces to match the selected translation. + Reported by Yann Dirson and Jean Charles Delepine as Debian bug 131113. + + * src/split.c (bytes_split): Remove unnecessary `else' after break. + (lines_split): Likewise. and correct misleading indentation. + + * src/split.c: Include "full-read.h". + (bytes_split, lines_split, line_bytes_split): Use full_read, + not safe_read. The way split was using the latter, a short read + could cause split to terminate before EOF. + + * tests/misc/tty-eof: Test all programs that can read stdin, + requiring no arguments and that write to standard output. + + * tests/misc/tty-eof: New file. Renamed from ... + * tests/misc/cat-tty-eof: Remove file. Rename to tty-eof. + * tests/misc/Makefile.am (TESTS): Reflect renaming. + +2003-02-18 Jim Meyering <jim@meyering.net> + + cksum would perform an extra read after encountering EOF + * src/cksum.c (cksum): Exit the loop upon EOF, too. + Patch by Michael Bacarella. + + Test for the bug fixed today in cksum, md5sum, and sha1sum. + * tests/misc/cat-tty-eof: Generalize, clean-up, and test for + cat, cksum, md5sum, and sha1sum all in the same loop. + +2003-02-14 Jim Meyering <jim@meyering.net> + + * src/remove.c: Include "euidaccess.h". + Remove declaration of euidaccess. + +2003-02-12 Jim Meyering <jim@meyering.net> + + * src/pathchk.c (portable_chars_only): Remove unnecessary `const' + in cast to avoid warning from icc. Reported by Alexandre Duret-Lutz. + +2003-02-10 Jim Meyering <jim@meyering.net> + + * src/test.c: Don't include group-member.h. + Include euidaccess.h. + (eaccess): Rewrite function to set the real uid and gid temporarily + to the effective uid and gid, then invoke 'access', and then set the + real uid and gid back. On systems that lack setreuid or setregid, + fall back on the kludges in euidaccess. Before, it would not work + for e.g., files with ACLs, files that were marked immutable, + or on file systems mounted read-only. Nelson Beebe raised the issue. + Paul Eggert suggested the new implementation. + +2003-02-09 Jim Meyering <jim@meyering.net> + + * src/test.c (test_stat): Remove function. It's job is done (only + when necessary) by the wrapper in lib/stat.c. Adjust all uses. + +2003-02-08 Jim Meyering <jim@meyering.net> + + * Version 4.5.7. + + * tests/mv/part-symlink: Don't assume that the file owner username + length is less than 9 in ls output: instead, omit that field + altogether. Reported by, and suggested fix from, Ferdinand. + + * tests/du/restore-wd: New test for just-fixed bug in ftw.c. + * tests/du/Makefile.am (TESTS): Add restore-wd. + + * src/rm.c: Correct now-invalid comment about cycle-detection. + +2003-02-06 Jim Meyering <jim@meyering.net> + + * NEWS: Add entries from old/*/NEWS + from fileutils-4.1 through 4.1.11 and + from sh-utils-2.0 through 2.0.15. Suggestion from Karl Berry. + + * Version 4.5.6. + + * src/du.c (process_file): Don't return early for excluded files + or for files whose dev/inode we've already seen. + +2003-02-05 Jim Meyering <jim@meyering.net> + + * tests/du/exclude: New file. + * tests/du/Makefile.am (TESTS): Add exclude. + +2003-02-04 Dmitry V. Levin <ldv@altlinux.org> + + * src/who.c (print_boottime, print_deadprocs, print_runlevel): + Fix memory allocation arithmetic. + +2003-02-04 Jim Meyering <jim@meyering.net> + + `df /dev/block-or-char-device-file--not-mounted' now reports + the name of the file system on which the file resides, usually `/'. + Before, it would leave the `Mounted on' field blank. + * src/df.c (show_disk): Move function to precede find_mount_point. + (show_disk): Add parameter: STATP. + If we don't find a matching device name, then resort to calling + find_mount_point. Reported by Bob Proulx. + +2003-02-03 Andreas Schwab <schwab@suse.de> + + * tests/rm/cycle: Require non-root. + * tests/rm/isatty: Likewise. + +2003-02-02 Jim Meyering <jim@meyering.net> + + * Version 4.5.5. + + * man/Makefile.am (check-x-vs-1): Use @PATH_SEPARATOR@, not `:'. + + Ensure that there are no offending uses of `:'. + * Makefile.maint (makefile_path_separator_check): New rule. + (local-check): Add it to the list. + +2003-02-01 Jim Meyering <jim@meyering.net> + + * src/du.c (MAX_N_DESCRIPTORS): Define. + + * src/stat.c (G_fail): New global. + (human_time): Diagnose failed localtime, not failed nstrftime. + (main): Fail if G_fail is set. + +2003-01-31 Richard Dawe <rich@phekda.freeserve.co.uk> + + * tests/basename/Makefile.am: Use @PATH_SEPARATOR@ instead of + hard-coding the path-separator. Also double-quote the new PATH, + to avoid problems when the path-separator is a semi-colon or when + `pwd` contains e.g. a space. + * tests/chgrp/Makefile.am: Likewise. + * tests/chmod/Makefile.am: Likewise. + * tests/chown/Makefile.am: Likewise. + * tests/cp/Makefile.am: Likewise. + * tests/dd/Makefile.am: Likewise. + * tests/dircolors/Makefile.am: Likewise. + * tests/du/Makefile.am: Likewise. + * tests/expr/Makefile.am: Likewise. + * tests/factor/Makefile.am: Likewise. + * tests/fmt/Makefile.am: Likewise. + * tests/install/Makefile.am: Likewise. + * tests/ln/Makefile.am: Likewise. + * tests/ls/Makefile.am: Likewise. + * tests/ls-2/Makefile.am: Likewise. + * tests/md5sum/Makefile.am: Likewise. + * tests/misc/Makefile.am: Likewise. + * tests/mkdir/Makefile.am: Likewise. + * tests/mv/Makefile.am: Likewise. + * tests/od/Makefile.am: Likewise. + * tests/rm/Makefile.am: Likewise. + * tests/rmdir/Makefile.am: Likewise. + * tests/seq/Makefile.am: Likewise. + * tests/sha1sum/Makefile.am: Likewise. + * tests/shred/Makefile.am: Likewise. + * tests/stty/Makefile.am: Likewise. + * tests/sum/Makefile.am: Likewise. + * tests/tail-2/Makefile.am: Likewise. + * tests/touch/Makefile.am: Likewise. + * tests/tsort/Makefile.am: Likewise. + * tests/unexpand/Makefile.am: Likewise. + +2003-01-31 Jim Meyering <jim@meyering.net> + + * src/stat.c: Include "file-type.h" + (print_human_type): Remove function. + (human_access): Rename from print_human_access. Return a string. + (human_time): Rename from print_human_time. Return a string. + (print_stat): Arrange so that field width and an alignment specifier + are honored for the %A, %F, %x, %y, and %z formats. + [%F]: Use file_type; this gives slightly different file type strings, + e.g., `directory' instead of `Directory' and `regular file' or + `regular empty file' instead of `Regular file'. + Prompted by a report from Richard Dawe that the uses of + S_IFSOCK and S_IFIFO in print_human_time were not portable + to systems using e.g., DJGPP. + +2003-01-31 Richard Dawe <rich@phekda.freeserve.co.uk> + + * src/stat.c (print_stat): Use S_ISLNK rather than an explicit + test using S_IFMT and S_IFLNK. S_IFLNK may not be defined. + +2003-01-31 Jim Meyering <jim@meyering.net> + + * src/du.c (main): Upon processing an invalid option or an invalid + --exclude-from or --max-depth option argument, don't exit right away, + in case there are others. Rather record the failure and exit after + processing other options. + + * GNUmakefile (TAR_OPTIONS): Set and export, in order to make + tar archive easier to reproduce. + + Rewrite to perform directory traversal using nftw. + + * src/du.c: Include "dirname.h", "ftw.h", and "quotearg.h". + (AUTHORS): Add self. + (opt_one_file_system): Move global into `main'. + (path, xstat, exit_status): Remove declarations. + (arg_length, suffix_length): New globals. + (G_fail): New global, sort of like the old `exit_status'. + (IS_FTW_DIR_TYPE): Define. + (print_only_size): New function. + (process_file): New function. + (str_init, ensure_space, str_copyc, str_concatc): Remove functions. + (str_trunc, pop_dir, count_entry): Likewise. + (du_files): Rewrite to use nftw. + +2003-01-30 Jim Meyering <jim@meyering.net> + + * tests/du/trailing-slash: Ensure that du/ftw follows a command-line + symlink-to-directory with -L, even without the trailing slash. + +2003-01-27 Jim Meyering <jim@meyering.net> + + * src/Makefile.am (check-misc): Check for st_blocks, too. + + * src/stat.c (print_stat): Use ST_NBLOCKS rather than `->st_blocks'. + Reported by Richard Dawe. + +2003-01-27 Andreas Schwab <schwab@suse.de> + + * src/ls.c (quote_name): Add fourth parameter, width, into which to + store the screen columns, and return the number of bytes instead. + (print_dir): Pass NULL as fourth parameter of quote_name. + (print_name_with_quoting): Likewise. + (length_of_file_name_and_frills): Get the width from the fourth + parameter of quote_name instead of return value. + +2003-01-27 Jim Meyering <jim@meyering.net> + + * src/ls.c (decode_switches): If `dired' is set without + `format == long_format', then silently reset dired. This doesn't + change the behavior of ls (all prior uses of dired were protected + by `&& format == long_format'), and lets us... + (DIRED_INDENT): ... remove the `format == long_format' conjunct. + (PUSH_CURRENT_DIRED_POS): Likewise. + (main): Likewise. + +2003-01-22 Jim Meyering <jim@meyering.net> + + * tests/du/no-x: New test, for functionality added to lib/ftw.c. + * tests/du/Makefile.am (TESTS): Add no-x. + +2003-01-21 Jim Meyering <jim@meyering.net> + + * src/remove.c (remove_entry) [ROOT_CAN_UNLINK_DIRS + && HAVE_STRUCT_DIRENT_D_TYPE]: If a file has d_type == DT_UNKNOWN + it may still be a directory -- or not (e.g., with FreeBSD on an + NFS-mounted file system), so resort to calling lstat to find out. + Based on a patch by Michael van Elst. + + * tests/cp/same-file: Don't assume that the file owner username + length is less than 9 in ls output: instead, omit that field + altogether. Reported by, and suggested fix from, Ferdinand. + +2003-01-20 Jim Meyering <jim@meyering.net> + + * tests/date/Test.pm (wide-fmt): New test to demonstrate that + large format widths no longer cause strftime to infloop. + + * Makefile.maint (mail_gpg_sign_cookie): Remove now-unused definition. + +2003-01-19 Jim Meyering <jim@meyering.net> + + * src/readlink.c: Include "canonicalize.h". + +2003-01-18 Jim Meyering <jim@meyering.net> + + * src/ls.c (Dereference_symlink) [DEREF_COMMAND_LINE_SYMLINK_TO_DIR]: + New member. + (enum) [DEREFERENCE_COMMAND_LINE_SYMLINK_TO_DIR_OPTION]: New member. + (long_options): Add option --dereference-command-line-symlink-to-dir. + (main): Make DEREF_COMMAND_LINE_SYMLINK_TO_DIR be the default, + rather than DEREF_COMMAND_LINE_ARGUMENTS, when none of the + -d, -F, -l options is specified. + (decode_switches): Handle --dereference-command-line-symlink-to-dir. + (gobble_file): Honor DEREF_COMMAND_LINE_SYMLINK_TO_DIR. + Change --dereference-command-line (-H) to dereference *all* + command line arguments, including broken symlinks. + +2003-01-15 Paul Eggert <eggert@twinsun.com> + + Change ls -H back to the way it was yesterday, since this is + compatible with FreeBSD and the POSIX spec is confusing + and somewhat contradictory. + + * src/ls.c (DEREF_COMMAND_LINE_ARGUMENTS): Change name back + from DEREF_COMMAND_LINE_SYMLINK_TO_DIR, updating all uses. + (long_options): Change the long option name back. + (usage): Change the usage back. + (gobble_file): When -H is specified, dereference a top-level + arg even if it points to a non-directory. + +2003-01-15 Jim Meyering <jim@meyering.net> + + * src/ls.c (gobble_file): Fall back on using lstat when required: + when --dereference (-L) is not specified, and + - when operating on a dangling symlink + - when operating on command-line-symlink-to-directories + This fixes numerous problems. Here are examples: + - `ls dangling-symlink' would fail with `no such file...' + Now it prints `dangling-symlink'. + - `ls -i symlink' would mistakenly print the inode of the referent. + Now it prints the inode of the symlink. Likewise for --size (-s). + Based on a patch from Michael Stone. + Reported by Deepak Goel as Debian bug #173793. + + Rename ls's --dereference-command-line (-H) + option to --dereference-command-line-symlink-to-dir. + * src/ls.c [enum Dereference_symlink] + (DEREF_COMMAND_LINE_SYMLINK_TO_DIR): Rename from + DEREF_COMMAND_LINE_ARGUMENTS. Update all uses. + (long_options): Rename the long option. + (usage): Say that --dereference-... changes how ls treats + only symlinks to directories specified on the command line. + +2003-01-14 Jim Meyering <jim@meyering.net> + + * tests/ls/dangle: New file/test, for the above fix. + * tests/ls/inode: Another new file/test, for the above fix. + * tests/ls/Makefile.am (TESTS): Add dangle and inode. + + * src/ls.c (gobble_file): Fix a bug introduced in 4.5.4 that made it + so that ls --color would no longer highlight the names of files with + the execute bit set when not specified on the command line. + Patch by Michael Stone. Reported by Stephen Depooter as + Debian bug 175135. + + * tests/ls-2/tests (color-exe): New test, for the above fix. + +2003-01-13 Jim Meyering <jim@meyering.net> + + * tests/shred/exact: Also test for just fixed bug with --zero. + + * src/shred.c (long_opts): --zero does not require an argument. + Patch by Michael Stone. Reported by Roland Turner as Debian bug 172019. + +2003-01-12 Jim Meyering <jim@meyering.net> + + * Makefile.maint (cvs-update): Skip any file with local modifications. + + * src/unexpand.c (usage): Document --first-only and mention that + --tabs=N (-t) enables --all (-a). Reported by wiregauze@yahoo.com. + +2002-12-01 Dmitry V. Levin <ldv@altlinux.org> + + * src/df.c: Include "canonicalize.h". + Use canonicalize_file_name unconditionally. + +2003-01-09 Jim Meyering <jim@meyering.net> + + * README: Add readlink. + +2002-11-30 Dmitry V. Levin <ldv@altlinux.org> + + * src/df.c: Include "xgetcwd.h". + * src/pwd.c: Likewise. + +2002-11-30 Dmitry V. Levin <ldv@altlinux.org> + + * src/shred.c: Remove declaration of xstrdup. + We already get it via xalloc.h which is included via system.h. + +2002-08-27 Dmitry V. Levin <ldv@altlinux.org> + + New program: readlink. + + * src/Makefile.am (bin_PROGRAMS): Add readlink. + * src/readlink.c: New file. + + * man/readlink.x: New file. + * man/Makefile.am (dist_man_MANS): Add readlink.1. + (readlink.1): New rule. + +2003-01-09 Jim Meyering <jim@meyering.net> + + When selecting ranges of byte offsets (as opposed to ranges of fields) + and when --output-delimiter=STRING is specified, output STRING between + ranges of selected bytes. + * src/cut.c (RANGE_START_SENTINEL): Define. + (output_delimiter_specified): New global. + (print_kth): Add parameter. Adjust all callers. + (set_fields): Mark each range-start index with RANGE_START_SENTINEL. + (cut_bytes): When requested, output STRING between ranges of + selected bytes. + (main): Make a diagnostic a little clearer. + Based on a patch from Jan Nieuwenhuizen. + + * tests/cut/Test.pm: New tests for the above. + + * src/cut.c (set_fields): Make code agree with comment: + Don't merge abutting ranges like 4- and 2-3. This makes no + difference currently, but is required to support an upcoming change. + +2003-01-07 Jim Meyering <jim@meyering.net> + + * src/cut.c (set_fields): Fix typo in comment. + + * tests/touch/not-owner: New test, mostly extracted from fail-diag. + * tests/touch/Makefile.am (TESTS): Add not-owner. + * tests/touch/fail-diag: Remove the test for non-owner diagnostic. + Now, this tests only the nonexistent-directory diagnostic. + Suggestion from Michael Stone. + + * tests/touch/fail-diag: Fix typo: s/ld/ls/. + +2003-01-04 Jim Meyering <jim@meyering.net> + + * src/copy.h: Remove use of PARAMS. + * src/remove.h: Likewise. + * src/chown-core.h: Likewise. + + rm could be tricked into mistakenly reporting a cycle. + * src/remove.c: [cycle_check_state]: New global. + (remove_cwd_entries): Adapt to new semantics of cycle_check. + (rm): Call cycle_check_init and cycle_check_free for each file. + * tests/rm/cycle (rm): New test, for the above fix. + * tests/rm/Makefile.am (TESTS): Add cycle. + + When rm detects a cycle, don't abort the entire command, + but rather just the affected command line argument. + * src/remove.c: Include <setjmp.h> + (struct dirstack_state) [current_arg_jumpbuf]: New member. + (remove_cwd_entries): Call longjmp if we detect a cycle. + (rm): Call setjmp here. + + * src/remove.c (cycle_check, is_power_of_two): Remove functions. + Instead, include cycle-check.h and use it. + + * src/remove.h (struct dev_ino): Remove declaration. + + * src/remove.c (remove_cwd_entries): Fix typos in comment. + + Don't include trailing /. in diagnostics about directories. + * src/remove.c (full_filename_): When FILENAME is just `.' + and there is a nonempty directory-name part, don't append `/.'. + * tests/rm/unread2: Remove trailing /. from diagnostic. + * tests/rm/rm2: Likewise. + + * src/remove.c (struct dirstack_state): Define. + To be used in place of these file-scoped globals ... + (dir_stack, len_stack, Active_dir): Remove globals. + (ds_init, ds_free): New functions. + (full_filename): Define. + (full_filename_): Rename from full_filename. + + Begin to make AD_* functions more generic. + * src/remove.c (AD_push_initial): Don't set status to RM_OK here. + (AD_push): Likewise. + (AD_INIT_OTHER_MEMBERS): Define. + (remove_dir): Define the `status' member manually after each + call to AD_push or AD_push_initial. + + * src/Makefile.am (check-misc): New rule, to ensure that no more + S_IS* macro definitions sneak into the code. + (check): Depend on check-misc. + + * src/remove.c [S_ISLNK]: Don't define. It's already defined in sys2.h. + * src/du.c (count_entry) [S_ISLNK]: Don't define. + * src/shred.c [S_ISLNK, S_ISFIFO, S_ISSOCK]: Don't define. + +2003-01-03 Jim Meyering <jim@meyering.net> + + * src/true.c: Add copyright. + (AUTHORS): I suppose I've written it. + + * src/Makefile.am (false.c): Make the generated file be read-only. + +2003-01-04 Jim Meyering <jim@meyering.net> + + * src/ls.c: Include "dev-ino.h". + [struct dev_ino]: Remove declaration. + +2003-01-02 Jim Meyering <jim@meyering.net> + + * src/cp.c (do_copy): Tweak diagnostic to be consistent with the one + from mv: s/missing file arguments/missing file argument/. + With --target-directory=DIR, cp and mv work with a single file argument. + Reported by Karl Berry. + + * tests/rm/isatty: Enable this test. + +2002-12-31 Jim Meyering <jim@meyering.net> + + * src/remove.c (AD_push_initial): Don't set status to RM_OK here. + (AD_push): Likewise. + (AD_INIT_OTHER_MEMBERS): Define. + (remove_dir): Define the `status' member manually after each + call to AD_push or AD_push_initial. + + * src/ls.c [struct dev_ino]: Remove definition. + Include "dev-ino.h" instead. + +2002-12-28 Jim Meyering <jim@meyering.net> + + * tests/du/Makefile.am (TESTS): Add no-deref. + * tests/du/no-deref: New script. + +2002-12-23 Jim Meyering <jim@meyering.net> + + * src/remove.c (remove_cwd_entries): Fix typo in comment. + +2002-12-21 Jim Meyering <jim@meyering.net> + + * announce-gen: Generate MML-formatted announcement. + This makes it a *lot* harder to send stale MD5/SHA1 signatures. + +2002-12-20 Jim Meyering <jim@meyering.net> + + * src/touch.c (touch): Change the wording of a diagnostic so + that it makes sense both when the file exists and when it doesn't. + Suggestion from Michael Stone. + +2002-12-18 Jim Meyering <jim@meyering.net> + + * src/stty.c (valid_options): Declare to be static. + +2002-12-15 Jim Meyering <jim@meyering.net> + + * Makefile.cfg: Remove rules related to generating m4/jm-glibc-io.m4. + + * src/chmod.c, src/copy.c, src/copy.h, src/cp-hash.h, src/csplit.c: + * src/date.c, src/expr.c, src/fmt.c, src/id.c, src/install.c: + * src/ls.c, src/od.c, src/pathchk.c, src/pr.c, src/remove.c: + * src/shred.c, src/sort.c, src/stat.c, src/stty.c, src/sum.c: + * src/tee.c, src/test.c: Remove all uses of `PARAMS'. + + * src/remove.c (PARAMS): Remove definition. + * src/sys2.h: Likewise. + + * src/ls.c, src/stat.c, src/date.c: Remove declaration of nstrftime. + Include strftime.h instead. + +2002-12-14 Jim Meyering <jim@meyering.net> + + * Makefile.cfg ($(url_dir_list)): Use .../coreutils, not .../fetish. + + * src/system.h [! HAVE_DECL_MEMRCHR]: Declare memrchr. + This is necessary at least for Irix6.5 when using c89. + Reported by Nelson Beebe. + + * tests/misc/Makefile.am (TESTS): Add cat-tty-eof. + + * tests/misc/cat-tty-eof: New test. + + * src/mknod.c (usage): Specify how major and minor mode numbers + are interpreted. Report forwarded by Kristin E Thomas. + * src/mknod.c: Remove now-redundant usage-specifying comment. + +2002-12-13 Jim Meyering <jim@meyering.net> + + * Version 4.5.4. + + * tests/du/trailing-slash: Allow for a directory of size `0'. + That happens at least on file systems of type tmpfs on linux-2.4.18. + + * announce-gen: New script to begin replacing the commands + associated with the rule here... + * Makefile.maint (announcement): Invoke announce-gen. + * Makefile.am (EXTRA_DIST): Add announce-gen. + + * tests/cp/preserve-2: New file/test, for latest fix. + * tests/cp/Makefile.am (TESTS): Add preserve-2. + +2002-12-11 TAKAI Kousuke <takai@vlsi.kuee.kyoto-u.ac.jp> + + Fix a bug whereby cp would fail to parse an option like + --preserve=mode,ownership. + * src/cp.c (decode_preserve_arg): Advance `comma' to + point the character following the comma. + +2002-12-11 Jim Meyering <jim@meyering.net> + + * src/pathchk.c (NEED_PATHCONF_WRAPPER): Undefine before defining, + in case it's already defined. + +2002-12-09 Jim Meyering <jim@meyering.net> + + * tests/touch/fail-diag: Don't get a test failure if /no exists. + Instead, evoke a framework failure if /no-$$ exists. + Reported by Michael Stone. + +2002-12-08 Jim Meyering <jim@meyering.net> + + * src/du.c (lstat) [! LSTAT_FOLLOWS_SLASHED_SYMLINK]: + Define to rpl_lstat, so that even on systems like Solaris 5.8, + du honors (per POSIX) the trailing slash on an argument referring + to a symlink-to-directory. + +2002-12-06 Jim Meyering <jim@meyering.net> + + * Use autoconf-2.57. Regenerate dependent files. + * Use automake-1.7.2. Regenerate dependent files. + + * src/ls.c (gobble_file): Also stat the file if it's a + regular file and --indicator-style=classify (aka -F). + Thanks to Ed Santiago for opening my eyes. + + * tests/ls/file-type: New file. Test for the above. + A test to contrast ls -F and ls --indicator-style=file-type. + * tests/ls/Makefile.am (TESTS): Add file-type. + +2002-12-04 Jim Meyering <jim@meyering.net> + + * tests/ls/follow-slink: Make sure the symlink was created. + Richard Dawe reported that `ln -s link link' succeeds, but creates + no file on systems running some version of the DJGPP libc. + +2002-12-03 Jim Meyering <jim@meyering.net> + + * src/Makefile.am (AUTOMAKE_OPTIONS): Remove definition (to ansi2knr) + since this package no longer panders to K&R compilers. + +2002-12-02 Jim Meyering <jim@meyering.net> + + * tests/du/slink: Skip this test if `.' is on a non-local file system. + + * tests/Fetish.pm (_at_replace): Do the substitution only if there's + something to replace. + +2002-12-01 Jim Meyering <jim@meyering.net> + + * src/stat.c: Don't include <string.h> or <ctype.h>. + That's already done via system.h. + * src/dircolors.c: Don't include <ctype.h>. + +2002-11-30 Jim Meyering <jim@meyering.net> + + * ls.c (gobble_file): Remove the block of code that caused + `ls --color -F symlink-to-dir' to list the files in + `symlink-to-dir/.'. Now, it prints `symlink-to-dir@', (just + like `ls -F symlink-to-dir') but with the addition of highlighting. + Similarly, `ls --color -dF symlink-to-dir' would print + `symlink-to-dir/'; now it prints `symlink-to-dir@'. + Reported by Jeff Sheinberg as Debian bug #168203. + * tests/ls-2/tests (sl-F-color, sl-dF-color): New tests for the above. + + ls is now more efficient: with certain options, it no longer needs + to stat each directory entry on systems with valid dirent.d_type. + * src/ls.c (print_dir): Add DT_LNK and DT_REG. + (main): Make --recursive set format_needs_type, not format_needs_stat. + (gobble_file): Remove a FIXME comment, now that it's fixed. + +2002-11-24 Jim Meyering <jim@meyering.net> + + * src/du.c (du_files): Don't strip any trailing slash. + Rewrite so that `/' is no longer represented internally as + the empty string. + (count_entry): When appending a file name component, + account for the fact that the current path may end in `/'. + François Pinard reported that `du symlink-to-dir/' was not + equivalent to `du symlink-to-dir/.'. Now it is. + * tests/du/trailing-slash: New file/test, for the above fix. + * tests/du/Makefile.am (TESTS): Add trailing-slash. + +2002-11-23 Jim Meyering <jim@meyering.net> + + * src/tac.c (output): Declare some local variables to be of type size_t, + rather than `int' to avoid warnings from gcc. + +2002-11-21 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (decode_switches): Use case-sensitive matching to + decode the QUOTING_STYLE environment variable. This is more + consistent with the documentation, and with --quoting-style. + +2002-11-21 Martin Buck <martin.buck@ascom.ch + + * src/stty.c (struct speeds): Add support for all baud rates defined + in linux-2.4.19. + +2002-11-19 Jim Meyering <jim@meyering.net> + + * tests/sum/sysv: Export LC_ALL=C, to avoid failure when + run in a UTF locale. Report and suggested fix by Bruno Haible. + * tests/fmt/basic: Likewise. + +2002-11-17 Jim Meyering <jim@meyering.net> + + * configure.ac: Update via autoupdate. + Add `AM_GNU_GETTEXT_VERSION(0.11.5)'. + + * src/mv.c (movefile): Don't remove trailing slashes from SOURCE. + Reported by Hans Ginzel. + +2002-11-15 Jim Meyering <jim@meyering.net> + + * Makefile.cfg (gnu_rel_host): Define. + (url_dir_list): Choose from (alpha|ftp).gnu.org depending + on whether $(VERSION) looks like a major release number. + + * Makefile.maint (mail_gpg_sign_cookie): Backslash-escape `#'. + (release): Rename from `alpha'. + (alpha): Depend on release. + + * Makefile.maint (signatures): Define with ?=, so it's easy to override. + +2002-11-14 Jim Meyering <jim@meyering.net> + + * Makefile.maint (mail_gpg_sign_cookie): Make optional. + (announcement): Use the new variable. + + * Makefile.maint: Sync with Bison, i.e.: + (po-check): Scan .l and .y files instead of the + .c and the .h files that they generate. This fixes the bug + reported by Tim Van Holder in: + <http://mail.gnu.org/pipermail/bison-patches/2002-November/001352.html> + Look for N_ as well as for _. Try to avoid matching #define for + N_ and _. + From Paul Eggert. + +2002-11-12 Jim Meyering <jim@meyering.net> + + * src/ls.c (HAVE_SYMLINKS): Remove unnecessary macro definition. + Replace sole use with equivalent `#ifdef S_ISLNK'. + Inconsistency reported by Dmitry V. Levin. + +2002-11-11 Jim Meyering <jim@meyering.net> + + * src/stat.c (usage): Transform --help items output via s/ - / /, + so that help2man produces properly formatted man pages. + Reported by Herbert Xu as Debian bug #168400. + +2002-11-10 Jim Meyering <jim@meyering.net> + + * src/ls.c (sighandler): Handle SIGTSTP specially. + Based on suggestions from Solar Designer and Dmitry V. Levin. + Add comments. + + * Makefile.cfg (cvs_files): Define. From autoconf. + (local_updates): Likewise. + + * src/ls.c (restore_default_color_handler, sigtstp_handler): + Remove functions. + (sighandler): New function, based on the one in sort.c. + (main): Use sigaction, if possible; otherwise signal. + Handle these signals: + SIGHUP, SIGINT, SIGPIPE, SIGQUIT, SIGTERM, SIGTSTP. + Don't register our handler if the signal is already being ignored. + + * src/dd.c (interrupt_handler): Use raise, rather than kill+getpid. + * src/csplit.c (interrupt_handler): Likewise. + * src/sort.c (sighandler): Likewise. + (main): Declare `i' and `nsigs' to be unsigned, not int. + +2002-11-09 Jim Meyering <jim@meyering.net> + + ls --color: restore terminal text color upon signal. + * src/ls.c: Include "full-write.h" and <signal.h>. + (restore_default_color, restore_default_color_handler): New functions. + (sigtstp_handler, put_indicator_direct): New functions. + (main) [print_with_color]: Register signal handlers. + Patch mostly by Solar Designer and Stanislav Ievlev. + + Update from autoconf. + * Makefile.maint (AMTAR): Remove definition. + (update, cvs-update, po-update, do-po-update): New rules. + (wget-update): Update (thus renaming to cvs-update). + (automake_repo): Use anoncvs@sources.redhat.com. + +2002-11-06 Jim Meyering <jim@meyering.net> + + * tests/misc/Makefile.am (TESTS): Add printf-hex. + + * tests/misc/printf: Be careful to test the code in this package, + not the shell built-in function. + + * src/printf.c (print_esc): A hexadecimal escape sequence has + at most two hex. digits, not three. Reported by Padraig Brady. + (usage): Update description. + * tests/misc/printf-hex: New file/test, for the above fix. + +2002-10-07 Paul Eggert <eggert@twinsun.com> + + Add support for locale-specific size indications (e.g., + thousands-separators) and for explicit size suffixes on output. + + * doc/coreutils.texi (Block size): Say that: + This affects display format as well as block size. + Fractional block counts are rounded up. + ls file size blocksize defaults to 1. + A block size spec preceded by ' generates thousands separators. + A suffix without a preceding integer generates suffixes. + (tail invocation): 32k -> 32 KiB. + (What information is listed): ls -h is now equivalent to + ls --block-size=human, and ls -H is now equivalent to + ls --block-size=si. Displayed file size is now always affected by + --block-size. + + * lib/inttostr.c, lib/inttostr.h, lib/imaxtostr.c, lib/offtostr.c, + lib/umaxtostr.c: New files, taken from GNU tar. + + * lib/Makefile.am (libfetish_a_SOURCES): Add imaxtostr.c, offtostr.c, + umaxtostr.c. + (EXTRA_DIST): Add inttostr.c. + + * lib/human.c, lib/human.h: Rewrite to support locale-specific + notations like thousands separators. + Specify what includer of include.h must include beforehand. + (human_group_digits, human_suppress_point_zero, human_autoscale, + human_base_1024, human_SI, human_B): New enum values. + (human_readable): Rename from human_readable_inexact; put the + options before the sizes. All uses changed. The old human_readable + function has been removed; use inttostr.h instead. + (human_options): Renamed from human_block_size, with new signature + that allows block sizes up to UINTMAX_MAX. All callers changed. + + * m4/prereq.m4 (jm_PREREQ_HUMAN): Check for locale.h, localeconv, + AC_HEADER_STDBOOL. No need to check for limits.h since it's in + freestanding C89. No need to check for stdlib.h or string.h since + autoconf does this now. + + * src/cksum.c (cksum): Use primitives from inttostr.h, not + human.h, to print large numbers simply. + * src/csplit.c (handle_line_error, parse_patterns): Likewise. + * src/dd.c (print_stats, main): Likewise. + * src/df.c (print_header): Likewise. + * src/factor.c (print_factors): Likewise. + * src/ls.c (print_long_format, print_file_name_and_frills): Likewise. + * src/shred.c (dopass): Likewise. + * src/sort.c (checkfp): Likewise. + * src/sum.c (bsd_sum_file, sysv_sym_file): Likewise. + * src/tail.c (xlseek): Likewise. + * src/wc.c (write_counts, wc): Likewise. + + * src/df.c (human_output_opts): New var. + (output_block_size): Now uintmax_t, not int, to handle larger + block sizes. All uses changed. + * src/du.c: Likewise. + * src/ls.c: Likewise. + + * src/df.c (print_header): In the header line, prefer SI to human + representation if it's shorter; if neither is shorter, try to + intuit what the user would prefer. + + * src/expr.c (inttostr): Remove; use new imaxtostr library + function instead. + + * src/ls.c (file_output_block_size): New var, to distinguish + file sizes from other sizes. + (decode_switches): Set it. + + * src/shred.c (OUTPUT_BLOCK_SIZE): remove. + (dopass): When printing progress, use floor for what has been done + so far (since we should be conservative there), and ceiling for + what needs to be done (since that's what other programs use). + +2002-10-19 Jim Meyering <jim@meyering.net> + + * src/pinky.c (print_heading): Align TTY and Name headings. + Reported by Karl Eichwalder. + +2002-10-18 Jim Meyering <jim@meyering.net> + + * src/split.c (cwrite): Change type of `bytes' parameter to size_t + Remove now-useless cast. + (stdread): Remove function. + (bytes_split): Use size_t instead of int. + Use safe_read, not stdread. + (lines_split): Likewise. + Use memchr rather than a `while' loop. + (line_bytes_split): Use size_t instead of int. + Use safe_read, not stdread. + (main): Add some FIXME comments to remind me to remove casts. + + * src/system.h (ST_BLKSIZE): Correct comment describing how to + reproduce HPUX-11 cat failure. From Petter Reinholdtsen. + +2002-10-17 Jim Meyering <jim@meyering.net> + + Fix a problem that could make e.g., `cat' misbehave on systems which + give invalid (unreasonably large) values for stat.st_blksize. + * src/system.h (ST_BLKSIZE): Ensure that the result is in [1..4MB]. + Reported by Petter Reinholdtsen. + +2002-10-14 Jim Meyering <jim@meyering.net> + + Specifying a printf conversion specifer as nl's separator string + could cause nl to segfault. + * src/nl.c (build_print_fmt): Don't include separator string + in the printf format; it might contain `%'. + Use a better bound on the length of the print_fmt buffer. + (print_lineno): Print the separator here instead. + Reported by Doug Coleman. + + * tests/misc/nl: New file/tests, including a test for the above. + * tests/misc/Makefile.am (TESTS): Add nl. + + * tests/misc/split-l: New test, to make sure `split --lines=N' works. + * tests/misc/Makefile.am (TESTS): Add split-l. + +2002-10-13 Jim Meyering <jim@meyering.net> + + * Version 4.5.3. + + * src/du.c (usage): Tweak description of --dereference-args/-D. + + * src/du.c (count_entry): Also save cwd when dereferencing (via + --dereference-args, -D) a command-line argument. + Reported by Michal Svec. Based on a patch by Andreas Schwab. + + * src/Makefile.am (../AUTHORS): New target/rule. + +2002-10-12 Jim Meyering <jim@meyering.net> + + * src/paste.c (paste_parallel): Declare local, `delims_saved', to be + of type size_t, since that's the way it's used and avoids a warning. + + * src/csplit.c (struct cstring) [len]: Declare to be unsigned int, + since that's how it's always used and avoids a new warning from gcc. + (read_input): Adapt to new safe_read ABI. + + * src/cut.c (cut_fields): Add a temporary size_t variable, n_bytes, + to avoid warnings. + + * src/pinky.c (print_long_entry): fread returns size_t. + Declare local `bytes' accordingly, to avoid warning. + + tail -c +N would perform an extra read after encountering EOF + [this change is analogous (bytes vs. lines) to the one of 2002-01-27] + * src/tail.c (start_bytes): Detect EOF, inform caller. + (tail_bytes): Upon EOF in start_bytes, return immediately. + (file_lines): Reorganize to use memrchr rather than an explicit loop. + Adapt to new safe_read ABI. + +2002-10-11 Jim Meyering <jim@meyering.net> + + * tests/du/deref: New file/test, for the above fix. + * tests/du/Makefile.am (TESTS): Add deref. + +2002-10-10 Jim Meyering <jim@meyering.net> + + * tests/ln/Makefile.am (TESTS): Add target-1. + * tests/ln/target-1: New file/test, for the fix on 2002-10-08. + +2002-10-09 Jim Meyering <jim@meyering.net> + + * tests/cp/backup-is-src: Ensure that certain environment variables + are not set (e.g., SIMPLE_BACKUP_SUFFIX). Reported by Duncan Roe. + + * tests/tail-2/big-4gb: Mark this as an expensive test; it would + consume 4GB of disk space on systems without support for sparse files. + Fix a logic error that'd make it `cat err' even though dd didn't fail. + + * src/dircolors.hin (.jar): Fix typo: s/;3$/;31/. + Patch by steven@magelico.net, forwarded by Michael Stone. + + * tests/ls/dired: Ensure that ls produces English messages. + Patch by Alexey Vyskubov, forwarded by Michael Stone. + +2002-10-08 Dmitry V. Levin <ldv@altlinux.org> + + * src/ln.c (main): Fix target_directory parsing when n_files == 1. + +2002-10-08 Jim Meyering <jim@meyering.net> + + * tests/tail-2/big-4gb: Use double quotes around diagnostic. + Fix syntax in test: use =, not ==. + Reported by Bob Proulx. + Change all the rest like this: grep -lR "testing framework'" .\ + |xargs perl -pi -e 's/'\''(\$0: failure in testing framework)'\''/"$1"/' + + * src/sum.c (sysv_sum_file): Adapt to new safe_read ABI. + * src/tr.c (squeeze_filter, read_and_delete, read_and_xlate): Likewise. + * src/tac.c (save_stdin, tac_stdin_to_mem): Likewise. + * src/wc.c (wc): Likewise. + +2002-10-07 Paul Eggert <eggert@twinsun.com> + + * src/cat.c (cat): + Don't advance the write pointer past the end of the write buffer. + * src/sort.c (begfield, limfield): Likewise. + +2002-10-07 Jim Meyering <jim@meyering.net> + + * src/cat.c (simple_cat, cat): Adapt to new safe_read ABI. + * src/head.c (head_bytes, head_lines): Likewise. + +2002-10-06 Jim Meyering <jim@meyering.net> + + * src/dd.c (scanargs): Ensure that specified block sizes (specified + via ibs=N, obs=N, and bs=N) are no larger than SSIZE_MAX. + (skip, dd_copy): Adapt to new safe_read ABI. + + * Makefile.maint (signatures): Define. + (%.sig): New rule. + (announcement): Depend on $(signatures). + + * Makefile.maint (announcement): Output all URLs for detached + signatures, not just the last one from the previous loop. + +2002-10-05 Jim Meyering <jim@meyering.net> + + * Version 4.5.2. + + * src/remove.c (remove_entry) [ROOT_CAN_UNLINK_DIRS]: With `rm -i DIR', + don't recurse into directory, DIR. Prompted by a report from + Leonardo Milano. + + * tests/rm/i-no-r: New file/test, for the above fix. + * tests/rm/Makefile.am (TESTS): Add i-no-r. + + * tests/tail-2/big-4gb: New file/test, for the fix of 2002-09-27. + * tests/tail-2/Makefile.am (TESTS): Add big-4gb. + +2002-10-03 Jim Meyering <jim@meyering.net> + + * src/rm.c (AUTHORS): Mark translatable string with `N_ (...)'. + * src/df.c (AUTHORS): Likewise. + * src/du.c (AUTHORS): Likewise. + * src/tail.c (AUTHORS): Likewise. + * src/touch.c (AUTHORS): Likewise. + +2002-10-02 Jim Meyering <jim@meyering.net> + + * Makefile.am (SUBDIRS): Remove `old'. + (EXTRA_DIST): List the files in old/. + * configure.ac (AC_CONFIG_FILES): Remove old/* names. + Suggestion from Akim Demaille. + +2002-10-01 Jim Meyering <jim@meyering.net> + + * src/sys2.h (SSIZE_MAX): Define. + +2002-09-30 Jim Meyering <jim@meyering.net> + + * src/csplit.c: Don't include stdlib.h here. It's already included + via system.h. + +2002-09-29 Jim Meyering <jim@meyering.net> + + * src/tr.c (find_bracketed_repeat): Rearrange pointer/integer + expression to avoid bogus warning from gcc. + + * src/cat.c (simple_cat): Use a temporary to avoid bogus warnings. + (cat): Declare insize and outsize to be of type size_t, not int. + Rearrange pointer/integer expressions to avoid bogus warnings. + (main): Declare insize and outsize to be of type size_t, not int. + + * src/tail.c (parse_options): Give a sensible diagnostic for + an invalid byte or line count. Reported by Mikko Tuumanen. + + * src/touch.c (main): Split a long line. + + * tests/du/Makefile.am (TESTS): Add slink. + * tests/du/slink: New test for system.h change of 2002-08-31. + + In move mode, always first try to rename. Before, upon failure to + rename a directory, this code would never attempt to rename any + other file in that directory, but would thenceforth always copy. + On some systems (e.g., NetApp's OnTap-6.4), renaming a directory + may fail with EXDEV, yet renaming files within that directory to + a newly-created destination directory succeeds. + * src/copy.c (copy_internal): Remove local, move_mode; + use x->move_mode instead. Based on a patch from Tom Haynes. + +2002-09-28 Jim Meyering <jim@meyering.net> + + * src/split.c (FAIL_ONLY_ONE_WAY): New macro. + Factor out some duplication. + (main): Use it. + [case 'a']: Use strtoul rather than strtol to avoid compiler warnings. + + * src/sort.c (begfield, limfield): Rearrange comparisons to avoid + compiler warnings. + (fillbuf, keycompare): Cast literal `-1' to size_t in comparisons, + to avoid compiler warnings. + + * src/shred.c (dopass): Use a uintmax_t temporary to avoid bogus + compiler warnings. + + Fix things so `mkdir -p' can create very deep directories, e.g., + mkdir -p $(perl -e 'print "a/" x 40000') now works. + * src/mkdir.c (main): For --parents (-p), call make_path with the + entire directory name, so we don't ever require that file operations + like stat or chmod be performed on the entire command line argument. + * makepath.c (make_path): Restore umask *before* creating the final + component. + +2002-09-27 Andreas Schwab <schwab@suse.de> + + * src/tail.c (tail_bytes): Change type of bytes_remaining to off_t + to avoid overflow. Reported by Hans Lermen. + +2002-09-26 Jim Meyering <jim@meyering.net> + + * src/install.c (get_ids): Use strtoul, not strtol. Remove some casts. + +2002-09-25 Jim Meyering <jim@meyering.net> + + * src/test.c (eaccess): Change type of local `euid' from int to uid_t + and add a cast, to avoid a warning about `signed and unsigned type in + conditional expression'. + +2002-09-22 Jim Meyering <jim@meyering.net> + + * src/rmdir.c: Include "dirname.h", for declaration of + strip_trailing_slashes. + + * src/stat.c (PRIdMAX, PRIuMAX): Remove definitions. + Now they're defined through system.h. + + * src/cp-hash.c, src/dd.c, src/df.c, src/du.c, src/ls.c, + * src/stat.c, src/wc.c: Remove all inclusions of inttypes.h, + since it's already included from sys2.h via system.h. + + * Use automake-1.6f. Regenerate dependent files. + + * src/Makefile.am (PERL): Remove duplicate definition. + + fmt's -s, -t, -c options didn't work properly for long lines. + Since get_line may end up calling put_paragraph (for long lines), + be sure to set global, `other_indent', before it is used there. + + * src/fmt.c (set_other_indent): New function, factored out of... + (get_paragraph): ... here. Call it. + (get_line): Call set_other_indent before calling flush_paragraph, + which calls fmt_paragraph, which in turn calls put_paragraph, + which uses other_indent. + + * tests/fmt/Makefile.am (TESTS): Add long-line. + * tests/fmt/long-line: New file/test, for the above fix. + +2002-09-21 Jim Meyering <jim@meyering.net> + + * src/od.c: No longer include deprecated <values.h>. + It was required solely for now-removed reference to BITSPERBYTE. + * src/install.c: Likewise. + Suggestion from Bruno Haible. + +2002-09-06 Andreas Schwab <schwab@suse.de> + + `rmdir -p dir-specified-with-trailing-slash/' would fail. + * src/rmdir.c (remove_parents): Strip trailing slashes. + +2002-09-20 Jim Meyering <jim@meyering.net> + + * tests/rmdir/t-slash: New file/test, for the above fix. + * tests/rmdir/Makefile.am (TESTS): Add t-slash. + + * Makefile.maint (announcement): Arrange to gpg-sign the message. + Add a URL for each detached signature file. + +2002-09-07 Bruno Haible <bruno@clisp.org> + + * configure.ac: Add need-ngettext to AM_GNU_GETTEXT invocation. + +2002-09-18 Jim Meyering <jim@meyering.net> + + `od -t x8' used the wrong (`l'-prefixed) printf format. + Likewise for the o8 and u8 formats. + * src/od.c (ISPEC_TO_FORMAT): Define macro. + (decode_one_format): Use PRIdMAX, PRIoMAX, etc. for LONG_LONG. + Reported by Arun Sharma. + +2002-09-17 Jim Meyering <jim@meyering.net> + + * src/sys2.h (PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Define if necessary. + From gettext's intl/loadmsgcat.c. + + * tests/od/x8: New file/test, for the above fix. + * tests/od/Makefile.am (TESTS): Add x8. + +2002-09-15 Jim Meyering <jim@meyering.net> + + * Use autoconf-2.54. Regenerate dependent files. + + * src/csplit.c (get_format_width): Add cast to avoid + warning about `signed and unsigned type in conditional expression'. + +2002-09-14 Jim Meyering <jim@meyering.net> + + * src/who.c (print_user): Change type of local to size_t + to avoid warnings about `comparison between signed and unsigned'. + * src/ptx.c (generate_all_output): Likewise. + + * src/dd.c (main, skip): Add casts to avoid warnings about + `comparison between signed and unsigned'. + + * src/id.c (print_full_info, print_group_list): Add casts to avoid + warnings about `signed and unsigned type in conditional expression'. + + * src/md5sum.c: Change type of global, digest_hex_bytes, to size_t + to avoid warnings about `comparison between signed and unsigned'. + (split_3): Change parameter names to be readable and add comment. + Clean up the test for whether a line may be ignored. + +2002-09-13 Jim Meyering <jim@meyering.net> + + * src/printf.c (main): Handle leading command line argument of `--'. + Reported by Raul: DervishD <raul@pleyades.net> + * tests/misc/printf: New file: test for the above. + * tests/misc/Makefile.am (TESTS): Add printf. + + * src/date.c (usage): Explain that %S's range of [0..60] is required -- + rather than 0..59 -- to accommodate the occasional positive leap second. + Reported by Richard Neill. + +2002-09-12 Jim Meyering <jim@meyering.net> + + * src/Makefile.am (nanosec_libs): Define. + (sleep_LDADD, tail_LDADD): Use it here. + + Factor nanosleep-related code into ../lib/xnanosleep.c. + * src/sleep.c: Include xnanosleep.h. + Factor out fenv.h-related code. + (timespec_subtract): Remove function. + (main): Remove code that deals with computing start and stop times + as well as the loop around nanosleep. Now that's in xnanosleep.c. + + Allow S (in --sleep-interval=S) to be a floating point value. + * src/tail.c: Include xnanosleep.h and xstrtod.h. + Move declaration of global variable, sleep_interval, to ... + (main): ...here. + (usage): Update description of --sleep-interval option. + (tail_forever): New parameter, sleep_interval. Update caller. + Use xnanosleep, rather than sleep. + (parse_options): New parameter, sleep_interval. Update caller. + Use xstrtod, now that we accept floating point values. + Prompted by a patch from Augey Mikus. + +2002-09-06 Jim Meyering <jim@meyering.net> + + * src/remove.c (prompt): Change comment to give a better note to + translators. From Michael Piefel. + +2002-09-02 Jim Meyering <jim@meyering.net> + + * README: A good problem report/patch includes diffs against + the most recent test release. + + * src/pathchk.c (NEED_PATHCONF_WRAPPER): Define. + (pathconf_wrapper): Define only if NEED_PATHCONF_WRAPPER is set. + + * src/kill.c (print_table_row): Use an unsigned type for widths + to avoid warning about comparison between signed and unsigned. + (list_signals): Likewise. + + * src/od.c (skip): Add a cast to avoid warning about comparison + between signed and unsigned. + * src/install.c (get_ids): Likewise. Also rearrange range-checking + comparisons to make them more readable. + +2002-09-01 Jim Meyering <jim@meyering.net> + + * Version 4.5.1. + +2002-08-31 Jim Meyering <jim@meyering.net> + + Symlinks were always reported as using 0 blocks. + * src/system.h (ST_NBLOCKS): Don't depend on file type. + This reverts the change of 2000-01-30. + Based on a report and patch from Neil Brown via Michael Stone. + This fixes Debian Bug#156358. + + * Most files: Change `exit (0)' to `exit (EXIT_SUCCESS)', + `exit (1)' to `exit (EXIT_FAILURE)', and + `usage (1)' to `usage (EXIT_FAILURE)'. + + * chgrp.c, chmod.c, chown.c, chroot.c, cp.c, date.c, dd.c, du.c, + * hostname.c, id.c, install.c, ln.c, mkdir.c, mkfifo.c, mknod.c, + * nice.c, pinky.c, printf.c, pwd.c, shred.c, sleep.c, stty.c, + * su.c, tac-pipe.c, tail.c, tee.c, touch.c, uname.c, uptime.c, + * users.c, who.c: Change `error (1, ...' to `error (EXIT_FAILURE, ...'. + But don't change `error (0, ...' to `error (EXIT_SUCCESS, ...', since + error never exits successfully. + +2002-08-29 Jim Meyering <jim@meyering.net> + + * src/remove.c (remove_cwd_entries): Use closedir (not CLOSEDIR) + when ignoring any return value. + + * src/remove.c (remove_cwd_entries): Detect and diagnose readdir + failures. On some systems (at least EMC Celerra and Solaris5.8), + this appears to be necessary. + (is_empty_dir): Likewise. Also, always close directory handle. + * src/ls.c (print_dir): Likewise. + (print_dir): Rename local variable: reading -> dirp. + Reported by Mike Coleman. + +2002-08-28 Jim Meyering <jim@meyering.net> + + * src/remove.c (remove_cwd_entries): Use CLOSEDIR, not closedir. + Give a diagnostic and fail if closedir fails. + +2002-08-26 Jim Meyering <jim@meyering.net> + + * Makefile.am (THANKS-to-translators): New rule. + (EXTRA_DIST): Add both THANKS-to-translators and THANKStt.in. + * THANKStt.in: New file. + + * src/cat.c (close_stdout_wrapper): New, kludgey, function and + file-scoped global. + (main): Register it with atexit. + Close STDOUT_FILENO, to avoid a problem when writing to + /dev/audio on at least Solaris 5.7 and 5.8 systems. + Reported by Shing-Shong Shei. + +2002-08-25 Jim Meyering <jim@meyering.net> + + * src/cat.c (main): Close STDIN_FILENO rather than a literal `0'. + * src/tac.c (main): Likewise. + * src/tail.c (main): Likewise. + * src/tee.c (main): Likewise. + * src/tr.c (main): Likewise. + * src/wc.c (main): Likewise. + +2002-08-20 Jim Meyering <jim@meyering.net> + + * tests/mv/setup: Rewrite not to use `: ${VAR=not_set}' paradigm. + +2002-08-10 Paul Eggert <eggert@twinsun.com> + + * src/nohup.sh: Don't use "exec --"; it's not portable and + shouldn't be needed. + +2002-08-09 Jim Meyering <jim@meyering.net> + + * src/pr.c (main): Don't ignore -COLUMN if it's the last option. + (usage): Clarify help text for the -COLUMN option. + Patch by Padraig Brady. + * tests/pr/Test.pm [col-last]: New test for the above. + + * configure.ac: Start with version 4.5.1, chosen so that it's larger + than the latest version numbers of the component packages. + + * man/Makefile.am (check-x-vs-1): Set and export PATH so we use + programs in ../src. + +2002-08-08 Jim Meyering <jim@meyering.net> + + * src/date.c: Guard inclusion of <langinfo.h> with + `#if HAVE_LANGINFO_CODESET', not `#if HAVE_LANGINFO_H'. + * src/sort.c: Likewise. + Patch by GOTO Masanori. + +2002-08-05 Paul Eggert <eggert@twinsun.com> + + Fix some minor time-related bugs with POSIX time arguments. + Some valid time stamps were being rejected (notably -1, and + time stamps before 1900 on 64-bit hosts). And some invalid + time stamps were being accepted, e.g. September 31. + + * src/date.c (main): Adjust to posixtime signature change. + * src/touch.c (main): Likewise. Remove unnecessary initialization. + Use localtime, not posixtm, to warn about obsolete "touch". + +2002-08-05 Jim Meyering <jim@meyering.net> + + * tests/misc/Makefile.am (TESTS): Add nice and pathchk1. + +2002-08-04 Jim Meyering <jim@meyering.net> + + * src/Makefile.am (check-README): New target/rule. + (check): Depend on it. + + * configure.ac (AC_CONFIG_FILES): Add old/Makefile and old/*/Makefile. + +2002-08-03 Jim Meyering <jim@meyering.net> + + * Makefile.am (SUBDIRS): Add old. + * old/: New directory, containing legacy ChangeLog* and NEWS files + from the fileutils, sh-utils, and textutils packages. + + * src/Makefile.am (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Set to false. + +2002-08-02 Paul Eggert <eggert@twinsun.com> + + * NEWS, doc/coreutils.texi: uniq now obeys LC_COLLATE. + + * src/uniq.c: Include hard-locale.h, xmemcoll.h. + (hard_LC_COLLATE): New var. + (different): Args are now char *, not const char *. + Use xmemcoll instead of memcmp to compare lines, so that + LC_COLLATE has effect. However, use memcmp if it is an + easy locale. + (check_file): Do not include newline in comparison, so that + xmemcoll has a byte to stomp on temporarily. + (main): Set hard_LC_COLLATE. + +2002-07-29 Jim Meyering <jim@meyering.net> + + * Makefile.am (SUBDIRS): Remove djgpp, for now. + +2002-07-20 Jim Meyering <jim@meyering.net> + + * Makefile.am (false.c): Convert only the final EXIT_SUCCESS + into EXIT_FAILURE. Otherwise, false --help and false --version + would fail. + +2002-07-08 Jim Meyering <jim@meyering.net> + + * src/Makefile.am (uninstall-local): Search for @GNU_PACKAGE@, + rather than the hard-coded `sh-utils'. + +2002-07-01 Jim Meyering <jim@meyering.net> + + * configure.ac: Merge the three files from fileutils, + textutils, and sh-utils. + * Makefile.am: Likewise. + * src/Makefile.am: Likewise. diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/INSTALL b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/INSTALL new file mode 100644 index 0000000..54caf7c --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/INSTALL @@ -0,0 +1,229 @@ +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software +Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/NEWS b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/NEWS new file mode 100644 index 0000000..39aa810 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/NEWS @@ -0,0 +1,1024 @@ +GNU coreutils NEWS -*- outline -*- + +* Major changes in release 5.3.0 (2005-01-08) [unstable] + +** Bug fixes + + Several fixes to chgrp and chown for compatibility with POSIX and BSD: + + Do not affect symbolic links by default. + Now, operate on whatever a symbolic points to, instead. + To get the old behavior, use --no-dereference (-h). + + --dereference now works, even when the specified owner + and/or group match those of an affected symlink. + + Check for incompatible options. When -R and --dereference are + both used, then either -H or -L must also be used. When -R and -h + are both used, then -P must be in effect. + + -H, -L, and -P have no effect unless -R is also specified. + If -P and -R are both specified, -h is assumed. + + Do not optimize away the chown() system call when the file's owner + and group already have the desired value. This optimization was + incorrect, as it failed to update the last-changed time and reset + special permission bits, as POSIX requires. + + "chown : file", "chown '' file", and "chgrp '' file" now succeed + without changing the uid or gid, instead of reporting an error. + + Do not report an error if the owner or group of a + recursively-encountered symbolic link cannot be updated because + the file system does not support it. + + chmod now accepts multiple mode-like options, e.g., "chmod -r -w f". + + chown is no longer subject to a race condition vulnerability, when + used with --from=O:G and without the (-h) --no-dereference option. + + cut's --output-delimiter=D option works with abutting byte ranges. + + dircolors's documentation now recommends that shell scripts eval + "`dircolors`" rather than `dircolors`, to avoid shell expansion pitfalls. + + du no longer segfaults when a subdirectory of an operand + directory is removed while du is traversing that subdirectory. + Since the bug was in the underlying fts.c module, it also affected + chown, chmod, and chgrp. + + du's --exclude-from=FILE and --exclude=P options now compare patterns + against the entire name of each file, rather than against just the + final component. + + echo now conforms to POSIX better. It supports the \0ooo syntax for + octal escapes, and \c now terminates printing immediately. If + POSIXLY_CORRECT is set and the first argument is not "-n", echo now + outputs all option-like arguments instead of treating them as options. + + expand and unexpand now conform to POSIX better. They check for + blanks (which can include characters other than space and tab in + non-POSIX locales) instead of spaces and tabs. Unexpand now + preserves some blanks instead of converting them to tabs or spaces. + + "ln x d/" now reports an error if d/x is a directory and x a file, + instead of incorrectly creating a link to d/x/x. + + ls no longer segfaults on systems for which SIZE_MAX != (size_t) -1. + + md5sum and sha1sum now report an error when given so many input + lines that their line counter overflows, instead of silently + reporting incorrect results. + + Fixes for "nice": + + If it fails to lower the nice value due to lack of permissions, + it goes ahead and runs the command anyway, as POSIX requires. + + It no longer incorrectly reports an error if the current nice + value happens to be -1. + + It no longer assumes that nice values range from -20 through 19. + + It now consistently adjusts out-of-range nice values to the + closest values in range; formerly it sometimes reported an error. + + pathchk no longer accepts trailing options, e.g., "pathchk -p foo -b" + now treats -b as a file name to check, not as an invalid option. + + `pr --columns=N' was not equivalent to `pr -N' when also using + either -s or -w. + + pr now supports page numbers up to 2**64 on most hosts, and it + detects page number overflow instead of silently wrapping around. + pr now accepts file names that begin with "+" so long as the rest of + the file name does not look like a page range. + + printf has several changes: + + It now uses 'intmax_t' (not 'long int') to format integers, so it + can now format 64-bit integers on most modern hosts. + + On modern hosts it now supports the C99-inspired %a, %A, %F conversion + specs, the "'" and "0" flags, and the ll, j, t, and z length modifiers + (this is compatible with recent Bash versions). + + The printf command now rejects invalid conversion specifications + like %#d, instead of relying on undefined behavior in the underlying + printf function. + + ptx now diagnoses invalid values for its --width=N (-w) + and --gap-size=N (-g) options. + + mv (when moving between partitions) no longer fails when + operating on too many command-line-specified nonempty directories. + + rm (without -f) no longer hangs when attempting to remove a symlink + to a file on an off-line NFS-mounted partition. + + rm no longer gets a failed assertion under some unusual conditions. + + rm no longer requires read access to the current directory. + + "rm -r" would mistakenly fail to remove files under a directory + for some types of errors (e.g., read-only file system, I/O error) + when first encountering the directory. + + "sort" fixes: + + "sort -o -" now writes to a file named "-" instead of to standard + output; POSIX requires this. + + An unlikely race condition has been fixed where "sort" could have + mistakenly removed a temporary file belonging to some other process. + + "sort" no longer has O(N**2) behavior when it creates many temporary files. + + tac can now handle regular, nonseekable files like Linux's + /proc/modules. Before, it would produce no output for such a file. + + tac would exit immediately upon I/O or temp-file creation failure. + Now it continues on, processing any remaining command line arguments. + + "tail -f" no longer mishandles pipes and fifos. With no operands, + tail now ignores -f if standard input is a pipe, as POSIX requires. + When conforming to POSIX 1003.2-1992, tail now supports the SUSv2 b + modifier (e.g., "tail -10b file") and it handles some obscure cases + more correctly, e.g., "tail +cl" now reads the file "+cl" rather + than reporting an error, "tail -c file" no longer reports an error, + and "tail - file" no longer reads standard input. + + tee now exits when it gets a SIGPIPE signal, as POSIX requires. + To get tee's old behavior, use the shell command "(trap '' PIPE; tee)". + Also, "tee -" now writes to standard output instead of to a file named "-". + + "touch -- MMDDhhmm[yy] file" is now equivalent to + "touch MMDDhhmm[yy] file" even when conforming to pre-2001 POSIX. + + tr no longer mishandles a second operand with leading "-". + + who now prints user names in full instead of truncating them after 8 bytes. + + The following commands now reject unknown options instead of + accepting them as operands, so that users are properly warned that + options may be added later. Formerly they accepted unknown options + as operands; e.g., "basename -a a" acted like "basename -- -a a". + + basename dirname factor hostname link nohup sync unlink yes + +** New features + + For efficiency, `sort -m' no longer copies input to a temporary file + merely because the input happens to come from a pipe. As a result, + some relatively-contrived examples like `cat F | sort -m -o F - G' + are no longer safe, as `sort' might start writing F before `cat' is + done reading it. This problem cannot occur unless `-m' is used. + + When outside the default POSIX locale, the 'who' and 'pinky' + commands now output time stamps like "2004-06-21 13:09" instead of + the traditional "Jun 21 13:09". + + pwd now works even when run from a working directory whose name + is longer than PATH_MAX. + + cp, install, ln, and mv have a new --no-target-directory (-T) option, + and -t is now a short name for their --target-directory option. + + cp -pu and mv -u (when copying) now don't bother to update the + destination if the resulting time stamp would be no newer than the + preexisting time stamp. This saves work in the common case when + copying or moving multiple times to the same destination in a file + system with a coarse time stamp resolution. + + cut accepts a new option, --complement, to complement the set of + selected bytes, characters, or fields. + + dd now also prints the number of bytes transferred, the time, and the + transfer rate. The new "status=noxfer" operand suppresses this change. + + dd has new conversions for the conv= option: + + nocreat do not create the output file + excl fail if the output file already exists + fdatasync physically write output file data before finishing + fsync likewise, but also write metadata + + dd has new iflag= and oflag= options with the following flags: + + append append mode (makes sense for output file only) + direct use direct I/O for data + dsync use synchronized I/O for data + sync likewise, but also for metadata + nonblock use non-blocking I/O + nofollow do not follow symlinks + noctty do not assign controlling terminal from file + + stty now provides support (iutf8) for setting UTF-8 input mode. + + With stat, a specified format is no longer automatically newline terminated. + If you want a newline at the end of your output, append `\n' to the format + string. + + 'df', 'du', and 'ls' now take the default block size from the + BLOCKSIZE environment variable if the BLOCK_SIZE, DF_BLOCK_SIZE, + DU_BLOCK_SIZE, and LS_BLOCK_SIZE environment variables are not set. + Unlike the other variables, though, BLOCKSIZE does not affect + values like 'ls -l' sizes that are normally displayed as bytes. + This new behavior is for compatibility with BSD. + + du accepts a new option --files0-from=FILE, where FILE contains a + list of NUL-terminated file names. + + Date syntax as used by date -d, date -f, and touch -d has been + changed as follows: + + Dates like `January 32' with out-of-range components are now rejected. + + Dates can have fractional time stamps like 2004-02-27 14:19:13.489392193. + + Dates can be entered via integer counts of seconds since 1970 when + prefixed by `@'. For example, `@321' represents 1970-01-01 00:05:21 UTC. + + Time zone corrections can now separate hours and minutes with a colon, + and can follow standard abbreviations like "UTC". For example, + "UTC +0530" and "+05:30" are supported, and are both equivalent to "+0530". + + Date values can now have leading TZ="..." assignments that override + the environment only while that date is being processed. For example, + the following shell command converts from Paris to New York time: + + TZ="America/New_York" date --date='TZ="Europe/Paris" 2004-10-31 06:30' + + `date' has a new option --iso-8601=ns that outputs + nanosecond-resolution time stamps. + + echo -e '\xHH' now outputs a byte whose hexadecimal value is HH, + for compatibility with bash. + + ls now exits with status 1 on minor problems, 2 if serious trouble. + + ls has a new --hide=PATTERN option that behaves like + --ignore=PATTERN, except that it is overridden by -a or -A. + This can be useful for aliases, e.g., if lh is an alias for + "ls --hide='*~'", then "lh -A" lists the file "README~". + + In the following cases POSIX allows the default GNU behavior, + so when POSIXLY_CORRECT is set: + + false, printf, true, unlink, and yes all support --help and --option. + ls supports TABSIZE. + pr no longer depends on LC_TIME for the date format in non-POSIX locales. + printf supports \u, \U, \x. + tail supports two or more files when using the obsolete option syntax. + + The usual `--' operand is now supported by chroot, hostid, hostname, + pwd, sync, and yes. + + `od' now conforms to POSIX better, and is more compatible with BSD: + + The older syntax "od [-abcdfilosx]... [FILE] [[+]OFFSET[.][b]]" now works + even without --traditional. This is a change in behavior if there + are one or two operands and the last one begins with +, or if + there are two operands and the latter one begins with a digit. + For example, "od foo 10" and "od +10" now treat the last operand as + an offset, not as a file name. + + -h is no longer documented, and may be withdrawn in future versions. + Use -x or -t x2 instead. + + -i is now equivalent to -t dI (not -t d2), and + -l is now equivalent to -t dL (not -t d4). + + -s is now equivalent to -t d2. The old "-s[NUM]" or "-s NUM" + option has been renamed to "-S NUM". + + The default output format is now -t oS, not -t o2, i.e., short int + rather than two-byte int. This makes a difference only on hosts like + Cray systems where the C short int type requires more than two bytes. + + The stat option --filesystem has been renamed to --file-system, for + consistency with POSIX "file system" and with cp and du --one-file-system. + +** Removed features + + md5sum and sha1sum's undocumented --string option has been removed. + + tail's undocumented --max-consecutive-size-changes option has been removed. + +* Major changes in release 5.2.1 (2004-03-12) [stable] + +** Bug fixes + + mv could mistakenly fail to preserve hard links when moving two + or more arguments between partitions. + + `cp --sparse=always F /dev/hdx' no longer tries to use lseek to create + holes in the destination. + + nohup now sets the close-on-exec flag for its copy of the stderr file + descriptor. This avoids some nohup-induced hangs. For example, before + this change, if you ran `ssh localhost', then `nohup sleep 600 </dev/null &', + and then exited that remote shell, the ssh session would hang until the + 10-minute sleep terminated. With the fixed nohup, the ssh session + terminates immediately. + + `expr' now conforms to POSIX better: + + Integers like -0 and 00 are now treated as zero. + + The `|' operator now returns 0, not its first argument, if both + arguments are null or zero. E.g., `expr "" \| ""' now returns 0, + not the empty string. + + The `|' and `&' operators now use short-circuit evaluation, e.g., + `expr 1 \| 1 / 0' no longer reports a division by zero. + +** New features + + `chown user.group file' now has its traditional meaning even when + conforming to POSIX 1003.1-2001, so long as no user has a name + containing `.' that happens to equal `user.group'. + + +* Major changes in release 5.2.0 (2004-02-19) [stable] + +** Bug fixes + + none + + +* Major changes in release 5.1.3 (2004-02-08): candidate to become stable 5.2.0 + +** Bug fixes + + `cp -d' now works as required even on systems like OSF V5.1 that + declare stat and lstat as `static inline' functions. + + time stamps output by stat now include actual fractional seconds, + when available -- or .0000000 for files without that information. + + seq no longer infloops when printing 2^31 or more numbers. + For reference, seq `echo 2^31|bc` > /dev/null takes about one hour + on a 1.6 GHz Athlon 2000 XP. Now it can output 2^53-1 numbers before + misbehaving. + +* Major changes in release 5.1.2 (2004-01-25): + +** Bug fixes + + rmdir -p exits with status 1 on error; formerly it sometimes exited + with status 0 when given more than one argument. + + nohup now always exits with status 127 when it finds an error, + as POSIX requires; formerly it sometimes exited with status 1. + + Several programs (including cut, date, dd, env, hostname, nl, pr, + stty, and tr) now always exit with status 1 when they find an error; + formerly they sometimes exited with status 2. + + factor no longer reports a usage error if stdin has the wrong format. + + paste no longer infloops on ppc systems (bug introduced in 5.1.1) + + +* Major changes in release 5.1.1 (2004-01-17): + +** Configuration option + + You can select the default level of POSIX conformance at configure-time, + e.g., by ./configure DEFAULT_POSIX2_VERSION=199209 + +** Bug fixes + + fold -s works once again on systems with differing sizes for int + and size_t (bug introduced in 5.1.0) + +** New features + + touch -r now specifies the origin for any relative times in the -d + operand, if both options are given. For example, "touch -r FOO -d + '-5 seconds' BAR" sets BAR's modification time to be five seconds + before FOO's. + + join: The obsolete options "-j1 FIELD", "-j2 FIELD", and + "-o LIST1 LIST2..." are no longer supported on POSIX 1003.1-2001 systems. + Portable scripts should use "-1 FIELD", "-2 FIELD", and + "-o LIST1,LIST2..." respectively. If join was compiled on a + POSIX 1003.1-2001 system, you may enable the old behavior + by setting _POSIX2_VERSION=199209 in your environment. + + +* Major changes in release 5.1.0 (2003-12-21): + +** New features + + chgrp, chmod, and chown can now process (with -R) hierarchies of virtually + unlimited depth. Before, they would fail to operate on any file they + encountered with a relative name of length PATH_MAX (often 4096) or longer. + + chgrp, chmod, chown, and rm accept the new options: + --preserve-root, --no-preserve-root (default) + + chgrp and chown now accept POSIX-mandated -L, -H, and -P options + + du can now process hierarchies of virtually unlimited depth. + Before, du was limited by the user's stack size and it would get a + stack overflow error (often a segmentation fault) when applied to + a hierarchy of depth around 30,000 or larger. + + du works even when run from an inaccessible directory + + du -D now dereferences all symlinks specified on the command line, + not just the ones that reference directories + + du now accepts -P (--no-dereference), for compatibility with du + of NetBSD and for consistency with e.g., chown and chgrp + + du's -H option will soon have the meaning required by POSIX + (--dereference-args, aka -D) rather then the current meaning of --si. + Now, using -H elicits a warning to that effect. + + When given -l and similar options, ls now adjusts the output column + widths to fit the data, so that output lines are shorter and have + columns that line up better. This may adversely affect shell + scripts that expect fixed-width columns, but such shell scripts were + not portable anyway, even with old GNU ls where the columns became + ragged when a datum was too wide. + + du accepts a new option, -0/--null, to make it produce NUL-terminated + output lines + +** Bug fixes + + printf, seq, tail, and sleep now parse floating-point operands + and options in the C locale. POSIX requires this for printf. + + od -c -w9999999 no longer segfaults + + csplit no longer reads from freed memory (dumping core on some systems) + + csplit would mistakenly exhaust virtual memory in some cases + + ls --width=N (for very large N) is no longer subject to an address + arithmetic bug that could result in bounds violations. + + ls --width=N (with -x or -C) no longer allocates more space + (potentially much more) than necessary for a given directory. + + dd `unblock' and `sync' may now be combined (e.g., dd conv=unblock,sync) + +* Major changes in release 5.0.91 (2003-09-08): + +** New features + + date accepts a new option --rfc-2822, an alias for --rfc-822. + + split accepts a new option -d or --numeric-suffixes. + + cp, install, mv, and touch now preserve microsecond resolution on + file timestamps, on platforms that have the 'utimes' system call. + Unfortunately there is no system call yet to preserve file + timestamps to their full nanosecond resolution; microsecond + resolution is the best we can do right now. + + sort now supports the zero byte (NUL) as a field separator; use -t '\0'. + The -t '' option, which formerly had no effect, is now an error. + + sort option order no longer matters for the options -S, -d, -i, -o, and -t. + Stronger options override weaker, and incompatible options are diagnosed. + + `sha1sum --check' now accepts the BSD format for SHA1 message digests + in addition to the BSD format for MD5 ones. + + who -l now means `who --login', not `who --lookup', per POSIX. + who's -l option has been eliciting an unconditional warning about + this impending change since sh-utils-2.0.12 (April 2002). + +** Bug fixes + + Mistakenly renaming a file onto itself, e.g., via `mv B b' when `B' is + the same directory entry as `b' no longer destroys the directory entry + referenced by both `b' and `B'. Note that this would happen only on + file systems like VFAT where two different names may refer to the same + directory entry, usually due to lower->upper case mapping of file names. + Now, the above can happen only on file systems that perform name mapping and + that support hard links (stat.st_nlink > 1). This mitigates the problem + in two ways: few file systems appear to be affected (hpfs and ntfs are), + when the bug is triggered, mv no longer removes the last hard link to a file. + *** ATTENTION ***: if you know how to distinguish the following two cases + without writing to the file system in question, please let me know: + 1) B and b refer to the same directory entry on a file system like NTFS + (B may well have a link count larger than 1) + 2) B and b are hard links to the same file + + stat no longer overruns a buffer for format strings ending in `%' + + fold -s -wN would infloop for N < 8 with TABs in the input. + E.g., this would not terminate: printf 'a\t' | fold -w2 -s + + `split -a0', although of questionable utility, is accepted once again. + + `df DIR' used to hang under some conditions on OSF/1 5.1. Now it doesn't. + + seq's --width (-w) option now works properly even when the endpoint + requiring the larger width is negative and smaller than the other endpoint. + + seq's default step is 1, even if LAST < FIRST. + + paste no longer mistakenly outputs 0xFF bytes for a nonempty input file + without a trailing newline. + + `tail -n0 -f FILE' and `tail -c0 -f FILE' no longer perform what amounted + to a busy wait, rather than sleeping between iterations. + + tail's long-undocumented --allow-missing option now elicits a warning + + +* Major changes in release 5.0.90 (2003-07-29): + +** New features + + sort is now up to 30% more CPU-efficient in some cases + + `test' is now more compatible with Bash and POSIX: + + `test -t', `test --help', and `test --version' now silently exit + with status 0. To test whether standard output is a terminal, use + `test -t 1'. To get help and version info for `test', use + `[ --help' and `[ --version'. + + `test' now exits with status 2 (not 1) if there is an error. + + wc count field widths now are heuristically adjusted depending on the input + size, if known. If only one count is printed, it is guaranteed to + be printed without leading spaces. + + Previously, wc did not align the count fields if POSIXLY_CORRECT was set, + but POSIX did not actually require this undesirable behavior, so it + has been removed. + +** Bug fixes + + kill no longer tries to operate on argv[0] (introduced in 5.0.1) + Why wasn't this noticed? Although many tests use kill, none of + them made an effort to avoid using the shell's built-in kill. + + `[' invoked with no arguments no longer evokes a segfault + + rm without --recursive (aka -r or -R) no longer prompts regarding + unwritable directories, as required by POSIX. + + uniq -c now uses a SPACE, not a TAB between the count and the + corresponding line, as required by POSIX. + + expr now exits with status 2 if the expression is syntactically valid, + and with status 3 if an error occurred. POSIX requires this. + + expr now reports trouble if string comparison fails due to a collation error. + + split now generates suffixes properly on EBCDIC hosts. + + split -a0 now works, as POSIX requires. + + `sort --version' and `sort --help' fail, as they should + when their output is redirected to /dev/full. + + `su --version > /dev/full' now fails, as it should. + +** Fewer arbitrary limitations + + cut requires 97% less memory when very large field numbers or + byte offsets are specified. + + +* Major changes in release 5.0.1 (2003-07-15): + +** New programs +- new program: `[' (much like `test') + +** New features +- head now accepts --lines=-N (--bytes=-N) to print all but the + N lines (bytes) at the end of the file +- md5sum --check now accepts the output of the BSD md5sum program, e.g., + MD5 (f) = d41d8cd98f00b204e9800998ecf8427e +- date -d DATE can now parse a DATE string like May-23-2003 +- chown: `.' is no longer recognized as a separator in the OWNER:GROUP + specifier on POSIX 1003.1-2001 systems. If chown *was not* compiled + on such a system, then it still accepts `.', by default. If chown + was compiled on a POSIX 1003.1-2001 system, then you may enable the + old behavior by setting _POSIX2_VERSION=199209 in your environment. +- chown no longer tries to preserve set-user-ID and set-group-ID bits; + on some systems, the chown syscall resets those bits, and previous + versions of the chown command would call chmod to restore the original, + pre-chown(2) settings, but that behavior is problematic. + 1) There was a window whereby a malicious user, M, could subvert a + chown command run by some other user and operating on files in a + directory where M has write access. + 2) Before (and even now, on systems with chown(2) that doesn't reset + those bits), an unwary admin. could use chown unwittingly to create e.g., + a set-user-ID root copy of /bin/sh. + +** Bug fixes +- chown --dereference no longer leaks a file descriptor per symlink processed +- `du /' once again prints the `/' on the last line +- split's --verbose option works once again [broken in 4.5.10 and 5.0] +- tail -f is no longer subject to a race condition that could make it + delay displaying the last part of a file that had stopped growing. That + bug could also make tail -f give an unwarranted `file truncated' warning. +- du no longer runs out of file descriptors unnecessarily +- df and `readlink --canonicalize' no longer corrupt the heap on + non-glibc, non-solaris systems +- `env -u UNSET_VARIABLE' no longer dumps core on non-glibc systems +- readlink's --canonicalize option now works on systems like Solaris that + lack the canonicalize_file_name function but do have resolvepath. +- mv now removes `a' in this example on all systems: touch a; ln a b; mv a b + This behavior is contrary to POSIX (which requires that the mv command do + nothing and exit successfully), but I suspect POSIX will change. +- date's %r format directive now honors locale settings +- date's `-' (no-pad) format flag now affects the space-padded-by-default + conversion specifiers, %e, %k, %l +- fmt now diagnoses invalid obsolescent width specifications like `-72x' +- fmt now exits nonzero when unable to open an input file +- tsort now fails when given an odd number of input tokens, + as required by POSIX. Before, it would act as if the final token + appeared one additional time. + +** Fewer arbitrary limitations +- tail's byte and line counts are no longer limited to OFF_T_MAX. + Now the limit is UINTMAX_MAX (usually 2^64). +- split can now handle --bytes=N and --lines=N with N=2^31 or more. + +** Portability +- `kill -t' now prints signal descriptions (rather than `?') on systems + like Tru64 with __sys_siglist but no strsignal function. +- stat.c now compiles on Ultrix systems +- sleep now works on AIX systems that lack support for clock_gettime +- rm now works around Darwin6.5's broken readdir function + Before `rm -rf DIR' would fail to remove all files in DIR + if there were more than 338. + +* Major changes in release 5.0 (2003-04-02): +- false --help now exits nonzero + +[4.5.12] +* printf no longer treats \x specially when POSIXLY_CORRECT is set +* printf avoids buffer overrun with format ending in a backslash and +* printf avoids buffer overrun with incomplete conversion specifier +* printf accepts multiple flags in a single conversion specifier + +[4.5.11] +* seq no longer requires that a field width be specified +* seq no longer fails when given a field width of `0' +* seq now accepts ` ' and `'' as valid format flag characters +* df now shows a HOSTNAME: prefix for each remote-mounted file system on AIX 5.1 +* portability tweaks for HP-UX, AIX 5.1, DJGPP + +[4.5.10] +* printf no longer segfaults for a negative field width or precision +* shred now always enables --exact for non-regular files +* du no longer lists hard-linked files more than once +* du no longer dumps core on some systems due to `infinite' recursion + via nftw's use of the buggy replacement function in getcwd.c +* portability patches for a few vendor compilers and 64-bit systems +* du -S *really* now works like it did before the change in 4.5.5 + +[4.5.9] +* du no longer truncates file sizes or sums to fit in 32-bit size_t +* work around Linux kernel bug in getcwd (fixed in 2.4.21-pre4), so that pwd + now fails if the name of the working directory is so long that getcwd + truncates it. Before it would print the truncated name and exit successfully. +* `df /some/mount-point' no longer hangs on a GNU libc system when another + hard-mounted NFS file system (preceding /some/mount-point in /proc/mounts) + is inaccessible. +* rm -rf now gives an accurate diagnostic when failing to remove a file + under certain unusual conditions +* mv and `cp --preserve=links' now preserve multiple hard links even under + certain unusual conditions where they used to fail + +[4.5.8] +* du -S once again works like it did before the change in 4.5.5 +* stat accepts a new file format, %B, for the size of each block reported by %b +* du accepts new option: --apparent-size +* du --bytes (-b) works the same way it did in fileutils-3.16 and before +* du reports proper sizes for directories (not zero) (broken in 4.5.6 or 4.5.7) +* df now always displays under `Filesystem', the device file name + corresponding to the listed mount point. Before, for a block- or character- + special file command line argument, df would display that argument. E.g., + `df /dev/hda' would list `/dev/hda' as the `Filesystem', rather than say + /dev/hda3 (the device on which `/' is mounted), as it does now. +* test now works properly when invoked from a set user ID or set group ID + context and when testing access to files subject to alternate protection + mechanisms. For example, without this change, a set-UID program that invoked + `test -w F' (to see if F is writable) could mistakenly report that it *was* + writable, even though F was on a read-only file system, or F had an ACL + prohibiting write access, or F was marked as immutable. + +[4.5.7] +* du would fail with more than one DIR argument when any but the last did not + contain a slash (due to a bug in ftw.c) + +[4.5.6] +* du no longer segfaults on Solaris systems (fixed heap-corrupting bug in ftw.c) +* du --exclude=FILE works once again (this was broken by the rewrite for 4.5.5) +* du no longer gets a failed assertion for certain hierarchy lay-outs + involving hard-linked directories +* `who -r' no longer segfaults when using non-C-locale messages +* df now displays a mount point (usually `/') for non-mounted + character-special and block files + +[4.5.5] +* ls --dired produces correct byte offset for file names containing + nonprintable characters in a multibyte locale +* du has been rewritten to use a variant of GNU libc's ftw.c +* du now counts the space associated with a directory's directory entry, + even if it cannot list or chdir into that subdirectory. +* du -S now includes the st_size of each entry corresponding to a subdirectory +* rm on FreeBSD can once again remove directories from NFS-mounted file systems +* ls has a new option --dereference-command-line-symlink-to-dir, which + corresponds to the new default behavior when none of -d, -l -F, -H, -L + has been specified. +* ls dangling-symlink now prints `dangling-symlink'. + Before, it would fail with `no such file or directory'. +* ls -s symlink-to-non-dir and ls -i symlink-to-non-dir now print + attributes of `symlink', rather than attributes of their referents. +* Fix a bug introduced in 4.5.4 that made it so that ls --color would no + longer highlight the names of files with the execute bit set when not + specified on the command line. +* shred's --zero (-z) option no longer gobbles up any following argument. + Before, `shred --zero file' would produce `shred: missing file argument', + and worse, `shred --zero f1 f2 ...' would appear to work, but would leave + the first file untouched. +* readlink: new program +* cut: new feature: when used to select ranges of byte offsets (as opposed + to ranges of fields) and when --output-delimiter=STRING is specified, + output STRING between ranges of selected bytes. +* rm -r can no longer be tricked into mistakenly reporting a cycle. +* when rm detects a directory cycle, it no longer aborts the entire command, + but rather merely stops processing the affected command line argument. + +[4.5.4] +* cp no longer fails to parse options like this: --preserve=mode,ownership +* `ls --color -F symlink-to-dir' works properly +* ls is much more efficient on directories with valid dirent.d_type. +* stty supports all baud rates defined in linux-2.4.19. +* `du symlink-to-dir/' would improperly remove the trailing slash +* `du ""' would evoke a bounds violation. +* In the unlikely event that running `du /' resulted in `stat ("/", ...)' + failing, du would give a diagnostic about `' (empty string) rather than `/'. +* printf: a hexadecimal escape sequence has at most two hex. digits, not three. +* The following features have been added to the --block-size option + and similar environment variables of df, du, and ls. + - A leading "'" generates numbers with thousands separators. + For example: + $ ls -l --block-size="'1" file + -rw-rw-r-- 1 eggert src 47,483,707 Sep 24 23:40 file + - A size suffix without a leading integer generates a suffix in the output. + For example: + $ ls -l --block-size="K" + -rw-rw-r-- 1 eggert src 46371K Sep 24 23:40 file +* ls's --block-size option now affects file sizes in all cases, not + just for --block-size=human-readable and --block-size=si. Fractional + sizes are now always rounded up, for consistency with df and du. +* df now displays the block size using powers of 1000 if the requested + block size seems to be a multiple of a power of 1000. +* nl no longer gets a segfault when run like this `yes|nl -s%n' + +[4.5.3] +* du --dereference-args (-D) no longer fails in certain cases +* `ln --target-dir=DIR' no longer fails when given a single argument + +[4.5.2] +* `rm -i dir' (without --recursive (-r)) no longer recurses into dir +* `tail -c N FILE' now works with files of size >= 4GB +* `mkdir -p' can now create very deep (e.g. 40,000-component) directories +* rmdir -p dir-with-trailing-slash/ no longer fails +* printf now honors the `--' command line delimiter +* od's 8-byte formats x8, o8, and u8 now work +* tail now accepts fractional seconds for its --sleep-interval=S (-s) option + +[4.5.1] +* du and ls now report sizes of symbolic links (before they'd always report 0) +* uniq now obeys the LC_COLLATE locale, as per POSIX 1003.1-2001 TC1. + +======================================================================== +Here are the NEWS entries made from fileutils-4.1 until the +point at which the packages merged to form the coreutils: + +[4.1.11] +* `rm symlink-to-unwritable' doesn't prompt [introduced in 4.1.10] +[4.1.10] +* rm once again gives a reasonable diagnostic when failing to remove a file + owned by someone else in a sticky directory [introduced in 4.1.9] +* df now rounds all quantities up, as per POSIX. +* New ls time style: long-iso, which generates YYYY-MM-DD HH:MM. +* Any time style can be preceded by "posix-"; this causes "ls" to + use traditional timestamp format when in the POSIX locale. +* The default time style is now posix-long-iso instead of posix-iso. + Set TIME_STYLE="posix-iso" to revert to the behavior of 4.1.1 thru 4.1.9. +* `rm dangling-symlink' doesn't prompt [introduced in 4.1.9] +* stat: remove support for --secure/-s option and related %S and %C format specs +* stat: rename --link/-l to --dereference/-L. + The old options will continue to work for a while. +[4.1.9] +* rm can now remove very deep hierarchies, in spite of any limit on stack size +* new programs: link, unlink, and stat +* New ls option: --author (for the Hurd). +* `touch -c no-such-file' no longer fails, per POSIX +[4.1.8] +* mv no longer mistakenly creates links to preexisting destination files + that aren't moved +[4.1.7] +* rm: close a hole that would allow a running rm process to be subverted +[4.1.6] +* New cp option: --copy-contents. +* cp -r is now equivalent to cp -R. Use cp -R -L --copy-contents to get the + traditional (and rarely desirable) cp -r behavior. +* ls now accepts --time-style=+FORMAT, where +FORMAT works like date's format +* The obsolete usage `touch [-acm] MMDDhhmm[YY] FILE...' is no longer + supported on systems conforming to POSIX 1003.1-2001. Use touch -t instead. +* cp and inter-partition mv no longer give a misleading diagnostic in some + unusual cases +[4.1.5] +* cp -r no longer preserves symlinks +* The block size notation is now compatible with SI and with IEC 60027-2. + For example, --block-size=1MB now means --block-size=1000000, + whereas --block-size=1MiB now means --block-size=1048576. + A missing `B' (e.g. `1M') has the same meaning as before. + A trailing `B' now means decimal, not binary; this is a silent change. + The nonstandard `D' suffix (e.g. `1MD') is now obsolescent. +* -H or --si now outputs the trailing 'B', for consistency with the above. +* Programs now output trailing 'K' (not 'k') to mean 1024, as per IEC 60027-2. +* New df, du short option -B is short for --block-size. +* You can omit an integer `1' before a block size suffix, + e.g. `df -BG' is equivalent to `df -B 1G' and to `df --block-size=1G'. +* The following options are now obsolescent, as their names are + incompatible with IEC 60027-2: + df, du: -m or --megabytes (use -BM or --block-size=1M) + df, du, ls: --kilobytes (use --block-size=1K) +[4.1.4] +* df --local no longer lists smbfs file systems whose name starts with // +* dd now detects the Linux/tape/lseek bug at run time and warns about it. +[4.1.3] +* ls -R once again outputs a blank line between per-directory groups of files. + This was broken by the cycle-detection change in 4.1.1. +* dd once again uses `lseek' on character devices like /dev/mem and /dev/kmem. + On systems with the linux kernel (at least up to 2.4.16), dd must still + resort to emulating `skip=N' behavior using reads on tape devices, because + lseek has no effect, yet appears to succeed. This may be a kernel bug. +[4.1.2] +* cp no longer fails when two or more source files are the same; + now it just gives a warning and doesn't copy the file the second time. + E.g., cp a a d/ produces this: + cp: warning: source file `a' specified more than once +* chmod would set the wrong bit when given symbolic mode strings like + these: g=o, o=g, o=u. E.g., `chmod a=,o=w,ug=o f' would give a mode + of --w-r---w- rather than --w--w--w-. +[4.1.1] +* mv (likewise for cp), now fails rather than silently clobbering one of + the source files in the following example: + rm -rf a b c; mkdir a b c; touch a/f b/f; mv a/f b/f c +* ls -R detects directory cycles, per POSIX. It warns and doesn't infloop. +* cp's -P option now means the same as --no-dereference, per POSIX. + Use --parents to get the old meaning. +* When copying with the -H and -L options, cp can preserve logical + links between source files with --preserve=links +* cp accepts new options: + --preserve[={mode,ownership,timestamps,links,all}] + --no-preserve={mode,ownership,timestamps,links,all} +* cp's -p and --preserve options remain unchanged and are equivalent + to `--preserve=mode,ownership,timestamps' +* mv and cp accept a new option: --reply={yes,no,query}; provides a consistent + mechanism to control whether one is prompted about certain existing + destination files. Note that cp's and mv's -f options don't have the + same meaning: cp's -f option no longer merely turns off `-i'. +* remove portability limitations (e.g., PATH_MAX on the Hurd, fixes for + 64-bit systems) +* mv now prompts before overwriting an existing, unwritable destination file + when stdin is a tty, unless --force (-f) is specified, as per POSIX. +* mv: fix the bug whereby `mv -uf source dest' would delete source, + even though it's older than dest. +* chown's --from=CURRENT_OWNER:CURRENT_GROUP option now works +* cp now ensures that the set-user-ID and set-group-ID bits are cleared for + the destination file when when copying and not preserving permissions. +* `ln -f --backup k k' gives a clearer diagnostic +* ls no longer truncates user names or group names that are longer + than 8 characters. +* ls's new --dereference-command-line option causes it to dereference + symbolic links on the command-line only. It is the default unless + one of the -d, -F, or -l options are given. +* ls -H now means the same as ls --dereference-command-line, as per POSIX. +* ls -g now acts like ls -l, except it does not display owner, as per POSIX. +* ls -n now implies -l, as per POSIX. +* ls can now display dates and times in one of four time styles: + + - The `full-iso' time style gives full ISO-style time stamps like + `2001-05-14 23:45:56.477817180 -0700'. + - The 'iso' time style gives ISO-style time stamps like '2001-05-14 ' + and '05-14 23:45'. + - The 'locale' time style gives locale-dependent time stamps like + 'touko 14 2001' and 'touko 14 23:45' (in a Finnish locale). + - The 'posix-iso' time style gives traditional POSIX-locale + time stamps like 'May 14 2001' and 'May 14 23:45' unless the user + specifies a non-POSIX locale, in which case it uses ISO-style dates. + This is the default. + + You can specify a time style with an option like --time-style='iso' + or with an environment variable like TIME_STYLE='iso'. GNU Emacs 21 + and later can parse ISO dates, but older Emacs versions cannot, so + if you are using an older version of Emacs outside the default POSIX + locale, you may need to set TIME_STYLE="locale". + +* --full-time is now an alias for "-l --time-style=full-iso". + + +======================================================================== +Here are the NEWS entries made from sh-utils-2.0 until the +point at which the packages merged to form the coreutils: + + [2.0.15] +* date no longer accepts e.g., September 31 in the MMDDhhmm syntax +* fix a bug in this package's .m4 files and in configure.ac + [2.0.14] +* nohup's behavior is changed as follows, to conform to POSIX 1003.1-2001: + - nohup no longer adjusts scheduling priority; use "nice" for that. + - nohup now redirects stderr to stdout, if stderr is not a terminal. + - nohup exit status is now 126 if command was found but not invoked, + 127 if nohup failed or if command was not found. + [2.0.13] +* uname and uptime work better on *BSD systems +* pathchk now exits nonzero for a path with a directory component + that specifies a non-directory + [2.0.12] +* kill: new program +* who accepts new options: --all (-a), --boot (-b), --dead (-d), --login, + --process (-p), --runlevel (-r), --short (-s), --time (-t), --users (-u). + The -u option now produces POSIX-specified results and is the same as + the long option `--users'. --idle is no longer the same as -u. +* The following changes apply on systems conforming to POSIX 1003.1-2001, + and are required by the new POSIX standard: + - `date -I' is no longer supported. Instead, use `date --iso-8601'. + - `nice -NUM' is no longer supported. Instead, use `nice -n NUM'. +* New 'uname' options -i or --hardware-platform, and -o or --operating-system. + 'uname -a' now outputs -i and -o information at the end. + New uname option --kernel-version is an alias for -v. + Uname option --release has been renamed to --kernel-release, + and --sysname has been renamed to --kernel-name; + the old options will work for a while, but are no longer documented. +* 'expr' now uses the LC_COLLATE locale for string comparison, as per POSIX. +* 'expr' now requires '+' rather than 'quote' to quote tokens; + this removes an incompatibility with POSIX. +* date -d 'last friday' would print a date/time that was one hour off + (e.g., 23:00 on *thursday* rather than 00:00 of the preceding friday) + when run such that the current time and the target date/time fall on + opposite sides of a daylight savings time transition. + This problem arose only with relative date strings like `last monday'. + It was not a problem with strings that include absolute dates. +* factor is twice as fast, for large numbers + [2.0.11] +* setting the date now works properly, even when using -u +* `date -f - < /dev/null' no longer dumps core +* some DOS/Windows portability changes + [2.0j] +* `date -d DATE' now parses certain relative DATEs correctly + [2.0i] +* fixed a bug introduced in 2.0h that made many programs fail with a + `write error' when invoked with the --version option + [2.0h] +* all programs fail when printing --help or --version output to a full device +* printf exits nonzero upon write failure +* yes now detects and terminates upon write failure +* date --rfc-822 now always emits day and month names from the `C' locale +* portability tweaks for Solaris8, Ultrix, and DOS + [2.0g] +* date now handles two-digit years with leading zeros correctly. +* printf interprets unicode, \uNNNN \UNNNNNNNN, on systems with the + required support; from Bruno Haible. +* stty's rprnt attribute now works on HPUX 10.20 +* seq's --equal-width option works more portably + [2.0f] +* fix build problems with ut_name vs. ut_user + [2.0e] +* stty: fix long-standing bug that caused test failures on at least HPUX + systems when COLUMNS was set to zero +* still more portability fixes +* unified lib/: now that directory and most of the configuration framework + is common between fileutils, textutils, and sh-utils + [2.0d] +* fix portability problem with sleep vs lib/strtod.c's requirement for -lm + [2.0c] +* fix portability problems with nanosleep.c and with the new code in sleep.c + [2.0b] +* Regenerate lib/Makefile.in so that nanosleep.c is distributed. + [2.0a] +* sleep accepts floating point arguments on command line +* sleep's clock continues counting down when sleep is suspended +* when a suspended sleep process is resumed, it continues sleeping if + there is any time remaining +* who once again prints whatever host information it has, even without --lookup + +======================================================================== +For older NEWS entries for the fileutils, textutils, and sh-utils +packages, see ./old/*/NEWS. + + This package began as the union of the following: + textutils-2.1, fileutils-4.1.11, sh-utils-2.0.15. diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/README b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/README new file mode 100644 index 0000000..64a565c --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/README @@ -0,0 +1,167 @@ +These are the GNU core utilities. This package is the union of +the GNU fileutils, sh-utils, and textutils packages. + +Most of these programs have significant advantages over their Unix +counterparts, such as greater speed, additional options, and fewer +arbitrary limits. + +The programs that can be built with this package are: + + [ basename cat chgrp chmod chown chroot cksum comm cp csplit cut date dd + df dir dircolors dirname du echo env expand expr factor false fmt fold + ginstall groups head hostid hostname id join kill link ln logname ls + md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr + printenv printf ptx pwd readlink rm rmdir seq sha1sum shred sleep sort + split stat stty su sum sync tac tail tee test touch tr true tsort tty + uname unexpand uniq unlink uptime users vdir wc who whoami yes + +See the file NEWS for a list of major changes in the current release. + +See the file INSTALL for compilation and installation instructions. + +These programs are intended to conform to POSIX (with BSD and other +extensions), like the rest of the GNU system. By default they conform +to older POSIX (1003.2-1992), and therefore support obsolete usages +like "head -10" and "chown owner.group file". This default is +overridden at build-time by the value of <unistd.h>'s _POSIX2_VERSION +macro, and this in turn can be overridden at runtime as described in +the documentation under "Standards conformance". + +The ls, dir, and vdir commands are all separate executables instead of +one program that checks argv[0] because people often rename these +programs to things like gls, gnuls, l, etc. Renaming a program +file shouldn't affect how it operates, so that people can get the +behavior they want with whatever name they want. + +Special thanks to Paul Eggert, Brian Matthews, Bruce Evans, Karl Berry, +Kaveh Ghazi, and François Pinard for help with debugging and porting +these programs. Many thanks to all of the people who have taken the +time to submit problem reports and fixes. All contributed changes are +attributed in the ChangeLog files. + +And thanks to the following people who have provided accounts for +portability testing on many different types of systems: Bob Proulx, +Christian Robert, François Pinard, Greg McGary, Harlan Stenn, +Joel N. Weber, Mark D. Roth, Matt Schalit, Nelson H. F. Beebe, +Réjean Payette, Sam Tardieu. + +Thanks to Michael Stone for inflicting test releases of this package +on Debian's unstable distribution, and to all the kind folks who used +that distribution and found and reported bugs. + +Note that each man page is now automatically generated from a template +and from the corresponding --help usage message. Patches to the template +files (man/*.x) are welcome. However, the authoritative documentation +is in texinfo form in the doc directory. + +If you run the tests on a SunOS4.1.4 system, expect the ctime-part of +the ls `time-1' test to fail. I believe that is due to a bug in the +way Sun implemented link(2) and chmod(2). + +*********************** +HPUX 11.x build failure +----------------------- + +A known problem exists when compiling on HPUX on both hppa and ia64 +in 64-bit mode (i.e. +DD64) on HP-UX 11.0, 11.11, and 11.23. This +is not due to a bug in the package but instead due to a bug in the +system header file which breaks things in 64-bit mode. The default +compilation mode is 32-bit and the software compiles fine using the +default mode. To build this software in 64-bit mode you will need +to fix the system /usr/include/inttypes.h header file. After +correcting that file the software also compiles fine in 64-bit mode. +Here is one possible patch to correct the problem: + +--- /usr/include/inttypes.h.orig Thu May 30 01:00:00 1996 ++++ /usr/include/inttypes.h Sun Mar 23 00:20:36 2003 +@@ -489 +489 @@ +-#ifndef __STDC_32_MODE__ ++#ifndef __LP64__ + + +********************** +Running tests as root: +---------------------- + +If you run the tests as root, note that a few of them create files +and/or run programs as a non-root user, `nobody' by default. +If you want to use some other non-root username, specify it via +the NON_ROOT_USERNAME environment variable. Depending on the +permissions with which the working directories have been created, +using `nobody' may fail, because that user won't have the required +read and write access to the build and test directories. +I find that it is best to unpack and build as a non-privileged +user, and then to run the following command as that user in order +to run the privilege-requiring tests: + + sudo env NON_ROOT_USERNAME=$USER make -k check + +If you can run the tests as root, please do so and report any +problems. We get much less test coverage in that mode, and it's +arguably more important that these tools work well when run by +root than when run by less privileged users. + + +*************** +Reporting bugs: +--------------- + +IMPORTANT: if you take the time to report a test failure, +please be sure to include the output of running `make check' +in verbose mode for each each failing test. For example, +if the test that fails is tests/mv/hard-link-1, then you +would run this command: + + env VERBOSE=yes make check -C tests/mv TESTS=hard-link-1 >> log 2>&1 + +and then include the contents of the file `log' in your bug report. + +*************************************** + +There are pretty many tests, but nowhere near as many as we need. +Additions and corrections are very welcome. + +If you see a problem that you've already reported, feel free to re-report +it -- it won't bother me to get a reminder. Besides, the more messages I +get regarding a particular problem the sooner it'll be fixed -- usually. +If you sent a complete patch and, after a couple weeks you haven't +received any acknowledgement, please ping us. A complete patch includes +a well-written ChangeLog entry, unified (diff -u format) diffs relative +to the most recent test release (or, better, relative to the latest +sources in the CVS repository), an explanation for why the patch is +necessary or useful, and if at all possible, enough information to +reproduce whatever problem prompted it. Plus, you'll earn lots of +karma if you include a test case to exercise any bug(s) you fix. +Instructions for checking out the latest source via CVS are here: + + http://savannah.gnu.org/cvs/?group=coreutils + + +If your patch adds a new feature, please try to get some sort of consensus +that it is a worthwhile change. One way to do that is to send mail to +bug-coreutils@gnu.org including as much description and justification +as you can. Based on the feedback that generates, you may be able to +convince us that it's worth adding. + + +WARNING: If you modify files like configure.in, m4/*.m4, aclocal.m4, +or any Makefile.am, then don't be surprised if what gets regenerated no +longer works. To make things work, you'll have to be using appropriate +versions of automake and autoconf. As for what versions are `appropriate', +use the versions of + + * autoconf specified via AC_PREREQ in m4/jm-macros.m4 + * automake specified via AM_INIT_AUTOMAKE in configure.ac + +Usually it's fine to use versions that are newer than those specified. + +All of these programs except `test' recognize the `--version' option. +When reporting bugs, please include in the subject line both the package +name/version and the name of the program for which you found a problem. + +For general documentation on the coding and usage standards +this distribution follows, see the GNU Coding Standards, +http://www.gnu.org/prep/standards_toc.html. + +Mail suggestions and bug reports for these programs to +the address on the last line of --help output. diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/THANKS b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/THANKS new file mode 100644 index 0000000..1004b9e --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/THANKS @@ -0,0 +1,471 @@ +These people have contributed to the GNU coreutils (formerly, the fileutils, +textutils, and/or sh-utils packages). Some have reported problems, others +have contributed improvements to the documentation, actual code, and even +complete programs. Those contributions are described in the ChangeLog +files. If your name has been left out, if you'd rather not be listed, +or if you'd prefer a different address be used, please send a note to +the bug-report mailing list (as seen on last line of e.g., cp --help). + +??? kytek@cybercomm.net +A Costa agcosta@gis.net +Achim Blumensath blume@corona.oche.de +Adam Klein aklein@debian.org +Akim Demaille demaille@inf.enst.fr +Alain Magloire alain@qnx.com +Alan Iwi iwi@atm.ox.ac.uk +Albert Chin-A-Young china@thewrittenword.com +Albert Hopkins ahopkins@dynacare.com +Alberto Accomazzi alberto@cfa0.harvard.edu +aldomel aldomel@ix.netcom.com +Alen Muzinic zveki@fly.cc.fer.hr +Alexandre Duret-Lutz duret_g@epita.fr +Alexey Solovyov alekso@math.uu.se +Alexey Vyskubov alexey@pippuri.mawhrin.net +Alfred M. Szmidt ams@kemisten.nu +Andi Kleen freitag@alancoxonachip.com +Andre Novaes Cunha Andre.Cunha@br.global-one.net +Andreas Gruenbacher ag@bestbits.at +Andreas Jaeger jaeger@gnu.org +Andreas Luik luik@isa.de +Andreas Schwab schwab@suse.de +Andreas Stolcke stolcke@ICSI.Berkeley.EDU +Andrei Gaponenko andr@triumf.ca +Andres Soolo andres@soolo.matti.ee +Andrew Burgess aab@cichlid.com +Andrew Dalke dalke@bioreason.com +Andrew Fabbro andrew@fabbro.org +Andrew Pham andpha@us.ibm.com +Andrew Tridgell tridge@samba.org +Andrey Borzenkov arvidjaar@mail.ru +Andries Brouwer Andries.Brouwer@cwi.nl +Andy Longton alongton@metamark.com +Anthony Thyssen anthony@griffith.edu.au +Antonio Rendas ajrendas@yahoo.com +Ariel Faigon ariel@cthulhu.engr.sgi.com +Arne H. Juul arnej@solan.unit.no +Arne Henrik Juul arnej@imf.unit.no +Arnold Robbins arnold@skeeve.com +Arthur Pool pool@commerce.uq.edu.au +Arun Sharma arun.sharma@intel.com +Arvind Autar Autar022@planet.nl +Augey Mikus mikus@dqc.org +Austin Donnelly Austin.Donnelly@cl.cam.ac.uk +Axel Kittenberger Anshil@gmx.net +Bauke Jan Douma bjdouma@xs4all.nl +Ben Elliston bje@air.net.au +Ben Harris bjh21@netbsd.org +Benjamin Cutler cutlerbc@simla.colostate.edu +Bengt Martensson bengt@mathematik.uni-Bremen.de +Bernard Giroud bernard.giroud@creditlyonnais.ch +Bernd Leibing bernd.leibing@rz.uni-ulm.de +Bernd Melchers melchers@cis.fu-berlin.de +Bernhard Baehr bernhard.baehr@gmx.de +Bernhard Gabler bernhard@uni-koblenz.de +Bernhard Rosenkraenzer bero@redhat.de +Bert Deknuydt Bert.Deknuydt@esat.kuleuven.ac.be +Bill Peters peters@gaffel.as.arizona.edu +Bjorn Helgaas helgaas@rsn.hp.com +Bob McCracken kerouac@ravenet.com +Bob Proulx rwp@fc.hp.com +Branden Robinson branden@necrotic.deadbeast.net +Brendan O'Dea bod@compusol.com.au +Brian Kimball bfk@footbag.org +Brian Youmans 3diff@gnu.org +Bruce Korb bkorb@veritas.com +Bruce Robertson brucer@theodolite.dyndns.org +Bruno Haible haible@clisp.cons.org +Carl Johnson carlj@cjlinux.home.org +Carl Lowenstein cdl@mpl.UCSD.EDU +Carlos Canau Carlos.Canau@relay.puug.pt +Charles Karney karney@pppl.gov +Charles Randall crandall@matchlogic.com +Chip Salzenberg chip@valinux.com +Chris Faylor cgf@cygnus.com +Chris J. Bednar cjb@AdvancedDataSolutions.com +Chris Lesniewski ctl@mit.edu +Chris Sylvain csylvain@umm.edu +Chris Yeo cyeo@biking.org +Christi Alice Scarborough christi@chiark.greenend.org.uk +Christian Harkort christian.harkort@web.de +Christian Krackowizer ckrackowiz@std.schuler-ag.com +Christian Rose menthos@menthos.com +Christian von Roques roques@pond.sub.org +Chuck Hedrick hedrick@klinzhai.rutgers.edu +Clark Morgan cmorgan@aracnet.com +Clement Wang clem.wang@overture.com +Colin Plumb colin@nyx.net +Colin Watson cjw44@riva.ucam.org +Collin Rogowski collin@rogowski.de +Cray-Cyber Project http://www.cray-cyber.org +Cyril Bouthors cyril@bouthors.org +Dale Scheetz dwarf@polaris.net +Dan Hagerty hag@gnu.ai.it.edu +Dan Jacobson http://www.geocities.com/jidani +Dan Pascu dan@services.iiruc.ro +Daniel Bergstrom noa@melody.se +Dániel Varga danielv@axelero.hu +Danny Levinson danny.levinson@overture.com +Darren Salt ds@youmustbejoking.demon.co.uk +Dave Beckett dajobe@dajobe.org +David Dyck dcd@tc.fluke.COM +David Eisner cradle@umd.edu +David Flynn dav@chess.plus.com +David Godfrey dave@delta.demon.co.uk +David Luyer david_luyer@pacific.net.au +David Malone dwmalone@cnri.dit.ie +Deepak Goel deego@gnufans.org +Dennis Henriksen opus@flamingo.osrl.dk +Dennis Smit ds@nerds-incorporated.org +Derek Clegg dclegg@next.com +Dick Streefland dick_streefland@tasking.com +Dirk Lattermann dlatt@t-online.de +Dirk-Jan Faber djfaber@snow.nl +Dmitry Rutsky rutsky@school.ioffe.rssi.ru +Dmitry V. Levin ldv@altlinux.org +Don Parsons dparsons@synapse.kent.edu +Donni Erpel donald@appc11.gsi.de +Doug Coleman coleman@iarc1.ece.utexas.edu +Doug McLaren dougmc@comco.com +Dragos Harabor dharabor@us.oracle.com +Duncan Roe duncanr@optimation.com.au +Ed Avis ed@membled.com +Edzer Pebesma Edzer.Pebesma@rivm.nl +Eirik Fuller eirik@hackrat.com +Eivind eivindt@multinet.no +Eli Zaretskii eliz@is.elta.co.il +Emile LeBlanc leblanc@math.toronto.edu +Eric Backus ericb@lsid.hp.com +Eric G. Miller egm2@jps.net +Eric Pemente pemente@northpark.edu +Eric S. Raymond esr@snark.thyrsus.com +Erik Bennett bennett@cvo.oneworld.com +Erik Corry erik@kroete2.freinet.de +Felix Lee flee@teleport.com +Ferdinand fw@scenic.mine.nu +Fletcher Mattox fletcher@cs.utexas.edu +Florin Iucha fiucha@hsys.mic.ro +François Pinard pinard@iro.umontreal.ca +Frank Adler fadler@allesklar.de +Frank T Lofaro ftlofaro@snooks.Egr.UNLV.EDU +Fred Fish fnf@ninemoons.com +Frédéric L. W. Meunier 0@pervalidus.net +Frederik Eaton frederik@caltech.edu +Gabor Z. Papp gzp@gzp.org.hu +Gaël Quéri gqueri@mail.dotcom.fr +Galen Hazelwood galenh@micron.net +Gary Anderson ganderson@clark.net +Gary V. Vaughan gary@gnu.org +Gaute Hvoslef Kvalnes gaute@verdsveven.com +Geoff Collyer geoff at collyer.net +Geoff Kuenning geoff@cs.hmc.edu +Geoff Odhner geoff@franklin.com +Geoff Whale geoffw@cse.unsw.EDU.AU +Gerhard Poul gpoul@gnu.org +Germano Leichsenring germano@jedi.cs.kobe-u.ac.jp +Göran Uddeborg goeran@uddeborg.pp.se +GOTO Masanori gotom@debian.or.jp +Greg Louis glouis@dynamicro.on.ca +Greg McGary gkm@gnu.org +Greg Schafer gschafer@zip.com.au +Greg Troxel gdt@bbn.com +Greg Wooledge gawooledge@sherwin.com +Gregory Leblanc gleblanc@cu-portland.edu +Guido Leenders guido.leenders@invantive.com +H. J. Lu hjl@valinux.com +Hans Ginzel hans@matfyz.cz +Hans Lermen lermen@fgan.de +Hans Verkuil hans@wyst.hobby.nl +Harald Dunkel harald.dunkel@t-online.de +Harry Liu rliu@lek.ugcs.caltech.edu +Harti Brandt brandt@fokus.fraunhofer.de +Helen Faulkner helen_ml_faulkner@yahoo.co.uk +Herbert Xu herbert@gondor.apana.org.au +Holger Berger hberger@ess.nec.de +Hon-Yin Kok hkok@yoda.unl.edu +Hugh Daniel hugh@xanadu.com +Ian Bruce ian.bruce@myrealbox.com +Ian Jackson ijackson@chiark.greenend.org.uk +Ian Lance Taylor ian@cygnus.com +Ian Turner vectro@pipeline.com +Iida Yosiaki iida@gnu.org +Ingo Saitz ingo@debian.org +Ivo Timmermans ivo@debian.org +James james@albion.glarp.com +James Antill jmanti%essex.ac.uk@seralph21.essex.ac.uk +James Sneeringer jvs@ocslink.com +James Tanis jtt@soscorp.com +James Youngman james+usenet@free-lunch.demon.co.uk +Jamie Lokier jamie@imbolc.ucc.ie +Jan Fedak J.Fedak@sh.cvut.cz +Jan Nieuwenhuizen janneke@gnu.org +Janos Farkas chexum@shadow.banki.hu +Jarkko Hietaniemi jhi@epsilon.hut.fi +Jean Charles Delepine delepine@u-picardie.fr +Jeff Moore jbm@mordor.com +Jeff Sheinberg jeff@bsrd.net +Jens Elkner elkner@imsgroup.de +Jens Schmidt jms@jsds.hamburg.com +Jerome Abela abela@hsc.fr +Jérôme Zago bug-coreutils-ml@agt-the-walker.net +Jesse Kornblum kornblum@usna.edu +Jesse Thilo jgt2@eecs.lehigh.edu +Jie Xu xuj@iag.net +Jim Blandy jimb@cyclic.com +Jim Dennis jimd@starshine.org +Joakim Rosqvist dvljrt@cs.umu.se +Jochen Hein jochen@jochen.org +Joe Orton joe@manyfish.co.uk +Johan Danielsson joda@pdc.kth.se +John Bley jbb6@acpub.duke.edu +John David Anglin dave.anglin@nrc.ca +John Gatewood Ham zappaman@alphabox.compsci.buu.ac.th +John Gotts jgotts@umich.edu +John Kendall kendall@capps.com +John Kodis kodis@acm.org +John Murphy jam@philabs.research.philips.com +John Roll john@panic.harvard.edu +John Salmon johns@mullet.anu.edu.au +John Summerfield summer@OS2.ami.com.au +Jon Peatfield J.S.Peatfield@damtp.cam.ac.uk +Joost van Baal joostvb@xs4all.nl +Jorge Stolfi stolfi@ic.unicamp.br +Joseph S. Myers jsm28@cam.ac.uk +Juan F. Codagnone juam@arnet.com.ar +Juan M. Guerrero st001906@hrz1.hrz.tu-darmstadt.de +Jungshik Shin jshin@pantheon.yale.edu +Jürgen Fluk louis@dachau.marco.de +Jurriaan thunder7@xs4all.nl +jvogel jvogel@linkny.com +Kai Henningsen kai@debian.org +Kai-Uwe Rommel rommel@informatik.tu-muenchen.de +Kalle Olavi Niemitalo kon@iki.fi +Kamal Paul Nigam Kamal_Paul_Nigam@gs35.sp.cs.cmu.edu +Karl Eichwalder keichwa@gmx.net +Karl Heuer kwzh@gnu.org +Karl-Michael Schneider schneide@phil.uni-passau.de +Karsten Thygesen karthy@kom.auc.dk +Kaveh R. Ghazi ghazi@caip.rutgers.edu +Keith M. Briggs keith.briggs@bt.com +Keith Owens kaos@audio.apana.org.au +Keith Thompson kst@cts.com +Ken Pizzini kenp@halcyon.com +Kristin E Thomas kristint@us.ibm.com +Kjetil Torgrim Homme kjetilho@ifi.uio.no +Kristoffer Rose kris@diku.dk +Larry McVoy lm@sgi.com +Lars Hecking lhecking@nmrc.ucc.ie +Leah Q eequor@earthlink.net +Lehti Rami rammer@cs.tut.fi +Leonard N. Zubkoff lnz@dandelion.com +Leonardo Milano lmilano@udel.edu +Lorne Baker lbaker@nitro.avint.net +Luke Hassell lukehassell@yahoo.com +M. P. Suzuki mpsuzuki@hiroshima-u.ac.jp +Maciej Kwapulinski pikpok@univ.gda.pl +Manas Garg manas@cygsoft.com +Manfred Hollstein manfred@s-direktnet.de +Marc Boucher marc@mbsi.ca +Marc Haber mh+debian-bugs@zugschlus.de +Marc Olzheim marcolz@stack.nl +Marco Franzen Marco.Franzen@Thyron.com +Marcus Brinkmann http://www.marcus-brinkmann.de +Marcus Daniels marcus@ee.pdx.edu +Mark A. Thomas thommark@access.digex.net +Mark Conty Mark_Conty@cargill.com +Mark D. Roth roth@uiuc.edu +Mark Funkenhauser mfunkenhauser@rogers.com +Mark Harris mark@monitor.designacc.com +Mark Hewitt mhewitt@armature.com +Mark Hounschell markh@compro.net +Mark Hubbart discord@mac.com +Mark Kettenis kettenis@phys.uva.nl +Mark Nudelman marknu@flash.net +Mark W. Eichin eichin@cygnus.com +Markus Demleitner msdemlei@auriga.ari.uni-heidelberg.de +Martin martin@dresden.nacamar.de +Martin Buck martin.buck@ascom.ch +Martin Gallant martyg@goodbit.net +Martin Hippe martin.hippe@schlund.de +Martin Michlmayr tbm@cyrius.com +Martin Mitchell martin@debian.org +Martin P.J. Zinser zinser@decus.de +Marty Leisner leisner@sdsp.mc.xerox.com +Masami Takikawa takikawm@CS.ORST.EDU +Mate Wierdl mw@moni.msci.memphis.edu +Matej Vela mvela@public.srce.hr +Matt Kraai kraai@ftbfs.org +Matt Perry matt@primefactor.com +Matt Schalit mschalit@pacbell.net +Matt Swift swift@alum.mit.edu +Matthew Arnison maffew@cat.org.au +Matthew Braun matthew@ans.net +Matthew Clarke Matthew_Clarke@mindlink.bc.ca +Matthew S. Levine mslevine@theory.lcs.mit.edu +Matthew Smith matts@bluesguitar.org +Matthew Swift swift@alum.mit.edu +Matthias Urlichs smurf@noris.de +Matti Aarnio matti.aarnio@zmailer.org +Mattias Wadenstein maswan@acc.umu.se +Meelis Roos mroos@tartu.cyber.ee +Michael michael@aplatform.com +Michael ??? michael@roka.net +Michael Bacarella mbac@netgraft.com> +Michael Deutschmann michael@talamasca.ocis.net +Michael Elizabeth Chastain mec.gnu@mindspring.com +Michael Gaughen mgaughen@polyserve.com +Michael Hasselberg mikelh@zonta.ping.de +Michael Hohn hohn@math.utah.edu +Michael J. Croghan mcroghan@usatoday.com +Michael McFarland sidlon@yahoo.com +Michael Piefel piefel@informatik.hu-berlin.de +Michael Steffens michael.steffens@s.netic.de +Michael Stone mstone@debian.org +Michael Stutz stutz@dsl.org +Michael van Elst mlelstv@dev.de.cw.net +Michael Veksler mveksler@techunix.technion.ac.il +Michail Litvak mci@owl.openwall.com +Michal Politowski mpol@charybda.icm.edu.pl +Michal Svec msvec@suse.cz +Michel Robitaille robitail@IRO.UMontreal.CA +Michiel Bacchiani bacchian@raven.bu.edu +Mike Castle dalgoda@ix.netcom.com +Mike Coleman mkc@mathdogs.com +Mike Jetzer mjetzer@mke.catalystwms.com +Mikko Tuumanen m@sorvankyla.yok.utu.fi +Mikulas Patocka mikulas@artax.karlin.mff.cuni.cz +Miles Bader miles@gnu.ai.mit.edu +Minh Tran-Le tranle@intellicorp.com +Morten Welinder terra@diku.dk +Neal H Walfield neal@cs.uml.edu +Neil Brown neilb@cse.unsw.edu.au +Nelson H. F. Beebe beebe@math.utah.edu +Nick Estes debian@nickstoys.com +Nick Lawes nlawes@silverplatter.com +Niklas Edmundsson nikke@acc.umu.se +Nikola Milutinovic Nikola.Milutinovic@ev.co.yu +Noah Friedman friedman@splode.com +Noel Cragg noel@red-bean.com +Olatunji Oluwabukunmi Ruwase tjruwase@stanford.edu +Olav Morkrid olav@funcom.com +Ole Laursen olau@hardworking.dk +Oliver Kiddle okiddle@yahoo.co.uk +Ørn E. Hansen oehansen@daimi.aau.dk +Oskar Liljeblad osk@hem.passagen.se +Patrick Mauritz oxygene@studentenbude.ath.cx +Paul Eggert eggert@twinsun.com +Paul Jarc prj@po.cwru.edu +Paul Nevai nevai@ops.mps.ohio-state.edu +Paul Sauer paul@alexa.com +Paul Slootman paul@debian.org +Paul Worrall paul@basilisk.uklinux.net +Pawel Prokop pablo@wizard.ae.krakow.pl +Per Cederqvist ceder@lysator.liu.se +Per Kristian Hove perhov@math.ntnu.no +Peter Eriksson peter@ifm.liu.se +Peter Horst peter@ointment.org +Peter Moulder reiter@netspace.net.au +Peter Samuelson psamuels@sampo.creighton.edu +Peter Seebach seebs@taniemarie.solon.com +Petter Reinholdtsen pere@hungry.com +Phelippe Neveu pneveu@pcigeomatics.com +Phil Richards phil.richards@vf.vodafone.co.uk +Philippe De Muyter phdm@macqel.be +Philippe Schnoebelen Philippe.Schnoebelen@imag.fr +Phillip Jones mouse@datastacks.com +Piergiorgio Sartor sartor@sony.de +Piotr Kwapulinski kwap@univ.gda.pl +Prashant TR tr@eth.net +Rainer Orth ro@TechFak.Uni-Bielefeld.DE +Ralf W. Stephan stephan@tmt.de +Ralph Loader loader@maths.ox.ac.uk +Raul Miller moth@magenta.com +Raúl Núñez de Arenas Coronado raul@pleyades.net +Reuben Thomas rrt@sc3d.org +Richard A Downing richard.downing@bcs.org.uk +Richard Braakman dark@xs4all.nl +Richard Dawe rich@phekda.freeserve.co.uk +Richard J. Rauenzahn rrauenza@hairball.cup.hp.com +Richard Neill rn214@hermes.cam.ac.uk +Richard Sharman rsharman@magmacom.com +Rick Sladkey jrs@world.std.com +Rik Faith faith@cs.unc.edu +Risto Kankkunen kankkune@lingsoft.fi +Robert H. de Vries robert@and.nl +Robert Lindgren robert@orcafat.com +Robert Millan zeratul2@wanadoo.es +Rogier Wolff R.E.Wolff@BitWizard.nl +Roland Huebner ro-huebner@gmx.de +Roland Turner raz.tah.bet@raz.cx +Ronald F. Guilmette rfg@netcom.com +Ross Alexander r.alexander@auckland.ac.nz +Ross Paterson rap@doc.ic.ac.uk +Ross Ridge rridge@calum.csclub.uwaterloo.ca +Sami Farin sfarin@ratol.fi +Samuel Tardieu sam@rfc1149.net +Samuli Karkkainen Samuli.Karkkainen@hut.fi +Sander van Malssen svm@kozmix.ow.nl +Santiago Vila Doncel sanvila@unex.es +Savochkin Andrey Vladimirovich saw@msu.ru +Scott Lurndal slurn@griffin.engr.sgi.com +Shing-Shong Shei shei@cs.indiana.edu +Soeren Sonnenburg sonnenburg@informatik.hu-berlin.de +Solar Designer solar@owl.openwall.com +Stanislav Ievlev inger@altlinux.ru +Stéphane Chazelas Stephane_CHAZELAS@yahoo.fr +Stephen Depooter sbdep@myrealbox.com +Stephen Eglen eglen@pcg.wustl.edu +Stephen Gildea gildea@stop.mail-abuse.org +Stephen Smoogen smooge@mindspring.com +Steve McConnel steve@acadcomp.sil.org +Steven G. Johnson stevenj@alum.mit.edu +Steven Mocking ufo@quicknet.nl +Steven P Watson steven@magelico.net +Stuart Kemp skemp@peter.bmc.com +Szakacsits Szabolcs szaka@sienet.hu +Tadayoshi Funaba tadf@kt.rim.or.jp +TAKAI Kousuke takai@vlsi.kuee.kyoto-u.ac.jp +Theodore Ts'o tytso@rsts-11.mit.edu +Thomas Bushnell thomas@gnu.ai.mit.edu +Thomas Goerlich thomas@schnappmatik.de +Thomas Luzat thomas@luzat.com +Thomas Quinot thomas@Cuivre.FR.EU.ORG +Tim J. Robbins tjr@FreeBSD.org +Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu +Tim Smithers mouse@dmouse.com.au +Tim Waugh twaugh@redhat +Toby Peterson toby@opendarwin.org +Todd A. Jacobs tjacobs@codegnome.org +Tom Haynes thomas@netapp.com +Tom Quinn trq@dionysos.thphys.ox.ac.uk +Tommi Kyntola tkyntola@cc.hut.fi +Ton Hospel thospel@mail.dma.be +Ton Nijkes ton@murphy.nl +Tony Kocurko akocurko@mun.ca +Tony Leneis tony@plaza.ds.adp.com +Tony Robinson ajr@eng.cam.ac.uk +Torbjorn Granlund tege@nada.kth.se +Torbjorn Lindgren tl@funcom.no +Torsten Landschoff torsten@pclab.ifg.uni-kiel.de +Ulrich Drepper drepper@gnu.org +Ulrich Hermisson ulrich_hermisson@hotmail.com +Urs Thuermann urs@isnogud.escape.de +Uwe H. Steinfeld usteinfeld@gmx.net +Vesselin Atanasov vesselin@bgnet.bg +Vin Shelton acs@alumni.princeton.edu +Volker Borchert bt@teknon.de +Volker Paul vpaul@dohle.com +Wartan Hachaturow wart@tepkom.ru +Wayne Stewart wstewa@atl.com +Wenjun Zheng zwj@yahoo.com +Werner Almesberger Werner.Almesberger@epfl.ch +Wichert Akkerman wichert@cistron.nl +Will Edgington wedgingt@acm.org +William Bader william@nscs.fast.net +William Dowling will@franklin.com +William Lewis wiml@omnigroup.com +wiregauze wiregauze@yahoo.com +Wojciech Purczynski cliph@isec.pl +Wolfram Kleff kleff@cs.uni-bonn.de +Won-kyu Park wkpark@chem.skku.ac.kr +Yann Dirson dirson@debian.org +Zvi Har'El rl@math.technion.ac.il diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/TODO b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/TODO new file mode 100644 index 0000000..318c411 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/TODO @@ -0,0 +1,203 @@ +restore djgpp, eventually +merge TODO lists +add unit tests for lib/*.c + +strip: add an option to specify the program used to strip binaries. + suggestion from Karl Berry + +doc/coreutils.texi: + Address this comment: FIXME: mv's behavior in this case is system-dependent + Better still: fix the code so it's *not* system-dependent. + +implement --target-directory=DIR for install (per texinfo documentation) + +ls: add --format=FORMAT option that controls how each line is printed. + +cp --no-preserve=X should not attempt to preserve attribute X + reported by Andreas Schwab + +copy.c: Address the FIXME-maybe comment in copy_internal. +And once that's done, add an exclusion so that `cp --link' +no longer incurs the overhead of saving src. dev/ino and dest. filename +in the hash table. + +See if we can be consistent about where --verbose sends its output: + These all send --verbose output to stdout: + head, tail, rm, cp, mv, ln, chmod, chown, chgrp, install, ln + These send it to stderr: + shred mkdir split + readlink is different + +Write an autoconf test to work around build failure in HPUX's 64-bit mode. +See notes in README -- and remove them once there's a work-around. + +Integrate use of sendfile, suggested here: + http://mail.gnu.org/archive/html/bug-fileutils/2003-03/msg00030.html +I don't plan to do that, since a few tests demonstrate no significant benefit. + +Should printf '\0123' print "\n3"? + per report from TAKAI Kousuke on Mar 27 + http://mail.gnu.org/archive/html/bug-coreutils/2003-03/index.html + +printf: consider adapting builtins/printf.def from bash + +df: add `--total' option, suggested here http://bugs.debian.org/186007 + +seq: give better diagnostics for invalid formats: + e.g. no or too many % directives +seq: consider allowing format string to contain no %-directives + +m4: rename all macros that start with AC_ to start with another prefix + +resolve RH report on cp -a forwarded by Tim Waugh + +Martin Michlmayr's patch to provide ls with `--sort directory' option + +tail: don't use xlseek; it *exits*. + Instead, maybe use a macro and return nonzero. + +add mktemp? Suggested by Nelson Beebe + +df: alignment problem of `Used' heading with e.g., -mP + reported by Karl Berry + +tr: support nontrivial equivalence classes, e.g. [=e=] with LC_COLLATE=fr_FR + +fix tail -f to work with named pipes; reported by Ian D. Allen + $ mkfifo j; tail -f j & sleep 1; echo x > j + ./tail: j: file truncated + ./tail: j: cannot seek to offset 0: Illegal seek + +lib/strftime.c: Since %N is the only format that we need but that + glibc's strftime doesn't support, consider using a wrapper that + would expand /%(-_)?\d*N/ to the desired string and then pass the + resulting string to glibc's strftime. + +sort: Compress temporary files when doing large external sort/merges. + This improves performance when you can compress/uncompress faster than + you can read/write, which is common in these days of fast CPUs. + suggestion from Charles Randall on 2001-08-10 + +sort: Add an ordering option -R that causes 'sort' to sort according + to a random permutation of the correct sort order. Also, add an + option --random-seed=SEED that causes 'sort' to use an arbitrary + string SEED to select which permutations to use, in a deterministic + manner: that is, if you sort a permutation of the same input file + with the same --random-seed=SEED option twice, you'll get the same + output. The default SEED is chosen at random, and contains enough + information to ensure that the output permutation is random. + suggestion from Feth AREZKI, Stephan Kasal, and Paul Eggert on 2003-07-17 + +unexpand: [http://www.opengroup.org/onlinepubs/007908799/xcu/unexpand.html] + printf 'x\t \t y\n'|unexpand -t 8,9 should print its input, unmodified. + printf 'x\t \t y\n'|unexpand -t 5,8 should print "x\ty\n" + +Let GNU su use the `wheel' group if appropriate. + (there are a couple patches, already) + +sort: Investigate better sorting algorithms; see Knuth vol. 3. + + We tried list merge sort, but it was about 50% slower than the + recursive algorithm currently used by sortlines, and it used more + comparisons. We're not sure why this was, as the theory suggests it + should do fewer comparisons, so perhaps this should be revisited. + List merge sort was implemented in the style of Knuth algorithm + 5.2.4L, with the optimization suggested by exercise 5.2.4-22. The + test case was 140,213,394 bytes, 426,4424 lines, text taken from the + GCC 3.3 distribution, sort.c compiled with GCC 2.95.4 and running on + Debian 3.0r1 GNU/Linux, 2.4GHz Pentium 4, single pass with no + temporary files and plenty of RAM. + + Since comparisons seem to be the bottleneck, perhaps the best + algorithm to try next should be merge insertion. See Knuth section + 5.3.1, who credits Lester Ford, Jr. and Selmer Johnson, American + Mathematical Monthly 66 (1959), 387-389. + +cp --recursive: perform dir traversals in source and dest hierarchy rather + than forming full file names. The latter (current) approach fails + unnecessarily when the names become very long. + +tail --p is now ambiguous + +Remove suspicious uses of alloca (ones that may allocate more than + about 4k) + +Adapt these contribution guidelines for coreutils: + http://sources.redhat.com/automake/contribute.html + + +Changes expected to go in, post-5.2.1: +====================================== + + wc: add an option, --files0-from [as for du] to make it read NUL-delimited + file name arguments from a file. + + dd patch from Olivier Delhomme + + Apply Andreas Gruenbacher's ACL and xattr changes + + Apply Bruno Haible's hostname changes + + test/mv/*: clean up $other_partition_tmpdir in all cases + + ls: when both -l and --dereference-command-line-symlink-to-dir are + specified, consider whether to let the latter select whether to + dereference command line symlinks to directories. Since -l has + an implicit --NO-dereference-command-line-symlink-to-dir meaning. + Pointed out by Karl Berry. + + A more efficient version of factor, and possibly one that + accepts inputs of size 2^64 and larger. + + Re-add a separate test for du's stack space usage (like the one removed + from tests/rm/deep-1). + + dd: consider adding an option to suppress `bytes/block read/written' + output to stderr. Suggested here: + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165045 + + Pending copyright papers: + ------------------------ + ls --color: Ed Avis' patch to suppress escape sequences for + non-highlighted files + + getpwnam from Bruce Korb + + pb (progress bar) from Miika Pekkarinen + + Look into improving the performance of md5sum. + `openssl md5' is consistently about 30% faster than md5sum on an idle + AMD 2000-XP system with plenty of RAM and a 261 MB input file. + openssl's md5 implementation is in assembly, generated by a perl script. + +Have euidaccess.m4 check for eaccess as well as euidaccess +If found, then do `#define euidaccess eaccess'. + +Remove long-deprecated options like -V for version-control and + tail's --allow-missing + +Add a distcheck-time test to ensure that every distributed +file is either read-only(indicating generated) or is +version-controlled and up to date. + +Implement Ulrich Drepper's suggestion to use getgrouplist rather + than getugroups. This affects only `id', but makes a big difference + on systems with many users and/or groups, and makes id usable once + again on systems where access restrictions make getugroups fail. + But first we'll need a run-test (either in an autoconf macro or at + run time) to avoid the segfault bug in libc-2.3.2's getgrouplist. + In that case, we'd revert to using a new (to-be-written) getgrouplist + module that does most of what `id' already does. + +remove `%s' notation: + grep -E "\`%.{,4}s'" src/*.c + +remove.c should never exit, yet may do so (see uses of EXIT_FAILURE) + +remove or adjust chown's --changes option, since it + can't always do what it currently says it does. + +Adapt tools like wc, tr, fmt, etc. (most of the textutils) to be + multibyte aware. The problem is that I want to avoid duplicating + significant blocks of logic, yet I also want to incur only minimal + (preferably `no') cost when operating in single-byte mode. diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/config/ChangeLog b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/config/ChangeLog new file mode 100644 index 0000000..b5bc0b7 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/config/ChangeLog @@ -0,0 +1,94 @@ +2004-12-17 Jim Meyering <jim@meyering.net> + + * install-sh: Sync from gnulib. + +2004-12-16 Paul Eggert <eggert@cs.ucla.edu> + + * mdate-sh: Sync from gnulib. + +2004-11-23 Paul Eggert <eggert@cs.ucla.edu> + + * config.sub, texinfo.tex: Sync from gnulib. + +2004-11-17 Paul Eggert <eggert@cs.ucla.edu> + + * config.guess, config.sub: Sync from gnulib. + +2004-11-10 Paul Eggert <eggert@cs.ucla.edu> + + * texinfo.tex: Sync from gnulib. + +2004-11-02 Paul Eggert <eggert@cs.ucla.edu> + + * texinfo.tex: Sync from gnulib. + +2004-10-29 Paul Eggert <eggert@cs.ucla.edu> + + * config.guess, install-sh, texinfo.tex: Sync from gnulib. + +2004-10-03 Paul Eggert <eggert@cs.ucla.edu> + + * config.guess, config.sub, install-sh, missing, texinfo.tex: + Sync from gnulib. + +2004-09-24 Jim Meyering <jim@meyering.net> + + * cvsu: Remove file. The version of cvsu from the cvsutils package + does the same job with --find --type=... options. + * cvsu: New file, used by rules in coreutils' Makefile.maint. + +2004-08-05 Paul Eggert <eggert@cs.ucla.edu> + + * config.guess, config.sub, install-sh, texinfo.tex: Sync from gnulib. + +2004-03-30 Paul Eggert <eggert@twinsun.com> + + * config.guess, config.sub, install-sh, texinfo.tex: Sync from gnulib. + +2003-08-16 Paul Eggert <eggert@twinsun.com> + + * config.rpath, texinfo.tex: Sync with gnulib. + +2003-04-21 Jim Meyering <jim@meyering.net> + + * depcomp: New version, now that this file is on the list + in ../Makefile.cfg. + +2003-01-12 Jim Meyering <jim@meyering.net> + + Lots of syntactic clean-up, mostly from Karl Berry. + * install-sh: Use consistent indentation, two spaces per level. + (scriptversion): New variable. + Change initializations like `variable=""' to `variable='. + (usage): New variable. + Use `test', not `['. + Use `test -z "$var"', not `[ x"$var" = x ]'. + Use `test -n "$var"', not `[ x"$var" != x ]'. + Alphabetize case entries. + Accept --help and --version options. + Remove unnecessary `else :' clauses. + Add a `Local variables' eval block to help emacs users update + the time-stamp variable added above. + +2002-12-20 Jim Meyering <jim@meyering.net> + + * install-sh: Set the execute bit on this file. + Reported by Vin Shelton. + +2002-11-09 Jim Meyering <jim@meyering.net> + + Make it work even when names contain spaces or shell metachars. + * install-sh: Write diagnostics to stderr, not stdout. + Normalize spacing in diagnostics: use one space (not two, and not a TAB) + after the leading `install:'. + Add double quotes around `$src' here: $doit $instcmd "$src" "$dsttmp" + + Merge in some changes from the version in automake. + * install-sh: Remove unnecessary quotes around `case' argument. + Use `[ cond1 ] || [ cond2 ]' rather than `[ cond1 -o cond2 ]'. + Use `:' rather than `true'. + +2002-02-17 Jim Meyering <jim@meyering.net> + + * config.guess (main): Don't use `head -1'; it's no longer portable. + Use `sed 1q' instead. diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/doc/ChangeLog b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/doc/ChangeLog new file mode 100644 index 0000000..9cf6bf9 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/doc/ChangeLog @@ -0,0 +1,1219 @@ +2005-01-07 Jim Meyering <jim@meyering.net> + + * coreutils.texi (sort invocation): Specify that a string + of zero digits is interpreted as 0. Reported by Ulrich Hermisson. + +2005-01-04 Jim Meyering <jim@meyering.net> + + * coreutils.texi (shred invocation): Clarify that shred works fine + with journaled file systems that are configured not to journal + file system data. Also mention BFS and NTFS. + +2004-12-15 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (ls invocation): Change minor problem to be + "subdirectory not found", since top-level trouble is now serious. + (dircolors invocation): Quote argument to eval. Problem reported + by Stephane Chazelas. + +2004-12-11 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (join invocation): Mention that blank separators + in the -o option need to be quoted. Problem reported by Phil Clayton. + +2004-12-10 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (id invocation): -G also prints main group. + Problem reported by Tim Waugh. + +2004-12-09 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (ls invocation): Document new "ls" exit status. + +2004-12-08 Paul Eggert <eggert@cs.ucla.edu> + + * getdate.texi (Time of day items, Time zone items): + Describe new formats +00:00, UTC+00:00. + +2004-12-04 Jim Meyering <jim@meyering.net> + + * coreutils.texi (cut invocation): Say when --complement is useful. + +2004-10-01 Paolo Bonzini <bonzini@gnu.org> + + * coreutils.texi (cut invocation): Document --complement and + adjust the documentation of -b, -c, -f. + +2004-11-27 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (du invocation): Use if=/dev/null rather + than :|. Problem reported by Dan Jacobson. + Use "seek=2GiB" rather than the wordier "seek=`echo '2^31'|bc`". + Say "KiB" not the (inaccurate) "kilobytes". + Similarly for "GiB" and "gigabytes". + +2004-11-16 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi: Changes inspired by Debian coreutils 5.2.1-2. + (General output formatting): -x doesn't have an operand. + (Formatting the file names): Warn that even with -N unprintable + chars are still printed as '?' some times. + (rm invocation): Reword rm -d to note that it's sometimes useful + on non-directories. + (logname invocation, users invocation, who invocation): + The utmp and wtmp file names vary from system to system. + + * getdate.texi (General date syntax): "next" is 1, not 2. + Document that "second" isn't allowed as an ordinal number. + +2004-11-15 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (dd invocation): Reword the new dd message. + +2004-11-14 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (dd invocation): dd now outputs total bytes, + seconds, and bytes per second. + +2004-11-03 Paul Eggert <eggert@cs.ucla.edu> + + * Makefile.am (_W, W_): New macros. + (check-texinfo): Use them instead of assuming grep -w (which is not + portable). + +2004-10-29 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi: Document TZ better, and adjust to new getdate.texi. + (Top): Update menu. + (pr invocation, Formatting file timestamps, touch invocation, + stat invocation, who invocation, date invocation, Options for date): + Mention TZ. + * getdate.texi: Sync from gnulib. + +2004-10-28 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (Standards conformance): Use "head -10" rather + than "head -1" as example of obsolete usage, since the POSIX + consensus is that "head -1" could be supported even if we don't + yet have clear consensus on "head -10". See today's revision to + the SUS FAQ + <http://www.opengroup.org/austin/papers/single_unix_faq.html>. + +2004-10-24 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (pathchk invocation): Options must precede operands. + +2004-10-17 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (pathchk invocation): Overall lengths are + OS limits, not file system limits. Component length checks + apply to all components, not merely to existing ones. Say + that nonexistent names are not errors. For -p, omit all + checks based on the underlying file system, not merely length + checks. Explain what the portable file name character set is. + +2004-10-15 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (printf invocation): Mention ISO/IEC 10646 as + well as Unicode. Various minor formatting cleanups. + +2004-10-13 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (sort invocation): Move LC_ALL, LC_COLLATE + index entries to proper paragraph. + +2004-10-12 Jim Meyering <jim@meyering.net> + + * Makefile.am (check-texinfo): Add `builtin' and `builtins' to + the list of words to avoid. + +2004-10-11 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (Special built-in utilities): New node. + (printf invocation): builtin -> built-in, for consistency + with POSIX terminology. + (test invocation, pwd invocation): + Use specific rather than generic language to warn about + built-in commands. + (chroot invocation, env invocation, nice invocation, nohup invocation): + Warn that command must not be a special built-in. + (env invocation): Warn about environment variables with unusual + spellings, or duplicates. + +2004-09-26 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (ls invocation): Document "ls --hide". + +2004-09-24 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (chmod invocation): Warn about "chmod -w file". + +2004-09-23 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (tail invocation): Fix bugs in the description of + the obsolete syntax (e.g., it does not support -k or -m). Warn + about usages like "tail -" and "tail -c 4" that are ambigous on + older systems. + +2004-09-20 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (mv invocation, rm invocation): Say "the response + is affirmative" rather than "the response begins with y or Y", + so that the documentation is accurate in non-English locales. + Problem reported by Munzir Taha. + +2004-09-18 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (dd invocation): Distinguish between options + (e.g., --help) and operands (e.g., if=file). Move miscellaneous + stuff after the operand descriptions, for clarity. + +2004-09-09 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (sort invocation): -u disables the last-resort + comparison, too. Revamp its description. + (test invocation): Document -r, -w, -x more carefully. + +2004-09-08 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (Common options): Some programs don't reorder + options. + (tr invocation, echo invocation, printf invocation, test invocation, + expr invocation, basename invocation, chroot invocation, + nice invocation, nohup invocation, seq invocation): + This program doesn't reorder options. + (tr invocation): Mention --help, --version, --. + (echo invocation): Mention that -- isn't special. + (test invocation): Mention that the expression is optional, + and that test ! EXPR is like ! test EXPR. + Mention that -h and -L don't dereference symlinks. + (expr invocation): Mention --help, --version. + + * coreutils.texi (sort invocation): Add remarks about sort -u + versus sort | uniq. Prompted by a question from Andrew Noymer. + +2004-09-06 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (od invocation): Several changes for POSIX + and FreeBSD compatibility. Add support for XSI syntax + (POSIX 1003.1-2004). Rename -s[N] to -S N. Remove documentation + for -h. -i is now -t dI (not d2) and -l is now -t dL (not d4). + +2004-09-05 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (String tests): Improve quality of warning about + quoting strings for the shell. + +2004-09-03 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (dd invocation): Specify which conversion options + are mutually exclusive. Give a bit more detail about ascii, + ebcdic, and ibm conversions. + +2004-08-24 Paul Eggert <eggert@cs.ucla.edu> + + POSIX-conformance fixes for "expand" and "unexpand". + * coreutils.texi: Standardize on "tab stop" (the POSIX usage) + rather than "tabstop". + (unexpand invocation): Use "blank" rather than "space" when + POSIX requires "blank". Define "blank". Initial blanks are + converted even if there's just one. For -a, convert two or + more blanks only if they occur just before a tab stop. + +2004-08-19 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (chown invocation): Fix synopsis: + group must always be preceded by separator. + "chown : file" and "chown '' file" don't change the owner or group. + Update the explanation of what happens to the set-user-ID or + set-group-ID bits, e.g., they sometimes are not cleared if they + denote mandatory locking. Change "find"-oriented examples to use + chown -h. + +2004-08-18 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (printf invocation): Clarify how "printf" is + supposed to work with extra arguments, missing arguments, etc. + +2004-08-10 Paul Eggert <eggert@cs.ucla.edu> + + POSIX-conformance fixes for "-" used as an operand. + * coreutils.texi (Common options): Clarify that "-" means + stdin/stdout only when it is an operand, not when it is an + option-argument. + (shred invocation): "shred -- -" is equivalent to "shred -", + not to "shred ./-". + (tee invocation): "tee -" means to copy (again) to stdout. + +2004-07-25 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (nice invocation): Document the "nice value", and + how it affects the scheduling priority. (The old documentation + implied that the nice value equaled the scheduling priority, which + isn't accurate.) Document that the range of nice values might + exceed -20..19. Specify what happens when you give a nice value + that is out of range, or when you don't have permissions to lower + the nice value. Bash doesn't have a builtin 'nice', so don't say + "most shells" have one. + +2004-04-03 Dmitry V. Levin <ldv@altlinux.org> + + * coreutils.texi (readlink invocation): Document new + "readlink -f" behaviour and new canonicalize options, -e and -m. + +2004-07-02 Jim Meyering <jim@meyering.net> + + * Makefile.am (check-texinfo): Disallow `filename' in .texi files. + Spell it like `file name' instead, to be consistent. + Fail if a @footnote directive follows non-punctuation. + Fail upon use of @url. Use @uref instead. + +2004-07-01 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (Common options, Target directory, cp invocation, + install invocation, mv invocation, ln invocation): Add -t as a + short option for --target-directory, and -T as a short option for + --no-target-directory. Clean up relevant synopses a bit, so that + the language is similar for all. + +2004-06-30 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi: Put the right amount of space at sentence ends. + Make sure "i.e." and "e.g." are followed by commas (the GNU style). + Put blank lines before and after every @example, prefer the + previous line to end in ":" (when not a sentence end, for consistency), + and prepend @noindent to the following line when appropriate. + In examples, use "--" arguments when needed to prevent undesired + interpretation of operands as options. + Use "file name" rather than "filename", as per the GNU coding standards. + Remove unwanted spaces before @footnote. + Use "---" when appropriate, instead of " -- ". + Use "name" (or something like that) rather than "path" or "pathname", + since the GNU coding standards don't allow "path". + Use @acronym, @command, @minus{}, @samp in a few places, + where appropriate. + (Target directory): Clarify description of example. + (fmt invocation): Give issue number for reference, and reword + for clarity. + (sort invocation): Note that xargs without -0 also mishandles + file names containing some special characters other than newline. + (Translating): Mention that \012 is not universally portable. + Use '\0' rather than '\000'. + (Squeezing): bourne -> Bourne. + Fix unportable usage of '\n' by replacing it with '[\n*]'. + (More details about version sort): Remove unnecessary indent + in examples. + (dd invocation): Use 'kill -s USR1', not 'kill -USR1', as POSIX + indicates that the former is more portable (the latter is an XSI + extension). + (shred invocation): Use @uref rather than @url, and use a more-typical + style for the date. + (kill invocation): Clarify usage; for example, "kill -s TERM -1" + isn't allowed. + (seq invocation): Reword to avoid implying that printf necessarily + fails for numbers outside the 32-bit range. Prefer separating + options from their operands. + (Opening the software toolbox): Give an online reference to + Robbins's article, and give a date. Don't imply that the + current documentation is unchanged from his article. + (Putting the tools together): Rework examples so that they don't + assume the C locale; nowadays many users now operate outside the C + locale by default. While we're at it, don't assume ASCII either. + Indent example to match actual output from GNU uniq. Remove some + unnecessary and confusing brackets from 'tr' operands. "Software + Tools in Pascal" is back in print, according to Amazon anyway. + Add references to Kernighan's online copies of examples. + +2004-06-30 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi, perm.texi: Standardize on "file system" rather + than "filesystem", as POSIX prefers it with a space. + +2004-06-29 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (Common options, Target directory, cp + invocation, install invocation, mv invocation, ln invocation): + Likewise. + (link invocation): Explain how to rewrite link using ln now + that we have --no-target-directory. + (ln invocation): Explain that --no-target-directory subsumes + --no-dereference. + (unlink invocation): Modify wording to match new wording in + link invocation. + +2004-06-25 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (install invocation): Document + --target-directory in synopsis, too. + +2004-06-15 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (yes invocation): "--" is now supported. + (false invocation, true invocation): --help and --version now + work unconditionally. + +2004-06-07 Jim Meyering <jim@meyering.net> + + * coreutils.texi: Remove menu references to just-removed subsection. + +2004-06-06 Jim Meyering <jim@meyering.net> + + * coreutils.texi (tr invocation): Remove the section describing + how POSIXLY_CORRECT changes tr's behavior. + +2004-06-02 Jim Meyering <jim@meyering.net> + + * coreutils.texi (cut invocation): Clarify what --output-delimiter=STR + does with byte/character ranges. + +2004-06-01 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (tr invocation): Mention -C. + +2004-05-13 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (echo invocation): Document today's changes. + +2004-05-17 Jim Meyering <jim@meyering.net> + + chgrp and chown now dereference symlinks by default, per POSIX. + * coreutils.texi (chgrp invocation, chown invocation): Document it. + +2004-05-13 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (sort invocation): Document that "sort -m -o F" + might write F before reading all the input. + +2004-05-09 Jim Meyering <jim@meyering.net> + + * coreutils.texi (stat invocation): Change IO to I/O. + * Makefile.am (check-texinfo): Check for the above. + +2004-04-25 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (sort invocation): Mention -k earlier, so + that the options are in alphabetical order. Describe how -b works + more-accurately; this involves fixing some examples, too. Mention + what happens if the start field falls after an end field or after + a line end. Warn about using -k without -b, -g, -M, -n, or -t. + Add an example of how to sort IPv4 addresses and Apache Common + Log Format dates. Remove a duplicate example. + (Putting the tools together): Use separate options rather + than agglomerating them. + +2004-03-27 Paul Eggert <eggert@twinsun.com> + + cp -pu and mv -u (when copying) now take the destination + file system time stamp resolution into account. + + * coreutils.texi (mv invocation): Document this. + (cp invocation): Document -u (it was missing!) with new behavior. + +2004-04-08 Paul Eggert <eggert@cs.ucla.edu> + + * coreutils.texi (dd invocation): Remove noctty flag from dd. + +2004-04-07 Paul Eggert <eggert@twinsun.com> + + New dd conv= symbols nocreat, excl, fdatasync, fsync, + and new dd options iflag= and oflag=. + + * coreutils.texi (dd invocation): Document them. + +2004-04-07 Jim Meyering <jim@meyering.net> + + * coreutils.texi (stty invocation - Input): Document new iutf8 option. + +2004-04-04 Jim Meyering <jim@meyering.net> + + * coreutils.texi (stat invocation): Correct --format description. + +2004-02-25 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (Block size): Document new envvar BLOCKSIZE. + +2004-03-24 Jim Meyering <jim@meyering.net> + + * Makefile.am (check-texinfo): Add a check to ensure future + consistency in using @sc{nul}, not `NUL'. + +2004-03-23 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi: Use @sc{nul} consistently for NUL. + (du invocation): FILE0 -> FILE. + +2004-03-23 Jim Meyering <jim@meyering.net> + + * coreutils.texi (du invocation): --files0-from is useful with + --total (-c), not with --summarize. + +2004-03-22 Jim Meyering <jim@meyering.net> + + * coreutils.texi: Tweak a few lines that resulted in + `overfull hbox' warnings. + +2004-03-03 Jim Meyering <jim@meyering.net> + + * coreutils.texi (du invocation): Document new option: --file0-from=F. + +2004-02-29 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (touch invocation): + Describe use of fractional seconds. + (date invocation, Options for date): Likewise. + * getdate.texi (General date syntax, Time of day items): Likewise. + * coreutils.texi (date invocation): Mention effect of LC_TIME. + (Options for date): Describe new --iso-8601=ns option. + + * getdate.texi: Add copyright notice. Change getdate to + get_date when talking about the function name. + (Seconds since the Epoch): New section, containing the time_t + info moved from Date input formats section, along with new + info about the @ syntax. Mention negative time stamps, + fractional time stamps, and leap seconds. + (General date syntax): Modernize examples a bit to reflect new + features. + (General date syntax, Relative items in date strings): + Use ' rather than " to quote formats. + (Time of day items): Add an example with fractional seconds. + Describe fractional-second syntax. + +2004-03-15 Jim Meyering <jim@meyering.net> + + * coreutils.texi (date invocation): Add missing `C' to %[...] range + in the `Date directives:: ...' menu entry. From Bob Proulx. + + * coreutils.texi: Add FIXME comment: + The following don't have `invocation' nodes: [, pinky, shasum, uptime. + +2004-03-10 Jim Meyering <jim@meyering.net> + + * coreutils.texi (Sorting the output): Remove description of + ls's --sort=directory option. ls doesn't accept that option, yet. + Reported by Arvind Autar. + + * coreutils.texi (cp invocation): Improve description of + cp's --sparse=WHEN option. + + * coreutils.texi (nl invocation): Specify that these are _basic_ + regular expressions (BRE), and add a link to grep's documentation. + Suggestion from Dan Jacobson. + +2004-02-23 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (chown invocation): Document that chown now falls + back on USER.GROUP parsing regardless of POSIX version, as POSIX + 1003.1-2001 allows that behavior as a compatible extension. + +2004-02-22 Jim Meyering <jim@meyering.net> + + * coreutils.texi (du invocation): Mention that using du's -H option + currently evokes a warning. + +2004-02-15 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (expr invocation): + Document what forms integers may take, and say "integer" + consistently instead of "number". Warn about operands + that "expr" can misinterpret, and how to work around the + problem. + +2004-02-17 Jim Meyering <jim@meyering.net> + + * coreutils.texi (csplit invocation): Correct typo (s/LINE/N/) + in description of `N' pattern. From Reuben Thomas <rrt@sc3d.org> + +2004-02-11 Jim Meyering <jim@meyering.net> + + * coreutils.texi (Time directives): The %s value *is* changed by the + --date=DATE option; don't say otherwise. Patch from Padraig Brady. + +2004-02-10 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (Formatting the file names): + Improve wording for --quoting-style documentation. + Suggestions by Bruno Haible. + +2004-02-02 Jim Meyering <jim@meyering.net> + + * coreutils.texi (nice invocation): Add examples. + Prompted by a suggestion from Dan Jacobson. + (factor invocation): Add an example. + Update timing numbers for a more modern CPU. + +2004-01-27 Jim Meyering <jim@meyering.net> + + * coreutils.texi (seq invocation): Remove `@dots{}' at end of synopsis. + Separate `Synopses' section into three examples. + Clarify first paragraph. @w{}-protect an expression.1 + Use @option{--option}, rather than @code{--option}. + +2004-01-19 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (Exit status): Document that ordinary failure + might not exit with status 1 on unusual platforms. + Mention chroot, env, nice, and su as having unusual exit + status patterns. Don't bother to mention true and false + since their exit status patterns are actually normal. + (sort invocation, su invocation): Mention its unusual exit + status pattern. + (chroot invocation): Simplify description of exit status 1. + Remove duplicate description of status 127. + (env invocation): Use consistent tenses; simplifiy description + of status 1. + (nice invocation): Likewise. + +2003-12-15 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (touch invocation): touch -r and -d can now + both be specified, with -r specifying the origin for -d. + +2004-01-15 Alfred M. Szmidt <ams@kemisten.nu> + + Factor out some common options. + * coreutils.texi (Common options): Define macros here. + (What information is listed, cp invocation): Use the macro(s). + (install invocation, mv invocation, ln invocation): Likewise. + (df invocation, du invocation): Likewise. + +2004-01-09 Jim Meyering <jim@meyering.net> + + Document the exit status of each and every program. + * coreutils.texi (yes invocation): Document that a write error + makes `yes' exit unsuccessfully. + (chroot invocation): Enumerate the meaning of exit status values. + (nice invocation): Likewise. + (Exit status) [@macro exitstatus]: New macro. + Use @exitstatus to describe the exit status of most programs. + +2004-01-02 Jim Meyering <jim@meyering.net> + + * coreutils.texi (du invocation): Mention that -H will eventually + mean not --si, but --dereference-args (-D). + +2003-12-20 Jim Meyering <jim@meyering.net> + + * coreutils.texi (du invocation): Describe new option: -0, --null. + +2003-12-03 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (What information is listed, chroot invocation): + Adjust example 'ls' output to match new behavior with narrower + output columns. + (The cut command): Remove example that cut the output of + 'ls -l'. The output was incorrect even with the old 'ls', and + the whole idea of using 'cut' on 'ls -l' output is bogus anyway. + +2003-11-24 Paul Eggert <eggert@twinsun.com> + + Parse floating-point operands and options in the C locale. + POSIX requires this for printf, and we might as well be + consistent elsewhere (tail, sleep, seq). + + * coreutils.texi (tail invocation, printf invocation, + sleep invocation, seq invocation): Document this. + +2003-11-24 Jim Meyering <jim@meyering.net> + + * coreutils.texi (Traversing symlinks, Treating / specially): + New sections. + (rm invocation, chown invocation, chmod invocation, chgrp invocation): + Describe new options, --preserve-root and --no-preserve-root. + +2003-11-11 Jim Meyering <jim@meyering.net> + + * coreutils.texi (chown invocation) [chownchgrpoptions]: New macro + describing -H, -L, -P options. Use it here. + (chgrp invocation): And here. + +2003-11-09 Jim Meyering <jim@meyering.net> + + * coreutils.texi (dd invocation): Fix typo in example. + +2003-10-15 Jim Meyering <jim@meyering.net> + + * coreutils.texi (ln invocation): Note that --directory, -d, -F + probably won't work even for superuser. Suggestion from Dan Jacobson. + +2003-09-29 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (csplit invocation): + The regexp offset need not have a sign; POSIX requires support + for signless offets. + +2003-10-03 Jim Meyering <jim@meyering.net> + + * coreutils.texi (du invocation): Describe -P, --no-dereference. + +2003-09-28 Jim Meyering <jim@meyering.net> + + * coreutils.texi (Translating): Correct typo in menu description. + From A Costa. + +2003-09-02 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (sort invocation): -d now overrides -i. + "whitespace" -> "blanks"; "whitespace" isn't correct. + -t '\0' now specifies a NUL tab. + +2003-08-17 Jim Meyering <jim@meyering.net> + + * coreutils.texi (who invocation): Add an entry for -l, --login. + Remove `-l' from the entry for --lookup. + (who invocation): Begin adding missing option documentation. + +2003-08-07 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (split invocation): + Add -d or --numeric-suffixes option to 'split'. + +2003-07-31 Paul Eggert <eggert@twinsun.com> + + * getdate.texi (General date syntax): Add --rfc-2822 option to GNU date. + * coreutils.texi (Options for date): Fix a typo in format: + it's now %d not %_d. Add URLs. + +2003-07-31 Paul Eggert <eggert@twinsun.com> + + * getdate.texi (Relative items in date strings): Warn about + fuzz in relative units. + +2003-07-29 Jim Meyering <jim@meyering.net> + + * coreutils.texi (tail invocation): Restore two end-of-sentence words + that were mistakenly removed on 2002-09-13. Reported by Paul Worrall. + +2003-07-28 Jim Meyering <jim@meyering.net> + + * coreutils.texi (dd invocation): Explain that a SIGUSR1 signal + makes dd give a progress report to stderr. + +2003-07-24 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi: Document changes of 2003-07-24. + +2003-07-24 Jim Meyering <jim@meyering.net> + + * coreutils.texi (su invocation): Use `@subsection', not invalid + `@heading'. + +2003-07-17 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (expr invocation): Exit status is 2 if the + expression is syntactically invalid, 3 if there is some other error. + This change is for conformance to POSIX. + +2003-07-14 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (uname invocation): Explain the POSIX + terminology behind uname -m and uname -s. + +2003-07-13 Jim Meyering <jim@meyering.net> + + * coreutils.texi (chown invocation): Warn that chown + now clears set-user-ID and set-group-ID bits on some systems. + From Bob Proulx. + (nohup invocation): Tell what happens when stdout is not a terminal. + Based on a suggestion from Steven Mocking. + +2003-07-10 Jim Meyering <jim@meyering.net> + + * coreutils.texi (Standards conformance): Mention that uses like + `tail -1' and `head -1', like `sort +1', are non conforming. + (chown invocation): Say that using `.' as a separator may not work. + +2003-06-25 Jim Meyering <jim@meyering.net> + + * coreutils.texi (Time directives) [%s]: Add a cross reference + to the related examples. + (Examples of date): Add an @anchor here, along with a few more examples. + Suggestion from Dan Jacobson. + +2003-06-12 Jim Meyering <jim@meyering.net> + + * coreutils.texi (wc invocation): Tweak wording: wc prints counts in + the order `newline, word, byte'. Suggestion from Keith M. Briggs. + Also change `lines' to `newlines'. + +2003-05-14 Jim Meyering <jim@meyering.net> + + * coreutils.texi (head invocation): Document --bytes=-N and --lines=-N. + +2003-05-13 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (uniq invocation, squeezing, The uniq command): + Use "repeated" rather than "duplicate" to describe adjacent + duplicates; this simplifies the description and makes it more + consistent with POSIX. + (uniq invocation): Make it clear that -d and -u suppress the + output of lines, rather than cause some lines to be output. + Mention what happens if a line lacks enough fields or characters. + +2003-05-13 Jim Meyering <jim@meyering.net> + + * coreutils.texi (true invocation): Mention that it is possible to + make true --help or true --version (in non-POSIX mode) exit nonzero. + Suggestion from Paul Eggert. + +2003-05-10 Jim Meyering <jim@meyering.net> + + * coreutils.texi (Exit status): Remove `uniq' from the list. + It uses standard exit codes. + (More details about version sort): Note that strverscmp, and hence + `ls -v', does not use LC_COLLATE. Reported by From: Andrey Borzenkov. + +2003-04-21 Jim Meyering <jim@meyering.net> + + Fix printf POSIX compatibility bug reported by Ben Harris in + <http://mail.gnu.org/archive/html/bug-coreutils/2003-04/msg00070.html>. + * coreutils.texi (printf invocation): It's \NNN in the format, + \0NNN in the %b operand. + +2003-04-10 Jim Meyering <jim@meyering.net> + + * Makefile.am (check-texinfo): Check for uses of non-zero. + I prefer to spell it `nonzero'. + + * coreutils.texi (readlink invocation): Tweak description a little. + +2003-04-04 Jim Meyering <jim@meyering.net> + + * Makefile.am (constants.texi): Rename target (thus enabling it), + now that fileutils, textutils, and sh-utils have been merged. + (MAINTAINERCLEANFILES): Define. + +2003-04-02 Jim Meyering <jim@meyering.net> + + * coreutils.texi (false invocation): Note that false exits + unsuccessfully even with --help and --version. + + * Makefile.am (check-texinfo): Don't fail if perl is missing. + Reported by Nelson Beebe. + +2003-03-27 Jim Meyering <jim@meyering.net> + + * coreutils.texi (printf invocation): Fix formatting bugs. + From Paul Eggert. + (sort invocation): Describe sort's --stable (-s) option. + +2003-03-13 Jim Meyering <jim@meyering.net> + + * coreutils.texi (shred invocation): Mention that --exact + is now the default for non-regular files. + +2003-03-02 Jim Meyering <jim@meyering.net> + + * coreutils.texi (Exit status): New section. + Suggestion from Michael Stone. + +2003-02-21 Jim Meyering <jim@meyering.net> + + * coreutils.texi (du invocation): Document --apparent-size. + Adjust documentation of --bytes (-b). + (stat invocation): Describe %B. + +2003-02-07 Richard Dawe <rich@phekda.freeserve.co.uk> + + * coreutils.texi: Use @command instead of @code for program names. + + * perm.texi (Mode Structure): Mention filesystem-specific + permissions and that mounting a filesystem as read-only may + override actual file permissions. Use @command instead + of @code for program names. + +2003-02-06 Jim Meyering <jim@meyering.net> + + * coreutils.texi: Adjust alignment and mention `file, text, shell' + on the `* Coreutils:...' dirently line. From Karl Berry. + +2003-02-05 Jim Meyering <jim@meyering.net> + + * Makefile.am (check-texinfo): Allow bare `POSIX' to be used on + direntry lines. + + * coreutils.texi: Use new form of @direntry. + Put unlink in its proper place. Adjust wording in some + dir entry descriptions, mainly so they fit in 80 columns. + Don't use mark-up like @acronym{POSIX} in direntries. + Mostly from Karl Berry. + +2003-01-25 Jim Meyering <jim@meyering.net> + + * coreutils.texi (cut invocation): Describe new functionality of + --output-delimiter=STR. + +2003-01-24 Jim Meyering <jim@meyering.net> + + * coreutils.texi (The cut command): Give an example of using cut -c + with an output delimiter. From Jan Nieuwenhuizen. + + * coreutils.texi (The cut command): Extend the new example a little. + (Formatting file timestamps): Fix typo: s/%M:S/%M:%S/. + + * coreutils.texi: Change each use of `Core-utils' to `Coreutils'. + From Karl Berry. + +2003-01-19 Jim Meyering <jim@meyering.net> + + * coreutils.texi (Which files are listed): Document new option: + --dereference-command-line-symlink-to-dir. + +2003-01-15 Paul Eggert <eggert@twinsun.com> + + Change ls -H back to the way it was yesterday, since this is + compatible with FreeBSD and the POSIX spec is confusing + and somewhat contradictory. + + * coreutils.texi (Which files are listed, General output + formatting): Undo last change. + +2003-01-15 Jim Meyering <jim@meyering.net> + + * coreutils.texi (General output formatting): Reflect option name change: + s/--dereference-command-line/--dereference-command-line-symlink-to-dir/. + Say that this option changes how ls treats only symlinks to directories + specified on the command line. + +2002-08-27 Dmitry V. Levin <ldv@altlinux.org> + + * coreutils.texi: Document readlink. + +2002-12-14 Jim Meyering <jim@meyering.net> + + * coreutils.texi (mknod invocation): Specify how major and minor mode + numbers are interpreted. Report forwarded by Kristin E Thomas. + +2002-11-13 Jim Meyering <jim@meyering.net> + + * coreutils.texi (Examples of expr): Remove bogus `^'s. + Reported by Thomas Goerlich. + +2002-11-09 Jim Meyering <jim@meyering.net> + + * coreutils.texi (What information is listed) [--dired]: + Correct parts of --dired description. Reported by Andre Spiegel. + Include a lot more description, with examples. + +2002-11-06 Jim Meyering <jim@meyering.net> + + * coreutils.texi (printf invocation): Fix typo in index: + change \0x prefix to \x. + Change \xhhh to \xhh. + +2002-10-07 Paul Eggert <eggert@twinsun.com> + + Add support for locale-specific size indications (e.g., + thousands-separators) and for explicit size suffixes on output. + + * coreutils.texi (Block size): Say that: + This affects display format as well as block size. + Fractional block counts are rounded up. + ls file size blocksize defaults to 1. + A block size spec preceded by ' generates thousands separators. + A suffix without a preceding integer generates suffixes. + (tail invocation): 32k -> 32 KiB. + (What information is listed): ls -h is now equivalent to + ls --block-size=human, and ls -H is now equivalent to + ls --block-size=si. Displayed file size is now always affected by + --block-size. + +2002-09-13 Jim Meyering <jim@meyering.net> + + * coreutils.texi (tail invocation): In --sleep-interval=NUMBER, + NUMBER may now be a floating point number. + (stat invocation): Remove references to now-removed %S and %C. + (Time directives) [%S]: Explain why the range is [0..60]. + +2002-08-30 Jim Meyering <jim@meyering.net> + + * coreutils.texi [START-INFO-DIR-ENTRY]: Don't use sc{} on LHS. + Fix typo: s/permission/permissions/. From Michail Litvak. + +2002-08-02 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (uniq invocation): uniq now obeys LC_COLLATE. + +2002-07-29 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (nohup invocation): Change behavior to conform to + POSIX 1003.1-2001: + - Do not adjust scheduling priority. + - Redirects stderr to stdout, if stderr is not a terminal. + - Exit status is now 126 if command was found but not invoked, + 127 if nohup failed or if command was not found. + +2002-07-24 Jim Meyering <jim@meyering.net> + + * coreutils.texi (Time directives): Document %P, %R, %e, %F, + %g, %G, and %V + +2002-07-22 Martin Michlmayr <tbm@cyrius.com> + + * coreutils.texi (Formatting the file names): Document + that -N/--literal are equivalent to --quoting-style=literal. + Reported by Oskar Liljeblad as Debian bug#103612. + +2002-07-10 Jim Meyering <jim@meyering.net> + + * coreutils.texi (du invocation): s/PAT/PATTERN/. + From Martin Michlmayr. + +2002-07-08 Jim Meyering <jim@meyering.net> + + * coreutils.texi (cp invocation): Remove unnecessary "$@" in example; + Texinfo would render the @" as an umlaut over the following character. + From Paul Eggert. + * Makefile.am (check-texinfo): Check for the above. + +2002-07-06 Jim Meyering <jim@meyering.net> + + * coreutils.texi (stat invocation): Remove description of --secure. + +2002-07-03 Jim Meyering <jim@meyering.net> + + * coreutils.texi (stat invocation): Rename --link/-l + to --dereference/-L. Rewrite description of --dereference. + +2002-06-26 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (Putting the tools together): Don't mention egrep, + since it's not part of POSIX 1003.1-2001. + +2002-06-21 Jim Meyering <jim@meyering.net> + + * coreutils.texi (stat invocation): New section. From Michael Meskes. + +2002-05-19 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (ls invocation): Document new option: --author. + +2002-06-03 Jim Meyering <jim@meyering.net> + + * coreutils.texi (rm invocation): Add the warning (also in the --help + output) that the contents of a removed file are often recoverable. + +2002-05-27 Jim Meyering <jim@meyering.net> + + * Makefile.am (check-texinfo): Adapt to reflect that now we use + @acronym{POSIX}. + +2002-05-26 Jim Meyering <jim@meyering.net> + + * coreutils.texi: Use @acronym in place of most uses of @sc. + * getdate.texi (Date input formats): Likewise. + +2002-04-28 Jim Meyering <jim@meyering.net> + + * coreutils.texi: Change `@code{PROG}' to `@command{PROG}'. + +2002-04-28 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (kill invocation): Document the above. + Document POSIX signals better. + +2002-04-15 Jim Meyering <jim@meyering.net> + + * coreutils.texi: Document kill. + Written by Marcus Brinkmann. + +2002-04-13 Jim Meyering <jim@meyering.net> + + * coreutils.texi: Document link and unlink. + +2002-04-08 Jim Meyering <jim@meyering.net> + + * coreutils.texi: Use new directives, @copying and @insertcopying, + thus now requiring texinfo-4.2 to create the .info file. + +2002-02-26 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (File characteristic tests): Document the + behavior of test -nt and -ot when one of the files does not exist, + using the same behavior that is documented in ksh93. + +2002-03-05 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (cut invocation): Say that selected input is + written in the same order that it is read, and is written + exactly once. + +2002-03-03 Paul Eggert <eggert@twinsun.com> + + Make cp -r equivalent to cp -R. Add a new cp option --copy-contents + for people who want to emulate the traditional (and rarely desirable) + cp -r behavior. + + * coreutils.texi (cp invocation): Document this. + Fix some related minor bugs: --no-dereference is no longer + equivalent to -d, and --archive (-a) can override the other + symlink options. Warn that cp -R is not portable on symbolic + links unless you also specify -P. + +2002-03-02 Jim Meyering <jim@meyering.net> + + * coreutils.texi (cp invocation): Document that cp -r + preserves symlinks. Emphasize non-portability of cp -r. + +2002-02-27 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (Time directives): Add %N for nanoseconds. + This documents the recent change to 'ls'. + +2002-02-28 Jim Meyering <jim@meyering.net> + + * coreutils.texi (pr invocation): Reword to avoid using `:' + in an @opindex entry -- info doesn't permit it. + +2002-02-27 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (Formatting file timestamps): Document new + time-formatting method: --time-style=+FORMAT. + +2002-02-18 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (seq invocation): In the example, use "tail + -n 3", not "tail -3", to conform to POSIX 1003.1-2001. + +2002-02-17 Jim Meyering <jim@meyering.net> + + * coreutils.texi (tsort background): New section. + From Ian Lance Taylor. + (tsort invocation): Add a more realistic example. + +2002-02-15 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi: Document _POSIX2_VERSION. + (Standards Conformance): New section. + +2002-01-24 Jim Meyering <jim@meyering.net> + + * coreutils.texi (START-INFO-DIR-ENTRY): Remove a few entries + and clean up a few others based on suggestions from Bob Proulx. + +2002-02-14 Paul Eggert <eggert@twinsun.com> + + Add support for POSIX 1003.1-2001, which requires removal for + support of obsolete "+" option syntax in sort, tail, and uniq. + * coreutils.texi: Document this. (Also, document a similar + change to "touch", for fileutils). + +2002-01-12 Jim Meyering <jim@meyering.net> + + * coreutils.texi (shred invocation): List some journaled filesystems. + +2001-11-10 Jim Meyering <jim@meyering.net> + + * coreutils.texi (Date directives): Document %u. + +2001-11-07 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (paste invocation): Give examples. + Thanks to Dan Jacobson for suggesting the examples. + +2001-11-05 Jim Meyering <jim@meyering.net> + + * coreutils.texi (sort invocation): Recommend setting LC_ALL=C, + not LC_COLLATE=C. Explain how the latter can cause problems. + Based on a message from Paul Eggert. + (ls invocation): Recommend setting LC_ALL=C, not LC_COLLATE=C. + +2001-10-21 Jim Meyering <jim@meyering.net> + + * coreutils.texi (cp invocation): Describe --reply=... + +2001-10-17 Jim Meyering <jim@meyering.net> + + * coreutils.texi (cp invocation): `cp --no-dereference' is + no longer equivalent to `cp -d'. + `cp -d' is equivalent to `--no-dereference --preserve=links'. + cp's -P option means --no-dereference, not --parents. + Describe new optional argument to --preserve. + Describe new option: --no-preserve=ATTRIBUTE_LIST. + +2001-09-23 Jim Meyering <jim@meyering.net> + + * Makefile.am (check-texinfo): Redirect stderr of `grep -w' to + /dev/null, so people with old versions of grep don't see the failure. + +2001-09-16 Jim Meyering <jim@meyering.net> + + * coreutils.texi (mv invocation): Describe new option: + --reply={yes,no,query}. Fix a few typos. + +2001-09-15 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (uniq invocation): The input need not + be sorted. Try to clarify -d versus -D versus -u. + +2001-09-12 Jim Meyering <jim@meyering.net> + + * coreutils.texi (tail invocation): Document new option: -F. + From Herbert Xu. + +2001-09-04 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi (join invocation): Describe the GNU + extension to join, which does not require sorted input when + the input contains no unpairable lines. + +2001-09-03 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi: + New 'uname' options -i or --hardware-platform, + and -o or --operating-system. + 'uname -a' now outputs -i and -o information at the end. + New uname option --kernel-version is an alias for -v. + Uname option --release has been renamed to --kernel-release, + and --sysname has been renamed to --kernel-name; + the old options will work for a while, but are no longer documented. + +2001-08-24 Herbert Xu <herbert@gondor.apana.org.au> + + * coreutils.texi (cut invocation): Document how cut treats lines + with no separators. + +2001-06-19 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi: expr now uses LC_COLLATE for string comparison, + as per POSIX. + +2001-08-25 Jim Meyering <jim@meyering.net> + + * coreutils.texi: Use @option, rather than @samp everywhere. + +2001-06-21 Paul Eggert <eggert@twinsun.com> + + * coreutils.texi: 'expr' now requires '+' rather than 'quote' + to quote tokens. + +2001-07-14 Jim Meyering <jim@meyering.net> + + * coreutils.texi (cp invocation): Reflect 2001-07-08 change to + cp (via copy.c). + +2001-06-16 Jim Meyering <jim@meyering.net> + + * Makefile.am (info_TEXINFOS): Reflect renaming: s/omni-/core/. + * coreutils.texi: Likewise. + + * coreutils.texi: New, renamed from omni-utils.texi. + * omni-utils.texi: Removed, renamed to coreutils.texi. + + * omni-utils.texi (ls invocation): Mention the effect of locale. + Reported by Keith Thompson. + +2001-05-24 Jim Meyering <jim@meyering.net> + + * texinfo.tex: Update from master source. + + * omni-utils.texi (ls invocation): Document more clearly what ls + does when given no arguments. + +2001-05-21 Jim Meyering <jim@meyering.net> + + * textutils.texi: Remove file. + + * Makefile.am ($(DVIS), $(INFO_DEPS)): Depend on $(EXTRA_DIST). + (DISABLED_constants.texi): New rule -- disabled for now. + + This directory is now shared by fileutils, textutils, and sh-utils. diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/doc/coreutils.info b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/doc/coreutils.info new file mode 100644 index 0000000..263ca12 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/doc/coreutils.info @@ -0,0 +1,14780 @@ +This is coreutils.info, produced by makeinfo version 4.8 from +coreutils.texi. + +INFO-DIR-SECTION Basics +START-INFO-DIR-ENTRY +* Coreutils: (coreutils). Core GNU (file, text, shell) utilities. +* Common options: (coreutils)Common options. Common options. +* File permissions: (coreutils)File permissions. Access modes. +* Date input formats: (coreutils)Date input formats. +END-INFO-DIR-ENTRY + +INFO-DIR-SECTION Individual utilities +START-INFO-DIR-ENTRY +* basename: (coreutils)basename invocation. Strip directory and suffix. +* cat: (coreutils)cat invocation. Concatenate and write files. +* chgrp: (coreutils)chgrp invocation. Change file groups. +* chmod: (coreutils)chmod invocation. Change file permissions. +* chown: (coreutils)chown invocation. Change file owners/groups. +* chroot: (coreutils)chroot invocation. Specify the root directory. +* cksum: (coreutils)cksum invocation. Print POSIX CRC checksum. +* comm: (coreutils)comm invocation. Compare sorted files by line. +* cp: (coreutils)cp invocation. Copy files. +* csplit: (coreutils)csplit invocation. Split by context. +* cut: (coreutils)cut invocation. Print selected parts of lines. +* date: (coreutils)date invocation. Print/set system date and time. +* dd: (coreutils)dd invocation. Copy and convert a file. +* df: (coreutils)df invocation. Report file system disk usage. +* dir: (coreutils)dir invocation. List directories briefly. +* dircolors: (coreutils)dircolors invocation. Color setup for ls. +* dirname: (coreutils)dirname invocation. Strip non-directory suffix. +* du: (coreutils)du invocation. Report on disk usage. +* echo: (coreutils)echo invocation. Print a line of text. +* env: (coreutils)env invocation. Modify the environment. +* expand: (coreutils)expand invocation. Convert tabs to spaces. +* expr: (coreutils)expr invocation. Evaluate expressions. +* factor: (coreutils)factor invocation. Print prime factors +* false: (coreutils)false invocation. Do nothing, unsuccessfully. +* fmt: (coreutils)fmt invocation. Reformat paragraph text. +* fold: (coreutils)fold invocation. Wrap long input lines. +* groups: (coreutils)groups invocation. Print group names a user is in. +* head: (coreutils)head invocation. Output the first part of files. +* hostid: (coreutils)hostid invocation. Print numeric host identifier. +* hostname: (coreutils)hostname invocation. Print or set system name. +* id: (coreutils)id invocation. Print real/effective uid/gid. +* install: (coreutils)install invocation. Copy and change attributes. +* join: (coreutils)join invocation. Join lines on a common field. +* kill: (coreutils)kill invocation. Send a signal to processes. +* link: (coreutils)link invocation. Make hard links between files. +* ln: (coreutils)ln invocation. Make links between files. +* logname: (coreutils)logname invocation. Print current login name. +* ls: (coreutils)ls invocation. List directory contents. +* md5sum: (coreutils)md5sum invocation. Print or check message-digests. +* mkdir: (coreutils)mkdir invocation. Create directories. +* mkfifo: (coreutils)mkfifo invocation. Create FIFOs (named pipes). +* mknod: (coreutils)mknod invocation. Create special files. +* mv: (coreutils)mv invocation. Rename files. +* nice: (coreutils)nice invocation. Modify scheduling priority. +* nl: (coreutils)nl invocation. Number lines and write files. +* nohup: (coreutils)nohup invocation. Immunize to hangups. +* od: (coreutils)od invocation. Dump files in octal, etc. +* paste: (coreutils)paste invocation. Merge lines of files. +* pathchk: (coreutils)pathchk invocation. Check file name portability. +* pr: (coreutils)pr invocation. Paginate or columnate files. +* printenv: (coreutils)printenv invocation. Print environment variables. +* printf: (coreutils)printf invocation. Format and print data. +* ptx: (coreutils)ptx invocation. Produce permuted indexes. +* pwd: (coreutils)pwd invocation. Print working directory. +* readlink: (coreutils)readlink invocation. Print referent of a symlink. +* rm: (coreutils)rm invocation. Remove files. +* rmdir: (coreutils)rmdir invocation. Remove empty directories. +* seq: (coreutils)seq invocation. Print numeric sequences +* shred: (coreutils)shred invocation. Remove files more securely. +* sleep: (coreutils)sleep invocation. Delay for a specified time. +* sort: (coreutils)sort invocation. Sort text files. +* split: (coreutils)split invocation. Split into fixed-size pieces. +* stat: (coreutils)stat invocation. Report file(system) status. +* stty: (coreutils)stty invocation. Print/change terminal settings. +* su: (coreutils)su invocation. Modify user and group id. +* sum: (coreutils)sum invocation. Print traditional checksum. +* sync: (coreutils)sync invocation. Synchronize memory and disk. +* tac: (coreutils)tac invocation. Reverse files. +* tail: (coreutils)tail invocation. Output the last part of files. +* tee: (coreutils)tee invocation. Redirect to multiple files. +* test: (coreutils)test invocation. File/string tests. +* touch: (coreutils)touch invocation. Change file timestamps. +* tr: (coreutils)tr invocation. Translate characters. +* true: (coreutils)true invocation. Do nothing, successfully. +* tsort: (coreutils)tsort invocation. Topological sort. +* tty: (coreutils)tty invocation. Print terminal name. +* uname: (coreutils)uname invocation. Print system information. +* unexpand: (coreutils)unexpand invocation. Convert spaces to tabs. +* uniq: (coreutils)uniq invocation. Uniquify files. +* unlink: (coreutils)unlink invocation. Removal via unlink(2). +* users: (coreutils)users invocation. Print current user names. +* vdir: (coreutils)vdir invocation. List directories verbosely. +* wc: (coreutils)wc invocation. Line, word, and byte counts. +* who: (coreutils)who invocation. Print who is logged in. +* whoami: (coreutils)whoami invocation. Print effective user id. +* yes: (coreutils)yes invocation. Print a string indefinitely. +END-INFO-DIR-ENTRY + + This manual documents version 5.3.0 of the GNU core utilities, +including the standard programs for text and file manipulation. + + Copyright (C) 1994, 1995, 1996, 2000, 2001, 2002, 2003, 2004 Free +Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.1 or any later version published by the Free Software + Foundation; with no Invariant Sections, with no Front-Cover Texts, + and with no Back-Cover Texts. A copy of the license is included + in the section entitled "GNU Free Documentation License". + + +File: coreutils.info, Node: Top, Next: Introduction, Up: (dir) + +GNU Coreutils +************* + +This manual documents version 5.3.0 of the GNU core utilities, +including the standard programs for text and file manipulation. + + Copyright (C) 1994, 1995, 1996, 2000, 2001, 2002, 2003, 2004 Free +Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.1 or any later version published by the Free Software + Foundation; with no Invariant Sections, with no Front-Cover Texts, + and with no Back-Cover Texts. A copy of the license is included + in the section entitled "GNU Free Documentation License". + +* Menu: + +* Introduction:: Caveats, overview, and authors. +* Common options:: Common options. +* Output of entire files:: cat tac nl od +* Formatting file contents:: fmt pr fold +* Output of parts of files:: head tail split csplit +* Summarizing files:: wc sum cksum md5sum +* Operating on sorted files:: sort uniq comm ptx tsort +* Operating on fields within a line:: cut paste join +* Operating on characters:: tr expand unexpand +* Directory listing:: ls dir vdir d v dircolors +* Basic operations:: cp dd install mv rm shred +* Special file types:: ln mkdir rmdir mkfifo mknod +* Changing file attributes:: chgrp chmod chown touch +* Disk usage:: df du stat sync +* Printing text:: echo printf yes +* Conditions:: false true test expr +* Redirection:: tee +* File name manipulation:: dirname basename pathchk +* Working context:: pwd stty printenv tty +* User information:: id logname whoami groups users who +* System context:: date uname hostname +* Modified command invocation:: chroot env nice nohup su +* Process control:: kill +* Delaying:: sleep +* Numeric operations:: factor seq +* File permissions:: Access modes. +* Date input formats:: Specifying date strings. +* Opening the software toolbox:: The software tools philosophy. +* GNU Free Documentation License:: The license for this documentation. +* Index:: General index. + + --- The Detailed Node Listing --- + +Common Options + +* Exit status:: Indicating program success or failure. +* Backup options:: Backup options +* Block size:: Block size +* Target directory:: Target directory +* Trailing slashes:: Trailing slashes +* Traversing symlinks:: Traversing symlinks to directories +* Treating / specially:: Treating / specially +* Standards conformance:: Standards conformance + +Output of entire files + +* cat invocation:: Concatenate and write files. +* tac invocation:: Concatenate and write files in reverse. +* nl invocation:: Number lines and write files. +* od invocation:: Write files in octal or other formats. + +Formatting file contents + +* fmt invocation:: Reformat paragraph text. +* pr invocation:: Paginate or columnate files for printing. +* fold invocation:: Wrap input lines to fit in specified width. + +Output of parts of files + +* head invocation:: Output the first part of files. +* tail invocation:: Output the last part of files. +* split invocation:: Split a file into fixed-size pieces. +* csplit invocation:: Split a file into context-determined pieces. + +Summarizing files + +* wc invocation:: Print newline, word, and byte counts. +* sum invocation:: Print checksum and block counts. +* cksum invocation:: Print CRC checksum and byte counts. +* md5sum invocation:: Print or check message-digests. + +Operating on sorted files + +* sort invocation:: Sort text files. +* uniq invocation:: Uniquify files. +* comm invocation:: Compare two sorted files line by line. +* ptx invocation:: Produce a permuted index of file contents. +* tsort invocation:: Topological sort. + +`ptx': Produce permuted indexes + +* General options in ptx:: Options which affect general program behavior. +* Charset selection in ptx:: Underlying character set considerations. +* Input processing in ptx:: Input fields, contexts, and keyword selection. +* Output formatting in ptx:: Types of output format, and sizing the fields. +* Compatibility in ptx:: The GNU extensions to `ptx' + +Operating on fields within a line + +* cut invocation:: Print selected parts of lines. +* paste invocation:: Merge lines of files. +* join invocation:: Join lines on a common field. + +Operating on characters + +* tr invocation:: Translate, squeeze, and/or delete characters. +* expand invocation:: Convert tabs to spaces. +* unexpand invocation:: Convert spaces to tabs. + +`tr': Translate, squeeze, and/or delete characters + +* Character sets:: Specifying sets of characters. +* Translating:: Changing one set of characters to another. +* Squeezing:: Squeezing repeats and deleting. + +Directory listing + +* ls invocation:: List directory contents +* dir invocation:: Briefly list directory contents +* vdir invocation:: Verbosely list directory contents +* dircolors invocation:: Color setup for `ls' + +`ls': List directory contents + +* Which files are listed:: Which files are listed +* What information is listed:: What information is listed +* Sorting the output:: Sorting the output +* More details about version sort:: More details about version sort +* General output formatting:: General output formatting +* Formatting the file names:: Formatting the file names + +Basic operations + +* cp invocation:: Copy files and directories +* dd invocation:: Convert and copy a file +* install invocation:: Copy files and set attributes +* mv invocation:: Move (rename) files +* rm invocation:: Remove files or directories +* shred invocation:: Remove files more securely + +Special file types + +* link invocation:: Make a hard link via the link syscall +* ln invocation:: Make links between files +* mkdir invocation:: Make directories +* mkfifo invocation:: Make FIFOs (named pipes) +* mknod invocation:: Make block or character special files +* readlink invocation:: Print the referent of a symbolic link +* rmdir invocation:: Remove empty directories +* unlink invocation:: Remove files via unlink syscall + +Changing file attributes + +* chown invocation:: Change file owner and group +* chgrp invocation:: Change group ownership +* chmod invocation:: Change access permissions +* touch invocation:: Change file timestamps + +Disk usage + +* df invocation:: Report file system disk space usage +* du invocation:: Estimate file space usage +* stat invocation:: Report file or file system status +* sync invocation:: Synchronize data on disk with memory + +Printing text + +* echo invocation:: Print a line of text +* printf invocation:: Format and print data +* yes invocation:: Print a string until interrupted + +Conditions + +* false invocation:: Do nothing, unsuccessfully +* true invocation:: Do nothing, successfully +* test invocation:: Check file types and compare values +* expr invocation:: Evaluate expressions + +`test': Check file types and compare values + +* File type tests:: File type tests +* Access permission tests:: Access permission tests +* File characteristic tests:: File characteristic tests +* String tests:: String tests +* Numeric tests:: Numeric tests + +`expr': Evaluate expression + +* String expressions:: + : match substr index length +* Numeric expressions:: + - * / % +* Relations for expr:: | & < <= = == != >= > +* Examples of expr:: Examples of using `expr' + +Redirection + +* tee invocation:: Redirect output to multiple files + +File name manipulation + +* basename invocation:: Strip directory and suffix from a file name +* dirname invocation:: Strip non-directory suffix from a file name +* pathchk invocation:: Check file name portability + +Working context + +* pwd invocation:: Print working directory +* stty invocation:: Print or change terminal characteristics +* printenv invocation:: Print all or some environment variables +* tty invocation:: Print file name of terminal on standard input + +`stty': Print or change terminal characteristics + +* Control:: Control settings +* Input:: Input settings +* Output:: Output settings +* Local:: Local settings +* Combination:: Combination settings +* Characters:: Special characters +* Special:: Special settings + +User information + +* id invocation:: Print real and effective uid and gid +* logname invocation:: Print current login name +* whoami invocation:: Print effective user id +* groups invocation:: Print group names a user is in +* users invocation:: Print login names of users currently logged in +* who invocation:: Print who is currently logged in + +System context + +* date invocation:: Print or set system date and time +* uname invocation:: Print system information +* hostname invocation:: Print or set system name +* hostid invocation:: Print numeric host identifier. + +`date': Print or set system date and time + +* Time directives:: Time directives +* Date directives:: Date directives +* Literal directives:: Literal directives +* Padding:: Padding +* Setting the time:: Setting the time +* Options for date:: Options for `date' +* Examples of date:: Examples of `date' + +Modified command invocation + +* chroot invocation:: Run a command with a different root directory +* env invocation:: Run a command in a modified environment +* nice invocation:: Run a command with modified scheduling priority +* nohup invocation:: Run a command immune to hangups +* su invocation:: Run a command with substitute user and group id + +Process control + +* kill invocation:: Sending a signal to processes. + +Delaying + +* sleep invocation:: Delay for a specified time + +Numeric operations + +* factor invocation:: Print prime factors +* seq invocation:: Print numeric sequences + +File permissions + +* Mode Structure:: Structure of File Permissions +* Symbolic Modes:: Mnemonic permissions representation +* Numeric Modes:: Permissions as octal numbers + +Date input formats + +* General date syntax:: Common rules. +* Calendar date items:: 19 Dec 1994. +* Time of day items:: 9:20pm. +* Time zone items:: EST, PDT, GMT. +* Day of week items:: Monday and others. +* Relative items in date strings:: next tuesday, 2 years ago. +* Pure numbers in date strings:: 19931219, 1440. +* Seconds since the Epoch:: @1078100502. +* Specifying time zone rules:: TZ="America/New_York", TZ="UTC0". +* Authors of get_date:: Bellovin, Eggert, Salz, Berets, et al. + +Opening the software toolbox + +* Toolbox introduction:: Toolbox introduction +* I/O redirection:: I/O redirection +* The who command:: The `who' command +* The cut command:: The `cut' command +* The sort command:: The `sort' command +* The uniq command:: The `uniq' command +* Putting the tools together:: Putting the tools together + +GNU Free Documentation License + +* How to use this License for your documents:: + + +File: coreutils.info, Node: Introduction, Next: Common options, Prev: Top, Up: Top + +1 Introduction +************** + +This manual is a work in progress: many sections make no attempt to +explain basic concepts in a way suitable for novices. Thus, if you are +interested, please get involved in improving this manual. The entire +GNU community will benefit. + + The GNU utilities documented here are mostly compatible with the +POSIX standard. Please report bugs to <bug-coreutils@gnu.org>. +Remember to include the version number, machine architecture, input +files, and any other information needed to reproduce the bug: your +input, what you expected, what you got, and why it is wrong. Diffs are +welcome, but please include a description of the problem as well, since +this is sometimes difficult to infer. *Note Bugs: (gcc)Bugs. + + This manual was originally derived from the Unix man pages in the +distributions, which were written by David MacKenzie and updated by Jim +Meyering. What you are reading now is the authoritative documentation +for these utilities; the man pages are no longer being maintained. The +original `fmt' man page was written by Ross Paterson. Franc,ois Pinard +did the initial conversion to Texinfo format. Karl Berry did the +indexing, some reorganization, and editing of the results. Brian +Youmans of the Free Software Foundation office staff combined the +manuals for textutils, fileutils, and sh-utils to produce the present +omnibus manual. Richard Stallman contributed his usual invaluable +insights to the overall process. + + +File: coreutils.info, Node: Common options, Next: Output of entire files, Prev: Introduction, Up: Top + +2 Common options +**************** + +Certain options are available in all of these programs. Rather than +writing identical descriptions for each of the programs, they are +described here. (In fact, every GNU program accepts (or should accept) +these options.) + + Normally options and operands can appear in any order, and programs +act as if all the options appear before any operands. For example, +`sort -r passwd -t :' acts like `sort -r -t : passwd', since `:' is an +option-argument of `-t'. However, if the `POSIXLY_CORRECT' environment +variable is set, options must appear before operands, unless otherwise +specified for a particular command. + + A few programs can usefully have trailing operands with leading `-'. +With such a program, options must precede operands even if +`POSIXLY_CORRECT' is not set, and this fact is noted in the program +description. For example, the `env' command's options must appear +before its operands, since in some cases the operands specify a command +that itself contains options. + + Some of these programs recognize the `--help' and `--version' +options only when one of them is the sole command line argument. + +`--help' + Print a usage message listing all available options, then exit + successfully. + +`--version' + Print the version number, then exit successfully. + +`--' + Delimit the option list. Later arguments, if any, are treated as + operands even if they begin with `-'. For example, `sort -- -r' + reads from the file named `-r'. + + + A single `-' operand is not really an option, though it looks like +one. It stands for standard input, or for standard output if that is +clear from the context. For example, `sort -' reads from standard +input, and is equivalent to plain `sort', and `tee -' writes an extra +copy of its input to standard output. Unless otherwise specified, `-' +can appear as any operand that requires a file name. + +* Menu: + +* Exit status:: Indicating program success or failure. +* Backup options:: -b -S -V, in some programs. +* Block size:: BLOCK_SIZE and --block-size, in some programs. +* Target directory:: Specifying a target directory, in some programs. +* Trailing slashes:: --strip-trailing-slashes, in some programs. +* Traversing symlinks:: -H, -L, or -P, in some programs. +* Treating / specially:: --preserve-root and --no-preserve-root. +* Special built-in utilities:: `break', `:', `eval', ... +* Standards conformance:: Conformance to the POSIX standard. + + +File: coreutils.info, Node: Exit status, Next: Backup options, Up: Common options + +2.1 Exit status +=============== + +Nearly every command invocation yields an integral "exit status" that +can be used to change how other commands work. For the vast majority +of commands, an exit status of zero indicates success. Failure is +indicated by a nonzero value--typically `1', though it may differ on +unusual platforms as POSIX requires only that it be nonzero. + + However, some of the programs documented here do produce other exit +status values and a few associate different meanings with the values +`0' and `1'. Here are some of the exceptions: `chroot', `env', `expr', +`nice', `nohup', `printenv', `sort', `su', `test', `tty'. + + +File: coreutils.info, Node: Backup options, Next: Block size, Prev: Exit status, Up: Common options + +2.2 Backup options +================== + +Some GNU programs (at least `cp', `install', `ln', and `mv') optionally +make backups of files before writing new versions. These options +control the details of these backups. The options are also briefly +mentioned in the descriptions of the particular programs. + +`-b' +`--backup[=METHOD]' + Make a backup of each file that would otherwise be overwritten or + removed. Without this option, the original versions are destroyed. + Use METHOD to determine the type of backups to make. When this + option is used but METHOD is not specified, then the value of the + `VERSION_CONTROL' environment variable is used. And if + `VERSION_CONTROL' is not set, the default backup type is + `existing'. + + Note that the short form of this option, `-b' does not accept any + argument. Using `-b' is equivalent to using `--backup=existing'. + + This option corresponds to the Emacs variable `version-control'; + the values for METHOD are the same as those used in Emacs. This + option also accepts more descriptive names. The valid METHODs are + (unique abbreviations are accepted): + + `none' + `off' + Never make backups. + + `numbered' + `t' + Always make numbered backups. + + `existing' + `nil' + Make numbered backups of files that already have them, simple + backups of the others. + + `simple' + `never' + Always make simple backups. Please note `never' is not to be + confused with `none'. + + +`-S SUFFIX' +`--suffix=SUFFIX' + Append SUFFIX to each backup file made with `-b'. If this option + is not specified, the value of the `SIMPLE_BACKUP_SUFFIX' + environment variable is used. And if `SIMPLE_BACKUP_SUFFIX' is not + set, the default is `~', just as in Emacs. + +`--version-control=METHOD' + This option is obsolete and will be removed in a future release. + It has been replaced with `--backup'. + + + +File: coreutils.info, Node: Block size, Next: Target directory, Prev: Backup options, Up: Common options + +2.3 Block size +============== + +Some GNU programs (at least `df', `du', and `ls') display sizes in +"blocks". You can adjust the block size and method of display to make +sizes easier to read. The block size used for display is independent +of any file system block size. Fractional block counts are rounded up +to the nearest integer. + + The default block size is chosen by examining the following +environment variables in turn; the first one that is set determines the +block size. + +`DF_BLOCK_SIZE' + This specifies the default block size for the `df' command. + Similarly, `DU_BLOCK_SIZE' specifies the default for `du' and + `LS_BLOCK_SIZE' for `ls'. + +`BLOCK_SIZE' + This specifies the default block size for all three commands, if + the above command-specific environment variables are not set. + +`BLOCKSIZE' + This specifies the default block size for all values that are + normally printed as blocks, if neither `BLOCK_SIZE' nor the above + command-specific environment variables are set. Unlike the other + environment variables, `BLOCKSIZE' does not affect values that are + normally printed as byte counts, e.g., the file sizes contained in + `ls -l' output. + +`POSIXLY_CORRECT' + If neither `COMMAND_BLOCK_SIZE', nor `BLOCK_SIZE', nor `BLOCKSIZE' + is set, but this variable is set, the block size defaults to 512. + + + If none of the above environment variables are set, the block size +currently defaults to 1024 bytes in most contexts, but this number may +change in the future. For `ls' file sizes, the block size defaults to +1 byte. + + A block size specification can be a positive integer specifying the +number of bytes per block, or it can be `human-readable' or `si' to +select a human-readable format. Integers may be followed by suffixes +that are upward compatible with the SI prefixes +(http://www.bipm.fr/enus/3_SI/si-prefixes.html) for decimal multiples +and with the IEC 60027-2 prefixes for binary multiples +(http://physics.nist.gov/cuu/Units/binary.html). + + With human-readable formats, output sizes are followed by a size +letter such as `M' for megabytes. `BLOCK_SIZE=human-readable' uses +powers of 1024; `M' stands for 1,048,576 bytes. `BLOCK_SIZE=si' is +similar, but uses powers of 1000 and appends `B'; `MB' stands for +1,000,000 bytes. + + A block size specification preceded by `'' causes output sizes to be +displayed with thousands separators. The `LC_NUMERIC' locale specifies +the thousands separator and grouping. For example, in an American +English locale, `--block-size="'1kB"' would cause a size of 1234000 +bytes to be displayed as `1,234'. In the default C locale, there is no +thousands separator so a leading `'' has no effect. + + An integer block size can be followed by a suffix to specify a +multiple of that size. A bare size letter, or one followed by `iB', +specifies a multiple using powers of 1024. A size letter followed by +`B' specifies powers of 1000 instead. For example, `1M' and `1MiB' are +equivalent to `1048576', whereas `1MB' is equivalent to `1000000'. + + A plain suffix without a preceding integer acts as if `1' were +prepended, except that it causes a size indication to be appended to +the output. For example, `--block-size="kB"' displays 3000 as `3kB'. + + The following suffixes are defined. Large sizes like `1Y' may be +rejected by your computer due to limitations of its arithmetic. + +`kB' + kilobyte: 10^3 = 1000. + +`k' +`K' +`KiB' + kibibyte: 2^10 = 1024. `K' is special: the SI prefix is `k' and + the IEC 60027-2 prefix is `Ki', but tradition and POSIX use `k' to + mean `KiB'. + +`MB' + megabyte: 10^6 = 1,000,000. + +`M' +`MiB' + mebibyte: 2^20 = 1,048,576. + +`GB' + gigabyte: 10^9 = 1,000,000,000. + +`G' +`GiB' + gibibyte: 2^30 = 1,073,741,824. + +`TB' + terabyte: 10^12 = 1,000,000,000,000. + +`T' +`TiB' + tebibyte: 2^40 = 1,099,511,627,776. + +`PB' + petabyte: 10^15 = 1,000,000,000,000,000. + +`P' +`PiB' + pebibyte: 2^50 = 1,125,899,906,842,624. + +`EB' + exabyte: 10^18 = 1,000,000,000,000,000,000. + +`E' +`EiB' + exbibyte: 2^60 = 1,152,921,504,606,846,976. + +`ZB' + zettabyte: 10^21 = 1,000,000,000,000,000,000,000 + +`Z' +`ZiB' + 2^70 = 1,180,591,620,717,411,303,424. (`Zi' is a GNU extension to + IEC 60027-2.) + +`YB' + yottabyte: 10^24 = 1,000,000,000,000,000,000,000,000. + +`Y' +`YiB' + 2^80 = 1,208,925,819,614,629,174,706,176. (`Yi' is a GNU + extension to IEC 60027-2.) + + Block size defaults can be overridden by an explicit +`--block-size=SIZE' option. The `-k' option is equivalent to +`--block-size=1K', which is the default unless the `POSIXLY_CORRECT' +environment variable is set. The `-h' or `--human-readable' option is +equivalent to `--block-size=human-readable'. The `--si' option is +equivalent to `--block-size=si'. + + +File: coreutils.info, Node: Target directory, Next: Trailing slashes, Prev: Block size, Up: Common options + +2.4 Target directory +==================== + +The `cp', `install', `ln', and `mv' commands normally treat the last +operand specially when it is a directory or a symbolic link to a +directory. For example, `cp source dest' is equivalent to `cp source +dest/source' if `dest' is a directory. Sometimes this behavior is not +exactly what is wanted, so these commands support the following options +to allow more fine-grained control: + +`-T' +`--no-target-directory' + Do not treat the last operand specially when it is a directory or a + symbolic link to a directory. This can help avoid race conditions + in programs that operate in a shared area. For example, when the + command `mv /tmp/source /tmp/dest' succeeds, there is no guarantee + that `/tmp/source' was renamed to `/tmp/dest': it could have been + renamed to `/tmp/dest/source' instead, if some other process + created `/tmp/dest' as a directory. However, if `mv -T + /tmp/source /tmp/dest' succeeds, there is no question that + `/tmp/source' was renamed to `/tmp/dest'. + + In the opposite situation, where you want the last operand to be + treated as a directory and want a diagnostic otherwise, you can use + the `--target-directory' (`-t') option. + +`-t DIRECTORY' +`--target-directory=DIRECTORY' + Use DIRECTORY as the directory component of each destination file + name. + + The interface for most programs is that after processing options + and a finite (possibly zero) number of fixed-position arguments, + the remaining argument list is either expected to be empty, or is + a list of items (usually files) that will all be handled + identically. The `xargs' program is designed to work well with + this convention. + + The commands in the `mv'-family are unusual in that they take a + variable number of arguments with a special case at the _end_ + (namely, the target directory). This makes it nontrivial to + perform some operations, e.g., "move all files from here to + ../d/", because `mv * ../d/' might exhaust the argument space, and + `ls | xargs ...' doesn't have a clean way to specify an extra + final argument for each invocation of the subject command. (It + can be done by going through a shell command, but that requires + more human labor and brain power than it should.) + + The `--target-directory' (`-t') option allows the `cp', `install', + `ln', and `mv' programs to be used conveniently with `xargs'. For + example, you can move the files from the current directory to a + sibling directory, `d' like this: + + ls | xargs mv -t ../d -- + + However, this doesn't move files whose names begin with `.'. If + you use the GNU `find' program, you can move those files too, with + this command: + + find . -mindepth 1 -maxdepth 1 \ + | xargs mv -t ../d + + But both of the above approaches fail if there are no files in the + current directory, or if any file has a name containing a blank or + some other special characters. The following example removes + those limitations and requires both GNU `find' and GNU `xargs': + + find . -mindepth 1 -maxdepth 1 -print0 \ + | xargs --null --no-run-if-empty \ + mv -t ../d + + +The `--target-directory' (`-t') and `--no-target-directory' (`-T') +options cannot be combined. + + +File: coreutils.info, Node: Trailing slashes, Next: Traversing symlinks, Prev: Target directory, Up: Common options + +2.5 Trailing slashes +==================== + +Some GNU programs (at least `cp' and `mv') allow you to remove any +trailing slashes from each SOURCE argument before operating on it. The +`--strip-trailing-slashes' option enables this behavior. + + This is useful when a SOURCE argument may have a trailing slash and +specify a symbolic link to a directory. This scenario is in fact rather +common because some shells can automatically append a trailing slash +when performing file name completion on such symbolic links. Without +this option, `mv', for example, (via the system's rename function) must +interpret a trailing slash as a request to dereference the symbolic link +and so must rename the indirectly referenced _directory_ and not the +symbolic link. Although it may seem surprising that such behavior be +the default, it is required by POSIX and is consistent with other parts +of that standard. + + +File: coreutils.info, Node: Traversing symlinks, Next: Treating / specially, Prev: Trailing slashes, Up: Common options + +2.6 Traversing symlinks +======================= + +The following options modify how `chown' and `chgrp' traverse a +hierarchy when the `--recursive' (`-R') option is also specified. If +more than one of the following options is specified, only the final one +takes effect. These options specify whether processing a symbolic link +to a directory entails operating on just the symbolic link or on all +files in the hierarchy rooted at that directory. + + These options are independent of `--dereference' and +`--no-dereference' (`-h'), which control whether to modify a symlink or +its referent. + +`-H' + If `--recursive' (`-R') is specified and a command line argument + is a symbolic link to a directory, traverse it. + +`-L' + In a recursive traversal, traverse every symbolic link to a + directory that is encountered. + +`-P' + Do not traverse any symbolic links. This is the default if none + of `-H', `-L', or `-P' is specified. + + + +File: coreutils.info, Node: Treating / specially, Next: Special built-in utilities, Prev: Traversing symlinks, Up: Common options + +2.7 Treating / specially +======================== + +Certain commands can operate destructively on entire hierarchies. For +example, if a user with appropriate privileges mistakenly runs `rm -rf +/ tmp/junk' or `cd /bin; rm -rf ../', that may remove all files on the +entire system. Since there are so few (1) legitimate uses for such a +command, GNU `rm' provides the `--preserve-root' option to make it so +`rm' declines to operate on any directory that resolves to `/'. The +default is still to allow `rm -rf /' to operate unimpeded. Another new +option, `--no-preserve-root', cancels the effect of any preceding +`--preserve-root' option. Note that the `--preserve-root' behavior may +become the default for `rm'. + + The commands `chgrp', `chmod' and `chown' can also operate +destructively on entire hierarchies, so they too support these options. +Although, unlike `rm', they don't actually unlink files, these +commands are arguably more dangerous when operating recursively on `/', +since they often work much more quickly, and hence damage more files +before an alert user can interrupt them. + + ---------- Footnotes ---------- + + (1) If you know of one, please write to <bug-coreutils@gnu.org>. + + +File: coreutils.info, Node: Special built-in utilities, Next: Standards conformance, Prev: Treating / specially, Up: Common options + +2.8 Special built-in utilities +============================== + +Some programs like `nice' can invoke other programs; for example, the +command `nice cat file' invokes the program `cat' by executing the +command `cat file'. However, "special built-in utilities" like `exit' +cannot be invoked this way. For example, the command `nice exit' does +not have a well-defined behavior: it may generate an error message +instead of exiting. + + Here is a list of the special built-in utilities that are +standardized by POSIX 1003.1-2004. + + . : break continue eval exec exit export readonly return set shift + times trap unset + + For example, because `.', `:', and `exec' are special, the commands +`nice . foo.sh', `nice :', and `nice exec pwd' do not work as you might +expect. + + Many shells extend this list. For example, Bash has several extra +special built-in utilities like `history', and `suspend', and with Bash +the command `nice suspend' generates an error message instead of +suspending. + + +File: coreutils.info, Node: Standards conformance, Prev: Special built-in utilities, Up: Common options + +2.9 Standards conformance +========================= + +In a few cases, the GNU utilities' default behavior is incompatible +with the POSIX standard. To suppress these incompatibilities, define +the `POSIXLY_CORRECT' environment variable. Unless you are checking +for POSIX conformance, you probably do not need to define +`POSIXLY_CORRECT'. + + Newer versions of POSIX are occasionally incompatible with older +versions. For example, older versions of POSIX required the command +`sort +1' to sort based on the second and succeeding fields in each +input line, but starting with POSIX 1003.1-2001 the same command is +required to sort the file named `+1', and you must instead use the +command `sort -k 2' to get the field-based sort. + + The GNU utilities normally conform to the version of POSIX that is +standard for your system. To cause them to conform to a different +version of POSIX, define the `_POSIX2_VERSION' environment variable to +a value of the form YYYYMM specifying the year and month the standard +was adopted. Two values are currently supported for `_POSIX2_VERSION': +`199209' stands for POSIX 1003.2-1992, and `200112' stands for POSIX +1003.1-2001. For example, if you are running older software that +assumes an older version of POSIX and uses `sort +1', `head -10', or +`tail +10', you can work around the compatibility problems by setting +`_POSIX2_VERSION=199209' in your environment. + + +File: coreutils.info, Node: Output of entire files, Next: Formatting file contents, Prev: Common options, Up: Top + +3 Output of entire files +************************ + +These commands read and write entire files, possibly transforming them +in some way. + +* Menu: + +* cat invocation:: Concatenate and write files. +* tac invocation:: Concatenate and write files in reverse. +* nl invocation:: Number lines and write files. +* od invocation:: Write files in octal or other formats. + + +File: coreutils.info, Node: cat invocation, Next: tac invocation, Up: Output of entire files + +3.1 `cat': Concatenate and write files +====================================== + +`cat' copies each FILE (`-' means standard input), or standard input if +none are given, to standard output. Synopsis: + + cat [OPTION] [FILE]... + + The program accepts the following options. Also see *Note Common +options::. + +`-A' +`--show-all' + Equivalent to `-vET'. + +`-B' +`--binary' + On MS-DOS and MS-Windows only, read and write the files in binary + mode. By default, `cat' on MS-DOS/MS-Windows uses binary mode + only when standard output is redirected to a file or a pipe; this + option overrides that. Binary file I/O is used so that the files + retain their format (Unix text as opposed to DOS text and binary), + because `cat' is frequently used as a file-copying program. Some + options (see below) cause `cat' to read and write files in text + mode because in those cases the original file contents aren't + important (e.g., when lines are numbered by `cat', or when line + endings should be marked). This is so these options work as + DOS/Windows users would expect; for example, DOS-style text files + have their lines end with the CR-LF pair of characters, which + won't be processed as an empty line by `-b' unless the file is + read in text mode. + +`-b' +`--number-nonblank' + Number all nonblank output lines, starting with 1. On MS-DOS and + MS-Windows, this option causes `cat' to read and write files in + text mode. + +`-e' + Equivalent to `-vE'. + +`-E' +`--show-ends' + Display a `$' after the end of each line. On MS-DOS and + MS-Windows, this option causes `cat' to read and write files in + text mode. + +`-n' +`--number' + Number all output lines, starting with 1. On MS-DOS and + MS-Windows, this option causes `cat' to read and write files in + text mode. + +`-s' +`--squeeze-blank' + Replace multiple adjacent blank lines with a single blank line. On + MS-DOS and MS-Windows, this option causes `cat' to read and write + files in text mode. + +`-t' + Equivalent to `-vT'. + +`-T' +`--show-tabs' + Display TAB characters as `^I'. + +`-u' + Ignored; for Unix compatibility. + +`-v' +`--show-nonprinting' + Display control characters except for LFD and TAB using `^' + notation and precede characters that have the high bit set with + `M-'. On MS-DOS and MS-Windows, this option causes `cat' to read + files and standard input in DOS binary mode, so the CR characters + at the end of each line are also visible. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: tac invocation, Next: nl invocation, Prev: cat invocation, Up: Output of entire files + +3.2 `tac': Concatenate and write files in reverse +================================================= + +`tac' copies each FILE (`-' means standard input), or standard input if +none are given, to standard output, reversing the records (lines by +default) in each separately. Synopsis: + + tac [OPTION]... [FILE]... + + "Records" are separated by instances of a string (newline by +default). By default, this separator string is attached to the end of +the record that it follows in the file. + + The program accepts the following options. Also see *Note Common +options::. + +`-b' +`--before' + The separator is attached to the beginning of the record that it + precedes in the file. + +`-r' +`--regex' + Treat the separator string as a regular expression. Users of `tac' + on MS-DOS/MS-Windows should note that, since `tac' reads files in + binary mode, each line of a text file might end with a CR/LF pair + instead of the Unix-style LF. + +`-s SEPARATOR' +`--separator=SEPARATOR' + Use SEPARATOR as the record separator, instead of newline. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: nl invocation, Next: od invocation, Prev: tac invocation, Up: Output of entire files + +3.3 `nl': Number lines and write files +====================================== + +`nl' writes each FILE (`-' means standard input), or standard input if +none are given, to standard output, with line numbers added to some or +all of the lines. Synopsis: + + nl [OPTION]... [FILE]... + + `nl' decomposes its input into (logical) pages; by default, the line +number is reset to 1 at the top of each logical page. `nl' treats all +of the input files as a single document; it does not reset line numbers +or logical pages between files. + + A logical page consists of three sections: header, body, and footer. +Any of the sections can be empty. Each can be numbered in a different +style from the others. + + The beginnings of the sections of logical pages are indicated in the +input file by a line containing exactly one of these delimiter strings: + +`\:\:\:' + start of header; + +`\:\:' + start of body; + +`\:' + start of footer. + + The two characters from which these strings are made can be changed +from `\' and `:' via options (see below), but the pattern and length of +each string cannot be changed. + + A section delimiter is replaced by an empty line on output. Any text +that comes before the first section delimiter string in the input file +is considered to be part of a body section, so `nl' treats a file that +contains no section delimiters as a single body section. + + The program accepts the following options. Also see *Note Common +options::. + +`-b STYLE' +`--body-numbering=STYLE' + Select the numbering style for lines in the body section of each + logical page. When a line is not numbered, the current line number + is not incremented, but the line number separator character is + still prepended to the line. The styles are: + + `a' + number all lines, + + `t' + number only nonempty lines (default for body), + + `n' + do not number lines (default for header and footer), + + `pBRE' + number only lines that contain a match for the basic regular + expression BRE. *Note Regular Expressions: (grep)Regular + Expressions. + +`-d CD' +`--section-delimiter=CD' + Set the section delimiter characters to CD; default is `\:'. If + only C is given, the second remains `:'. (Remember to protect `\' + or other metacharacters from shell expansion with quotes or extra + backslashes.) + +`-f STYLE' +`--footer-numbering=STYLE' + Analogous to `--body-numbering'. + +`-h STYLE' +`--header-numbering=STYLE' + Analogous to `--body-numbering'. + +`-i NUMBER' +`--page-increment=NUMBER' + Increment line numbers by NUMBER (default 1). + +`-l NUMBER' +`--join-blank-lines=NUMBER' + Consider NUMBER (default 1) consecutive empty lines to be one + logical line for numbering, and only number the last one. Where + fewer than NUMBER consecutive empty lines occur, do not number + them. An empty line is one that contains no characters, not even + spaces or tabs. + +`-n FORMAT' +`--number-format=FORMAT' + Select the line numbering format (default is `rn'): + + `ln' + left justified, no leading zeros; + + `rn' + right justified, no leading zeros; + + `rz' + right justified, leading zeros. + +`-p' +`--no-renumber' + Do not reset the line number at the start of a logical page. + +`-s STRING' +`--number-separator=STRING' + Separate the line number from the text line in the output with + STRING (default is the TAB character). + +`-v NUMBER' +`--starting-line-number=NUMBER' + Set the initial line number on each logical page to NUMBER + (default 1). + +`-w NUMBER' +`--number-width=NUMBER' + Use NUMBER characters for line numbers (default 6). + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: od invocation, Prev: nl invocation, Up: Output of entire files + +3.4 `od': Write files in octal or other formats +=============================================== + +`od' writes an unambiguous representation of each FILE (`-' means +standard input), or standard input if none are given. Synopses: + + od [OPTION]... [FILE]... + od [-abcdfilosx]... [FILE] [[+]OFFSET[.][b]] + od [OPTION]... --traditional [FILE] [[+]OFFSET[.][b] [[+]LABEL[.][b]]] + + Each line of output consists of the offset in the input, followed by +groups of data from the file. By default, `od' prints the offset in +octal, and each group of file data is a C `short int''s worth of input +printed as a single octal number. + + If OFFSET is given, it specifies how many input bytes to skip before +formatting and writing. By default, it is interpreted as an octal +number, but the optional trailing decimal point causes it to be +interpretated as decimal. If no decimal is specified and the offset +begins with `0x' or `0X' it is interpreted as a hexadecimal number. If +there is a trailing `b', the number of bytes skipped will be OFFSET +multiplied by 512. + + If a command is of both the first and second forms, the second form +is assumed if the last operand begins with `+' or (if there are two +operands) a digit. For example, in `od foo 10' and `od +10' the `10' +is an offset, whereas in `od 10' the `10' is a file name. + + The program accepts the following options. Also see *Note Common +options::. + +`-A RADIX' +`--address-radix=RADIX' + Select the base in which file offsets are printed. RADIX can be + one of the following: + + `d' + decimal; + + `o' + octal; + + `x' + hexadecimal; + + `n' + none (do not print offsets). + + The default is octal. + +`-j BYTES' +`--skip-bytes=BYTES' + Skip BYTES input bytes before formatting and writing. If BYTES + begins with `0x' or `0X', it is interpreted in hexadecimal; + otherwise, if it begins with `0', in octal; otherwise, in decimal. + Appending `b' multiplies BYTES by 512, `k' by 1024, and `m' by + 1048576. + +`-N BYTES' +`--read-bytes=BYTES' + Output at most BYTES bytes of the input. Prefixes and suffixes on + `bytes' are interpreted as for the `-j' option. + +`-S N' +`--strings[=N]' + Instead of the normal output, output only "string constants": at + least N consecutive ASCII graphic characters, followed by a null + (zero) byte. + + If N is omitted with `--strings', the default is 3. + +`-t TYPE' +`--format=TYPE' + Select the format in which to output the file data. TYPE is a + string of one or more of the below type indicator characters. If + you include more than one type indicator character in a single TYPE + string, or use this option more than once, `od' writes one copy of + each output line using each of the data types that you specified, + in the order that you specified. + + Adding a trailing "z" to any type specification appends a display + of the ASCII character representation of the printable characters + to the output line generated by the type specification. + + `a' + named character + + `c' + ASCII character or backslash escape, + + `d' + signed decimal + + `f' + floating point + + `o' + octal + + `u' + unsigned decimal + + `x' + hexadecimal + + The type `a' outputs things like `sp' for space, `nl' for newline, + and `nul' for a null (zero) byte. Type `c' outputs ` ', `\n', and + `\0', respectively. + + Except for types `a' and `c', you can specify the number of bytes + to use in interpreting each number in the given data type by + following the type indicator character with a decimal integer. + Alternately, you can specify the size of one of the C compiler's + built-in data types by following the type indicator character with + one of the following characters. For integers (`d', `o', `u', + `x'): + + `C' + char + + `S' + short + + `I' + int + + `L' + long + + For floating point (`f'): + + F + float + + D + double + + L + long double + +`-v' +`--output-duplicates' + Output consecutive lines that are identical. By default, when two + or more consecutive output lines would be identical, `od' outputs + only the first line, and puts just an asterisk on the following + line to indicate the elision. + +`-w N' +`--width[=N]' + Dump `n' input bytes per output line. This must be a multiple of + the least common multiple of the sizes associated with the + specified output types. + + If this option is not given at all, the default is 16. If N is + omitted with `--width', the default is 32. On older systems, GNU + `od' instead supports an obsolete option `-w[N]', where N also + defaults to 32. POSIX 1003.1-2001 (*note Standards conformance::) + does not allow `-w' without an argument; use `--width' instead. + + + The next several options are shorthands for format specifications. +GNU `od' accepts any combination of shorthands and format specification +options. These options accumulate. + +`-a' + Output as named characters. Equivalent to `-t a'. + +`-b' + Output as octal bytes. Equivalent to `-t o1'. + +`-c' + Output as ASCII characters or backslash escapes. Equivalent to + `-t c'. + +`-d' + Output as unsigned decimal two-byte units. Equivalent to `-t u2'. + +`-f' + Output as floats. Equivalent to `-t fF'. + +`-i' + Output as decimal ints. Equivalent to `-t dI'. + +`-l' + Output as decimal long ints. Equivalent to `-t dL'. + +`-o' + Output as octal two-byte units. Equivalent to `-t o2'. + +`-s' + Output as decimal two-byte units. Equivalent to `-t d2'. + +`-x' + Output as hexadecimal two-byte units. Equivalent to `-t x2'. + +`--traditional' + Recognize the non-option label argument that traditional `od' + accepted. The following syntax: + + od --traditional [FILE] [[+]OFFSET[.][b] [[+]LABEL[.][b]]] + + can be used to specify at most one file and optional arguments + specifying an offset and a pseudo-start address, LABEL. The LABEL + argument is interpreted just like OFFSET, but it specifies an + initial pseudo-address. The pseudo-addresses are displayed in + parentheses following any normal address. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: Formatting file contents, Next: Output of parts of files, Prev: Output of entire files, Up: Top + +4 Formatting file contents +************************** + +These commands reformat the contents of files. + +* Menu: + +* fmt invocation:: Reformat paragraph text. +* pr invocation:: Paginate or columnate files for printing. +* fold invocation:: Wrap input lines to fit in specified width. + + +File: coreutils.info, Node: fmt invocation, Next: pr invocation, Up: Formatting file contents + +4.1 `fmt': Reformat paragraph text +================================== + +`fmt' fills and joins lines to produce output lines of (at most) a +given number of characters (75 by default). Synopsis: + + fmt [OPTION]... [FILE]... + + `fmt' reads from the specified FILE arguments (or standard input if +none are given), and writes to standard output. + + By default, blank lines, spaces between words, and indentation are +preserved in the output; successive input lines with different +indentation are not joined; tabs are expanded on input and introduced on +output. + + `fmt' prefers breaking lines at the end of a sentence, and tries to +avoid line breaks after the first word of a sentence or before the last +word of a sentence. A "sentence break" is defined as either the end of +a paragraph or a word ending in any of `.?!', followed by two spaces or +end of line, ignoring any intervening parentheses or quotes. Like TeX, +`fmt' reads entire "paragraphs" before choosing line breaks; the +algorithm is a variant of that given by Donald E. Knuth and Michael F. +Plass in "Breaking Paragraphs Into Lines", `Software--Practice & +Experience' 11, 11 (November 1981), 1119-1184. + + The program accepts the following options. Also see *Note Common +options::. + +`-c' +`--crown-margin' + "Crown margin" mode: preserve the indentation of the first two + lines within a paragraph, and align the left margin of each + subsequent line with that of the second line. + +`-t' +`--tagged-paragraph' + "Tagged paragraph" mode: like crown margin mode, except that if + indentation of the first line of a paragraph is the same as the + indentation of the second, the first line is treated as a one-line + paragraph. + +`-s' +`--split-only' + Split lines only. Do not join short lines to form longer ones. + This prevents sample lines of code, and other such "formatted" + text from being unduly combined. + +`-u' +`--uniform-spacing' + Uniform spacing. Reduce spacing between words to one space, and + spacing between sentences to two spaces. + +`-WIDTH' +`-w WIDTH' +`--width=WIDTH' + Fill output lines up to WIDTH characters (default 75). `fmt' + initially tries to make lines about 7% shorter than this, to give + it room to balance line lengths. + +`-p PREFIX' +`--prefix=PREFIX' + Only lines beginning with PREFIX (possibly preceded by whitespace) + are subject to formatting. The prefix and any preceding + whitespace are stripped for the formatting and then re-attached to + each formatted output line. One use is to format certain kinds of + program comments, while leaving the code unchanged. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: pr invocation, Next: fold invocation, Prev: fmt invocation, Up: Formatting file contents + +4.2 `pr': Paginate or columnate files for printing +================================================== + +`pr' writes each FILE (`-' means standard input), or standard input if +none are given, to standard output, paginating and optionally +outputting in multicolumn format; optionally merges all FILEs, printing +all in parallel, one per column. Synopsis: + + pr [OPTION]... [FILE]... + + By default, a 5-line header is printed at each page: two blank lines; +a line with the date, the file name, and the page count; and two more +blank lines. A footer of five blank lines is also printed. With the +`-F' option, a 3-line header is printed: the leading two blank lines are +omitted; no footer is used. The default PAGE_LENGTH in both cases is 66 +lines. The default number of text lines changes from 56 (without `-F') +to 63 (with `-F'). The text line of the header takes the form `DATE +STRING PAGE', with spaces inserted around STRING so that the line takes +up the full PAGE_WIDTH. Here, DATE is the date (see the `-D' or +`--date-format' option for details), STRING is the centered header +string, and PAGE identifies the page number. The `LC_MESSAGES' locale +category affects the spelling of PAGE; in the default C locale, it is +`Page NUMBER' where NUMBER is the decimal page number. + + Form feeds in the input cause page breaks in the output. Multiple +form feeds produce empty pages. + + Columns are of equal width, separated by an optional string (default +is `space'). For multicolumn output, lines will always be truncated to +PAGE_WIDTH (default 72), unless you use the `-J' option. For single +column output no line truncation occurs by default. Use `-W' option to +truncate lines in that case. + + The following changes were made in version 1.22i and apply to later +versions of `pr': - Brian + * Some small LETTER OPTIONS (`-s', `-w') have been redefined for + better POSIX compliance. The output of some further cases has + been adapted to other Unix systems. These changes are not + compatible with earlier versions of the program. + + * Some NEW CAPITAL LETTER options (`-J', `-S', `-W') have been + introduced to turn off unexpected interferences of small letter + options. The `-N' option and the second argument LAST_PAGE of + `+FIRST_PAGE' offer more flexibility. The detailed handling of + form feeds set in the input files requires the `-T' option. + + * Capital letter options override small letter ones. + + * Some of the option-arguments (compare `-s', `-e', `-i', `-n') + cannot be specified as separate arguments from the preceding + option letter (already stated in the POSIX specification). + + The program accepts the following options. Also see *Note Common +options::. + +`+FIRST_PAGE[:LAST_PAGE]' +`--pages=FIRST_PAGE[:LAST_PAGE]' + Begin printing with page FIRST_PAGE and stop with LAST_PAGE. + Missing `:LAST_PAGE' implies end of file. While estimating the + number of skipped pages each form feed in the input file results + in a new page. Page counting with and without `+FIRST_PAGE' is + identical. By default, counting starts with the first page of + input file (not first page printed). Line numbering may be + altered by `-N' option. + +`-COLUMN' +`--columns=COLUMN' + With each single FILE, produce COLUMN columns of output (default + is 1) and print columns down, unless `-a' is used. The column + width is automatically decreased as COLUMN increases; unless you + use the `-W/-w' option to increase PAGE_WIDTH as well. This + option might well cause some lines to be truncated. The number of + lines in the columns on each page are balanced. The options `-e' + and `-i' are on for multiple text-column output. Together with + `-J' option column alignment and line truncation is turned off. + Lines of full length are joined in a free field format and `-S' + option may set field separators. `-COLUMN' may not be used with + `-m' option. + +`-a' +`--across' + With each single FILE, print columns across rather than down. The + `-COLUMN' option must be given with COLUMN greater than one. If a + line is too long to fit in a column, it is truncated. + +`-c' +`--show-control-chars' + Print control characters using hat notation (e.g., `^G'); print + other nonprinting characters in octal backslash notation. By + default, nonprinting characters are not changed. + +`-d' +`--double-space' + Double space the output. + +`-D FORMAT' +`--date-format=FORMAT' + Format header dates using FORMAT, using the same conventions as + for the the command `date +FORMAT'; *Note date invocation::. + Except for directives, which start with `%', characters in FORMAT + are printed unchanged. You can use this option to specify an + arbitrary string in place of the header date, e.g., + `--date-format="Monday morning"'. + + Normally the date format defaults to `%Y-%m-%d %H:%M' (for + example, `2001-12-04 23:59'); but if the `POSIXLY_CORRECT' + environment variable is set and the `LC_TIME' locale category + specifies the POSIX locale, the default is `%b %e %H:%M %Y' (for + example, `Dec 4 23:59 2001'. + + Time stamps are listed according to the time zone rules specified + by the `TZ' environment variable, or by the system default rules if + `TZ' is not set. *Note Specifying the Time Zone with `TZ': + (libc)TZ Variable. + +`-e[IN-TABCHAR[IN-TABWIDTH]]' +`--expand-tabs[=IN-TABCHAR[IN-TABWIDTH]]' + Expand TABs to spaces on input. Optional argument IN-TABCHAR is + the input tab character (default is the TAB character). Second + optional argument IN-TABWIDTH is the input tab character's width + (default is 8). + +`-f' +`-F' +`--form-feed' + Use a form feed instead of newlines to separate output pages. The + default page length of 66 lines is not altered. But the number of + lines of text per page changes from default 56 to 63 lines. + +`-h HEADER' +`--header=HEADER' + Replace the file name in the header with the centered string + HEADER. When using the shell, HEADER should be quoted and should + be separated from `-h' by a space. + +`-i[OUT-TABCHAR[OUT-TABWIDTH]]' +`--output-tabs[=OUT-TABCHAR[OUT-TABWIDTH]]' + Replace spaces with TABs on output. Optional argument OUT-TABCHAR + is the output tab character (default is the TAB character). + Second optional argument OUT-TABWIDTH is the output tab + character's width (default is 8). + +`-J' +`--join-lines' + Merge lines of full length. Used together with the column options + `-COLUMN', `-a -COLUMN' or `-m'. Turns off `-W/-w' line + truncation; no column alignment used; may be used with + `--sep-string[=STRING]'. `-J' has been introduced (together with + `-W' and `--sep-string') to disentangle the old (POSIX-compliant) + options `-w' and `-s' along with the three column options. + +`-l PAGE_LENGTH' +`--length=PAGE_LENGTH' + Set the page length to PAGE_LENGTH (default 66) lines, including + the lines of the header [and the footer]. If PAGE_LENGTH is less + than or equal to 10 (or <= 3 with `-F'), the header and footer are + omitted, and all form feeds set in input files are eliminated, as + if the `-T' option had been given. + +`-m' +`--merge' + Merge and print all FILEs in parallel, one in each column. If a + line is too long to fit in a column, it is truncated, unless the + `-J' option is used. `--sep-string[=STRING]' may be used. Empty + pages in some FILEs (form feeds set) produce empty columns, still + marked by STRING. The result is a continuous line numbering and + column marking throughout the whole merged file. Completely empty + merged pages show no separators or line numbers. The default + header becomes `DATE PAGE' with spaces inserted in the middle; this + may be used with the `-h' or `--header' option to fill up the + middle blank part. + +`-n[NUMBER-SEPARATOR[DIGITS]]' +`--number-lines[=NUMBER-SEPARATOR[DIGITS]]' + Provide DIGITS digit line numbering (default for DIGITS is 5). + With multicolumn output the number occupies the first DIGITS + column positions of each text column or only each line of `-m' + output. With single column output the number precedes each line + just as `-m' does. Default counting of the line numbers starts + with the first line of the input file (not the first line printed, + compare the `--page' option and `-N' option). Optional argument + NUMBER-SEPARATOR is the character appended to the line number to + separate it from the text followed. The default separator is the + TAB character. In a strict sense a TAB is always printed with + single column output only. The TAB-width varies with the + TAB-position, e.g., with the left MARGIN specified by `-o' option. + With multicolumn output priority is given to `equal width of + output columns' (a POSIX specification). The TAB-width is fixed + to the value of the first column and does not change with + different values of left MARGIN. That means a fixed number of + spaces is always printed in the place of the NUMBER-SEPARATOR TAB. + The tabification depends upon the output position. + +`-N LINE_NUMBER' +`--first-line-number=LINE_NUMBER' + Start line counting with the number LINE_NUMBER at first line of + first page printed (in most cases not the first line of the input + file). + +`-o MARGIN' +`--indent=MARGIN' + Indent each line with a margin MARGIN spaces wide (default is + zero). The total page width is the size of the margin plus the + PAGE_WIDTH set with the `-W/-w' option. A limited overflow may + occur with numbered single column output (compare `-n' option). + +`-r' +`--no-file-warnings' + Do not print a warning message when an argument FILE cannot be + opened. (The exit status will still be nonzero, however.) + +`-s[CHAR]' +`--separator[=CHAR]' + Separate columns by a single character CHAR. The default for CHAR + is the TAB character without `-w' and `no character' with `-w'. + Without `-s' the default separator `space' is set. `-s[char]' + turns off line truncation of all three column options + (`-COLUMN'|`-a -COLUMN'|`-m') unless `-w' is set. This is a + POSIX-compliant formulation. + +`-S STRING' +`--sep-string[=STRING]' + Use STRING to separate output columns. The `-S' option doesn't + affect the `-W/-w' option, unlike the `-s' option which does. It + does not affect line truncation or column alignment. Without + `-S', and with `-J', `pr' uses the default output separator, TAB. + Without `-S' or `-J', `pr' uses a `space' (same as `-S" "'). With + `-SSTRING', STRING must be nonempty; `--sep-string' with no STRING + is equivalent to `--sep-string=""'. + + On older systems, `pr' instead supports an obsolete option + `-S[STRING]', where STRING is optional. POSIX 1003.1-2001 (*note + Standards conformance::) does not allow this older usage. To + specify an empty STRING portably, use `--sep-string'. + +`-t' +`--omit-header' + Do not print the usual header [and footer] on each page, and do + not fill out the bottom of pages (with blank lines or a form + feed). No page structure is produced, but form feeds set in the + input files are retained. The predefined pagination is not + changed. `-t' or `-T' may be useful together with other options; + e.g.: `-t -e4', expand TAB characters in the input file to 4 + spaces but don't make any other changes. Use of `-t' overrides + `-h'. + +`-T' +`--omit-pagination' + Do not print header [and footer]. In addition eliminate all form + feeds set in the input files. + +`-v' +`--show-nonprinting' + Print nonprinting characters in octal backslash notation. + +`-w PAGE_WIDTH' +`--width=PAGE_WIDTH' + Set page width to PAGE_WIDTH characters for multiple text-column + output only (default for PAGE_WIDTH is 72). `-s[CHAR]' turns off + the default page width and any line truncation and column + alignment. Lines of full length are merged, regardless of the + column options set. No PAGE_WIDTH setting is possible with single + column output. A POSIX-compliant formulation. + +`-W PAGE_WIDTH' +`--page_width=PAGE_WIDTH' + Set the page width to PAGE_WIDTH characters. That's valid with and + without a column option. Text lines are truncated, unless `-J' is + used. Together with one of the three column options (`-COLUMN', + `-a -COLUMN' or `-m') column alignment is always used. The + separator options `-S' or `-s' don't affect the `-W' option. + Default is 72 characters. Without `-W PAGE_WIDTH' and without any + of the column options NO line truncation is used (defined to keep + downward compatibility and to meet most frequent tasks). That's + equivalent to `-W 72 -J'. The header line is never truncated. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: fold invocation, Prev: pr invocation, Up: Formatting file contents + +4.3 `fold': Wrap input lines to fit in specified width +====================================================== + +`fold' writes each FILE (`-' means standard input), or standard input +if none are given, to standard output, breaking long lines. Synopsis: + + fold [OPTION]... [FILE]... + + By default, `fold' breaks lines wider than 80 columns. The output +is split into as many lines as necessary. + + `fold' counts screen columns by default; thus, a tab may count more +than one column, backspace decreases the column count, and carriage +return sets the column to zero. + + The program accepts the following options. Also see *Note Common +options::. + +`-b' +`--bytes' + Count bytes rather than columns, so that tabs, backspaces, and + carriage returns are each counted as taking up one column, just + like other characters. + +`-s' +`--spaces' + Break at word boundaries: the line is broken after the last blank + before the maximum line length. If the line contains no such + blanks, the line is broken at the maximum line length as usual. + +`-w WIDTH' +`--width=WIDTH' + Use a maximum line length of WIDTH columns instead of 80. + + On older systems, `fold' supports an obsolete option `-WIDTH'. + POSIX 1003.1-2001 (*note Standards conformance::) does not allow + this; use `-w WIDTH' instead. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: Output of parts of files, Next: Summarizing files, Prev: Formatting file contents, Up: Top + +5 Output of parts of files +************************** + +These commands output pieces of the input. + +* Menu: + +* head invocation:: Output the first part of files. +* tail invocation:: Output the last part of files. +* split invocation:: Split a file into fixed-size pieces. +* csplit invocation:: Split a file into context-determined pieces. + + +File: coreutils.info, Node: head invocation, Next: tail invocation, Up: Output of parts of files + +5.1 `head': Output the first part of files +========================================== + +`head' prints the first part (10 lines by default) of each FILE; it +reads from standard input if no files are given or when given a FILE of +`-'. Synopsis: + + head [OPTION]... [FILE]... + + If more than one FILE is specified, `head' prints a one-line header +consisting of: + + ==> FILE NAME <== + +before the output for each FILE. + + The program accepts the following options. Also see *Note Common +options::. + +`-c N' +`--bytes=N' + Print the first N bytes, instead of initial lines. Appending `b' + multiplies N by 512, `k' by 1024, and `m' by 1048576. However, if + N starts with a `-', print all but the last N bytes of each file. + +`-n N' +`--lines=N' + Output the first N lines. However, if N starts with a `-', print + all but the last N lines of each file. + +`-q' +`--quiet' +`--silent' + Never print file name headers. + +`-v' +`--verbose' + Always print file name headers. + + + On older systems, `head' supports an obsolete option +`-COUNTOPTIONS', which is recognized only if it is specified first. +COUNT is a decimal number optionally followed by a size letter (`b', +`k', `m') as in `-c', or `l' to mean count by lines, or other option +letters (`cqv'). POSIX 1003.1-2001 (*note Standards conformance::) +does not allow this; use `-c COUNT' or `-n COUNT' instead. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: tail invocation, Next: split invocation, Prev: head invocation, Up: Output of parts of files + +5.2 `tail': Output the last part of files +========================================= + +`tail' prints the last part (10 lines by default) of each FILE; it +reads from standard input if no files are given or when given a FILE of +`-'. Synopsis: + + tail [OPTION]... [FILE]... + + If more than one FILE is specified, `tail' prints a one-line header +consisting of: + + ==> FILE NAME <== + +before the output for each FILE. + + GNU `tail' can output any amount of data (some other versions of +`tail' cannot). It also has no `-r' option (print in reverse), since +reversing a file is really a different job from printing the end of a +file; BSD `tail' (which is the one with `-r') can only reverse files +that are at most as large as its buffer, which is typically 32 KiB. A +more reliable and versatile way to reverse files is the GNU `tac' +command. + + If any option-argument is a number N starting with a `+', `tail' +begins printing with the Nth item from the start of each file, instead +of from the end. + + The program accepts the following options. Also see *Note Common +options::. + +`-c BYTES' +`--bytes=BYTES' + Output the last BYTES bytes, instead of final lines. Appending + `b' multiplies BYTES by 512, `k' by 1024, and `m' by 1048576. + +`-f' +`--follow[=HOW]' + Loop forever trying to read more characters at the end of the file, + presumably because the file is growing. This option is ignored if + no FILE operand is specified and standard input is a pipe. If + more than one file is given, `tail' prints a header whenever it + gets output from a different file, to indicate which file that + output is from. + + There are two ways to specify how you'd like to track files with + this option, but that difference is noticeable only when a + followed file is removed or renamed. If you'd like to continue to + track the end of a growing file even after it has been unlinked, + use `--follow=descriptor'. This is the default behavior, but it + is not useful if you're tracking a log file that may be rotated + (removed or renamed, then reopened). In that case, use + `--follow=name' to track the named file by reopening it + periodically to see if it has been removed and recreated by some + other program. + + No matter which method you use, if the tracked file is determined + to have shrunk, `tail' prints a message saying the file has been + truncated and resumes tracking the end of the file from the + newly-determined endpoint. + + When a file is removed, `tail''s behavior depends on whether it is + following the name or the descriptor. When following by name, + tail can detect that a file has been removed and gives a message + to that effect, and if `--retry' has been specified it will + continue checking periodically to see if the file reappears. When + following a descriptor, tail does not detect that the file has + been unlinked or renamed and issues no message; even though the + file may no longer be accessible via its original name, it may + still be growing. + + The option values `descriptor' and `name' may be specified only + with the long form of the option, not with `-f'. + +`-F' + This option is the same as `--follow=name --retry'. That is, tail + will attempt to reopen a file when it is removed. Should this + fail, tail will keep trying until it becomes accessible again. + +`--retry' + This option is meaningful only when following by name. Without + this option, when tail encounters a file that doesn't exist or is + otherwise inaccessible, it reports that fact and never checks it + again. + +`--sleep-interval=NUMBER' + Change the number of seconds to wait between iterations (the + default is 1.0). During one iteration, every specified file is + checked to see if it has changed size. Historical implementations + of `tail' have required that NUMBER be an integer. However, GNU + `tail' accepts an arbitrary floating point number (using a period + before any fractional digits). + +`--pid=PID' + When following by name or by descriptor, you may specify the + process ID, PID, of the sole writer of all FILE arguments. Then, + shortly after that process terminates, tail will also terminate. + This will work properly only if the writer and the tailing process + are running on the same machine. For example, to save the output + of a build in a file and to watch the file grow, if you invoke + `make' and `tail' like this then the tail process will stop when + your build completes. Without this option, you would have had to + kill the `tail -f' process yourself. + + $ make >& makerr & tail --pid=$! -f makerr + + If you specify a PID that is not in use or that does not correspond + to the process that is writing to the tailed files, then `tail' + may terminate long before any FILEs stop growing or it may not + terminate until long after the real writer has terminated. Note + that `--pid' cannot be supported on some systems; `tail' will + print a warning if this is the case. + +`--max-unchanged-stats=N' + When tailing a file by name, if there have been N (default + n=5) consecutive iterations for which the file has not changed, + then `open'/`fstat' the file to determine if that file name is + still associated with the same device/inode-number pair as before. + When following a log file that is rotated, this is approximately + the number of seconds between when tail prints the last + pre-rotation lines and when it prints the lines that have + accumulated in the new log file. This option is meaningful only + when following by name. + +`-n N' +`--lines=N' + Output the last N lines. + +`-q' +`--quiet' +`--silent' + Never print file name headers. + +`-v' +`--verbose' + Always print file name headers. + + + On older systems, `tail' supports an obsolete option +`-COUNT[bcl][f]', which is recognized only if it is specified first. +COUNT is an optional decimal number optionally followed by a size +letter (`b', `c', `l') to mean count by 512-byte blocks, bytes, or +lines, optionally followed by `f' which has the same meaning as `-f'. +Also, the leading `-' can be replaced by `+' with the same meaning as +in counts. POSIX 1003.1-2001 (*note Standards conformance::) does not +allow most of these obsolete usages; use `-c COUNT[b]', `-n COUNT', +and/or `-f' instead. + + On older systems, obsolete usage overrides normal usage, so portable +shell scripts should avoid commands that can be interpreted either way. +For example, use `tail -- - file' rather than `tail - file', and use +`tail -c4' rather than `tail -c 4'. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: split invocation, Next: csplit invocation, Prev: tail invocation, Up: Output of parts of files + +5.3 `split': Split a file into fixed-size pieces +================================================ + +`split' creates output files containing consecutive sections of INPUT +(standard input if none is given or INPUT is `-'). Synopsis: + + split [OPTION] [INPUT [PREFIX]] + + By default, `split' puts 1000 lines of INPUT (or whatever is left +over for the last section), into each output file. + + The output files' names consist of PREFIX (`x' by default) followed +by a group of characters (`aa', `ab', ... by default), such that +concatenating the output files in traditional sorted order by file name +produces the original input file. If the output file names are +exhausted, `split' reports an error without deleting the output files +that it did create. + + The program accepts the following options. Also see *Note Common +options::. + +`-a LENGTH' +`--suffix-length=LENGTH' + Use suffixes of length LENGTH. The default LENGTH is 2. + +`-l LINES' +`--lines=LINES' + Put LINES lines of INPUT into each output file. + + On older systems, `split' supports an obsolete option `-LINES'. + POSIX 1003.1-2001 (*note Standards conformance::) does not allow + this; use `-l LINES' instead. + +`-b BYTES' +`--bytes=BYTES' + Put the first BYTES bytes of INPUT into each output file. + Appending `b' multiplies BYTES by 512, `k' by 1024, and `m' by + 1048576. + +`-C BYTES' +`--line-bytes=BYTES' + Put into each output file as many complete lines of INPUT as + possible without exceeding BYTES bytes. For lines longer than + BYTES bytes, put BYTES bytes into each output file until less than + BYTES bytes of the line are left, then continue normally. BYTES + has the same format as for the `--bytes' option. + +`-d' +`--numeric-suffixes' + Use digits in suffixes rather than lower-case letters. + +`--verbose' + Write a diagnostic to standard error just before each output file + is opened. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: csplit invocation, Prev: split invocation, Up: Output of parts of files + +5.4 `csplit': Split a file into context-determined pieces +========================================================= + +`csplit' creates zero or more output files containing sections of INPUT +(standard input if INPUT is `-'). Synopsis: + + csplit [OPTION]... INPUT PATTERN... + + The contents of the output files are determined by the PATTERN +arguments, as detailed below. An error occurs if a PATTERN argument +refers to a nonexistent line of the input file (e.g., if no remaining +line matches a given regular expression). After every PATTERN has been +matched, any remaining input is copied into one last output file. + + By default, `csplit' prints the number of bytes written to each +output file after it has been created. + + The types of pattern arguments are: + +`N' + Create an output file containing the input up to but not including + line N (a positive integer). If followed by a repeat count, also + create an output file containing the next N lines of the input + file once for each repeat. + +`/REGEXP/[OFFSET]' + Create an output file containing the current line up to (but not + including) the next line of the input file that contains a match + for REGEXP. The optional OFFSET is an integer. If it is given, + the input up to (but not including) the matching line plus or + minus OFFSET is put into the output file, and the line after that + begins the next section of input. + +`%REGEXP%[OFFSET]' + Like the previous type, except that it does not create an output + file, so that section of the input file is effectively ignored. + +`{REPEAT-COUNT}' + Repeat the previous pattern REPEAT-COUNT additional times. The + REPEAT-COUNT can either be a positive integer or an asterisk, + meaning repeat as many times as necessary until the input is + exhausted. + + + The output files' names consist of a prefix (`xx' by default) +followed by a suffix. By default, the suffix is an ascending sequence +of two-digit decimal numbers from `00' to `99'. In any case, +concatenating the output files in sorted order by file name produces the +original input file. + + By default, if `csplit' encounters an error or receives a hangup, +interrupt, quit, or terminate signal, it removes any output files that +it has created so far before it exits. + + The program accepts the following options. Also see *Note Common +options::. + +`-f PREFIX' +`--prefix=PREFIX' + Use PREFIX as the output file name prefix. + +`-b SUFFIX' +`--suffix=SUFFIX' + Use SUFFIX as the output file name suffix. When this option is + specified, the suffix string must include exactly one + `printf(3)'-style conversion specification, possibly including + format specification flags, a field width, a precision + specifications, or all of these kinds of modifiers. The format + letter must convert a binary integer argument to readable form; + thus, only `d', `i', `u', `o', `x', and `X' conversions are + allowed. The entire SUFFIX is given (with the current output file + number) to `sprintf(3)' to form the file name suffixes for each of + the individual output files in turn. If this option is used, the + `--digits' option is ignored. + +`-n DIGITS' +`--digits=DIGITS' + Use output file names containing numbers that are DIGITS digits + long instead of the default 2. + +`-k' +`--keep-files' + Do not remove output files when errors are encountered. + +`-z' +`--elide-empty-files' + Suppress the generation of zero-length output files. (In cases + where the section delimiters of the input file are supposed to + mark the first lines of each of the sections, the first output + file will generally be a zero-length file unless you use this + option.) The output file sequence numbers always run + consecutively starting from 0, even when this option is specified. + +`-s' +`-q' +`--silent' +`--quiet' + Do not print counts of output file sizes. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: Summarizing files, Next: Operating on sorted files, Prev: Output of parts of files, Up: Top + +6 Summarizing files +******************* + +These commands generate just a few numbers representing entire contents +of files. + +* Menu: + +* wc invocation:: Print newline, word, and byte counts. +* sum invocation:: Print checksum and block counts. +* cksum invocation:: Print CRC checksum and byte counts. +* md5sum invocation:: Print or check message-digests. + + +File: coreutils.info, Node: wc invocation, Next: sum invocation, Up: Summarizing files + +6.1 `wc': Print newline, word, and byte counts +============================================== + +`wc' counts the number of bytes, characters, whitespace-separated +words, and newlines in each given FILE, or standard input if none are +given or for a FILE of `-'. Synopsis: + + wc [OPTION]... [FILE]... + + `wc' prints one line of counts for each file, and if the file was +given as an argument, it prints the file name following the counts. If +more than one FILE is given, `wc' prints a final line containing the +cumulative counts, with the file name `total'. The counts are printed +in this order: newlines, words, characters, bytes. Each count is +printed right-justified in a field with at least one space between +fields so that the numbers and file names normally line up nicely in +columns. The width of the count fields varies depending on the inputs, +so you should not depend on a particular field width. However, as a +GNU extension, if only one count is printed, it is guaranteed to be +printed without leading spaces. + + By default, `wc' prints three counts: the newline, words, and byte +counts. Options can specify that only certain counts be printed. +Options do not undo others previously given, so + + wc --bytes --words + +prints both the byte counts and the word counts. + + With the `--max-line-length' option, `wc' prints the length of the +longest line per file, and if there is more than one file it prints the +maximum (not the sum) of those lengths. + + The program accepts the following options. Also see *Note Common +options::. + +`-c' +`--bytes' + Print only the byte counts. + +`-m' +`--chars' + Print only the character counts. + +`-w' +`--words' + Print only the word counts. + +`-l' +`--lines' + Print only the newline counts. + +`-L' +`--max-line-length' + Print only the maximum line lengths. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: sum invocation, Next: cksum invocation, Prev: wc invocation, Up: Summarizing files + +6.2 `sum': Print checksum and block counts +========================================== + +`sum' computes a 16-bit checksum for each given FILE, or standard input +if none are given or for a FILE of `-'. Synopsis: + + sum [OPTION]... [FILE]... + + `sum' prints the checksum for each FILE followed by the number of +blocks in the file (rounded up). If more than one FILE is given, file +names are also printed (by default). (With the `--sysv' option, +corresponding file names are printed when there is at least one file +argument.) + + By default, GNU `sum' computes checksums using an algorithm +compatible with BSD `sum' and prints file sizes in units of 1024-byte +blocks. + + The program accepts the following options. Also see *Note Common +options::. + +`-r' + Use the default (BSD compatible) algorithm. This option is + included for compatibility with the System V `sum'. Unless `-s' + was also given, it has no effect. + +`-s' +`--sysv' + Compute checksums using an algorithm compatible with System V + `sum''s default, and print file sizes in units of 512-byte blocks. + + + `sum' is provided for compatibility; the `cksum' program (see next +section) is preferable in new applications. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: cksum invocation, Next: md5sum invocation, Prev: sum invocation, Up: Summarizing files + +6.3 `cksum': Print CRC checksum and byte counts +=============================================== + +`cksum' computes a cyclic redundancy check (CRC) checksum for each +given FILE, or standard input if none are given or for a FILE of `-'. +Synopsis: + + cksum [OPTION]... [FILE]... + + `cksum' prints the CRC checksum for each file along with the number +of bytes in the file, and the file name unless no arguments were given. + + `cksum' is typically used to ensure that files transferred by +unreliable means (e.g., netnews) have not been corrupted, by comparing +the `cksum' output for the received files with the `cksum' output for +the original files (typically given in the distribution). + + The CRC algorithm is specified by the POSIX standard. It is not +compatible with the BSD or System V `sum' algorithms (see the previous +section); it is more robust. + + The only options are `--help' and `--version'. *Note Common +options::. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: md5sum invocation, Prev: cksum invocation, Up: Summarizing files + +6.4 `md5sum': Print or check message-digests +============================================ + +`md5sum' computes a 128-bit checksum (or "fingerprint" or +"message-digest") for each specified FILE. If a FILE is specified as +`-' or if no files are given `md5sum' computes the checksum for the +standard input. `md5sum' can also determine whether a file and +checksum are consistent. Synopses: + + md5sum [OPTION]... [FILE]... + md5sum [OPTION]... --check [FILE] + + For each FILE, `md5sum' outputs the MD5 checksum, a flag indicating +a binary or text input file, and the file name. If FILE is omitted or +specified as `-', standard input is read. + + The program accepts the following options. Also see *Note Common +options::. + +`-b' +`--binary' + Treat all input files as binary. This option has no effect on Unix + systems, since they don't distinguish between binary and text + files. This option is useful on systems that have different + internal and external character representations. On MS-DOS and + MS-Windows, this is the default. + +`-c' +`--check' + Read file names and checksum information from the single FILE (or + from stdin if no FILE was specified) and report whether each named + file and the corresponding checksum data are consistent. The + input to this mode of `md5sum' is usually the output of a prior, + checksum-generating run of `md5sum'. Each valid line of input + consists of an MD5 checksum, a binary/text flag, and then a file + name. Binary files are marked with `*', text with ` '. For each + such line, `md5sum' reads the named file and computes its MD5 + checksum. Then, if the computed message digest does not match the + one on the line with the file name, the file is noted as having + failed the test. Otherwise, the file passes the test. By + default, for each valid line, one line is written to standard + output indicating whether the named file passed the test. After + all checks have been performed, if there were any failures, a + warning is issued to standard error. Use the `--status' option to + inhibit that output. If any listed file cannot be opened or read, + if any valid line has an MD5 checksum inconsistent with the + associated file, or if no valid line is found, `md5sum' exits with + nonzero status. Otherwise, it exits successfully. + +`--status' + This option is useful only when verifying checksums. When + verifying checksums, don't generate the default one-line-per-file + diagnostic and don't output the warning summarizing any failures. + Failures to open or read a file still evoke individual diagnostics + to standard error. If all listed files are readable and are + consistent with the associated MD5 checksums, exit successfully. + Otherwise exit with a status code indicating there was a failure. + +`-t' +`--text' + Treat all input files as text files. This is the reverse of + `--binary'. + +`-w' +`--warn' + When verifying checksums, warn about improperly formatted MD5 + checksum lines. This option is useful only if all but a few lines + in the checked input are valid. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: Operating on sorted files, Next: Operating on fields within a line, Prev: Summarizing files, Up: Top + +7 Operating on sorted files +*************************** + +These commands work with (or produce) sorted files. + +* Menu: + +* sort invocation:: Sort text files. +* uniq invocation:: Uniquify files. +* comm invocation:: Compare two sorted files line by line. +* ptx invocation:: Produce a permuted index of file contents. +* tsort invocation:: Topological sort. +* tsort background:: Where tsort came from. + + +File: coreutils.info, Node: sort invocation, Next: uniq invocation, Up: Operating on sorted files + +7.1 `sort': Sort text files +=========================== + +`sort' sorts, merges, or compares all the lines from the given files, +or standard input if none are given or for a FILE of `-'. By default, +`sort' writes the results to standard output. Synopsis: + + sort [OPTION]... [FILE]... + + `sort' has three modes of operation: sort (the default), merge, and +check for sortedness. The following options change the operation mode: + +`-c' +`--check' + Check whether the given files are already sorted: if they are not + all sorted, print an error message and exit with a status of 1. + Otherwise, exit successfully. + +`-m' +`--merge' + Merge the given files by sorting them as a group. Each input file + must always be individually sorted. It always works to sort + instead of merge; merging is provided because it is faster, in the + case where it works. + + + A pair of lines is compared as follows: `sort' compares each pair of +fields, in the order specified on the command line, according to the +associated ordering options, until a difference is found or no fields +are left. If no key fields are specified, `sort' uses a default key of +the entire line. Finally, as a last resort when all keys compare +equal, `sort' compares entire lines as if no ordering options other +than `--reverse' (`-r') were specified. The `--stable' (`-s') option +disables this "last-resort comparison" so that lines in which all +fields compare equal are left in their original relative order. The +`--unique' (`-u') option also disables the last-resort comparison. + + Unless otherwise specified, all comparisons use the character +collating sequence specified by the `LC_COLLATE' locale.(1) + + GNU `sort' (as specified for all GNU utilities) has no limit on +input line length or restrictions on bytes allowed within lines. In +addition, if the final byte of an input file is not a newline, GNU +`sort' silently supplies one. A line's trailing newline is not part of +the line for comparison purposes. + + Exit status: + + 0 if no error occurred + 1 if invoked with `-c' and the input is not properly sorted + 2 if an error occurred + + If the environment variable `TMPDIR' is set, `sort' uses its value +as the directory for temporary files instead of `/tmp'. The +`--temporary-directory' (`-T') option in turn overrides the environment +variable. + + The following options affect the ordering of output lines. They may +be specified globally or as part of a specific key field. If no key +fields are specified, global options apply to comparison of entire +lines; otherwise the global options are inherited by key fields that do +not specify any special options of their own. In pre-POSIX versions of +`sort', global options affect only later key fields, so portable shell +scripts should specify global options first. + +`-b' +`--ignore-leading-blanks' + Ignore leading blanks when finding sort keys in each line. The + `LC_CTYPE' locale determines character types. + +`-d' +`--dictionary-order' + Sort in "phone directory" order: ignore all characters except + letters, digits and blanks when sorting. The `LC_CTYPE' locale + determines character types. + +`-f' +`--ignore-case' + Fold lowercase characters into the equivalent uppercase characters + when comparing so that, for example, `b' and `B' sort as equal. + The `LC_CTYPE' locale determines character types. + +`-g' +`--general-numeric-sort' + Sort numerically, using the standard C function `strtod' to convert + a prefix of each line to a double-precision floating point number. + This allows floating point numbers to be specified in scientific + notation, like `1.0e-34' and `10e100'. The `LC_NUMERIC' locale + determines the decimal-point character. Do not report overflow, + underflow, or conversion errors. Use the following collating + sequence: + + * Lines that do not start with numbers (all considered to be + equal). + + * NaNs ("Not a Number" values, in IEEE floating point + arithmetic) in a consistent but machine-dependent order. + + * Minus infinity. + + * Finite numbers in ascending numeric order (with -0 and +0 + equal). + + * Plus infinity. + + Use this option only if there is no alternative; it is much slower + than `--numeric-sort' (`-n') and it can lose information when + converting to floating point. + +`-i' +`--ignore-nonprinting' + Ignore nonprinting characters. The `LC_CTYPE' locale determines + character types. This option has no effect if the stronger + `--dictionary-order' (`-d') option is also given. + +`-M' +`--month-sort' + An initial string, consisting of any amount of blanks, followed by + a month name abbreviation, is folded to UPPER case and compared in + the order `JAN' < `FEB' < ... < `DEC'. Invalid names compare low + to valid names. The `LC_TIME' locale category determines the + month spellings. + +`-n' +`--numeric-sort' + Sort numerically: the number begins each line; specifically, it + consists of optional blanks, an optional `-' sign, and zero or more + digits possibly separated by thousands separators, optionally + followed by a decimal-point character and zero or more digits. A + string of no digits is interpreted as `0'. The `LC_NUMERIC' + locale specifies the decimal-point character and thousands + separator. + + Numeric sort uses what might be considered an unconventional + method to compare strings representing floating point numbers. + Rather than first converting each string to the C `double' type + and then comparing those values, `sort' aligns the decimal-point + characters in the two strings and compares the strings a character + at a time. One benefit of using this approach is its speed. In + practice this is much more efficient than performing the two + corresponding string-to-double (or even string-to-integer) + conversions and then comparing doubles. In addition, there is no + corresponding loss of precision. Converting each string to + `double' before comparison would limit precision to about 16 + digits on most systems. + + Neither a leading `+' nor exponential notation is recognized. To + compare such strings numerically, use the `--general-numeric-sort' + (`-g') option. + +`-r' +`--reverse' + Reverse the result of comparison, so that lines with greater key + values appear earlier in the output instead of later. + + + Other options are: + +`-k POS1[,POS2]' +`--key=POS1[,POS2]' + Specify a sort field that consists of the part of the line between + POS1 and POS2 (or the end of the line, if POS2 is omitted), + _inclusive_. Fields and character positions are numbered starting + with 1. So to sort on the second field, you'd use `--key=2,2' + (`-k 2,2'). See below for more examples. + +`-o OUTPUT-FILE' +`--output=OUTPUT-FILE' + Write output to OUTPUT-FILE instead of standard output. Normally, + `sort' reads all input before opening OUTPUT-FILE, so you can + safely sort a file in place by using commands like `sort -o F F' + and `cat F | sort -o F'. However, `sort' with `--merge' (`-m') + can open the output file before reading all input, so a command + like `cat F | sort -m -o F - G' is not safe as `sort' might start + writing `F' before `cat' is done reading it. + + On newer systems, `-o' cannot appear after an input file if + `POSIXLY_CORRECT' is set, e.g., `sort F -o F'. Portable scripts + should specify `-o OUTPUT-FILE' before any input files. + +`-s' +`--stable' + Make `sort' stable by disabling its last-resort comparison. This + option has no effect if no fields or global ordering options other + than `--reverse' (`-R') are specified. + +`-S SIZE' +`--buffer-size=SIZE' + Use a main-memory sort buffer of the given SIZE. By default, SIZE + is in units of 1024 bytes. Appending `%' causes SIZE to be + interpreted as a percentage of physical memory. Appending `K' + multiplies SIZE by 1024 (the default), `M' by 1,048,576, `G' by + 1,073,741,824, and so on for `T', `P', `E', `Z', and `Y'. + Appending `b' causes SIZE to be interpreted as a byte count, with + no multiplication. + + This option can improve the performance of `sort' by causing it to + start with a larger or smaller sort buffer than the default. + However, this option affects only the initial buffer size. The + buffer grows beyond SIZE if `sort' encounters input lines larger + than SIZE. + +`-t SEPARATOR' +`--field-separator=SEPARATOR' + Use character SEPARATOR as the field separator when finding the + sort keys in each line. By default, fields are separated by the + empty string between a non-blank character and a blank character. + That is, given the input line ` foo bar', `sort' breaks it into + fields ` foo' and ` bar'. The field separator is not considered + to be part of either the field preceding or the field following, + so with `sort -t " "' the same input line has three fields: an + empty field, `foo', and `bar'. However, fields that extend to the + end of the line, as `-k 2', or fields consisting of a range, as + `-k 2,3', retain the field separators present between the + endpoints of the range. + + To specify a zero byte (ASCII NUL (Null) character) as the field + separator, use the two-character string `\0', e.g., `sort -t '\0''. + +`-T TEMPDIR' +`--temporary-directory=TEMPDIR' + Use directory TEMPDIR to store temporary files, overriding the + `TMPDIR' environment variable. If this option is given more than + once, temporary files are stored in all the directories given. If + you have a large sort or merge that is I/O-bound, you can often + improve performance by using this option to specify directories on + different disks and controllers. + +`-u' +`--unique' + Normally, output only the first of a sequence of lines that compare + equal. For the `--check' (`-c') option, check that no pair of + consecutive lines compares equal. + + This option also disables the default last-resort comparison. + + The commands `sort -u' and `sort | uniq' are equivalent, but this + equivalence does not extend to arbitrary `sort' options. For + example, `sort -n -u' inspects only the value of the initial + numeric string when checking for uniqueness, whereas `sort -n | + uniq' inspects the entire line. *Note uniq invocation::. + +`-z' +`--zero-terminated' + Treat the input as a set of lines, each terminated by a zero byte + (ASCII NUL (Null) character) instead of an ASCII LF (Line Feed). + This option can be useful in conjunction with `perl -0' or `find + -print0' and `xargs -0' which do the same in order to reliably + handle arbitrary file names (even those containing blanks or other + special characters). + + + Historical (BSD and System V) implementations of `sort' have +differed in their interpretation of some options, particularly `-b', +`-f', and `-n'. GNU sort follows the POSIX behavior, which is usually +(but not always!) like the System V behavior. According to POSIX, `-n' +no longer implies `-b'. For consistency, `-M' has been changed in the +same way. This may affect the meaning of character positions in field +specifications in obscure cases. The only fix is to add an explicit +`-b'. + + A position in a sort field specified with the `-k' option has the +form `F.C', where F is the number of the field to use and C is the +number of the first character from the beginning of the field. In a +start position, an omitted `.C' stands for the field's first character. +In an end position, an omitted or zero `.C' stands for the field's +last character. If the start field falls after the end of the line or +after the end field, the field is empty. If the `-b' option was +specified, the `.C' part of a field specification is counted from the +first nonblank character of the field. + + A sort key position may also have any of the option letters `Mbdfinr' +appended to it, in which case the global ordering options are not used +for that particular field. The `-b' option may be independently +attached to either or both of the start and end positions of a field +specification, and if it is inherited from the global options it will +be attached to both. If input lines can contain leading or adjacent +blanks and `-t' is not used, then `-k' is typically combined with `-b', +`-g', `-M', or `-n'; otherwise the varying numbers of leading blanks in +fields can cause confusing results. + + Keys can span multiple fields. + + On older systems, `sort' supports an obsolete origin-zero syntax +`+POS1 [-POS2]' for specifying sort keys. POSIX 1003.1-2001 (*note +Standards conformance::) does not allow this; use `-k' instead. + + Here are some examples to illustrate various combinations of options. + + * Sort in descending (reverse) numeric order. + + sort -n -r + + * Sort alphabetically, omitting the first and second fields and the + blanks at the start of the third field. This uses a single key + composed of the characters beginning at the start of the first + nonblank character in field three and extending to the end of each + line. + + sort -k 3b + + * Sort numerically on the second field and resolve ties by sorting + alphabetically on the third and fourth characters of field five. + Use `:' as the field delimiter. + + sort -t : -k 2,2n -k 5.3,5.4 + + Note that if you had written `-k 2n' instead of `-k 2,2n' `sort' + would have used all characters beginning in the second field and + extending to the end of the line as the primary _numeric_ key. + For the large majority of applications, treating keys spanning + more than one field as numeric will not do what you expect. + + Also note that the `n' modifier was applied to the field-end + specifier for the first key. It would have been equivalent to + specify `-k 2n,2' or `-k 2n,2n'. All modifiers except `b' apply + to the associated _field_, regardless of whether the modifier + character is attached to the field-start and/or the field-end part + of the key specifier. + + * Sort the password file on the fifth field and ignore any leading + blanks. Sort lines with equal values in field five on the numeric + user ID in field three. Fields are separated by `:'. + + sort -t : -k 5b,5 -k 3,3n /etc/passwd + sort -t : -n -k 5b,5 -k 3,3 /etc/passwd + sort -t : -b -k 5,5 -k 3,3n /etc/passwd + + These three commands have equivalent effect. The first specifies + that the first key's start position ignores leading blanks and the + second key is sorted numerically. The other two commands rely on + global options being inherited by sort keys that lack modifiers. + The inheritance works in this case because `-k 5b,5b' and `-k + 5b,5' are equivalent, as the location of a field-end lacking a `.C' + character position is not affected by whether initial blanks are + skipped. + + * Sort a set of log files, primarily by IPv4 address and secondarily + by time stamp. If two lines' primary and secondary keys are + identical, output the lines in the same order that they were + input. The log files contain lines that look like this: + + 4.150.156.3 - - [01/Apr/2004:06:31:51 +0000] message 1 + 211.24.3.231 - - [24/Apr/2004:20:17:39 +0000] message 2 + + Fields are separated by exactly one space. Sort IPv4 addresses + lexicographically, e.g., 212.61.52.2 sorts before 212.129.233.201 + because 61 is less than 129. + + sort -s -t ' ' -k 4.9n -k 4.5M -k 4.2n -k 4.14,4.21 file*.log | + sort -s -t '.' -k 1,1n -k 2,2n -k 3,3n -k 4,4n + + This example cannot be done with a single `sort' invocation, since + IPv4 address components are separated by `.' while dates come just + after a space. So it is broken down into two invocations of + `sort': the first sorts by time stamp and the second by IPv4 + address. The time stamp is sorted by year, then month, then day, + and finally by hour-minute-second field, using `-k' to isolate each + field. Except for hour-minute-second there's no need to specify + the end of each key field, since the `n' and `M' modifiers sort + based on leading prefixes that cannot cross field boundaries. The + IPv4 addresses are sorted lexicographically. The second sort uses + `-s' so that ties in the primary key are broken by the secondary + key; the first sort uses `-s' so that the combination of the two + sorts is stable. + + * Generate a tags file in case-insensitive sorted order. + + find src -type f -print0 | sort -z -f | xargs -0 etags --append + + The use of `-print0', `-z', and `-0' in this case means that file + names that contain blanks or other special characters are not + broken up by the sort operation. + + + ---------- Footnotes ---------- + + (1) If you use a non-POSIX locale (e.g., by setting `LC_ALL' to +`en_US'), then `sort' may produce output that is sorted differently +than you're accustomed to. In that case, set the `LC_ALL' environment +variable to `C'. Note that setting only `LC_COLLATE' has two problems. +First, it is ineffective if `LC_ALL' is also set. Second, it has +undefined behavior if `LC_CTYPE' (or `LANG', if `LC_CTYPE' is unset) is +set to an incompatible value. For example, you get undefined behavior +if `LC_CTYPE' is `ja_JP.PCK' but `LC_COLLATE' is `en_US.UTF-8'. + + +File: coreutils.info, Node: uniq invocation, Next: comm invocation, Prev: sort invocation, Up: Operating on sorted files + +7.2 `uniq': Uniquify files +========================== + +`uniq' writes the unique lines in the given `input', or standard input +if nothing is given or for an INPUT name of `-'. Synopsis: + + uniq [OPTION]... [INPUT [OUTPUT]] + + By default, `uniq' prints its input lines, except that it discards +all but the first of adjacent repeated lines, so that no output lines +are repeated. Optionally, it can instead discard lines that are not +repeated, or all repeated lines. + + The input need not be sorted, but repeated input lines are detected +only if they are adjacent. If you want to discard non-adjacent +duplicate lines, perhaps you want to use `sort -u'. *Note sort +invocation::. + + Comparisons use the character collating sequence specified by the +`LC_COLLATE' locale category. + + If no OUTPUT file is specified, `uniq' writes to standard output. + + The program accepts the following options. Also see *Note Common +options::. + +`-f N' +`--skip-fields=N' + Skip N fields on each line before checking for uniqueness. Use a + null string for comparison if a line has fewer than N fields. + Fields are sequences of non-space non-tab characters that are + separated from each other by at least one space or tab. + + On older systems, `uniq' supports an obsolete option `-N'. POSIX + 1003.1-2001 (*note Standards conformance::) does not allow this; + use `-f N' instead. + +`-s N' +`--skip-chars=N' + Skip N characters before checking for uniqueness. Use a null + string for comparison if a line has fewer than N characters. If + you use both the field and character skipping options, fields are + skipped over first. + + On older systems, `uniq' supports an obsolete option `+N'. POSIX + 1003.1-2001 (*note Standards conformance::) does not allow this; + use `-s N' instead. + +`-c' +`--count' + Print the number of times each line occurred along with the line. + +`-i' +`--ignore-case' + Ignore differences in case when comparing lines. + +`-d' +`--repeated' + Discard lines that are not repeated. When used by itself, this + option causes `uniq' to print the first copy of each repeated line, + and nothing else. + +`-D' +`--all-repeated[=DELIMIT-METHOD]' + Do not discard the second and subsequent repeated input lines, but + discard lines that are not repeated. This option is useful mainly + in conjunction with other options e.g., to ignore case or to + compare only selected fields. The optional DELIMIT-METHOD tells + how to delimit groups of repeated lines, and must be one of the + following: + + `none' + Do not delimit groups of repeated lines. This is equivalent + to `--all-repeated' (`-D'). + + `prepend' + Output a newline before each group of repeated lines. + + `separate' + Separate groups of repeated lines with a single newline. + This is the same as using `prepend', except that there is no + newline before the first group, and hence may be better + suited for output direct to users. + + Note that when groups are delimited and the input stream contains + two or more consecutive blank lines, then the output is ambiguous. + To avoid that, filter the input through `tr -s '\n'' to replace + each sequence of consecutive newlines with a single newline. + + This is a GNU extension. + +`-u' +`--unique' + Discard the first repeated line. When used by itself, this option + causes `uniq' to print unique lines, and nothing else. + +`-w N' +`--check-chars=N' + Compare at most N characters on each line (after skipping any + specified fields and characters). By default the entire rest of + the lines are compared. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: comm invocation, Next: ptx invocation, Prev: uniq invocation, Up: Operating on sorted files + +7.3 `comm': Compare two sorted files line by line +================================================= + +`comm' writes to standard output lines that are common, and lines that +are unique, to two input files; a file name of `-' means standard +input. Synopsis: + + comm [OPTION]... FILE1 FILE2 + + Before `comm' can be used, the input files must be sorted using the +collating sequence specified by the `LC_COLLATE' locale. If an input +file ends in a non-newline character, a newline is silently appended. +The `sort' command with no options always outputs a file that is +suitable input to `comm'. + + With no options, `comm' produces three-column output. Column one +contains lines unique to FILE1, column two contains lines unique to +FILE2, and column three contains lines common to both files. Columns +are separated by a single TAB character. + + The options `-1', `-2', and `-3' suppress printing of the +corresponding columns. Also see *Note Common options::. + + Unlike some other comparison utilities, `comm' has an exit status +that does not depend on the result of the comparison. Upon normal +completion `comm' produces an exit code of zero. If there is an error +it exits with nonzero status. + + +File: coreutils.info, Node: tsort invocation, Next: tsort background, Prev: ptx invocation, Up: Operating on sorted files + +7.4 `tsort': Topological sort +============================= + +`tsort' performs a topological sort on the given FILE, or standard +input if no input file is given or for a FILE of `-'. For more details +and some history, see *Note tsort background::. Synopsis: + + tsort [OPTION] [FILE] + + `tsort' reads its input as pairs of strings, separated by blanks, +indicating a partial ordering. The output is a total ordering that +corresponds to the given partial ordering. + + For example + + tsort <<EOF + a b c + d + e f + b c d e + EOF + +will produce the output + + a + b + c + d + e + f + + Consider a more realistic example. You have a large set of +functions all in one file, and they may all be declared static except +one. Currently that one (say `main') is the first function defined in +the file, and the ones it calls directly follow it, followed by those +they call, etc. Let's say that you are determined to take advantage of +prototypes, so you have to choose between declaring all of those +functions (which means duplicating a lot of information from the +definitions) and rearranging the functions so that as many as possible +are defined before they are used. One way to automate the latter +process is to get a list for each function of the functions it calls +directly. Many programs can generate such lists. They describe a call +graph. Consider the following list, in which a given line indicates +that the function on the left calls the one on the right directly. + + main parse_options + main tail_file + main tail_forever + tail_file pretty_name + tail_file write_header + tail_file tail + tail_forever recheck + tail_forever pretty_name + tail_forever write_header + tail_forever dump_remainder + tail tail_lines + tail tail_bytes + tail_lines start_lines + tail_lines dump_remainder + tail_lines file_lines + tail_lines pipe_lines + tail_bytes xlseek + tail_bytes start_bytes + tail_bytes dump_remainder + tail_bytes pipe_bytes + file_lines dump_remainder + recheck pretty_name + + then you can use `tsort' to produce an ordering of those functions +that satisfies your requirement. + + example$ tsort call-graph | tac + dump_remainder + start_lines + file_lines + pipe_lines + xlseek + start_bytes + pipe_bytes + tail_lines + tail_bytes + pretty_name + write_header + tail + recheck + parse_options + tail_file + tail_forever + main + + `tsort' detects any cycles in the input and writes the first cycle +encountered to standard error. + + Note that for a given partial ordering, generally there is no unique +total ordering. In the context of the call graph above, the function +`parse_options' may be placed anywhere in the list as long as it +precedes `main'. + + The only options are `--help' and `--version'. *Note Common +options::. + + +File: coreutils.info, Node: tsort background, Prev: tsort invocation, Up: Operating on sorted files + +7.5 `tsort': Background +======================= + +`tsort' exists because very early versions of the Unix linker processed +an archive file exactly once, and in order. As `ld' read each object +in the archive, it decided whether it was needed in the program based on +whether it defined any symbols which were undefined at that point in +the link. + + This meant that dependencies within the archive had to be handled +specially. For example, `scanf' probably calls `read'. That means +that in a single pass through an archive, it was important for `scanf.o' +to appear before read.o, because otherwise a program which calls +`scanf' but not `read' might end up with an unexpected unresolved +reference to `read'. + + The way to address this problem was to first generate a set of +dependencies of one object file on another. This was done by a shell +script called `lorder'. The GNU tools don't provide a version of +lorder, as far as I know, but you can still find it in BSD +distributions. + + Then you ran `tsort' over the `lorder' output, and you used the +resulting sort to define the order in which you added objects to the +archive. + + This whole procedure has been obsolete since about 1980, because +Unix archives now contain a symbol table (traditionally built by +`ranlib', now generally built by `ar' itself), and the Unix linker uses +the symbol table to effectively make multiple passes over an archive +file. + + Anyhow, that's where tsort came from. To solve an old problem with +the way the linker handled archive files, which has since been solved +in different ways. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: ptx invocation, Next: tsort invocation, Prev: comm invocation, Up: Operating on sorted files + +7.6 `ptx': Produce permuted indexes +=================================== + +`ptx' reads a text file and essentially produces a permuted index, with +each keyword in its context. The calling sketch is either one of: + + ptx [OPTION ...] [FILE ...] + ptx -G [OPTION ...] [INPUT [OUTPUT]] + + The `-G' (or its equivalent: `--traditional') option disables all +GNU extensions and reverts to traditional mode, thus introducing some +limitations and changing several of the program's default option values. +When `-G' is not specified, GNU extensions are always enabled. GNU +extensions to `ptx' are documented wherever appropriate in this +document. For the full list, see *Note Compatibility in ptx::. + + Individual options are explained in the following sections. + + When GNU extensions are enabled, there may be zero, one or several +FILEs after the options. If there is no FILE, the program reads the +standard input. If there is one or several FILEs, they give the name +of input files which are all read in turn, as if all the input files +were concatenated. However, there is a full contextual break between +each file and, when automatic referencing is requested, file names and +line numbers refer to individual text input files. In all cases, the +program outputs the permuted index to the standard output. + + When GNU extensions are _not_ enabled, that is, when the program +operates in traditional mode, there may be zero, one or two parameters +besides the options. If there are no parameters, the program reads the +standard input and outputs the permuted index to the standard output. +If there is only one parameter, it names the text INPUT to be read +instead of the standard input. If two parameters are given, they give +respectively the name of the INPUT file to read and the name of the +OUTPUT file to produce. _Be very careful_ to note that, in this case, +the contents of file given by the second parameter is destroyed. This +behavior is dictated by System V `ptx' compatibility; GNU Standards +normally discourage output parameters not introduced by an option. + + Note that for _any_ file named as the value of an option or as an +input text file, a single dash `-' may be used, in which case standard +input is assumed. However, it would not make sense to use this +convention more than once per program invocation. + +* Menu: + +* General options in ptx:: Options which affect general program behavior. +* Charset selection in ptx:: Underlying character set considerations. +* Input processing in ptx:: Input fields, contexts, and keyword selection. +* Output formatting in ptx:: Types of output format, and sizing the fields. +* Compatibility in ptx:: + + +File: coreutils.info, Node: General options in ptx, Next: Charset selection in ptx, Up: ptx invocation + +7.6.1 General options +--------------------- + +`-C' +`--copyright' + Print a short note about the copyright and copying conditions, then + exit without further processing. + +`-G' +`--traditional' + As already explained, this option disables all GNU extensions to + `ptx' and switches to traditional mode. + +`--help' + Print a short help on standard output, then exit without further + processing. + +`--version' + Print the program version on standard output, then exit without + further processing. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: Charset selection in ptx, Next: Input processing in ptx, Prev: General options in ptx, Up: ptx invocation + +7.6.2 Charset selection +----------------------- + +As it is set up now, the program assumes that the input file is coded +using 8-bit ISO 8859-1 code, also known as Latin-1 character set, +_unless_ it is compiled for MS-DOS, in which case it uses the character +set of the IBM-PC. (GNU `ptx' is not known to work on smaller MS-DOS +machines anymore.) Compared to 7-bit ASCII, the set of characters +which are letters is different; this alters the behavior of regular +expression matching. Thus, the default regular expression for a +keyword allows foreign or diacriticized letters. Keyword sorting, +however, is still crude; it obeys the underlying character set ordering +quite blindly. + +`-f' +`--ignore-case' + Fold lower case letters to upper case for sorting. + + + +File: coreutils.info, Node: Input processing in ptx, Next: Output formatting in ptx, Prev: Charset selection in ptx, Up: ptx invocation + +7.6.3 Word selection and input processing +----------------------------------------- + +`-b FILE' + +`--break-file=FILE' + This option provides an alternative (to `-W') method of describing + which characters make up words. It introduces the name of a file + which contains a list of characters which can_not_ be part of one + word; this file is called the "Break file". Any character which + is not part of the Break file is a word constituent. If both + options `-b' and `-W' are specified, then `-W' has precedence and + `-b' is ignored. + + When GNU extensions are enabled, the only way to avoid newline as a + break character is to write all the break characters in the file + with no newline at all, not even at the end of the file. When GNU + extensions are disabled, spaces, tabs and newlines are always + considered as break characters even if not included in the Break + file. + +`-i FILE' +`--ignore-file=FILE' + The file associated with this option contains a list of words + which will never be taken as keywords in concordance output. It + is called the "Ignore file". The file contains exactly one word + in each line; the end of line separation of words is not subject + to the value of the `-S' option. + + There is a default Ignore file used by `ptx' when this option is + not specified, usually found in `/usr/local/lib/eign' if this has + not been changed at installation time. If you want to deactivate + the default Ignore file, specify `/dev/null' instead. + +`-o FILE' +`--only-file=FILE' + The file associated with this option contains a list of words + which will be retained in concordance output; any word not + mentioned in this file is ignored. The file is called the "Only + file". The file contains exactly one word in each line; the end + of line separation of words is not subject to the value of the + `-S' option. + + There is no default for the Only file. When both an Only file and + an Ignore file are specified, a word is considered a keyword only + if it is listed in the Only file and not in the Ignore file. + +`-r' +`--references' + On each input line, the leading sequence of non-white space + characters will be taken to be a reference that has the purpose of + identifying this input line in the resulting permuted index. For + more information about reference production, see *Note Output + formatting in ptx::. Using this option changes the default value + for option `-S'. + + Using this option, the program does not try very hard to remove + references from contexts in output, but it succeeds in doing so + _when_ the context ends exactly at the newline. If option `-r' is + used with `-S' default value, or when GNU extensions are disabled, + this condition is always met and references are completely + excluded from the output contexts. + +`-S REGEXP' +`--sentence-regexp=REGEXP' + This option selects which regular expression will describe the end + of a line or the end of a sentence. In fact, this regular + expression is not the only distinction between end of lines or end + of sentences, and input line boundaries have no special + significance outside this option. By default, when GNU extensions + are enabled and if `-r' option is not used, end of sentences are + used. In this case, this REGEX is imported from GNU Emacs: + + [.?!][]\"')}]*\\($\\|\t\\| \\)[ \t\n]* + + Whenever GNU extensions are disabled or if `-r' option is used, end + of lines are used; in this case, the default REGEXP is just: + + \n + + Using an empty REGEXP is equivalent to completely disabling end of + line or end of sentence recognition. In this case, the whole file + is considered to be a single big line or sentence. The user might + want to disallow all truncation flag generation as well, through + option `-F ""'. *Note Syntax of Regular Expressions: + (emacs)Regexps. + + When the keywords happen to be near the beginning of the input + line or sentence, this often creates an unused area at the + beginning of the output context line; when the keywords happen to + be near the end of the input line or sentence, this often creates + an unused area at the end of the output context line. The program + tries to fill those unused areas by wrapping around context in + them; the tail of the input line or sentence is used to fill the + unused area on the left of the output line; the head of the input + line or sentence is used to fill the unused area on the right of + the output line. + + As a matter of convenience to the user, many usual backslashed + escape sequences from the C language are recognized and converted + to the corresponding characters by `ptx' itself. + +`-W REGEXP' +`--word-regexp=REGEXP' + This option selects which regular expression will describe each + keyword. By default, if GNU extensions are enabled, a word is a + sequence of letters; the REGEXP used is `\w+'. When GNU + extensions are disabled, a word is by default anything which ends + with a space, a tab or a newline; the REGEXP used is `[^ \t\n]+'. + + An empty REGEXP is equivalent to not using this option. *Note + Syntax of Regular Expressions: (emacs)Regexps. + + As a matter of convenience to the user, many usual backslashed + escape sequences, as found in the C language, are recognized and + converted to the corresponding characters by `ptx' itself. + + + +File: coreutils.info, Node: Output formatting in ptx, Next: Compatibility in ptx, Prev: Input processing in ptx, Up: ptx invocation + +7.6.4 Output formatting +----------------------- + +Output format is mainly controlled by the `-O' and `-T' options +described in the table below. When neither `-O' nor `-T' are selected, +and if GNU extensions are enabled, the program chooses an output format +suitable for a dumb terminal. Each keyword occurrence is output to the +center of one line, surrounded by its left and right contexts. Each +field is properly justified, so the concordance output can be readily +observed. As a special feature, if automatic references are selected +by option `-A' and are output before the left context, that is, if +option `-R' is _not_ selected, then a colon is added after the +reference; this nicely interfaces with GNU Emacs `next-error' +processing. In this default output format, each white space character, +like newline and tab, is merely changed to exactly one space, with no +special attempt to compress consecutive spaces. This might change in +the future. Except for those white space characters, every other +character of the underlying set of 256 characters is transmitted +verbatim. + + Output format is further controlled by the following options. + +`-g NUMBER' +`--gap-size=NUMBER' + Select the size of the minimum white space gap between the fields + on the output line. + +`-w NUMBER' +`--width=NUMBER' + Select the maximum output width of each final line. If references + are used, they are included or excluded from the maximum output + width depending on the value of option `-R'. If this option is not + selected, that is, when references are output before the left + context, the maximum output width takes into account the maximum + length of all references. If this option is selected, that is, + when references are output after the right context, the maximum + output width does not take into account the space taken by + references, nor the gap that precedes them. + +`-A' +`--auto-reference' + Select automatic references. Each input line will have an + automatic reference made up of the file name and the line ordinal, + with a single colon between them. However, the file name will be + empty when standard input is being read. If both `-A' and `-r' + are selected, then the input reference is still read and skipped, + but the automatic reference is used at output time, overriding the + input reference. + +`-R' +`--right-side-refs' + In the default output format, when option `-R' is not used, any + references produced by the effect of options `-r' or `-A' are + placed to the far right of output lines, after the right context. + With default output format, when the `-R' option is specified, + references are rather placed at the beginning of each output line, + before the left context. For any other output format, option `-R' + is ignored, with one exception: with `-R' the width of references + is _not_ taken into account in total output width given by `-w'. + + This option is automatically selected whenever GNU extensions are + disabled. + +`-F STRING' +`--flac-truncation=STRING' + This option will request that any truncation in the output be + reported using the string STRING. Most output fields + theoretically extend towards the beginning or the end of the + current line, or current sentence, as selected with option `-S'. + But there is a maximum allowed output line width, changeable + through option `-w', which is further divided into space for + various output fields. When a field has to be truncated because + it cannot extend beyond the beginning or the end of the current + line to fit in, then a truncation occurs. By default, the string + used is a single slash, as in `-F /'. + + STRING may have more than one character, as in `-F ...'. Also, in + the particular case when STRING is empty (`-F ""'), truncation + flagging is disabled, and no truncation marks are appended in this + case. + + As a matter of convenience to the user, many usual backslashed + escape sequences, as found in the C language, are recognized and + converted to the corresponding characters by `ptx' itself. + +`-M STRING' +`--macro-name=STRING' + Select another STRING to be used instead of `xx', while generating + output suitable for `nroff', `troff' or TeX. + +`-O' +`--format=roff' + Choose an output format suitable for `nroff' or `troff' + processing. Each output line will look like: + + .xx "TAIL" "BEFORE" "KEYWORD_AND_AFTER" "HEAD" "REF" + + so it will be possible to write a `.xx' roff macro to take care of + the output typesetting. This is the default output format when GNU + extensions are disabled. Option `-M' can be used to change `xx' + to another macro name. + + In this output format, each non-graphical character, like newline + and tab, is merely changed to exactly one space, with no special + attempt to compress consecutive spaces. Each quote character: `"' + is doubled so it will be correctly processed by `nroff' or `troff'. + +`-T' +`--format=tex' + Choose an output format suitable for TeX processing. Each output + line will look like: + + \xx {TAIL}{BEFORE}{KEYWORD}{AFTER}{HEAD}{REF} + + so it will be possible to write a `\xx' definition to take care of + the output typesetting. Note that when references are not being + produced, that is, neither option `-A' nor option `-r' is + selected, the last parameter of each `\xx' call is inhibited. + Option `-M' can be used to change `xx' to another macro name. + + In this output format, some special characters, like `$', `%', + `&', `#' and `_' are automatically protected with a backslash. + Curly brackets `{', `}' are protected with a backslash and a pair + of dollar signs (to force mathematical mode). The backslash + itself produces the sequence `\backslash{}'. Circumflex and tilde + diacritical marks produce the sequence `^\{ }' and `~\{ }' + respectively. Other diacriticized characters of the underlying + character set produce an appropriate TeX sequence as far as + possible. The other non-graphical characters, like newline and + tab, and all other characters which are not part of ASCII, are + merely changed to exactly one space, with no special attempt to + compress consecutive spaces. Let me know how to improve this + special character processing for TeX. + + + +File: coreutils.info, Node: Compatibility in ptx, Prev: Output formatting in ptx, Up: ptx invocation + +7.6.5 The GNU extensions to `ptx' +--------------------------------- + +This version of `ptx' contains a few features which do not exist in +System V `ptx'. These extra features are suppressed by using the `-G' +command line option, unless overridden by other command line options. +Some GNU extensions cannot be recovered by overriding, so the simple +rule is to avoid `-G' if you care about GNU extensions. Here are the +differences between this program and System V `ptx'. + + * This program can read many input files at once, it always writes + the resulting concordance on standard output. On the other hand, + System V `ptx' reads only one file and sends the result to + standard output or, if a second FILE parameter is given on the + command, to that FILE. + + Having output parameters not introduced by options is a dangerous + practice which GNU avoids as far as possible. So, for using `ptx' + portably between GNU and System V, you should always use it with a + single input file, and always expect the result on standard + output. You might also want to automatically configure in a `-G' + option to `ptx' calls in products using `ptx', if the configurator + finds that the installed `ptx' accepts `-G'. + + * The only options available in System V `ptx' are options `-b', + `-f', `-g', `-i', `-o', `-r', `-t' and `-w'. All other options + are GNU extensions and are not repeated in this enumeration. + Moreover, some options have a slightly different meaning when GNU + extensions are enabled, as explained below. + + * By default, concordance output is not formatted for `troff' or + `nroff'. It is rather formatted for a dumb terminal. `troff' or + `nroff' output may still be selected through option `-O'. + + * Unless `-R' option is used, the maximum reference width is + subtracted from the total output line width. With GNU extensions + disabled, width of references is not taken into account in the + output line width computations. + + * All 256 characters, even NULs, are always read and processed from + input file with no adverse effect, even if GNU extensions are + disabled. However, System V `ptx' does not accept 8-bit + characters, a few control characters are rejected, and the tilde + `~' is also rejected. + + * Input line length is only limited by available memory, even if GNU + extensions are disabled. However, System V `ptx' processes only + the first 200 characters in each line. + + * The break (non-word) characters default to be every character + except all letters of the underlying character set, diacriticized + or not. When GNU extensions are disabled, the break characters + default to space, tab and newline only. + + * The program makes better use of output line width. If GNU + extensions are disabled, the program rather tries to imitate + System V `ptx', but still, there are some slight disposition + glitches this program does not completely reproduce. + + * The user can specify both an Ignore file and an Only file. This + is not allowed with System V `ptx'. + + + +File: coreutils.info, Node: Operating on fields within a line, Next: Operating on characters, Prev: Operating on sorted files, Up: Top + +8 Operating on fields within a line +*********************************** + +* Menu: + +* cut invocation:: Print selected parts of lines. +* paste invocation:: Merge lines of files. +* join invocation:: Join lines on a common field. + + +File: coreutils.info, Node: cut invocation, Next: paste invocation, Up: Operating on fields within a line + +8.1 `cut': Print selected parts of lines +======================================== + +`cut' writes to standard output selected parts of each line of each +input file, or standard input if no files are given or for a file name +of `-'. Synopsis: + + cut [OPTION]... [FILE]... + + In the table which follows, the BYTE-LIST, CHARACTER-LIST, and +FIELD-LIST are one or more numbers or ranges (two numbers separated by +a dash) separated by commas. Bytes, characters, and fields are +numbered starting at 1. Incomplete ranges may be given: `-M' means +`1-M'; `N-' means `N' through end of line or last field. The list +elements can be repeated, can overlap, and can be specified in any +order; but the selected input is written in the same order that it is +read, and is written exactly once. + + The program accepts the following options. Also see *Note Common +options::. + +`-b BYTE-LIST' +`--bytes=BYTE-LIST' + Select for printing only the bytes in positions listed in + BYTE-LIST. Tabs and backspaces are treated like any other + character; they take up 1 byte. If an output delimiter is + specified, (see the description of `--output-delimiter'), then + output that string between ranges of selected bytes. + +`-c CHARACTER-LIST' +`--characters=CHARACTER-LIST' + Select for printing only the characters in positions listed in + CHARACTER-LIST. The same as `-b' for now, but + internationalization will change that. Tabs and backspaces are + treated like any other character; they take up 1 character. If an + output delimiter is specified, (see the description of + `--output-delimiter'), then output that string between ranges of + selected bytes. + +`-f FIELD-LIST' +`--fields=FIELD-LIST' + Select for printing only the fields listed in FIELD-LIST. Fields + are separated by a TAB character by default. Also print any line + that contains no delimiter character, unless the + `--only-delimited' (`-s') option is specified + +`-d INPUT_DELIM_BYTE' +`--delimiter=INPUT_DELIM_BYTE' + For `-f', fields are separated in the input by the first character + in INPUT_DELIM_BYTE (default is TAB). + +`-n' + Do not split multi-byte characters (no-op for now). + +`-s' +`--only-delimited' + For `-f', do not print lines that do not contain the field + separator character. Normally, any line without a field separator + is printed verbatim. + +`--output-delimiter=OUTPUT_DELIM_STRING' + With `-f', output fields are separated by OUTPUT_DELIM_STRING. + The default with `-f' is to use the input delimiter. When using + `-b' or `-c' to select ranges of byte or character offsets (as + opposed to ranges of fields), output OUTPUT_DELIM_STRING between + non-overlapping ranges of selected bytes. + +`--complement' + This option is a GNU extension. Select for printing the + complement of the bytes, characters or fields selected with the + `-b', `-c' or `-f' options. In other words, do _not_ print the + bytes, characters or fields specified via those options. This + option is useful when you have many fields and want to print all + but a few of them. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: paste invocation, Next: join invocation, Prev: cut invocation, Up: Operating on fields within a line + +8.2 `paste': Merge lines of files +================================= + +`paste' writes to standard output lines consisting of sequentially +corresponding lines of each given file, separated by a TAB character. +Standard input is used for a file name of `-' or if no input files are +given. + + For example: + + $ cat num2 + 1 + 2 + $ cat let3 + a + b + c + $ paste num2 let3 + 1 a + 2 b + c + + Synopsis: + + paste [OPTION]... [FILE]... + + The program accepts the following options. Also see *Note Common +options::. + +`-s' +`--serial' + Paste the lines of one file at a time rather than one line from + each file. Using the above example data: + + $ paste -s num2 let3 + 1 2 + a b c + +`-d DELIM-LIST' +`--delimiters=DELIM-LIST' + Consecutively use the characters in DELIM-LIST instead of TAB to + separate merged lines. When DELIM-LIST is exhausted, start again + at its beginning. Using the above example data: + + $ paste -d '%_' num2 let3 num2 + 1%a_1 + 2%b_2 + %c_ + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: join invocation, Prev: paste invocation, Up: Operating on fields within a line + +8.3 `join': Join lines on a common field +======================================== + +`join' writes to standard output a line for each pair of input lines +that have identical join fields. Synopsis: + + join [OPTION]... FILE1 FILE2 + + Either FILE1 or FILE2 (but not both) can be `-', meaning standard +input. FILE1 and FILE2 should be sorted on the join fields. + + Normally, the sort order is that of the collating sequence specified +by the `LC_COLLATE' locale. Unless the `-t' option is given, the sort +comparison ignores blanks at the start of the join field, as in `sort +-b'. If the `--ignore-case' option is given, the sort comparison +ignores the case of characters in the join field, as in `sort -f'. + + However, as a GNU extension, if the input has no unpairable lines the +sort order can be any order that considers two fields to be equal if and +only if the sort comparison described above considers them to be equal. +For example: + + $ cat file1 + a a1 + c c1 + b b1 + $ cat file2 + a a2 + c c2 + b b2 + $ join file1 file2 + a a1 a2 + c c1 c2 + b b1 b2 + + The defaults are: the join field is the first field in each line; +fields in the input are separated by one or more blanks, with leading +blanks on the line ignored; fields in the output are separated by a +space; each output line consists of the join field, the remaining +fields from FILE1, then the remaining fields from FILE2. + + The program accepts the following options. Also see *Note Common +options::. + +`-a FILE-NUMBER' + Print a line for each unpairable line in file FILE-NUMBER (either + `1' or `2'), in addition to the normal output. + +`-e STRING' + Replace those output fields that are missing in the input with + STRING. + +`-i' +`--ignore-case' + Ignore differences in case when comparing keys. With this option, + the lines of the input files must be ordered in the same way. Use + `sort -f' to produce this ordering. + +`-1 FIELD' + Join on field FIELD (a positive integer) of file 1. + +`-2 FIELD' + Join on field FIELD (a positive integer) of file 2. + +`-j FIELD' + Equivalent to `-1 FIELD -2 FIELD'. + +`-o FIELD-LIST' + Construct each output line according to the format in FIELD-LIST. + Each element in FIELD-LIST is either the single character `0' or + has the form M.N where the file number, M, is `1' or `2' and N is + a positive field number. + + A field specification of `0' denotes the join field. In most + cases, the functionality of the `0' field spec may be reproduced + using the explicit M.N that corresponds to the join field. + However, when printing unpairable lines (using either of the `-a' + or `-v' options), there is no way to specify the join field using + M.N in FIELD-LIST if there are unpairable lines in both files. To + give `join' that functionality, POSIX invented the `0' field + specification notation. + + The elements in FIELD-LIST are separated by commas or blanks. + Blank separators typically need to be quoted for the shell. For + example, the commands `join -o 1.2,2.2' and `join -o '1.2 2.2'' + are equivalent. + + All output lines--including those printed because of any -a or -v + option--are subject to the specified FIELD-LIST. + +`-t CHAR' + Use character CHAR as the input and output field separator. Treat + as significant each occurrence of CHAR in the input file. + +`-v FILE-NUMBER' + Print a line for each unpairable line in file FILE-NUMBER (either + `1' or `2'), instead of the normal output. + + + In addition, when GNU `join' is invoked with exactly one argument, +the `--help' and `--version' options are recognized. *Note Common +options::. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: Operating on characters, Next: Directory listing, Prev: Operating on fields within a line, Up: Top + +9 Operating on characters +************************* + +This commands operate on individual characters. + +* Menu: + +* tr invocation:: Translate, squeeze, and/or delete characters. +* expand invocation:: Convert tabs to spaces. +* unexpand invocation:: Convert spaces to tabs. + + +File: coreutils.info, Node: tr invocation, Next: expand invocation, Up: Operating on characters + +9.1 `tr': Translate, squeeze, and/or delete characters +====================================================== + +Synopsis: + + tr [OPTION]... SET1 [SET2] + + `tr' copies standard input to standard output, performing one of the +following operations: + + * translate, and optionally squeeze repeated characters in the + result, + + * squeeze repeated characters, + + * delete characters, + + * delete characters, then squeeze repeated characters from the + result. + + The SET1 and (if given) SET2 arguments define ordered sets of +characters, referred to below as SET1 and SET2. These sets are the +characters of the input that `tr' operates on. The `--complement' +(`-c', `-C') option replaces SET1 with its complement (all of the +characters that are not in SET1). + + Currently `tr' fully supports only single-byte characters. +Eventually it will support multibyte characters; when it does, the `-C' +option will cause it to complement the set of characters, whereas `-c' +will cause it to complement the set of values. This distinction will +matter only when some values are not characters, and this is possible +only in locales using multibyte encodings when the input contains +encoding errors. + + The program accepts the `--help' and `--version' options. *Note +Common options::. Options must precede operands. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + +* Menu: + +* Character sets:: Specifying sets of characters. +* Translating:: Changing one set of characters to another. +* Squeezing:: Squeezing repeats and deleting. + + +File: coreutils.info, Node: Character sets, Next: Translating, Up: tr invocation + +9.1.1 Specifying sets of characters +----------------------------------- + +The format of the SET1 and SET2 arguments resembles the format of +regular expressions; however, they are not regular expressions, only +lists of characters. Most characters simply represent themselves in +these strings, but the strings can contain the shorthands listed below, +for convenience. Some of them can be used only in SET1 or SET2, as +noted below. + +Backslash escapes + A backslash followed by a character not listed below causes an + error message. + + `\a' + Control-G. + + `\b' + Control-H. + + `\f' + Control-L. + + `\n' + Control-J. + + `\r' + Control-M. + + `\t' + Control-I. + + `\v' + Control-K. + + `\OOO' + The character with the value given by OOO, which is 1 to 3 + octal digits, + + `\\' + A backslash. + +Ranges + The notation `M-N' expands to all of the characters from M through + N, in ascending order. M should collate before N; if it doesn't, + an error results. As an example, `0-9' is the same as + `0123456789'. + + GNU `tr' does not support the System V syntax that uses square + brackets to enclose ranges. Translations specified in that format + sometimes work as expected, since the brackets are often + transliterated to themselves. However, they should be avoided + because they sometimes behave unexpectedly. For example, `tr -d + '[0-9]'' deletes brackets as well as digits. + + Many historically common and even accepted uses of ranges are not + portable. For example, on EBCDIC hosts using the `A-Z' range will + not do what most would expect because `A' through `Z' are not + contiguous as they are in ASCII. If you can rely on a POSIX + compliant version of `tr', then the best way to work around this + is to use character classes (see below). Otherwise, it is most + portable (and most ugly) to enumerate the members of the ranges. + +Repeated characters + The notation `[C*N]' in SET2 expands to N copies of character C. + Thus, `[y*6]' is the same as `yyyyyy'. The notation `[C*]' in + STRING2 expands to as many copies of C as are needed to make SET2 + as long as SET1. If N begins with `0', it is interpreted in + octal, otherwise in decimal. + +Character classes + The notation `[:CLASS:]' expands to all of the characters in the + (predefined) class CLASS. The characters expand in no particular + order, except for the `upper' and `lower' classes, which expand in + ascending order. When the `--delete' (`-d') and + `--squeeze-repeats' (`-s') options are both given, any character + class can be used in SET2. Otherwise, only the character classes + `lower' and `upper' are accepted in SET2, and then only if the + corresponding character class (`upper' and `lower', respectively) + is specified in the same relative position in SET1. Doing this + specifies case conversion. The class names are given below; an + error results when an invalid class name is given. + + `alnum' + Letters and digits. + + `alpha' + Letters. + + `blank' + Horizontal whitespace. + + `cntrl' + Control characters. + + `digit' + Digits. + + `graph' + Printable characters, not including space. + + `lower' + Lowercase letters. + + `print' + Printable characters, including space. + + `punct' + Punctuation characters. + + `space' + Horizontal or vertical whitespace. + + `upper' + Uppercase letters. + + `xdigit' + Hexadecimal digits. + +Equivalence classes + The syntax `[=C=]' expands to all of the characters that are + equivalent to C, in no particular order. Equivalence classes are + a relatively recent invention intended to support non-English + alphabets. But there seems to be no standard way to define them + or determine their contents. Therefore, they are not fully + implemented in GNU `tr'; each character's equivalence class + consists only of that character, which is of no particular use. + + + +File: coreutils.info, Node: Translating, Next: Squeezing, Prev: Character sets, Up: tr invocation + +9.1.2 Translating +----------------- + +`tr' performs translation when SET1 and SET2 are both given and the +`--delete' (`-d') option is not given. `tr' translates each character +of its input that is in SET1 to the corresponding character in SET2. +Characters not in SET1 are passed through unchanged. When a character +appears more than once in SET1 and the corresponding characters in SET2 +are not all the same, only the final one is used. For example, these +two commands are equivalent: + + tr aaa xyz + tr a z + + A common use of `tr' is to convert lowercase characters to +uppercase. This can be done in many ways. Here are three of them: + + tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ + tr a-z A-Z + tr '[:lower:]' '[:upper:]' + +But note that using ranges like `a-z' above is not portable. + + When `tr' is performing translation, SET1 and SET2 typically have +the same length. If SET1 is shorter than SET2, the extra characters at +the end of SET2 are ignored. + + On the other hand, making SET1 longer than SET2 is not portable; +POSIX says that the result is undefined. In this situation, BSD `tr' +pads SET2 to the length of SET1 by repeating the last character of SET2 +as many times as necessary. System V `tr' truncates SET1 to the length +of SET2. + + By default, GNU `tr' handles this case like BSD `tr'. When the +`--truncate-set1' (`-t') option is given, GNU `tr' handles this case +like the System V `tr' instead. This option is ignored for operations +other than translation. + + Acting like System V `tr' in this case breaks the relatively common +BSD idiom: + + tr -cs A-Za-z0-9 '\012' + +because it converts only zero bytes (the first element in the +complement of SET1), rather than all non-alphanumerics, to newlines. + +By the way, the above idiom is not portable because it uses ranges, and +it assumes that the octal code for newline is 012. Assuming a POSIX +compliant `tr', here is a better way to write it: + + tr -cs '[:alnum:]' '[\n*]' + + +File: coreutils.info, Node: Squeezing, Prev: Translating, Up: tr invocation + +9.1.3 Squeezing repeats and deleting +------------------------------------ + +When given just the `--delete' (`-d') option, `tr' removes any input +characters that are in SET1. + + When given just the `--squeeze-repeats' (`-s') option, `tr' replaces +each input sequence of a repeated character that is in SET1 with a +single occurrence of that character. + + When given both `--delete' and `--squeeze-repeats', `tr' first +performs any deletions using SET1, then squeezes repeats from any +remaining characters using SET2. + + The `--squeeze-repeats' option may also be used when translating, in +which case `tr' first performs translation, then squeezes repeats from +any remaining characters using SET2. + + Here are some examples to illustrate various combinations of options: + + * Remove all zero bytes: + + tr -d '\0' + + * Put all words on lines by themselves. This converts all + non-alphanumeric characters to newlines, then squeezes each string + of repeated newlines into a single newline: + + tr -cs '[:alnum:]' '[\n*]' + + * Convert each sequence of repeated newlines to a single newline: + + tr -s '\n' + + * Find doubled occurrences of words in a document. For example, + people often write "the the" with the repeated words separated by + a newline. The Bourne shell script below works first by + converting each sequence of punctuation and blank characters to a + single newline. That puts each "word" on a line by itself. Next + it maps all uppercase characters to lower case, and finally it + runs `uniq' with the `-d' option to print out only the words that + were repeated. + + #!/bin/sh + cat -- "$@" \ + | tr -s '[:punct:][:blank:]' '[\n*]' \ + | tr '[:upper:]' '[:lower:]' \ + | uniq -d + + * Deleting a small set of characters is usually straightforward. + For example, to remove all `a's, `x's, and `M's you would do this: + + tr -d axM + + However, when `-' is one of those characters, it can be tricky + because `-' has special meanings. Performing the same task as + above but also removing all `-' characters, we might try `tr -d + -axM', but that would fail because `tr' would try to interpret + `-a' as a command-line option. Alternatively, we could try + putting the hyphen inside the string, `tr -d a-xM', but that + wouldn't work either because it would make `tr' interpret `a-x' as + the range of characters `a'...`x' rather than the three. One way + to solve the problem is to put the hyphen at the end of the list + of characters: + + tr -d axM- + + Or you can use `--' to terminate option processing: + + tr -d -- -axM + + More generally, use the character class notation `[=c=]' with `-' + (or any other character) in place of the `c': + + tr -d '[=-=]axM' + + Note how single quotes are used in the above example to protect the + square brackets from interpretation by a shell. + + + +File: coreutils.info, Node: expand invocation, Next: unexpand invocation, Prev: tr invocation, Up: Operating on characters + +9.2 `expand': Convert tabs to spaces +==================================== + +`expand' writes the contents of each given FILE, or standard input if +none are given or for a FILE of `-', to standard output, with tab +characters converted to the appropriate number of spaces. Synopsis: + + expand [OPTION]... [FILE]... + + By default, `expand' converts all tabs to spaces. It preserves +backspace characters in the output; they decrement the column count for +tab calculations. The default action is equivalent to `-t 8' (set tabs +every 8 columns). + + The program accepts the following options. Also see *Note Common +options::. + +`-t TAB1[,TAB2]...' +`--tabs=TAB1[,TAB2]...' + If only one tab stop is given, set the tabs TAB1 spaces apart + (default is 8). Otherwise, set the tabs at columns TAB1, TAB2, + ... (numbered from 0), and replace any tabs beyond the last tab + stop given with single spaces. Tab stops can be separated by + blanks as well as by commas. + + On older systems, `expand' supports an obsolete option + `-TAB1[,TAB2]...', where tab stops must be separated by commas. + POSIX 1003.1-2001 (*note Standards conformance::) does not allow + this; use `-t TAB1[,TAB2]...' instead. + +`-i' +`--initial' + Only convert initial tabs (those that precede all non-space or + non-tab characters) on each line to spaces. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: unexpand invocation, Prev: expand invocation, Up: Operating on characters + +9.3 `unexpand': Convert spaces to tabs +====================================== + +`unexpand' writes the contents of each given FILE, or standard input if +none are given or for a FILE of `-', to standard output, converting +blanks at the beginning of each line into as many tab characters as +needed. In the default POSIX locale, a "blank" is a space or a tab; +other locales may specify additional blank characters. Synopsis: + + unexpand [OPTION]... [FILE]... + + By default, `unexpand' converts only initial blanks (those that +precede all non-blank characters) on each line. It preserves backspace +characters in the output; they decrement the column count for tab +calculations. By default, tabs are set at every 8th column. + + The program accepts the following options. Also see *Note Common +options::. + +`-t TAB1[,TAB2]...' +`--tabs=TAB1[,TAB2]...' + If only one tab stop is given, set the tabs TAB1 columns apart + instead of the default 8. Otherwise, set the tabs at columns + TAB1, TAB2, ... (numbered from 0), and leave blanks beyond the tab + stops given unchanged. Tab stops can be separated by blanks as + well as by commas. This option implies the `-a' option. + + On older systems, `unexpand' supports an obsolete option + `-TAB1[,TAB2]...', where tab stops must be separated by commas. + (Unlike `-t', this obsolete option does not imply `-a'.) POSIX + 1003.1-2001 (*note Standards conformance::) does not allow this; + use `--first-only -t TAB1[,TAB2]...' instead. + +`-a' +`--all' + Also convert all sequences of two or more blanks just before a tab + stop. even if they occur after non-blank characters in a line. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: Directory listing, Next: Basic operations, Prev: Operating on characters, Up: Top + +10 Directory listing +******************** + +This chapter describes the `ls' command and its variants `dir' and +`vdir', which list information about files. + +* Menu: + +* ls invocation:: List directory contents. +* dir invocation:: Briefly ls. +* vdir invocation:: Verbosely ls. +* dircolors invocation:: Color setup for ls, etc. + + +File: coreutils.info, Node: ls invocation, Next: dir invocation, Up: Directory listing + +10.1 `ls': List directory contents +================================== + +The `ls' program lists information about files (of any type, including +directories). Options and file arguments can be intermixed +arbitrarily, as usual. + + For non-option command-line arguments that are directories, by +default `ls' lists the contents of directories, not recursively, and +omitting files with names beginning with `.'. For other non-option +arguments, by default `ls' lists just the file name. If no non-option +argument is specified, `ls' operates on the current directory, acting +as if it had been invoked with a single argument of `.'. + + By default, the output is sorted alphabetically, according to the +locale settings in effect.(1) If standard output is a terminal, the +output is in columns (sorted vertically) and control characters are +output as question marks; otherwise, the output is listed one per line +and control characters are output as-is. + + Because `ls' is such a fundamental program, it has accumulated many +options over the years. They are described in the subsections below; +within each section, options are listed alphabetically (ignoring case). +The division of options into the subsections is not absolute, since some +options affect more than one aspect of `ls''s operation. + + Exit status: + + 0 success + 1 minor problems (e.g., a subdirectory was not found) + 2 serious trouble (e.g., memory exhausted) + + Also see *Note Common options::. + +* Menu: + +* Which files are listed:: +* What information is listed:: +* Sorting the output:: +* More details about version sort:: +* General output formatting:: +* Formatting file timestamps:: +* Formatting the file names:: + + ---------- Footnotes ---------- + + (1) If you use a non-POSIX locale (e.g., by setting `LC_ALL' to +`en_US'), then `ls' may produce output that is sorted differently than +you're accustomed to. In that case, set the `LC_ALL' environment +variable to `C'. + + +File: coreutils.info, Node: Which files are listed, Next: What information is listed, Up: ls invocation + +10.1.1 Which files are listed +----------------------------- + +These options determine which files `ls' lists information for. By +default, `ls' lists files and the contents of any directories on the +command line, except that in directories it ignores files whose names +start with `.'. + +`-a' +`--all' + In directories, do not ignore file names that start with `.'. + +`-A' +`--almost-all' + In directories, do not ignore all file names that start with `.'; + ignore only `.' and `..'. The `--all' (`-a') option overrides + this option. + +`-B' +`--ignore-backups' + In directories, ignore files that end with `~'. This option is + equivalent to `--ignore='*~' --ignore='.*~''. + +`-d' +`--directory' + List just the names of directories, as with other types of files, + rather than listing their contents. Do not follow symbolic links + listed on the command line unless the `--dereference-command-line' + (`-H'), `--dereference' (`-L'), or + `--dereference-command-line-symlink-to-dir' options are specified. + +`-H' +`--dereference-command-line' + If a command line argument specifies a symbolic link, show + information for the file the link references rather than for the + link itself. + +`--dereference-command-line-symlink-to-dir' + Do not dereference symbolic links, with one exception: if a + command line argument specifies a symbolic link that refers to a + directory, show information for that directory rather than for the + link itself. This is the default behavior when no other + dereferencing-related option has been specified (`--classify' + (`-F'), `--directory' (`-d'), (`-l'), `--dereference' (`-L'), or + `--dereference-command-line' (`-H')). + +`--hide=PATTERN' + In directories, ignore files whose names match the shell pattern + PATTERN, unless the `--all' (`-a') or `--almost-all' (`-A') is + also given. This option acts like `--ignore=PATTERN' except that + it has no effect if `--all' (`-a') or `--almost-all' (`-A') is + also given. + + This option can be useful in shell aliases. For example, if `lx' + is an alias for `ls --hide='*~'' and `ly' is an alias for `ls + --ignore='*~'', then the command `lx -A' lists the file `README~' + even though `ly -A' would not. + +`-I PATTERN' +`--ignore=PATTERN' + In directories, ignore files whose names match the shell pattern + (not regular expression) PATTERN. As in the shell, an initial `.' + in a file name does not match a wildcard at the start of PATTERN. + Sometimes it is useful to give this option several times. For + example, + + $ ls --ignore='.??*' --ignore='.[^.]' --ignore='#*' + + The first option ignores names of length 3 or more that start with + `.', the second ignores all two-character names that start with `.' + except `..', and the third ignores names that start with `#'. + +`-L' +`--dereference' + When showing file information for a symbolic link, show information + for the file the link references rather than the link itself. + However, even with this option, `ls' still prints the name of the + link itself, not the name of the file that the link points to. + +`-R' +`--recursive' + List the contents of all directories recursively. + + + +File: coreutils.info, Node: What information is listed, Next: Sorting the output, Prev: Which files are listed, Up: ls invocation + +10.1.2 What information is listed +--------------------------------- + +These options affect the information that `ls' displays. By default, +only file names are shown. + +`--author' + List each file's author when producing long format directory + listings. In GNU/Hurd, file authors can differ from their owners, + but in other operating systems the two are the same. + +`-D' +`--dired' + With the long listing (`-l') format, print an additional line after + the main output: + + //DIRED// BEG1 END1 BEG2 END2 ... + + The BEGN and ENDN are unsigned integers that record the byte + position of the beginning and end of each file name in the output. + This makes it easy for Emacs to find the names, even when they + contain unusual characters such as space or newline, without fancy + searching. + + If directories are being listed recursively (`-R'), output a + similar line with offsets for each subdirectory name: + + //SUBDIRED// BEG1 END1 ... + + Finally, output a line of the form: + + //DIRED-OPTIONS// --quoting-style=WORD + + where WORD is the quoting style (*note Formatting the file + names::). + + Here is an actual example: + + $ mkdir -p a/sub/deeper a/sub2 + $ touch a/f1 a/f2 + $ touch a/sub/deeper/file + $ ls -gloRF --dired a + a: + total 8 + -rw-r--r-- 1 0 Dec 3 00:50 f1 + -rw-r--r-- 1 0 Dec 3 00:50 f2 + drwxr-xr-x 3 4096 Dec 3 00:50 sub/ + drwxr-xr-x 2 4096 Dec 3 00:50 sub2/ + + a/sub: + total 4 + drwxr-xr-x 2 4096 Dec 3 00:50 deeper/ + + a/sub/deeper: + total 0 + -rw-r--r-- 1 0 Dec 3 00:50 file + + a/sub2: + total 0 + //DIRED// 49 51 86 88 123 126 162 166 222 228 288 292 + //SUBDIRED// 2 3 171 176 233 245 296 302 + //DIRED-OPTIONS// --quoting-style=literal + + Note that the pairs of offsets on the `//DIRED//' line above + delimit these names: `f1', `f2', `sub', `sub2', `deeper', `file'. + The offsets on the `//SUBDIRED//' line delimit the following + directory names: `a', `a/sub', `a/sub/deeper', `a/sub2'. + + Here is an example of how to extract the fifth entry name, + `deeper', corresponding to the pair of offsets, 222 and 228: + + $ ls -gloRF --dired a > out + $ dd bs=1 skip=222 count=6 < out 2>/dev/null; echo + deeper + + Note that although the listing above includes a trailing slash for + the `deeper' entry, the offsets select the name without the + trailing slash. However, if you invoke `ls' with `--dired' along + with an option like `--escape' (aka `-b') and operate on a file + whose name contains special characters, notice that the backslash + _is_ included: + + $ touch 'a b' + $ ls -blog --dired 'a b' + -rw-r--r-- 1 0 Dec 3 00:52 a\ b + //DIRED// 31 35 + //DIRED-OPTIONS// --quoting-style=escape + + If you use a quoting style that adds quote marks (e.g., + `--quoting-style=c'), then the offsets include the quote marks. + So beware that the user may select the quoting style via the + environment variable `QUOTING_STYLE'. Hence, applications using + `--dired' should either specify an explicit + `--quoting-style=literal' option (aka `-N' or `--literal') on the + command line, or else be prepared to parse the escaped names. + +`--full-time' + Produce long format directory listings, and list times in full. + It is equivalent to using `--format=long' with + `--time-style=full-iso' (*note Formatting file timestamps::). + +`-g' + Produce long format directory listings, but don't display owner + information. + +`-G' +`--no-group' + Inhibit display of group information in a long format directory + listing. (This is the default in some non-GNU versions of `ls', + so we provide this option for compatibility.) + +`-h' +`--human-readable' + Append a size letter to each size, such as `M' for mebibytes. + Powers of 1024 are used, not 1000; `M' stands for 1,048,576 bytes. + Use the `--si' option if you prefer powers of 1000. + +`-i' +`--inode' + Print the inode number (also called the file serial number and + index number) of each file to the left of the file name. (This + number uniquely identifies each file within a particular file + system.) + +`-l' +`--format=long' +`--format=verbose' + In addition to the name of each file, print the file type, + permissions, number of hard links, owner name, group name, size, + and timestamp (*note Formatting file timestamps::), normally the + modification time. + + Normally the size is printed as a byte count without punctuation, + but this can be overridden (*note Block size::). For example, `-h' + prints an abbreviated, human-readable count, and + `--block-size="'1"' prints a byte count with the thousands + separator of the current locale. + + For each directory that is listed, preface the files with a line + `total BLOCKS', where BLOCKS is the total disk allocation for all + files in that directory. The block size currently defaults to 1024 + bytes, but this can be overridden (*note Block size::). The + BLOCKS computed counts each hard link separately; this is arguably + a deficiency. + + The permissions listed are similar to symbolic mode specifications + (*note Symbolic Modes::). But `ls' combines multiple bits into the + third character of each set of permissions as follows: + `s' + If the setuid or setgid bit and the corresponding executable + bit are both set. + + `S' + If the setuid or setgid bit is set but the corresponding + executable bit is not set. + + `t' + If the sticky bit and the other-executable bit are both set. + + `T' + If the sticky bit is set but the other-executable bit is not + set. + + `x' + If the executable bit is set and none of the above apply. + + `-' + Otherwise. + + Following the permission bits is a single character that specifies + whether an alternate access method applies to the file. When that + character is a space, there is no alternate access method. When it + is a printing character (e.g., `+'), then there is such a method. + +`-n' +`--numeric-uid-gid' + Produce long format directory listings, but display numeric UIDs + and GIDs instead of the owner and group names. + +`-o' + Produce long format directory listings, but don't display group + information. It is equivalent to using `--format=long' with + `--no-group' . + +`-s' +`--size' + Print the disk allocation of each file to the left of the file + name. This is the amount of disk space used by the file, which is + usually a bit more than the file's size, but it can be less if the + file has holes. + + Normally the disk allocation is printed in units of 1024 bytes, + but this can be overridden (*note Block size::). + + For files that are NFS-mounted from an HP-UX system to a BSD + system, this option reports sizes that are half the correct + values. On HP-UX systems, it reports sizes that are twice the + correct values for files that are NFS-mounted from BSD systems. + This is due to a flaw in HP-UX; it also affects the HP-UX `ls' + program. + +`--si' + Append an SI-style abbreviation to each size, such as `MB' for + megabytes. Powers of 1000 are used, not 1024; `MB' stands for + 1,000,000 bytes. This option is equivalent to `--block-size=si'. + Use the `-h' or `--human-readable' option if you prefer powers of + 1024. + + + +File: coreutils.info, Node: Sorting the output, Next: More details about version sort, Prev: What information is listed, Up: ls invocation + +10.1.3 Sorting the output +------------------------- + +These options change the order in which `ls' sorts the information it +outputs. By default, sorting is done by character code (e.g., ASCII +order). + +`-c' +`--time=ctime' +`--time=status' +`--time=use' + If the long listing format (e.g., `-l', `-o') is being used, print + the status change time (the `ctime' in the inode) instead of the + modification time. When explicitly sorting by time (`--sort=time' + or `-t') or when not using a long listing format, sort according + to the status change time. + +`-f' + Primarily, like `-U'--do not sort; list the files in whatever + order they are stored in the directory. But also enable `-a' (list + all files) and disable `-l', `--color', and `-s' (if they were + specified before the `-f'). + +`-r' +`--reverse' + Reverse whatever the sorting method is--e.g., list files in reverse + alphabetical order, youngest first, smallest first, or whatever. + +`-S' +`--sort=size' + Sort by file size, largest first. + +`-t' +`--sort=time' + Sort by modification time (the `mtime' in the inode), newest first. + +`-u' +`--time=atime' +`--time=access' + If the long listing format (e.g., `--format=long') is being used, + print the last access time (the `atime' in the inode). When + explicitly sorting by time (`--sort=time' or `-t') or when not + using a long listing format, sort according to the access time. + +`-U' +`--sort=none' + Do not sort; list the files in whatever order they are stored in + the directory. (Do not do any of the other unrelated things that + `-f' does.) This is especially useful when listing very large + directories, since not doing any sorting can be noticeably faster. + +`-v' +`--sort=version' + Sort by version name and number, lowest first. It behaves like a + default sort, except that each sequence of decimal digits is + treated numerically as an index/version number. (*Note More + details about version sort::.) + +`-X' +`--sort=extension' + Sort directory contents alphabetically by file extension + (characters after the last `.'); files with no extension are + sorted first. + + + +File: coreutils.info, Node: More details about version sort, Next: General output formatting, Prev: Sorting the output, Up: ls invocation + +10.1.4 More details about version sort +-------------------------------------- + +The version sort takes into account the fact that file names frequently +include indices or version numbers. Standard sorting functions usually +do not produce the ordering that people expect because comparisons are +made on a character-by-character basis. The version sort addresses +this problem, and is especially useful when browsing directories that +contain many files with indices/version numbers in their names: + + $ ls -1 $ ls -1v + foo.zml-1.gz foo.zml-1.gz + foo.zml-100.gz foo.zml-2.gz + foo.zml-12.gz foo.zml-6.gz + foo.zml-13.gz foo.zml-12.gz + foo.zml-2.gz foo.zml-13.gz + foo.zml-25.gz foo.zml-25.gz + foo.zml-6.gz foo.zml-100.gz + + Note also that numeric parts with leading zeroes are considered as +fractional one: + + $ ls -1 $ ls -1v + abc-1.007.tgz abc-1.007.tgz + abc-1.012b.tgz abc-1.01a.tgz + abc-1.01a.tgz abc-1.012b.tgz + + This functionality is implemented using the `strverscmp' function. +*Note String/Array Comparison: (libc)String/Array Comparison. One +result of that implementation decision is that `ls -v' does not use the +locale category, `LC_COLLATE'. As a result, non-numeric prefixes are +sorted as if `LC_COLLATE' were set to `C'. + + +File: coreutils.info, Node: General output formatting, Next: Formatting file timestamps, Prev: More details about version sort, Up: ls invocation + +10.1.5 General output formatting +-------------------------------- + +These options affect the appearance of the overall output. + +`-1' +`--format=single-column' + List one file per line. This is the default for `ls' when standard + output is not a terminal. + +`-C' +`--format=vertical' + List files in columns, sorted vertically. This is the default for + `ls' if standard output is a terminal. It is always the default + for the `dir' and `d' programs. GNU `ls' uses variable width + columns to display as many files as possible in the fewest lines. + +`--color [=WHEN]' + Specify whether to use color for distinguishing file types. WHEN + may be omitted, or one of: + * none - Do not use color at all. This is the default. + + * auto - Only use color if standard output is a terminal. + + * always - Always use color. + Specifying `--color' and no WHEN is equivalent to `--color=always'. + Piping a colorized listing through a pager like `more' or `less' + usually produces unreadable results. However, using `more -f' + does seem to work. + +`-F' +`--classify' +`--indicator-style=classify' + Append a character to each file name indicating the file type. + Also, for regular files that are executable, append `*'. The file + type indicators are `/' for directories, `@' for symbolic links, + `|' for FIFOs, `=' for sockets, and nothing for regular files. Do + not follow symbolic links listed on the command line unless the + `--dereference-command-line' (`-H'), `--dereference' (`-L'), or + `--dereference-command-line-symlink-to-dir' options are specified. + +`--indicator-style=WORD' + Append a character indicator with style WORD to entry names, as + follows: + `none' + Do not append any character indicator; this is the default. + + `file-type' + Append `/' for directories, `@' for symbolic links, `|' for + FIFOs, `=' for sockets, and nothing for regular files. This + is the same as the `-p' or `--file-type' option. + + `classify' + Append `*' for executable regular files, otherwise behave as + for `file-type'. This is the same as the `-F' or + `--classify' option. + +`-k' + Print file sizes in 1024-byte blocks, overriding the default block + size (*note Block size::). This option is equivalent to + `--block-size=1K'. + +`-m' +`--format=commas' + List files horizontally, with as many as will fit on each line, + separated by `, ' (a comma and a space). + +`-p' +`--file-type' +`--indicator-style=file-type' + Append a character to each file name indicating the file type. + This is like `-F', except that executables are not marked. + +`-x' +`--format=across' +`--format=horizontal' + List the files in columns, sorted horizontally. + +`-T COLS' +`--tabsize=COLS' + Assume that each tab stop is COLS columns wide. The default is 8. + `ls' uses tabs where possible in the output, for efficiency. If + COLS is zero, do not use tabs at all. + +`-w' +`--width=COLS' + Assume the screen is COLS columns wide. The default is taken from + the terminal settings if possible; otherwise the environment + variable `COLUMNS' is used if it is set; otherwise the default is + 80. + + + +File: coreutils.info, Node: Formatting file timestamps, Next: Formatting the file names, Prev: General output formatting, Up: ls invocation + +10.1.6 Formatting file timestamps +--------------------------------- + +By default, file timestamps are listed in abbreviated form. Most +locales use a timestamp like `2002-03-30 23:45'. However, the default +POSIX locale uses a date like `Mar 30 2002' for non-recent timestamps, +and a date-without-year and time like `Mar 30 23:45' for recent +timestamps. + + A timestamp is considered to be "recent" if it is less than six +months old, and is not dated in the future. If a timestamp dated today +is not listed in recent form, the timestamp is in the future, which +means you probably have clock skew problems which may break programs +like `make' that rely on file timestamps. + + Time stamps are listed according to the time zone rules specified by +the `TZ' environment variable, or by the system default rules if `TZ' +is not set. *Note Specifying the Time Zone with `TZ': (libc)TZ +Variable. + + The following option changes how file timestamps are printed. + +`--time-style=STYLE' + List timestamps in style STYLE. The STYLE should be one of the + following: + + `+FORMAT' + List timestamps using FORMAT, where FORMAT is interpreted + like the format argument of `date' (*note date invocation::). + For example, `--time-style="+%Y-%m-%d %H:%M:%S"' causes `ls' + to list timestamps like `2002-03-30 23:45:56'. As with + `date', FORMAT's interpretation is affected by the `LC_TIME' + locale category. + + If FORMAT contains two format strings separated by a newline, + the former is used for non-recent files and the latter for + recent files; if you want output columns to line up, you may + need to insert spaces in one of the two formats. + + `full-iso' + List timestamps in full using ISO 8601 date, time, and time + zone format with nanosecond precision, e.g., `2002-03-30 + 23:45:56.477817180 -0700'. This style is equivalent to + `+%Y-%m-%d %H:%M:%S.%N %z'. + + This is useful because the time output includes all the + information that is available from the operating system. For + example, this can help explain `make''s behavior, since GNU + `make' uses the full timestamp to determine whether a file is + out of date. + + `long-iso' + List ISO 8601 date and time in minutes, e.g., `2002-03-30 + 23:45'. These timestamps are shorter than `full-iso' + timestamps, and are usually good enough for everyday work. + This style is equivalent to `%Y-%m-%d %H:%M'. + + `iso' + List ISO 8601 dates for non-recent timestamps (e.g., + `2002-03-30 '), and ISO 8601 month, day, hour, and minute for + recent timestamps (e.g., `03-30 23:45'). These timestamps + are uglier than `long-iso' timestamps, but they carry nearly + the same information in a smaller space and their brevity + helps `ls' output fit within traditional 80-column output + lines. The following two `ls' invocations are equivalent: + + newline=' + ' + ls -l --time-style="+%Y-%m-%d $newline%m-%d %H:%M" + ls -l --time-style="iso" + + `locale' + List timestamps in a locale-dependent form. For example, a + Finnish locale might list non-recent timestamps like `maalis + 30 2002' and recent timestamps like `maalis 30 23:45'. + Locale-dependent timestamps typically consume more space than + `iso' timestamps and are harder for programs to parse because + locale conventions vary so widely, but they are easier for + many people to read. + + The `LC_TIME' locale category specifies the timestamp format. + The default POSIX locale uses timestamps like `Mar 30 2002' + and `Mar 30 23:45'; in this locale, the following two `ls' + invocations are equivalent: + + newline=' + ' + ls -l --time-style="+%b %e %Y$newline%b %e %H:%M" + ls -l --time-style="locale" + + Other locales behave differently. For example, in a German + locale, `--time-style="locale"' might be equivalent to + `--time-style="+%e. %b %Y $newline%e. %b %H:%M"' and might + generate timestamps like `30. Ma"r 2002 ' and `30. Ma"r + 23:45'. + + `posix-STYLE' + List POSIX-locale timestamps if the `LC_TIME' locale category + is POSIX, STYLE timestamps otherwise. For example, the + default style, which is `posix-long-iso', lists timestamps + like `Mar 30 2002' and `Mar 30 23:45' when in the POSIX + locale, and like `2002-03-30 23:45' otherwise. + + You can specify the default value of the `--time-style' option with +the environment variable `TIME_STYLE'; if `TIME_STYLE' is not set the +default style is `posix-long-iso'. GNU Emacs 21 and later can parse +ISO dates, but older Emacs versions do not, so if you are using an +older version of Emacs and specify a non-POSIX locale, you may need to +set `TIME_STYLE="locale"'. + + +File: coreutils.info, Node: Formatting the file names, Prev: Formatting file timestamps, Up: ls invocation + +10.1.7 Formatting the file names +-------------------------------- + +These options change how file names themselves are printed. + +`-b' +`--escape' +`--quoting-style=escape' + Quote nongraphic characters in file names using alphabetic and + octal backslash sequences like those used in C. + +`-N' +`--literal' +`--quoting-style=literal' + Do not quote file names. However, with `ls' nongraphic characters + are still printed as question marks if the output is a terminal + and you do not specify the `--show-control-chars' option. + +`-q' +`--hide-control-chars' + Print question marks instead of nongraphic characters in file + names. This is the default if the output is a terminal and the + program is `ls'. + +`-Q' +`--quote-name' +`--quoting-style=c' + Enclose file names in double quotes and quote nongraphic + characters as in C. + +`--quoting-style=WORD' + Use style WORD to quote file names and other strings that may + contain arbitrary characters. The WORD should be one of the + following: + `literal' + Output strings as-is; this is the same as the `-N' or + `--literal' option. + + `shell' + Quote strings for the shell if they contain shell + metacharacters or would cause ambiguous output. The quoting + is suitable for POSIX-compatible shells like `bash', but it + does not always work for incompatible shells like `csh'. + + `shell-always' + Quote strings for the shell, even if they would normally not + require quoting. + + `c' + Quote strings as for C character string literals, including + the surrounding double-quote characters; this is the same as + the `-Q' or `--quote-name' option. + + `escape' + Quote strings as for C character string literals, except omit + the surrounding double-quote characters; this is the same as + the `-b' or `--escape' option. + + `clocale' + Quote strings as for C character string literals, except use + surrounding quotation marks appropriate for the locale. + + `locale' + Quote strings as for C character string literals, except use + surrounding quotation marks appropriate for the locale, and + quote `like this' instead of "like this" in the default C + locale. This looks nicer on many displays. + + You can specify the default value of the `--quoting-style' option + with the environment variable `QUOTING_STYLE'. If that environment + variable is not set, the default value is `literal', but this + default may change to `shell' in a future version of this package. + +`--show-control-chars' + Print nongraphic characters as-is in file names. This is the + default unless the output is a terminal and the program is `ls'. + + + +File: coreutils.info, Node: dir invocation, Next: vdir invocation, Prev: ls invocation, Up: Directory listing + +10.2 `dir': Briefly list directory contents +=========================================== + +`dir' (also installed as `d') is equivalent to `ls -C -b'; that is, by +default files are listed in columns, sorted vertically, and special +characters are represented by backslash escape sequences. + + *Note `ls': ls invocation. + + +File: coreutils.info, Node: vdir invocation, Next: dircolors invocation, Prev: dir invocation, Up: Directory listing + +10.3 `vdir': Verbosely list directory contents +============================================== + +`vdir' (also installed as `v') is equivalent to `ls -l -b'; that is, by +default files are listed in long format and special characters are +represented by backslash escape sequences. + + +File: coreutils.info, Node: dircolors invocation, Prev: vdir invocation, Up: Directory listing + +10.4 `dircolors': Color setup for `ls' +====================================== + +`dircolors' outputs a sequence of shell commands to set up the terminal +for color output from `ls' (and `dir', etc.). Typical usage: + + eval "`dircolors [OPTION]... [FILE]`" + + If FILE is specified, `dircolors' reads it to determine which colors +to use for which file types and extensions. Otherwise, a precompiled +database is used. For details on the format of these files, run +`dircolors --print-database'. + + The output is a shell command to set the `LS_COLORS' environment +variable. You can specify the shell syntax to use on the command line, +or `dircolors' will guess it from the value of the `SHELL' environment +variable. + + The program accepts the following options. Also see *Note Common +options::. + +`-b' +`--sh' +`--bourne-shell' + Output Bourne shell commands. This is the default if the `SHELL' + environment variable is set and does not end with `csh' or `tcsh'. + +`-c' +`--csh' +`--c-shell' + Output C shell commands. This is the default if `SHELL' ends with + `csh' or `tcsh'. + +`-p' +`--print-database' + Print the (compiled-in) default color configuration database. This + output is itself a valid configuration file, and is fairly + descriptive of the possibilities. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: Basic operations, Next: Special file types, Prev: Directory listing, Up: Top + +11 Basic operations +******************* + +This chapter describes the commands for basic file manipulation: +copying, moving (renaming), and deleting (removing). + +* Menu: + +* cp invocation:: Copy files. +* dd invocation:: Convert and copy a file. +* install invocation:: Copy files and set attributes. +* mv invocation:: Move (rename) files. +* rm invocation:: Remove files or directories. +* shred invocation:: Remove files more securely. + + +File: coreutils.info, Node: cp invocation, Next: dd invocation, Up: Basic operations + +11.1 `cp': Copy files and directories +===================================== + +`cp' copies files (or, optionally, directories). The copy is +completely independent of the original. You can either copy one file to +another, or copy arbitrarily many files to a destination directory. +Synopses: + + cp [OPTION]... [-T] SOURCE DEST + cp [OPTION]... SOURCE... DIRECTORY + cp [OPTION]... -t DIRECTORY SOURCE... + + * If two file names are given, `cp' copies the first file to the + second. + + * If the `--target-directory' (`-t') option is given, or failing + that if the last file is a directory and the + `--no-target-directory' (`-T') option is not given, `cp' copies + each SOURCE file to the specified directory, using the SOURCEs' + names. + + Generally, files are written just as they are read. For exceptions, +see the `--sparse' option below. + + By default, `cp' does not copy directories. However, the `-R', +`-a', and `-r' options cause `cp' to copy recursively by descending +into source directories and copying files to corresponding destination +directories. + + By default, `cp' follows symbolic links only when not copying +recursively. This default can be overridden with the `--archive' +(`-a'), `-d', `--dereference' (`-L'), `--no-dereference' (`-P'), and +`-H' options. If more than one of these options is specified, the last +one silently overrides the others. + + By default, `cp' copies the contents of special files only when not +copying recursively. This default can be overridden with the +`--copy-contents' option. + + `cp' generally refuses to copy a file onto itself, with the +following exception: if `--force --backup' is specified with SOURCE and +DEST identical, and referring to a regular file, `cp' will make a +backup file, either regular or numbered, as specified in the usual ways +(*note Backup options::). This is useful when you simply want to make +a backup of an existing file before changing it. + + The program accepts the following options. Also see *Note Common +options::. + +`-a' +`--archive' + Preserve as much as possible of the structure and attributes of the + original files in the copy (but do not attempt to preserve internal + directory structure; i.e., `ls -U' may list the entries in a copied + directory in a different order). Equivalent to `-dpPR'. + +`-b' +`--backup[=METHOD]' + *Note Backup options::. Make a backup of each file that would + otherwise be overwritten or removed. As a special case, `cp' + makes a backup of SOURCE when the force and backup options are + given and SOURCE and DEST are the same name for an existing, + regular file. One useful application of this combination of + options is this tiny Bourne shell script: + + #!/bin/sh + # Usage: backup FILE... + # Create a GNU-style backup of each listed FILE. + for i; do + cp --backup --force -- "$i" "$i" + done + +`--copy-contents' + If copying recursively, copy the contents of any special files + (e.g., FIFOs and device files) as if they were regular files. + This means trying to read the data in each source file and writing + it to the destination. It is usually a mistake to use this + option, as it normally has undesirable effects on special files + like FIFOs and the ones typically found in the `/dev' directory. + In most cases, `cp -R --copy-contents' will hang indefinitely + trying to read from FIFOs and special files like `/dev/console', + and it will fill up your destination disk if you use it to copy + `/dev/zero'. This option has no effect unless copying + recursively, and it does not affect the copying of symbolic links. + +`-d' + Copy symbolic links as symbolic links rather than copying the + files that they point to, and preserve hard links between source + files in the copies. Equivalent to `--no-dereference + --preserve=links'. + +`-f' +`--force' + When copying without this option and an existing destination file + cannot be opened for writing, the copy fails. However, with + `--force'), when a destination file cannot be opened, `cp' then + unlinks it and tries to open it again. Contrast this behavior + with that enabled by `--link' and `--symbolic-link', whereby the + destination file is never opened but rather is unlinked + unconditionally. Also see the description of + `--remove-destination'. + +`-H' + If a command line argument specifies a symbolic link, then copy the + file it points to rather than the symbolic link itself. However, + copy (preserving its nature) any symbolic link that is encountered + via recursive traversal. + +`-i' +`--interactive' + Prompt whether to overwrite existing regular destination files. + +`-l' +`--link' + Make hard links instead of copies of non-directories. + +`-L' +`--dereference' + Always follow symbolic links. + +`-P' +`--no-dereference' + Copy symbolic links as symbolic links rather than copying the + files that they point to. + +`-p' +`--preserve[=ATTRIBUTE_LIST]' + Preserve the specified attributes of the original files. If + specified, the ATTRIBUTE_LIST must be a comma-separated list of + one or more of the following strings: + + `mode' + Preserve the permission attributes. + + `ownership' + Preserve the owner and group. On most modern systems, only + the super-user may change the owner of a file, and regular + users may preserve the group ownership of a file only if they + happen to be a member of the desired group. + + `timestamps' + Preserve the times of last access and last modification. + + `links' + Preserve in the destination files any links between + corresponding source files. + + `all' + Preserve all file attributes. Equivalent to specifying all + of the above. + + Using `--preserve' with no ATTRIBUTE_LIST is equivalent to + `--preserve=mode,ownership,timestamps'. + + In the absence of this option, each destination file is created + with the permissions of the corresponding source file, minus the + bits set in the umask and minus the set-user-id and set-group-id + bits. *Note File permissions::. + +`--no-preserve=ATTRIBUTE_LIST' + Do not preserve the specified attributes. The ATTRIBUTE_LIST has + the same form as for `--preserve'. + +`--parents' + Form the name of each destination file by appending to the target + directory a slash and the specified name of the source file. The + last argument given to `cp' must be the name of an existing + directory. For example, the command: + + cp --parents a/b/c existing_dir + + copies the file `a/b/c' to `existing_dir/a/b/c', creating any + missing intermediate directories. + +`--reply[=HOW]' + Using `--reply=yes' makes `cp' act as if `yes' were given as a + response to every prompt about a destination file. That + effectively cancels any preceding `--interactive' or `-i' option. + Specify `--reply=no' to make `cp' act as if `no' were given as a + response to every prompt about a destination file. Specify + `--reply=query' to make `cp' prompt the user about each existing + destination file. + +`-R' +`-r' +`--recursive' + Copy directories recursively. Symbolic links are not followed by + default; see the `--archive' (`-a'), `-d', `--dereference' (`-L'), + `--no-dereference' (`-P'), and `-H' options. Special files are + copied by creating a destination file of the same type as the + source; see the `--copy-contents' option. It is not portable to + use `-r' to copy symbolic links or special files. On some non-GNU + systems, `-r' implies the equivalent of `-L' and `--copy-contents' + for historical reasons. Also, it is not portable to use `-R' to + copy symbolic links unless you also specify `-P', as POSIX allows + implementations that dereference symbolic links by default. + +`--remove-destination' + Remove each existing destination file before attempting to open it + (contrast with `-f' above). + +`--sparse=WHEN' + A "sparse file" contains "holes"--a sequence of zero bytes that + does not occupy any physical disk blocks; the `read' system call + reads these as zeroes. This can both save considerable disk space + and increase speed, since many binary files contain lots of + consecutive zero bytes. By default, `cp' detects holes in input + source files via a crude heuristic and makes the corresponding + output file sparse as well. Only regular files may be sparse. + + The WHEN value can be one of the following: + `auto' + The default behavior: if the input file is sparse, attempt to + make the output file sparse, too. However, if an output file + exists but refers to a non-regular file, then do not attempt + to make it sparse. + + `always' + For each sufficiently long sequence of zero bytes in the + input file, attempt to create a corresponding hole in the + output file, even if the input file does not appear to be + sparse. This is useful when the input file resides on a file + system that does not support sparse files (for example, + `efs' file systems in SGI IRIX 5.3 and earlier), but the + output file is on a type of file system that does support + them. Holes may be created only in regular files, so if the + destination file is of some other type, `cp' does not even + try to make it sparse. + + `never' + Never make the output file sparse. This is useful in + creating a file for use with the `mkswap' command, since such + a file must not have any holes. + +`--strip-trailing-slashes' + Remove any trailing slashes from each SOURCE argument. *Note + Trailing slashes::. + +`-s' +`--symbolic-link' + Make symbolic links instead of copies of non-directories. All + source file names must be absolute (starting with `/') unless the + destination files are in the current directory. This option merely + results in an error message on systems that do not support + symbolic links. + +`-S SUFFIX' +`--suffix=SUFFIX' + Append SUFFIX to each backup file made with `-b'. *Note Backup + options::. + +`-t DIRECTORY' +`--target-directory=DIRECTORY' + Specify the destination DIRECTORY. *Note Target directory::. + +`-T' +`--no-target-directory' + Do not treat the last operand specially when it is a directory or a + symbolic link to a directory. *Note Target directory::. + +`-u' +`--update' + Do not copy a non-directory that has an existing destination with + the same or newer modification time. If time stamps are being + preserved, the comparison is to the source time stamp truncated to + the resolutions of the destination file system and of the system + calls used to update time stamps; this avoids duplicate work if + several `cp -pu' commands are executed with the same source and + destination. + +`-v' +`--verbose' + Print the name of each file before copying it. + +`-V METHOD' +`--version-control=METHOD' + Change the type of backups made with `-b'. The METHOD argument + can be `none' (or `off'), `numbered' (or `t'), `existing' (or + `nil'), or `never' (or `simple'). *Note Backup options::. + +`-x' +`--one-file-system' + Skip subdirectories that are on different file systems from the + one that the copy started on. However, mount point directories + _are_ copied. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: dd invocation, Next: install invocation, Prev: cp invocation, Up: Basic operations + +11.2 `dd': Convert and copy a file +================================== + +`dd' copies a file (from standard input to standard output, by default) +with a changeable I/O block size, while optionally performing +conversions on it. Synopses: + + dd [OPERAND]... + dd OPTION + + The only options are `--help' and `--version'. *Note Common +options::. `dd' accepts the following operands. + +`if=FILE' + Read from FILE instead of standard input. + +`of=FILE' + Write to FILE instead of standard output. Unless `conv=notrunc' + is given, `dd' truncates FILE to zero bytes (or the size specified + with `seek='). + +`ibs=BYTES' + Read BYTES bytes at a time. + +`obs=BYTES' + Write BYTES bytes at a time. + +`bs=BYTES' + Both read and write BYTES bytes at a time. This overrides `ibs' + and `obs'. + +`cbs=BYTES' + Convert BYTES bytes at a time. + +`skip=BLOCKS' + Skip BLOCKS `ibs'-byte blocks in the input file before copying. + +`seek=BLOCKS' + Skip BLOCKS `obs'-byte blocks in the output file before copying. + +`count=BLOCKS' + Copy BLOCKS `ibs'-byte blocks from the input file, instead of + everything until the end of the file. + +`conv=CONVERSION[,CONVERSION]...' + Convert the file as specified by the CONVERSION argument(s). (No + spaces around any comma(s).) + + Conversions: + + `ascii' + Convert EBCDIC to ASCII, using the conversion table specified + by POSIX. This provides a 1:1 translation for all 256 bytes. + + `ebcdic' + Convert ASCII to EBCDIC. This is the inverse of the `ascii' + conversion. + + `ibm' + Convert ASCII to alternate EBCDIC, using the alternate + conversion table specified by POSIX. This is not a 1:1 + translation, but reflects common historical practice for `~', + `[', and `]'. + + The `ascii', `ebcdic', and `ibm' conversions are mutually + exclusive. + + `block' + For each line in the input, output `cbs' bytes, replacing the + input newline with a space and padding with spaces as + necessary. + + `unblock' + Replace trailing spaces in each `cbs'-sized input block with a + newline. + + The `block' and `unblock' conversions are mutually exclusive. + + `lcase' + Change uppercase letters to lowercase. + + `ucase' + Change lowercase letters to uppercase. + + The `lcase' and `ucase' conversions are mutually exclusive. + + `swab' + Swap every pair of input bytes. GNU `dd', unlike others, + works when an odd number of bytes are read--the last byte is + simply copied (since there is nothing to swap it with). + + `noerror' + Continue after read errors. + + `nocreat' + Do not create the output file; the output file must already + exist. + + `excl' + Fail if the output file already exists; `dd' must create the + output file itself. + + The `excl' and `nocreat' conversions are mutually exclusive. + + `notrunc' + Do not truncate the output file. + + `sync' + Pad every input block to size of `ibs' with trailing zero + bytes. When used with `block' or `unblock', pad with spaces + instead of zero bytes. + + `fdatasync' + Synchronize output data just before finishing. This forces a + physical write of output data. + + `fsync' + Synchronize output data and metadata just before finishing. + This forces a physical write of output data and metadata. + + +`iflag=FLAG[,FLAG]...' + Access the input file using the flags specified by the FLAG + argument(s). (No spaces around any comma(s).) + +`oflag=FLAG[,FLAG]...' + Access the output file using the flags specified by the FLAG + argument(s). (No spaces around any comma(s).) + + Flags: + + `append' + Write in append mode, so that even if some other process is + writing to this file, every `dd' write will append to the + current contents of the file. This flag makes sense only for + output. + + `direct' + Use direct I/O for data, avoiding the buffer cache. + + `dsync' + Use synchronized I/O for data. For the output file, this + forces a physical write of output data on each write. For + the input file, this flag can matter when reading from a + remote file that has been written to synchronously by some + other process. Metadata (e.g., last-access and last-modified + time) is not necessarily synchronized. + + `sync' + Use synchronized I/O for both data and metadata. + + `nonblock' + Use non-blocking I/O. + + `nofollow' + Do not follow symbolic links. + + `noctty' + Do not assign the file to be a controlling terminal for `dd'. + This has no effect when the file is not a terminal. On many + hosts (e.g., GNU/Linux hosts), this option has no effect at + all. + + + These flags are not supported on all systems, and `dd' rejects + attempts to use them when they are not supported. When reading + from standard input or writing to standard output, the `nofollow' + and `noctty' flags should not be specified, and the other flags + (e.g., `nonblock') can affect how other processes behave with the + affected file descriptors, even after `dd' exits. + + + The numeric-valued strings above (BYTES and BLOCKS) can be followed +by a multiplier: `b'=512, `c'=1, `w'=2, `xM'=M, or any of the standard +block size suffixes like `k'=1024 (*note Block size::). + + Use different `dd' invocations to use different block sizes for +skipping and I/O. For example, the following shell commands copy data +in 512 KiB blocks between a disk and a tape, but do not save or restore +a 4 KiB label at the start of the disk: + + disk=/dev/rdsk/c0t1d0s2 + tape=/dev/rmt/0 + + # Copy all but the label from disk to tape. + (dd bs=4k skip=1 count=0 && dd bs=512k) <$disk >$tape + + # Copy from tape back to disk, but leave the disk label alone. + (dd bs=4k seek=1 count=0 && dd bs=512k) <$tape >$disk + + Note that sending a `SIGUSR1' signal to a running `dd' process makes +it print I/O statistics to standard error, then to resume copying. In +the example below, `dd' is run in the background to copy 10 million +blocks. The `kill' command makes it output intermediate I/O statistics, +and when `dd' completes, it outputs the final statistics. + + $ dd if=/dev/zero of=/dev/null count=10MB & pid=$! + $ kill -s USR1 $pid; wait $pid + 3385223+0 records in + 3385223+0 records out + 1733234176 bytes (1.7 GB) copied, 6.42173 seconds, 270 MB/s + 10000000+0 records in + 10000000+0 records out + 5120000000 bytes (5.1 GB) copied, 18.913 seconds, 271 MB/s + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: install invocation, Next: mv invocation, Prev: dd invocation, Up: Basic operations + +11.3 `install': Copy files and set attributes +============================================= + +`install' copies files while setting their permission modes and, if +possible, their owner and group. Synopses: + + install [OPTION]... [-T] SOURCE DEST + install [OPTION]... SOURCE... DIRECTORY + install [OPTION]... -t DIRECTORY SOURCE... + install [OPTION]... -d DIRECTORY... + + * If two file names are given, `install' copies the first file to the + second. + + * If the `--target-directory' (`-t') option is given, or failing + that if the last file is a directory and the + `--no-target-directory' (`-T') option is not given, `install' + copies each SOURCE file to the specified directory, using the + SOURCEs' names. + + * If the `--directory' (`-d') option is given, `install' creates + each DIRECTORY and any missing parent directories. + + `install' is similar to `cp', but allows you to control the +attributes of destination files. It is typically used in Makefiles to +copy programs into their destination directories. It refuses to copy +files onto themselves. + + The program accepts the following options. Also see *Note Common +options::. + +`-b' +`--backup[=METHOD]' + *Note Backup options::. Make a backup of each file that would + otherwise be overwritten or removed. + +`-c' + Ignored; for compatibility with old Unix versions of `install'. + +`-d' +`--directory' + Create each given directory and any missing parent directories, + setting the owner, group and mode as given on the command line or + to the defaults. It also gives any parent directories it creates + those attributes. (This is different from the SunOS 4.x + `install', which gives directories that it creates the default + attributes.) + +`-g GROUP' +`--group=GROUP' + Set the group ownership of installed files or directories to + GROUP. The default is the process's current group. GROUP may be + either a group name or a numeric group id. + +`-m MODE' +`--mode=MODE' + Set the permissions for the installed file or directory to MODE, + which can be either an octal number, or a symbolic mode as in + `chmod', with 0 as the point of departure (*note File + permissions::). The default mode is `u=rwx,go=rx'--read, write, + and execute for the owner, and read and execute for group and + other. + +`-o OWNER' +`--owner=OWNER' + If `install' has appropriate privileges (is run as root), set the + ownership of installed files or directories to OWNER. The default + is `root'. OWNER may be either a user name or a numeric user ID. + +`-p' +`--preserve-timestamps' + Set the time of last access and the time of last modification of + each installed file to match those of each corresponding original + file. When a file is installed without this option, its last + access and last modification times are both set to the time of + installation. This option is useful if you want to use the last + modification times of installed files to keep track of when they + were last built as opposed to when they were last installed. + +`-s' +`--strip' + Strip the symbol tables from installed binary executables. + +`-S SUFFIX' +`--suffix=SUFFIX' + Append SUFFIX to each backup file made with `-b'. *Note Backup + options::. + +`-t DIRECTORY' +`--target-directory=DIRECTORY' + Specify the destination DIRECTORY. *Note Target directory::. + +`-T' +`--no-target-directory' + Do not treat the last operand specially when it is a directory or a + symbolic link to a directory. *Note Target directory::. + +`-v' +`--verbose' + Print the name of each file before copying it. + +`-V METHOD' +`--version-control=METHOD' + Change the type of backups made with `-b'. The METHOD argument + can be `none' (or `off'), `numbered' (or `t'), `existing' (or + `nil'), or `never' (or `simple'). *Note Backup options::. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: mv invocation, Next: rm invocation, Prev: install invocation, Up: Basic operations + +11.4 `mv': Move (rename) files +============================== + +`mv' moves or renames files (or directories). Synopses: + + mv [OPTION]... [-T] SOURCE DEST + mv [OPTION]... SOURCE... DIRECTORY + mv [OPTION]... -t DIRECTORY SOURCE... + + * If two file names are given, `mv' moves the first file to the + second. + + * If the `--target-directory' (`-t') option is given, or failing + that if the last file is a directory and the + `--no-target-directory' (`-T') option is not given, `mv' moves + each SOURCE file to the specified directory, using the SOURCEs' + names. + + `mv' can move any type of file from one file system to another. +Prior to version `4.0' of the fileutils, `mv' could move only regular +files between file systems. For example, now `mv' can move an entire +directory hierarchy including special device files from one partition +to another. It first uses some of the same code that's used by `cp -a' +to copy the requested directories and files, then (assuming the copy +succeeded) it removes the originals. If the copy fails, then the part +that was copied to the destination partition is removed. If you were +to copy three directories from one partition to another and the copy of +the first directory succeeded, but the second didn't, the first would +be left on the destination partition and the second and third would be +left on the original partition. + + If a destination file exists but is normally unwritable, standard +input is a terminal, and the `-f' or `--force' option is not given, +`mv' prompts the user for whether to replace the file. (You might own +the file, or have write permission on its directory.) If the response +is not affirmative, the file is skipped. + + _Warning_: If you try to move a symlink that points to a directory, +and you specify the symlink with a trailing slash, then `mv' doesn't +move the symlink but instead moves the directory referenced by the +symlink. *Note Trailing slashes::. + + The program accepts the following options. Also see *Note Common +options::. + +`-b' +`--backup[=METHOD]' + *Note Backup options::. Make a backup of each file that would + otherwise be overwritten or removed. + +`-f' +`--force' + Do not prompt the user before removing a destination file. + +`-i' +`--interactive' + Prompt whether to overwrite each existing destination file, + regardless of its permissions. If the response is not + affirmative, the file is skipped. + +`--reply[=HOW]' + Specifying `--reply=yes' is equivalent to using `--force'. + Specify `--reply=no' to make `mv' act as if `no' were given as a + response to every prompt about a destination file. Specify + `--reply=query' to make `mv' prompt the user about each existing + destination file. + +`-u' +`--update' + Do not move a non-directory that has an existing destination with + the same or newer modification time. If the move is across file + system boundaries, the comparison is to the source time stamp + truncated to the resolutions of the destination file system and of + the system calls used to update time stamps; this avoids duplicate + work if several `mv -u' commands are executed with the same source + and destination. + +`-v' +`--verbose' + Print the name of each file before moving it. + +`--strip-trailing-slashes' + Remove any trailing slashes from each SOURCE argument. *Note + Trailing slashes::. + +`-S SUFFIX' +`--suffix=SUFFIX' + Append SUFFIX to each backup file made with `-b'. *Note Backup + options::. + +`-t DIRECTORY' +`--target-directory=DIRECTORY' + Specify the destination DIRECTORY. *Note Target directory::. + +`-T' +`--no-target-directory' + Do not treat the last operand specially when it is a directory or a + symbolic link to a directory. *Note Target directory::. + +`-V METHOD' +`--version-control=METHOD' + Change the type of backups made with `-b'. The METHOD argument + can be `none' (or `off'), `numbered' (or `t'), `existing' (or + `nil'), or `never' (or `simple'). *Note Backup options::. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: rm invocation, Next: shred invocation, Prev: mv invocation, Up: Basic operations + +11.5 `rm': Remove files or directories +====================================== + +`rm' removes each given FILE. By default, it does not remove +directories. Synopsis: + + rm [OPTION]... [FILE]... + + If a file is unwritable, standard input is a terminal, and the `-f' +or `--force' option is not given, or the `-i' or `--interactive' option +_is_ given, `rm' prompts the user for whether to remove the file. If +the response is not affirmative, the file is skipped. + + _Warning_: If you use `rm' to remove a file, it is usually possible +to recover the contents of that file. If you want more assurance that +the contents are truly unrecoverable, consider using `shred'. + + The program accepts the following options. Also see *Note Common +options::. + +`-d' +`--directory' + Use the `unlink' function unconditionally rather than attempting + to check whether the file is a directory and using `rmdir' if it + is a directory. This can be useful on corrupted file systems where + `unlink' works even though other, file-checking functions fail. + For directories, this works only if you have appropriate + privileges and if your operating system supports `unlink' for + directories. Because unlinking a directory causes any files in + the deleted directory to become unreferenced, it is wise to `fsck' + the file system afterwards. + +`-f' +`--force' + Ignore nonexistent files and never prompt the user. Ignore any + previous `--interactive' (`-i') option. + +`-i' +`--interactive' + Prompt whether to remove each file. If the response is not + affirmative, the file is skipped. Ignore any previous `--force' + (`-f') option. + +`--preserve-root' + Fail upon any attempt to remove the file system root, `/', when + used with the `--recursive' option. Without `--recursive', this + option has no effect. *Note Treating / specially::. + +`--no-preserve-root' + Cancel the effect of any preceding `--preserve-root' option. + *Note Treating / specially::. + +`-r' +`-R' +`--recursive' + Remove the contents of directories recursively. + +`-v' +`--verbose' + Print the name of each file before removing it. + + + One common question is how to remove files whose names begin with a +`-'. GNU `rm', like every program that uses the `getopt' function to +parse its arguments, lets you use the `--' option to indicate that all +following arguments are non-options. To remove a file called `-f' in +the current directory, you could type either: + + rm -- -f + +or: + + rm ./-f + + The Unix `rm' program's use of a single `-' for this purpose +predates the development of the getopt standard syntax. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: shred invocation, Prev: rm invocation, Up: Basic operations + +11.6 `shred': Remove files more securely +======================================== + +`shred' overwrites devices or files, to help prevent even very +expensive hardware from recovering the data. + + Ordinarily when you remove a file (*note rm invocation::), the data +is not actually destroyed. Only the index listing where the file is +stored is destroyed, and the storage is made available for reuse. +There are undelete utilities that will attempt to reconstruct the index +and can bring the file back if the parts were not reused. + + On a busy system with a nearly-full drive, space can get reused in a +few seconds. But there is no way to know for sure. If you have +sensitive data, you may want to be sure that recovery is not possible +by actually overwriting the file with non-sensitive data. + + However, even after doing that, it is possible to take the disk back +to a laboratory and use a lot of sensitive (and expensive) equipment to +look for the faint "echoes" of the original data underneath the +overwritten data. If the data has only been overwritten once, it's not +even that hard. + + The best way to remove something irretrievably is to destroy the +media it's on with acid, melt it down, or the like. For cheap +removable media like floppy disks, this is the preferred method. +However, hard drives are expensive and hard to melt, so the `shred' +utility tries to achieve a similar effect non-destructively. + + This uses many overwrite passes, with the data patterns chosen to +maximize the damage they do to the old data. While this will work on +floppies, the patterns are designed for best effect on hard drives. +For more details, see the source code and Peter Gutmann's paper `Secure +Deletion of Data from Magnetic and Solid-State Memory' +(http://www.cs.auckland.ac.nz/~pgut001/pubs/secure_del.html), from the +proceedings of the Sixth USENIX Security Symposium (San Jose, +California, July 22-25, 1996). + + *Please note* that `shred' relies on a very important assumption: +that the file system overwrites data in place. This is the traditional +way to do things, but many modern file system designs do not satisfy +this assumption. Exceptions include: + + * Log-structured or journaled file systems, such as those supplied + with AIX and Solaris, and JFS, ReiserFS, XFS, Ext3, BFS, NTFS etc. + when they are configured to journal _data_. + + * File systems that write redundant data and carry on even if some + writes fail, such as RAID-based file systems. + + * File systems that make snapshots, such as Network Appliance's NFS + server. + + * File systems that cache in temporary locations, such as NFS + version 3 clients. + + * Compressed file systems. + + If you are not sure how your file system operates, then you should +assume that it does not overwrite data in place, which means that shred +cannot reliably operate on regular files in your file system. + + Generally speaking, it is more reliable to shred a device than a +file, since this bypasses the problem of file system design mentioned +above. However, even shredding devices is not always completely +reliable. For example, most disks map out bad sectors invisibly to the +application; if the bad sectors contain sensitive data, `shred' won't +be able to destroy it. + + `shred' makes no attempt to detect or report this problem, just as +it makes no attempt to do anything about backups. However, since it is +more reliable to shred devices than files, `shred' by default does not +truncate or remove the output file. This default is more suitable for +devices, which typically cannot be truncated and should not be removed. + + Finally, consider the risk of backups and mirrors. File system +backups and remote mirrors may contain copies of the file that cannot +be removed, and that will allow a shredded file to be recovered later. +So if you keep any data you may later want to destroy using `shred', be +sure that it is not backed up or mirrored. + + shred [OPTION]... FILE[...] + + The program accepts the following options. Also see *Note Common +options::. + +`-f' +`--force' + Override file permissions if necessary to allow overwriting. + +`-NUMBER' +`-n NUMBER' +`--iterations=NUMBER' + By default, `shred' uses 25 passes of overwrite. This is enough + for all of the useful overwrite patterns to be used at least once. + You can reduce this to save time, or increase it if you have a lot + of time to waste. + +`-s BYTES' +`--size=BYTES' + Shred the first BYTES bytes of the file. The default is to shred + the whole file. BYTES can be followed by a size specification like + `K', `M', or `G' to specify a multiple. *Note Block size::. + +`-u' +`--remove' + After shredding a file, truncate it (if possible) and then remove + it. If a file has multiple links, only the named links will be + removed. + +`-v' +`--verbose' + Display status updates as sterilization proceeds. + +`-x' +`--exact' + By default, `shred' rounds the size of a regular file up to the + next multiple of the file system block size to fully erase the + last block of the file. Use `--exact' to suppress that behavior. + Thus, by default if you shred a 10-byte regular file on a system + with 512-byte blocks, the resulting file will be 512 bytes long. + With this option, shred does not increase the apparent size of the + file. + +`-z' +`--zero' + Normally, the last pass that `shred' writes is made up of random + data. If this would be conspicuous on your hard drive (for + example, because it looks like encrypted data), or you just think + it's tidier, the `--zero' option adds an additional overwrite pass + with all zero bits. This is in addition to the number of passes + specified by the `--iterations' option. + + + You might use the following command to erase all trace of the file +system you'd created on the floppy disk in your first drive. That +command takes about 20 minutes to erase a "1.44MB" (actually 1440 KiB) +floppy. + + shred --verbose /dev/fd0 + + Similarly, to erase all data on a selected partition of your hard +disk, you could give a command like this: + + shred --verbose /dev/sda5 + + A FILE of `-' denotes standard output. The intended use of this is +to shred a removed temporary file. For example: + + i=`tempfile -m 0600` + exec 3<>"$i" + rm -- "$i" + echo "Hello, world" >&3 + shred - >&3 + exec 3>- + + However, the command `shred - >file' does not shred the contents of +FILE, since the shell truncates FILE before invoking `shred'. Use the +command `shred file' or (if using a Bourne-compatible shell) the +command `shred - 1<>file' instead. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: Special file types, Next: Changing file attributes, Prev: Basic operations, Up: Top + +12 Special file types +********************* + +This chapter describes commands which create special types of files (and +`rmdir', which removes directories, one special file type). + + Although Unix-like operating systems have markedly fewer special file +types than others, not _everything_ can be treated only as the +undifferentiated byte stream of "normal files". For example, when a +file is created or removed, the system must record this information, +which it does in a "directory"--a special type of file. Although you +can read directories as normal files, if you're curious, in order for +the system to do its job it must impose a structure, a certain order, +on the bytes of the file. Thus it is a "special" type of file. + + Besides directories, other special file types include named pipes +(FIFOs), symbolic links, sockets, and so-called "special files". + +* Menu: + +* link invocation:: Make a hard link via the link syscall +* ln invocation:: Make links between files. +* mkdir invocation:: Make directories. +* mkfifo invocation:: Make FIFOs (named pipes). +* mknod invocation:: Make block or character special files. +* readlink invocation:: Print the referent of a symbolic link. +* rmdir invocation:: Remove empty directories. +* unlink invocation:: Remove files via the unlink syscall + + +File: coreutils.info, Node: link invocation, Next: ln invocation, Up: Special file types + +12.1 `link': Make a hard link via the link syscall +================================================== + +`link' creates a single hard link at a time. It is a minimalist +interface to the system-provided `link' function. *Note Hard Links: +(libc)Hard Links. It avoids the bells and whistles of the more +commonly-used `ln' command (*note ln invocation::). Synopsis: + + link FILENAME LINKNAME + + FILENAME must specify an existing file, and LINKNAME must specify a +nonexistent entry in an existing directory. `link' simply calls `link +(FILENAME, LINKNAME)' to create the link. + + On a GNU system, this command acts like `ln --directory +--no-target-directory FILENAME LINKNAME'. However, the `--directory' +and `--no-target-directory' options are not specified by POSIX, and the +`link' command is more portable in practice. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: ln invocation, Next: mkdir invocation, Prev: link invocation, Up: Special file types + +12.2 `ln': Make links between files +=================================== + +`ln' makes links between files. By default, it makes hard links; with +the `-s' option, it makes symbolic (or "soft") links. Synopses: + + ln [OPTION]... [-T] TARGET LINKNAME + ln [OPTION]... TARGET + ln [OPTION]... TARGET... DIRECTORY + ln [OPTION]... -t DIRECTORY TARGET... + + * If two file names are given, `ln' creates a link to the first file + from the second. + + * If one TARGET is given, `ln' creates a link to that file in the + current directory. + + * If the `--target-directory' (`-t') option is given, or failing + that if the last file is a directory and the + `--no-target-directory' (`-T') option is not given, `ln' creates a + link to each TARGET file in the specified directory, using the + TARGETs' names. + + + Normally `ln' does not remove existing files. Use the `--force' +(`-f') option to remove them unconditionally, the `--interactive' +(`-i') option to remove them conditionally, and the `--backup' (`-b') +option to rename them. + + A "hard link" is another name for an existing file; the link and the +original are indistinguishable. Technically speaking, they share the +same inode, and the inode contains all the information about a +file--indeed, it is not incorrect to say that the inode _is_ the file. +On all existing implementations, you cannot make a hard link to a +directory, and hard links cannot cross file system boundaries. (These +restrictions are not mandated by POSIX, however.) + + "Symbolic links" ("symlinks" for short), on the other hand, are a +special file type (which not all kernels support: System V release 3 +(and older) systems lack symlinks) in which the link file actually +refers to a different file, by name. When most operations (opening, +reading, writing, and so on) are passed the symbolic link file, the +kernel automatically "dereferences" the link and operates on the target +of the link. But some operations (e.g., removing) work on the link +file itself, rather than on its target. *Note Symbolic Links: +(libc)Symbolic Links. + + The program accepts the following options. Also see *Note Common +options::. + +`-b' +`--backup[=METHOD]' + *Note Backup options::. Make a backup of each file that would + otherwise be overwritten or removed. + +`-d' +`-F' +`--directory' + Allow the super-user to attempt to make hard links to directories. + However, note that this will probably fail due to system + restrictions, even for the super-user. + +`-f' +`--force' + Remove existing destination files. + +`-i' +`--interactive' + Prompt whether to remove existing destination files. + +`-n' +`--no-dereference' + Do not treat the last operand specially when it is a symbolic link + to a directory. Instead, treat it as if it were a normal file. + + When the destination is an actual directory (not a symlink to one), + there is no ambiguity. The link is created in that directory. + But when the specified destination is a symlink to a directory, + there are two ways to treat the user's request. `ln' can treat + the destination just as it would a normal directory and create the + link in it. On the other hand, the destination can be viewed as a + non-directory--as the symlink itself. In that case, `ln' must + delete or backup that symlink before creating the new link. The + default is to treat a destination that is a symlink to a directory + just like a directory. + + This option is weaker than the `--no-target-directory' (`-T') + option, so it has no effect if both options are given. + +`-s' +`--symbolic' + Make symbolic links instead of hard links. This option merely + produces an error message on systems that do not support symbolic + links. + +`-S SUFFIX' +`--suffix=SUFFIX' + Append SUFFIX to each backup file made with `-b'. *Note Backup + options::. + +`-t DIRECTORY' +`--target-directory=DIRECTORY' + Specify the destination DIRECTORY. *Note Target directory::. + +`-T' +`--no-target-directory' + Do not treat the last operand specially when it is a directory or a + symbolic link to a directory. *Note Target directory::. + +`-v' +`--verbose' + Print the name of each file before linking it. + +`-V METHOD' +`--version-control=METHOD' + Change the type of backups made with `-b'. The METHOD argument + can be `none' (or `off'), `numbered' (or `t'), `existing' (or + `nil'), or `never' (or `simple'). *Note Backup options::. + + + Examples: + + ln -s /some/name # creates link ./name pointing to /some/name + ln -s /some/name myname # creates link ./myname pointing to /some/name + ln -s a b .. # creates links ../a and ../b pointing to ./a and ./b + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: mkdir invocation, Next: mkfifo invocation, Prev: ln invocation, Up: Special file types + +12.3 `mkdir': Make directories +============================== + +`mkdir' creates directories with the specified names. Synopsis: + + mkdir [OPTION]... NAME... + + If a NAME is an existing file but not a directory, `mkdir' prints a +warning message on stderr and will exit with a status of 1 after +processing any remaining NAMEs. The same is done when a NAME is an +existing directory and the -p option is not given. If a NAME is an +existing directory and the -p option is given, `mkdir' will ignore it. +That is, `mkdir' will not print a warning, raise an error, or change +the mode of the directory (even if the -m option is given), and will +move on to processing any remaining NAMEs. + + The program accepts the following options. Also see *Note Common +options::. + +`-m MODE' +`--mode=MODE' + Set the mode of created directories to MODE, which is symbolic as + in `chmod' and uses `a=rwx' (read, write and execute allowed for + everyone) minus the bits set in the umask for the point of the + departure. *Note File permissions::. + +`-p' +`--parents' + Make any missing parent directories for each argument. The mode + for parent directories is set to the umask modified by `u+wx'. + Ignore arguments corresponding to existing directories. + +`-v' + +`--verbose' + Print a message for each created directory. This is most useful + with `--parents'. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: mkfifo invocation, Next: mknod invocation, Prev: mkdir invocation, Up: Special file types + +12.4 `mkfifo': Make FIFOs (named pipes) +======================================= + +`mkfifo' creates FIFOs (also called "named pipes") with the specified +names. Synopsis: + + mkfifo [OPTION] NAME... + + A "FIFO" is a special file type that permits independent processes +to communicate. One process opens the FIFO file for writing, and +another for reading, after which data can flow as with the usual +anonymous pipe in shells or elsewhere. + + The program accepts the following option. Also see *Note Common +options::. + +`-m MODE' +`--mode=MODE' + Set the mode of created FIFOs to MODE, which is symbolic as in + `chmod' and uses `a=rw' (read and write allowed for everyone) minus + the bits set in the umask for the point of departure. *Note File + permissions::. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: mknod invocation, Next: readlink invocation, Prev: mkfifo invocation, Up: Special file types + +12.5 `mknod': Make block or character special files +=================================================== + +`mknod' creates a FIFO, character special file, or block special file +with the specified name. Synopsis: + + mknod [OPTION]... NAME TYPE [MAJOR MINOR] + + Unlike the phrase "special file type" above, the term "special file" +has a technical meaning on Unix: something that can generate or receive +data. Usually this corresponds to a physical piece of hardware, e.g., +a printer or a disk. (These files are typically created at +system-configuration time.) The `mknod' command is what creates files +of this type. Such devices can be read either a character at a time or +a "block" (many characters) at a time, hence we say there are "block +special" files and "character special" files. + + The arguments after NAME specify the type of file to make: + +`p' + for a FIFO + +`b' + for a block special file + +`c' + for a character special file + + + When making a block or character special file, the major and minor +device numbers must be given after the file type. If a major or minor +device number begins with `0x' or `0X', it is interpreted as +hexadecimal; otherwise, if it begins with `0', as octal; otherwise, as +decimal. + + The program accepts the following option. Also see *Note Common +options::. + +`-m MODE' +`--mode=MODE' + Set the mode of created files to MODE, which is symbolic as in + `chmod' and uses `a=rw' minus the bits set in the umask as the + point of departure. *Note File permissions::. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: readlink invocation, Next: rmdir invocation, Prev: mknod invocation, Up: Special file types + +12.6 `readlink': Print the referent of a symbolic link +====================================================== + +`readlink' may work in one of two supported modes: + +`Readlink mode' + `readlink' outputs the value of the given symbolic link. If + `readlink' is invoked with an argument other than the name of a + symbolic link, it produces no output and exits with a nonzero exit + code. + +`Canonicalize mode' + `readlink' outputs the absolute name of the given file which + contains no `.', `..' components nor any repeated separators (`/') + or symbolic links. + + + readlink [OPTION] FILE + + By default, `readlink' operates in readlink mode. + + The program accepts the following options. Also see *Note Common +options::. + +`-f' +`--canonicalize' + Activate canonicalize mode. If any path component except the last + one is missing or unavailable, `readlink' produces no output and + exits with a nonzero exit code. + +`-e' +`--canonicalize-existing' + Activate canonicalize mode. If any path component is missing or + unavailable, `readlink' produces no output and exits with a + nonzero exit code. + +`-m' +`--canonicalize-missing' + Activate canonicalize mode. If any path component is missing or + unavailable, `readlink' treats it as a directory. + +`-n' +`--no-newline' + Do not output the trailing newline. + +`-s' +`-q' +`--silent' +`--quiet' + Suppress most error messages. + +`-v' +`--verbose' + Report error messages. + + + The `readlink' utility first appeared in OpenBSD 2.1. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: rmdir invocation, Next: unlink invocation, Prev: readlink invocation, Up: Special file types + +12.7 `rmdir': Remove empty directories +====================================== + +`rmdir' removes empty directories. Synopsis: + + rmdir [OPTION]... DIRECTORY... + + If any DIRECTORY argument does not refer to an existing empty +directory, it is an error. + + The program accepts the following option. Also see *Note Common +options::. + +`--ignore-fail-on-non-empty' + Ignore each failure to remove a directory that is solely because + the directory is non-empty. + +`-p' +`--parents' + Remove DIRECTORY, then try to remove each component of DIRECTORY. + So, for example, `rmdir -p a/b/c' is similar to `rmdir a/b/c a/b + a'. As such, it fails if any of those directories turns out not + to be empty. Use the `--ignore-fail-on-non-empty' option to make + it so such a failure does not evoke a diagnostic and does not + cause `rmdir' to exit unsuccessfully. + +`-v' + +`--verbose' + Give a diagnostic for each successful removal. DIRECTORY is + removed. + + + *Note rm invocation::, for how to remove non-empty directories +(recursively). + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: unlink invocation, Prev: rmdir invocation, Up: Special file types + +12.8 `unlink': Remove files via the unlink syscall +================================================== + +`unlink' deletes a single specified file name. It is a minimalist +interface to the system-provided `unlink' function. *Note Deleting +Files: (libc)Deleting Files. Synopsis: It avoids the bells and +whistles of the more commonly-used `rm' command (*note rm invocation::). + + unlink FILENAME + + On some systems `unlink' can be used to delete the name of a +directory. On others, it can be used that way only by a privileged +user. In the GNU system `unlink' can never delete the name of a +directory. + + The `unlink' command honors the `--help' and `--version' options. +To remove a file whose name begins with `-', prefix the name with `./', +e.g., `unlink ./--help'. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: Changing file attributes, Next: Disk usage, Prev: Special file types, Up: Top + +13 Changing file attributes +*************************** + +A file is not merely its contents, a name, and a file type (*note +Special file types::). A file also has an owner (a userid), a group (a +group id), permissions (what the owner can do with the file, what +people in the group can do, and what everyone else can do), various +timestamps, and other information. Collectively, we call these a file's +"attributes". + + These commands change file attributes. + +* Menu: + +* chgrp invocation:: Change file groups. +* chmod invocation:: Change access permissions. +* chown invocation:: Change file owners and groups. +* touch invocation:: Change file timestamps. + + +File: coreutils.info, Node: chown invocation, Next: touch invocation, Prev: chmod invocation, Up: Changing file attributes + +13.1 `chown': Change file owner and group +========================================= + +`chown' changes the user and/or group ownership of each given FILE to +NEW-OWNER or to the user and group of an existing reference file. +Synopsis: + + chown [OPTION]... {NEW-OWNER | --reference=REF_FILE} FILE... + + If used, NEW-OWNER specifies the new owner and/or group as follows +(with no embedded white space): + + [OWNER] [ : [GROUP] ] + + Specifically: + +OWNER + If only an OWNER (a user name or numeric user id) is given, that + user is made the owner of each given file, and the files' group is + not changed. + +OWNER`:'GROUP + If the OWNER is followed by a colon and a GROUP (a group name or + numeric group id), with no spaces between them, the group + ownership of the files is changed as well (to GROUP). + +OWNER`:' + If a colon but no group name follows OWNER, that user is made the + owner of the files and the group of the files is changed to + OWNER's login group. + +`:'GROUP + If the colon and following GROUP are given, but the owner is + omitted, only the group of the files is changed; in this case, + `chown' performs the same function as `chgrp'. + +`:' + If only a colon is given, or if NEW-OWNER is empty, neither the + owner nor the group is changed. + + + Some older scripts may still use `.' in place of the `:' separator. +POSIX 1003.1-2001 (*note Standards conformance::) does not require +support for that, but for backward compatibility GNU `chown' supports +`.' so long as no ambiguity results. New scripts should avoid the use +of `.' because it is not portable, and because it has undesirable +results if the entire OWNER`.'GROUP happens to identify a user whose +name contains `.'. + + The `chown' command sometimes clears the set-user-ID or set-group-ID +permission bits. This behavior depends on the policy and functionality +of the underlying `chown' system call, which may make system-dependent +file mode modifications outside the control of the `chown' command. +For example, the `chown' command might not affect those bits when +operated as the superuser, or if the bits signify some function other +than executable permission (e.g., mandatory locking). When in doubt, +check the underlying system behavior. + + The program accepts the following options. Also see *Note Common +options::. + +`-c' +`--changes' + Verbosely describe the action for each FILE whose ownership + actually changes. + +`-f' +`--silent' +`--quiet' + Do not print error messages about files whose ownership cannot be + changed. + +`--from=OLD-OWNER' + Change a FILE's ownership only if it has current attributes + specified by OLD-OWNER. OLD-OWNER has the same form as NEW-OWNER + described above. This option is useful primarily from a security + standpoint in that it narrows considerably the window of potential + abuse. For example, to reflect a UID numbering change for one + user's files without an option like this, `root' might run + + find / -owner OLDUSER -print0 | xargs -0 chown -h NEWUSER + + But that is dangerous because the interval between when the `find' + tests the existing file's owner and when the `chown' is actually + run may be quite large. One way to narrow the gap would be to + invoke chown for each file as it is found: + + find / -owner OLDUSER -exec chown -h NEWUSER {} \; + + But that is very slow if there are many affected files. With this + option, it is safer (the gap is narrower still) though still not + perfect: + + chown -h -R --from=OLDUSER NEWUSER / + +`--dereference' + Do not act on symbolic links themselves but rather on what they + point to. This is the default. + +`-h' +`--no-dereference' + Act on symbolic links themselves instead of what they point to. + This mode relies on the `lchown' system call. On systems that do + not provide the `lchown' system call, `chown' fails when a file + specified on the command line is a symbolic link. By default, no + diagnostic is issued for symbolic links encountered during a + recursive traversal, but see `--verbose'. + +`--preserve-root' + Fail upon any attempt to recursively change the file system root, + `/'. Without `--recursive', this option has no effect. *Note + Treating / specially::. + +`--no-preserve-root' + Cancel the effect of any preceding `--preserve-root' option. + *Note Treating / specially::. + +`--reference=REF_FILE' + Change the user and group of each FILE to be the same as those of + REF_FILE. If REF_FILE is a symbolic link, do not use the user and + group of the symbolic link, but rather those of the file it refers + to. + +`-v' +`--verbose' + Output a diagnostic for every file processed. If a symbolic link + is encountered during a recursive traversal on a system without + the `lchown' system call, and `--no-dereference' is in effect, + then issue a diagnostic saying neither the symbolic link nor its + referent is being changed. + +`-R' +`--recursive' + Recursively change ownership of directories and their contents. + +`-H' + If `--recursive' (`-R') is specified and a command line argument + is a symbolic link to a directory, traverse it. *Note Traversing + symlinks::. + +`-L' + In a recursive traversal, traverse every symbolic link to a + directory that is encountered. *Note Traversing symlinks::. + +`-P' + Do not traverse any symbolic links. This is the default if none + of `-H', `-L', or `-P' is specified. *Note Traversing symlinks::. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: chgrp invocation, Next: chmod invocation, Up: Changing file attributes + +13.2 `chgrp': Change group ownership +==================================== + +`chgrp' changes the group ownership of each given FILE to GROUP (which +can be either a group name or a numeric group id) or to the group of an +existing reference file. Synopsis: + + chgrp [OPTION]... {GROUP | --reference=REF_FILE} FILE... + + The program accepts the following options. Also see *Note Common +options::. + +`-c' +`--changes' + Verbosely describe the action for each FILE whose group actually + changes. + +`-f' +`--silent' +`--quiet' + Do not print error messages about files whose group cannot be + changed. + +`--dereference' + Do not act on symbolic links themselves but rather on what they + point to. This is the default. + +`-h' +`--no-dereference' + Act on symbolic links themselves instead of what they point to. + This mode relies on the `lchown' system call. On systems that do + not provide the `lchown' system call, `chgrp' fails when a file + specified on the command line is a symbolic link. By default, no + diagnostic is issued for symbolic links encountered during a + recursive traversal, but see `--verbose'. + +`--preserve-root' + Fail upon any attempt to recursively change the file system root, + `/'. Without `--recursive', this option has no effect. *Note + Treating / specially::. + +`--no-preserve-root' + Cancel the effect of any preceding `--preserve-root' option. + *Note Treating / specially::. + +`--reference=REF_FILE' + Change the group of each FILE to be the same as that of REF_FILE. + If REF_FILE is a symbolic link, do not use the group of the + symbolic link, but rather that of the file it refers to. + +`-v' +`--verbose' + Output a diagnostic for every file processed. If a symbolic link + is encountered during a recursive traversal on a system without + the `lchown' system call, and `--no-dereference' is in effect, + then issue a diagnostic saying neither the symbolic link nor its + referent is being changed. + +`-R' +`--recursive' + Recursively change the group ownership of directories and their + contents. + +`-H' + If `--recursive' (`-R') is specified and a command line argument + is a symbolic link to a directory, traverse it. *Note Traversing + symlinks::. + +`-L' + In a recursive traversal, traverse every symbolic link to a + directory that is encountered. *Note Traversing symlinks::. + +`-P' + Do not traverse any symbolic links. This is the default if none + of `-H', `-L', or `-P' is specified. *Note Traversing symlinks::. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: chmod invocation, Next: chown invocation, Prev: chgrp invocation, Up: Changing file attributes + +13.3 `chmod': Change access permissions +======================================= + +`chmod' changes the access permissions of the named files. Synopsis: + + chmod [OPTION]... {MODE | --reference=REF_FILE} FILE... + + `chmod' never changes the permissions of symbolic links, since the +`chmod' system call cannot change their permissions. This is not a +problem since the permissions of symbolic links are never used. +However, for each symbolic link listed on the command line, `chmod' +changes the permissions of the pointed-to file. In contrast, `chmod' +ignores symbolic links encountered during recursive directory +traversals. + + If used, MODE specifies the new permissions. For details, see the +section on *Note File permissions::. In the extremely rare cases where +MODE has leading `-', a portable script should use `--' first, e.g., +`chmod -- -w file'. Typically, though, `chmod a-w file' is preferable. + + The program accepts the following options. Also see *Note Common +options::. + +`-c' +`--changes' + Verbosely describe the action for each FILE whose permissions + actually changes. + +`-f' +`--silent' +`--quiet' + Do not print error messages about files whose permissions cannot be + changed. + +`--preserve-root' + Fail upon any attempt to recursively change the file system root, + `/'. Without `--recursive', this option has no effect. *Note + Treating / specially::. + +`--no-preserve-root' + Cancel the effect of any preceding `--preserve-root' option. + *Note Treating / specially::. + +`-v' +`--verbose' + Verbosely describe the action or non-action taken for every FILE. + +`--reference=REF_FILE' + Change the mode of each FILE to be the same as that of REF_FILE. + *Note File permissions::. If REF_FILE is a symbolic link, do not + use the mode of the symbolic link, but rather that of the file it + refers to. + +`-R' +`--recursive' + Recursively change permissions of directories and their contents. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: touch invocation, Prev: chown invocation, Up: Changing file attributes + +13.4 `touch': Change file timestamps +==================================== + +`touch' changes the access and/or modification times of the specified +files. Synopsis: + + touch [OPTION]... FILE... + + On older systems, `touch' supports an obsolete syntax, as follows. +If the first FILE would be a valid argument to the `-t' option and no +timestamp is given with any of the `-d', `-r', or `-t' options and the +`--' argument is not given, that argument is interpreted as the time +for the other files instead of as a file name. POSIX 1003.1-2001 +(*note Standards conformance::) does not allow this; use `-t' instead. + + Any FILE that does not exist is created empty. + + If changing both the access and modification times to the current +time, `touch' can change the timestamps for files that the user running +it does not own but has write permission for. Otherwise, the user must +own the files. + + Although `touch' provides options for changing two of the times--the +times of last access and modification--of a file, there is actually a +third one as well: the inode change time. This is often referred to as +a file's `ctime'. The inode change time represents the time when the +file's meta-information last changed. One common example of this is +when the permissions of a file change. Changing the permissions +doesn't access the file, so the atime doesn't change, nor does it +modify the file, so the mtime doesn't change. Yet, something about the +file itself has changed, and this must be noted somewhere. This is the +job of the ctime field. This is necessary, so that, for example, a +backup program can make a fresh copy of the file, including the new +permissions value. Another operation that modifies a file's ctime +without affecting the others is renaming. In any case, it is not +possible, in normal operations, for a user to change the ctime field to +a user-specified value. + + Time stamps assume the time zone rules specified by the `TZ' +environment variable, or by the system default rules if `TZ' is not +set. *Note Specifying the Time Zone with `TZ': (libc)TZ Variable. You +can avoid avoid ambiguities during daylight saving transitions by using +UTC time stamps. + + The program accepts the following options. Also see *Note Common +options::. + +`-a' +`--time=atime' +`--time=access' +`--time=use' + Change the access time only. + +`-c' +`--no-create' + Do not create files that do not exist. + +`-d' +`--date=TIME' + Use TIME instead of the current time. It can contain month names, + time zones, `am' and `pm', `yesterday', etc. For example, + `--date="2004-02-27 14:19:13.489392193 +0530"' specifies the + instant of time that is 489,392,193 nanoseconds after February 27, + 2004 at 2:19:13 PM in a time zone that is 5 hours and 30 minutes + east of UTC. *Note Date input formats::. File systems that do + not support high-resolution time stamps silently ignore any excess + precision here. + +`-f' + Ignored; for compatibility with BSD versions of `touch'. + +`-m' +`--time=mtime' +`--time=modify' + Change the modification time only. + +`-r FILE' +`--reference=FILE' + Use the times of the reference FILE instead of the current time. + If this option is combined with the `--date=TIME' (`-d TIME') + option, the reference FILE's time is the origin for any relative + TIMEs given, but is otherwise ignored. For example, `-r foo -d + '-5 seconds'' specifies a time stamp equal to five seconds before + the corresponding time stamp for `foo'. + +`-t [[CC]YY]MMDDhhmm[.ss]' + Use the argument (optional four-digit or two-digit years, months, + days, hours, minutes, optional seconds) instead of the current + time. If the year is specified with only two digits, then CC is + 20 for years in the range 0 ... 68, and 19 for years in 69 ... 99. + If no digits of the year are specified, the argument is + interpreted as a date in the current year. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: Disk usage, Next: Printing text, Prev: Changing file attributes, Up: Top + +14 Disk usage +************* + +No disk can hold an infinite amount of data. These commands report on +how much disk storage is in use or available. (This has nothing much to +do with how much _main memory_, i.e., RAM, a program is using when it +runs; for that, you want `ps' or `pstat' or `swap' or some such +command.) + +* Menu: + +* df invocation:: Report file system disk space usage. +* du invocation:: Estimate file space usage. +* stat invocation:: Report file or file system status. +* sync invocation:: Synchronize memory and disk. + + +File: coreutils.info, Node: df invocation, Next: du invocation, Up: Disk usage + +14.1 `df': Report file system disk space usage +============================================== + +`df' reports the amount of disk space used and available on file +systems. Synopsis: + + df [OPTION]... [FILE]... + + With no arguments, `df' reports the space used and available on all +currently mounted file systems (of all types). Otherwise, `df' reports +on the file system containing each argument FILE. + + Normally the disk space is printed in units of 1024 bytes, but this +can be overridden (*note Block size::). Non-integer quantities are +rounded up to the next higher unit. + + If an argument FILE is a disk device file containing a mounted file +system, `df' shows the space available on that file system rather than +on the file system containing the device node (i.e., the root file +system). GNU `df' does not attempt to determine the disk usage on +unmounted file systems, because on most kinds of systems doing so +requires extremely nonportable intimate knowledge of file system +structures. + + The program accepts the following options. Also see *Note Common +options::. + +`-a' +`--all' + Include in the listing file systems that have a size of 0 blocks, + which are omitted by default. Such file systems are typically + special-purpose pseudo-file-systems, such as automounter entries. + Also, file systems of type "ignore" or "auto", supported by some + operating systems, are only included if this option is specified. + +`-B SIZE' +`--block-size=SIZE' + Scale sizes by SIZE before printing them (*note Block size::). + For example, `-BG' prints sizes in units of 1,073,741,824 bytes. + +`-h' +`--human-readable' + Append a size letter to each size, such as `M' for mebibytes. + Powers of 1024 are used, not 1000; `M' stands for 1,048,576 bytes. + Use the `--si' option if you prefer powers of 1000. + +`-H' + Equivalent to `--si'. + +`-i' +`--inodes' + List inode usage information instead of block usage. An inode + (short for index node) contains information about a file such as + its owner, permissions, timestamps, and location on the disk. + +`-k' + Print sizes in 1024-byte blocks, overriding the default block size + (*note Block size::). This option is equivalent to + `--block-size=1K'. + +`-l' +`--local' + Limit the listing to local file systems. By default, remote file + systems are also listed. + +`--no-sync' + Do not invoke the `sync' system call before getting any usage data. + This may make `df' run significantly faster on systems with many + disks, but on some systems (notably SunOS) the results may be + slightly out of date. This is the default. + +`-P' +`--portability' + Use the POSIX output format. This is like the default format + except for the following: + + 1. The information about each file system is always printed on + exactly one line; a mount device is never put on a line by + itself. This means that if the mount device name is more + than 20 characters long (e.g., for some network mounts), the + columns are misaligned. + + 2. The labels in the header output line are changed to conform + to POSIX. + +`--si' + Append an SI-style abbreviation to each size, such as `MB' for + megabytes. Powers of 1000 are used, not 1024; `MB' stands for + 1,000,000 bytes. This option is equivalent to `--block-size=si'. + Use the `-h' or `--human-readable' option if you prefer powers of + 1024. + +`--sync' + Invoke the `sync' system call before getting any usage data. On + some systems (notably SunOS), doing this yields more up to date + results, but in general this option makes `df' much slower, + especially when there are many or very busy file systems. + +`-t FSTYPE' +`--type=FSTYPE' + Limit the listing to file systems of type FSTYPE. Multiple file + system types can be specified by giving multiple `-t' options. By + default, nothing is omitted. + +`-T' +`--print-type' + Print each file system's type. The types printed here are the + same ones you can include or exclude with `-t' and `-x'. The + particular types printed are whatever is supported by the system. + Here are some of the common names (this list is certainly not + exhaustive): + + `nfs' + An NFS file system, i.e., one mounted over a network from + another machine. This is the one type name which seems to be + used uniformly by all systems. + + `4.2, ufs, efs...' + A file system on a locally-mounted hard disk. (The system + might even support more than one type here; Linux does.) + + `hsfs, cdfs' + A file system on a CD-ROM drive. HP-UX uses `cdfs', most + other systems use `hsfs' (`hs' for "High Sierra"). + + `pcfs' + An MS-DOS file system, usually on a diskette. + + +`-x FSTYPE' +`--exclude-type=FSTYPE' + Limit the listing to file systems not of type FSTYPE. Multiple + file system types can be eliminated by giving multiple `-x' + options. By default, no file system types are omitted. + +`-v' + Ignored; for compatibility with System V versions of `df'. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: du invocation, Next: stat invocation, Prev: df invocation, Up: Disk usage + +14.2 `du': Estimate file space usage +==================================== + +`du' reports the amount of disk space used by the specified files and +for each subdirectory (of directory arguments). Synopsis: + + du [OPTION]... [FILE]... + + With no arguments, `du' reports the disk space for the current +directory. Normally the disk space is printed in units of 1024 bytes, +but this can be overridden (*note Block size::). Non-integer +quantities are rounded up to the next higher unit. + + The program accepts the following options. Also see *Note Common +options::. + +`-a' +`--all' + Show counts for all files, not just directories. + +`--apparent-size' + Print apparent sizes, rather than disk usage. The apparent size + of a file is the number of bytes reported by `wc -c' on regular + files, or more generally, `ls -l --block-size=1' or `stat + --format=%s'. For example, a file containing the word `zoo' with + no newline would, of course, have an apparent size of 3. Such a + small file may require anywhere from 0 to 16 KiB or more of disk + space, depending on the type and configuration of the file system + on which the file resides. However, a sparse file created with + this command: + + dd bs=1 seek=2GiB if=/dev/null of=big + + has an apparent size of 2 GiB, yet on most modern systems, it + actually uses almost no disk space. + +`-b' +`--bytes' + Equivalent to `--apparent-size --block-size=1'. + +`-B SIZE' +`--block-size=SIZE' + Scale sizes by SIZE before printing them (*note Block size::). + For example, `-BG' prints sizes in units of 1,073,741,824 bytes. + +`-c' +`--total' + Print a grand total of all arguments after all arguments have been + processed. This can be used to find out the total disk usage of a + given set of files or directories. + +`-D' +`--dereference-args' + Dereference symbolic links that are command line arguments. Does + not affect other symbolic links. This is helpful for finding out + the disk usage of directories, such as `/usr/tmp', which are often + symbolic links. + +`--files0-from=FILE' + Rather than processing files named on the command line, process + those in the NUL-terminated list in file FILE. This is useful + with the `--total' (`-c') option when the list of file names is so + long that it may exceed a command line length limitation. In such + cases, running `du' via `xargs' is undesirable because it splits + the list into pieces and makes `du' print a total for each sublist + rather than for the entire list. One way to produce a list of + NUL-terminated file names is with GNU `find', using its `-print0' + predicate. Do not specify any FILE on the command line when using + this option. + +`-h' +`--human-readable' + Append a size letter to each size, such as `M' for mebibytes. + Powers of 1024 are used, not 1000; `M' stands for 1,048,576 bytes. + Use the `--si' option if you prefer powers of 1000. + +`-H' + Currently, `-H' is the same as `--si', except that `-H' evokes a + warning. This option will be changed to be equivalent to + `--dereference-args' (`-D'). + +`-k' + Print sizes in 1024-byte blocks, overriding the default block size + (*note Block size::). This option is equivalent to + `--block-size=1K'. + +`-l' +`--count-links' + Count the size of all files, even if they have appeared already + (as a hard link). + +`-L' +`--dereference' + Dereference symbolic links (show the disk space used by the file + or directory that the link points to instead of the space used by + the link). + +`-P' +`--no-dereference' + For each symbolic links encountered by `du', consider the disk + space used by the symbolic link. + +`--max-depth=DEPTH' + Show the total for each directory (and file if -all) that is at + most MAX_DEPTH levels down from the root of the hierarchy. The + root is at level 0, so `du --max-depth=0' is equivalent to `du -s'. + +`-0' +`--null' + Output the zero byte (NUL) at the end of each line, rather than a + newline. This option enables other programs to parse the output + of `du' even when that output would contain file names with + embedded newlines. + +`--si' + Append an SI-style abbreviation to each size, such as `MB' for + megabytes. Powers of 1000 are used, not 1024; `MB' stands for + 1,000,000 bytes. Use the `-h' or `--human-readable' option if you + prefer powers of 1024. + +`-s' +`--summarize' + Display only a total for each argument. + +`-S' +`--separate-dirs' + Report the size of each directory separately, not including the + sizes of subdirectories. + +`-x' +`--one-file-system' + Skip directories that are on different file systems from the one + that the argument being processed is on. + +`--exclude=PATTERN' + When recursing, skip subdirectories or files matching PATTERN. + For example, `du --exclude='*.o'' excludes files whose names end + in `.o'. + +`-X FILE' +`--exclude-from=FILE' + Like `--exclude', except take the patterns to exclude from FILE, + one per line. If FILE is `-', take the patterns from standard + input. + + + On BSD systems, `du' reports sizes that are half the correct values +for files that are NFS-mounted from HP-UX systems. On HP-UX systems, +it reports sizes that are twice the correct values for files that are +NFS-mounted from BSD systems. This is due to a flaw in HP-UX; it also +affects the HP-UX `du' program. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: stat invocation, Next: sync invocation, Prev: du invocation, Up: Disk usage + +14.3 `stat': Report file or file system status +============================================== + +`stat' displays information about the specified file(s). Synopsis: + + stat [OPTION]... [FILE]... + + With no option, `stat' reports all information about the given files. +But it also can be used to report the information of the file systems +the given files are located on. If the files are links, `stat' can +also give information about the files the links point to. + +`-f' +`--file-system' + Report information about the file systems where the given files + are located instead of information about the files themselves. + +`-L' +`--dereference' + Change how `stat' treats symbolic links. With this option, `stat' + acts on the file referenced by each symbolic link argument. + Without it, `stat' acts on any symbolic link argument directly. + +`-t' +`--terse' + Print the information in terse form, suitable for parsing by other + programs. + +`-c' +`--format=FORMAT' + Use FORMAT rather than the default format. + + Interpreted sequences for file stat are: + + * %a - Access rights in octal + + * %A - Access rights in human readable form + + * %b - Number of blocks allocated (see `%B') + + * %B - The size in bytes of each block reported by `%b' + + * %d - Device number in decimal + + * %D - Device number in hex + + * %f - raw mode in hex + + * %F - File type + + * %g - Group Id of owner + + * %G - Group name of owner + + * %h - Number of hard links + + * %i - Inode number + + * %n - File name + + * %N - Quoted File name with dereference if symbolic link + + * %o - I/O block size + + * %s - Total size, in bytes + + * %t - Major device type in hex + + * %T - Minor device type in hex + + * %u - User Id of owner + + * %U - User name of owner + + * %x - Time of last access + + * %X - Time of last access as seconds since Epoch + + * %y - Time of last modification + + * %Y - Time of last modification as seconds since Epoch + + * %z - Time of last change + + * %Z - Time of last change as seconds since Epoch + + Interpreted sequences for file system stat are: + + * %n - File name + + * %i - File System id in hex + + * %l - Maximum length of file names + + * %t - Type in hex + + * %T - Type in human readable form + + * %b - Total data blocks in file system + + * %f - Free blocks in file system + + * %a - Free blocks available to non-superuser + + * %s - Optimal transfer block size + + * %c - Total file nodes in file system + + Time stamps are listed according to the time zone rules specified + by the `TZ' environment variable, or by the system default rules if + `TZ' is not set. *Note Specifying the Time Zone with `TZ': + (libc)TZ Variable. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: sync invocation, Prev: stat invocation, Up: Disk usage + +14.4 `sync': Synchronize data on disk with memory +================================================= + +`sync' writes any data buffered in memory out to disk. This can +include (but is not limited to) modified superblocks, modified inodes, +and delayed reads and writes. This must be implemented by the kernel; +The `sync' program does nothing but exercise the `sync' system call. + + The kernel keeps data in memory to avoid doing (relatively slow) disk +reads and writes. This improves performance, but if the computer +crashes, data may be lost or the file system corrupted as a result. +The `sync' command ensures everything in memory is written to disk. + + Any arguments are ignored, except for a lone `--help' or `--version' +(*note Common options::). + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: Printing text, Next: Conditions, Prev: Disk usage, Up: Top + +15 Printing text +**************** + +This section describes commands that display text strings. + +* Menu: + +* echo invocation:: Print a line of text. +* printf invocation:: Format and print data. +* yes invocation:: Print a string until interrupted. + + +File: coreutils.info, Node: echo invocation, Next: printf invocation, Up: Printing text + +15.1 `echo': Print a line of text +================================= + +`echo' writes each given STRING to standard output, with a space +between each and a newline after the last one. Synopsis: + + echo [OPTION]... [STRING]... + + The program accepts the following options. Also see *Note Common +options::. Options must precede operands, and the normally-special +argument `--' has no special meaning and is treated like any other +STRING. + +`-n' + Do not output the trailing newline. + +`-e' + Enable interpretation of the following backslash-escaped + characters in each STRING: + + `\a' + alert (bell) + + `\b' + backspace + + `\c' + suppress trailing newline + + `\f' + form feed + + `\n' + new line + + `\r' + carriage return + + `\t' + horizontal tab + + `\v' + vertical tab + + `\\' + backslash + + `\0NNN' + the eight-bit value that is the octal number NNN (zero to + three octal digits) + + `\NNN' + the eight-bit value that is the octal number NNN (one to + three octal digits) + + `\xHH' + the eight-bit value that is the hexadecimal number HH (one or + two hexadecimal digits) + +`-E' + Disable interpretation of backslash escapes in each STRING. This + is the default. If `-e' and `-E' are both specified, the last one + given takes effect. + + + If the `POSIXLY_CORRECT' environment variable is set, then when +`echo''s first argument is not `-n' it outputs option-like arguments +instead of treating them as options. For example, `echo -ne hello' +outputs `-ne hello' instead of plain `hello'. + + POSIX does not require support for any options, and says that the +behavior of `echo' is implementation-defined if any STRING contains a +backslash or if the first argument is `-n'. Portable programs can use +the `printf' command if they need to omit trailing newlines or output +control characters or backslashes. *Note printf invocation::. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: printf invocation, Next: yes invocation, Prev: echo invocation, Up: Printing text + +15.2 `printf': Format and print data +==================================== + +`printf' does formatted printing of text. Synopsis: + + printf FORMAT [ARGUMENT]... + + `printf' prints the FORMAT string, interpreting `%' directives and +`\' escapes to format numeric and string arguments in a way that is +mostly similar to the C `printf' function. The differences are as +follows: + + * The FORMAT argument is reused as necessary to convert all the + given ARGUMENTs. For example, the command `printf %s a b' outputs + `ab'. + + * Missing ARGUMENTs are treated as null strings or as zeros, + depending on whether the context expects a string or a number. For + example, the command `printf %sx%d' prints `x0'. + + * An additional escape, `\c', causes `printf' to produce no further + output. For example, the command `printf 'A%sC\cD%sF' B E' prints + `ABC'. + + * The hexadecimal escape sequence `\xHH' has at most two digits, as + opposed to C where it can have an unlimited number of digits. For + example, the command `printf '\x07e'' prints two bytes, whereas + the C statement `printf ("\x07e")' prints just one. + + * `printf' has an additional directive, `%b', which prints its + argument string with `\' escapes interpreted in the same way as in + the FORMAT string, except that octal escapes are of the form + `\0OOO' where OOO is 0 to 3 octal digits. If a precision is also + given, it limits the number of bytes printed from the converted + string. + + * Numeric arguments must be single C constants, possibly with leading + `+' or `-'. For example, `printf %.4d -3' outputs `-0003'. + + * If the leading character of a numeric argument is `"' or `'' then + its value is the numeric value of the immediately following + character. Any remaining characters are silently ignored if the + `POSIXLY_CORRECT' environment variable is set; otherwise, a + warning is printed. For example, `printf "%d" "'a"' outputs `97' + on hosts that use the ASCII character set, since `a' has the + numeric value 97 in ASCII. + + + A floating-point argument must use a period before any fractional +digits, but is printed according to the `LC_NUMERIC' category of the +current locale. For example, in a locale whose radix character is a +comma, the command `printf %g 3.14' outputs `3,14' whereas the command +`printf %g 3,14' is an error. + + `printf' interprets `\OOO' in FORMAT as an octal number (if OOO is 1 +to 3 octal digits) specifying a character to print, and `\xHH' as a +hexadecimal number (if HH is 1 to 2 hex digits) specifying a character +to print. + + `printf' interprets two character syntaxes introduced in ISO C 99: +`\u' for 16-bit Unicode (ISO/IEC 10646) characters, specified as four +hexadecimal digits HHHH, and `\U' for 32-bit Unicode characters, +specified as eight hexadecimal digits HHHHHHHH. `printf' outputs the +Unicode characters according to the `LC_CTYPE' locale. + + The processing of `\u' and `\U' requires a full-featured `iconv' +facility. It is activated on systems with glibc 2.2 (or newer), or +when `libiconv' is installed prior to this package. Otherwise `\u' and +`\U' will print as-is. + + The only options are a lone `--help' or `--version'. *Note Common +options::. Options must precede operands. + + The Unicode character syntaxes are useful for writing strings in a +locale independent way. For example, a string containing the Euro +currency symbol + + $ /usr/local/bin/printf '\u20AC 14.95' + +will be output correctly in all locales supporting the Euro symbol +(ISO-8859-15, UTF-8, and others). Similarly, a Chinese string + + $ /usr/local/bin/printf '\u4e2d\u6587' + +will be output correctly in all Chinese locales (GB2312, BIG5, UTF-8, +etc). + + Note that in these examples, the full name of `printf' has been +given, to distinguish it from the GNU `bash' built-in function `printf'. + + For larger strings, you don't need to look up the hexadecimal code +values of each character one by one. ASCII characters mixed with \u +escape sequences is also known as the JAVA source file encoding. You +can use GNU recode 3.5c (or newer) to convert strings to this encoding. +Here is how to convert a piece of text into a shell script which will +output this text in a locale-independent way: + + $ LC_CTYPE=zh_CN.big5 /usr/local/bin/printf \ + '\u4e2d\u6587\n' > sample.txt + $ recode BIG5..JAVA < sample.txt \ + | sed -e "s|^|/usr/local/bin/printf '|" -e "s|$|\\\\n'|" \ + > sample.sh + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: yes invocation, Prev: printf invocation, Up: Printing text + +15.3 `yes': Print a string until interrupted +============================================ + +`yes' prints the command line arguments, separated by spaces and +followed by a newline, forever until it is killed. If no arguments are +given, it prints `y' followed by a newline forever until killed. + + Upon a write error, `yes' exits with status `1'. + + The only options are a lone `--help' or `--version'. To output an +argument that begins with `-', precede it with `--', e.g., `yes -- +--help'. *Note Common options::. + + +File: coreutils.info, Node: Conditions, Next: Redirection, Prev: Printing text, Up: Top + +16 Conditions +************* + +This section describes commands that are primarily useful for their exit +status, rather than their output. Thus, they are often used as the +condition of shell `if' statements, or as the last command in a +pipeline. + +* Menu: + +* false invocation:: Do nothing, unsuccessfully. +* true invocation:: Do nothing, successfully. +* test invocation:: Check file types and compare values. +* expr invocation:: Evaluate expressions. + + +File: coreutils.info, Node: false invocation, Next: true invocation, Up: Conditions + +16.1 `false': Do nothing, unsuccessfully +======================================== + +`false' does nothing except return an exit status of 1, meaning +"failure". It can be used as a place holder in shell scripts where an +unsuccessful command is needed. + + `false' honors the `--help' and `--version' options. + + This version of `false' is implemented as a C program, and is thus +more secure and faster than a shell script implementation, and may +safely be used as a dummy shell for the purpose of disabling accounts. + + Note that `false' (unlike all other programs documented herein) +exits unsuccessfully, even when invoked with `--help' or `--version'. + + +File: coreutils.info, Node: true invocation, Next: test invocation, Prev: false invocation, Up: Conditions + +16.2 `true': Do nothing, successfully +===================================== + +`true' does nothing except return an exit status of 0, meaning +"success". It can be used as a place holder in shell scripts where a +successful command is needed, although the shell built-in command `:' +(colon) may do the same thing faster. In most modern shells, `true' is +a built-in command, so when you use `true' in a script, you're probably +using the built-in command, not the one documented here. + + `true' honors the `--help' and `--version' options. + + Note, however, that it is possible to cause `true' to exit with +nonzero status: when invoked in non-POSIX mode, with the `--help' or +`--version' option, and with standard output already closed or +redirected to a file that evokes an I/O error. For example, using a +Bourne-compatible shell: + + $ ./true --version >&- + ./true: write error: Bad file number + $ ./true --version > /dev/full + ./true: write error: No space left on device + + This version of `true' is implemented as a C program, and is thus +more secure and faster than a shell script implementation, and may +safely be used as a dummy shell for the purpose of disabling accounts. + + +File: coreutils.info, Node: test invocation, Next: expr invocation, Prev: true invocation, Up: Conditions + +16.3 `test': Check file types and compare values +================================================ + +`test' returns a status of 0 (true) or 1 (false) depending on the +evaluation of the conditional expression EXPR. Each part of the +expression must be a separate argument. + + `test' has file status checks, string operators, and numeric +comparison operators. + + `test' has an alternate form that uses opening and closing square +brackets instead a leading `test'. For example, instead of `test -d +/', you can write `[ -d / ]'. The square brackets must be separate +arguments; for example, `[-d /]' does not have the desired effect. +Since `test EXPR' and `[ EXPR ]' have the same meaning, only the former +form is discussed below. + + Synopses: + + test EXPRESSION + test + [ EXPRESSION ] + [ ] + [ OPTION + + Because most shells have a built-in `test' command, using an +unadorned `test' in a script or interactively may get you different +functionality than that described here. + + If EXPRESSION is omitted, `test' returns false. If EXPRESSION is a +single argument, `test' returns false if the argument is null and true +otherwise. The argument can be any string, including strings like +`-d', `-1', `--', `--help', and `--version' that most other programs +would treat as options. To get help and version information, invoke +the commands `[ --help' and `[ --version', without the usual closing +brackets. *Note Common options::. + + Exit status: + + 0 if the expression is true, + 1 if the expression is false, + 2 if an error occurred. + +* Menu: + +* File type tests:: -[bcdfhLpSt] +* Access permission tests:: -[gkruwxOG] +* File characteristic tests:: -e -s -nt -ot -ef +* String tests:: -z -n = != +* Numeric tests:: -eq -ne -lt -le -gt -ge +* Connectives for test:: ! -a -o + + +File: coreutils.info, Node: File type tests, Next: Access permission tests, Up: test invocation + +16.3.1 File type tests +---------------------- + +These options test for particular types of files. (Everything's a file, +but not all files are the same!) + +`-b FILE' + True if FILE exists and is a block special device. + +`-c FILE' + True if FILE exists and is a character special device. + +`-d FILE' + True if FILE exists and is a directory. + +`-f FILE' + True if FILE exists and is a regular file. + +`-h FILE' +`-L FILE' + True if FILE exists and is a symbolic link. Unlike all other + file-related tests, this test does not dereference FILE if it is a + symbolic link. + +`-p FILE' + True if FILE exists and is a named pipe. + +`-S FILE' + True if FILE exists and is a socket. + +`-t FD' + True if FD is a file descriptor that is associated with a terminal. + + + +File: coreutils.info, Node: Access permission tests, Next: File characteristic tests, Prev: File type tests, Up: test invocation + +16.3.2 Access permission tests +------------------------------ + +These options test for particular access permissions. + +`-g FILE' + True if FILE exists and has its set-group-id bit set. + +`-k FILE' + True if FILE exists and has its "sticky" bit set. + +`-r FILE' + True if FILE exists and read permission is granted. + +`-u FILE' + True if FILE exists and has its set-user-id bit set. + +`-w FILE' + True if FILE exists and write permission is granted. + +`-x FILE' + True if FILE exists and execute permission is granted (or search + permission, if it is a directory). + +`-O FILE' + True if FILE exists and is owned by the current effective user id. + +`-G FILE' + True if FILE exists and is owned by the current effective group id. + + + +File: coreutils.info, Node: File characteristic tests, Next: String tests, Prev: Access permission tests, Up: test invocation + +16.3.3 File characteristic tests +-------------------------------- + +These options test other file characteristics. + +`-e FILE' + True if FILE exists. + +`-s FILE' + True if FILE exists and has a size greater than zero. + +`FILE1 -nt FILE2' + True if FILE1 is newer (according to modification date) than + FILE2, or if FILE1 exists and FILE2 does not. + +`FILE1 -ot FILE2' + True if FILE1 is older (according to modification date) than + FILE2, or if FILE2 exists and FILE1 does not. + +`FILE1 -ef FILE2' + True if FILE1 and FILE2 have the same device and inode numbers, + i.e., if they are hard links to each other. + + + +File: coreutils.info, Node: String tests, Next: Numeric tests, Prev: File characteristic tests, Up: test invocation + +16.3.4 String tests +------------------- + +These options test string characteristics. You may need to quote +STRING arguments for the shell. For example: + + test -n "$V" + + The quotes here prevent the wrong arguments from being passed to +`test' if `$V' is empty or contains special characters. + +`-z STRING' + True if the length of STRING is zero. + +`-n STRING' +`STRING' + True if the length of STRING is nonzero. + +`STRING1 = STRING2' + True if the strings are equal. + +`STRING1 != STRING2' + True if the strings are not equal. + + + +File: coreutils.info, Node: Numeric tests, Next: Connectives for test, Prev: String tests, Up: test invocation + +16.3.5 Numeric tests +-------------------- + +Numeric relationals. The arguments must be entirely numeric (possibly +negative), or the special expression `-l STRING', which evaluates to +the length of STRING. + +`ARG1 -eq ARG2' +`ARG1 -ne ARG2' +`ARG1 -lt ARG2' +`ARG1 -le ARG2' +`ARG1 -gt ARG2' +`ARG1 -ge ARG2' + These arithmetic binary operators return true if ARG1 is equal, + not-equal, less-than, less-than-or-equal, greater-than, or + greater-than-or-equal than ARG2, respectively. + + + For example: + + test -1 -gt -2 && echo yes + => yes + test -l abc -gt 1 && echo yes + => yes + test 0x100 -eq 1 + error--> test: integer expression expected before -eq + + +File: coreutils.info, Node: Connectives for test, Prev: Numeric tests, Up: test invocation + +16.3.6 Connectives for `test' +----------------------------- + +The usual logical connectives. + +`! EXPR' + True if EXPR is false. + +`EXPR1 -a EXPR2' + True if both EXPR1 and EXPR2 are true. + +`EXPR1 -o EXPR2' + True if either EXPR1 or EXPR2 is true. + + + +File: coreutils.info, Node: expr invocation, Prev: test invocation, Up: Conditions + +16.4 `expr': Evaluate expressions +================================= + +`expr' evaluates an expression and writes the result on standard +output. Each token of the expression must be a separate argument. + + Operands are either integers or strings. Integers consist of one or +more decimal digits, with an optional leading `-'. `expr' converts +anything appearing in an operand position to an integer or a string +depending on the operation being applied to it. + + Strings are not quoted for `expr' itself, though you may need to +quote them to protect characters with special meaning to the shell, +e.g., spaces. However, regardless of whether it is quoted, a string +operand should not be a parenthesis or any of `expr''s operators like +`+', so you cannot safely pass an arbitrary string `$str' to expr +merely by quoting it to the shell. One way to work around this is to +use the GNU extension `+', (e.g., `+ "$str" = foo'); a more portable +way is to use `" $str"' and to adjust the rest of the expression to take +the leading space into account (e.g., `" $str" = " foo"'). + + You should not pass a negative integer or a string with leading `-' +as `expr''s first argument, as it might be misinterpreted as an option; +this can be avoided by parenthesization. Also, portable scripts should +not use a string operand that happens to take the form of an integer; +this can be worked around by inserting leading spaces as mentioned +above. + + Operators may be given as infix symbols or prefix keywords. +Parentheses may be used for grouping in the usual manner. You must +quote parentheses and many operators to avoid the shell evaluating them, +however. + + The only options are `--help' and `--version'. *Note Common +options::. Options must precede operands. + + Exit status: + + 0 if the expression is neither null nor 0, + 1 if the expression is null or 0, + 2 if the expression is syntactically invalid, + 3 if an error occurred. + +* Menu: + +* String expressions:: + : match substr index length +* Numeric expressions:: + - * / % +* Relations for expr:: | & < <= = == != >= > +* Examples of expr:: Examples. + + +File: coreutils.info, Node: String expressions, Next: Numeric expressions, Up: expr invocation + +16.4.1 String expressions +------------------------- + +`expr' supports pattern matching and other string operators. These +have lower precedence than both the numeric and relational operators (in +the next sections). + +`STRING : REGEX' + Perform pattern matching. The arguments are converted to strings + and the second is considered to be a (basic, a la GNU `grep') + regular expression, with a `^' implicitly prepended. The first + argument is then matched against this regular expression. + + If the match succeeds and REGEX uses `\(' and `\)', the `:' + expression returns the part of STRING that matched the + subexpression; otherwise, it returns the number of characters + matched. + + If the match fails, the `:' operator returns the null string if + `\(' and `\)' are used in REGEX, otherwise 0. + + Only the first `\( ... \)' pair is relevant to the return value; + additional pairs are meaningful only for grouping the regular + expression operators. + + In the regular expression, `\+', `\?', and `\|' are operators + which respectively match one or more, zero or one, or separate + alternatives. SunOS and other `expr''s treat these as regular + characters. (POSIX allows either behavior.) *Note Regular + Expression Library: (regex)Top, for details of regular expression + syntax. Some examples are in *Note Examples of expr::. + +`match STRING REGEX' + An alternative way to do pattern matching. This is the same as + `STRING : REGEX'. + +`substr STRING POSITION LENGTH' + Returns the substring of STRING beginning at POSITION with length + at most LENGTH. If either POSITION or LENGTH is negative, zero, + or non-numeric, returns the null string. + +`index STRING CHARSET' + Returns the first position in STRING where the first character in + CHARSET was found. If no character in CHARSET is found in STRING, + return 0. + +`length STRING' + Returns the length of STRING. + +`+ TOKEN' + Interpret TOKEN as a string, even if it is a keyword like MATCH or + an operator like `/'. This makes it possible to test `expr length + + "$x"' or `expr + "$x" : '.*/\(.\)'' and have it do the right + thing even if the value of $X happens to be (for example) `/' or + `index'. This operator is a GNU extension. Portable shell + scripts should use `" $token" : ' \(.*\)'' instead of `+ "$token"'. + + + To make `expr' interpret keywords as strings, you must use the +`quote' operator. + + +File: coreutils.info, Node: Numeric expressions, Next: Relations for expr, Prev: String expressions, Up: expr invocation + +16.4.2 Numeric expressions +-------------------------- + +`expr' supports the usual numeric operators, in order of increasing +precedence. The string operators (previous section) have lower +precedence, the connectives (next section) have higher. + +`+ -' + Addition and subtraction. Both arguments are converted to + integers; an error occurs if this cannot be done. + +`* / %' + Multiplication, division, remainder. Both arguments are converted + to integers; an error occurs if this cannot be done. + + + +File: coreutils.info, Node: Relations for expr, Next: Examples of expr, Prev: Numeric expressions, Up: expr invocation + +16.4.3 Relations for `expr' +--------------------------- + +`expr' supports the usual logical connectives and relations. These are +higher precedence than either the string or numeric operators (previous +sections). Here is the list, lowest-precedence operator first. + +`|' + Returns its first argument if that is neither null nor zero, + otherwise its second argument if it is neither null nor zero, + otherwise 0. It does not evaluate its second argument if its + first argument is neither null nor zero. + +`&' + Return its first argument if neither argument is null or zero, + otherwise 0. It does not evaluate its second argument if its + first argument is null or zero. + +`< <= = == != >= >' + Compare the arguments and return 1 if the relation is true, 0 + otherwise. `==' is a synonym for `='. `expr' first tries to + convert both arguments to integers and do a numeric comparison; if + either conversion fails, it does a lexicographic comparison using + the character collating sequence specified by the `LC_COLLATE' + locale. + + + +File: coreutils.info, Node: Examples of expr, Prev: Relations for expr, Up: expr invocation + +16.4.4 Examples of using `expr' +------------------------------- + +Here are a few examples, including quoting for shell metacharacters. + + To add 1 to the shell variable `foo', in Bourne-compatible shells: + + foo=`expr $foo + 1` + + To print the non-directory part of the file name stored in `$fname', +which need not contain a `/': + + expr $fname : '.*/\(.*\)' '|' $fname + + An example showing that `\+' is an operator: + + expr aaa : 'a\+' + => 3 + + expr abc : 'a\(.\)c' + => b + expr index abcdef cz + => 3 + expr index index a + error--> expr: syntax error + expr index quote index a + => 0 + + +File: coreutils.info, Node: Redirection, Next: File name manipulation, Prev: Conditions, Up: Top + +17 Redirection +************** + +Unix shells commonly provide several forms of "redirection"--ways to +change the input source or output destination of a command. But one +useful redirection is performed by a separate command, not by the shell; +it's described here. + +* Menu: + +* tee invocation:: Redirect output to multiple files. + + +File: coreutils.info, Node: tee invocation, Up: Redirection + +17.1 `tee': Redirect output to multiple files +============================================= + +The `tee' command copies standard input to standard output and also to +any files given as arguments. This is useful when you want not only to +send some data down a pipe, but also to save a copy. Synopsis: + + tee [OPTION]... [FILE]... + + If a file being written to does not already exist, it is created. +If a file being written to already exists, the data it previously +contained is overwritten unless the `-a' option is used. + + A FILE of `-' causes `tee' to send another copy of input to standard +output, but this is typically not that useful as the copies are +interleaved. + + The program accepts the following options. Also see *Note Common +options::. + +`-a' +`--append' + Append standard input to the given files rather than overwriting + them. + +`-i' +`--ignore-interrupts' + Ignore interrupt signals. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: File name manipulation, Next: Working context, Prev: Redirection, Up: Top + +18 File name manipulation +************************* + +This section describes commands that manipulate file names. + +* Menu: + +* basename invocation:: Strip directory and suffix from a file name. +* dirname invocation:: Strip non-directory suffix from a file name. +* pathchk invocation:: Check file name portability. + + +File: coreutils.info, Node: basename invocation, Next: dirname invocation, Up: File name manipulation + +18.1 `basename': Strip directory and suffix from a file name +============================================================ + +`basename' removes any leading directory components from NAME. +Synopsis: + + basename NAME [SUFFIX] + + If SUFFIX is specified and is identical to the end of NAME, it is +removed from NAME as well. `basename' prints the result on standard +output. + + The only options are `--help' and `--version'. *Note Common +options::. Options must precede operands. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: dirname invocation, Next: pathchk invocation, Prev: basename invocation, Up: File name manipulation + +18.2 `dirname': Strip non-directory suffix from a file name +=========================================================== + +`dirname' prints all but the final slash-delimited component of a +string (presumably a file name). Synopsis: + + dirname NAME + + If NAME is a single component, `dirname' prints `.' (meaning the +current directory). + + The only options are `--help' and `--version'. *Note Common +options::. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: pathchk invocation, Prev: dirname invocation, Up: File name manipulation + +18.3 `pathchk': Check file name portability +=========================================== + +`pathchk' checks portability of file names. Synopsis: + + pathchk [OPTION]... NAME... + + For each NAME, `pathchk' prints a message if any of these conditions +is true: + + 1. One of the existing directories in NAME does not have search + (execute) permission, + + 2. The length of NAME is larger than the maximum supported by the + operating system. + + 3. The length of one component of NAME is longer than its file + system's maximum. + + A nonexistent NAME is not an error, so long a file with that name +could be created under the above conditions. + + The program accepts the following option. Also see *Note Common +options::. Options must precede operands. + +`-p' +`--portability' + Do not perform checks based on the underlying file system. + Instead, check the length of each file name and its components + against the POSIX minimum limits for portability. Also check that + the file name contains only characters that are in the portable + file name character set, namely, the ASCII letters and digits, `-', + `.', `/', and `_'. + + + Exit status: + + 0 if all specified file names passed all checks, + 1 otherwise. + + +File: coreutils.info, Node: Working context, Next: User information, Prev: File name manipulation, Up: Top + +19 Working context +****************** + +This section describes commands that display or alter the context in +which you are working: the current directory, the terminal settings, and +so forth. See also the user-related commands in the next section. + +* Menu: + +* pwd invocation:: Print working directory. +* stty invocation:: Print or change terminal characteristics. +* printenv invocation:: Print environment variables. +* tty invocation:: Print file name of terminal on standard input. + + +File: coreutils.info, Node: pwd invocation, Next: stty invocation, Up: Working context + +19.1 `pwd': Print working directory +=================================== + +`pwd' prints the fully resolved name of the current directory. That +is, all components of the printed name will be actual directory +names--none will be symbolic links. + + Because most shells have a built-in `pwd' command, using an +unadorned `pwd' in a script or interactively may get you different +functionality than that described here. + + The only options are a lone `--help' or `--version'. *Note Common +options::. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: stty invocation, Next: printenv invocation, Prev: pwd invocation, Up: Working context + +19.2 `stty': Print or change terminal characteristics +===================================================== + +`stty' prints or changes terminal characteristics, such as baud rate. +Synopses: + + stty [OPTION] [SETTING]... + stty [OPTION] + + If given no line settings, `stty' prints the baud rate, line +discipline number (on systems that support it), and line settings that +have been changed from the values set by `stty sane'. By default, mode +reading and setting are performed on the tty line connected to standard +input, although this can be modified by the `--file' option. + + `stty' accepts many non-option arguments that change aspects of the +terminal line operation, as described below. + + The program accepts the following options. Also see *Note Common +options::. + +`-a' +`--all' + Print all current settings in human-readable form. This option + may not be used in combination with any line settings. + +`-F DEVICE' +`--file=DEVICE' + Set the line opened by the file name specified in DEVICE instead of + the tty line connected to standard input. This option is necessary + because opening a POSIX tty requires use of the `O_NONDELAY' flag + to prevent a POSIX tty from blocking until the carrier detect line + is high if the `clocal' flag is not set. Hence, it is not always + possible to allow the shell to open the device in the traditional + manner. + +`-g' +`--save' + Print all current settings in a form that can be used as an + argument to another `stty' command to restore the current + settings. This option may not be used in combination with any + line settings. + + + Many settings can be turned off by preceding them with a `-'. Such +arguments are marked below with "May be negated" in their description. +The descriptions themselves refer to the positive case, that is, when +_not_ negated (unless stated otherwise, of course). + + Some settings are not available on all POSIX systems, since they use +extensions. Such arguments are marked below with "Non-POSIX" in their +description. On non-POSIX systems, those or other settings also may not +be available, but it's not feasible to document all the variations: just +try it and see. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + +* Menu: + +* Control:: Control settings +* Input:: Input settings +* Output:: Output settings +* Local:: Local settings +* Combination:: Combination settings +* Characters:: Special characters +* Special:: Special settings + + +File: coreutils.info, Node: Control, Next: Input, Up: stty invocation + +19.2.1 Control settings +----------------------- + +Control settings: + +`parenb' + Generate parity bit in output and expect parity bit in input. May + be negated. + +`parodd' + Set odd parity (even if negated). May be negated. + +`cs5' +`cs6' +`cs7' +`cs8' + Set character size to 5, 6, 7, or 8 bits. + +`hup' +`hupcl' + Send a hangup signal when the last process closes the tty. May be + negated. + +`cstopb' + Use two stop bits per character (one if negated). May be negated. + +`cread' + Allow input to be received. May be negated. + +`clocal' + Disable modem control signals. May be negated. + +`crtscts' + Enable RTS/CTS flow control. Non-POSIX. May be negated. + + +File: coreutils.info, Node: Input, Next: Output, Prev: Control, Up: stty invocation + +19.2.2 Input settings +--------------------- + +`ignbrk' + Ignore break characters. May be negated. + +`brkint' + Make breaks cause an interrupt signal. May be negated. + +`ignpar' + Ignore characters with parity errors. May be negated. + +`parmrk' + Mark parity errors (with a 255-0-character sequence). May be + negated. + +`inpck' + Enable input parity checking. May be negated. + +`istrip' + Clear high (8th) bit of input characters. May be negated. + +`inlcr' + Translate newline to carriage return. May be negated. + +`igncr' + Ignore carriage return. May be negated. + +`icrnl' + Translate carriage return to newline. May be negated. + +`iutf8' + Assume input characters are UTF-8 encoded. May be negated. + +`ixon' + Enable XON/XOFF flow control (that is, `CTRL-S'/`CTRL-Q'). May be + negated. + +`ixoff' +`tandem' + Enable sending of `stop' character when the system input buffer is + almost full, and `start' character when it becomes almost empty + again. May be negated. + +`iuclc' + Translate uppercase characters to lowercase. Non-POSIX. May be + negated. + +`ixany' + Allow any character to restart output (only the start character if + negated). Non-POSIX. May be negated. + +`imaxbel' + Enable beeping and not flushing input buffer if a character arrives + when the input buffer is full. Non-POSIX. May be negated. + + +File: coreutils.info, Node: Output, Next: Local, Prev: Input, Up: stty invocation + +19.2.3 Output settings +---------------------- + +These arguments specify output-related operations. + +`opost' + Postprocess output. May be negated. + +`olcuc' + Translate lowercase characters to uppercase. Non-POSIX. May be + negated. + +`ocrnl' + Translate carriage return to newline. Non-POSIX. May be negated. + +`onlcr' + Translate newline to carriage return-newline. Non-POSIX. May be + negated. + +`onocr' + Do not print carriage returns in the first column. Non-POSIX. + May be negated. + +`onlret' + Newline performs a carriage return. Non-POSIX. May be negated. + +`ofill' + Use fill (padding) characters instead of timing for delays. + Non-POSIX. May be negated. + +`ofdel' + Use delete characters for fill instead of null characters. + Non-POSIX. May be negated. + +`nl1' +`nl0' + Newline delay style. Non-POSIX. + +`cr3' +`cr2' +`cr1' +`cr0' + Carriage return delay style. Non-POSIX. + +`tab3' +`tab2' +`tab1' +`tab0' + Horizontal tab delay style. Non-POSIX. + +`bs1' +`bs0' + Backspace delay style. Non-POSIX. + +`vt1' +`vt0' + Vertical tab delay style. Non-POSIX. + +`ff1' +`ff0' + Form feed delay style. Non-POSIX. + + +File: coreutils.info, Node: Local, Next: Combination, Prev: Output, Up: stty invocation + +19.2.4 Local settings +--------------------- + +`isig' + Enable `interrupt', `quit', and `suspend' special characters. May + be negated. + +`icanon' + Enable `erase', `kill', `werase', and `rprnt' special characters. + May be negated. + +`iexten' + Enable non-POSIX special characters. May be negated. + +`echo' + Echo input characters. May be negated. + +`echoe' +`crterase' + Echo `erase' characters as backspace-space-backspace. May be + negated. + +`echok' + Echo a newline after a `kill' character. May be negated. + +`echonl' + Echo newline even if not echoing other characters. May be negated. + +`noflsh' + Disable flushing after `interrupt' and `quit' special characters. + May be negated. + +`xcase' + Enable input and output of uppercase characters by preceding their + lowercase equivalents with `\', when `icanon' is set. Non-POSIX. + May be negated. + +`tostop' + Stop background jobs that try to write to the terminal. Non-POSIX. + May be negated. + +`echoprt' +`prterase' + Echo erased characters backward, between `\' and `/'. Non-POSIX. + May be negated. + +`echoctl' +`ctlecho' + Echo control characters in hat notation (`^C') instead of + literally. Non-POSIX. May be negated. + +`echoke' +`crtkill' + Echo the `kill' special character by erasing each character on the + line as indicated by the `echoprt' and `echoe' settings, instead + of by the `echoctl' and `echok' settings. Non-POSIX. May be + negated. + + +File: coreutils.info, Node: Combination, Next: Characters, Prev: Local, Up: stty invocation + +19.2.5 Combination settings +--------------------------- + +Combination settings: + +`evenp' +`parity' + Same as `parenb -parodd cs7'. May be negated. If negated, same + as `-parenb cs8'. + +`oddp' + Same as `parenb parodd cs7'. May be negated. If negated, same as + `-parenb cs8'. + +`nl' + Same as `-icrnl -onlcr'. May be negated. If negated, same as + `icrnl -inlcr -igncr onlcr -ocrnl -onlret'. + +`ek' + Reset the `erase' and `kill' special characters to their default + values. + +`sane' + Same as: + + cread -ignbrk brkint -inlcr -igncr icrnl -ixoff + -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr + -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 + ff0 isig icanon iexten echo echoe echok -echonl + -noflsh -xcase -tostop -echoprt echoctl echoke + + and also sets all special characters to their default values. + +`cooked' + Same as `brkint ignpar istrip icrnl ixon opost isig icanon', plus + sets the `eof' and `eol' characters to their default values if + they are the same as the `min' and `time' characters. May be + negated. If negated, same as `raw'. + +`raw' + Same as: + + -ignbrk -brkint -ignpar -parmrk -inpck -istrip + -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany + -imaxbel -opost -isig -icanon -xcase min 1 time 0 + + May be negated. If negated, same as `cooked'. + +`cbreak' + Same as `-icanon'. May be negated. If negated, same as `icanon'. + +`pass8' + Same as `-parenb -istrip cs8'. May be negated. If negated, same + as `parenb istrip cs7'. + +`litout' + Same as `-parenb -istrip -opost cs8'. May be negated. If + negated, same as `parenb istrip opost cs7'. + +`decctlq' + Same as `-ixany'. Non-POSIX. May be negated. + +`tabs' + Same as `tab0'. Non-POSIX. May be negated. If negated, same as + `tab3'. + +`lcase' +`LCASE' + Same as `xcase iuclc olcuc'. Non-POSIX. May be negated. + +`crt' + Same as `echoe echoctl echoke'. + +`dec' + Same as `echoe echoctl echoke -ixany intr ^C erase ^? kill C-u'. + + +File: coreutils.info, Node: Characters, Next: Special, Prev: Combination, Up: stty invocation + +19.2.6 Special characters +------------------------- + +The special characters' default values vary from system to system. +They are set with the syntax `name value', where the names are listed +below and the value can be given either literally, in hat notation +(`^C'), or as an integer which may start with `0x' to indicate +hexadecimal, `0' to indicate octal, or any other digit to indicate +decimal. + + For GNU stty, giving a value of `^-' or `undef' disables that +special character. (This is incompatible with Ultrix `stty', which +uses a value of `u' to disable a special character. GNU `stty' treats +a value `u' like any other, namely to set that special character to +<U>.) + +`intr' + Send an interrupt signal. + +`quit' + Send a quit signal. + +`erase' + Erase the last character typed. + +`kill' + Erase the current line. + +`eof' + Send an end of file (terminate the input). + +`eol' + End the line. + +`eol2' + Alternate character to end the line. Non-POSIX. + +`swtch' + Switch to a different shell layer. Non-POSIX. + +`start' + Restart the output after stopping it. + +`stop' + Stop the output. + +`susp' + Send a terminal stop signal. + +`dsusp' + Send a terminal stop signal after flushing the input. Non-POSIX. + +`rprnt' + Redraw the current line. Non-POSIX. + +`werase' + Erase the last word typed. Non-POSIX. + +`lnext' + Enter the next character typed literally, even if it is a special + character. Non-POSIX. + + +File: coreutils.info, Node: Special, Prev: Characters, Up: stty invocation + +19.2.7 Special settings +----------------------- + +`min N' + Set the minimum number of characters that will satisfy a read until + the time value has expired, when `-icanon' is set. + +`time N' + Set the number of tenths of a second before reads time out if the + minimum number of characters have not been read, when `-icanon' is + set. + +`ispeed N' + Set the input speed to N. + +`ospeed N' + Set the output speed to N. + +`rows N' + Tell the tty kernel driver that the terminal has N rows. + Non-POSIX. + +`cols N' +`columns N' + Tell the kernel that the terminal has N columns. Non-POSIX. + +`size' + Print the number of rows and columns that the kernel thinks the + terminal has. (Systems that don't support rows and columns in the + kernel typically use the environment variables `LINES' and + `COLUMNS' instead; however, GNU `stty' does not know anything + about them.) Non-POSIX. + +`line N' + Use line discipline N. Non-POSIX. + +`speed' + Print the terminal speed. + +`N' + Set the input and output speeds to N. N can be one of: 0 50 75 + 110 134 134.5 150 200 300 600 1200 1800 2400 4800 9600 19200 38400 + `exta' `extb'. `exta' is the same as 19200; `extb' is the same as + 38400. 0 hangs up the line if `-clocal' is set. + + +File: coreutils.info, Node: printenv invocation, Next: tty invocation, Prev: stty invocation, Up: Working context + +19.3 `printenv': Print all or some environment variables +======================================================== + +`printenv' prints environment variable values. Synopsis: + + printenv [OPTION] [VARIABLE]... + + If no VARIABLEs are specified, `printenv' prints the value of every +environment variable. Otherwise, it prints the value of each VARIABLE +that is set, and nothing for those that are not set. + + The only options are a lone `--help' or `--version'. *Note Common +options::. + + Exit status: + + 0 if all variables specified were found + 1 if at least one specified variable was not found + 2 if a write error occurred + + +File: coreutils.info, Node: tty invocation, Prev: printenv invocation, Up: Working context + +19.4 `tty': Print file name of terminal on standard input +========================================================= + +`tty' prints the file name of the terminal connected to its standard +input. It prints `not a tty' if standard input is not a terminal. +Synopsis: + + tty [OPTION]... + + The program accepts the following option. Also see *Note Common +options::. + +`-s' +`--silent' +`--quiet' + Print nothing; only return an exit status. + + + Exit status: + + 0 if standard input is a terminal + 1 if standard input is not a terminal + 2 if given incorrect arguments + 3 if a write error occurs + + +File: coreutils.info, Node: User information, Next: System context, Prev: Working context, Up: Top + +20 User information +******************* + +This section describes commands that print user-related information: +logins, groups, and so forth. + +* Menu: + +* id invocation:: Print real and effective uid and gid. +* logname invocation:: Print current login name. +* whoami invocation:: Print effective user id. +* groups invocation:: Print group names a user is in. +* users invocation:: Print login names of users currently logged in. +* who invocation:: Print who is currently logged in. + + +File: coreutils.info, Node: id invocation, Next: logname invocation, Up: User information + +20.1 `id': Print real and effective uid and gid +=============================================== + +`id' prints information about the given user, or the process running it +if no user is specified. Synopsis: + + id [OPTION]... [USERNAME] + + By default, it prints the real user id, real group id, effective +user id if different from the real user id, effective group id if +different from the real group id, and supplemental group ids. + + Each of these numeric values is preceded by an identifying string and +followed by the corresponding user or group name in parentheses. + + The options cause `id' to print only part of the above information. +Also see *Note Common options::. + +`-g' +`--group' + Print only the group id. + +`-G' +`--groups' + Print only the group id and the supplementary groups. + +`-n' +`--name' + Print the user or group name instead of the ID number. Requires + `-u', `-g', or `-G'. + +`-r' +`--real' + Print the real, instead of effective, user or group id. Requires + `-u', `-g', or `-G'. + +`-u' +`--user' + Print only the user id. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: logname invocation, Next: whoami invocation, Prev: id invocation, Up: User information + +20.2 `logname': Print current login name +======================================== + +`logname' prints the calling user's name, as found in a +system-maintained file (often `/var/run/utmp' or `/etc/utmp'), and +exits with a status of 0. If there is no entry for the calling +process, `logname' prints an error message and exits with a status of 1. + + The only options are `--help' and `--version'. *Note Common +options::. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: whoami invocation, Next: groups invocation, Prev: logname invocation, Up: User information + +20.3 `whoami': Print effective user id +====================================== + +`whoami' prints the user name associated with the current effective +user id. It is equivalent to the command `id -un'. + + The only options are `--help' and `--version'. *Note Common +options::. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: groups invocation, Next: users invocation, Prev: whoami invocation, Up: User information + +20.4 `groups': Print group names a user is in +============================================= + +`groups' prints the names of the primary and any supplementary groups +for each given USERNAME, or the current process if no names are given. +If names are given, the name of each user is printed before the list of +that user's groups. Synopsis: + + groups [USERNAME]... + + The group lists are equivalent to the output of the command `id -Gn'. + + The only options are `--help' and `--version'. *Note Common +options::. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: users invocation, Next: who invocation, Prev: groups invocation, Up: User information + +20.5 `users': Print login names of users currently logged in +============================================================ + +`users' prints on a single line a blank-separated list of user names of +users currently logged in to the current host. Each user name +corresponds to a login session, so if a user has more than one login +session, that user's name will appear the same number of times in the +output. Synopsis: + + users [FILE] + + With no FILE argument, `users' extracts its information from a +system-maintained file (often `/var/run/utmp' or `/etc/utmp'). If a +file argument is given, `users' uses that file instead. A common +choice is `/var/log/wtmp'. + + The only options are `--help' and `--version'. *Note Common +options::. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: who invocation, Prev: users invocation, Up: User information + +20.6 `who': Print who is currently logged in +============================================ + +`who' prints information about users who are currently logged on. +Synopsis: + + `who' [OPTION] [FILE] [am i] + + If given no non-option arguments, `who' prints the following +information for each user currently logged on: login name, terminal +line, login time, and remote hostname or X display. + + If given one non-option argument, `who' uses that instead of a +default system-maintained file (often `/var/run/utmp' or +`/etc/utmp') +as the name of the file containing the record of users logged on. +`/var/log/wtmp' is commonly given as an argument to `who' to look at +who has previously logged on. + + If given two non-option arguments, `who' prints only the entry for +the user running it (determined from its standard input), preceded by +the hostname. Traditionally, the two arguments given are `am i', as in +`who am i'. + + Time stamps are listed according to the time zone rules specified by +the `TZ' environment variable, or by the system default rules if `TZ' +is not set. *Note Specifying the Time Zone with `TZ': (libc)TZ +Variable. + + The program accepts the following options. Also see *Note Common +options::. + +`-a' +`--all' + Same as `-b -d --login -p -r -t -T -u'. + +`-b' +`--boot' + Print the date and time of last system boot. + +`-d' +`--dead' + Print information corresponding to dead processes. + +`-H' +`--heading' + Print column headings. + +`-i' +`--idle' + Include idle time in HOURS:MINUTES, `.' (to indicate current + process), or `old'. + +`-m' + Same as `who am i'. + +`-q' +`--count' + Print only the login names and the number of users logged on. + Overrides all other options. + +`-s' + Ignored; for compatibility with other versions of `who'. + +`-i' +`-u' +`--idle' + After the login time, print the number of hours and minutes that + the user has been idle. `.' means the user was active in last + minute. `old' means the user was idle for more than 24 hours. + +`-l' +`--login' + List only the entries that correspond to processes via which the + system is waiting for a user to login. The user name is always + `LOGIN'. + +`--lookup' + Attempt to canonicalize hostnames found in utmp through a DNS + lookup. This is not the default because it can cause significant + delays on systems with automatic dial-up internet access. + +`-H' +`--heading' + Print a line of column headings. + +`-w' +`-T' +`--mesg' +`--message' +`--writable' + After each login name print a character indicating the user's + message status: + + `+' allowing `write' messages + `-' disallowing `write' messages + `?' cannot find terminal device + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: System context, Next: Modified command invocation, Prev: User information, Up: Top + +21 System context +***************** + +This section describes commands that print or change system-wide +information. + +* Menu: + +* date invocation:: Print or set system date and time. +* uname invocation:: Print system information. +* hostname invocation:: Print or set system name. +* hostid invocation:: Print numeric host identifier. + + +File: coreutils.info, Node: date invocation, Next: uname invocation, Up: System context + +21.1 `date': Print or set system date and time +============================================== + +Synopses: + + date [OPTION]... [+FORMAT] + date [-u|--utc|--universal] [ MMDDhhmm[[CC]YY][.ss] ] + + Invoking `date' with no FORMAT argument is equivalent to invoking it +with a default format that depends on the `LC_TIME' locale category. +In the default C locale, this format is `'+%a %b %e %H:%M:%S %Z %Y'', +so the output looks like `Fri Feb 27 13:47:51 PST 2004'. + + Normally, `date' uses the time zone rules indicated by the `TZ' +environment variable, or the system default rules if `TZ' is not set. +*Note Specifying the Time Zone with `TZ': (libc)TZ Variable. + + If given an argument that starts with a `+', `date' prints the +current time and date (or the time and date specified by the `--date' +option, see below) in the format defined by that argument, which is +similar to that of the `strftime' function. Except for directives, +which start with `%', characters in the format string are printed +unchanged. The directives are described below. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + +* Menu: + +* Time directives:: %[HIklMprsSTXzZ] +* Date directives:: %[aAbBcCdDhjmUwWxyY] +* Literal directives:: %[%nt] +* Padding:: Pad with zeroes, spaces (%_), or nothing (%-). +* Setting the time:: Changing the system clock. +* Options for date:: Instead of the current time. +* Examples of date:: Examples. + + +File: coreutils.info, Node: Time directives, Next: Date directives, Up: date invocation + +21.1.1 Time directives +---------------------- + +`date' directives related to times. + +`%H' + hour (00...23) + +`%I' + hour (01...12) + +`%k' + hour ( 0...23) + +`%l' + hour ( 1...12) + +`%M' + minute (00...59) + +`%N' + nanoseconds (000000000...999999999) + +`%p' + locale's upper case `AM' or `PM' (blank in many locales) + +`%P' + locale's lower case `am' or `pm' (blank in many locales) + +`%r' + time, 12-hour (hh:mm:ss [AP]M) + +`%R' + time, 24-hour (hh:mm). Same as `%H:%M'. + +`%s' + seconds since the epoch, i.e., 1 January 1970 00:00:00 UTC (a GNU + extension). For examples, *Note %s-examples::. + +`%S' + second (00...60). The range is [00...60], and not [00...59], in + order to accommodate the occasional positive leap second. + +`%T' + time, 24-hour (hh:mm:ss) + +`%X' + locale's time representation (%H:%M:%S) + +`%z' + RFC-2822 style numeric time zone (e.g., `-0600' or `+0100'), or + nothing if no time zone is determinable. This value reflects the + _current_ time zone. It isn't changed by the `--date' option. + +`%Z' + time zone (e.g., EDT), or nothing if no time zone is determinable. + Note that this value reflects the _current_ time zone. It isn't + changed by the `--date' option. + + +File: coreutils.info, Node: Date directives, Next: Literal directives, Prev: Time directives, Up: date invocation + +21.1.2 Date directives +---------------------- + +`date' directives related to dates. + +`%a' + locale's abbreviated weekday name (Sun...Sat) + +`%A' + locale's full weekday name, variable length (Sunday...Saturday) + +`%b' + locale's abbreviated month name (Jan...Dec) + +`%B' + locale's full month name, variable length (January...December) + +`%c' + locale's date and time (Sat Nov 04 12:02:33 EST 1989) + +`%C' + century (year divided by 100 and truncated to an integer) (00...99) + +`%d' + day of month (01...31) + +`%D' + date (mm/dd/yy) + +`%e' + blank-padded day of month (1...31) + +`%F' + the ISO 8601 standard date format: `%Y-%m-%d'. This is the + preferred form for all uses. + +`%g' + The year corresponding to the ISO week number, but without the + century (range `00' through `99'). This has the same format and + value as `%y', except that if the ISO week number (see `%V') + belongs to the previous or next year, that year is used instead. + +`%G' + The year corresponding to the ISO week number. This has the same + format and value as `%Y', except that if the ISO week number (see + `%V') belongs to the previous or next year, that year is used + instead. + +`%h' + same as %b + +`%j' + day of year (001...366) + +`%m' + month (01...12) + +`%u' + day of week (1...7) with 1 corresponding to Monday + +`%U' + week number of year with Sunday as first day of week (00...53). + Days in a new year preceding the first Sunday are in week zero. + +`%V' + week number of year with Monday as first day of the week as a + decimal (01...53). If the week containing January 1 has four or + more days in the new year, then it is considered week 1; + otherwise, it is week 53 of the previous year, and the next week + is week 1. (See the ISO 8601 standard.) + +`%w' + day of week (0...6) with 0 corresponding to Sunday + +`%W' + week number of year with Monday as first day of week (00...53). + Days in a new year preceding the first Monday are in week zero. + +`%x' + locale's date representation (mm/dd/yy) + +`%y' + last two digits of year (00...99) + +`%Y' + year (1970....) + + +File: coreutils.info, Node: Literal directives, Next: Padding, Prev: Date directives, Up: date invocation + +21.1.3 Literal directives +------------------------- + +`date' directives that produce literal strings. + +`%%' + a literal % + +`%n' + a newline + +`%t' + a horizontal tab + + +File: coreutils.info, Node: Padding, Next: Setting the time, Prev: Literal directives, Up: date invocation + +21.1.4 Padding +-------------- + +By default, `date' pads numeric fields with zeroes, so that, for +example, numeric months are always output as two digits. GNU `date' +recognizes the following numeric modifiers between the `%' and the +directive. + +`-' + (hyphen) do not pad the field; useful if the output is intended for + human consumption. + +`_' + (underscore) pad the field with spaces; useful if you need a fixed + number of characters in the output, but zeroes are too distracting. + +These are GNU extensions. + + Here is an example illustrating the differences: + + date +%d/%m -d "Feb 1" + => 01/02 + date +%-d/%-m -d "Feb 1" + => 1/2 + date +%_d/%_m -d "Feb 1" + => 1/ 2 + + +File: coreutils.info, Node: Setting the time, Next: Options for date, Prev: Padding, Up: date invocation + +21.1.5 Setting the time +----------------------- + +If given an argument that does not start with `+', `date' sets the +system clock to the time and date specified by that argument (as +described below). You must have appropriate privileges to set the +system clock. The `--date' and `--set' options may not be used with +such an argument. The `--universal' option may be used with such an +argument to indicate that the specified time and date are relative to +Coordinated Universal Time rather than to the local time zone. + + The argument must consist entirely of digits, which have the +following meaning: + +`MM' + month + +`DD' + day within month + +`hh' + hour + +`mm' + minute + +`CC' + first two digits of year (optional) + +`YY' + last two digits of year (optional) + +`ss' + second (optional) + + The `--set' option also sets the system clock; see the next section. + + +File: coreutils.info, Node: Options for date, Next: Examples of date, Prev: Setting the time, Up: date invocation + +21.1.6 Options for `date' +------------------------- + +The program accepts the following options. Also see *Note Common +options::. + +`-d DATESTR' +`--date=DATESTR' + Display the time and date specified in DATESTR instead of the + current time and date. DATESTR can be in almost any common + format. It can contain month names, time zones, `am' and `pm', + `yesterday', etc. For example, `--date="2004-02-27 + 14:19:13.489392193 +0530"' specifies the instant of time that is + 489,392,193 nanoseconds after February 27, 2004 at 2:19:13 PM in a + time zone that is 5 hours and 30 minutes east of UTC. *Note Date + input formats::. + +`-f DATEFILE' +`--file=DATEFILE' + Parse each line in DATEFILE as with `-d' and display the resulting + time and date. If DATEFILE is `-', use standard input. This is + useful when you have many dates to process, because the system + overhead of starting up the `date' executable many times can be + considerable. + +`-I TIMESPEC' +`--iso-8601[=TIMESPEC]' + Display the date using the ISO 8601 format, `%Y-%m-%d'. + + The argument TIMESPEC specifies the number of additional terms of + the time to include. It can be one of the following: + `auto' + The default behavior: print just the date. + + `hours' + Append the hour of the day to the date. + + `minutes' + Append the hours and minutes. + + `seconds' + Append the hours, minutes, and seconds. + + `ns' + Append the hours, minutes, seconds, and nanoseconds. + + If showing any time terms, then include the time zone using the + format `%z'. + + If TIMESPEC is omitted with `--iso-8601', the default is `auto'. + On older systems, GNU `date' instead supports an obsolete option + `-I[TIMESPEC]', where TIMESPEC defaults to `auto'. POSIX + 1003.1-2001 (*note Standards conformance::) does not allow `-I' + without an argument; use `--iso-8601' instead. + +`-R' +`--rfc-822' +`--rfc-2822' + Display the time and date using the format `%a, %d %b %Y %H:%M:%S + %z', evaluated in the C locale so abbreviations are always in + English. For example: + + Fri, 1 Aug 2003 23:05:56 -0700 + + This format conforms to RFC 2822 + (ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt) and RFC 822 + (ftp://ftp.rfc-editor.org/in-notes/rfc822.txt), the current and + previous standards for Internet email. + +`-r FILE' +`--reference=FILE' + Display the time and date reference according to the last + modification time of FILE, instead of the current time and date. + +`-s DATESTR' +`--set=DATESTR' + Set the time and date to DATESTR. See `-d' above. + +`-u' +`--utc' +`--universal' + Use Coordinated Universal Time (UTC) by operating as if the `TZ' + environment variable were set to the string `UTC0'. Coordinated + Universal Time is often called "Greenwich Mean Time" (GMT) for + historical reasons. + + +File: coreutils.info, Node: Examples of date, Prev: Options for date, Up: date invocation + +21.1.7 Examples of `date' +------------------------- + +Here are a few examples. Also see the documentation for the `-d' +option in the previous section. + + * To print the date of the day before yesterday: + + date --date='2 days ago' + + * To print the date of the day three months and one day hence: + + date --date='3 months 1 day' + + * To print the day of year of Christmas in the current year: + + date --date='25 Dec' +%j + + * To print the current full month name and the day of the month: + + date '+%B %d' + + But this may not be what you want because for the first nine days + of the month, the `%d' expands to a zero-padded two-digit field, + for example `date -d 1may '+%B %d'' will print `May 01'. + + * To print a date without the leading zero for one-digit days of the + month, you can use the (GNU extension) `-' modifier to suppress + the padding altogether: + + date -d 1may '+%B %-d + + * To print the current date and time in the format required by many + non-GNU versions of `date' when setting the system clock: + + date +%m%d%H%M%Y.%S + + * To set the system clock forward by two minutes: + + date --set='+2 minutes' + + * To print the date in the format specified by RFC-2822, use `date + --rfc-2822'. I just did and saw this: + + Thu, 31 Jul 2003 13:13:05 -0700 + + * To convert a date string to the number of seconds since the epoch + (which is 1970-01-01 00:00:00 UTC), use the `--date' option with + the `%s' format. That can be useful in sorting and/or graphing + and/or comparing data by date. The following command outputs the + number of the seconds since the epoch for the time two minutes + after the epoch: + + date --date='1970-01-01 00:02:00 +0000' +%s + 120 + + If you do not specify time zone information in the date string, + `date' uses your computer's idea of the time zone when + interpreting the string. For example, if your computer's time + zone is that of Cambridge, Massachusetts, which was then 5 hours + (i.e., 18,000 seconds) behind UTC: + + # local time zone used + date --date='1970-01-01 00:02:00' +%s + 18120 + + * If you're sorting or graphing dated data, your raw date values may + be represented as seconds since the epoch. But few people can + look at the date `946684800' and casually note "Oh, that's the + first second of the year 2000 in Greenwich, England." + + date --date='2000-01-01 UTC' +%s + 946684800 + + An alternative is to use the `--utc' (`-u') option. Then you may + omit `UTC' from the date string. Although this produces the same + result for `%s' and many other format sequences, with a time zone + offset different from zero, it would give a different result for + zone-dependent formats like `%z'. + + date -u --date=2000-01-01 +%s + 946684800 + + To convert such an unwieldy number of seconds back to a more + readable form, use a command like this: + + # local time zone used + date -d '1970-01-01 UTC 946684800 seconds' +"%Y-%m-%d %T %z" + 1999-12-31 19:00:00 -0500 + + Often it is better to output UTC-relative date and time: + + date -u -d '1970-01-01 946684800 seconds' +"%Y-%m-%d %T %z" + 2000-01-01 00:00:00 +0000 + + + +File: coreutils.info, Node: uname invocation, Next: hostname invocation, Prev: date invocation, Up: System context + +21.2 `uname': Print system information +====================================== + +`uname' prints information about the machine and operating system it is +run on. If no options are given, `uname' acts as if the `-s' option +were given. Synopsis: + + uname [OPTION]... + + If multiple options or `-a' are given, the selected information is +printed in this order: + + KERNEL-NAME NODENAME KERNEL-RELEASE KERNEL-VERSION + MACHINE PROCESSOR HARDWARE-PLATFORM OPERATING-SYSTEM + + The information may contain internal spaces, so such output cannot be +parsed reliably. In the following example, RELEASE is +`2.2.18ss.e820-bda652a #4 SMP Tue Jun 5 11:24:08 PDT 2001': + + uname -a + => Linux dum 2.2.18 #4 SMP Tue Jun 5 11:24:08 PDT 2001 i686 unknown unknown GNU/Linux + + The program accepts the following options. Also see *Note Common +options::. + +`-a' +`--all' + Print all of the below information. + +`-i' +`--hardware-platform' + Print the hardware platform name (sometimes called the hardware + implementation). + +`-m' +`--machine' + Print the machine hardware name (sometimes called the hardware + class or hardware type). + +`-n' +`--nodename' + Print the network node hostname. + +`-p' +`--processor' + Print the processor type (sometimes called the instruction set + architecture or ISA). + +`-o' +`--operating-system' + Print the name of the operating system. + +`-r' +`--kernel-release' + Print the kernel release. + +`-s' +`--kernel-name' + Print the kernel name. POSIX 1003.1-2001 (*note Standards + conformance::) calls this "the implementation of the operating + system", because the POSIX specification itself has no notion of + "kernel". The kernel name might be the same as the operating + system name printed by the `-o' or `--operating-system' option, + but it might differ. Some operating systems (e.g., FreeBSD, + HP-UX) have the same name as their underlying kernels; others + (e.g., GNU/Linux, Solaris) do not. + +`-v' +`--kernel-version' + Print the kernel version. + + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: hostname invocation, Next: hostid invocation, Prev: uname invocation, Up: System context + +21.3 `hostname': Print or set system name +========================================= + +With no arguments, `hostname' prints the name of the current host +system. With one argument, it sets the current host name to the +specified string. You must have appropriate privileges to set the host +name. Synopsis: + + hostname [NAME] + + The only options are `--help' and `--version'. *Note Common +options::. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: hostid invocation, Prev: hostname invocation, Up: System context + +21.4 `hostid': Print numeric host identifier. +============================================= + +`hostid' prints the numeric identifier of the current host in +hexadecimal. This command accepts no arguments. The only options are +`--help' and `--version'. *Note Common options::. + + For example, here's what it prints on one system I use: + + $ hostid + 1bac013d + + On that system, the 32-bit quantity happens to be closely related to +the system's Internet address, but that isn't always the case. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: Modified command invocation, Next: Process control, Prev: System context, Up: Top + +22 Modified command invocation +****************************** + +This section describes commands that run other commands in some context +different than the current one: a modified environment, as a different +user, etc. + +* Menu: + +* chroot invocation:: Modify the root directory. +* env invocation:: Modify environment variables. +* nice invocation:: Modify scheduling priority. +* nohup invocation:: Immunize to hangups. +* su invocation:: Modify user and group id. + + +File: coreutils.info, Node: chroot invocation, Next: env invocation, Up: Modified command invocation + +22.1 `chroot': Run a command with a different root directory +============================================================ + +`chroot' runs a command with a specified root directory. On many +systems, only the super-user can do this. Synopses: + + chroot NEWROOT [COMMAND [ARGS]...] + chroot OPTION + + Ordinarily, file names are looked up starting at the root of the +directory structure, i.e., `/'. `chroot' changes the root to the +directory NEWROOT (which must exist) and then runs COMMAND with +optional ARGS. If COMMAND is not specified, the default is the value +of the `SHELL' environment variable or `/bin/sh' if not set, invoked +with the `-i' option. COMMAND must not be a special built-in utility +(*note Special built-in utilities::). + + The only options are `--help' and `--version'. *Note Common +options::. Options must precede operands. + + Here are a few tips to help avoid common problems in using chroot. +To start with a simple example, make COMMAND refer to a statically +linked binary. If you were to use a dynamically linked executable, then +you'd have to arrange to have the shared libraries in the right place +under your new root directory. + + For example, if you create a statically linked `ls' executable, and +put it in `/tmp/empty', you can run this command as root: + + $ chroot /tmp/empty /ls -Rl / + + Then you'll see output like this: + + /: + total 1023 + -rwxr-xr-x 1 0 0 1041745 Aug 16 11:17 ls + + If you want to use a dynamically linked executable, say `bash', then +first run `ldd bash' to see what shared objects it needs. Then, in +addition to copying the actual binary, also copy the listed files to +the required positions under your intended new root directory. +Finally, if the executable requires any other files (e.g., data, state, +device files), copy them into place, too. + + Exit status: + + 1 if `chroot' itself fails + 126 if COMMAND is found but cannot be invoked + 127 if COMMAND cannot be found + the exit status of COMMAND otherwise + + +File: coreutils.info, Node: env invocation, Next: nice invocation, Prev: chroot invocation, Up: Modified command invocation + +22.2 `env': Run a command in a modified environment +=================================================== + +`env' runs a command with a modified environment. Synopses: + + env [OPTION]... [NAME=VALUE]... [COMMAND [ARGS]...] + env + + Operands of the form `VARIABLE=VALUE' set the environment variable +VARIABLE to value VALUE. VALUE may be empty (`VARIABLE='). Setting a +variable to an empty value is different from unsetting it. These +operands are evaluated left-to-right, so if two operands mention the +same variable the earlier is ignored. + + Environment variable names can be empty, and can contain any +characters other than `=' and the null character (ASCII NUL). However, +it is wise to limit yourself to names that consist solely of +underscores, digits, and ASCII letters, and that begin with a +non-digit, as applications like the shell do not work well with other +names. + + The first operand that does not contain the character `=' specifies +the program to invoke; it is searched for according to the `PATH' +environment variable. Any remaining arguments are passed as arguments +to that program. The program should not be a special built-in utility +(*note Special built-in utilities::). + + If no command name is specified following the environment +specifications, the resulting environment is printed. This is like +specifying the `printenv' program. + + The program accepts the following options. Also see *Note Common +options::. Options must precede operands. + +`-u NAME' +`--unset=NAME' + Remove variable NAME from the environment, if it was in the + environment. + +`-' +`-i' +`--ignore-environment' + Start with an empty environment, ignoring the inherited + environment. + + + Exit status: + + 0 if no COMMAND is specified and the environment is output + 1 if `env' itself fails + 126 if COMMAND is found but cannot be invoked + 127 if COMMAND cannot be found + the exit status of COMMAND otherwise + + +File: coreutils.info, Node: nice invocation, Next: nohup invocation, Prev: env invocation, Up: Modified command invocation + +22.3 `nice': Run a command with modified scheduling priority +============================================================ + +`nice' prints or modifies a process's "nice value", a parameter that +affects the process's scheduling priority. Synopsis: + + nice [OPTION]... [COMMAND [ARG]...] + + If no arguments are given, `nice' prints the current nice value, +which it inherited. Otherwise, `nice' runs the given COMMAND with its +nice value adjusted. By default, its nice value is incremented by 10. + + Nice values range at least from -20 (resulting in the most favorable +scheduling) through 19 (the least favorable). Some systems may have a +wider range of nice values; conversely, other systems may enforce more +restrictive limits. An attempt to set the nice value outside the +supported range is treated as an attempt to use the minimum or maximum +supported value. + + COMMAND must not be a special built-in utility (*note Special +built-in utilities::). + + Because many shells have a built-in `nice' command, using an +unadorned `nice' in a script or interactively may get you different +functionality than that described here. + + The program accepts the following option. Also see *Note Common +options::. Options must precede operands. + +`-n ADJUSTMENT' +`--adjustment=ADJUSTMENT' + Add ADJUSTMENT instead of 10 to the command's nice value. If + ADJUSTMENT is negative and you lack appropriate privileges, `nice' + issues a warning but otherwise acts as if you specified a zero + adjustment. + + On older systems, `nice' supports an obsolete option + `-ADJUSTMENT'. POSIX 1003.1-2001 (*note Standards conformance::) + does not allow this; use `-n ADJUSTMENT' instead. + + + Exit status: + + 0 if no COMMAND is specified and the current priority is output + 1 if `nice' itself fails + 126 if COMMAND is found but cannot be invoked + 127 if COMMAND cannot be found + the exit status of COMMAND otherwise + + It is sometimes useful to run non-interactive programs with reduced +priority. + + $ nice factor 4611686018427387903 + + Since `nice' prints the current priority, you can invoke it through +itself to demonstrate how it works. + + The default behavior is to increase the nice value by `10': + + $ nice + 0 + $ nice nice + 10 + $ nice -n 10 nice + 10 + + The ADJUSTMENT is relative to the current nice value. In the next +example, the first `nice' invocation runs the second one with nice +value 10, and it in turn runs the final one with a nice value that is 3 +more: + + $ nice nice -n 3 nice + 13 + + Specifying a nice value larger than the supported range is the same +as specifying the maximum supported value: + + $ nice -n 10000000000 nice + 19 + + Only a privileged user may run a process with higher priority: + + $ nice -n -1 nice + nice: cannot set priority: Permission denied + 0 + $ sudo nice -n -1 nice + -1 + + +File: coreutils.info, Node: nohup invocation, Next: su invocation, Prev: nice invocation, Up: Modified command invocation + +22.4 `nohup': Run a command immune to hangups +============================================= + +`nohup' runs the given COMMAND with hangup signals ignored, so that the +command can continue running in the background after you log out. +Synopsis: + + nohup COMMAND [ARG]... + + If standard output is a terminal, it is redirected so that it is +appended to the file `nohup.out'; if that cannot be written to, it is +appended to the file `$HOME/nohup.out'. If that cannot be written to, +the command is not run. If standard output is not a terminal, then the +standard output of COMMAND will be the same as that of `nohup'. + + If `nohup' creates either `nohup.out' or `$HOME/nohup.out', it +creates it with no "group" or "other" access permissions. It does not +change the permissions if the output file already existed. + + If standard error is a terminal, it is redirected to the same file +descriptor as the standard output. + + `nohup' does not automatically put the command it runs in the +background; you must do that explicitly, by ending the command line +with an `&'. Also, `nohup' does not change the scheduling priority of +COMMAND; use `nice' for that, e.g., `nohup nice COMMAND'. + + COMMAND must not be a special built-in utility (*note Special +built-in utilities::). + + The only options are `--help' and `--version'. *Note Common +options::. Options must precede operands. + + Exit status: + + 126 if COMMAND is found but cannot be invoked + 127 if `nohup' itself fails or if COMMAND cannot be found + the exit status of COMMAND otherwise + + +File: coreutils.info, Node: su invocation, Prev: nohup invocation, Up: Modified command invocation + +22.5 `su': Run a command with substitute user and group id +========================================================== + +`su' allows one user to temporarily become another user. It runs a +command (often an interactive shell) with the real and effective user +id, group id, and supplemental groups of a given USER. Synopsis: + + su [OPTION]... [USER [ARG]...] + + If no USER is given, the default is `root', the super-user. The +shell to use is taken from USER's `passwd' entry, or `/bin/sh' if none +is specified there. If USER has a password, `su' prompts for the +password unless run by a user with effective user id of zero (the +super-user). + + By default, `su' does not change the current directory. It sets the +environment variables `HOME' and `SHELL' from the password entry for +USER, and if USER is not the super-user, sets `USER' and `LOGNAME' to +USER. By default, the shell is not a login shell. + + Any additional ARGs are passed as additional arguments to the shell. + + GNU `su' does not treat `/bin/sh' or any other shells specially +(e.g., by setting `argv[0]' to `-su', passing `-c' only to certain +shells, etc.). + + `su' can optionally be compiled to use `syslog' to report failed, +and optionally successful, `su' attempts. (If the system supports +`syslog'.) However, GNU `su' does not check if the user is a member of +the `wheel' group; see below. + + The program accepts the following options. Also see *Note Common +options::. + +`-c COMMAND' +`--command=COMMAND' + Pass COMMAND, a single command line to run, to the shell with a + `-c' option instead of starting an interactive shell. + +`-f' +`--fast' + Pass the `-f' option to the shell. This probably only makes sense + if the shell run is `csh' or `tcsh', for which the `-f' option + prevents reading the startup file (`.cshrc'). With Bourne-like + shells, the `-f' option disables file name pattern expansion + (globbing), which is not likely to be useful. + +`-' +`-l' +`--login' + Make the shell a login shell. This means the following. Unset all + environment variables except `TERM', `HOME', and `SHELL' (which + are set as described above), and `USER' and `LOGNAME' (which are + set, even for the super-user, as described above), and set `PATH' + to a compiled-in default value. Change to USER's home directory. + Prepend `-' to the shell's name, intended to make it read its + login startup file(s). + +`-m' +`-p' +`--preserve-environment' + Do not change the environment variables `HOME', `USER', `LOGNAME', + or `SHELL'. Run the shell given in the environment variable + `SHELL' instead of the shell from USER's passwd entry, unless the + user running `su' is not the superuser and USER's shell is + restricted. A "restricted shell" is one that is not listed in the + file `/etc/shells', or in a compiled-in list if that file does not + exist. Parts of what this option does can be overridden by + `--login' and `--shell'. + +`-s SHELL' +`--shell=SHELL' + Run SHELL instead of the shell from USER's passwd entry, unless + the user running `su' is not the superuser and USER's shell is + restricted (see `-m' just above). + + + Exit status: + + 1 if `su' itself fails + 126 if subshell is found but cannot be invoked + 127 if subshell cannot be found + the exit status of the subshell otherwise + +22.5.1 Why GNU `su' does not support the `wheel' group +------------------------------------------------------ + +(This section is by Richard Stallman.) + + Sometimes a few of the users try to hold total power over all the +rest. For example, in 1984, a few users at the MIT AI lab decided to +seize power by changing the operator password on the Twenex system and +keeping it secret from everyone else. (I was able to thwart this coup +and give power back to the users by patching the kernel, but I wouldn't +know how to do that in Unix.) + + However, occasionally the rulers do tell someone. Under the usual +`su' mechanism, once someone learns the root password who sympathizes +with the ordinary users, he or she can tell the rest. The "wheel +group" feature would make this impossible, and thus cement the power of +the rulers. + + I'm on the side of the masses, not that of the rulers. If you are +used to supporting the bosses and sysadmins in whatever they do, you +might find this idea strange at first. + + +File: coreutils.info, Node: Process control, Next: Delaying, Prev: Modified command invocation, Up: Top + +23 Process control +****************** + +* Menu: + +* kill invocation:: Sending a signal to processes. + + +File: coreutils.info, Node: kill invocation, Up: Process control + +23.1 `kill': Send a signal to processes +======================================= + +The `kill' command sends a signal to processes, causing them to +terminate or otherwise act upon receiving the signal in some way. +Alternatively, it lists information about signals. Synopses: + + kill [-s SIGNAL | --signal SIGNAL | -SIGNAL] PID... + kill [-l | --list | -t | --table] [SIGNAL]... + + The first form of the `kill' command sends a signal to all PID +arguments. The default signal to send if none is specified is `TERM'. +The special signal number `0' does not denote a valid signal, but can +be used to test whether the PID arguments specify processes to which a +signal could be sent. + + If PID is positive, the signal is sent to the process with the +process id PID. If PID is zero, the signal is sent to all processes in +the process group of the current process. If PID is -1, the signal is +sent to all processes for which the user has permission to send a +signal. If PID is less than -1, the signal is sent to all processes in +the process group that equals the absolute value of PID. + + If PID is not positive, a system-dependent set of system processes +is excluded from the list of processes to which the signal is sent. + + If a negative PID argument is desired as the first one, it should be +preceded by `--'. However, as a common extension to POSIX, `--' is not +required with `kill -SIGNAL -PID'. The following commands are +equivalent: + + kill -15 -1 + kill -TERM -1 + kill -s TERM -- -1 + kill -- -1 + + The first form of the `kill' command succeeds if every PID argument +specifies at least one process that the signal was sent to. + + The second form of the `kill' command lists signal information. +Either the `-l' or `--list' option, or the `-t' or `--table' option +must be specified. Without any SIGNAL argument, all supported signals +are listed. The output of `-l' or `--list' is a list of the signal +names, one per line; if SIGNAL is already a name, the signal number is +printed instead. The output of `-t' or `--table' is a table of signal +numbers, names, and descriptions. This form of the `kill' command +succeeds if all SIGNAL arguments are valid and if there is no output +error. + + The `kill' command also supports the `--help' and `--version' +options. *Note Common options::. + + A SIGNAL may be a signal name like `HUP', or a signal number like +`1', or an exit status of a process terminated by the signal. A signal +name can be given in canonical form or prefixed by `SIG'. The case of +the letters is ignored, except for the `-SIGNAL' option which must use +upper case to avoid ambiguity with lower case option letters. The +following signal names and numbers are supported on all POSIX compliant +systems: + +`HUP' + 1. Hangup. + +`INT' + 2. Terminal interrupt. + +`QUIT' + 3. Terminal quit. + +`ABRT' + 6. Process abort. + +`KILL' + 9. Kill (cannot be caught or ignored). + +`ALRM' + 14. Alarm Clock. + +`TERM' + 15. Termination. + +Other supported signal names have system-dependent corresponding +numbers. All systems conforming to POSIX 1003.1-2001 also support the +following signals: + +`BUS' + Access to an undefined portion of a memory object. + +`CHLD' + Child process terminated, stopped, or continued. + +`CONT' + Continue executing, if stopped. + +`FPE' + Erroneous arithmetic operation. + +`ILL' + Illegal Instruction. + +`PIPE' + Write on a pipe with no one to read it. + +`SEGV' + Invalid memory reference. + +`STOP' + Stop executing (cannot be caught or ignored). + +`TSTP' + Terminal stop. + +`TTIN' + Background process attempting read. + +`TTOU' + Background process attempting write. + +`URG' + High bandwidth data is available at a socket. + +`USR1' + User-defined signal 1. + +`USR2' + User-defined signal 2. + +POSIX 1003.1-2001 systems that support the XSI extension also support +the following signals: + +`POLL' + Pollable event. + +`PROF' + Profiling timer expired. + +`SYS' + Bad system call. + +`TRAP' + Trace/breakpoint trap. + +`VTALRM' + Virtual timer expired. + +`XCPU' + CPU time limit exceeded. + +`XFSZ' + File size limit exceeded. + +POSIX 1003.1-2001 systems that support the XRT extension also support +at least eight real-time signals called `RTMIN', `RTMIN+1', ..., +`RTMAX-1', `RTMAX'. + + +File: coreutils.info, Node: Delaying, Next: Numeric operations, Prev: Process control, Up: Top + +24 Delaying +*********** + +* Menu: + +* sleep invocation:: Delay for a specified time. + + +File: coreutils.info, Node: sleep invocation, Up: Delaying + +24.1 `sleep': Delay for a specified time +======================================== + +`sleep' pauses for an amount of time specified by the sum of the values +of the command line arguments. Synopsis: + + sleep NUMBER[smhd]... + + Each argument is a number followed by an optional unit; the default +is seconds. The units are: + +`s' + seconds + +`m' + minutes + +`h' + hours + +`d' + days + + Historical implementations of `sleep' have required that NUMBER be +an integer. However, GNU `sleep' accepts arbitrary floating point +numbers (using a period before any fractional digits). + + The only options are `--help' and `--version'. *Note Common +options::. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: Numeric operations, Next: File permissions, Prev: Delaying, Up: Top + +25 Numeric operations +********************* + +These programs do numerically-related operations. + +* Menu: + +* factor invocation:: Show factors of numbers. +* seq invocation:: Print sequences of numbers. + + +File: coreutils.info, Node: factor invocation, Next: seq invocation, Up: Numeric operations + +25.1 `factor': Print prime factors +================================== + +`factor' prints prime factors. Synopses: + + factor [NUMBER]... + factor OPTION + + If no NUMBER is specified on the command line, `factor' reads +numbers from standard input, delimited by newlines, tabs, or spaces. + + The only options are `--help' and `--version'. *Note Common +options::. + + The algorithm it uses is not very sophisticated, so for some inputs +`factor' runs for a long time. The hardest numbers to factor are the +products of large primes. Factoring the product of the two largest +32-bit prime numbers takes about 80 seconds of CPU time on a 1.6 GHz +Athlon. + + $ p=`echo '4294967279 * 4294967291'|bc` + $ factor $p + 18446743979220271189: 4294967279 4294967291 + + Similarly, it takes about 80 seconds for GNU factor (from +coreutils-5.1.2) to "factor" the largest 64-bit prime: + + $ factor 18446744073709551557 + 18446744073709551557: 18446744073709551557 + + In contrast, `factor' factors the largest 64-bit number in just over +a tenth of a second: + + $ factor `echo '2^64-1'|bc` + 18446744073709551615: 3 5 17 257 641 65537 6700417 + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: seq invocation, Prev: factor invocation, Up: Numeric operations + +25.2 `seq': Print numeric sequences +=================================== + +`seq' prints a sequence of numbers to standard output. Synopses: + + seq [OPTION]... LAST + seq [OPTION]... FIRST LAST + seq [OPTION]... FIRST INCREMENT LAST + + `seq' prints the numbers from FIRST to LAST by INCREMENT. By +default, each number is printed on a separate line. When INCREMENT is +not specified, it defaults to `1', even when FIRST is larger than LAST. +FIRST also defaults to `1'. So `seq 1' prints `1', but `seq 0' and +`seq 10 5' produce no output. Floating-point numbers may be specified +(using a period before any fractional digits). + + The program accepts the following options. Also see *Note Common +options::. Options must precede operands. + +`-f FORMAT' +`--format=FORMAT' + Print all numbers using FORMAT; default `%g'. FORMAT must contain + exactly one of the floating point output formats `%e', `%f', or + `%g'. + +`-s STRING' +`--separator=STRING' + Separate numbers with STRING; default is a newline. The output + always terminates with a newline. + +`-w' +`--equal-width' + Print all numbers with the same width, by padding with leading + zeroes. (To have other kinds of padding, use `--format'). + + + If you want to use `seq' to print sequences of large integer values, +don't use the default `%g' format since it can result in loss of +precision: + + $ seq 1000000 1000001 + 1e+06 + 1e+06 + + Instead, you can use the format, `%1.f', to print large decimal +numbers with no exponent and no decimal point. + + $ seq --format=%1.f 1000000 1000001 + 1000000 + 1000001 + + If you want hexadecimal output, you can use `printf' to perform the +conversion: + + $ printf %x'\n' `seq -f %1.f 1048575 1024 1050623` + fffff + 1003ff + 1007ff + + For very long lists of numbers, use xargs to avoid system +limitations on the length of an argument list: + + $ seq -f %1.f 1000000 | xargs printf %x'\n' | tail -n 3 + f423e + f423f + f4240 + + To generate octal output, use the printf `%o' format instead of +`%x'. Note however that using printf might not work for numbers +outside the usual 32-bit range: + + $ printf "%x\n" `seq -f %1.f 4294967295 4294967296` + ffffffff + bash: printf: 4294967296: Numerical result out of range + + On most systems, seq can produce whole-number output for values up to +`2^53', so here's a more general approach to base conversion that also +happens to be more robust for such large numbers. It works by using +`bc' and setting its output radix variable, OBASE, to `16' in this case +to produce hexadecimal output. + + $ (echo obase=16; seq -f %1.f 4294967295 4294967296)|bc + FFFFFFFF + 100000000 + + Be careful when using `seq' with a fractional INCREMENT, otherwise +you may see surprising results. Most people would expect to see `0.3' +printed as the last number in this example: + + $ seq -s ' ' 0 .1 .3 + 0 0.1 0.2 + + But that doesn't happen on most systems because `seq' is implemented +using binary floating point arithmetic (via the C `double' type)--which +means some decimal numbers like `.1' cannot be represented exactly. +That in turn means some nonintuitive conditions like `.1 * 3 > .3' will +end up being true. + + To work around that in the above example, use a slightly larger +number as the LAST value: + + $ seq -s ' ' 0 .1 .31 + 0 0.1 0.2 0.3 + + In general, when using an INCREMENT with a fractional part, where +(LAST - FIRST) / INCREMENT is (mathematically) a whole number, specify +a slightly larger (or smaller, if INCREMENT is negative) value for LAST +to ensure that LAST is the final value printed by seq. + + An exit status of zero indicates success, and a nonzero value +indicates failure. + + +File: coreutils.info, Node: File permissions, Next: Date input formats, Prev: Numeric operations, Up: Top + +26 File permissions +******************* + +Each file has a set of "permissions" that control the kinds of access +that users have to that file. The permissions for a file are also +called its "access mode". They can be represented either in symbolic +form or as an octal number. + +* Menu: + +* Mode Structure:: Structure of file permissions. +* Symbolic Modes:: Mnemonic permissions representation. +* Numeric Modes:: Permissions as octal numbers. + + +File: coreutils.info, Node: Mode Structure, Next: Symbolic Modes, Up: File permissions + +26.1 Structure of File Permissions +================================== + +There are three kinds of permissions that a user can have for a file: + + 1. permission to read the file. For directories, this means + permission to list the contents of the directory. + + 2. permission to write to (change) the file. For directories, this + means permission to create and remove files in the directory. + + 3. permission to execute the file (run it as a program). For + directories, this means permission to access files in the + directory. + + There are three categories of users who may have different +permissions to perform any of the above operations on a file: + + 1. the file's owner; + + 2. other users who are in the file's group; + + 3. everyone else. + + Files are given an owner and group when they are created. Usually +the owner is the current user and the group is the group of the +directory the file is in, but this varies with the operating system, the +file system the file is created on, and the way the file is created. +You can change the owner and group of a file by using the `chown' and +`chgrp' commands. + + In addition to the three sets of three permissions listed above, a +file's permissions have three special components, which affect only +executable files (programs) and, on some systems, directories: + + 1. set the process's effective user ID to that of the file upon + execution (called the "setuid bit"). No effect on directories. + + 2. set the process's effective group ID to that of the file upon + execution (called the "setgid bit"). For directories on some + systems, put files created in the directory into the same group as + the directory, no matter what group the user who creates them is + in. + + 3. save the program's text image on the swap device so it will load + more quickly when run (called the "sticky bit"). For directories + on some systems, prevent users from removing or renaming a file in + a directory unless they own the file or the directory; this is + called the "restricted deletion flag" for the directory. + + In addition to the permissions listed above, there may be file +attributes specific to the file system, e.g: access control lists +(ACLs), whether a file is compressed, whether a file can be modified +(immutability), whether a file can be dumped. These are usually set +using programs specific to the file system. For example: + +ext2 + On GNU and Linux/GNU the file permissions ("attributes") specific + to the ext2 file system are set using `chattr'. + +FFS + On FreeBSD the file permissions ("flags") specific to the FFS file + system are set using `chrflags'. + + Although a file's permission "bits" allow an operation on that file, +that operation may still fail, because: + + * the file-system-specific permissions do not permit it; + + * the file system is mounted as read-only. + + For example, if the immutable attribute is set on a file, it cannot +be modified, regardless of the fact that you may have just run `chmod +a+w FILE'. + + +File: coreutils.info, Node: Symbolic Modes, Next: Numeric Modes, Prev: Mode Structure, Up: File permissions + +26.2 Symbolic Modes +=================== + +"Symbolic modes" represent changes to files' permissions as operations +on single-character symbols. They allow you to modify either all or +selected parts of files' permissions, optionally based on their +previous values, and perhaps on the current `umask' as well (*note +Umask and Protection::). + + The format of symbolic modes is: + + [ugoa...][[+-=][rwxXstugo...]...][,...] + + The following sections describe the operators and other details of +symbolic modes. + +* Menu: + +* Setting Permissions:: Basic operations on permissions. +* Copying Permissions:: Copying existing permissions. +* Changing Special Permissions:: Special permissions. +* Conditional Executability:: Conditionally affecting executability. +* Multiple Changes:: Making multiple changes. +* Umask and Protection:: The effect of the umask. + + +File: coreutils.info, Node: Setting Permissions, Next: Copying Permissions, Up: Symbolic Modes + +26.2.1 Setting Permissions +-------------------------- + +The basic symbolic operations on a file's permissions are adding, +removing, and setting the permission that certain users have to read, +write, and execute the file. These operations have the following +format: + + USERS OPERATION PERMISSIONS + +The spaces between the three parts above are shown for readability only; +symbolic modes cannot contain spaces. + + The USERS part tells which users' access to the file is changed. It +consists of one or more of the following letters (or it can be empty; +*note Umask and Protection::, for a description of what happens then). +When more than one of these letters is given, the order that they are +in does not matter. + +`u' + the user who owns the file; + +`g' + other users who are in the file's group; + +`o' + all other users; + +`a' + all users; the same as `ugo'. + + The OPERATION part tells how to change the affected users' access to +the file, and is one of the following symbols: + +`+' + to add the PERMISSIONS to whatever permissions the USERS already + have for the file; + +`-' + to remove the PERMISSIONS from whatever permissions the USERS + already have for the file; + +`=' + to make the PERMISSIONS the only permissions that the USERS have + for the file. + + The PERMISSIONS part tells what kind of access to the file should be +changed; it is zero or more of the following letters. As with the +USERS part, the order does not matter when more than one letter is +given. Omitting the PERMISSIONS part is useful only with the `=' +operation, where it gives the specified USERS no access at all to the +file. + +`r' + the permission the USERS have to read the file; + +`w' + the permission the USERS have to write to the file; + +`x' + the permission the USERS have to execute the file. + + For example, to give everyone permission to read and write a file, +but not to execute it, use: + + a=rw + + To remove write permission for from all users other than the file's +owner, use: + + go-w + +The above command does not affect the access that the owner of the file +has to it, nor does it affect whether other users can read or execute +the file. + + To give everyone except a file's owner no permission to do anything +with that file, use the mode below. Other users could still remove the +file, if they have write permission on the directory it is in. + + go= + +Another way to specify the same thing is: + + og-rxw + + +File: coreutils.info, Node: Copying Permissions, Next: Changing Special Permissions, Prev: Setting Permissions, Up: Symbolic Modes + +26.2.2 Copying Existing Permissions +----------------------------------- + +You can base a file's permissions on its existing permissions. To do +this, instead of using `r', `w', or `x' after the operator, you use the +letter `u', `g', or `o'. For example, the mode + o+g + adds the permissions for users who are in a file's group to the +permissions that other users have for the file. Thus, if the file +started out as mode 664 (`rw-rw-r--'), the above mode would change it +to mode 666 (`rw-rw-rw-'). If the file had started out as mode 741 +(`rwxr----x'), the above mode would change it to mode 745 +(`rwxr--r-x'). The `-' and `=' operations work analogously. + + +File: coreutils.info, Node: Changing Special Permissions, Next: Conditional Executability, Prev: Copying Permissions, Up: Symbolic Modes + +26.2.3 Changing Special Permissions +----------------------------------- + +In addition to changing a file's read, write, and execute permissions, +you can change its special permissions. *Note Mode Structure::, for a +summary of these permissions. + + To change a file's permission to set the user ID on execution, use +`u' in the USERS part of the symbolic mode and `s' in the PERMISSIONS +part. + + To change a file's permission to set the group ID on execution, use +`g' in the USERS part of the symbolic mode and `s' in the PERMISSIONS +part. + + To change a file's permission to stay permanently on the swap device, +use `o' in the USERS part of the symbolic mode and `t' in the +PERMISSIONS part. + + For example, to add set user ID permission to a program, you can use +the mode: + + u+s + + To remove both set user ID and set group ID permission from it, you +can use the mode: + + ug-s + + To cause a program to be saved on the swap device, you can use the +mode: + + o+t + + Remember that the special permissions only affect files that are +executable, plus, on some systems, directories (on which they have +different meanings; *note Mode Structure::). Also, the combinations +`u+t', `g+t', and `o+s' have no effect. + + The `=' operator is not very useful with special permissions; for +example, the mode: + + o=t + +does cause the file to be saved on the swap device, but it also removes +all read, write, and execute permissions that users not in the file's +group might have had for it. + + +File: coreutils.info, Node: Conditional Executability, Next: Multiple Changes, Prev: Changing Special Permissions, Up: Symbolic Modes + +26.2.4 Conditional Executability +-------------------------------- + +There is one more special type of symbolic permission: if you use `X' +instead of `x', execute permission is affected only if the file already +had execute permission or is a directory. It affects directories' +execute permission even if they did not initially have any execute +permissions set. + + For example, this mode: + + a+X + +gives all users permission to execute files (or search directories) if +anyone could before. + + +File: coreutils.info, Node: Multiple Changes, Next: Umask and Protection, Prev: Conditional Executability, Up: Symbolic Modes + +26.2.5 Making Multiple Changes +------------------------------ + +The format of symbolic modes is actually more complex than described +above (*note Setting Permissions::). It provides two ways to make +multiple changes to files' permissions. + + The first way is to specify multiple OPERATION and PERMISSIONS parts +after a USERS part in the symbolic mode. + + For example, the mode: + + og+rX-w + +gives users other than the owner of the file read permission and, if it +is a directory or if someone already had execute permission to it, +gives them execute permission; and it also denies them write permission +to the file. It does not affect the permission that the owner of the +file has for it. The above mode is equivalent to the two modes: + + og+rX + og-w + + The second way to make multiple changes is to specify more than one +simple symbolic mode, separated by commas. For example, the mode: + + a+r,go-w + +gives everyone permission to read the file and removes write permission +on it for all users except its owner. Another example: + + u=rwx,g=rx,o= + +sets all of the non-special permissions for the file explicitly. (It +gives users who are not in the file's group no permission at all for +it.) + + The two methods can be combined. The mode: + + a+r,g+x-w + +gives all users permission to read the file, and gives users who are in +the file's group permission to execute it, as well, but not permission +to write to it. The above mode could be written in several different +ways; another is: + + u+r,g+rx,o+r,g-w + + +File: coreutils.info, Node: Umask and Protection, Prev: Multiple Changes, Up: Symbolic Modes + +26.2.6 The Umask and Protection +------------------------------- + +If the USERS part of a symbolic mode is omitted, it defaults to `a' +(affect all users), except that any permissions that are _set_ in the +system variable `umask' are _not affected_. The value of `umask' can +be set using the `umask' command. Its default value varies from system +to system. + + Omitting the USERS part of a symbolic mode is generally not useful +with operations other than `+'. It is useful with `+' because it +allows you to use `umask' as an easily customizable protection against +giving away more permission to files than you intended to. + + As an example, if `umask' has the value 2, which removes write +permission for users who are not in the file's group, then the mode: + + +w + +adds permission to write to the file to its owner and to other users who +are in the file's group, but _not_ to other users. In contrast, the +mode: + + a+w + +ignores `umask', and _does_ give write permission for the file to all +users. + + +File: coreutils.info, Node: Numeric Modes, Prev: Symbolic Modes, Up: File permissions + +26.3 Numeric Modes +================== + +File permissions are stored internally as integers. As an alternative +to giving a symbolic mode, you can give an octal (base 8) number that +corresponds to the internal representation of the new mode. This +number is always interpreted in octal; you do not have to add a leading +0, as you do in C. Mode 0055 is the same as mode 55. + + A numeric mode is usually shorter than the corresponding symbolic +mode, but it is limited in that it cannot take into account a file's +previous permissions; it can only set them absolutely. + + On most systems, the permissions granted to the user, to other users +in the file's group, and to other users not in the file's group are +each stored as three bits, which are represented as one octal digit. +The three special permissions are also each stored as one bit, and they +are as a group represented as another octal digit. Here is how the +bits are arranged, starting with the lowest valued bit: + + Value in Corresponding + Mode Permission + + Other users not in the file's group: + 1 Execute + 2 Write + 4 Read + + Other users in the file's group: + 10 Execute + 20 Write + 40 Read + + The file's owner: + 100 Execute + 200 Write + 400 Read + + Special permissions: + 1000 Save text image on swap device + 2000 Set group ID on execution + 4000 Set user ID on execution + + For example, numeric mode 4755 corresponds to symbolic mode +`u=rwxs,go=rx', and numeric mode 664 corresponds to symbolic mode +`ug=rw,o=r'. Numeric mode 0 corresponds to symbolic mode `ugo='. + + +File: coreutils.info, Node: Date input formats, Next: Opening the software toolbox, Prev: File permissions, Up: Top + +27 Date input formats +********************* + +First, a quote: + + Our units of temporal measurement, from seconds on up to months, + are so complicated, asymmetrical and disjunctive so as to make + coherent mental reckoning in time all but impossible. Indeed, had + some tyrannical god contrived to enslave our minds to time, to + make it all but impossible for us to escape subjection to sodden + routines and unpleasant surprises, he could hardly have done + better than handing down our present system. It is like a set of + trapezoidal building blocks, with no vertical or horizontal + surfaces, like a language in which the simplest thought demands + ornate constructions, useless particles and lengthy + circumlocutions. Unlike the more successful patterns of language + and science, which enable us to face experience boldly or at least + level-headedly, our system of temporal calculation silently and + persistently encourages our terror of time. + + ... It is as though architects had to measure length in feet, + width in meters and height in ells; as though basic instruction + manuals demanded a knowledge of five different languages. It is + no wonder then that we often look into our own immediate past or + future, last Tuesday or a week from Sunday, with feelings of + helpless confusion. ... + + -- Robert Grudin, `Time and the Art of Living'. + + This section describes the textual date representations that GNU +programs accept. These are the strings you, as a user, can supply as +arguments to the various programs. The C interface (via the `get_date' +function) is not described here. + +* Menu: + +* General date syntax:: Common rules. +* Calendar date items:: 19 Dec 1994. +* Time of day items:: 9:20pm. +* Time zone items:: EST, PDT, GMT. +* Day of week items:: Monday and others. +* Relative items in date strings:: next tuesday, 2 years ago. +* Pure numbers in date strings:: 19931219, 1440. +* Seconds since the Epoch:: @1078100502. +* Specifying time zone rules:: TZ="America/New_York", TZ="UTC0". +* Authors of get_date:: Bellovin, Eggert, Salz, Berets, et al. + + +File: coreutils.info, Node: General date syntax, Next: Calendar date items, Up: Date input formats + +27.1 General date syntax +======================== + +A "date" is a string, possibly empty, containing many items separated +by whitespace. The whitespace may be omitted when no ambiguity arises. +The empty string means the beginning of today (i.e., midnight). Order +of the items is immaterial. A date string may contain many flavors of +items: + + * calendar date items + + * time of day items + + * time zone items + + * day of the week items + + * relative items + + * pure numbers. + +We describe each of these item types in turn, below. + + A few ordinal numbers may be written out in words in some contexts. +This is most useful for specifying day of the week items or relative +items (see below). Among the most commonly used ordinal numbers, the +word `last' stands for -1, `this' stands for 0, and `first' and `next' +both stand for 1. Because the word `second' stands for the unit of +time there is no way to write the ordinal number 2, but for convenience +`third' stands for 3, `fourth' for 4, `fifth' for 5, `sixth' for 6, +`seventh' for 7, `eighth' for 8, `ninth' for 9, `tenth' for 10, +`eleventh' for 11 and `twelfth' for 12. + + When a month is written this way, it is still considered to be +written numerically, instead of being "spelled in full"; this changes +the allowed strings. + + In the current implementation, only English is supported for words +and abbreviations like `AM', `DST', `EST', `first', `January', +`Sunday', `tomorrow', and `year'. + + The output of the `date' command is not always acceptable as a date +string, not only because of the language problem, but also because +there is no standard meaning for time zone items like `IST'. When using +`date' to generate a date string intended to be parsed later, specify a +date format that is independent of language and that does not use time +zone items other than `UTC' and `Z'. Here are some ways to do this: + + $ LC_ALL=C TZ=UTC0 date + Mon Mar 1 00:21:42 UTC 2004 + $ TZ=UTC0 date +'%Y-%m-%d %H:%M:%SZ' + 2004-03-01 00:21:42Z + $ date --iso-8601=ns # a GNU extension + 2004-02-29T16:21:42,692722128-0800 + $ date --rfc-2822 # a GNU extension + Sun, 29 Feb 2004 16:21:42 -0800 + $ date +'%Y-%m-%d %H:%M:%S %z' # %z is a GNU extension. + 2004-02-29 16:21:42 -0800 + $ date +'@%s.%N' # %s and %N are GNU extensions. + @1078100502.692722128 + + Alphabetic case is completely ignored in dates. Comments may be +introduced between round parentheses, as long as included parentheses +are properly nested. Hyphens not followed by a digit are currently +ignored. Leading zeros on numbers are ignored. + + +File: coreutils.info, Node: Calendar date items, Next: Time of day items, Prev: General date syntax, Up: Date input formats + +27.2 Calendar date items +======================== + +A "calendar date item" specifies a day of the year. It is specified +differently, depending on whether the month is specified numerically or +literally. All these strings specify the same calendar date: + + 1972-09-24 # ISO 8601. + 72-9-24 # Assume 19xx for 69 through 99, + # 20xx for 00 through 68. + 72-09-24 # Leading zeros are ignored. + 9/24/72 # Common U.S. writing. + 24 September 1972 + 24 Sept 72 # September has a special abbreviation. + 24 Sep 72 # Three-letter abbreviations always allowed. + Sep 24, 1972 + 24-sep-72 + 24sep72 + + The year can also be omitted. In this case, the last specified year +is used, or the current year if none. For example: + + 9/24 + sep 24 + + Here are the rules. + + For numeric months, the ISO 8601 format `YEAR-MONTH-DAY' is allowed, +where YEAR is any positive number, MONTH is a number between 01 and 12, +and DAY is a number between 01 and 31. A leading zero must be present +if a number is less than ten. If YEAR is 68 or smaller, then 2000 is +added to it; otherwise, if YEAR is less than 100, then 1900 is added to +it. The construct `MONTH/DAY/YEAR', popular in the United States, is +accepted. Also `MONTH/DAY', omitting the year. + + Literal months may be spelled out in full: `January', `February', +`March', `April', `May', `June', `July', `August', `September', +`October', `November' or `December'. Literal months may be abbreviated +to their first three letters, possibly followed by an abbreviating dot. +It is also permitted to write `Sept' instead of `September'. + + When months are written literally, the calendar date may be given as +any of the following: + + DAY MONTH YEAR + DAY MONTH + MONTH DAY YEAR + DAY-MONTH-YEAR + + Or, omitting the year: + + MONTH DAY + + +File: coreutils.info, Node: Time of day items, Next: Time zone items, Prev: Calendar date items, Up: Date input formats + +27.3 Time of day items +====================== + +A "time of day item" in date strings specifies the time on a given day. +Here are some examples, all of which represent the same time: + + 20:02:00.000000 + 20:02 + 8:02pm + 20:02-0500 # In EST (U.S. Eastern Standard Time). + + More generally, the time of day may be given as +`HOUR:MINUTE:SECOND', where HOUR is a number between 0 and 23, MINUTE +is a number between 0 and 59, and SECOND is a number between 0 and 59 +possibly followed by `.' or `,' and a fraction containing one or more +digits. Alternatively, `:SECOND' can be omitted, in which case it is +taken to be zero. + + If the time is followed by `am' or `pm' (or `a.m.' or `p.m.'), HOUR +is restricted to run from 1 to 12, and `:MINUTE' may be omitted (taken +to be zero). `am' indicates the first half of the day, `pm' indicates +the second half of the day. In this notation, 12 is the predecessor of +1: midnight is `12am' while noon is `12pm'. (This is the zero-oriented +interpretation of `12am' and `12pm', as opposed to the old tradition +derived from Latin which uses `12m' for noon and `12pm' for midnight.) + + The time may alternatively be followed by a time zone correction, +expressed as `SHHMM', where S is `+' or `-', HH is a number of zone +hours and MM is a number of zone minutes. You can also separate HH +from MM with a colon. When a time zone correction is given this way, it +forces interpretation of the time relative to Coordinated Universal +Time (UTC), overriding any previous specification for the time zone or +the local time zone. For example, `+0530' and `+05:30' both stand for +the time zone 5.5 hours ahead of UTC (e.g., India). The MINUTE part of +the time of day may not be elided when a time zone correction is used. +This is the best way to specify a time zone correction by fractional +parts of an hour. + + Either `am'/`pm' or a time zone correction may be specified, but not +both. + + +File: coreutils.info, Node: Time zone items, Next: Day of week items, Prev: Time of day items, Up: Date input formats + +27.4 Time zone items +==================== + +A "time zone item" specifies an international time zone, indicated by a +small set of letters, e.g., `UTC' or `Z' for Coordinated Universal +Time. Any included periods are ignored. By following a +non-daylight-saving time zone by the string `DST' in a separate word +(that is, separated by some white space), the corresponding daylight +saving time zone may be specified. Alternatively, a +non-daylight-saving time zone can be followed by a time zone +correction, to add the two values. This is normally done only for +`UTC'; for example, `UTC+05:30' is equivalent to `+05:30'. + + Time zone items other than `UTC' and `Z' are obsolescent and are not +recommended, because they are ambiguous; for example, `EST' has a +different meaning in Australia than in the United States. Instead, +it's better to use unambiguous numeric time zone corrections like +`-0500', as described in the previous section. + + If neither a time zone item nor a time zone correction is supplied, +time stamps are interpreted using the rules of the default time zone +(*note Specifying time zone rules::). + + +File: coreutils.info, Node: Day of week items, Next: Relative items in date strings, Prev: Time zone items, Up: Date input formats + +27.5 Day of week items +====================== + +The explicit mention of a day of the week will forward the date (only +if necessary) to reach that day of the week in the future. + + Days of the week may be spelled out in full: `Sunday', `Monday', +`Tuesday', `Wednesday', `Thursday', `Friday' or `Saturday'. Days may +be abbreviated to their first three letters, optionally followed by a +period. The special abbreviations `Tues' for `Tuesday', `Wednes' for +`Wednesday' and `Thur' or `Thurs' for `Thursday' are also allowed. + + A number may precede a day of the week item to move forward +supplementary weeks. It is best used in expression like `third +monday'. In this context, `last DAY' or `next DAY' is also acceptable; +they move one week before or after the day that DAY by itself would +represent. + + A comma following a day of the week item is ignored. + + +File: coreutils.info, Node: Relative items in date strings, Next: Pure numbers in date strings, Prev: Day of week items, Up: Date input formats + +27.6 Relative items in date strings +=================================== + +"Relative items" adjust a date (or the current date if none) forward or +backward. The effects of relative items accumulate. Here are some +examples: + + 1 year + 1 year ago + 3 years + 2 days + + The unit of time displacement may be selected by the string `year' +or `month' for moving by whole years or months. These are fuzzy units, +as years and months are not all of equal duration. More precise units +are `fortnight' which is worth 14 days, `week' worth 7 days, `day' +worth 24 hours, `hour' worth 60 minutes, `minute' or `min' worth 60 +seconds, and `second' or `sec' worth one second. An `s' suffix on +these units is accepted and ignored. + + The unit of time may be preceded by a multiplier, given as an +optionally signed number. Unsigned numbers are taken as positively +signed. No number at all implies 1 for a multiplier. Following a +relative item by the string `ago' is equivalent to preceding the unit +by a multiplier with value -1. + + The string `tomorrow' is worth one day in the future (equivalent to +`day'), the string `yesterday' is worth one day in the past (equivalent +to `day ago'). + + The strings `now' or `today' are relative items corresponding to +zero-valued time displacement, these strings come from the fact a +zero-valued time displacement represents the current time when not +otherwise changed by previous items. They may be used to stress other +items, like in `12:00 today'. The string `this' also has the meaning +of a zero-valued time displacement, but is preferred in date strings +like `this thursday'. + + When a relative item causes the resulting date to cross a boundary +where the clocks were adjusted, typically for daylight saving time, the +resulting date and time are adjusted accordingly. + + The fuzz in units can cause problems with relative items. For +example, `2003-07-31 -1 month' might evaluate to 2003-07-01, because +2003-06-31 is an invalid date. To determine the previous month more +reliably, you can ask for the month before the 15th of the current +month. For example: + + $ date -R + Thu, 31 Jul 2003 13:02:39 -0700 + $ date --date='-1 month' +'Last month was %B?' + Last month was July? + $ date --date="$(date +%Y-%m-15) -1 month" +'Last month was %B!' + Last month was June! + + Also, take care when manipulating dates around clock changes such as +daylight saving leaps. In a few cases these have added or subtracted +as much as 24 hours from the clock, so it is often wise to adopt +universal time by setting the `TZ' environment variable to `UTC0' +before embarking on calendrical calculations. + + +File: coreutils.info, Node: Pure numbers in date strings, Next: Seconds since the Epoch, Prev: Relative items in date strings, Up: Date input formats + +27.7 Pure numbers in date strings +================================= + +The precise interpretation of a pure decimal number depends on the +context in the date string. + + If the decimal number is of the form YYYYMMDD and no other calendar +date item (*note Calendar date items::) appears before it in the date +string, then YYYY is read as the year, MM as the month number and DD as +the day of the month, for the specified calendar date. + + If the decimal number is of the form HHMM and no other time of day +item appears before it in the date string, then HH is read as the hour +of the day and MM as the minute of the hour, for the specified time of +day. MM can also be omitted. + + If both a calendar date and a time of day appear to the left of a +number in the date string, but no relative item, then the number +overrides the year. + + +File: coreutils.info, Node: Seconds since the Epoch, Next: Specifying time zone rules, Prev: Pure numbers in date strings, Up: Date input formats + +27.8 Seconds since the Epoch +============================ + +If you precede a number with `@', it represents an internal time stamp +as a count of seconds. The number can contain an internal decimal +point (either `.' or `,'); any excess precision not supported by the +internal representation is truncated toward minus infinity. Such a +number cannot be combined with any other date item, as it specifies a +complete time stamp. + + Internally, computer times are represented as a count of seconds +since an epoch--a well-defined point of time. On GNU and POSIX +systems, the epoch is 1970-01-01 00:00:00 UTC, so `@0' represents this +time, `@1' represents 1970-01-01 00:00:01 UTC, and so forth. GNU and +most other POSIX-compliant systems support such times as an extension +to POSIX, using negative counts, so that `@-1' represents 1969-12-31 +23:59:59 UTC. + + Traditional Unix systems count seconds with 32-bit two's-complement +integers and can represent times from 1901-12-13 20:45:52 through +2038-01-19 03:14:07 UTC. More modern systems use 64-bit counts of +seconds with nanosecond subcounts, and can represent all the times in +the known lifetime of the universe to a resolution of 1 nanosecond. + + On most systems, these counts ignore the presence of leap seconds. +For example, on most systems `@915148799' represents 1998-12-31 +23:59:59 UTC, `@915148800' represents 1999-01-01 00:00:00 UTC, and +there is no way to represent the intervening leap second 1998-12-31 +23:59:60 UTC. + + +File: coreutils.info, Node: Specifying time zone rules, Next: Authors of get_date, Prev: Seconds since the Epoch, Up: Date input formats + +27.9 Specifying time zone rules +=============================== + +Normally, dates are interpreted using the rules of the current time +zone, which in turn are specified by the `TZ' environment variable, or +by a system default if `TZ' is not set. To specify a different set of +default time zone rules that apply just to one date, start the date +with a string of the form `TZ="RULE"'. The two quote characters (`"') +must be present in the date, and any quotes or backslashes within RULE +must be escaped by a backslash. + + For example, with the GNU `date' command you can answer the question +"What time is it in New York when a Paris clock shows 6:30am on October +31, 2004?" by using a date beginning with `TZ="Europe/Paris"' as shown +in the following shell transcript: + + $ export TZ="America/New_York" + $ date --date='TZ="Europe/Paris" 2004-10-31 06:30' + Sun Oct 31 01:30:00 EDT 2004 + + In this example, the `--date' operand begins with its own `TZ' +setting, so the rest of that operand is processed according to +`Europe/Paris' rules, treating the string `2004-10-31 06:30' as if it +were in Paris. However, since the output of the `date' command is +processed according to the overall time zone rules, it uses New York +time. (Paris was normally six hours ahead of New York in 2004, but +this example refers to a brief Halloween period when the gap was five +hours.) + + A `TZ' value is a rule that typically names a location in the `tz' +database (http://www.twinsun.com/tz/tz-link.htm). A recent catalog of +location names appears in the TWiki Date and Time Gateway +(http://twiki.org/cgi-bin/xtra/tzdate). A few non-GNU hosts require a +colon before a location name in a `TZ' setting, e.g., +`TZ=":America/New_York"'. + + The `tz' database includes a wide variety of locations ranging from +`Arctic/Longyearbyen' to `Antarctica/South_Pole', but if you are at sea +and have your own private time zone, or if you are using a non-GNU host +that does not support the `tz' database, you may need to use a POSIX +rule instead. Simple POSIX rules like `UTC0' specify a time zone +without daylight saving time; other rules can specify simple daylight +saving regimes. *Note Specifying the Time Zone with `TZ': (libc)TZ +Variable. + + +File: coreutils.info, Node: Authors of get_date, Prev: Specifying time zone rules, Up: Date input formats + +27.10 Authors of `get_date' +=========================== + +`get_date' was originally implemented by Steven M. Bellovin +(<smb@research.att.com>) while at the University of North Carolina at +Chapel Hill. The code was later tweaked by a couple of people on +Usenet, then completely overhauled by Rich $alz (<rsalz@bbn.com>) and +Jim Berets (<jberets@bbn.com>) in August, 1990. Various revisions for +the GNU system were made by David MacKenzie, Jim Meyering, Paul Eggert +and others. + + This chapter was originally produced by Franc,ois Pinard +(<pinard@iro.umontreal.ca>) from the `getdate.y' source code, and then +edited by K. Berry (<kb@cs.umb.edu>). + + +File: coreutils.info, Node: Opening the software toolbox, Next: GNU Free Documentation License, Prev: Date input formats, Up: Top + +28 Opening the Software Toolbox +******************************* + +An earlier version of this chapter appeared in 2 (June 1994). It was +written by Arnold Robbins. + +* Menu: + +* Toolbox introduction:: Toolbox introduction +* I/O redirection:: I/O redirection +* The who command:: The `who' command +* The cut command:: The `cut' command +* The sort command:: The `sort' command +* The uniq command:: The `uniq' command +* Putting the tools together:: Putting the tools together + + +File: coreutils.info, Node: Toolbox introduction, Next: I/O redirection, Up: Opening the software toolbox + +Toolbox Introduction +==================== + +This month's column is only peripherally related to the GNU Project, in +that it describes a number of the GNU tools on your GNU/Linux system +and how they might be used. What it's really about is the "Software +Tools" philosophy of program development and usage. + + The software tools philosophy was an important and integral concept +in the initial design and development of Unix (of which Linux and GNU +are essentially clones). Unfortunately, in the modern day press of +Internetworking and flashy GUIs, it seems to have fallen by the +wayside. This is a shame, since it provides a powerful mental model +for solving many kinds of problems. + + Many people carry a Swiss Army knife around in their pants pockets +(or purse). A Swiss Army knife is a handy tool to have: it has several +knife blades, a screwdriver, tweezers, toothpick, nail file, corkscrew, +and perhaps a number of other things on it. For the everyday, small +miscellaneous jobs where you need a simple, general purpose tool, it's +just the thing. + + On the other hand, an experienced carpenter doesn't build a house +using a Swiss Army knife. Instead, he has a toolbox chock full of +specialized tools--a saw, a hammer, a screwdriver, a plane, and so on. +And he knows exactly when and where to use each tool; you won't catch +him hammering nails with the handle of his screwdriver. + + The Unix developers at Bell Labs were all professional programmers +and trained computer scientists. They had found that while a +one-size-fits-all program might appeal to a user because there's only +one program to use, in practice such programs are + + a. difficult to write, + + b. difficult to maintain and debug, and + + c. difficult to extend to meet new situations. + + Instead, they felt that programs should be specialized tools. In +short, each program "should do one thing well." No more and no less. +Such programs are simpler to design, write, and get right--they only do +one thing. + + Furthermore, they found that with the right machinery for hooking +programs together, that the whole was greater than the sum of the +parts. By combining several special purpose programs, you could +accomplish a specific task that none of the programs was designed for, +and accomplish it much more quickly and easily than if you had to write +a special purpose program. We will see some (classic) examples of this +further on in the column. (An important additional point was that, if +necessary, take a detour and build any software tools you may need +first, if you don't already have something appropriate in the toolbox.) + + +File: coreutils.info, Node: I/O redirection, Next: The who command, Prev: Toolbox introduction, Up: Opening the software toolbox + +I/O Redirection +=============== + +Hopefully, you are familiar with the basics of I/O redirection in the +shell, in particular the concepts of "standard input," "standard +output," and "standard error". Briefly, "standard input" is a data +source, where data comes from. A program should not need to either +know or care if the data source is a disk file, a keyboard, a magnetic +tape, or even a punched card reader. Similarly, "standard output" is a +data sink, where data goes to. The program should neither know nor +care where this might be. Programs that only read their standard +input, do something to the data, and then send it on, are called +"filters", by analogy to filters in a water pipeline. + + With the Unix shell, it's very easy to set up data pipelines: + + program_to_create_data | filter1 | ... | filterN > final.pretty.data + + We start out by creating the raw data; each filter applies some +successive transformation to the data, until by the time it comes out +of the pipeline, it is in the desired form. + + This is fine and good for standard input and standard output. Where +does the standard error come in to play? Well, think about `filter1' in +the pipeline above. What happens if it encounters an error in the data +it sees? If it writes an error message to standard output, it will just +disappear down the pipeline into `filter2''s input, and the user will +probably never see it. So programs need a place where they can send +error messages so that the user will notice them. This is standard +error, and it is usually connected to your console or window, even if +you have redirected standard output of your program away from your +screen. + + For filter programs to work together, the format of the data has to +be agreed upon. The most straightforward and easiest format to use is +simply lines of text. Unix data files are generally just streams of +bytes, with lines delimited by the ASCII LF (Line Feed) character, +conventionally called a "newline" in the Unix literature. (This is +`'\n'' if you're a C programmer.) This is the format used by all the +traditional filtering programs. (Many earlier operating systems had +elaborate facilities and special purpose programs for managing binary +data. Unix has always shied away from such things, under the +philosophy that it's easiest to simply be able to view and edit your +data with a text editor.) + + OK, enough introduction. Let's take a look at some of the tools, +and then we'll see how to hook them together in interesting ways. In +the following discussion, we will only present those command line +options that interest us. As you should always do, double check your +system documentation for the full story. + + +File: coreutils.info, Node: The who command, Next: The cut command, Prev: I/O redirection, Up: Opening the software toolbox + +The `who' Command +================= + +The first program is the `who' command. By itself, it generates a list +of the users who are currently logged in. Although I'm writing this on +a single-user system, we'll pretend that several people are logged in: + + $ who + -| arnold console Jan 22 19:57 + -| miriam ttyp0 Jan 23 14:19(:0.0) + -| bill ttyp1 Jan 21 09:32(:0.0) + -| arnold ttyp2 Jan 23 20:48(:0.0) + + Here, the `$' is the usual shell prompt, at which I typed `who'. +There are three people logged in, and I am logged in twice. On +traditional Unix systems, user names are never more than eight +characters long. This little bit of trivia will be useful later. The +output of `who' is nice, but the data is not all that exciting. + + +File: coreutils.info, Node: The cut command, Next: The sort command, Prev: The who command, Up: Opening the software toolbox + +The `cut' Command +================= + +The next program we'll look at is the `cut' command. This program cuts +out columns or fields of input data. For example, we can tell it to +print just the login name and full name from the `/etc/passwd' file. +The `/etc/passwd' file has seven fields, separated by colons: + + arnold:xyzzy:2076:10:Arnold D. Robbins:/home/arnold:/bin/bash + + To get the first and fifth fields, we would use `cut' like this: + + $ cut -d: -f1,5 /etc/passwd + -| root:Operator + ... + -| arnold:Arnold D. Robbins + -| miriam:Miriam A. Robbins + ... + + With the `-c' option, `cut' will cut out specific characters (i.e., +columns) in the input lines. This is useful for input data that has +fixed width fields, and does not have a field separator. For example, +list the Monday dates for the current month: + + $ cal | cut -c 3-5 + -|Mo + -| + -| 6 + -| 13 + -| 20 + -| 27 + + +File: coreutils.info, Node: The sort command, Next: The uniq command, Prev: The cut command, Up: Opening the software toolbox + +The `sort' Command +================== + +Next we'll look at the `sort' command. This is one of the most +powerful commands on a Unix-style system; one that you will often find +yourself using when setting up fancy data plumbing. + + The `sort' command reads and sorts each file named on the command +line. It then merges the sorted data and writes it to standard output. +It will read standard input if no files are given on the command line +(thus making it into a filter). The sort is based on the character +collating sequence or based on user-supplied ordering criteria. + + +File: coreutils.info, Node: The uniq command, Next: Putting the tools together, Prev: The sort command, Up: Opening the software toolbox + +The `uniq' Command +================== + +Finally (at least for now), we'll look at the `uniq' program. When +sorting data, you will often end up with duplicate lines, lines that +are identical. Usually, all you need is one instance of each line. +This is where `uniq' comes in. The `uniq' program reads its standard +input. It prints only one copy of each repeated line. It does have +several options. Later on, we'll use the `-c' option, which prints +each unique line, preceded by a count of the number of times that line +occurred in the input. + + +File: coreutils.info, Node: Putting the tools together, Prev: The uniq command, Up: Opening the software toolbox + +Putting the Tools Together +========================== + +Now, let's suppose this is a large ISP server system with dozens of +users logged in. The management wants the system administrator to +write a program that will generate a sorted list of logged in users. +Furthermore, even if a user is logged in multiple times, his or her +name should only show up in the output once. + + The administrator could sit down with the system documentation and +write a C program that did this. It would take perhaps a couple of +hundred lines of code and about two hours to write it, test it, and +debug it. However, knowing the software toolbox, the administrator can +instead start out by generating just a list of logged on users: + + $ who | cut -c1-8 + -| arnold + -| miriam + -| bill + -| arnold + + Next, sort the list: + + $ who | cut -c1-8 | sort + -| arnold + -| arnold + -| bill + -| miriam + + Finally, run the sorted list through `uniq', to weed out duplicates: + + $ who | cut -c1-8 | sort | uniq + -| arnold + -| bill + -| miriam + + The `sort' command actually has a `-u' option that does what `uniq' +does. However, `uniq' has other uses for which one cannot substitute +`sort -u'. + + The administrator puts this pipeline into a shell script, and makes +it available for all the users on the system (`#' is the system +administrator, or `root', prompt): + + # cat > /usr/local/bin/listusers + who | cut -c1-8 | sort | uniq + ^D + # chmod +x /usr/local/bin/listusers + + There are four major points to note here. First, with just four +programs, on one command line, the administrator was able to save about +two hours worth of work. Furthermore, the shell pipeline is just about +as efficient as the C program would be, and it is much more efficient in +terms of programmer time. People time is much more expensive than +computer time, and in our modern "there's never enough time to do +everything" society, saving two hours of programmer time is no mean +feat. + + Second, it is also important to emphasize that with the +_combination_ of the tools, it is possible to do a special purpose job +never imagined by the authors of the individual programs. + + Third, it is also valuable to build up your pipeline in stages, as +we did here. This allows you to view the data at each stage in the +pipeline, which helps you acquire the confidence that you are indeed +using these tools correctly. + + Finally, by bundling the pipeline in a shell script, other users can +use your command, without having to remember the fancy plumbing you set +up for them. In terms of how you run them, shell scripts and compiled +programs are indistinguishable. + + After the previous warm-up exercise, we'll look at two additional, +more complicated pipelines. For them, we need to introduce two more +tools. + + The first is the `tr' command, which stands for "transliterate." +The `tr' command works on a character-by-character basis, changing +characters. Normally it is used for things like mapping upper case to +lower case: + + $ echo ThIs ExAmPlE HaS MIXED case! | tr '[:upper:]' '[:lower:]' + -| this example has mixed case! + + There are several options of interest: + +`-c' + work on the complement of the listed characters, i.e., operations + apply to characters not in the given set + +`-d' + delete characters in the first set from the output + +`-s' + squeeze repeated characters in the output into just one character. + + We will be using all three options in a moment. + + The other command we'll look at is `comm'. The `comm' command takes +two sorted input files as input data, and prints out the files' lines +in three columns. The output columns are the data lines unique to the +first file, the data lines unique to the second file, and the data +lines that are common to both. The `-1', `-2', and `-3' command line +options _omit_ the respective columns. (This is non-intuitive and +takes a little getting used to.) For example: + + $ cat f1 + -| 11111 + -| 22222 + -| 33333 + -| 44444 + $ cat f2 + -| 00000 + -| 22222 + -| 33333 + -| 55555 + $ comm f1 f2 + -| 00000 + -| 11111 + -| 22222 + -| 33333 + -| 44444 + -| 55555 + + The file name `-' tells `comm' to read standard input instead of a +regular file. + + Now we're ready to build a fancy pipeline. The first application is +a word frequency counter. This helps an author determine if he or she +is over-using certain words. + + The first step is to change the case of all the letters in our input +file to one case. "The" and "the" are the same word when doing +counting. + + $ tr '[:upper:]' '[:lower:]' < whats.gnu | ... + + The next step is to get rid of punctuation. Quoted words and +unquoted words should be treated identically; it's easiest to just get +the punctuation out of the way. + + $ tr '[:upper:]' '[:lower:]' < whats.gnu | tr -cd '[:alnum:]_ \n' | ... + + The second `tr' command operates on the complement of the listed +characters, which are all the letters, the digits, the underscore, and +the blank. The `\n' represents the newline character; it has to be +left alone. (The ASCII tab character should also be included for good +measure in a production script.) + + At this point, we have data consisting of words separated by blank +space. The words only contain alphanumeric characters (and the +underscore). The next step is break the data apart so that we have one +word per line. This makes the counting operation much easier, as we +will see shortly. + + $ tr '[:upper:]' '[:lower:]' < whats.gnu | tr -cd '[:alnum:]_ \n' | + > tr -s ' ' '\n' | ... + + This command turns blanks into newlines. The `-s' option squeezes +multiple newline characters in the output into just one. This helps us +avoid blank lines. (The `>' is the shell's "secondary prompt." This +is what the shell prints when it notices you haven't finished typing in +all of a command.) + + We now have data consisting of one word per line, no punctuation, +all one case. We're ready to count each word: + + $ tr '[:upper:]' '[:lower:]' < whats.gnu | tr -cd '[:alnum:]_ \n' | + > tr -s ' ' '\n' | sort | uniq -c | ... + + At this point, the data might look something like this: + + 60 a + 2 able + 6 about + 1 above + 2 accomplish + 1 acquire + 1 actually + 2 additional + + The output is sorted by word, not by count! What we want is the most +frequently used words first. Fortunately, this is easy to accomplish, +with the help of two more `sort' options: + +`-n' + do a numeric sort, not a textual one + +`-r' + reverse the order of the sort + + The final pipeline looks like this: + + $ tr '[:upper:]' '[:lower:]' < whats.gnu | tr -cd '[:alnum:]_ \n' | + > tr -s ' ' '\n' | sort | uniq -c | sort -n -r + -| 156 the + -| 60 a + -| 58 to + -| 51 of + -| 51 and + ... + + Whew! That's a lot to digest. Yet, the same principles apply. +With six commands, on two lines (really one long one split for +convenience), we've created a program that does something interesting +and useful, in much less time than we could have written a C program to +do the same thing. + + A minor modification to the above pipeline can give us a simple +spelling checker! To determine if you've spelled a word correctly, all +you have to do is look it up in a dictionary. If it is not there, then +chances are that your spelling is incorrect. So, we need a dictionary. +The conventional location for a dictionary is `/usr/dict/words'. On my +GNU/Linux system,(1) this is a is a sorted, 45,402 word dictionary. + + Now, how to compare our file with the dictionary? As before, we +generate a sorted list of words, one per line: + + $ tr '[:upper:]' '[:lower:]' < whats.gnu | tr -cd '[:alnum:]_ \n' | + > tr -s ' ' '\n' | sort -u | ... + + Now, all we need is a list of words that are _not_ in the +dictionary. Here is where the `comm' command comes in. + + $ tr '[:upper:]' '[:lower:]' < whats.gnu | tr -cd '[:alnum:]_ \n' | + > tr -s ' ' '\n' | sort -u | + > comm -23 - /usr/dict/words + + The `-2' and `-3' options eliminate lines that are only in the +dictionary (the second file), and lines that are in both files. Lines +only in the first file (standard input, our stream of words), are words +that are not in the dictionary. These are likely candidates for +spelling errors. This pipeline was the first cut at a production +spelling checker on Unix. + + There are some other tools that deserve brief mention. + +`grep' + search files for text that matches a regular expression + +`wc' + count lines, words, characters + +`tee' + a T-fitting for data pipes, copies data to files and to standard + output + +`sed' + the stream editor, an advanced tool + +`awk' + a data manipulation language, another advanced tool + + The software tools philosophy also espoused the following bit of +advice: "Let someone else do the hard part." This means, take +something that gives you most of what you need, and then massage it the +rest of the way until it's in the form that you want. + + To summarize: + + 1. Each program should do one thing well. No more, no less. + + 2. Combining programs with appropriate plumbing leads to results where + the whole is greater than the sum of the parts. It also leads to + novel uses of programs that the authors might never have imagined. + + 3. Programs should never print extraneous header or trailer data, + since these could get sent on down a pipeline. (A point we didn't + mention earlier.) + + 4. Let someone else do the hard part. + + 5. Know your toolbox! Use each program appropriately. If you don't + have an appropriate tool, build one. + + As of this writing, all the programs we've discussed are available +via anonymous `ftp' from: +`ftp://gnudist.gnu.org/textutils/textutils-1.22.tar.gz'. (There may be +more recent versions available now.) + + None of what I have presented in this column is new. The Software +Tools philosophy was first introduced in the book `Software Tools', by +Brian Kernighan and P.J. Plauger (Addison-Wesley, ISBN 0-201-03669-X). +This book showed how to write and use software tools. It was written in +1976, using a preprocessor for FORTRAN named `ratfor' (RATional +FORtran). At the time, C was not as ubiquitous as it is now; FORTRAN +was. The last chapter presented a `ratfor' to FORTRAN processor, +written in `ratfor'. `ratfor' looks an awful lot like C; if you know +C, you won't have any problem following the code. + + In 1981, the book was updated and made available as `Software Tools +in Pascal' (Addison-Wesley, ISBN 0-201-10342-7). Both books are still +in print and are well worth reading if you're a programmer. They +certainly made a major change in how I view programming. + + The programs in both books are available from Brian Kernighan's home +page (http://cm.bell-labs.com/who/bwk). For a number of years, there +was an active Software Tools Users Group, whose members had ported the +original `ratfor' programs to essentially every computer system with a +FORTRAN compiler. The popularity of the group waned in the middle 1980s +as Unix began to spread beyond universities. + + With the current proliferation of GNU code and other clones of Unix +programs, these programs now receive little attention; modern C +versions are much more efficient and do more than these programs do. +Nevertheless, as exposition of good programming style, and evangelism +for a still-valuable philosophy, these books are unparalleled, and I +recommend them highly. + + Acknowledgment: I would like to express my gratitude to Brian +Kernighan of Bell Labs, the original Software Toolsmith, for reviewing +this column. + + ---------- Footnotes ---------- + + (1) Redhat Linux 6.1, for the November 2000 revision of this article. + + +File: coreutils.info, Node: GNU Free Documentation License, Next: Index, Prev: Opening the software toolbox, Up: Top + +Appendix A GNU Free Documentation License +***************************************** + + Version 1.1, March 2000 +* Menu: + +* How to use this License for your documents:: + + Copyright (C) 2000 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. + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + written document "free" in the sense of freedom: to assure everyone + the effective freedom to copy and redistribute it, with or without + modifying it, either commercially or noncommercially. Secondarily, + this License preserves for the author and publisher a way to get + credit for their work, while not being considered responsible for + modifications made by others. + + This License is a kind of "copyleft", which means that derivative + works of the document must themselves be free in the same sense. + It complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same freedoms + that the software does. But this License is not limited to + software manuals; it can be used for any textual work, regardless + of subject matter or whether it is published as a printed book. + We recommend this License principally for works whose purpose is + instruction or reference. + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work that contains a + notice placed by the copyright holder saying it can be distributed + under the terms of this License. The "Document", below, refers to + any such manual or work. Any member of the public is a licensee, + and is addressed as "you". + + A "Modified Version" of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A "Secondary Section" is a named appendix or a front-matter + section of the Document that deals exclusively with the + relationship of the publishers or authors of the Document to the + Document's overall subject (or to related matters) and contains + nothing that could fall directly within that overall subject. + (For example, if the Document is in part a textbook of + mathematics, a Secondary Section may not explain any mathematics.) + The relationship could be a matter of historical connection with + the subject or with related matters, or of legal, commercial, + philosophical, ethical or political position regarding them. + + The "Invariant Sections" are certain Secondary Sections whose + titles are designated, as being those of Invariant Sections, in + the notice that says that the Document is released under this + License. + + The "Cover Texts" are certain short passages of text that are + listed, as Front-Cover Texts or Back-Cover Texts, in the notice + that says that the Document is released under this License. + + A "Transparent" copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, whose contents can be viewed and edited directly + and straightforwardly with generic text editors or (for images + composed of pixels) generic paint programs or (for drawings) some + widely available drawing editor, and that is suitable for input to + text formatters or for automatic translation to a variety of + formats suitable for input to text formatters. A copy made in an + otherwise Transparent file format whose markup has been designed + to thwart or discourage subsequent modification by readers is not + Transparent. A copy that is not "Transparent" is called "Opaque". + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, + SGML or XML using a publicly available DTD, and + standard-conforming simple HTML designed for human modification. + Opaque formats include PostScript, PDF, proprietary formats that + can be read and edited only by proprietary word processors, SGML + or XML for which the DTD and/or processing tools are not generally + available, and the machine-generated HTML produced by some word + processors for output purposes only. + + The "Title Page" means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the + material this License requires to appear in the title page. For + works in formats which do not have any title page as such, "Title + Page" means the text near the most prominent appearance of the + work's title, preceding the beginning of the body of the text. + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that you + add no other conditions whatsoever to those of this License. You + may not use technical measures to obstruct or control the reading + or further copying of the copies you make or distribute. However, + you may accept compensation in exchange for copies. If you + distribute a large enough number of copies you must also follow + the conditions in section 3. + + You may also lend copies, under the same conditions stated above, + and you may publicly display copies. + + 3. COPYING IN QUANTITY + + If you publish printed copies of the Document numbering more than + 100, and the Document's license notice requires Cover Texts, you + must enclose the copies in covers that carry, clearly and legibly, + all these Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also clearly + and legibly identify you as the publisher of these copies. The + front cover must present the full title with all words of the + title equally prominent and visible. You may add other material + on the covers in addition. Copying with changes limited to the + covers, as long as they preserve the title of the Document and + satisfy these conditions, can be treated as verbatim copying in + other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a + machine-readable Transparent copy along with each Opaque copy, or + state in or with each Opaque copy a publicly-accessible + computer-network location containing a complete Transparent copy + of the Document, free of added material, which the general + network-using public has access to download anonymously at no + charge using public-standard network protocols. If you use the + latter option, you must take reasonably prudent steps, when you + begin distribution of Opaque copies in quantity, to ensure that + this Transparent copy will remain thus accessible at the stated + location until at least one year after the last time you + distribute an Opaque copy (directly or through your agents or + retailers) of that edition to the public. + + It is requested, but not required, that you contact the authors of + the Document well before redistributing any large number of + copies, to give them a chance to provide you with an updated + version of the Document. + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document + under the conditions of sections 2 and 3 above, provided that you + release the Modified Version under precisely this License, with + the Modified Version filling the role of the Document, thus + licensing distribution and modification of the Modified Version to + whoever possesses a copy of it. In addition, you must do these + things in the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title + distinct from that of the Document, and from those of previous + versions (which should, if there were any, be listed in the + History section of the Document). You may use the same title + as a previous version if the original publisher of that version + gives permission. + B. List on the Title Page, as authors, one or more persons or + entities responsible for authorship of the modifications in the + Modified Version, together with at least five of the principal + authors of the Document (all of its principal authors, if it + has less than five). + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license + notice giving the public permission to use the Modified Version + under the terms of this License, in the form shown in the + Addendum below. + G. Preserve in that license notice the full lists of Invariant + Sections and required Cover Texts given in the Document's + license notice. + H. Include an unaltered copy of this License. + I. Preserve the section entitled "History", and its title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. + If there is no section entitled "History" in the Document, + create one stating the title, year, authors, and publisher of + the Document as given on its Title Page, then add an item + describing the Modified Version as stated in the previous + sentence. + J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for + previous versions it was based on. These may be placed in the + "History" section. You may omit a network location for a work + that was published at least four years before the Document + itself, or if the original publisher of the version it refers + to gives permission. + K. In any section entitled "Acknowledgements" or "Dedications", + preserve the section's title, and preserve in the section all the + substance and tone of each of the contributor acknowledgements + and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. + M. Delete any section entitled "Endorsements". Such a section + may not be included in the Modified Version. + N. Do not retitle any existing section as "Endorsements" or to + conflict in title with any Invariant Section. + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option + designate some or all of these sections as invariant. To do this, + add their titles to the list of Invariant Sections in the Modified + Version's license notice. These titles must be distinct from any + other section titles. + + You may add a section entitled "Endorsements", provided it contains + nothing but endorsements of your Modified Version by various + parties-for example, statements of peer review or that the text has + been approved by an organization as the authoritative definition + of a standard. + + You may add a passage of up to five words as a Front-Cover Text, + and a passage of up to 25 words as a Back-Cover Text, to the end + of the list of Cover Texts in the Modified Version. Only one + passage of Front-Cover Text and one of Back-Cover Text may be + added by (or through arrangements made by) any one entity. If the + Document already includes a cover text for the same cover, + previously added by you or by arrangement made by the same entity + you are acting on behalf of, you may not add another; but you may + replace the old one, on explicit permission from the previous + publisher that added the old one. + + The author(s) and publisher(s) of the Document do not by this + License give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version. + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under + this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination + all of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name + but different contents, make the title of each such section unique + by adding at the end of it, in parentheses, the name of the + original author or publisher of that section if known, or else a + unique number. Make the same adjustment to the section titles in + the list of Invariant Sections in the license notice of the + combined work. + + In the combination, you must combine any sections entitled + "History" in the various original documents, forming one section + entitled "History"; likewise combine any sections entitled + "Acknowledgements", and any sections entitled "Dedications". You + must delete all sections entitled "Endorsements." + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the + documents in all other respects. + + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert + a copy of this License into the extracted document, and follow + this License in all other respects regarding verbatim copying of + that document. + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of + a storage or distribution medium, does not as a whole count as a + Modified Version of the Document, provided no compilation + copyright is claimed for the compilation. Such a compilation is + called an "aggregate", and this License does not apply to the + other self-contained works thus compiled with the Document, on + account of their being thus compiled, if they are not themselves + derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one + quarter of the entire aggregate, the Document's Cover Texts may be + placed on covers that surround only the Document within the + aggregate. Otherwise they must appear on covers around the whole + aggregate. + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License provided that you also include the + original English version of this License. In case of a + disagreement between the translation and the original English + version of this License, the original English version will prevail. + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided for under this License. Any other + attempt to copy, modify, sublicense or distribute the Document 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. + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions of + the GNU Free Documentation 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. See + http://www.gnu.org/copyleft/. + + Each version of the License is given a distinguishing version + number. If the Document specifies that a particular numbered + version of this License "or any later version" applies to it, you + have the option of following the terms and conditions either of + that specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If + the Document does not specify a version number of this License, + you may choose any version ever published (not as a draft) by the + Free Software Foundation. + + + +File: coreutils.info, Node: How to use this License for your documents, Up: GNU Free Documentation License + +ADDENDUM: How to use this License for your documents +==================================================== + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + A copy of the license is included in the section entitled ``GNU + Free Documentation License''. +If you have no Invariant Sections, write "with no Invariant +Sections" instead of saying which ones are invariant. If you have no +Front-Cover Texts, write "no Front-Cover Texts" instead of "Front-Cover +Texts being LIST"; likewise for Back-Cover Texts. + + If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, to +permit their use in free software. + + +File: coreutils.info, Node: Index, Prev: GNU Free Documentation License, Up: Top + +Index +***** + + +* Menu: + +* !: Connectives for test. + (line 9) +* !=: String tests. (line 25) +* %: Numeric expressions. (line 15) +* %b: printf invocation. (line 32) +* &: Relations for expr. (line 17) +* *: Numeric expressions. (line 15) +* + <1>: Numeric expressions. (line 11) +* +: String expressions. (line 53) +* +PAGE_RANGE: pr invocation. (line 60) +* - <1>: su invocation. (line 53) +* - <2>: env invocation. (line 45) +* -: Numeric expressions. (line 11) +* - and Unix rm: rm invocation. (line 77) +* -, removing files beginning with: rm invocation. (line 65) +* --: Common options. (line 36) +* --across: pr invocation. (line 84) +* --address-radix: od invocation. (line 36) +* --adjustment: nice invocation. (line 34) +* --all <1>: uname invocation. (line 30) +* --all <2>: who invocation. (line 36) +* --all <3>: stty invocation. (line 26) +* --all <4>: du invocation. (line 21) +* --all <5>: df invocation. (line 32) +* --all <6>: Which files are listed. + (line 13) +* --all: unexpand invocation. (line 38) +* --all-repeated: uniq invocation. (line 67) +* --almost-all: Which files are listed. + (line 17) +* --apparent-size: du invocation. (line 24) +* --append: tee invocation. (line 25) +* --archive: cp invocation. (line 54) +* --author: What information is listed. + (line 10) +* --backup <1>: ln invocation. (line 55) +* --backup <2>: mv invocation. (line 50) +* --backup <3>: install invocation. (line 36) +* --backup <4>: cp invocation. (line 61) +* --backup: Backup options. (line 13) +* --before: tac invocation. (line 21) +* --binary <1>: md5sum invocation. (line 24) +* --binary: cat invocation. (line 20) +* --block-size <1>: du invocation. (line 45) +* --block-size <2>: df invocation. (line 40) +* --block-size: Block size. (line 138) +* --block-size=SIZE: Block size. (line 12) +* --body-numbering: nl invocation. (line 47) +* --boot: who invocation. (line 40) +* --bourne-shell: dircolors invocation. + (line 27) +* --buffer-size: sort invocation. (line 191) +* --bytes <1>: du invocation. (line 41) +* --bytes <2>: cut invocation. (line 26) +* --bytes <3>: wc invocation. (line 41) +* --bytes <4>: split invocation. (line 38) +* --bytes <5>: tail invocation. (line 36) +* --bytes <6>: head invocation. (line 24) +* --bytes: fold invocation. (line 23) +* --c-shell: dircolors invocation. + (line 33) +* --canonicalize: readlink invocation. (line 29) +* --canonicalize-existing: readlink invocation. (line 35) +* --canonicalize-missing: readlink invocation. (line 41) +* --changes <1>: chmod invocation. (line 28) +* --changes <2>: chgrp invocation. (line 17) +* --changes: chown invocation. (line 66) +* --characters: cut invocation. (line 34) +* --chars: wc invocation. (line 45) +* --check: sort invocation. (line 17) +* --check-chars: uniq invocation. (line 101) +* --classify: General output formatting. + (line 36) +* --color: General output formatting. + (line 21) +* --columns: pr invocation. (line 70) +* --command: su invocation. (line 39) +* --complement: cut invocation. (line 71) +* --count <1>: who invocation. (line 60) +* --count: uniq invocation. (line 53) +* --count-links: du invocation. (line 91) +* --crown-margin: fmt invocation. (line 34) +* --csh: dircolors invocation. + (line 33) +* --date <1>: Options for date. (line 11) +* --date: touch invocation. (line 62) +* --dead: who invocation. (line 44) +* --delimiter: cut invocation. (line 51) +* --delimiters: paste invocation. (line 43) +* --dereference <1>: stat invocation. (line 22) +* --dereference <2>: du invocation. (line 96) +* --dereference <3>: chgrp invocation. (line 27) +* --dereference <4>: chown invocation. (line 99) +* --dereference <5>: cp invocation. (line 121) +* --dereference: Which files are listed. + (line 77) +* --dereference-args: du invocation. (line 56) +* --dereference-command-line: Which files are listed. + (line 36) +* --dereference-command-line-symlink-to-dir: Which files are listed. + (line 41) +* --dictionary-order: sort invocation. (line 75) +* --digits: csplit invocation. (line 80) +* --directory <1>: ln invocation. (line 61) +* --directory <2>: rm invocation. (line 25) +* --directory <3>: install invocation. (line 44) +* --directory: Which files are listed. + (line 28) +* --dired: What information is listed. + (line 16) +* --double-space: pr invocation. (line 96) +* --elide-empty-files: csplit invocation. (line 89) +* --escape: Formatting the file names. + (line 11) +* --exact: shred invocation. (line 119) +* --exclude-from=FILE: du invocation. (line 144) +* --exclude-type: df invocation. (line 134) +* --exclude=PATTERN: du invocation. (line 138) +* --expand-tabs: pr invocation. (line 120) +* --fast: su invocation. (line 44) +* --field-separator: sort invocation. (line 207) +* --fields: cut invocation. (line 44) +* --file <1>: Options for date. (line 22) +* --file: stty invocation. (line 31) +* --file-system: stat invocation. (line 17) +* --file-type: General output formatting. + (line 73) +* --files0-from=FILE: du invocation. (line 62) +* --first-line-number: pr invocation. (line 198) +* --follow: tail invocation. (line 41) +* --footer-numbering: nl invocation. (line 75) +* --force <1>: ln invocation. (line 67) +* --force <2>: shred invocation. (line 91) +* --force <3>: rm invocation. (line 37) +* --force <4>: mv invocation. (line 55) +* --force: cp invocation. (line 96) +* --form-feed: pr invocation. (line 128) +* --format <1>: General output formatting. + (line 10) +* --format <2>: What information is listed. + (line 130) +* --format: od invocation. (line 76) +* --format=FORMAT <1>: seq invocation. (line 24) +* --format=FORMAT: stat invocation. (line 33) +* --from: chown invocation. (line 76) +* --full-time: What information is listed. + (line 100) +* --general-numeric-sort: sort invocation. (line 87) +* --group <1>: id invocation. (line 23) +* --group: install invocation. (line 53) +* --groups: id invocation. (line 27) +* --hardware-platform: uname invocation. (line 34) +* --header: pr invocation. (line 134) +* --header-numbering: nl invocation. (line 79) +* --heading: who invocation. (line 48) +* --help: Common options. (line 29) +* --hide-control-chars: Formatting the file names. + (line 23) +* --hide=PATTERN: Which files are listed. + (line 50) +* --human-readable <1>: du invocation. (line 75) +* --human-readable <2>: df invocation. (line 45) +* --human-readable <3>: What information is listed. + (line 116) +* --human-readable: Block size. (line 138) +* --idle: who invocation. (line 52) +* --ignore-backups: Which files are listed. + (line 23) +* --ignore-case <1>: join invocation. (line 57) +* --ignore-case <2>: uniq invocation. (line 57) +* --ignore-case: sort invocation. (line 81) +* --ignore-environment: env invocation. (line 45) +* --ignore-fail-on-non-empty: rmdir invocation. (line 17) +* --ignore-interrupts: tee invocation. (line 30) +* --ignore-leading-blanks: sort invocation. (line 70) +* --ignore-nonprinting: sort invocation. (line 114) +* --ignore=PATTERN: Which files are listed. + (line 63) +* --indent: pr invocation. (line 204) +* --indicator-style: General output formatting. + (line 36) +* --initial: expand invocation. (line 35) +* --inode: What information is listed. + (line 122) +* --inodes: df invocation. (line 54) +* --interactive <1>: ln invocation. (line 71) +* --interactive <2>: rm invocation. (line 42) +* --interactive <3>: mv invocation. (line 59) +* --interactive: cp invocation. (line 113) +* --iso-8601[=TIMESPEC]: Options for date. (line 30) +* --iterations=NUMBER: shred invocation. (line 96) +* --join-blank-lines: nl invocation. (line 87) +* --join-lines: pr invocation. (line 147) +* --keep-files: csplit invocation. (line 85) +* --kernel-name: uname invocation. (line 61) +* --kernel-release: uname invocation. (line 57) +* --kernel-version: uname invocation. (line 72) +* --key: sort invocation. (line 163) +* --length: pr invocation. (line 156) +* --line-bytes: split invocation. (line 44) +* --lines <1>: wc invocation. (line 53) +* --lines <2>: split invocation. (line 30) +* --lines <3>: tail invocation. (line 129) +* --lines: head invocation. (line 30) +* --link: cp invocation. (line 117) +* --literal: Formatting the file names. + (line 17) +* --local: df invocation. (line 65) +* --login <1>: su invocation. (line 53) +* --login: who invocation. (line 75) +* --lookup: who invocation. (line 80) +* --machine: uname invocation. (line 39) +* --max-depth=DEPTH: du invocation. (line 106) +* --max-line-length: wc invocation. (line 57) +* --max-unchanged-stats: tail invocation. (line 117) +* --merge <1>: sort invocation. (line 23) +* --merge: pr invocation. (line 164) +* --mesg: who invocation. (line 93) +* --message: who invocation. (line 93) +* --mode <1>: mknod invocation. (line 43) +* --mode <2>: mkfifo invocation. (line 21) +* --mode <3>: mkdir invocation. (line 24) +* --mode: install invocation. (line 59) +* --month-sort: sort invocation. (line 120) +* --name: id invocation. (line 31) +* --no-create: touch invocation. (line 58) +* --no-dereference <1>: du invocation. (line 102) +* --no-dereference <2>: chgrp invocation. (line 32) +* --no-dereference <3>: chown invocation. (line 104) +* --no-dereference <4>: ln invocation. (line 75) +* --no-dereference: cp invocation. (line 125) +* --no-file-warnings: pr invocation. (line 211) +* --no-group: What information is listed. + (line 110) +* --no-newline: readlink invocation. (line 46) +* --no-preserve-root <1>: chmod invocation. (line 43) +* --no-preserve-root <2>: chgrp invocation. (line 45) +* --no-preserve-root <3>: chown invocation. (line 117) +* --no-preserve-root: rm invocation. (line 52) +* --no-renumber: nl invocation. (line 108) +* --no-sync: df invocation. (line 69) +* --no-target-directory <1>: ln invocation. (line 109) +* --no-target-directory <2>: mv invocation. (line 99) +* --no-target-directory <3>: install invocation. (line 97) +* --no-target-directory <4>: cp invocation. (line 260) +* --no-target-directory: Target directory. (line 15) +* --nodename: uname invocation. (line 44) +* --null: du invocation. (line 112) +* --number: cat invocation. (line 52) +* --number-format: nl invocation. (line 95) +* --number-lines: pr invocation. (line 177) +* --number-nonblank: cat invocation. (line 37) +* --number-separator: nl invocation. (line 112) +* --number-width: nl invocation. (line 122) +* --numeric-sort: sort invocation. (line 128) +* --numeric-suffixes: split invocation. (line 52) +* --numeric-uid-gid: What information is listed. + (line 179) +* --omit-header: pr invocation. (line 240) +* --omit-pagination: pr invocation. (line 251) +* --one-file-system <1>: du invocation. (line 134) +* --one-file-system: cp invocation. (line 285) +* --only-delimited: cut invocation. (line 59) +* --operating-system: uname invocation. (line 53) +* --output: sort invocation. (line 171) +* --output-delimiter: cut invocation. (line 64) +* --output-duplicates: od invocation. (line 145) +* --output-tabs: pr invocation. (line 140) +* --owner: install invocation. (line 68) +* --page-increment: nl invocation. (line 83) +* --page_width: pr invocation. (line 269) +* --pages=PAGE_RANGE: pr invocation. (line 60) +* --parents <1>: rmdir invocation. (line 22) +* --parents <2>: mkdir invocation. (line 31) +* --parents: cp invocation. (line 167) +* --pid: tail invocation. (line 97) +* --portability <1>: pathchk invocation. (line 30) +* --portability: df invocation. (line 76) +* --prefix: csplit invocation. (line 62) +* --preserve: cp invocation. (line 130) +* --preserve-environment: su invocation. (line 64) +* --preserve-root <1>: chmod invocation. (line 38) +* --preserve-root <2>: chgrp invocation. (line 40) +* --preserve-root <3>: chown invocation. (line 112) +* --preserve-root: rm invocation. (line 47) +* --preserve-timestamps: install invocation. (line 74) +* --print-database: dircolors invocation. + (line 38) +* --print-type: df invocation. (line 109) +* --processor: uname invocation. (line 48) +* --quiet <1>: tty invocation. (line 18) +* --quiet <2>: chmod invocation. (line 34) +* --quiet <3>: chgrp invocation. (line 23) +* --quiet <4>: chown invocation. (line 72) +* --quiet <5>: readlink invocation. (line 52) +* --quiet <6>: csplit invocation. (line 100) +* --quiet <7>: tail invocation. (line 134) +* --quiet: head invocation. (line 36) +* --quote-name: Formatting the file names. + (line 30) +* --quoting-style: Formatting the file names. + (line 11) +* --read-bytes: od invocation. (line 63) +* --real: id invocation. (line 36) +* --recursive <1>: chmod invocation. (line 58) +* --recursive <2>: chgrp invocation. (line 63) +* --recursive <3>: chown invocation. (line 136) +* --recursive <4>: rm invocation. (line 58) +* --recursive <5>: cp invocation. (line 189) +* --recursive: Which files are listed. + (line 84) +* --reference <1>: Options for date. (line 74) +* --reference <2>: touch invocation. (line 81) +* --reference <3>: chmod invocation. (line 51) +* --reference <4>: chgrp invocation. (line 49) +* --reference: chown invocation. (line 121) +* --regex: tac invocation. (line 26) +* --remove: shred invocation. (line 109) +* --remove-destination: cp invocation. (line 201) +* --repeated: uniq invocation. (line 61) +* --reply <1>: mv invocation. (line 64) +* --reply: cp invocation. (line 178) +* --retry: tail invocation. (line 83) +* --reverse <1>: Sorting the output. (line 28) +* --reverse: sort invocation. (line 155) +* --rfc-2822: Options for date. (line 61) +* --rfc-822: Options for date. (line 61) +* --save: stty invocation. (line 41) +* --section-delimiter: nl invocation. (line 68) +* --sep-string: pr invocation. (line 225) +* --separate-dirs: du invocation. (line 129) +* --separator <1>: pr invocation. (line 216) +* --separator: tac invocation. (line 33) +* --serial: paste invocation. (line 34) +* --set: Options for date. (line 79) +* --sh: dircolors invocation. + (line 27) +* --shell: su invocation. (line 75) +* --show-all: cat invocation. (line 16) +* --show-control-chars <1>: Formatting the file names. + (line 77) +* --show-control-chars: pr invocation. (line 90) +* --show-ends: cat invocation. (line 46) +* --show-nonprinting <1>: pr invocation. (line 256) +* --show-nonprinting: cat invocation. (line 74) +* --show-tabs: cat invocation. (line 67) +* --si <1>: du invocation. (line 118) +* --si <2>: df invocation. (line 89) +* --si <3>: What information is listed. + (line 205) +* --si: Block size. (line 138) +* --silent <1>: tty invocation. (line 18) +* --silent <2>: chmod invocation. (line 34) +* --silent <3>: chgrp invocation. (line 23) +* --silent <4>: chown invocation. (line 72) +* --silent <5>: readlink invocation. (line 52) +* --silent <6>: csplit invocation. (line 100) +* --silent <7>: tail invocation. (line 134) +* --silent: head invocation. (line 36) +* --size: What information is listed. + (line 189) +* --size=BYTES: shred invocation. (line 103) +* --skip-bytes: od invocation. (line 55) +* --skip-chars: uniq invocation. (line 42) +* --skip-fields: uniq invocation. (line 31) +* --sleep-interval: tail invocation. (line 89) +* --sort: Sorting the output. (line 33) +* --spaces: fold invocation. (line 29) +* --sparse=WHEN: cp invocation. (line 205) +* --split-only: fmt invocation. (line 47) +* --squeeze-blank: cat invocation. (line 58) +* --stable: sort invocation. (line 185) +* --starting-line-number: nl invocation. (line 117) +* --status: md5sum invocation. (line 53) +* --strings: od invocation. (line 68) +* --strip: install invocation. (line 84) +* --strip-trailing-slashes <1>: mv invocation. (line 85) +* --strip-trailing-slashes: cp invocation. (line 238) +* --suffix <1>: ln invocation. (line 100) +* --suffix <2>: mv invocation. (line 90) +* --suffix <3>: install invocation. (line 88) +* --suffix <4>: cp invocation. (line 251) +* --suffix <5>: csplit invocation. (line 66) +* --suffix: Backup options. (line 50) +* --suffix-length: split invocation. (line 26) +* --summarize: du invocation. (line 125) +* --symbolic: ln invocation. (line 94) +* --symbolic-link: cp invocation. (line 243) +* --sync: df invocation. (line 96) +* --sysv: sum invocation. (line 31) +* --tabs <1>: unexpand invocation. (line 24) +* --tabs: expand invocation. (line 22) +* --tabsize: General output formatting. + (line 83) +* --tagged-paragraph: fmt invocation. (line 40) +* --target-directory <1>: ln invocation. (line 105) +* --target-directory <2>: mv invocation. (line 95) +* --target-directory <3>: install invocation. (line 93) +* --target-directory <4>: cp invocation. (line 256) +* --target-directory: Target directory. (line 31) +* --temporary-directory: sort invocation. (line 224) +* --terse: stat invocation. (line 28) +* --text: md5sum invocation. (line 63) +* --time <1>: touch invocation. (line 54) +* --time: Sorting the output. (line 14) +* --time-style: Formatting file timestamps. + (line 26) +* --total: du invocation. (line 50) +* --traditional: od invocation. (line 199) +* --type: df invocation. (line 103) +* --uniform-spacing: fmt invocation. (line 53) +* --unique <1>: uniq invocation. (line 96) +* --unique: sort invocation. (line 233) +* --universal: Options for date. (line 84) +* --unset: env invocation. (line 39) +* --update <1>: mv invocation. (line 72) +* --update: cp invocation. (line 265) +* --user: id invocation. (line 41) +* --utc: Options for date. (line 84) +* --verbose <1>: chmod invocation. (line 48) +* --verbose <2>: chgrp invocation. (line 55) +* --verbose <3>: chown invocation. (line 128) +* --verbose <4>: rmdir invocation. (line 32) +* --verbose <5>: readlink invocation. (line 56) +* --verbose <6>: mkdir invocation. (line 38) +* --verbose <7>: ln invocation. (line 114) +* --verbose <8>: shred invocation. (line 115) +* --verbose <9>: rm invocation. (line 62) +* --verbose <10>: mv invocation. (line 82) +* --verbose <11>: install invocation. (line 102) +* --verbose <12>: cp invocation. (line 275) +* --verbose <13>: split invocation. (line 55) +* --verbose <14>: tail invocation. (line 138) +* --verbose: head invocation. (line 40) +* --version: Common options. (line 33) +* --version-control <1>: ln invocation. (line 118) +* --version-control <2>: mv invocation. (line 104) +* --version-control <3>: install invocation. (line 106) +* --version-control <4>: cp invocation. (line 279) +* --version-control: Backup options. (line 56) +* --warn: md5sum invocation. (line 68) +* --width <1>: General output formatting. + (line 89) +* --width <2>: fold invocation. (line 35) +* --width <3>: pr invocation. (line 260) +* --width <4>: fmt invocation. (line 59) +* --width: od invocation. (line 152) +* --words: wc invocation. (line 49) +* --writable: who invocation. (line 93) +* --zero: shred invocation. (line 129) +* --zero-terminated: sort invocation. (line 247) +* -0: du invocation. (line 111) +* -1 <1>: General output formatting. + (line 10) +* -1 <2>: join invocation. (line 62) +* -1: comm invocation. (line 23) +* -2 <1>: join invocation. (line 65) +* -2: comm invocation. (line 23) +* -3: comm invocation. (line 23) +* -a <1>: uname invocation. (line 30) +* -a <2>: who invocation. (line 36) +* -a <3>: stty invocation. (line 26) +* -a <4>: tee invocation. (line 25) +* -a <5>: Connectives for test. + (line 12) +* -a <6>: du invocation. (line 21) +* -a <7>: df invocation. (line 32) +* -a <8>: touch invocation. (line 54) +* -a: cp invocation. (line 54) +* -A: Which files are listed. + (line 17) +* -a <1>: Which files are listed. + (line 13) +* -a <2>: unexpand invocation. (line 38) +* -a <3>: join invocation. (line 48) +* -a <4>: split invocation. (line 26) +* -a <5>: pr invocation. (line 84) +* -a: od invocation. (line 168) +* -A <1>: od invocation. (line 36) +* -A: cat invocation. (line 16) +* -b <1>: who invocation. (line 40) +* -b: File type tests. (line 10) +* -B: du invocation. (line 45) +* -b: du invocation. (line 41) +* -B: df invocation. (line 40) +* -b <1>: ln invocation. (line 55) +* -b <2>: mv invocation. (line 50) +* -b <3>: install invocation. (line 36) +* -b <4>: cp invocation. (line 61) +* -b <5>: dircolors invocation. + (line 27) +* -b: Formatting the file names. + (line 11) +* -B: Which files are listed. + (line 23) +* -b <1>: cut invocation. (line 26) +* -b <2>: sort invocation. (line 70) +* -b <3>: md5sum invocation. (line 24) +* -b <4>: csplit invocation. (line 66) +* -b <5>: split invocation. (line 38) +* -b <6>: fold invocation. (line 23) +* -b <7>: od invocation. (line 171) +* -b <8>: nl invocation. (line 47) +* -b <9>: tac invocation. (line 21) +* -b: cat invocation. (line 37) +* -B: cat invocation. (line 20) +* -b: Backup options. (line 13) +* -c <1>: su invocation. (line 39) +* -c <2>: File type tests. (line 13) +* -c <3>: stat invocation. (line 33) +* -c <4>: du invocation. (line 50) +* -c <5>: touch invocation. (line 58) +* -c <6>: chmod invocation. (line 28) +* -c <7>: chgrp invocation. (line 17) +* -c <8>: chown invocation. (line 66) +* -c <9>: install invocation. (line 40) +* -c: dircolors invocation. + (line 33) +* -C: General output formatting. + (line 15) +* -c <1>: Sorting the output. (line 14) +* -c <2>: cut invocation. (line 34) +* -c <3>: uniq invocation. (line 53) +* -c <4>: sort invocation. (line 17) +* -c: wc invocation. (line 41) +* -C: split invocation. (line 44) +* -c <1>: tail invocation. (line 36) +* -c <2>: head invocation. (line 24) +* -c <3>: pr invocation. (line 90) +* -c <4>: fmt invocation. (line 34) +* -c: od invocation. (line 174) +* -COLUMN: pr invocation. (line 70) +* -d <1>: Options for date. (line 11) +* -d <2>: who invocation. (line 44) +* -d: File type tests. (line 16) +* -D: du invocation. (line 56) +* -d <1>: touch invocation. (line 62) +* -d <2>: ln invocation. (line 61) +* -d <3>: rm invocation. (line 25) +* -d <4>: install invocation. (line 44) +* -d: cp invocation. (line 89) +* -D: What information is listed. + (line 16) +* -d <1>: Which files are listed. + (line 28) +* -d <2>: paste invocation. (line 43) +* -d: cut invocation. (line 51) +* -D: uniq invocation. (line 67) +* -d <1>: uniq invocation. (line 61) +* -d <2>: sort invocation. (line 75) +* -d <3>: split invocation. (line 52) +* -d <4>: pr invocation. (line 96) +* -d <5>: od invocation. (line 178) +* -d: nl invocation. (line 68) +* -e: File characteristic tests. + (line 9) +* -E: echo invocation. (line 63) +* -e <1>: echo invocation. (line 20) +* -e <2>: readlink invocation. (line 35) +* -e <3>: join invocation. (line 52) +* -e: pr invocation. (line 120) +* -E: cat invocation. (line 46) +* -e: cat invocation. (line 42) +* -ef: File characteristic tests. + (line 23) +* -eq: Numeric tests. (line 16) +* -f <1>: su invocation. (line 44) +* -f: Options for date. (line 22) +* -F: stty invocation. (line 31) +* -f <1>: File type tests. (line 19) +* -f <2>: stat invocation. (line 17) +* -f <3>: touch invocation. (line 72) +* -f <4>: chmod invocation. (line 34) +* -f <5>: chgrp invocation. (line 23) +* -f <6>: chown invocation. (line 72) +* -f <7>: readlink invocation. (line 29) +* -f: ln invocation. (line 67) +* -F: ln invocation. (line 61) +* -f <1>: shred invocation. (line 91) +* -f <2>: rm invocation. (line 37) +* -f <3>: mv invocation. (line 55) +* -f: cp invocation. (line 96) +* -F: General output formatting. + (line 36) +* -f <1>: Sorting the output. (line 21) +* -f <2>: cut invocation. (line 44) +* -f <3>: uniq invocation. (line 31) +* -f <4>: sort invocation. (line 81) +* -f: csplit invocation. (line 62) +* -F: tail invocation. (line 78) +* -f <1>: tail invocation. (line 41) +* -f: pr invocation. (line 128) +* -F: pr invocation. (line 128) +* -f <1>: od invocation. (line 181) +* -f: nl invocation. (line 75) +* -f FORMAT: seq invocation. (line 24) +* -G: id invocation. (line 27) +* -g <1>: id invocation. (line 23) +* -g: stty invocation. (line 41) +* -G: Access permission tests. + (line 31) +* -g <1>: Access permission tests. + (line 9) +* -g: install invocation. (line 53) +* -G: What information is listed. + (line 110) +* -g <1>: What information is listed. + (line 105) +* -g: sort invocation. (line 87) +* -ge: Numeric tests. (line 16) +* -gt: Numeric tests. (line 16) +* -H: who invocation. (line 48) +* -h: File type tests. (line 23) +* -H: du invocation. (line 80) +* -h: du invocation. (line 75) +* -H: df invocation. (line 50) +* -h: df invocation. (line 45) +* -H: chgrp invocation. (line 67) +* -h: chgrp invocation. (line 32) +* -H: chown invocation. (line 139) +* -h: chown invocation. (line 104) +* -H: cp invocation. (line 106) +* -h: What information is listed. + (line 116) +* -H: Which files are listed. + (line 36) +* -h <1>: pr invocation. (line 134) +* -h: nl invocation. (line 79) +* -H: Traversing symlinks. (line 18) +* -h: Block size. (line 138) +* -i <1>: env invocation. (line 45) +* -i <2>: uname invocation. (line 34) +* -i <3>: who invocation. (line 52) +* -i <4>: tee invocation. (line 30) +* -i <5>: df invocation. (line 54) +* -i <6>: ln invocation. (line 71) +* -i <7>: rm invocation. (line 42) +* -i <8>: mv invocation. (line 59) +* -i <9>: cp invocation. (line 113) +* -i: What information is listed. + (line 122) +* -I: Which files are listed. + (line 63) +* -i <1>: expand invocation. (line 35) +* -i <2>: join invocation. (line 57) +* -i <3>: uniq invocation. (line 57) +* -i <4>: sort invocation. (line 114) +* -i <5>: pr invocation. (line 140) +* -i <6>: od invocation. (line 184) +* -i: nl invocation. (line 83) +* -I TIMESPEC: Options for date. (line 30) +* -J: pr invocation. (line 147) +* -j: od invocation. (line 55) +* -k <1>: Access permission tests. + (line 12) +* -k <2>: du invocation. (line 85) +* -k <3>: df invocation. (line 59) +* -k <4>: General output formatting. + (line 61) +* -k <5>: sort invocation. (line 163) +* -k <6>: csplit invocation. (line 85) +* -k: Block size. (line 138) +* -l <1>: su invocation. (line 53) +* -l: who invocation. (line 75) +* -L <1>: File type tests. (line 23) +* -L <2>: stat invocation. (line 22) +* -L: du invocation. (line 96) +* -l <1>: du invocation. (line 91) +* -l: df invocation. (line 65) +* -L <1>: chgrp invocation. (line 72) +* -L <2>: chown invocation. (line 144) +* -L: cp invocation. (line 121) +* -l <1>: cp invocation. (line 117) +* -l: What information is listed. + (line 130) +* -L <1>: Which files are listed. + (line 77) +* -L: wc invocation. (line 57) +* -l <1>: wc invocation. (line 53) +* -l <2>: split invocation. (line 30) +* -l <3>: pr invocation. (line 156) +* -l <4>: od invocation. (line 187) +* -l: nl invocation. (line 87) +* -L: Traversing symlinks. (line 22) +* -le: Numeric tests. (line 16) +* -lt: Numeric tests. (line 16) +* -m <1>: su invocation. (line 64) +* -m <2>: uname invocation. (line 39) +* -m <3>: who invocation. (line 56) +* -m <4>: touch invocation. (line 77) +* -m <5>: readlink invocation. (line 41) +* -m <6>: mknod invocation. (line 43) +* -m <7>: mkfifo invocation. (line 21) +* -m <8>: mkdir invocation. (line 24) +* -m <9>: install invocation. (line 59) +* -m: General output formatting. + (line 67) +* -M: sort invocation. (line 120) +* -m <1>: sort invocation. (line 23) +* -m <2>: wc invocation. (line 45) +* -m: pr invocation. (line 164) +* -n <1>: nice invocation. (line 34) +* -n <2>: uname invocation. (line 44) +* -n <3>: id invocation. (line 31) +* -n <4>: String tests. (line 19) +* -n <5>: echo invocation. (line 17) +* -n <6>: readlink invocation. (line 46) +* -n: ln invocation. (line 75) +* -N: Formatting the file names. + (line 17) +* -n <1>: What information is listed. + (line 179) +* -n <2>: cut invocation. (line 55) +* -n <3>: sort invocation. (line 128) +* -n <4>: csplit invocation. (line 80) +* -n <5>: tail invocation. (line 129) +* -n: head invocation. (line 30) +* -N: pr invocation. (line 198) +* -n: pr invocation. (line 177) +* -N: od invocation. (line 63) +* -n <1>: nl invocation. (line 95) +* -n: cat invocation. (line 52) +* -n NUMBER: shred invocation. (line 96) +* -ne: Numeric tests. (line 16) +* -nt: File characteristic tests. + (line 15) +* -o <1>: uname invocation. (line 53) +* -o: Connectives for test. + (line 15) +* -O: Access permission tests. + (line 28) +* -o <1>: install invocation. (line 68) +* -o <2>: What information is listed. + (line 183) +* -o <3>: sort invocation. (line 171) +* -o <4>: pr invocation. (line 204) +* -o: od invocation. (line 190) +* -ot: File characteristic tests. + (line 19) +* -p <1>: su invocation. (line 64) +* -p <2>: uname invocation. (line 48) +* -p <3>: pathchk invocation. (line 30) +* -p: File type tests. (line 28) +* -P <1>: du invocation. (line 102) +* -P <2>: df invocation. (line 76) +* -P <3>: chgrp invocation. (line 76) +* -P: chown invocation. (line 148) +* -p <1>: rmdir invocation. (line 22) +* -p <2>: mkdir invocation. (line 31) +* -p <3>: install invocation. (line 74) +* -p: cp invocation. (line 130) +* -P: cp invocation. (line 125) +* -p <1>: dircolors invocation. + (line 38) +* -p: nl invocation. (line 108) +* -P: Traversing symlinks. (line 26) +* -q <1>: who invocation. (line 60) +* -q: readlink invocation. (line 52) +* -Q: Formatting the file names. + (line 30) +* -q <1>: Formatting the file names. + (line 23) +* -q <2>: csplit invocation. (line 100) +* -q <3>: tail invocation. (line 134) +* -q: head invocation. (line 36) +* -r <1>: uname invocation. (line 57) +* -r: Options for date. (line 74) +* -R: Options for date. (line 61) +* -r <1>: id invocation. (line 36) +* -r <2>: Access permission tests. + (line 15) +* -r: touch invocation. (line 81) +* -R <1>: chmod invocation. (line 58) +* -R <2>: chgrp invocation. (line 63) +* -R <3>: chown invocation. (line 136) +* -R: rm invocation. (line 58) +* -r <1>: rm invocation. (line 58) +* -r: cp invocation. (line 189) +* -R: cp invocation. (line 189) +* -r: Sorting the output. (line 28) +* -R: Which files are listed. + (line 84) +* -r <1>: sort invocation. (line 155) +* -r <2>: sum invocation. (line 25) +* -r <3>: pr invocation. (line 211) +* -r: tac invocation. (line 26) +* -s <1>: su invocation. (line 75) +* -s <2>: uname invocation. (line 61) +* -s <3>: Options for date. (line 79) +* -s <4>: who invocation. (line 64) +* -s <5>: tty invocation. (line 18) +* -s: File characteristic tests. + (line 12) +* -S <1>: File type tests. (line 31) +* -S: du invocation. (line 129) +* -s <1>: du invocation. (line 125) +* -s: readlink invocation. (line 52) +* -S: ln invocation. (line 100) +* -s: ln invocation. (line 94) +* -S <1>: mv invocation. (line 90) +* -S: install invocation. (line 88) +* -s: install invocation. (line 84) +* -S: cp invocation. (line 251) +* -s: cp invocation. (line 243) +* -S: Sorting the output. (line 33) +* -s <1>: What information is listed. + (line 189) +* -s <2>: paste invocation. (line 34) +* -s <3>: cut invocation. (line 59) +* -s: uniq invocation. (line 42) +* -S: sort invocation. (line 191) +* -s <1>: sort invocation. (line 185) +* -s <2>: sum invocation. (line 31) +* -s <3>: csplit invocation. (line 100) +* -s: fold invocation. (line 29) +* -S: pr invocation. (line 225) +* -s <1>: pr invocation. (line 216) +* -s <2>: fmt invocation. (line 47) +* -s: od invocation. (line 193) +* -S: od invocation. (line 68) +* -s <1>: nl invocation. (line 112) +* -s <2>: tac invocation. (line 33) +* -s: cat invocation. (line 58) +* -S: Backup options. (line 50) +* -s BYTES: shred invocation. (line 103) +* -su: su invocation. (line 25) +* -T: who invocation. (line 93) +* -t <1>: File type tests. (line 34) +* -t: stat invocation. (line 28) +* -T: df invocation. (line 109) +* -t: df invocation. (line 103) +* -T: ln invocation. (line 109) +* -t: ln invocation. (line 105) +* -T: mv invocation. (line 99) +* -t: mv invocation. (line 95) +* -T: install invocation. (line 97) +* -t: install invocation. (line 93) +* -T: cp invocation. (line 260) +* -t: cp invocation. (line 256) +* -T: General output formatting. + (line 83) +* -t <1>: Sorting the output. (line 37) +* -t <2>: unexpand invocation. (line 24) +* -t: expand invocation. (line 22) +* -T: sort invocation. (line 224) +* -t <1>: sort invocation. (line 207) +* -t: md5sum invocation. (line 63) +* -T: pr invocation. (line 251) +* -t <1>: pr invocation. (line 240) +* -t <2>: fmt invocation. (line 40) +* -t: od invocation. (line 76) +* -T: cat invocation. (line 67) +* -t: cat invocation. (line 63) +* -u <1>: env invocation. (line 39) +* -u <2>: Options for date. (line 84) +* -u <3>: who invocation. (line 69) +* -u <4>: id invocation. (line 41) +* -u <5>: Access permission tests. + (line 18) +* -u <6>: shred invocation. (line 109) +* -u <7>: mv invocation. (line 72) +* -u: cp invocation. (line 265) +* -U: Sorting the output. (line 49) +* -u <1>: Sorting the output. (line 42) +* -u <2>: uniq invocation. (line 96) +* -u <3>: sort invocation. (line 233) +* -u <4>: fmt invocation. (line 53) +* -u: cat invocation. (line 70) +* -v <1>: uname invocation. (line 72) +* -v <2>: chmod invocation. (line 48) +* -v <3>: chgrp invocation. (line 55) +* -v <4>: chown invocation. (line 128) +* -v <5>: rmdir invocation. (line 32) +* -v <6>: readlink invocation. (line 56) +* -v: mkdir invocation. (line 38) +* -V: ln invocation. (line 118) +* -v <1>: ln invocation. (line 114) +* -v <2>: shred invocation. (line 115) +* -v: rm invocation. (line 62) +* -V: mv invocation. (line 104) +* -v: mv invocation. (line 82) +* -V: install invocation. (line 106) +* -v: install invocation. (line 102) +* -V: cp invocation. (line 279) +* -v <1>: cp invocation. (line 275) +* -v <2>: Sorting the output. (line 56) +* -v <3>: tail invocation. (line 138) +* -v <4>: head invocation. (line 40) +* -v <5>: pr invocation. (line 256) +* -v <6>: od invocation. (line 145) +* -v <7>: nl invocation. (line 117) +* -v: cat invocation. (line 74) +* -w <1>: who invocation. (line 93) +* -w <2>: Access permission tests. + (line 21) +* -w <3>: General output formatting. + (line 89) +* -w <4>: uniq invocation. (line 101) +* -w <5>: md5sum invocation. (line 68) +* -w <6>: wc invocation. (line 49) +* -w: fold invocation. (line 35) +* -W: pr invocation. (line 269) +* -w <1>: pr invocation. (line 260) +* -w <2>: fmt invocation. (line 59) +* -w <3>: od invocation. (line 152) +* -w: nl invocation. (line 122) +* -WIDTH: fmt invocation. (line 59) +* -x <1>: Access permission tests. + (line 24) +* -x <2>: du invocation. (line 134) +* -x <3>: df invocation. (line 134) +* -x <4>: shred invocation. (line 119) +* -x <5>: cp invocation. (line 285) +* -x: General output formatting. + (line 79) +* -X: Sorting the output. (line 63) +* -x: od invocation. (line 196) +* -X FILE: du invocation. (line 144) +* -z <1>: String tests. (line 15) +* -z <2>: shred invocation. (line 129) +* -z <3>: sort invocation. (line 247) +* -z: csplit invocation. (line 89) +* .cshrc: su invocation. (line 44) +* /: Numeric expressions. (line 15) +* /bin/sh: su invocation. (line 12) +* /etc/passwd: su invocation. (line 12) +* /etc/shells: su invocation. (line 64) +* 128-bit checksum: md5sum invocation. (line 6) +* 16-bit checksum: sum invocation. (line 6) +* 4.2 file system type: df invocation. (line 121) +* <: Relations for expr. (line 22) +* <=: Relations for expr. (line 22) +* = <1>: Relations for expr. (line 22) +* =: String tests. (line 22) +* ==: Relations for expr. (line 22) +* >: Relations for expr. (line 22) +* >=: Relations for expr. (line 22) +* \( regexp operator: String expressions. (line 24) +* \+ regexp operator: String expressions. (line 28) +* \? regexp operator: String expressions. (line 28) +* \c: printf invocation. (line 23) +* \OOO: printf invocation. (line 57) +* \uhhhh: printf invocation. (line 62) +* \Uhhhhhhhh: printf invocation. (line 62) +* \xHH: printf invocation. (line 57) +* \| regexp operator: String expressions. (line 28) +* _POSIX2_VERSION: Standards conformance. + (line 19) +* abbreviations for months: Calendar date items. (line 38) +* access permission tests: Access permission tests. + (line 6) +* access permissions, changing: chmod invocation. (line 6) +* access time, changing: touch invocation. (line 54) +* access time, printing or sorting files by: Sorting the output. + (line 42) +* across columns: pr invocation. (line 84) +* across, listing files: General output formatting. + (line 79) +* adding permissions: Setting Permissions. (line 38) +* addition: Numeric expressions. (line 11) +* ago in date strings: Relative items in date strings. + (line 23) +* all repeated lines, outputting: uniq invocation. (line 67) +* alnum: Character sets. (line 87) +* alpha: Character sets. (line 90) +* alternate ebcdic, converting to: dd invocation. (line 62) +* always color option: General output formatting. + (line 27) +* am i: who invocation. (line 21) +* am in date strings: Time of day items. (line 21) +* and operator <1>: Relations for expr. (line 17) +* and operator: Connectives for test. + (line 12) +* append: dd invocation. (line 135) +* appending to the output file: dd invocation. (line 135) +* appropriate privileges <1>: nice invocation. (line 6) +* appropriate privileges <2>: hostname invocation. (line 6) +* appropriate privileges <3>: Setting the time. (line 6) +* appropriate privileges: install invocation. (line 68) +* arbitrary date strings, parsing: Options for date. (line 11) +* arbitrary text, displaying: echo invocation. (line 6) +* arithmetic tests: Numeric tests. (line 6) +* ASCII dump of files: od invocation. (line 6) +* ascii, converting to: dd invocation. (line 54) +* atime, changing: touch invocation. (line 54) +* atime, printing or sorting files by: Sorting the output. (line 42) +* attributes, file: Changing file attributes. + (line 6) +* authors of get_date: Authors of get_date. (line 6) +* auto color option: General output formatting. + (line 25) +* automounter file systems: df invocation. (line 32) +* b for block special file: mknod invocation. (line 26) +* background jobs, stopping at terminal write: Local. (line 41) +* backslash escapes <1>: echo invocation. (line 20) +* backslash escapes: Character sets. (line 14) +* backslash sequences for file names: Formatting the file names. + (line 11) +* backup files, ignoring: Which files are listed. + (line 23) +* backup options: Backup options. (line 6) +* backup suffix: Backup options. (line 50) +* backups, making <1>: ln invocation. (line 55) +* backups, making <2>: mv invocation. (line 50) +* backups, making <3>: install invocation. (line 36) +* backups, making <4>: cp invocation. (line 61) +* backups, making: Backup options. (line 13) +* backups, making only: cp invocation. (line 42) +* basename: basename invocation. (line 6) +* baud rate, setting: Special. (line 43) +* beeping at input buffer full: Input. (line 56) +* beginning of time: Time directives. (line 39) +* beginning of time, for POSIX: Seconds since the Epoch. + (line 13) +* Bellovin, Steven M.: Authors of get_date. (line 6) +* Berets, Jim: Authors of get_date. (line 6) +* Berry, K. <1>: Authors of get_date. (line 14) +* Berry, K.: Introduction. (line 19) +* binary and text I/O in cat: cat invocation. (line 20) +* binary input files: md5sum invocation. (line 24) +* blank: Character sets. (line 93) +* blank lines, numbering: nl invocation. (line 87) +* blanks, ignoring leading: sort invocation. (line 70) +* block (space-padding): dd invocation. (line 71) +* block size <1>: dd invocation. (line 31) +* block size: Block size. (line 6) +* block size of conversion: dd invocation. (line 35) +* block size of input: dd invocation. (line 25) +* block size of output: dd invocation. (line 28) +* block special check: File type tests. (line 10) +* block special files: mknod invocation. (line 11) +* block special files, creating: mknod invocation. (line 6) +* BLOCK_SIZE: Block size. (line 12) +* BLOCKSIZE: Block size. (line 12) +* body, numbering: nl invocation. (line 17) +* Bourne shell syntax for color setup: dircolors invocation. + (line 27) +* breaks, cause interrupts: Input. (line 10) +* breaks, ignoring: Input. (line 7) +* brkint: Input. (line 10) +* bs: dd invocation. (line 31) +* BSD sum: sum invocation. (line 25) +* BSD tail: tail invocation. (line 19) +* BSD touch compatibility: touch invocation. (line 72) +* bsN: Output. (line 55) +* bugs, reporting: Introduction. (line 12) +* built-in shell commands, conflicts with <1>: nice invocation. + (line 25) +* built-in shell commands, conflicts with <2>: pwd invocation. + (line 10) +* built-in shell commands, conflicts with: test invocation. (line 28) +* byte count: wc invocation. (line 6) +* byte-swapping: dd invocation. (line 90) +* c for character special file: mknod invocation. (line 29) +* C shell syntax for color setup: dircolors invocation. + (line 33) +* C-s/C-q flow control: Input. (line 38) +* calendar date item: Calendar date items. (line 6) +* case folding: sort invocation. (line 81) +* case translation: Local. (line 36) +* case, ignored in dates: General date syntax. (line 64) +* cat: cat invocation. (line 6) +* cbreak: Combination. (line 52) +* cbs: dd invocation. (line 35) +* CD-ROM file system type: df invocation. (line 125) +* cdfs file system type: df invocation. (line 125) +* change or print terminal settings: stty invocation. (line 6) +* changed files, verbosely describing: chgrp invocation. (line 17) +* changed owners, verbosely describing: chown invocation. (line 66) +* changing access permissions: chmod invocation. (line 6) +* changing file attributes: Changing file attributes. + (line 6) +* changing file ownership: chown invocation. (line 6) +* changing file timestamps: touch invocation. (line 6) +* changing group ownership <1>: chgrp invocation. (line 6) +* changing group ownership: chown invocation. (line 6) +* changing special permissions: Changing Special Permissions. + (line 6) +* character classes: Character sets. (line 74) +* character count: wc invocation. (line 6) +* character size: Control. (line 19) +* character special check: File type tests. (line 13) +* character special files: mknod invocation. (line 11) +* character special files, creating: mknod invocation. (line 6) +* characters, special: Characters. (line 6) +* check file types: test invocation. (line 6) +* checking for sortedness: sort invocation. (line 17) +* checksum, 128-bit: md5sum invocation. (line 6) +* checksum, 16-bit: sum invocation. (line 6) +* chgrp: chgrp invocation. (line 6) +* chmod: chmod invocation. (line 6) +* chown: chown invocation. (line 6) +* chroot: chroot invocation. (line 6) +* cksum: cksum invocation. (line 6) +* clocal: Control. (line 33) +* cntrl: Character sets. (line 96) +* color database, printing: dircolors invocation. + (line 38) +* color setup: dircolors invocation. + (line 6) +* color, distinguishing file types with: General output formatting. + (line 21) +* cols: Special. (line 27) +* COLUMNS: Special. (line 30) +* columns: Special. (line 27) +* COLUMNS: General output formatting. + (line 89) +* combination settings: Combination. (line 6) +* comm: comm invocation. (line 6) +* commands for controlling processes: Process control. (line 6) +* commands for delaying: Delaying. (line 6) +* commands for exit status: Conditions. (line 6) +* commands for file name manipulation: File name manipulation. + (line 6) +* commands for invoking other commands: Modified command invocation. + (line 6) +* commands for printing text: Printing text. (line 6) +* commands for printing the working context: Working context. (line 6) +* commands for printing user information: User information. (line 6) +* commands for redirection: Redirection. (line 6) +* commands for system context: System context. (line 6) +* commas, outputting between files: General output formatting. + (line 67) +* comments, in dates: General date syntax. (line 64) +* common field, joining on: join invocation. (line 6) +* common lines: comm invocation. (line 18) +* common options: Common options. (line 6) +* compare values: test invocation. (line 6) +* comparing sorted files: comm invocation. (line 6) +* comparison operators: Relations for expr. (line 22) +* concatenate and write files: cat invocation. (line 6) +* conditional executability: Conditional Executability. + (line 6) +* conditions: Conditions. (line 6) +* conflicts with shell built-ins <1>: nice invocation. (line 25) +* conflicts with shell built-ins <2>: pwd invocation. (line 10) +* conflicts with shell built-ins: test invocation. (line 28) +* connectives, logical <1>: Relations for expr. (line 6) +* connectives, logical: Connectives for test. + (line 6) +* context splitting: csplit invocation. (line 6) +* context, system: System context. (line 6) +* control characters, using ^C: Local. (line 51) +* control settings: Control. (line 6) +* controlling terminal: dd invocation. (line 161) +* conv: dd invocation. (line 48) +* conversion block size: dd invocation. (line 35) +* converting tabs to spaces: expand invocation. (line 6) +* converting while copying a file: dd invocation. (line 6) +* cooked: Combination. (line 37) +* Coordinated Universal Time: Options for date. (line 84) +* copying directories recursively: cp invocation. (line 76) +* copying existing permissions: Copying Permissions. (line 6) +* copying files: cat invocation. (line 6) +* copying files and directories: cp invocation. (line 6) +* copying files and setting attributes: install invocation. (line 6) +* core utilities: Top. (line 19) +* count: dd invocation. (line 44) +* cp: cp invocation. (line 6) +* crashes and corruption: sync invocation. (line 11) +* CRC checksum: cksum invocation. (line 6) +* cread: Control. (line 30) +* creating directories: mkdir invocation. (line 6) +* creating FIFOs (named pipes): mkfifo invocation. (line 6) +* creating links (hard only): link invocation. (line 6) +* creating links (hard or soft): ln invocation. (line 6) +* creating output file, avoiding: dd invocation. (line 98) +* creating output file, requiring: dd invocation. (line 102) +* crN: Output. (line 45) +* crown margin: fmt invocation. (line 34) +* crt: Combination. (line 74) +* crterase: Local. (line 22) +* crtkill: Local. (line 56) +* crtscts: Control. (line 36) +* csh syntax for color setup: dircolors invocation. + (line 33) +* csN: Control. (line 19) +* csplit: csplit invocation. (line 6) +* cstopb: Control. (line 27) +* ctime, printing or sorting by: Sorting the output. (line 14) +* ctlecho: Local. (line 51) +* current working directory, printing: pwd invocation. (line 6) +* cut: cut invocation. (line 6) +* cyclic redundancy check: cksum invocation. (line 6) +* data, erasing: shred invocation. (line 6) +* database for color setup, printing: dircolors invocation. + (line 38) +* date: date invocation. (line 6) +* date directives: Date directives. (line 6) +* date format, ISO 8601: Calendar date items. (line 30) +* date input formats: Date input formats. (line 6) +* date options: Options for date. (line 6) +* date strings, parsing: Options for date. (line 11) +* day in date strings: Relative items in date strings. + (line 15) +* day of week item: Day of week items. (line 6) +* dd: dd invocation. (line 6) +* dec: Combination. (line 77) +* decctlq: Combination. (line 63) +* delay for a specified time: sleep invocation. (line 6) +* delaying commands: Delaying. (line 6) +* deleting characters: Squeezing. (line 6) +* dereferencing symbolic links: ln invocation. (line 40) +* descriptor follow option: tail invocation. (line 41) +* destination directory <1>: ln invocation. (line 105) +* destination directory <2>: mv invocation. (line 95) +* destination directory <3>: install invocation. (line 93) +* destination directory <4>: cp invocation. (line 256) +* destination directory: Target directory. (line 15) +* destinations, multiple output: tee invocation. (line 6) +* device file, disk: df invocation. (line 19) +* df: df invocation. (line 6) +* DF_BLOCK_SIZE: Block size. (line 12) +* dictionary order: sort invocation. (line 75) +* differing lines: comm invocation. (line 18) +* digit: Character sets. (line 99) +* dir: dir invocation. (line 6) +* dircolors: dircolors invocation. + (line 6) +* direct: dd invocation. (line 141) +* direct I/O: dd invocation. (line 141) +* directives, date: Date directives. (line 6) +* directives, literal: Literal directives. (line 6) +* directives, time: Time directives. (line 6) +* directories, copying: cp invocation. (line 6) +* directories, copying recursively: cp invocation. (line 76) +* directories, creating: mkdir invocation. (line 6) +* directories, creating with given attributes: install invocation. + (line 44) +* directories, removing (recursively): rm invocation. (line 58) +* directories, removing empty: rmdir invocation. (line 6) +* directories, removing with unlink: rm invocation. (line 25) +* directory check: File type tests. (line 16) +* directory components, printing: dirname invocation. (line 6) +* directory deletion, ignoring failures: rmdir invocation. (line 17) +* directory deletion, reporting: rmdir invocation. (line 32) +* directory listing: ls invocation. (line 6) +* directory listing, brief: dir invocation. (line 6) +* directory listing, recursive: Which files are listed. + (line 84) +* directory listing, verbose: vdir invocation. (line 6) +* directory order, listing by: Sorting the output. (line 21) +* directory, stripping from file names: basename invocation. (line 6) +* dired Emacs mode support: What information is listed. + (line 16) +* dirname: dirname invocation. (line 6) +* disabling special characters: Characters. (line 13) +* disk allocation: What information is listed. + (line 189) +* disk device file: df invocation. (line 19) +* disk usage: Disk usage. (line 6) +* disk usage by file system: df invocation. (line 6) +* disk usage for files: du invocation. (line 6) +* diskette file system: df invocation. (line 129) +* displacement of dates: Relative items in date strings. + (line 6) +* displaying text: echo invocation. (line 6) +* displaying value of a symbolic link: readlink invocation. (line 6) +* division: Numeric expressions. (line 15) +* do nothing, successfully: true invocation. (line 6) +* do nothing, unsuccessfully: false invocation. (line 6) +* DOS file system: df invocation. (line 129) +* double spacing: pr invocation. (line 96) +* down columns: pr invocation. (line 70) +* dsusp: Characters. (line 53) +* dsync: dd invocation. (line 144) +* du: du invocation. (line 6) +* DU_BLOCK_SIZE: Block size. (line 12) +* ebcdic, converting to: dd invocation. (line 58) +* echo <1>: Local. (line 18) +* echo: echo invocation. (line 6) +* echoctl: Local. (line 51) +* echoe: Local. (line 22) +* echok: Local. (line 26) +* echoke: Local. (line 56) +* echonl: Local. (line 29) +* echoprt: Local. (line 46) +* effective uid and gid, printing: id invocation. (line 6) +* effective UID, printing: whoami invocation. (line 6) +* efs file system type: df invocation. (line 121) +* Eggert, Paul: Authors of get_date. (line 6) +* eight-bit characters <1>: Combination. (line 55) +* eight-bit characters: Control. (line 19) +* eight-bit input: Input. (line 23) +* ek: Combination. (line 22) +* empty files, creating: touch invocation. (line 18) +* empty lines, numbering: nl invocation. (line 87) +* entire files, output of: Output of entire files. + (line 6) +* env: env invocation. (line 6) +* environment variables, printing: printenv invocation. (line 6) +* environment, preserving: su invocation. (line 64) +* environment, printing: env invocation. (line 30) +* environment, running a program in a modified: env invocation. + (line 6) +* eof: Characters. (line 32) +* eol: Characters. (line 35) +* eol2: Characters. (line 38) +* epoch, for POSIX: Seconds since the Epoch. + (line 13) +* epoch, seconds since: Time directives. (line 39) +* equal string check: String tests. (line 22) +* equivalence classes: Character sets. (line 123) +* erase: Characters. (line 26) +* erasing data: shred invocation. (line 6) +* error messages, omitting <1>: chmod invocation. (line 34) +* error messages, omitting <2>: chgrp invocation. (line 23) +* error messages, omitting: chown invocation. (line 72) +* evaluation of expressions: expr invocation. (line 6) +* even parity: Control. (line 13) +* evenp: Combination. (line 9) +* exabyte, definition of: Block size. (line 116) +* examples of date: Examples of date. (line 6) +* examples of expr: Examples of expr. (line 6) +* exbibyte, definition of: Block size. (line 120) +* excl: dd invocation. (line 102) +* excluding files from du: du invocation. (line 138) +* executable file check: Access permission tests. + (line 24) +* executables and file type, marking: General output formatting. + (line 36) +* execute permission: Mode Structure. (line 14) +* execute permission, symbolic: Setting Permissions. (line 63) +* existence-of-file check: File characteristic tests. + (line 9) +* existing backup method: Backup options. (line 39) +* exit status commands: Conditions. (line 6) +* exit status of chroot: chroot invocation. (line 47) +* exit status of env: env invocation. (line 49) +* exit status of expr: expr invocation. (line 39) +* exit status of false: false invocation. (line 6) +* exit status of ls: ls invocation. (line 29) +* exit status of nice: nice invocation. (line 44) +* exit status of nohup: nohup invocation. (line 36) +* exit status of pathchk: pathchk invocation. (line 38) +* exit status of printenv: printenv invocation. (line 17) +* exit status of sort: sort invocation. (line 49) +* exit status of su: su invocation. (line 80) +* exit status of test: test invocation. (line 40) +* exit status of true: true invocation. (line 6) +* exit status of tty: tty invocation. (line 21) +* expand: expand invocation. (line 6) +* expr: expr invocation. (line 6) +* expression evaluation <1>: expr invocation. (line 6) +* expression evaluation: test invocation. (line 6) +* expressions, numeric: Numeric expressions. (line 6) +* expressions, string: String expressions. (line 6) +* extension, sorting files by: Sorting the output. (line 63) +* factor: factor invocation. (line 6) +* failure exit status: false invocation. (line 6) +* false: false invocation. (line 6) +* fascism: su invocation. (line 87) +* fdatasync: dd invocation. (line 116) +* ffN: Output. (line 63) +* field separator character: sort invocation. (line 207) +* fields, padding numeric: Padding. (line 6) +* FIFOs, creating: mkfifo invocation. (line 6) +* file attributes, changing: Changing file attributes. + (line 6) +* file characteristic tests: File characteristic tests. + (line 6) +* file contents, dumping unambiguously: od invocation. (line 6) +* file information, preserving: cp invocation. (line 130) +* file name manipulation: File name manipulation. + (line 6) +* file name pattern expansion, disabled: su invocation. (line 44) +* file names, checking validity and portability: pathchk invocation. + (line 6) +* file names, stripping directory and suffix: basename invocation. + (line 6) +* file offset radix: od invocation. (line 36) +* file ownership, changing: chown invocation. (line 6) +* file permissions, numeric: Numeric Modes. (line 6) +* file sizes: du invocation. (line 45) +* file space usage: du invocation. (line 6) +* file status: stat invocation. (line 6) +* file system disk usage: df invocation. (line 6) +* file system sizes: df invocation. (line 40) +* file system space, retrieving current data more slowly: df invocation. + (line 96) +* file system space, retrieving old data more quickly: df invocation. + (line 69) +* file system status: stat invocation. (line 6) +* file system types, limiting output to certain: df invocation. + (line 65) +* file system types, printing: df invocation. (line 109) +* file systems: stat invocation. (line 17) +* file systems and hard links: ln invocation. (line 6) +* file systems, omitting copying to different: cp invocation. (line 285) +* file timestamps, changing: touch invocation. (line 6) +* file type and executables, marking: General output formatting. + (line 36) +* file type tests: File type tests. (line 6) +* file type, marking: General output formatting. + (line 73) +* file types: Special file types. (line 9) +* file types, special: Special file types. (line 6) +* file utilities: Top. (line 19) +* files beginning with -, removing: rm invocation. (line 65) +* files, copying: cp invocation. (line 6) +* fingerprint, 128-bit: md5sum invocation. (line 6) +* first in date strings: General date syntax. (line 26) +* first part of files, outputting: head invocation. (line 6) +* flow control, hardware: Control. (line 36) +* flow control, software: Input. (line 43) +* flushing, disabling: Local. (line 32) +* fmt: fmt invocation. (line 6) +* fold: fold invocation. (line 6) +* folding long input lines: fold invocation. (line 6) +* footers, numbering: nl invocation. (line 17) +* force deletion: shred invocation. (line 91) +* formatting file contents: Formatting file contents. + (line 6) +* formatting of numbers in seq: seq invocation. (line 24) +* formatting times <1>: date invocation. (line 20) +* formatting times: pr invocation. (line 100) +* fortnight in date strings: Relative items in date strings. + (line 15) +* fsck: rm invocation. (line 25) +* fsync: dd invocation. (line 120) +* general date syntax: General date syntax. (line 6) +* general numeric sort: sort invocation. (line 87) +* get_date: Date input formats. (line 6) +* gibibyte, definition of: Block size. (line 99) +* gigabyte, definition of: Block size. (line 95) +* giving away permissions: Umask and Protection. + (line 12) +* globbing, disabled: su invocation. (line 44) +* GMT: Options for date. (line 84) +* grand total of disk space: du invocation. (line 50) +* graph: Character sets. (line 102) +* Greenwich Mean Time: Options for date. (line 84) +* group owner, default: Mode Structure. (line 27) +* group ownership of installed files, setting: install invocation. + (line 53) +* group ownership, changing <1>: chgrp invocation. (line 6) +* group ownership, changing: chown invocation. (line 6) +* group wheel, not supported: su invocation. (line 87) +* group, permissions for: Setting Permissions. (line 26) +* groups: groups invocation. (line 6) +* growing files: tail invocation. (line 41) +* hangups, immunity to: nohup invocation. (line 6) +* hard link check: File characteristic tests. + (line 23) +* hard link, defined: ln invocation. (line 32) +* hard links to directories: ln invocation. (line 61) +* hard links, counting in du: du invocation. (line 91) +* hard links, creating <1>: ln invocation. (line 6) +* hard links, creating: link invocation. (line 6) +* hard links, preserving: cp invocation. (line 89) +* hardware class: uname invocation. (line 39) +* hardware flow control: Control. (line 36) +* hardware platform: uname invocation. (line 34) +* hardware type: uname invocation. (line 39) +* hat notation for control characters: Local. (line 51) +* head: head invocation. (line 6) +* headers, numbering: nl invocation. (line 17) +* help, online: Common options. (line 29) +* hex dump of files: od invocation. (line 6) +* High Sierra file system: df invocation. (line 125) +* holes, copying files with: cp invocation. (line 205) +* HOME: su invocation. (line 18) +* horizontal, listing files: General output formatting. + (line 79) +* host processor type: uname invocation. (line 48) +* hostid: hostid invocation. (line 6) +* hostname <1>: hostname invocation. (line 6) +* hostname: uname invocation. (line 44) +* hour in date strings: Relative items in date strings. + (line 15) +* hsfs file system type: df invocation. (line 125) +* human-readable output <1>: du invocation. (line 75) +* human-readable output <2>: df invocation. (line 45) +* human-readable output <3>: What information is listed. + (line 116) +* human-readable output: Block size. (line 43) +* hup[cl]: Control. (line 23) +* hurd, author, printing: What information is listed. + (line 10) +* ibs: dd invocation. (line 25) +* icanon: Local. (line 11) +* icrnl: Input. (line 32) +* id: id invocation. (line 6) +* idle time: who invocation. (line 69) +* iexten: Local. (line 15) +* if: dd invocation. (line 17) +* iflag: dd invocation. (line 125) +* ignbrk: Input. (line 7) +* igncr: Input. (line 29) +* ignore file systems: df invocation. (line 32) +* ignoring case: sort invocation. (line 81) +* ignpar: Input. (line 13) +* imaxbel: Input. (line 56) +* immunity to hangups: nohup invocation. (line 6) +* implementation, hardware: uname invocation. (line 34) +* including files from du: du invocation. (line 62) +* indenting lines: pr invocation. (line 204) +* index: String expressions. (line 45) +* information, about current users: who invocation. (line 6) +* initial part of files, outputting: head invocation. (line 6) +* initial tabs, converting: expand invocation. (line 35) +* inlcr: Input. (line 26) +* inode number, printing: What information is listed. + (line 122) +* inode usage: df invocation. (line 54) +* inode, and hard links: ln invocation. (line 32) +* inodes, written buffered: sync invocation. (line 6) +* inpck: Input. (line 20) +* input block size: dd invocation. (line 25) +* input encoding, UTF-8: Input. (line 35) +* input settings: Input. (line 6) +* input tabs: pr invocation. (line 120) +* install: install invocation. (line 6) +* interactivity <1>: mv invocation. (line 64) +* interactivity: cp invocation. (line 178) +* intr: Characters. (line 20) +* invocation of commands, modified: Modified command invocation. + (line 6) +* isig: Local. (line 7) +* ISO 8601 date format: Calendar date items. (line 30) +* ISO/IEC 10646: printf invocation. (line 62) +* ispeed: Special. (line 16) +* istrip: Input. (line 23) +* items in date strings: General date syntax. (line 6) +* iterations, selecting the number of: shred invocation. (line 96) +* iuclc: Input. (line 48) +* iutf8: Input. (line 35) +* ixany: Input. (line 52) +* ixoff: Input. (line 43) +* ixon: Input. (line 38) +* join: join invocation. (line 6) +* kernel name: uname invocation. (line 61) +* kernel release: uname invocation. (line 57) +* kernel version: uname invocation. (line 72) +* kibibyte, definition of: Block size. (line 83) +* kibibytes for file sizes: du invocation. (line 85) +* kibibytes for file system sizes: df invocation. (line 59) +* kill <1>: kill invocation. (line 6) +* kill: Characters. (line 29) +* kilobyte, definition of: Block size. (line 78) +* Knuth, Donald E.: fmt invocation. (line 19) +* language, in dates: General date syntax. (line 40) +* last DAY <1>: Day of week items. (line 15) +* last DAY: Options for date. (line 11) +* last in date strings: General date syntax. (line 26) +* last part of files, outputting: tail invocation. (line 6) +* LC_ALL <1>: ls invocation. (line 17) +* LC_ALL: sort invocation. (line 40) +* LC_COLLATE <1>: Relations for expr. (line 22) +* LC_COLLATE <2>: join invocation. (line 11) +* LC_COLLATE <3>: comm invocation. (line 12) +* LC_COLLATE <4>: uniq invocation. (line 21) +* LC_COLLATE: sort invocation. (line 40) +* LC_CTYPE <1>: printf invocation. (line 62) +* LC_CTYPE: sort invocation. (line 70) +* LC_MESSAGES: pr invocation. (line 13) +* LC_NUMERIC <1>: printf invocation. (line 51) +* LC_NUMERIC <2>: sort invocation. (line 87) +* LC_NUMERIC: Block size. (line 57) +* LC_TIME <1>: date invocation. (line 11) +* LC_TIME <2>: Formatting file timestamps. + (line 30) +* LC_TIME <3>: sort invocation. (line 120) +* LC_TIME: pr invocation. (line 107) +* LCASE: Combination. (line 71) +* lcase: Combination. (line 71) +* lcase, converting to: dd invocation. (line 82) +* lchown <1>: chgrp invocation. (line 27) +* lchown: chown invocation. (line 99) +* leading directories, creating missing: install invocation. (line 44) +* leading directory components, stripping: basename invocation. + (line 6) +* left margin: pr invocation. (line 204) +* length: String expressions. (line 50) +* limiting output of du: du invocation. (line 106) +* line: Special. (line 37) +* line count: wc invocation. (line 6) +* line numbering: nl invocation. (line 6) +* line settings of terminal: stty invocation. (line 6) +* line-breaking: fmt invocation. (line 19) +* line-by-line comparison: comm invocation. (line 6) +* LINES: Special. (line 30) +* link: link invocation. (line 6) +* links, creating <1>: ln invocation. (line 6) +* links, creating: link invocation. (line 6) +* Linux file system types: df invocation. (line 121) +* literal directives: Literal directives. (line 6) +* litout: Combination. (line 59) +* ln: ln invocation. (line 6) +* ln format for nl: nl invocation. (line 98) +* lnext: Characters. (line 62) +* local file system types: df invocation. (line 121) +* local settings: Local. (line 6) +* logging out and continuing to run: nohup invocation. (line 6) +* logical and operator <1>: Relations for expr. (line 17) +* logical and operator: Connectives for test. + (line 12) +* logical connectives <1>: Relations for expr. (line 6) +* logical connectives: Connectives for test. + (line 6) +* logical or operator <1>: Relations for expr. (line 11) +* logical or operator: Connectives for test. + (line 15) +* logical pages, numbering on: nl invocation. (line 12) +* login name, printing: logname invocation. (line 6) +* login sessions, printing users with: users invocation. (line 6) +* login shell: su invocation. (line 18) +* login shell, creating: su invocation. (line 53) +* login time: who invocation. (line 11) +* LOGNAME: su invocation. (line 18) +* logname: logname invocation. (line 6) +* long ls format: What information is listed. + (line 130) +* lower: Character sets. (line 105) +* lowercase, translating to output: Output. (line 12) +* ls: ls invocation. (line 6) +* LS_BLOCK_SIZE: Block size. (line 12) +* LS_COLORS: dircolors invocation. + (line 16) +* machine type: uname invocation. (line 39) +* machine-readable stty output: stty invocation. (line 41) +* MacKenzie, D.: Introduction. (line 19) +* MacKenzie, David: Authors of get_date. (line 6) +* Makefiles, installing programs in: install invocation. (line 26) +* manipulating files: Basic operations. (line 6) +* manipulation of file names: File name manipulation. + (line 6) +* match: String expressions. (line 36) +* matching patterns: String expressions. (line 11) +* md5sum: md5sum invocation. (line 6) +* mebibyte, definition of: Block size. (line 92) +* megabyte, definition of: Block size. (line 88) +* merging files: paste invocation. (line 6) +* merging files in parallel: pr invocation. (line 6) +* merging sorted files: sort invocation. (line 23) +* message status: who invocation. (line 93) +* message-digest, 128-bit: md5sum invocation. (line 6) +* Meyering, J.: Introduction. (line 19) +* Meyering, Jim: Authors of get_date. (line 6) +* midnight in date strings: Time of day items. (line 21) +* min: Special. (line 7) +* minute in date strings: Relative items in date strings. + (line 15) +* minutes, time zone correction by: Time of day items. (line 29) +* MIT AI lab: su invocation. (line 92) +* mkdir: mkdir invocation. (line 6) +* mkfifo: mkfifo invocation. (line 6) +* mknod: mknod invocation. (line 6) +* modem control: Control. (line 33) +* modes and umask: Umask and Protection. + (line 6) +* modes of created directories, setting: mkdir invocation. (line 24) +* modes of created FIFOs, setting: mkfifo invocation. (line 21) +* modification time, sorting files by: Sorting the output. (line 37) +* modified command invocation: Modified command invocation. + (line 6) +* modified environment, running a program in a: env invocation. + (line 6) +* modify time, changing: touch invocation. (line 77) +* modifying scheduling priority: nice invocation. (line 6) +* month in date strings: Relative items in date strings. + (line 15) +* month names in date strings: Calendar date items. (line 38) +* months, sorting by: sort invocation. (line 120) +* months, written-out: General date syntax. (line 36) +* MS-DOS file system: df invocation. (line 129) +* mtime, changing: touch invocation. (line 77) +* multicolumn output, generating: pr invocation. (line 6) +* multiple changes to permissions: Multiple Changes. (line 6) +* multiplication: Numeric expressions. (line 15) +* multipliers after numbers: dd invocation. (line 175) +* mv: mv invocation. (line 6) +* name follow option: tail invocation. (line 41) +* name of kernel: uname invocation. (line 61) +* named pipe check: File type tests. (line 28) +* named pipes, creating: mkfifo invocation. (line 6) +* network node name: uname invocation. (line 44) +* newer files, copying only: cp invocation. (line 265) +* newer files, moving only: mv invocation. (line 72) +* newer-than file check: File characteristic tests. + (line 15) +* newline echoing after kill: Local. (line 26) +* newline, echoing: Local. (line 29) +* newline, translating to crlf: Output. (line 19) +* newline, translating to return: Input. (line 26) +* next DAY <1>: Day of week items. (line 15) +* next DAY: Options for date. (line 11) +* next in date strings: General date syntax. (line 26) +* NFS file system type: df invocation. (line 116) +* NFS mounts from BSD to HP-UX <1>: du invocation. (line 149) +* NFS mounts from BSD to HP-UX: What information is listed. + (line 197) +* nice: nice invocation. (line 6) +* nice value: nice invocation. (line 6) +* nl <1>: Combination. (line 18) +* nl: nl invocation. (line 6) +* nlN: Output. (line 39) +* no-op: true invocation. (line 6) +* nocreat: dd invocation. (line 98) +* noctty: dd invocation. (line 161) +* node name: uname invocation. (line 44) +* noerror: dd invocation. (line 95) +* noflsh: Local. (line 32) +* nofollow: dd invocation. (line 158) +* nohup: nohup invocation. (line 6) +* nohup.out: nohup invocation. (line 6) +* non-directories, copying as special files: cp invocation. (line 76) +* non-directory suffix, stripping: dirname invocation. (line 6) +* nonblock: dd invocation. (line 155) +* nonblocking I/O: dd invocation. (line 155) +* none backup method: Backup options. (line 31) +* none color option: General output formatting. + (line 23) +* none, sorting option for ls: Sorting the output. (line 49) +* nonempty file check: File characteristic tests. + (line 12) +* nonprinting characters, ignoring: sort invocation. (line 114) +* nonzero-length string check: String tests. (line 19) +* noon in date strings: Time of day items. (line 21) +* not-equal string check: String tests. (line 25) +* notrunc: dd invocation. (line 108) +* now in date strings: Relative items in date strings. + (line 33) +* numbered backup method: Backup options. (line 35) +* numbering lines: nl invocation. (line 6) +* numbers, written-out: General date syntax. (line 26) +* numeric expressions: Numeric expressions. (line 6) +* numeric field padding: Padding. (line 6) +* numeric modes: Numeric Modes. (line 6) +* numeric operations: Numeric operations. (line 6) +* numeric sequences: seq invocation. (line 6) +* numeric sort: sort invocation. (line 128) +* numeric tests: Numeric tests. (line 6) +* numeric uid and gid: What information is listed. + (line 179) +* obs: dd invocation. (line 28) +* ocrnl: Output. (line 16) +* octal dump of files: od invocation. (line 6) +* octal numbers for file modes: Numeric Modes. (line 6) +* od: od invocation. (line 6) +* odd parity: Control. (line 13) +* oddp: Combination. (line 14) +* of: dd invocation. (line 20) +* ofdel: Output. (line 34) +* ofill: Output. (line 30) +* oflag: dd invocation. (line 129) +* olcuc: Output. (line 12) +* older-than file check: File characteristic tests. + (line 19) +* one file system, restricting du to: du invocation. (line 134) +* one-line output format: df invocation. (line 76) +* onlcr: Output. (line 19) +* onlret: Output. (line 27) +* onocr: Output. (line 23) +* operating on characters: Operating on characters. + (line 6) +* operating on sorted files: Operating on sorted files. + (line 6) +* operating system name: uname invocation. (line 53) +* opost: Output. (line 9) +* option delimiter: Common options. (line 36) +* options for date: Options for date. (line 6) +* or operator <1>: Relations for expr. (line 11) +* or operator: Connectives for test. + (line 15) +* ordinal numbers: General date syntax. (line 26) +* ospeed: Special. (line 19) +* other permissions: Setting Permissions. (line 29) +* output block size: dd invocation. (line 28) +* output file name prefix <1>: csplit invocation. (line 62) +* output file name prefix: split invocation. (line 14) +* output file name suffix: csplit invocation. (line 66) +* output format: stat invocation. (line 33) +* output format, portable: df invocation. (line 76) +* output NUL-terminated lines: du invocation. (line 112) +* output of entire files: Output of entire files. + (line 6) +* output of parts of files: Output of parts of files. + (line 6) +* output settings: Output. (line 6) +* output tabs: pr invocation. (line 140) +* overwriting of input, allowed: sort invocation. (line 171) +* owned by effective gid check: Access permission tests. + (line 31) +* owned by effective uid check: Access permission tests. + (line 28) +* owner of file, permissions for: Setting Permissions. (line 23) +* owner, default: Mode Structure. (line 27) +* ownership of installed files, setting: install invocation. (line 68) +* p for FIFO file: mknod invocation. (line 23) +* pad character: Output. (line 34) +* pad instead of timing for delaying: Output. (line 30) +* padding of numeric fields: Padding. (line 6) +* paragraphs, reformatting: fmt invocation. (line 6) +* parenb: Control. (line 9) +* parent directories and cp: cp invocation. (line 167) +* parent directories, creating: mkdir invocation. (line 31) +* parent directories, creating missing: install invocation. (line 44) +* parent directories, removing: rmdir invocation. (line 22) +* parentheses for grouping: expr invocation. (line 31) +* parity: Combination. (line 10) +* parity errors, marking: Input. (line 16) +* parity, ignoring: Input. (line 13) +* parmrk: Input. (line 16) +* parodd: Control. (line 13) +* parsing date strings: Options for date. (line 11) +* parts of files, output of: Output of parts of files. + (line 6) +* pass8: Combination. (line 55) +* passwd entry, and su shell: su invocation. (line 12) +* paste: paste invocation. (line 6) +* Paterson, R.: Introduction. (line 19) +* PATH <1>: su invocation. (line 53) +* PATH: env invocation. (line 24) +* pathchk: pathchk invocation. (line 6) +* pattern matching: String expressions. (line 11) +* PC file system: df invocation. (line 129) +* pcfs: df invocation. (line 129) +* pebibyte, definition of: Block size. (line 113) +* permission tests: Access permission tests. + (line 6) +* permissions of installed files, setting: install invocation. + (line 59) +* permissions, changing access: chmod invocation. (line 6) +* permissions, copying existing: Copying Permissions. (line 6) +* permissions, for changing file timestamps: touch invocation. + (line 20) +* permissions, output by ls: What information is listed. + (line 148) +* petabyte, definition of: Block size. (line 109) +* phone directory order: sort invocation. (line 75) +* pieces, splitting a file into: split invocation. (line 6) +* Pinard, F. <1>: Authors of get_date. (line 14) +* Pinard, F.: Introduction. (line 19) +* pipe fitting: tee invocation. (line 6) +* Plass, Michael F.: fmt invocation. (line 19) +* platform, hardware: uname invocation. (line 34) +* pm in date strings: Time of day items. (line 21) +* portable file names, checking for: pathchk invocation. (line 6) +* portable output format: df invocation. (line 76) +* POSIX: Introduction. (line 11) +* POSIX output format: df invocation. (line 76) +* POSIXLY_CORRECT <1>: printf invocation. (line 42) +* POSIXLY_CORRECT <2>: echo invocation. (line 68) +* POSIXLY_CORRECT <3>: sort invocation. (line 179) +* POSIXLY_CORRECT <4>: pr invocation. (line 107) +* POSIXLY_CORRECT <5>: Standards conformance. + (line 6) +* POSIXLY_CORRECT: Common options. (line 11) +* POSIXLY_CORRECT, and block size: Block size. (line 12) +* pr: pr invocation. (line 6) +* prime factors: factor invocation. (line 6) +* print: Character sets. (line 108) +* print name of current directory: pwd invocation. (line 6) +* print system information: uname invocation. (line 6) +* print terminal file name: tty invocation. (line 6) +* printenv: printenv invocation. (line 6) +* printf: printf invocation. (line 6) +* printing all or some environment variables: printenv invocation. + (line 6) +* printing color database: dircolors invocation. + (line 38) +* printing current user information: who invocation. (line 6) +* printing current usernames: users invocation. (line 6) +* printing groups a user is in: groups invocation. (line 6) +* printing real and effective uid and gid: id invocation. (line 6) +* printing text: echo invocation. (line 6) +* printing text, commands for: Printing text. (line 6) +* printing the current time: date invocation. (line 6) +* printing the effective UID: whoami invocation. (line 6) +* printing the host identifier: hostid invocation. (line 6) +* printing the hostname: hostname invocation. (line 6) +* printing user's login name: logname invocation. (line 6) +* printing, preparing files for: pr invocation. (line 6) +* priority, modifying: nice invocation. (line 6) +* processes, commands for controlling: Process control. (line 6) +* prompting, and ln: ln invocation. (line 71) +* prompting, and mv: mv invocation. (line 34) +* prompting, and rm: rm invocation. (line 11) +* prompts, forcing: mv invocation. (line 59) +* prompts, omitting: mv invocation. (line 55) +* prterase: Local. (line 46) +* ptx: ptx invocation. (line 6) +* punct: Character sets. (line 111) +* pure numbers in date strings: Pure numbers in date strings. + (line 6) +* pwd: pwd invocation. (line 6) +* quit: Characters. (line 23) +* quoting style: Formatting the file names. + (line 34) +* radix for file offsets: od invocation. (line 36) +* ranges: Character sets. (line 46) +* raw: Combination. (line 43) +* read errors, ignoring: dd invocation. (line 95) +* read from stdin and write to stdout and files: tee invocation. + (line 6) +* read permission: Mode Structure. (line 8) +* read permission, symbolic: Setting Permissions. (line 57) +* read system call, and holes: cp invocation. (line 205) +* readable file check: Access permission tests. + (line 15) +* readlink: readlink invocation. (line 6) +* real uid and gid, printing: id invocation. (line 6) +* recursive directory listing: Which files are listed. + (line 84) +* recursively changing access permissions: chmod invocation. (line 58) +* recursively changing file ownership: chown invocation. (line 136) +* recursively changing group ownership: chgrp invocation. (line 63) +* recursively copying directories: cp invocation. (line 76) +* redirection: Redirection. (line 6) +* reformatting paragraph text: fmt invocation. (line 6) +* regular expression matching: String expressions. (line 11) +* regular file check: File type tests. (line 19) +* relations, numeric or string: Relations for expr. (line 6) +* relative items in date strings: Relative items in date strings. + (line 6) +* release of kernel: uname invocation. (line 57) +* remainder: Numeric expressions. (line 15) +* remote hostname: who invocation. (line 11) +* removing empty directories: rmdir invocation. (line 6) +* removing files after shredding: shred invocation. (line 109) +* removing files or directories: rm invocation. (line 6) +* removing files or directories (via the unlink syscall): unlink invocation. + (line 6) +* removing permissions: Setting Permissions. (line 42) +* repeated characters: Character sets. (line 67) +* repeated lines, outputting: uniq invocation. (line 61) +* repeated output of a string: yes invocation. (line 6) +* restricted deletion flag: Mode Structure. (line 47) +* restricted shell: su invocation. (line 64) +* return, ignoring: Input. (line 29) +* return, translating to newline <1>: Output. (line 16) +* return, translating to newline: Input. (line 32) +* reverse sorting <1>: Sorting the output. (line 28) +* reverse sorting: sort invocation. (line 155) +* reversing files: tac invocation. (line 6) +* rm: rm invocation. (line 6) +* rmdir: rmdir invocation. (line 6) +* rn format for nl: nl invocation. (line 101) +* root as default owner: install invocation. (line 68) +* root directory, allow recursive destruction: rm invocation. (line 52) +* root directory, allow recursive modification <1>: chmod invocation. + (line 43) +* root directory, allow recursive modification <2>: chgrp invocation. + (line 45) +* root directory, allow recursive modification: chown invocation. + (line 117) +* root directory, disallow recursive destruction: rm invocation. + (line 47) +* root directory, disallow recursive modification <1>: chmod invocation. + (line 38) +* root directory, disallow recursive modification <2>: chgrp invocation. + (line 40) +* root directory, disallow recursive modification: chown invocation. + (line 112) +* root directory, running a program in a specified: chroot invocation. + (line 6) +* root, becoming: su invocation. (line 6) +* rows: Special. (line 22) +* rprnt: Characters. (line 56) +* RTS/CTS flow control: Control. (line 36) +* running a program in a modified environment: env invocation. + (line 6) +* running a program in a specified root directory: chroot invocation. + (line 6) +* rz format for nl: nl invocation. (line 104) +* Salz, Rich: Authors of get_date. (line 6) +* same file check: File characteristic tests. + (line 23) +* sane: Combination. (line 26) +* scheduling priority, modifying: nice invocation. (line 6) +* screen columns: fold invocation. (line 14) +* seconds since the epoch: Time directives. (line 39) +* section delimiters of pages: nl invocation. (line 68) +* seek: dd invocation. (line 41) +* self-backups: cp invocation. (line 42) +* send a signal to processes: kill invocation. (line 6) +* sentences and line-breaking: fmt invocation. (line 19) +* separator for numbers in seq: seq invocation. (line 30) +* seq: seq invocation. (line 6) +* sequence of numbers: seq invocation. (line 6) +* set-group-id check: Access permission tests. + (line 9) +* set-user-id check: Access permission tests. + (line 18) +* setgid: Mode Structure. (line 41) +* setting permissions: Setting Permissions. (line 46) +* setting the hostname: hostname invocation. (line 6) +* setting the time: Setting the time. (line 6) +* setuid: Mode Structure. (line 38) +* setup for color: dircolors invocation. + (line 6) +* sh syntax for color setup: dircolors invocation. + (line 27) +* SHELL: su invocation. (line 18) +* SHELL environment variable, and color: dircolors invocation. + (line 16) +* shell utilities: Top. (line 19) +* shred: shred invocation. (line 6) +* SI output <1>: du invocation. (line 118) +* SI output <2>: df invocation. (line 89) +* SI output <3>: What information is listed. + (line 205) +* SI output: Block size. (line 43) +* simple backup method: Backup options. (line 44) +* SIMPLE_BACKUP_SUFFIX: Backup options. (line 50) +* single-column output of files: General output formatting. + (line 10) +* size: Special. (line 30) +* size for main memory sorting: sort invocation. (line 191) +* size of file to shred: shred invocation. (line 103) +* size of files, reporting: What information is listed. + (line 189) +* size of files, sorting files by: Sorting the output. (line 33) +* skip: dd invocation. (line 38) +* sleep: sleep invocation. (line 6) +* socket check: File type tests. (line 31) +* software flow control: Input. (line 43) +* sort: sort invocation. (line 6) +* sort field: sort invocation. (line 163) +* sort stability: sort invocation. (line 29) +* sort zero-terminated lines: sort invocation. (line 247) +* sort's last-resort comparison: sort invocation. (line 29) +* sorted files, operations on: Operating on sorted files. + (line 6) +* sorting files: sort invocation. (line 6) +* sorting ls output: Sorting the output. (line 6) +* space: Character sets. (line 114) +* sparse files, copying: cp invocation. (line 205) +* special characters: Characters. (line 6) +* special file types: Special file types. (line 6) +* special files: mknod invocation. (line 11) +* special settings: Special. (line 6) +* specifying sets of characters: Character sets. (line 6) +* speed: Special. (line 40) +* split: split invocation. (line 6) +* splitting a file into pieces: split invocation. (line 6) +* splitting a file into pieces by context: csplit invocation. (line 6) +* squeezing blank lines: cat invocation. (line 58) +* squeezing repeat characters: Squeezing. (line 6) +* Stallman, R.: Introduction. (line 19) +* standard input: Common options. (line 41) +* standard output: Common options. (line 41) +* start: Characters. (line 44) +* stat: stat invocation. (line 6) +* status time, printing or sorting by: Sorting the output. (line 14) +* sticky: Mode Structure. (line 47) +* sticky bit check: Access permission tests. + (line 12) +* stop: Characters. (line 47) +* stop bits: Control. (line 27) +* strftime and date: date invocation. (line 20) +* string constants, outputting: od invocation. (line 68) +* string expressions: String expressions. (line 6) +* string tests: String tests. (line 6) +* strip directory and suffix from file names: basename invocation. + (line 6) +* stripping non-directory suffix: dirname invocation. (line 6) +* stripping symbol table information: install invocation. (line 84) +* stripping trailing slashes <1>: mv invocation. (line 85) +* stripping trailing slashes: cp invocation. (line 238) +* stty: stty invocation. (line 6) +* su: su invocation. (line 6) +* substitute user and group ids: su invocation. (line 6) +* substr: String expressions. (line 40) +* subtracting permissions: Setting Permissions. (line 42) +* subtraction: Numeric expressions. (line 11) +* successful exit: true invocation. (line 6) +* suffix, stripping from file names: basename invocation. (line 6) +* sum: sum invocation. (line 6) +* summarizing files: Summarizing files. (line 6) +* super-user, becoming: su invocation. (line 6) +* superblock, writing: sync invocation. (line 6) +* supplementary groups, printing: groups invocation. (line 6) +* susp: Characters. (line 50) +* swab (byte-swapping): dd invocation. (line 90) +* swap space, saving text image in: Mode Structure. (line 47) +* swtch: Characters. (line 41) +* symbol table information, stripping: install invocation. (line 84) +* symbolic (soft) links, creating: ln invocation. (line 6) +* symbolic link check: File type tests. (line 23) +* symbolic link to directory, controlling traversal of: Traversing symlinks. + (line 6) +* symbolic link to directory, never traverse <1>: chgrp invocation. + (line 76) +* symbolic link to directory, never traverse <2>: chown invocation. + (line 148) +* symbolic link to directory, never traverse: Traversing symlinks. + (line 26) +* symbolic link to directory, traverse each that is encountered <1>: chgrp invocation. + (line 72) +* symbolic link to directory, traverse each that is encountered <2>: chown invocation. + (line 144) +* symbolic link to directory, traverse each that is encountered: Traversing symlinks. + (line 22) +* symbolic link to directory, traverse each that is specified on the command line <1>: chgrp invocation. + (line 67) +* symbolic link to directory, traverse each that is specified on the command line <2>: chown invocation. + (line 139) +* symbolic link to directory, traverse each that is specified on the command line: Traversing symlinks. + (line 18) +* symbolic link, defined: ln invocation. (line 40) +* symbolic links and pwd: pwd invocation. (line 6) +* symbolic links, changing group: chgrp invocation. (line 32) +* symbolic links, changing owner <1>: chgrp invocation. (line 27) +* symbolic links, changing owner: chown invocation. (line 76) +* symbolic links, copying: cp invocation. (line 89) +* symbolic links, copying with: cp invocation. (line 243) +* symbolic links, dereferencing: Which files are listed. + (line 36) +* symbolic links, dereferencing in du: du invocation. (line 96) +* symbolic links, dereferencing in stat: stat invocation. (line 22) +* symbolic links, following: dd invocation. (line 158) +* symbolic links, permissions of: chmod invocation. (line 10) +* symbolic modes: Symbolic Modes. (line 6) +* sync <1>: sync invocation. (line 6) +* sync: dd invocation. (line 152) +* sync (padding with nulls): dd invocation. (line 111) +* synchronize disk and memory: sync invocation. (line 6) +* synchronized data and metadata I/O: dd invocation. (line 152) +* synchronized data and metadata writes, before finishing: dd invocation. + (line 120) +* synchronized data reads: dd invocation. (line 144) +* synchronized data writes, before finishing: dd invocation. (line 116) +* syslog: su invocation. (line 29) +* system context: System context. (line 6) +* system information, printing: uname invocation. (line 6) +* system name, printing: hostname invocation. (line 6) +* System V sum: sum invocation. (line 31) +* tab stops, setting: expand invocation. (line 22) +* tabN: Output. (line 51) +* tabs: Combination. (line 66) +* tabs to spaces, converting: expand invocation. (line 6) +* tac: tac invocation. (line 6) +* tagged paragraphs: fmt invocation. (line 40) +* tail: tail invocation. (line 6) +* tandem: Input. (line 43) +* target directory <1>: ln invocation. (line 105) +* target directory <2>: mv invocation. (line 95) +* target directory <3>: install invocation. (line 93) +* target directory <4>: cp invocation. (line 256) +* target directory: Target directory. (line 6) +* tebibyte, definition of: Block size. (line 106) +* tee: tee invocation. (line 6) +* telephone directory order: sort invocation. (line 75) +* temporary directory: sort invocation. (line 224) +* terabyte, definition of: Block size. (line 102) +* TERM: su invocation. (line 53) +* terminal check: File type tests. (line 34) +* terminal file name, printing: tty invocation. (line 6) +* terminal lines, currently used: who invocation. (line 11) +* terminal settings: stty invocation. (line 6) +* terminal, using color iff: General output formatting. + (line 25) +* terse output: stat invocation. (line 28) +* test: test invocation. (line 6) +* text image, saving in swap space: Mode Structure. (line 47) +* text input files: md5sum invocation. (line 63) +* text utilities: Top. (line 19) +* text, displaying: echo invocation. (line 6) +* text, reformatting: fmt invocation. (line 6) +* this in date strings: Relative items in date strings. + (line 33) +* time <1>: Special. (line 11) +* time: touch invocation. (line 62) +* time directives: Time directives. (line 6) +* time formats <1>: date invocation. (line 20) +* time formats: pr invocation. (line 100) +* time of day item: Time of day items. (line 6) +* time setting: Setting the time. (line 6) +* time style: Formatting file timestamps. + (line 26) +* time units: sleep invocation. (line 11) +* time zone correction: Time of day items. (line 29) +* time zone item <1>: Time zone items. (line 6) +* time zone item: General date syntax. (line 44) +* time, printing or setting: date invocation. (line 6) +* TIME_STYLE: Formatting file timestamps. + (line 106) +* timestamps of installed files, preserving: install invocation. + (line 74) +* timestamps, changing file: touch invocation. (line 6) +* TMPDIR: sort invocation. (line 55) +* today in date strings: Relative items in date strings. + (line 33) +* tomorrow: Options for date. (line 11) +* tomorrow in date strings: Relative items in date strings. + (line 29) +* topological sort: tsort invocation. (line 6) +* tostop: Local. (line 41) +* total counts: wc invocation. (line 12) +* touch: touch invocation. (line 6) +* tr: tr invocation. (line 6) +* trailing slashes: Trailing slashes. (line 6) +* translating characters: Translating. (line 6) +* true: true invocation. (line 6) +* truncating output file, avoiding: dd invocation. (line 108) +* tsort: tsort invocation. (line 6) +* tty: tty invocation. (line 6) +* Twenex: su invocation. (line 92) +* two-way parity: Control. (line 9) +* type size: od invocation. (line 112) +* TZ <1>: Specifying time zone rules. + (line 6) +* TZ <2>: Options for date. (line 84) +* TZ <3>: date invocation. (line 16) +* TZ <4>: who invocation. (line 26) +* TZ <5>: stat invocation. (line 111) +* TZ <6>: touch invocation. (line 41) +* TZ <7>: Formatting file timestamps. + (line 18) +* TZ: pr invocation. (line 113) +* u, and disabling special characters: Characters. (line 13) +* ucase, converting to: dd invocation. (line 85) +* ufs file system type: df invocation. (line 121) +* umask and modes: Umask and Protection. + (line 6) +* uname: uname invocation. (line 6) +* unblock: dd invocation. (line 76) +* unexpand: unexpand invocation. (line 6) +* Unicode: printf invocation. (line 62) +* uniq: uniq invocation. (line 6) +* unique lines, outputting: uniq invocation. (line 96) +* uniquify files: uniq invocation. (line 6) +* uniquifying output: sort invocation. (line 233) +* unlink <1>: unlink invocation. (line 6) +* unlink: rm invocation. (line 25) +* unprintable characters, ignoring: sort invocation. (line 114) +* unsorted directory listing: Sorting the output. (line 21) +* upper: Character sets. (line 117) +* uppercase, translating to lowercase: Input. (line 48) +* use time, changing: touch invocation. (line 54) +* use time, printing or sorting files by: Sorting the output. (line 14) +* USER: su invocation. (line 18) +* user id, switching: su invocation. (line 6) +* user information, commands for: User information. (line 6) +* user name, printing: logname invocation. (line 6) +* usernames, printing current: users invocation. (line 6) +* users: users invocation. (line 6) +* UTC: Options for date. (line 84) +* utmp <1>: who invocation. (line 15) +* utmp <2>: users invocation. (line 14) +* utmp: logname invocation. (line 6) +* valid file names, checking for: pathchk invocation. (line 6) +* vdir: vdir invocation. (line 6) +* verbose ls format: What information is listed. + (line 130) +* verifying MD5 checksums: md5sum invocation. (line 53) +* version number, finding: Common options. (line 33) +* version of kernel: uname invocation. (line 72) +* version, sorting option for ls: Sorting the output. (line 56) +* version-control Emacs variable: Backup options. (line 24) +* VERSION_CONTROL <1>: ln invocation. (line 55) +* VERSION_CONTROL <2>: mv invocation. (line 50) +* VERSION_CONTROL <3>: install invocation. (line 36) +* VERSION_CONTROL <4>: cp invocation. (line 61) +* VERSION_CONTROL: Backup options. (line 13) +* vertical sorted files in columns: General output formatting. + (line 15) +* vtN: Output. (line 59) +* wc: wc invocation. (line 6) +* week in date strings: Relative items in date strings. + (line 15) +* werase: Characters. (line 59) +* wheel group, not supported: su invocation. (line 87) +* who: who invocation. (line 6) +* who am i: who invocation. (line 21) +* whoami: whoami invocation. (line 6) +* word count: wc invocation. (line 6) +* working context: Working context. (line 6) +* working directory, printing: pwd invocation. (line 6) +* wrapping long input lines: fold invocation. (line 6) +* writable file check: Access permission tests. + (line 21) +* write permission: Mode Structure. (line 11) +* write permission, symbolic: Setting Permissions. (line 60) +* write, allowed: who invocation. (line 93) +* wtmp <1>: who invocation. (line 15) +* wtmp: users invocation. (line 14) +* xcase: Local. (line 36) +* xdigit: Character sets. (line 120) +* XON/XOFF flow control: Input. (line 38) +* year in date strings: Relative items in date strings. + (line 15) +* yes: yes invocation. (line 6) +* yesterday: Options for date. (line 11) +* yesterday in date strings: Relative items in date strings. + (line 29) +* yottabyte, definition of: Block size. (line 131) +* Youmans, B.: Introduction. (line 19) +* zero-length string check: String tests. (line 15) +* zettabyte, definition of: Block size. (line 123) +* |: Relations for expr. (line 11) + + + +Tag Table: +Node: Top7431 +Node: Introduction20029 +Node: Common options21588 +Node: Exit status24237 +Node: Backup options24967 +Node: Block size27032 +Node: Target directory31936 +Node: Trailing slashes35417 +Node: Traversing symlinks36438 +Node: Treating / specially37509 +Ref: Treating / specially-Footnote-138775 +Node: Special built-in utilities38844 +Node: Standards conformance39977 +Node: Output of entire files41486 +Node: cat invocation42019 +Node: tac invocation44722 +Node: nl invocation45984 +Node: od invocation49863 +Node: Formatting file contents56327 +Node: fmt invocation56778 +Node: pr invocation59591 +Node: fold invocation72682 +Node: Output of parts of files74191 +Node: head invocation74699 +Node: tail invocation76268 +Node: split invocation83175 +Node: csplit invocation85305 +Node: Summarizing files89417 +Node: wc invocation89945 +Node: sum invocation91947 +Node: cksum invocation93352 +Node: md5sum invocation94492 +Node: Operating on sorted files97839 +Node: sort invocation98443 +Ref: sort invocation-Footnote-1115516 +Node: uniq invocation116068 +Node: comm invocation119969 +Node: tsort invocation121297 +Node: tsort background124331 +Node: ptx invocation126094 +Node: General options in ptx128898 +Node: Charset selection in ptx129610 +Node: Input processing in ptx130512 +Node: Output formatting in ptx136206 +Node: Compatibility in ptx142772 +Node: Operating on fields within a line146000 +Node: cut invocation146404 +Node: paste invocation149730 +Node: join invocation151058 +Node: Operating on characters154957 +Node: tr invocation155393 +Node: Character sets157111 +Node: Translating161339 +Node: Squeezing163430 +Node: expand invocation166497 +Node: unexpand invocation168070 +Node: Directory listing169932 +Node: ls invocation170418 +Ref: ls invocation-Footnote-1172232 +Node: Which files are listed172454 +Node: What information is listed175819 +Node: Sorting the output183659 +Node: More details about version sort185979 +Node: General output formatting187478 +Node: Formatting file timestamps190887 +Node: Formatting the file names196117 +Node: dir invocation199032 +Node: vdir invocation199467 +Node: dircolors invocation199869 +Node: Basic operations201349 +Node: cp invocation201969 +Node: dd invocation213682 +Node: install invocation220670 +Node: mv invocation224764 +Node: rm invocation229008 +Node: shred invocation231845 +Node: Special file types238658 +Node: link invocation240154 +Node: ln invocation241160 +Node: mkdir invocation246082 +Node: mkfifo invocation247662 +Node: mknod invocation248651 +Node: readlink invocation250394 +Node: rmdir invocation252135 +Node: unlink invocation253409 +Node: Changing file attributes254368 +Node: chown invocation255181 +Node: chgrp invocation260951 +Node: chmod invocation263705 +Node: touch invocation265879 +Node: Disk usage269992 +Node: df invocation270684 +Node: du invocation275981 +Node: stat invocation281634 +Node: sync invocation284705 +Node: Printing text285632 +Node: echo invocation286006 +Node: printf invocation288183 +Node: yes invocation292890 +Node: Conditions293502 +Node: false invocation294093 +Node: true invocation294838 +Node: test invocation296149 +Node: File type tests298109 +Node: Access permission tests298991 +Node: File characteristic tests299876 +Node: String tests300641 +Node: Numeric tests301306 +Node: Connectives for test302103 +Node: expr invocation302456 +Node: String expressions304694 +Node: Numeric expressions307277 +Node: Relations for expr307915 +Node: Examples of expr309115 +Node: Redirection309843 +Node: tee invocation310288 +Node: File name manipulation311353 +Node: basename invocation311801 +Node: dirname invocation312475 +Node: pathchk invocation313111 +Node: Working context314464 +Node: pwd invocation315108 +Node: stty invocation315782 +Node: Control318542 +Node: Input319302 +Node: Output320778 +Node: Local322034 +Node: Combination323616 +Node: Characters325778 +Node: Special327332 +Node: printenv invocation328698 +Node: tty invocation329461 +Node: User information330167 +Node: id invocation330819 +Node: logname invocation332069 +Node: whoami invocation332696 +Node: groups invocation333183 +Node: users invocation333907 +Node: who invocation334854 +Node: System context337735 +Node: date invocation338225 +Node: Time directives339849 +Node: Date directives341191 +Node: Literal directives343462 +Node: Padding343749 +Node: Setting the time344568 +Node: Options for date345558 +Node: Examples of date348596 +Ref: %s-examples350056 +Node: uname invocation352043 +Node: hostname invocation354283 +Node: hostid invocation354896 +Node: Modified command invocation355583 +Node: chroot invocation356220 +Node: env invocation358340 +Node: nice invocation360419 +Node: nohup invocation363457 +Node: su invocation365140 +Node: Process control369611 +Node: kill invocation369834 +Node: Delaying374200 +Node: sleep invocation374397 +Node: Numeric operations375208 +Node: factor invocation375540 +Node: seq invocation376878 +Node: File permissions380699 +Node: Mode Structure381293 +Node: Symbolic Modes384427 +Node: Setting Permissions385436 +Node: Copying Permissions387987 +Node: Changing Special Permissions388789 +Node: Conditional Executability390425 +Node: Multiple Changes391058 +Node: Umask and Protection392722 +Node: Numeric Modes393827 +Node: Date input formats395636 +Node: General date syntax397989 +Node: Calendar date items400702 +Node: Time of day items402707 +Node: Time zone items404767 +Node: Day of week items406009 +Node: Relative items in date strings407006 +Node: Pure numbers in date strings409816 +Node: Seconds since the Epoch410805 +Node: Specifying time zone rules412438 +Node: Authors of get_date414810 +Node: Opening the software toolbox415570 +Node: Toolbox introduction416242 +Node: I/O redirection418965 +Node: The who command421799 +Node: The cut command422696 +Node: The sort command423759 +Node: The uniq command424463 +Node: Putting the tools together425153 +Ref: Putting the tools together-Footnote-1437110 +Node: GNU Free Documentation License437184 +Node: How to use this License for your documents455693 +Node: Index457100 + +End Tag Table diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/lib/ChangeLog b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/lib/ChangeLog new file mode 100644 index 0000000..6a33a3f --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/lib/ChangeLog @@ -0,0 +1,5709 @@ +2005-01-04 Paul Eggert <eggert@cs.ucla.edu> + + * human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional + definitions to be after all include files, to avoid collisions. + Problem reported by Bob Proulx. + +2005-01-04 Bob Proulx <bob@proulx.com> + + * obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to simplify + offsetof() macro construct to avoid compile failure with native HP-UX + 11.0 ANSI C compiler. + +2005-01-03 Paul Eggert <eggert@cs.ucla.edu> + + * utimens.c (futimens): Robustify the previous patch, by checking + for known valid error numbers rather than observed invalid ones. + +2005-01-03 Jim Meyering <jim@meyering.net> + + * utimens.c (futimens): Account for the fact that futimes + can also fail with errno == ENOSYS in that case. + Patch from Dmitry V. Levin. + +2005-01-03 Paul Eggert <eggert@cs.ucla.edu> + + * utimens.c (futimens) [HAVE_FUTIMES]: Fall back on utimes if + futimes fails with errno == ENOENT. Problem reported by + Dmitry V. Levin. + +2005-01-02 Jim Meyering <jim@meyering.net> + + * version-etc.c (version_etc_copyright): Update copyright date. + +2004-12-31 Jim Meyering <jim@meyering.net> + + * openat.c (rpl_openat): Correct comment. + Call free_cwd, to avoid leaking a file descriptor. + +2004-12-23 Paul Eggert <eggert@cs.ucla.edu> + + * getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no + need to extend the stack. + (YYINITDEPTH): New macro, so that the initial stack isn't overly + large. + +2004-12-19 Paul Eggert <eggert@cs.ucla.edu> + + * c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not + HAVE_DECL_STRTOLD. + + * alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H. + Remove now-obsolete comment about AIX. + * getdate.y: Include <alloca.h> only if HAVE_ALLOCA. + (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA. + (YYMAXDEPTH): New macro. + +2004-12-11 Jim Meyering <jim@meyering.net> + + * chdir-long.c: Fail via #error if PATH_MAX is not defined, since + this file is now compiled only on systems that define PATH_MAX. + +2004-12-08 Paul Eggert <eggert@cs.ucla.edu> + + * getdate.y (textint): New member "negative". + (time_zone_hhmm): New function. + Expect 14 shift-reduce conflicts, not 13. + (o_colon_minutes): New rule. + (time, zone): Use it to add support for +HH:MM, UTC+HH:MM. + (yylex): Set the "negative" member of signed numbers. + +2004-12-06 Jim Meyering <jim@meyering.net> + + * Makefile.am (libfetish_a_SOURCES): Begin removing .c and .h file + names, as they are added to AC_LIBSOURCES directives in the + corresponding m4/*.m4 files. + +2004-12-05 Jim Meyering <jim@meyering.net> + + Currently, fpending.m4 punts (by defining PENDING_OUTPUT_N_BYTES + to 1) if it doesn't find a valid expression for the replacement + function. Before this change, that might have gone undetected + for some time. Now, we'll catch it close to the source. + + * t-fpending.c: New file. Test the __fpending function. + This ensures that if there is an error in the definition of the + PENDING_OUTPUT_N_BYTES expression, we'll find about it right away; + that value is used only in the rare event that close_stdout's + fclose fails with EBADF. + * Makefile.am (unit-test): New target. + (check): Depend on it. + (noinst_PROGRAMS): Define. + (LDADD): Define. + * Makefile.am (unit-test): Depend on t-fpending. + Make the target .PHONY. + +2004-12-02 Paul Eggert <eggert@cs.ucla.edu> + + * openat.c: Include "openat.h" before other include files. + Include "exitfail.h". + (openat): Remove #undef; no longer needed now that we include openat.h + first. + (rpl_openat): Add comment about mode_t promotion. Simplify + code a bit by moving initializations around. Use exit_failure + rather than EXIT_FAILURE. + * openat.h: Add copyright and authorship notice. + (AT_FDCWD): Use the same value Solaris 9 uses, except of type + 'int' not 'unsigned int'. + + * save-cwd.c: Include "save-cwd.h" before other include files. + (O_DIRECTORY): Remove; not needed here, since "." must be + a directory. All uses removed. + (save_cwd): Use __sgi || __sun, not sun || __sun. __sun is + universal on Suns, and we also need to test for IRIX. + Revamp code to use 'if' rather than '#if'. + Avoid unnecessary comparison of cwd->desc to 0. + +2004-12-01 Paul Eggert <eggert@cs.ucla.edu> + + * hard-locale.c: Assume <locale.h> exists. + Include "strdup.h". + (GLIBC_VERSION): New macro. + (hard_locale): Assume setlocale exists. + Rewrite to avoid #ifdef. + Use strdup rather than malloc + strcpy. + * human.c: Assume <locale.h> exists. + (human_readable): Assume localeconv exists. + +2004-11-30 Paul Eggert <eggert@cs.ucla.edu> + + * getcwd.c (is_ENAMETOOLONG): New macro. + (__getcwd.c): Don't restore errno; glibc doesn't. + [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd + first, falling back to our code only if its results look suspicious. + Ensure that the resulting buffer is only as large as necessary. + + * readutmp.c: Include readutmp.h first. + Include <errno.h>, since readutmp.h no longer does that. + * readutmp.h: Don't include <errno.h>, + <sys/param.h>, <time.h>; not needed to establish interface. + (errno): Remove decl. + (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed. + (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME, + UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros. + +2004-11-30 Jim Meyering <jim@meyering.net> + + Change the name of the robust chdir function from chdir to chdir_long. + * save-cwd.c: Include chdir-long.h rather than chdir.h. + (restore_cwd): Use chdir_long, not chdir. + * chdir-long.c: Renamed from chdir.c. + * chdir-long.h: Renamed from chdir.h. + [!defined PATH_MAX]: Define chdir_long to chdir on systems like the Hurd. + * Makefile.am (libfetish_a_SOURCES): Reflect name changes. + + * chdir.c (O_DIRECTORY): Define, if necessary. + (memchrcspn): Tiny wrapper around memchr. + (rpl_chdir): Use memchrcspn rather than strcspn. + +2004-11-28 Jim Meyering <jim@meyering.net> + + * openat.c (rpl_openat): Also accept optional mode parameter. + * openat.h (rpl_openat): Adjust prototype. + + * save-cwd.c: Include "chdir.h", so that if save_cwd/getcwd + saves a name longer than PATH_MAX, restore_cwd's chdir can use it. + + * Makefile.am (libfetish_a_SOURCES): Add chdir.h and openat.h. + + This is a robust version of chdir, in that it can handle directory + names longer than PATH_MAX. + * chdir.c, chdir.h: New file. + * openat.c, openat.h: New files. + +2004-11-25 Paul Eggert <eggert@cs.ucla.edu> + + Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using + HP's ANSI C compiler. + * fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl. + Declaring int functions causes warnings on some modern systems and + shouldn't be needed to compile on ancient ones. + * same.c (MIN) [defined MIN]: Don't define, since it's already + defined. + + * mempcpy.c, mempcpy.h: New files, taken from gnulib. + * Makefile.am: (libfetish_a_SOURCES): Add getcwd.h, mempcpy.h. + * getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but + with the following changes. + (__set_errno): Parenthesize properly. + Include <stdbool.h>. + (MIN, MAX, MATCHING_INO): New macros. + (__getcwd): Define with prototype, not K&R form. + Use heuristics to allocate default buffer on stack if possible. + If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2) + behavior, and to avoid the PATH_MAX limit when computing + ../../../../... + Use MATCHING_INO to compare inode number to file. + Check for arithmetic overflow in size calculations. + Fix bug in reallocation of dot array that caused getcwd to fail + on directories nested deeper than 75. + Be more careful about saving errno on error. + Do not use realloc; use only free+malloc, as this is a bit + more flexible and avoids a needless copy operation. + Do not inspect st_dev and st_ino for symbolic links; POSIX + doesn't specify the latter. + Check for closedir errors. + Avoid needless casts. + Use "#ifdef weak_alias" around weak_alias, to be like other + glibc code. + The following changes to getcwd.c have effect only when used in + gnulib; they have no effect inside glibc proper. + (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove, + as alloca isn't used. + (alloca, __alloca): Likewise. + [!_LIBC]: Include "getcwd.h", "mempcpy.h". + Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h> + unconditionally, as gnulib assumes C89 or better. + Do not include <sys/param.h>. + (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove + no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or + better. + (NULL) [!defined NULL]: Remove; we assume C89 or better. + Include <dirent.h> in a way that is compatible with modern Autoconf. + (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN): + New macros, if not already defined. + Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__. + Use "_LIBC", not "defined _LIBC", for consistency. + (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has + a mempcpy module. + (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros. + (GETCWD_RETURN_TYPE): Remove. All uses replaced by char *. + * xgetcwd.c: David MacKenzie's old code was removed, so give + credit only to Jim Meyering and adjust the copyright dates. + Do not include <limits.h>, <stdio.h>, <sys/types.h>, + <stdlib.h>, <unistd.h>, "pathmax.h". + Instead, include "xgetcwd.h" (first) and "getcwd.h". + (INITIAL_BUFFER_SIZE): Remove. + (xgetcwd): Rely on getcwd, since we now depend on a reliable one. + +2004-11-23 Paul Eggert <eggert@cs.ucla.edu> + + * utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros. + (futimens): New function, which uses futimes if available. + (futimens, utimens): Support timespec==NULL, with same semantics + as utime and utimens. + * utimens.h (futimens): New decl. + +2004-11-23 Sergey Poznyakoff <gray@Mirddin.farlep.net> + + * getopt_.h: Re-addition of __getopt_argv_const caused + redefinition warnings. To avoid them, include the defines + in `#if !defined __need_getopt ... #endif'. The only place + where __getopt_argv_const is used is in definitions + of getopt_long and getopt_long_only below, which are as well + protected by `#ifndef __need_getopt'. + [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef + __need_getopt after including <stdio.h> and <unistd.h> These + headers might have defined it. + +2004-11-23 Jim Meyering <jim@meyering.net> + + * closeout.c: Revert last change, since it seems EBADF is always + defined. + +2004-11-22 Jim Meyering <jim@meyering.net> + + * closeout.c (EBADF): Fail with `#error ...' if it's not defined, + asking the user to report the problem. + +2004-11-17 Paul Eggert <eggert@cs.ucla.edu> + + * realloc.c (rpl_realloc): Call 'free' if n==0, since realloc + might fail. Problem reported by Yoann Vandoorselaere. + * calloc.c (rpl_calloc): Defend against buggy calloc implementations + that mishandle size_t overflow. + +2004-11-16 Paul Eggert <eggert@cs.ucla.edu> + + * xgetcwd.c: Include <limits.h>, for PATH_MAX. + (xgetcwd): Set errno correctly when failing. + Work around Solaris 9 bug: getcwd sets errno==ERANGE even though + the failure is actually due to a PATH_MAX problem. + + Further getopt changes to make it more likely that glibc will + buy the changes back. + * getopt.c (POSIXLY_CORRECT): New constant. + (getopt): Use it, so to preserve glibc semantic + * getopt1.c (getopt_long, getopt_long_only): Arg is char * const * + when compiling for libc. + * getopt_.h (__getopt_argv_const): Bring it back. + (getopt_long, getopt_long_only): Use it. + + * getopt.c (_getopt_initialize, _getopt_internal_r, _getopt_internal): + New arg POSIXLY_CORRECT. All callers changed. + (getopt): Argv is now char * const *, as per standard. + (_getopt_internal_r, _getopt_internal): Argv is now char **, + not char *__getopt_argv_const *. + * getopt1.c (getopt_long, _getopt_long_r, getopt_long_only, + _getopt_long_only_r): Likewise. + * getopt_.h (getopt, getopt_long, geopt_long_only): Likewise. + * getopt_int.h (_getopt_internal, _getopt_internal_r, + _getopt_long_r, _getopt_long_only_r): Likewise. + * getopt_.h (__getopt_argv_const): Remove. + (getopt): Argv is now char * const *, as per standard. + + * canon-host.c: Include "strdup.h". + (canon_host): Use getaddrinfo if available, so that IPv6 works. + Use strdup instead of malloc/strcpy to duplicate strings. + + * getdate.y (tORDINAL): New token. + (day, relunit): Allow it for relative times. + (relative_time_table): Use tORDINAL for ordinals. + +2004-11-15 Paul Eggert <eggert@cs.ucla.edu> + + * human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit. + (human_space_before_unit): New constant. + * human.c (human_readable): Support it. + +2004-11-14 Jim Meyering <jim@meyering.net> + + * closeout.c (close_stdout): Don't fail just because stdout was + closed initially, since some programs don't write to stdout in the + normal course of operation (other than --version and --help), and + we don't want this function to make e.g. `cp 1 2 >&-' fail. + But do fail if it was closed and someone has tried to write to it. + E.g., printf foo >&- + + * __fpending.c, __fpending.h: Restore these files. + They're useful after all. + * Makefile.am (libfetish_a_SOURCES): Add __fpending.h. + +2004-11-11 Paul Eggert <eggert@cs.ucla.edu> + + * getopt.c, getopt1.c, getopt_.h, getopt_int.h: + Sync from gnulib. + +2004-11-10 Paul Eggert <eggert@cs.ucla.edu> + + * allocsa.h, mbswidth.c, mktime.c, readlink.c, getdate.y, + quotearg.c, strftime.c: Sync from gnulib. + +2004-11-06 Jim Meyering <jim@meyering.net> + + * __fpending.c, __fpending.h: Remove files. + + * Makefile.am (libfetish_a_SOURCES): Remove __fpending.h, now + that it's no longer used. + + Ensure that no close failure goes unreported. + * closeout.c (close_stdout): Always close stdout. I.e., don't + return early when it seems there's nothing to flush. + Don't include __fpending.h. + +2004-11-03 Paul Eggert <eggert@cs.ucla.edu> + + * unsetenv.c: New file, from gnulib. Needed for new getdate.y. + * Makefile.am (libfetish_a_SOURCES): Remove setenv.c. + * xreadlink.c: Sync from gnulib. + +2004-11-03 Jim Meyering <jim@meyering.net> + + * Makefile.am (libfetish_a_SOURCES): Add setenv.c and setenv.h. + +2004-11-02 Paul Eggert <eggert@cs.ucla.edu> + + * getdate.y, getpass.c, setenv.h: Sync from gnulib. + +2004-10-29 Paul Eggert <eggert@cs.ucla.edu> + + * getdate.y, getpagesize.h, mktime.c: Sync from gnulib. + +2004-10-24 Paul Eggert <eggert@cs.ucla.edu> + + * mktime.c (leapyear): Arg is long int, not int. + Change imported from gnulib. + +2004-10-17 Paul Eggert <eggert@cs.ucla.edu> + + Sync from gnulib. + * diacrit.c, diacrit.h: Add copyright notice. + * getpass.c (fflush_unlocked, flockfile, funlockfile) + (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map + to real functions. + +2004-10-13 Jim Meyering <jim@meyering.net> + + * fts.c (fts_read): When about to fail (by returning NULL) due + to a failed fchdir or failed fts_safe_changedir call, set + `sp->fts_cur = p'. Do this by removing the explicit `return NULL;' + statements and setting p->fts_errno so execution falls through + to the common-case code below. Otherwise, after such a failure, + calling fts_close would attempt to free an already-freed buffer. + Reported by Luis Lopez Lopez in http://bugs.debian.org/276352. + +2004-10-04 Paul Eggert <eggert@cs.ucla.edu> + + Sync from gnulib. + + * xalloc.h (xmemdup): Renamed from xclone. + * xmalloc.c (xmemdup): Likewise. + * xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC, + XFREE): Remove these long-obsolescent macros. + * xmalloc.c (xstrdup): Implementation moved here from xstrdup.c + * xstrdup.c: Remove. + + * argmatch.c, closeout.c, error.c, exclude.c, getdate.y, + getndelim2.c, getpass.c, getusershell.c, linebuffer.c, + md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c, + regex.c, sha1.c, version-etc.c, yesno.c: + Include "unlocked-io.h" only if USE_UNLOCKED_IO. + * unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now + the includer's responsibility. + +2004-10-03 Paul Eggert <eggert@cs.ucla.edu> + + Sync from gnulib. + * dirfd.h, getpagesize.h: Add copyright notice. + * vasnprintf.c: (VASNPRINTF): Set errno=EOVERFLOW if the output is + too long. + * vasnprintf.h: Doc fix. + * vasprintf.c: Don't include <limits.h>. + (vasprintf): Rely on vasnprintf to set errno=EOVERFLOW. + +2004-09-23 Paul Eggert <eggert@cs.ucla.edu> + + * modechange.c (mode_compile): Don't decrement a pointer that + points to the start of a string, as the C Standard says the + resulting behavior is undefined. + +2004-09-22 Jim Meyering <jim@meyering.net> + + * getopt.c: Remove extraneous spaces before TAB. + * getopt_.h: Likewise. + + * backupfile.c: Remove trailing blanks. + * euidaccess.c: Likewise. + +2004-09-13 Paul Eggert <eggert@cs.ucla.edu> + + * backupfile.h (enum backuptype): Rename none -> no_backups, + simple -> simple_backups, numbered_existing -> + numbered_existing_backups, numbered -> numbered_backups + to avoid shadowing problems. All uses changed. + * argmatch.c (enum backuptype): Likewise. + * backupfile.c (check_extension, numbered_backup): + Rename locals to avoid shadowing 'basename'. + * backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than + once. + +2004-09-02 Paul Eggert <eggert@cs.ucla.edu> + + Port to diet libc. Problem reported by Felix von Leitner in + <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00171.html> + * fts.c (fts_stat, fts_open, fts_read): Use "unsigned short int" + rather than the unportable "u_short", and similarly for u_int. + * fts_.h (FTSENT): Likewise. + +2004-08-19 Paul Eggert <eggert@cs.ucla.edu> + + * getopt.c, getopt1.c: Sync from gnulib. + * getopt_.h: Renamed from getopt.h (this syncs from gnulib). + * Makefile.am (libfetish_a_SOURCES): Remove getopt.c, getopt.h, + getopt1.c, getopt_int.h. + (BUILT_SOURCES, EXTRA_DIST, all-local, $(lib_OBJECTS), getopt.h, + MOSTLYCLEANFILES): Add current gnulib snippet for getopt. + * .cppi-disable: Add getopt_.h, getopt_int.h. + * .cvsignore: Add getopt.h. + +2004-08-18 Paul Eggert <eggert@cs.ucla.edu> + + * userspec.c: Don't use <alloca.h>, so that we don't use alloca on + strings on unbounded length. alloca's performance benefits aren't + that important here. + (V_STRDUP): Remove. + (parse_with_separator): New function, with most of the internals + of the old parse_user_spec. Allow user to omit both user and group, + for compatibility with FreeBSD. + Clone only the user name, not the entire spec. + Do not set *uid, *gid unless entirely successful. + Avoid memory leak in some failing cases. + Fix regression for USER.GROUP reported by Dmitry V. Levin in + <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html> + (parse_user_spec): Rewrite to use parse_with_separator. + +2004-08-11 Paul Eggert <eggert@cs.ucla.edu> + + * fts.c (O_DIRECTORY): Define to 0 if the system doesn't define. + + * settime.c (settime): Recode to avoid warning with Sun Forte C 6U2. + + * obstack.c: Include <inttypes.h> and <stdint.h> if available. + (union fooround): Use uintmax_t, not long int. + The rest is a merge from libc: + [defined _LIBC]: Include <shlib-compat.h>. + (_obstack) [defined _LIBC]: Remove after 2.3.4. + + * xgethostname.c: Do not include error.h. (merge from gnulib). + + * fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing + wmemchr or wmemcpy. Problem reported by Robert Dahlem + for Reliant Unix 5.43. + +2004-08-09 Paul Eggert <eggert@cs.ucla.edu> + + * Makefile.am (libfetish_a_SOURCES): Add getpass.h. + * getpass.h: New file. + * .cpp-disable: Add it. + * getpass.c [!_LIBC]: Include it. + + * obstack.h (obstack_empty_p): + Don't assume that chunk->contents is suitably aligned. + * obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk): + Likewise. Problem reported by Benno in + <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>. + + * chown.c (rpl_chown): Work even if the file is writeable but not + readable. This could be improved further but it'd take some work. + * fts.c (diropen): New function. + (fts_open, fts_read, fts_children, fts_safe_changedir): + Use it, so that the code works even if the directory + is writeable but not readable. We'd like it to work even if + the directory is merely executable, but I don't know how to do + that portably. + + * xalloc-die.c: New file. + * xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove. + All uses removed. + * xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted): Likewise. + Move inclusions of gettext.h, error.h, exitfail.h to xalloc-die.c. + (_, N_, xalloc_die): Move to xalloc-die.c. + * userspec.c (parse_user_spaec): Use xstrdup rather than strdup, + so that we needn't mess with xalloc_msg_memory_exhausted. + + * sha1.h (sha1_ctx): Renamed from sha_ctx. + (sha1_init_ctx): Renamed from sha_init_ctx. + (sha1_process_block): Renamed from sha_process_block. + (sha1_process_bytes): Renamed from sha_process_bytes. + (sha1_finish_ctx): Renamed from sha_finish_ctx. + (sha1_read_ctx): Renamed from sha_read_ctx. + (sha1_stream): Renamed from sha_stream. + (sha1_buffer): Renamed from sha_buffer. + * sha1.c: Likewise. + +2004-08-07 Paul Eggert <eggert@cs.ucla.edu> + + * canonicalize.h, cycle-check.h, stat-macros.h, strdup.h, + strftime.h, xnanosleep.c: Merge from gnulib. + +2004-08-05 Paul Eggert <eggert@cs.ucla.edu> + + Merge with gnulib and deal with some minor cleanups resulting. + + * .cppi-disable: Change fnmatch.h to fnmatch_.h. + * .cvsignore: Add fnmatch.h, poll.h, stdbool.h, sysexit.h. + Remove safe-lstat.c, safe-lstat.h, safe-stat.c, safe-stat.h. + + * backupfile.h, closeout.h, full-write.h, mbswidth.h, xalloc.h: + Add extern "C" wrappers for C++. + + * dirname.h (IS_ABSOLUTE_FILE_NAME): Port to DOS. + + * gettime.c (gettime): Fall back on `time' if `gettimeofday' + doesn't work. + * settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway). + (ENOSYS): Define if not defined. + (settime): Fall back on stime if it exists and settimeofday fails. + But don't bother with fallbacks if a method fails with errno == EPERM. + + * obstack.h: Add white space. + + * printf-parse.c, printf-parse.h, vasnprintf.c: Merge changes from + gnulib, but rewrite to avoid "xsize.h". + +2004-08-04 Paul Eggert <eggert@cs.ucla.edu> + + * mountlist.c (SIZE_MAX): Define after including files, to avoid + a collision on OpenBSD 3.4. + + * fts.c (LONGEST_MODIFIER): New macro. + (PRIuMAX) [!PRI_MACROS_BROKEN && !defined PRIuMAX]: New macro. + (find_matching_ancestor): Use it for dev_t and ino_t. + + * getndelim2.c: Sync from gnulib. + + * error.c: Work around bug in OpenBSD 3.4 sterror_r: it + sometimes returns a positive errno value even when it succeeds. + (print_errno_message) [!LIBC]: Fall back on strerror if + __strerror_r fails. + +2004-08-02 Paul Eggert <eggert@cs.ucla.edu> + + * canonicalize.c (errno): Remove decl; we now assume C89 or better. + * chown.c (errno): Likewise. + * closeout.c (errno): Likewise. + * dup-safer.c (errno): Likewise. + * dup2.c (errno): Likewise. + * exclude.c (errno): Likewise. + * fopen-safer.c (errno): Likewise. + * ftruncate.c (errno): Likewise. + * full-write.c (errno): Likewise. + * getcwd.c (errno): Likewise. + * lchown.c (errno): Likewise. + * memcoll.c (errno): Likewise. + * nanosleep.c (errno): Likewise. + * putenv.c (errno): Likewise. + * rmdir.c (errno): Likewise. + * same.c (errno): Likewise. + * savedir.c (errno): Likewise. + * setenv.c (errno): Likewise. + * stat.c (errno): Likewise. + * utime.c (errno): Likewise. + * xgetcwd.c (errno): Likewise. + * xmemcoll.c (errno): Likewise. + * xreadlink.c (errno): Likewise. + * xstrtol.c (errno): Likewise. + * canonicalize.h (enum canonicalize_mode_t): Reformat comments to + fit in 80 columns. + * fileblocks.c (textutils_fileblocks_unused): Make it a typedef + instead of an int, to save a few bytes in the object file. + * getdate.y (lookup_word): Rewrite to avoid cast. + * getloadavg.c: Include <stdbool.h>. + (getloadavg_initialized): Use bool for booleans. + * hard-locale.c (hard_locale): Return bool, not int. + * hard-locale.h (hard_locale): Likewise. Include <stdbool.h>. + * hash.c (hash_string): Rewrite to avoid cast. + * human.h: Use Autoconf-suggested pattern for inttypes and stdint. + * strtiomax.c: Likewise. + * xstrtol.h: Likewise. + * nanosleep.c: Include stdbool.h. + (rpl_nanosleep): Usee bool for booleans. + * quotearg.c: Include stdbool.h. + (quotearg_buffer_restyled): Use bool for booleans. + * readtokens.c (readtoken): Rewrite to avoid casts. + * same.c (same_name): Return bool, not int. + * same.h (same_name): Likewise. Include <stdbool.h>. + * version-etc.c (version_etc_va): Use size_t for sizes. + * xnanosleep.c: Include limits.h, stdbool.h. + (CHAR_BIT): Remove. + (timespec_subtract, xnanosleep): Use bool for booleans. + * xstrtoimax.c: Just include xstrtol.h rather than rolling our + own include pattern. + * xstrtoumax.c: Likewise. + * xstrtol.c (__xstrtol): Rewrite to avoid casts. + * yesno.c: Include yesno.h first. + (yesno): Return bool, not int. + * yesno.h (yesno): Likewise. Include <stdbool.h>. + + * xstrtod.h (xstrtod): Return bool, not int. Invert the + sense of the boolean. All uses changed. + * xstrtod.c (xstrtod): Likewise. + * nanosleep.c: Include stdbool.h. Use bool for booleans. + + * xgethostname.c: Don't include <sys/types.h> or "exit.h"; + no longer needed. + (errno): Remove decl; we now assume C89 or better. + Include unistd.h if available, for gethostname. + (ENAMETOOLONG): Define to 0, not 9999, to avoid colliding with + existing errno values if any. + (gethostname): Remove decl, since unistd.h declares it (or doesn't, + in which case it's an older system and it should just work). + (xgethostname): Don't assume host name length is less than INT_MAX. + Exit if malloc fails, just as the comment says. + + * save-cwd.c: Include <stdbool.h>. + (errno): Remove decl; we now assume C89 or better. + (save_cwd): Use bool for booleans. + (save_cwd, restore_cwd): Return -1 on failure, not 1, since we set + errno on failure. + + * readutmp.h (UT_USER): Parenthesize properly. + (UT_USER_SIZE): New constant. + (read_utmp): Don't assume that the number of users is less than + INT_MAX. + * readutmp.c (read_utmp): Likewise. + Check for integer overflow in size calculations. + Return -1 (not 1) on failure, since we set errno in that case. + + * posixtm.c (posix_time_parse): Don't assume that the length of + the string being parsed is <= UINT_MAX. + + * mountlist.h (read_file_system_list): Accept bool flag, not int. + * mountlist.c (read_file_system_list): Likewise. + * mountlist.h: Include <stdbool.h>. + * mountlist.c (errno): Remove decl; we now assume C89 or better. + (xatoi): Remove; replaced by strtoul. Hence device numbers can now + go up to ULONG_MAX. + + * isdir.c: Remove; no longer needed. + * Makefile.am (libfetish_a_SOURCES): Remove isdir.c. + + * fts_.h: Add an FSF copyright notice, since our changes are becoming + nontrivial. + * fts.c: Likewise. + * fts_.h: Include stddef.h, for ptrdiff_t. + (FTS.fts_nitems): Now size_t, not int, for hosts that allow more + than INT_MAX entries in a directory. + (FTS_ROOTPARENTLEVEL): Parenthesize properly. + (FTSENT.fts_level): Now ptrdiff_t, not int, to allow recursing more + than INT_MAX levels deep on 64-bit hosts. + (FTSENT.fts_namelen): Now size_t, not u_short, to support hosts like + the Hurd that don't have arbitrary limits on directory entry lengths. + (FTSENT.fts_statp): Now an array, not a pointer, so that we don't + have to play unportable games with pointer arithmetic. Keep it array + for the benefit of user code that assumes it is a pointer. + * fts.c: Include stdint.h if available, as Autoconf suggests. + (ALIGNBYTES, ALIGN): Remove; no longer needed now that fts_statp + is an array. + (fts_alloc, fts_palloc, fts_sort, fts_load, fts_build): + Use size_t for sizes. + (fts_stat, fts_safe_changedir, fts_debug, fts_read, fts_build, + fts_palloc): + Use bool when appropriate. + (SIZE_MAX, TYPE_SIGNED): New macros. + (fts_read): Use u_short for instructions. + (fts_build): Use ptrdiff_t for levels. Don't assume file name lengths + fit into int. Don't assume nlink_t is signed. + (find_matching_ancestor): Don't assume dev, ino fit in int. + (fts_stat): Use function prototype; required for bool arg. + (fts_sort): Detect integer overflow in size calculations. + (fts_alloc): Simplify allocation code, now that fts_statp is an array + and not a pointer. + + * fsusage.h: Include <stdbool.h>. + (struct fs_usage): Use uintmax_t for block sizes, so that they're + not limited to INT_MAX. + Use bool for booleans. + * fsusage.c: Use Autoconf-suggested pattern for inttypes and stdint. + Include unistd.h, for lseek. + + * fnmatch.c: Include <stdbool.h>. + (errno): Remove decl; we now assume C89 or better. + * fnmatch_loop.c (EXT, FCT): Use bool when appropriate. + (FCT): Use size_t, not unsigned int, for sizes. + (EXT): Use size_t, not int, for sizes. + + * stripslash.c (strip_trailing_slashes): Now returns bool. + * dirname.h (strip_trailing_slashes): Likewise. + Include <stdbool.h>. + * dirname.c (dir_name): Use bool when appropriate. + + * argmatch.h (argmatch, __xargmatch_internal, argmatch_invalid): + Use ptrdiff_t, not int, when counting arguments, to allow more + than INT_MAX arguments. + * argmatch.c: Likewise. Use bool when appropriate. + +2004-08-01 Paul Eggert <eggert@cs.ucla.edu> + + * safe-read.c (errno): Remove decl; we now assume C89 or better. + (safe_rw): Don't work around Tru64 bug unless the bug symptoms + manifest themselves. This allows us to do proper reads and writes + on other hosts, e.g., "dd" with a block size greater than 2**31. + + * md5.c (UNALIGNED_P): Use size_t; in practice, this is just as + good as uintptr_t in checking for alignments, and has fewer + configuration hassles. + * sha1.c (UNALIGNED_P): Likewise. + * md5.h: Don't include <limits.h>. Include <inttypes.h> if available, + as it defines symbols like UINT32_MAX on Solaris 8. + (md5_uint32): Assume uint32_t exists; Autoconf will define it + otherwise (if the host has a 32-bit unsigned type, anyway). + * memchr.c: Don't include inttypes.h or stdint.h. + (UNALIGNED_P): Remove. + (__memchr): Use size_t, not uintptr_t, to test alignment. + * memrchr.c: Likewise, for __memrchr. + +2004-07-30 Paul Eggert <eggert@cs.ucla.edu> + + * makepath.h: Include <stdbool.h>. + (make_path, make_dir): Use bool, not int, since we're not setting + errno. + Use mode_t for modes, not int. All uses changed. + * makepath.c: Likewise. + (errno): Remove decl; no longer needed since we assume C89. + +2004-07-29 Paul Eggert <eggert@cs.ucla.edu> + + * modechange.c: Include <stdbool.h>. + (mode_compile): Use bool when appropriate. + + * memchr.c (UNALIGNED_P): Use sizeof, not alignof, for better + performance on m68k-linux. Reported by Andreas Schwab in + <http://lists.gnu.org/archive/html/bug-coreutils/2004-07/msg00104.html>. + * memrchr.c (UNALIGNED_P): Likewise. + +2004-07-28 Paul Eggert <eggert@cs.ucla.edu> + + * userspec.c: Include <stdbool.h>, "inttostr.h". + (V_STRDUP): Don't assume the string's length fits in int. + (ISDIGIT): unsigned -> unsigned int + (is_number): Define only ifdef __DJGPP__; not needed elsewhere. + Use bool instead of int where appropriate. + Do not allow empty strings. + (parse_user_spec): Parse numbers as decimal integers, even if + they have a leading 0. Don't assume uids and gids fit in int. + + * memchr.c: Include <stddef.h>, not <stdlib.h> and <sys/types.h>. + (LONG_MAX_32_BITS): Remove. + Include <inttypes.h> and <stdint.h> if available. + (alignof, UNALIGNEDP): New macro, portable to all C89 hosts. + (__memchr): Don't assume unsigned long int is either 4 or 8 bytes; + let it be any number of bytes greater than or equal to 4. + * memrchr.c: Likewise, with __memrchr. + + * md5.h: Include <stdint.h> if HAVE_STDINT_H || _LIBC, not + ifdef _LIBC. + (md5_uint32): Use uint32_t if available. Simplify fallback ifdefs. + * md5.c: Don't include <sys/types.h> or <stdlib.h>; <stddef.h> + suffices with C89 or better. + (alignof): New macro, portable to all C89 hosts. + (UNALIGNED): Use it. Use uintptr_t if available, and assume + everything is unaligned otherwise; this is more portable than + assuming 'unsigned long int' will always work. + * sha1.c: Likewise. + + * getugroups.c: Include <errno.h>. + (EOVERFLOW): Define if not defined. + (getgroups): Return -1 with errno=EOVERFLOW if an integer overflow + occurs. + +2004-07-27 Paul Eggert <eggert@cs.ucla.edu> + + * euidaccess.c [HAVE_LIBGEN_H]: Include <libgen.h>, for + eaccess on Solaris and SVR4-like systems. + (euidaccess): Use HAVE_EACCESS, not HAVE_DECL_EACCESS. + + cycle-check integer overflow fixup. + + * cycle-check.h: Remove now-inaccurate comment about the files + you need to include first. You don't need to include any files + other than the usual config.h. + Include <inttypes.h> and <stdint.h> if available, for uintmax_t. + Remove 'struct stat;' not needed since we know sys/stat.h has + been included by dev-ino.h. + (struct cycle_check_state): Change chdir_counter to uintmax_t, + not size_t, since it isn't limited by object sizes. + Change magic from long unsigned int to int; that's good enough + for our use. + * cycle-check.c (is_zero_or_power_of_two): Renamed from + is_power_of_two, to reflect better what it really does. + All uses changed. Arg is now uintmax_t, not unsigned int + (it should have been unsigned long int -- that was a bug). + (cycle_check): Check for integer overflow in cycle count, + and report a cycle if that happens, as it must be a cycle + by this point. + + backupfile.c rewrite to avoid arbitrary limits on lengths of + numeric backup extensions. + + * addext.c: Remove; no longer needed. + * Makefile.am (libfetish_a_SOURCES): Remove addext.c. + * backupfile.h (addext): Remove decl. + * backupfile.c: Include "backupfile.h" first. + Include errno.h, stdbool.h, limits.h, unistd.h, xalloc.h. + (CLOSEDIR, INT_STRLEN_BOUND): Remove. + (pathconf) [! (HAVE_PATHCONF && defined _PC_NAME_MAX)]: New macro. + (_POSIX_NAME_MAX) [!defined _POSIX_NAME_MAX]: New macro. + (NAME_MAX_MAXIMUM): New macro. Unlike the old addext.c, we + also look at _XOPEN_NAME_MAX, for better performance on modern + hosts that support only file names of length 255 or more. + (ISDIGIT): unsigned -> unsigned int + (max_backup_version, version_number): Remove. + (check_extension): New function. Similar to the old addext, but + static, assumes that the extension has already been added, + and a bit more careful on DOS hosts. + (numbered_backup): New function. It does what max_backup_version + and version_number used to do, but it doesn't use integer arithmetic + to calculate extensions so it doesn't overflow. + (find_backup_file_name): Rewrite to use these new functions. + This has a new optimization: we needn't call pathconf if the + new numbered backup name has the same length as the old. + Also, use xmalloc rather than malloc, so that the caller + needn't worry about memory exhaustion. + +2004-07-25 Paul Eggert <eggert@cs.ucla.edu> + + * euidaccess.c [!defined LIBC]: Included group-member.h, stat-macros.h. + (S_IXUSR, S_IXGRP, S_IXOTH, S_IROTH, S_IWOTH, S_IXOTH): + Remove; now done by stat-macros.h. + (NGROUPS_MAX, group_member): Remove; now done by group-member.h. + No need to include <limits.h>. + (errno): Remove decl; we now assume C89 or better. + (access, getuid, getgid, geteuid, getegid, stat) [defined _LIBC]: + New macros. + (uid, gid, have_ids): Remove these static variables. + They weren't accurate for programs that also invoked setreuid etc. + (euidaccess) [defined EFF_ONLY_OK || defined ACC_SELF || + HAVE_DECL_EACCSS]: Use builtin substitutes. + [defined _LIBC]: Ignore __libc_enable_secure; it's not a + correct optimization for programs run as root that later + invoke setreuid. + [no builtin substitutes && HAVE_DECL_SETREGID && + PREFER_NONREENTRANT_EUIDACCESS]: + Use setreuid+setregid to get the correct answer. + [no builtin substitutes && ! (HAVE_DECL_SETREGID && + PREFER_NONREENTRANT_EUIDACCESS)]: + Don't assume that the stat macros have their historical values, + as POSIX doesn't require this. + [defined TEST]: Include <stdlib.h>; don't include errno.h + twice; include <error.h> rather than "error.h". + +2004-07-23 Paul Eggert <eggert@cs.ucla.edu> + + * Makefile.am (libfetish_a_SOURCES): Add fcntl-safer.h, + open-safer.c. + * fcntl-safer.h, open-safer.c: New files. + +2004-07-12 Paul Eggert <eggert@cs.ucla.edu> + + * c-strtod.c (STRTOD_L): New macro. + (C_STRTOD) [defined LC_ALL_MASK]: Use it, so that the + code is reentrant on platforms that have strtod_l. + + * getloadavg.c: Include <errno.h>, <stdio.h>, <stdlib.h> even + if HAVE_GETLOADAVG is defined, so that the test program can work. + (errno): Remove declaration; not needed in C89 or later. + Include "c-strtod.h". + Do not include locale.h or define setlocale; no longer needed. + Include <limits.h>. + (INT_STRLEN_BOUND): New macro. + (getloadavg): Use it to compute buffer size. + Don't assume that buffer will be properly terminated by 'read'. + Use c_strtod instead of setlocale. + (main) [defined TEST]: Return int, not void. + +2004-07-11 Paul Eggert <eggert@cs.ucla.edu> + + * Makefile.am (libfetish_a_SOURCES): Add c-strtold.c. + * c-strtold.c: New file. + * c-strtod.c: Include <config.h> first. + (C_STRTOD, DOUBLE, STRTOD): New macros. + (c_strtod): Use them. + * c-strtod.h (c_strtold): New decl. + +2004-07-07 Jim Meyering <jim@meyering.net> + + Don't infloop when MAXSYMLINKS is not defined. + Detect symlink loops much earlier (albeit lazily) on systems + with MAXSYMLINKS defined to a large value. + + * canonicalize.c: Include "cycle-check.h". + (canonicalize_filename_mode): Don't try to detect loops by counting + symlink-hops. Instead, use the cycle-check module. + + * cycle-check.h: Include stdbool.h. + Forward-declare `struct stat'. + + * canonicalize.c (canonicalize_filename_mode): Remove do-while(0) loop. + Replace each corresponding `break' stmt with `continue'. + +2004-07-06 Jim Meyering <jim@meyering.net> + + * canonicalize.c: Include "stat-macros.h". + (canonicalize_filename_mode): Remove #ifdef S_ISLNK, now that + S_ISLNK is guaranteed to be defined (via stat-macros.h). + +2004-04-03 Dmitry V. Levin <ldv@altlinux.org> + + * Makefile.am (libfetish_a_SOURCES): Add canonicalize.c + unconditionally. + * canonicalize.h (canonicalize_mode_t): New type. + * canonicalize.c: Include "file-type.h". + (canonicalize_filename_mode): New function, based on + canonicalize_file_name, supports three canonicalize modes. + (canonicalize_file_name) + [!HAVE_CANONICALIZE_FILE_NAME && !HAVE_RESOLVEPATH]: Use it. + +2004-07-05 Jim Meyering <jim@meyering.net> + + * path-concat.c (path_concat): Improve comment. From Paul Eggert. + +2004-07-02 Paul Eggert <eggert@cs.ucla.edu> + + * canonicalize.c (canonicalize_file_name): Assume that path_concat + never returns NULL. + * path-concat.c (mempcpy): Don't define if a system header defines it. + Don't include stdio.h, stdlib.h, unistd.h, strdup.h. + (longest_relative_suffix): New function. + (path_concat): Use it. Assume first argument is not NULL. + Port to DOS. Omit redundant separators. + Report an error instead of returning NULL. + Use mempcpy instead of memcpy. + (xpath_concat): Remove: not declared or used. + +2004-06-30 Paul Eggert <eggert@cs.ucla.edu> + + * dirname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from + FILESYSTEM_PREFIX_LEN. All uses changed. + * mountlist.h (read_file_system_list): Renamed from + read_filesystem_list. All definitions and uses changed. + +2004-06-24 Jim Meyering <jim@meyering.net> + + * obstack.h (obstack_base): Fix parentheses. From Paul Eggert. + +2004-06-20 Jim Meyering <jim@meyering.net> + + * obstack.h (obstack_base): Cast to (void *), per documentation. + + * yesno.h: New file. + * yesno.c: Include "yesno.h". + * Makefile.am (libfetish_a_SOURCES): Add yesno.h. + +2004-06-19 Jim Meyering <jim@meyering.net> + + * filemode.c: Remove all S_IS* and S_IF* definitions. + Instead, just include "stat-macros.h". + * stat.c: Likewise. + * rmdir.c: Likewise. + * makepath.c: Likewise. + * lchown.c: Likewise. + * isdir.c: Likewise. + * canonicalize.c: Likewise. + + Add S_IS* definitions from filemode.c. + * stat-macros.h (S_ISCTG): Define to zero if not already defined. + (S_ISOFD): Likewise. + (S_ISOFL): Likewise. + +2004-06-11 Paul Eggert <eggert@cs.ucla.edu> + + * readutmp.c (extract_trimmed_name): Don't apply strchr to a + non-string; this leads to undefined behavior. + +2004-05-18 Paul Eggert <eggert@cs.ucla.edu> + + * fts.c (fts_stat, fts_alloc): Always allocate and use a struct + stat, even if the user isn't interested in the results. + This prevents a core dump in cycle_check when FTS_NOSTAT is set. + * lchown.c (lchown): Return EOPNOTSUPP if not supported; this + is what POSIX-2004 specifies. + * lchown.h (EOPNOTSUPP): Define if not defined. + (ENOSYS): Remove. + +2004-06-06 Jim Meyering <jim@meyering.net> + + * getdate.y: Update from gnulib. + +2004-05-25 Paul Eggert <eggert@cs.ucla.edu> + + * xreadlink.c: Include xreadlink.h first, to catch .h file + dependency problems. + (xreadlink): Accept new arg SIZE, for efficiency. + All decls and uses changed. + * xreadlink.h: Include <stddef.h>, for size_t. + * canonicalize.c (canonicalize_file_name): Update use of xreadlink. + +2004-06-01 Jim Meyering <jim@meyering.net> + + * xmalloc.c: Update from gnulib. + +2004-05-30 Jim Meyering <jim@meyering.net> + + * alloca_.h: Remove trailing blank. + +2004-05-29 Jim Meyering <jim@meyering.net> + + * dirname.h (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): Define. + + * calloc.c: New file. + +2004-05-21 Jim Meyering <jim@meyering.net> + + * alloca.c, alloca_.h, fnmatch.c: Update from gnulib. + * localcharset.c, regex.c: Likewise. + +2004-05-20 Jim Meyering <jim@meyering.net> + + * obstack.c, obstack.h: Update from gnulib. + +2004-05-16 Paul Eggert <eggert@cs.ucla.edu> + + * getline.c, getndelim2.c, getndelim2.h: Sync with gnulib. + +2004-05-11 Jim Meyering <jim@meyering.net> + + Prior to this change, rm required read access to the current + directory on most systems (ones with the fchdir function). + + * save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only + fails, try write-only, and finally, resort to using xgetcwd. + +2004-05-07 Jim Meyering <jim@meyering.net> + + Update from gnulib. + * obstack.c (_): Define only if not already defined. + * obstack.h (obstack_finish): Rename local: s/value/__value/. + +2004-05-03 Jim Meyering <jim@meyering.net> + + * lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown. + +2004-05-01 Jim Meyering <jim@meyering.net> + + * chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]: + Wrap old code with this conditional. + [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown + function that does not dereference symlinks. + +2004-04-18 Paul Eggert <eggert@twinsun.com> + + * nanosleep.c (suspended): Change its type from int to + sig_atomic_t volatile. + (first_call): Make it private to rpl_nanosleep, and have it + be zero initially as that's a bit faster. + (my_usleep): Round up fractional times instead of truncating them, + as this is the usual meaning for 'sleep'. + +2004-04-20 Jim Meyering <jim@meyering.net> + + * getndelim2.c (getndelim2): Upon realloc failure, don't leak memory. + +2004-04-18 Jim Meyering <jim@meyering.net> + + * readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc failure, + don't leak memory and do call END_UTMP_ENT. + +2004-04-13 Jim Meyering <jim@meyering.net> + + * quotearg.c, quotearg.h: Remove trailing blanks. + +2004-04-12 Jim Meyering <jim@meyering.net> + + * inttostr.h: Update from gnulib. + +2004-03-27 Paul Eggert <eggert@twinsun.com> + + * utimecmp.c, utimecmp.h: New files. + * Makefile.am (libfetish_a_SOURCES): Add utimecmp.c, utimecmp.h. + +2004-04-09 Jim Meyering <jim@meyering.net> + + * stat-macros.h: New file, with contents from file-type.h + and coreutils' system.h. + * Makefile.am (libfetish_a_SOURCES): Add stat-macros.h. + * file-type.c: Include "stat-macros.h". + * file-type.h (file_type): Move all macro defiitions to new file, + stat-macros.h. + +2004-03-30 Paul Eggert <eggert@twinsun.com> + + * cloexec.c, cloexec.h, config.charset, file-type.c, file-type.h: + * getloadavg.c, getndelim2.c, getusershell.c, group-member.c: + * human.c, path-concat.c, printf-args.c, printf-args.h: + * quotearg.c, quotearg.h, setenv.c, strdup.c: + * userspec.c, userspec.h, vasprintf.c: Sync from gnulib. + + * allocsa.c, allocsa.h, strdup.h: New files, from gnulib. + * Makefile.am (libfetish_a_SOURCES): Add allocsa.c, allocsa.h, + and strdup.h. + +2004-03-30 Jim Meyering <jim@meyering.net> + + * getloadavg.c: Merge changes from emacs (via gnulib). + +2004-03-28 Paul Eggert <eggert@twinsun.com> + + Fix some gotchas encountered when porting to Solaris 8, using + the Forte 6u2 compiler. + + * canonicalize.c [HAVE_UNISTD_H]: Include <unistd.h>, + for resolvepath declaration. + * fts.c: Include dirfd.h, for dirfd. + +2004-02-25 Paul Eggert <eggert@twinsun.com> + + * human.c (humblock): Support BLOCKSIZE as well as BLOCK_SIZE. + +2004-03-23 Paul Eggert <eggert@twinsun.com> + + * readtokens0.c (readtokens0): Return true on success rather + than on failure. All callers changed. This also happens to fix a + portability bug on pre-C99 hosts, where (bool) INTEGER sometimes + returns false even when INTEGER is nonzero. + +2004-03-23 Jim Meyering <jim@meyering.net> + + * Makefile.am (libfetish_a_SOURCES): Add getopt_int.h. + * getopt_int.h: New file, from gnulib. + * getopt.c, getopt.h, getopt1.c: Sync from gnulib. + * getopt.c, getopt.h: Remove space(s) before TAB. + + * mbswidth.c, mbswidth.h: Sync from gnulib. + +2004-03-21 Jim Meyering <jim@meyering.net> + + * readtokens0.c, readtokens0.h: New files. + * Makefile.am (libfetish_a_SOURCES): Add readtokens0.c and readtokens0.h + + * readtokens.c (readtoken): Don't leak 64 bytes when reading + an empty input stream. + + * readtokens.c: Include <stdbool.h>. + (readtoken): Use `size_t' rather than int/long. + All callers adjusted. + Use `bool' rather than `int' where appropriate. + Use memset rather than an explicit loop. + Use x2nrealloc rather than xrealloc. + Allow the use of `\0' as a delimiter. + (readtokens): Likewise. + * readtokens.h (readtoken, readtokens): Update prototypes. + +2004-02-29 Paul Eggert <eggert@twinsun.com> + + * getdate.h: Include stdbool.h, and timespec.h instead of + the usual <time.h> dance. + (get_date): Change signature to support fractional time stamps. + All callers changed. + * getdate.y: Include "getdate.h" first, as we can now + assume C89 and don't need to worry about 'const'. + Similarly, include "unlocked-io.h" near start, not in middle. + Include <limits.h>. + (textint.value): Use long int rather than int. + (textint.digits): Use size_t rather than int. + (BILLION, LOG10_BILLION): New constants. + (parser_control): New member rel_ns. Members day_ordinal, + time_zone, month, day, hour, minutes, rel_year, rel_month, + rel_day, rel_hour, rel_minutes, rel_seconds + are now long int, not int. Member seconds is now struct timespec, + not int. New member timespec_seen. Members dates_seen, days_seen, + local_zones_seen, rels_seen, times_seen, zones_seen are now size_t, + not int. + (%union.intval): Now long int, not int. + New member timespec. + (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens. + (seconds, signed_seconds, unsigned_seconds): New nonterminals. + (spec): Now is a timespec or an item list. + (timespec, items): New nonterminals. + (time, rel, relunit, number, get_date): + Add support for fractional seconds. + (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax. + (gmtime, localtime, mktime): Remove decls; not needed with C89. + (to_hour): First arg is now long int, not int. + (to_year): Returns long int, not int. + Don't treat year -70 like 70. + (tm_diff): Returns long int, not int. + (lookup_word): Use bool instead of int when appropriate. + (yylex): Use size_t for count, not int. + Detect overflow when parsing large integer constants. + Add support for fractions. + (get_date): Make pointers 'const' if possible. + Use more-portable code to detect integer overflow. + (main) [TEST]: Adjust to above changes. Test for localtime failure. + Don't use ctime; it's not reliable if the year has >4 digits. + +2004-03-15 Jim Meyering <jim@meyering.net> + + `date --date="21:04 +0100" +%S' would print the seconds value + from the current time, rather than `00'. + * getdate.y: For a date string like `10:23 +0100', + set the number of seconds to zero. Reported by Marc Haber. + +2004-03-04 Jim Meyering <jim@meyering.net> + + * cloexec.c (set_cloexec_flag) [ ! (F_GETFD && F_SETFD)]: + Return true, not false. + +2004-03-03 Paul Eggert <eggert@twinsun.com> + + * cloexec.c: Include "cloexec.h" first, and <unistd.h> before <fcntl.h>. + (set_cloexec_flag): Use bool for booleans. All uses changed. + If F_GETFD returns a negative number (not just -1), report a + failure. Don't use F_SETFD if the flags are already right. + Don't report a failure with F_SETFD unless it returns -1. + * cloexec.h: Include <stdbool.h>. + Adjust signature to use `bool' rather than `int'. + * getloadavg.c (getloadavg): Use `true', not `1'. + +2004-03-02 Dmitry V. Levin <ldv@altlinux.org> + + * cloexec.c: New file. + The set_cloexec_flag implementation imported from GNU C Library + Reference Manual. + * cloexec.h: New file. + * getloadavg.c: Include "cloexec.h". + (getloadavg): Use set_cloexec_flag instead of manual fcntl call. + * Makefile.am (libfetish_a_SOURCES): Add cloexec.c, cloexec.h. + +2004-02-23 Paul Eggert <eggert@twinsun.com> + + * userspec.c: Don't include "posixver.h". + (parse_user_spec): Fall back on USER.GROUP parsing, regardless + of POSIX version, as POSIX 1003.1-2001 allows that behavior as a + compatible extension. Simplify code by removing a boolean int + that was always nonzero if a string was nonnull. + +2004-02-05 Jim Meyering <jim@meyering.net> + + * timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define. + (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise. + From coreutils' system.h. + +2004-01-29 Jim Meyering <jim@meyering.net> + + * mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h. + +2004-01-21 Paul Eggert <eggert@twinsun.com> + + * argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]: + Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE. + * argmatch.h: Comment fix to match the above. + * long-options.c (parse_long_options): Use prototype + for usage function arg. Pass it EXIT_SUCCESS rather than 0, + for clarity. + * obstack.c (obstack_exit_failure) [!defined _LIBC]: + Now a macro referring to exit_failure, instead of a separate + variable. Include "exitfail.h" to get it. + * xstrtol.h: Include "exitfail.h". + (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2. + +2004-01-21 Jim Meyering <jim@meyering.net> + + * mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal + so as not to conflict with a different-sized __mktime_internal + function in GNU libc. + +2004-01-16 Jim Meyering <jim@meyering.net> + + Merge from gnulib. + * localcharset.c: Test HAVE_DECL_GETC_UNLOCKED, + rather than HAVE_GETC_UNLOCKED. + +2003-10-08 Paul Eggert <eggert@twinsun.com> + + Merge from gnulib. + + * unlocked-io.h: Include <stdio.h>, so that the caller + doesn't have to include <stdio.h> before us. + (clearerr_unlocked, feof_unlocked, ferror_unlocked, + fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked, + fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked, + putc_unlocked, putchar_unlocked): Define to the unlocked counterpart + if not declared, so that we can use getpass.c code from libc without + rewriting it. + (flockfile, ftrylockfile, funlockfile): New macros. + +2004-01-14 Paul Eggert <eggert@twinsun.com> + + Merge from gnulib. + + * fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided + with like-named macro in fnmatch.c. + (EXT): Use an internal constant instead. + + Merge fnmatch patches from glibc. + * fnmatch.c (mbsinit): Remove define. + Add libc_hidden_ver (__fnmatch, fnmatch). + * fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate. + Adjust to renaming of collseq_table_lookup to __collseq_table_lookup. + +2003-11-24 Paul Eggert <eggert@twinsun.com> + + Merge from gnulib. + + * alloca.c: Remove dependency on xalloc module. + (xalloc_die): Remove. + (memory_full) [!defined emacs]: New macro. + [!defined emacs]: Don't include xalloc.h. + (alloca): Invoke memory_full, not xalloc_die, if malloc fails or + address arithmetic overflows. Change datatypes a bit to avoid + unnecessary casts. + +2004-01-14 Paul Eggert <eggert@twinsun.com> + + * posixver.c: Include posixver.h. + +2004-01-12 Jim Meyering <jim@meyering.net> + + * posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new, + optional configure-time default. + +2004-01-10 Jim Meyering <jim@meyering.net> + + * version-etc.c (version_etc_copyright): Update copyright date. + +2003-12-20 Jim Meyering <jim@meyering.net> + + * fts.c [!_LIBC]: Undefine, then define-away __P. + +2003-12-19 Jim Meyering <jim@meyering.net> + + Rewrite fts to use a hash table or O(1)-mem cycle-detection + code rather than the tree-based tsearch functions. + * fts_.h: Include hash.h and cycle-check.h. + (FTS_TIGHT_CYCLE_CHECK): New value. + (FTS_OPTIONMASK): Adjust to include the new value. + (FTS_NAMEONLY, FTS_STOP): Increase to allow room for new value. + (struct FTS) [active_dir_ht]: New member. Replaces fts_dir_signatures. + (struct FTS) [cycle_state]: New member. + * fts.c: Don't include <search.h>. + [HAVE_INTTYPES_H]: Include <inttypes.h>. + (tdestroy, tfind, tsearch): Remove definitions. + (struct Active_dir): Rename from `known_object'. + (AD_compare, AD_hash): New functions. + (enter_dir, leave_dir): Rewrite to manipulate a hash table + rather than a tree. + (fts_open): Initialize hash table or cycle_state buffer. + (free_node): Remove function. + (find_matching_ancestor): Renamed/rewritten from look_up_active_dir. + (fts_cross_check): Adapt to use new data structure. + + * Makefile.am (libfetish_a_SOURCES): Remove search_.h. + (DISTCLEANFILES): Remove definition. + +2003-12-18 Jim Meyering <jim@meyering.net> + + Rewrite cycle detection code to work properly. + Add some framework (compiled out by default) to test it. + * fts.c (Dprintf, ENTER_DIR, LEAVE_DIR): Define. + (add_object): Remove function. Rewritten as... + (enter_dir): New function. + (leave_dir, free_node): New functions. + (fts_read): Ensure that we call ENTER_DIR or LEAVE_DIR, + as appropriate, before returning. + (look_up_active_dir, fts_cross_check) [FTS_DEBUG]: New functions. + (fts_stat): Don't perform the cycle check here. + Now it's done via enter_dir. + +2003-12-12 Jim Meyering <jim@meyering.net> + + * fts_.h (FTS) [fts_dir_signatures]: Add comment. + +2003-12-03 Paul Eggert <eggert@twinsun.com> + + * getgroups.c (getgroups): xmalloc takes one argument, not two. + Bug reported by Alfred M. Szmidt. + +2003-12-02 Jim Meyering <jim@meyering.net> + + * Makefile.am (libfetish_a_SOURCES): Reflect sha -> sha1 renaming. + + * sha1.c: File renamed from sha.c. + * sha1.h: File renamed from sha.h. + Use SHA1_H, not _SHA_H in #ifndef condition. + + * sha.c: Add FSF Copyright. + * sha.h: Correct stale references to MD5 and `16 bytes'. + Patch by Ulrich Drepper. + + * sha.h: Add FSF Copyright. Remove reference to Scott Miller, + since this file is now nearly identical to md5.h. + + * md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code. These + days, gcc-3.x does better all by itself. Patch from Dean Gaudet: + http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html + +2003-11-29 Jim Meyering <jim@meyering.net> + + * c-strtod.c (c_strtod): Save and restore original LC_NUMERIC setting, + in case it was different from the environment-derived value. + Patch by Paul Eggert. + Include "xalloc.h" for declaration of xstrdup. + +2003-11-24 Paul Eggert <eggert@twinsun.com> + + Parse floating-point operands and options in the C locale. + POSIX requires this for printf, and we might as well be + consistent elsewhere (tail, sleep, seq). + + * Makefile.am (libfetish_a_SOURCES): Add c-strtod.c, c-strtod.h. + * c-strtod.c, c-strtod.h: New files. + * xstrtod.h (xstrtod): Accept an extra arg, specifying the + conversion function. + * xstrtod.c (xstrtod): Likewise. All callers changed to + include c-strtod.h and use c_strtod. Don't include stdlib.h; no + longer needed. + + * xnanosleep.c: Don't include xstrtod.h; it's not needed. + +2003-11-22 Jim Meyering <jim@meyering.net> + + * xmalloc.c (x2nrealloc_inline): Fix typos in comments: s/size/size_t/. + +2003-11-21 Jim Meyering <jim@meyering.net> + + * xreadlink.c (xreadlink): Correct outdated comment. + +2003-11-17 Jim Meyering <jim@meyering.net> + + On systems without utime and without a utimes function capable of + dealing with a NULL struct utimbuf* argument, this utime replacement + could -- in unusual circumstances -- leak a file descriptor. + * utime.c: Include <unistd.h> and <errno.h>. + (utime_null): Be sure to close `fd' and to preserve errno. + Reported by Geoff Collyer via Arnold Robbins. + +2003-11-13 Jim Meyering <jim@meyering.net> + + * xalloc.h, xstrtol.c: Update from gnulib. + +2003-11-11 Jim Meyering <jim@meyering.net> + + * ftw.c, ftw_.h: Remove files. No longer used. + +2003-11-09 Jim Meyering <jim@meyering.net> + + * root-dev-ino.c, root-dev-ino.h: New files. + * Makefile.am (libfetish_a_SOURCES): Add root-dev-ino.c root-dev-ino.h. + + * dev-ino.h: Include <sys/types.h> and <sys/stat.h>. + +2003-11-06 Jim Meyering <jim@meyering.net> + + * free.c: New file, from gnulib. + +2003-10-31 Paul Eggert <eggert@twinsun.com> + + * mountlist.h (struct mount_entry.me_type_malloced): New member. + * mountlist.c (SIZE_MAX): Define if not defined already. + (read_filesystem_list): Set and use me_type_malloced. + Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or + whatever the type happens to be), for brevity and consistency. + Check for size calculation overflow on Alphas running OSF/1. + +2003-10-31 Jim Meyering <jim@meyering.net> + + * hash.c: Include "xalloc.h" for use of xalloc_oversized. + + * linebuffer.c: Include <string.h> for declaration of memset. + + * alloca.c, linebuffer.c, xmalloc.c, xalloc.h: Update from gnulib. + * exclude.c, getgroups.c, quotearg.c, stdbool_.h: Update from gnulib. + * hash.c, hash-pjw.h: Update from gnulib. + +2003-10-25 Jim Meyering <jim@meyering.net> + + * hash.c, hash.h: Update from gnulib. + * hash-pjw.c, hash-pjw.h: Likewise. + * obstack.c, obstack.h: Likewise. + +2003-10-25 Jim Meyering <meyering@lucent.com> + + * fts_.h: Include <features.h> only if _LIBC. + [!_LIBC]: Define-away __THROW, __BEGIN_DECLS, __END_DECLS. + +2003-10-19 Jim Meyering <jim@meyering.net> + + * vasnprintf.c (vasnprintf): Work around losing snprintf on + e.g. HPUX 10.20. + +2003-09-25 Jim Meyering <jim@meyering.net> + Bruno Haible <bruno@clisp.org> + + [Update from gnulib] + This lets translators provide better translations for the + "Written by ..." part of --version output. + * version-etc.h: Include stdarg.h. + (version_etc_copyright): Declare as readonly. + (version_etc): Make this function variadic with a NULL-terminated list + of author name strings. + (version_etc_va): New declaration. + * version-etc.c: Include stdarg.h, stdlib.h. + (version_etc_copyright): Declare as readonly. + (version_etc_va): New function. Provide a different translatable string + for each possible number of authors < 10. Abbreviate when there are 10 + authors or more. + (version_etc): Make this function variadic. Call version_etc_va. + Suggestion from Gary V. Vaughan. + + * long-options.h (parse_long_options): Change prototype: the authors + string is moved to the end and becomes variadic. + * long-options.c: Include stdarg.h. + (parse_long_options): Make this function variadic, too. + Call version_etc_va, not version_etc. + +2003-10-17 Jim Meyering <jim@meyering.net> + + * xfts.c, xfts.h: New files. + This factors out code used by du.c, chmod.c, and chown-core.c. + * Makefile.am (libfetish_a_SOURCES): Add xfts.c and xfts.h. + + * error.h: Update from gnulib. + * getpass.c: Likewise. + * fnmatch.c: Likewise. + * fnmatch_loop.c: Likewise. + +2003-10-16 Jim Meyering <jim@meyering.net> + + * xmalloc.c: Include <string.h>, for declarations of memset and memcpy. + + * getgroups.c: Update from gnulib. + * readutmp.c: Fix indentation, from gnulib. + * exclude.c: Update from gnulib. + * xgethostname.c: Include xgethostname.h. + * xgethostname.h: New file, from gnulib. + * Makefile.am (libfetish_a_SOURCES): Add xgethostname.h. + +2003-10-15 Jim Meyering <jim@meyering.net> + + * userspec.h: New file. + * userspec.c: Include "userspec.h". + * Makefile.am (libfetish_a_SOURCES): Add userspec.h. + +2003-10-14 Paul Eggert <eggert@twinsun.com> + + Fix some number-parsing bugs, e.g., "head -n 100k@" wasn't + properly diagnosed. + * human.c, xstrtoimax.c, xstrtol.c, xstrtol.h, xstrtoul.c, xstrtoumax.c: + Sync with gnulib. + +2003-10-13 Paul Eggert <eggert@twinsun.com> + + * xalloc.h, xmalloc.c, xstrdup.c: Import latest version from gnulib. + +2003-09-29 Paul Eggert <eggert@twinsun.com> + + * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c. + +2003-10-02 Jim Meyering <jim@meyering.net> + + Don't require that the maximum length of a file name + encountered in a traversal fit in an `unsigned short', + and fix some portability bugs (don't depend on gcc). + + * fts.c: Include "fts_.h", not <fts.h>. + (ALIGNBYTES) [!(__GNUC__ >= 2)]: Add a definition that works with + compilers that don't have __alignof__. + (MAX): Use a definition that doesn't depend on gcc. + (fts_build): Make `len' and `maxlen' be of type size_t, not int. + Test for overflow in a less type-dependent manner. + Test HAVE_STRUCT_DIRENT_D_TYPE, rather than + defined DT_DIR && defined _DIRENT_HAVE_D_TYPE. + (fts_palloc): Test for overflow in a less type-dependent manner. + (fts_safe_changedir): Use stat, not stat64. + Use fstat, not __fxstat64(_STAT_VER. + + * fts_.h [FTS] (fts_pathlen): Change type from int to size_t. + [FTSENT] (fts_pathlen): Change type from u_short to size_t. + (fts_level): Change type from u_short to int. + + * Makefile.am (libfetish_a_SOURCES): Add fts.c fts_.h. + Remove ftw_.h. + +2003-09-29 Paul Eggert <eggert@twinsun.com> + + * strftime.c (tm_diff) [! HAVE_TM_GMTOFF]: + Fix arg typo in previous patch. + +2003-09-28 Jim Meyering <jim@meyering.net> + + * error.c: Update from gnulib. + +2003-09-19 Jim Meyering <jim@meyering.net> + + * version-etc.h: (version_etc): Rename parameter, authors, + to written_by. + * version-etc.c: (version_etc): Likewise. + Combine fprintf and following putc('\n'. + + * version-etc.c, version-etc.h: Revert yesterday's changes. + * long-options.c, long-options.h: Likewise. + +2003-09-18 Jim Meyering <jim@meyering.net> + + This lets translators provide better translations for the + `Written by ...' part of --version output. + * version-etc.c: Include stdarg.h, stdlib.h, string.h, and xalloc.h. + (version_etc): Make this function variadic, + with a NULL-terminated list of author name strings. + (version_etc_va): New function. + Suggestion from Gary V. Vaughan. + * version-etc.h (version_etc_va): Declare it. + + * long-options.c: Include stdarg.h. + (parse_long_options): Make this function variadic (authors), too. + Call version_etc_va, not version_etc. + * long-options.h (parse_long_options): Update prototype. + +2003-09-16 Paul Eggert <eggert@twinsun.com> + + * linebuffer.c (readlinebuffer): Return NULL immediately upon + input error, instead of returning NULL the next time we are called + (and therefore losing track of errno). + +2003-09-15 Paul Eggert <eggert@twinsun.com> + + * getndelim2.c (getndelim2): Don't trash errno when a read + fails, so that the caller gets the proper errno. + + * readutmp.c (read_utmp): Likewise. + Check for fstat error. Close stream and free storage + when failing. + +2003-09-14 Jim Meyering <jim@meyering.net> + + * argmatch.c: Update from gnulib. + + * Makefile.am (libfetish_a_SOURCES): Add exit.h, strndup.h, + time_r.c, time_r.h. + +2003-09-13 Jim Meyering <jim@meyering.net> + + * setenv.c, strcspn.c, strdup.c, strndup.c, strnlen.c, strpbrk.c: + * strstr.c, strtod.c, strtoimax.c, tempname.c, unicodeio.c, userspec.c: + * vasprintf.h, xgethostname.c, xreadlink.c, xstrdup.c, xstrndup.c: + * xstrndup.h, xstrtod.c, xstrtol.c, yesno.c: Update from gnulib. + * strndup.h: New file, from gnulib. + * exit.h: New file, from GNU gettext, via gnulib. + +2003-09-06 Paul Eggert <eggert@twinsun.com> + + * time_r.c, time_r.h: New files. + + * mktime.c (my_mktime_localtime_r): Remove; all uses changed to + __localtime_r. + (__localtime_r) [!defined _LIBC]: New macro. Include <time_r.h>. + (__mktime_internal) [!defined _LIBC]: Now extern, not static. + + * strftime.c (my_strftime_gmtime_r): Remove; all uses changed to + __gmtime_r. + (my_strftime_localtime_r): Remove; all uses changed to __localtime_r. + (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros. + Include <time_r.h>. + +2003-09-13 Jim Meyering <jim@meyering.net> + + * strtol.c: Update from gnulib. + +2003-09-12 Paul Eggert <eggert@twinsun.com> + + * argmatch.c, xgethostname.c, xmalloc.c: Include exit.h. + * obstack.c [!defined _LIBC]: Likewise. + * argmatch.c (EXIT_FAILURE): Remove; now done by exit.h + * exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise. + * exitfail.c: Don't include stdlib.h; no longer needed. + +2003-09-12 Paul Eggert <eggert@twinsun.com> + + * error.c (error_tail): Assume vprintf. + +2003-09-09 Paul Eggert <eggert@twinsun.com> + + More K&R removal. + + * getloadavg.c (getloadavg, main): Define via prototypes. + + * getopt.h (struct option.name): Assume C89, and use 'const'. + (getopt, etopt_long, getopt_long_only, _getopt_internal) + [defined __GNU_LIBRARY__]: Assume C89, so we can always declare + with a prototype. + * getopt.c (const): Remove macro. + Include <string.h> unconditionally. + (my_index): Remove; all uses changed to strchr. + (strlen): Remove decl. + (exchange): Remove forward decl; no longer needed. + (exchange, _getopt_initialize, _getopt_internal, getopt, main): + Define with prototype. + * getopt1.c (const): Remove macro. + (getopt_long, getopt_long_only, main): Define with prototype. + + * getugroups.c: Include <string.h> unconditionally. + + * getusershell.c: Include <stdlib.h> unconditionally. + (getusershell, setusershell, endusershell, readname, main): + Define with prototypes. + + * group-member.c: Include group-member.h first. + Include <stdlib.h> unconditionally. + + * hard-locale.c: Include hard-locale.h first. + Include <stdlib.h>, <string.h> unconditionally. + + * hash.c (free, malloc): Remove decls. + Include <stdlib.h> unconditionally. + + * human.c: Include <stdlib.h>, <string.h> unconditionally. + (getenv): Do not declare. + + * idcache.c: Include <string.h> unconditionally. + + * long-options.c: Include long-options.h first, to test interface. + Include <stdlib.h> unconditionally. + + * makepath.c: Include makepath.h first, to test interface. + Include <stdlib.h> and <string.h> unconditionally. + + * linebuffer.c: Include <stdlib.h>. + (free): Remove decl. + + * malloc.c: Include <stdlib.h>, for malloc; don't bother with stddef.h. + rpl_malloc returns void *, not char *. + * realloc.c (rpl_realloc): Likewise. Also, define with a prototype. + + * md5.h: Include <limits.h> unconditionally. + (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case. + (__P): Remove; all uses removed. + * md5.c: Include "md5.h" first. + (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream, + md5_buffer, md5_process_bytes, md5_process_block): + Define with prototypes. + * sha.h (__P): Remove all uses. (It wasn't defined??) + * sha.c: Include "sha.h" first. + Include <stdlib.h>, <string.h> unconditionally. + + * memchr.c (__ptr_t): Remove; all uses changed to void *. + * memcmp.c (__ptr_t): Likewise. + * memrchr.c (__ptr_t): Likewise. + * memchr.c, memcmp.c, memcoll.c, memrchr.c: + Include <string.h> unconditionally. + * memchr.c, memrchr.c: Include <limits.h> unconditionally. + * memchr.c: Include <stdlib.h> unconditionally. + * memchr.c (LONG_MAX): Remove. + * memrchr.c (LONG_MAX): Likewise. + * memchr.c (__memchr): Define via a prototype. + * memrchr.c (__memrchr): Likewise. + * memcmp.c (__P): Remove, and remove all uses. + (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment): + Remove forward decls; no longer needed. + * memcpy.c, memmove.c, memset.c: Include <stddef.h>. + Use types required by C89 in prototype. + + * mkdir.c: Include <stdlib.h>, <string.h> unconditionally. + * savedir.c: Likewise. + * mkdir.c (free): Remove decl. + * rmdir.c (rmdir): Define with a prototype. + * savedir.c: Include savedir.h first, to test interface. + + * mktime.c (STDC_HEADERS): Remove. + Include <stdlib.h>, <string.h> unconditionally. + + * modechange.c: Include <stdlib.h> unconditionally. + (malloc): Remove decl. + + * mountlist.c: Include <stdlib.h>, <string.h> unconditionally. + (free): Remove decl. + + * obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]: + Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H. + (This type really should be intptr_t, but that's a C99ism.) + (_obstack_memcpy): Remove: all uses changed to memcpy. + Include <string.h> unconditionally. + (struct obstack): Assume __STDC__ for types of members + chunkfun, freefun, extra_arg. + (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1, + _obstack_memory_used, obstack_alloc_failed_handler, obstack_init, + obstack_begin, obstack_specify_allocation, + obstack_specify_allocation_with_arg, obstack_chunkfun, + obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]: + Remove unprototyped decls and the macros that use them. + * obstack.c (POINTER): Remove. All uses changed to void *. + (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN, + _obstack_begin, _obstack_begin_1, _obstack_allocated_p) + (defined __STDC__ && __STDC__)]: + Remove nonprototyped code. + Include <stdlib.h> unconditionally. + (_obstack_begin, _obstack_begin_1, _obstack_newchunk, + _obstack_allocated_p, _obstack_free, obstack_free, + _obstack_memory_used, print_and_abort): + Define using prototypes. + (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base, + obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0, + obstack_finish, obstack_grow, obstack_grow0, obstack_make_room, + obstack_next_free, obstack_object_size, obstack_room) [0]: + Remove unused, unprototyped code. + + * path-concat.c: Include <stdlib.h>, <string.h> unconditionally. + + * physmem.c (physmem_total, physmem_available, main): Define + with prototypes. + + * posixtm.c: Include <stdlib.h>, <string.h> unconditionally. + (main): Define with a prototype. + + * posixver.c (getenv): Remove decl. + + * putenv.c (malloc): Returns void *, not char *. + Include <string.h> unconditionally. + (strchr, memcpy, NULL): Do not define. + + * readtokens.c: Include readtokens.h first, to test interface. + Include <stdlib.h>, <string.h> unconditionally. + (init_tokenbuffer): Define with a prototype. + + * regex.c (PARAMS): Remove. All uses removed. + All uses of _RE_ARGS removed, too. + Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h> + unconditionally. + (bzero): Assume memset exists. + (memcmp, memcpy, NULL): Remove. + (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed + char, or assignments to local vars of type signed char. + (init_syntax_once, PREFIX(extract_number_and_incr), + PREFIX(print_partial_compiled_pattern), + PREFIX(print_compiled_pattern), PREFIX(print_double_string), + convert_mbs_to_wcs, print_fastmap, re_set_syntax, + PREFIX(regex_grow_registers), PREFIX(regex_compile), + PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1), + PREFIX(insert_op2), PREFIX(at_begline_loc_p), + PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space, + wcs_compile_range, byte_compile_range, truncate_wchar, + PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers, + re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2, + count_mbs_length, wcs_re_match_2_internal, + byte_re_match_2_internal, PREFIX(group_match_null_string_p), + PREFIX(alt_match_null_string_p), + PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate), + re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror, + regfree, PREFIX(extract_number)): Define with prototype. Remove + now-unnecessary declaration, if any. + (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec, + regcomp, regexec): + Remove now-unnecessary casts among pointer types. + * regex.h (_RE_ARGS): Remove. All uses removed. + + * rename.c: Include <stdlib.h>, <string.h> unconditionally. + (free): Remove decl. + + * rpmatch.c: Include <stdlib.h> unconditionally. + + * save-cwd.c: Include <stdlib.h> unconditionally. + * xgetcwd.c: Likewise. + + * stat.c: Include <stdlib.h>, <string.h> unconditionally. + (free): Remove decl. + + The following changes are not K&R related: + + * group-member.h: Include <sys/types.h>, so that this file is + self-contained. + * makepath.h: Likewise. + + * getusershell.c (readname, default_index, line_size, readname): + Use size_t, not int, for sizes. + (readname): If the size overflows, report an error instead of + looping forever. + +2003-09-09 Derek Robert Price <derek@ximbiot.com> + + * getndelim2.c: Assume stdlib.h per the C89 spec. + +2003-09-08 Paul Eggert <eggert@twinsun.com> + + Assume C89 or better; remove K&R cruft. + A few of these changes were first proposed by Derek Robert Price + in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>. + + * addext.c: Include <string.h> unconditionally. + * backupfile.c: Include <string.h>, <stdlib.h> unconditionally. + Don't declare getenv or malloc. + + * alloca.c: Include <string.h>, <stdlib.h> unconditionally. + (POINTER_TYPE, pointer): Remove; all uses changed to void *. + (NULL): Remove. + (find_stack_direction, alloca): Use prototypes. + + * atexit.c (atexit): Define using a prototype. + + * basename.c, dirname.c, stripslash.c: + Include <string.h> unconditionally. + + * bcopy.c: Include <stddef.h>. + (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'. + + * canon-host.c: Include <stdlib.h>, <string.h> unconditionally. + + * error.h (error, error_at_line, error_print_progname) + [! (defined (__STDC__) && __STDC__)]: Remove decls. + * error.c: Include error.h first, to check interface. + Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally. + (VA_START): Remove; all uses changeed to va_start. + (exit, strerror): Remove decls. + (error_print_progname): Prototype uncondionally. + Don't include <errno.h>; no longer needed. + (private_strerror): Remove. + (error_tail): Always define. + (error, error_at_line): Assume C89 or better; always use prototypes. + + * euidaccess.c (main): Define with a prototype. + + * exclude.c: Include <stdlib.h>, <string.h> unconditionally. + + * exitfail.c: Include <stdlib.h> unconditionally. + + * fnmatch_.h (__P): Remove. All uses changed to assume prototypes. + * fnmatch.c: Include fnmatch.h first, to test interface. + Include <string.h>, <stddef.h>, <stdlib.h> unconditionally. + (getenv): Remove decl. + (fnmatch): Define using a prototype. + * fnmatch_loop.c (FCT): Remove forward decl; no longer needed. + (FCT): Define using a prototype. + + * getdate.y: Include <stdlib.h>, <string.h> unconditionally. + + * gethostname.c: Include <stddef.h>. + (gethostname): Define with prototype. Length is size_t, not int. + +2003-09-08 Paul Eggert <eggert@twinsun.com> + + * utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>. + (utime_null): Fix typo: 'st' was sometimes called 'sb'. + +2003-09-09 Jim Meyering <jim@meyering.net> + + * getversion.c: Remove unused file. Reported by Paul Eggert. + +2003-09-03 Paul Eggert <eggert@twinsun.com> + + * human.c (human_readable): Fix bug that rounded 10501 to 10k. + Bug reported by Lute Kamstra in + <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>. + + * getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow", + "yesterday", "today", and "now" rather than tMINUTE_UNIT. Of + course with correspondingly smaller numbers for tomorrow and + yesterday. From Tadayoshi Funaba. Originally installed into + sh-utils on 1999-08-07, but the patch was mistakenly reverted by + the next change to that shared file (but this time in fileutils) + on 1999-08-29. + +2003-08-18 Paul Eggert <eggert@twinsun.com> + + * same.c: Include <stdlib.h> and <string.h> unconditionally, + as we're now assuming that part of hosted C89. + (free) [!HAVE_DECL_FREE]: Remove decl; no longer needed. + (same_name): Invoke pathconf on destination, not source, as + that's a bit clearer even if they are the same dir. + +2003-08-18 Jim Meyering <jim@meyering.net> + + * getopt.h: Remove space before TAB. + +2003-08-17 Paul Eggert <eggert@twinsun.com> + + * same.c: Include <stdbool.h>, <limits.h>. + (_POSIX_NAME_MAX): Define if not defined. + (MIN): New macro. + (same_name): If file names are silently truncated, report + that the file names are the same if they are the same after + the silent truncation. + +2003-08-16 Paul Eggert <eggert@twinsun.com> + + Merge from gnulib. + * Makefile.am (libfetish_a_SOURCES): Remove getndelim2.c, + getndelim2.h, xstrtoimax.c. Add localcharset.h. + (CLEANFILES, SUFFIXES): Initialize to empty. + (EXTRA_DIST): Add getndelim2.c, getndelim2.h. + (install-exec-local): Use $(GLIBC21), not @GLIBC21@. + Do not mkdir libdir if not glibc21. + (charset.alias): @host@ -> $(host). + (SUFFIXES, .sin.sed, CLEANFILES): Reorder rules + to match gnulib module suggestions. + * localcharset.h, readlink.c: New files, from gnulib. + * asnprintf.c, asnprintf.c, asprintf.c, backupfile.h, + canon-host.c, config.charset, dirname.h, euidaccess.c, exclude.c, + fsusage.h, full-write.c, getloadavg.c, getndelim2.h, gettext.h, + group-member.h, hard-locale.h, hash.c, hash.h, hash-pjw.c, + localcharset.c, long-options.h, makepath.h, malloc.c, mbswidth.c, + mbswidth.h, md5.h, memcasecmp.c, memcasecmp.h, memcoll.h, + mkstemp.c, modechange.h, mountlist.h, path-concat.h, pathmax.h, + physmem.h, posixtm.h, printf-args.c, printf-args.h, + printf-parse.c, printf-parse.h, putenv.c, quote.h, readutmp.h, + ref-add.sin, ref-del.sin, safe-read.c, savedir.h, setenv.c, + setenv.h, stdbool_.h, strnlen.c, strpbrk.c, strtoimax.c, + strverscmp.h, tempname.c, unicodeio.c, unicodeio.h, + unistd-safer.h, unlocked-io.h, vasnprintf.c, vasnprintf.h, + vasprintf.c, vasprintf.h, version-etc.h, xgethostname.c, + xmemcoll.c, xstrtoimax.c, xstrtoumax.c: Sync with gnulib. + +2003-08-15 Paul Eggert <eggert@twinsun.com> + + * physmem.c: Include "physmem.h" before system includes. + +2003-08-10 Jim Meyering <jim@meyering.net> + + * utimens.c (utimens): Revert most of last change. + Test HAVE_WORKING_UTIMES instead of HAVE_UTIMES. + +2003-08-09 Jim Meyering <jim@meyering.net> + + * utimens.c (utimens): Test HAVE_UTIME, not HAVE_UTIMES. + Prefer utime, since it works and utimes doesn't on some systems. + FIXME: Revert the above change once we have a working utimes + replacement function. + +2003-08-06 Paul Eggert <eggert@twinsun.com> + + * Makefile.am (libeftish_a_SOURCES): Add utimens.c, utimens.h. + * utimens.c, utimens.h: New files. + +2003-08-09 Jim Meyering <jim@meyering.net> + + * unicodeio.c (unicode_to_mb): Change to `Solaris 5.7' in comment. + * putenv.c: Likewise. + + * fatal.c, fatal.h: Remove unused files. + + * Makefile.am: Use the e.g., `$(FNMATCH_H)' notation for AC_SUBST'd + variable names, rather than @FNMATCH_H@. + Likewise for $(ALLOCA_H). + (fnmatch.h): Use `$@' in the commands, in place of the three copies + of the literal target, `fnmatch.h'. + (alloca.h): Likewise. + +2003-08-08 Paul Eggert <eggert@twinsun.com> + + * Makefile.am (libfetish_a_SOURCES): Remove fnmatch_.h. + (lib_OBJECTS): New macro, for convenience when cutting and + pasting Makefile.am templates from gnulib. + (EXTRA_DIST): Remove fnmatch_loop.c. + (BUILT_SOURCES): Append $(FNMATCH_H). + * Makefile.am: Import the following changes from gnulib templates + for alloca and fnmatch): + (all-local $(lib_OBJECTS)): New dependencies. + (alloca.h): Use alloca.h-t for temporary. + (EXTRA_DIST): Append fnmatch_.h, fnmatch_loop.c. + (fnmatch.h): New rule. + (MOSTLYCLEANFILES): Add fnmatch.h, fnmatch.h-t. + (DISTCLEANFILES): Remove fnmatch.h + +2003-08-08 Jim Meyering <jim@meyering.net> + + * mountlist.c (read_filesystem_list) [MOUNTED_GETFSSTAT]: + Use MNT_NOWAIT, rather than MNT_WAIT. Otherwise, `df DIR' could + hang on OSF/1 5.1 for DIR on both local and remote file systems. + Reported by (and fix confirmed by) Nelson H. F. Beebe. + +2003-08-07 Jim Meyering <jim@meyering.net> + + * regex.h (RE_SYNTAX_POSIX_AWK): Remove SPACE in SPACE-TAB sequence. + +2003-08-05 Paul Eggert <eggert@twinsun.com> + + Merge getline from gnulib. + * getline.h, getline.c: Merge from gnulib. + * getndelim2.h, getndelim2.c: New files, from gnulib. + * getdelim2.c, getdelim2.h: Remove. + * Makefile.am (libfetish_a_SOURCES): Change getdelim2.c and + getdelim2.h to getndelim2.c and getndelim2.h. + +2003-08-04 Paul Eggert <eggert@twinsun.com> + + * regex.c, regex.h: Sync with gnulib. + +2003-08-03 Paul Eggert <eggert@twinsun.com> + + * stdbool_.h (_Bool): Use a #define, not a typedef. + +2003-07-31 Paul Eggert <eggert@twinsun.com> + + * bumpalloc.h: Remove. + * Makefile.am (libfetish_a_SOURCES): Remove bumpalloc.h. + +2003-07-28 Jim Meyering <jim@meyering.net> + + * stdbool_.h: Renamed from stdbool.hin. + * Makefile.am: Reflect renaming: stdbool.hin -> stdbool_.h. + * stdbool.hin: Remove file. + +2003-07-28 Paul Eggert <eggert@twinsun.com> + + * stdbool.hin (_Bool): Make it signed char, instead of + an enum type, so that it's guaranteed to promote to int. + +2003-07-23 Jim Meyering <jim@meyering.net> + + * xstrndup.h: New file. + * xstrndup.c: New file, factored out of dircolors.c from coreutils. + * Makefile.am (libfetish_a_SOURCES): Add xstrndup.c and xstrndup.h. + +2003-07-23 Jim Meyering <jim@meyering.net> + + * lstat.c, save-cwd.c, stat.c, utime.c, xgethostname.c: Normalize + naming of Sun operating systems in comments, e.g., SunOS4 -> SunOS 4, + Solaris5.9 -> Solaris 9. From Paul Eggert. + +2003-07-22 Paul Eggert <eggert@twinsun.com> + + * xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and + over-parenthesization in macros. + +2003-07-18 Paul Eggert <eggert@twinsun.com> + + * closeout.h (close_stdout_set_status, close_stdout_status): Remove. + * closeout.c: Likewise. Include "closeout.h" right after config.h, + to test that it can stand by itself. Include "exitfail.h". + Clients should set exit_failure instead. + (EXIT_FAILURE): Remove; no longer needed. Do not include <stdlib.h>. + +2003-07-18 Andreas Schwab <schwab@suse.de> + + * memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno. + +2003-07-17 Paul Eggert <eggert@twinsun.com> + + * xalloca.h, xmalloc.c, xmemcoll.c, xmemcoll.h: + Merge with gnulib. Use a single exit_failure variable rather + than a separate one for each module. + +2003-07-16 Jim Meyering <jim@meyering.net> + + * Makefile.am (AM_CPPFLAGS): Rename from `INCLUDES', to avoid + warning from automake -Wall. + +2003-07-14 Jim Meyering <jim@meyering.net> + + * save-cwd.h: Add copyright. + +2003-07-13 Jim Meyering <jim@meyering.net> + + * xgethostname.c: Include <stdlib.h> for declaration of free. + (xgethostname): Return NULL, rather than exiting, upon any + non-malloc/realloc error. + +2003-07-12 Jim Meyering <jim@meyering.net> + + * Makefile.am (BUILT_SOURCES): Use `BUILT_SOURCES += $(STDBOOL_H)' + rather than `all-local: $(STDBOOL_H)'. The latter didn't force + creation of stdbool.h before most other targets. + Likewise for $(ALLOCA_H). + + Don't emit diagnostics. Let callers do that. + * save-cwd.c: Don't include "error.h". + (save_cwd): Don't call error. Ensure that errno is valid + when returning nonzero. + + * obstack.h: Update from gnulib. + + * makepath.c (make_path): Enclose diagnostic in _(...). + +2003-07-10 Jim Meyering <jim@meyering.net> + + * userspec.c: Include "posixver.h". + (parse_user_spec): Accept `.' as a separator only + in pre-POSIX-200112 mode. + + * Makefile.am (libfetish_a_SOURCES): Add these: + printf-args.h, printf-parse.h, vasprintf.h, vasnprintf.h. + + Now that a program (`who') uses asprintf, we need all of these: + * asnprintf.c, asprintf.c, printf-args.c, printf-args.h, printf-parse.c: + * printf-parse.h, vasnprintf.c, vasnprintf.h, vasprintf.c, vasprintf.h: + New files, from gnulib. + + * alloca_.h, getpass.c, memrchr.c, obstack.h, posixver.c, + strftime.c, strnlen.c, strverscmp.c: Switch from LGPL to GPL. + +2003-07-09 Jim Meyering <jim@meyering.net> + + * mktime.c: Update from gnulib. + FIXME: but still need to adjust m4/mktime.c so that this fixed + version is used when needed. + + Fix the bug that would make `du /' omit the `/' on the last line. + E.g., `du --exclude '[^/]*' -x /' would print only "4\t\n" for me. + * ftw.c (ftw_dir): Don't clobber the leading `/'. + Reported by Chris Lesniewski as http://bugs.debian.org/200542. + +2003-07-04 Jim Meyering <jim@meyering.net> + + Update from gnulib. + * xreadlink.c: Include <sys/types.h> unconditionally, instead of + having it depend on HAVE_SYS_TYPES_H. + +2003-06-18 Jim Meyering <jim@meyering.net> + + * inttostr.h (PARAMS): Remove. All uses removed. + + Merge in change from gnulib. + * makepath.c: Remove block of alloca-related code in favor + of an unconditional `#include <alloca.h>'. + + * xalloc.h: Include <stddef.h>. + Remove unnecessary parentheses. + Use `1990-2000' notation in Copyright line until Emacs' + copyright-update function learns how to handle a comma-separated + list of years that spans a line boundary. + + * Makefile.am (libfetish_a_SOURCES): Add getdelim2.c and getdelim2.h. + + * getline.c (getdelim2): Move this function into its own file. + * getdelim2.c: Extracted from getline.c. + + * linebuffer.c, linebuffer.h: Update from gnulib. + + * getdelim2.c, getdelim2.h: New files. + * getstr.c, getstr.h: Remove files. + + * same.h: Update from gnulib. + * xstrtol.h: Update from gnulib. + +2003-06-17 Paul Eggert <eggert@twinsun.com> + + Assume C89, so PARAMS isn't needed. + * backupfile.h (PARAMS): Remove. All uses removed. + * closeout.h, dirname.h, filemode.h, fsusage.h, getdate.h, getline.h, + group-member.h, hard-locale.h, hash.h, linebuffer.h, long-options.h, + makepath.h, memcasecmp.h, memcoll.h, modechange.h, mountlist.h, + path-concat.h, physmem.h, posixtm.h, quote.h, readutmp.h, same.h, + save-cwd.h, savedir.h, stdio-safer.h, strtoimax.c, strverscmp.h, + unistd-safer.h, version-etc.h, xalloc.h, xreadlink.h, xstrtod.h, + xstrtol.h: Likewise. + * filemode.h, hard-locale.h, memcoll.h, modechange.h, physmem.h, same.h, + * strverscmp.h: Do not include config.h; no longer needed. + Anyway, config.h should always be included before any other file. + +2003-06-17 Jim Meyering <jim@meyering.net> + + * getline.c: Update from gnulib. + + Merge in changes from gnulib. + * hash.c: Include <stdbool.h> unconditionally. + Include <limits.h>. + (CHAR_BIT): Don't define. + +2003-06-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + * acl.c: Include <sys/types.h> before <sys/stat.h>. + Required on Ultrix 4.3. + +2003-05-20 Derek Price <derek@ximbiot.com> + + * stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is necessary. + +2003-06-10 Jim Meyering <jim@meyering.net> + + * getdate.y: Also accept dates of the form May-23-2003. + Suggestion from Karl Berry. + +2003-06-09 Jim Meyering <jim@meyering.net> + + * gettimeofday.c: Also undefine gmtime. + (rpl_gmtime): New function. Suggestion from Paul Eggert. + +2003-06-08 Jim Meyering <jim@meyering.net> + + * getline.h: Update from gnulib. + + Clean up, as part of merge with emacs version of strftime.c. + * strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]: + Remove function, now that we can rely on a working tzset function. + [!_LIBC]: Ensure that the required autoconf test has been run. + * gettimeofday.c: Also undef tzset. + (rpl_tzset): New function, for use by new macro, gl_FUNC_TZSET_CLOBBER. + +2003-06-07 Jim Meyering <jim@meyering.net> + + * readtokens.h: Add copyright notice. + Include <stdio.h>. + Remove definition and uses of __P. + + * readtokens.c: Put `Free Software Foundation, Inc.' in place of + my name in the copyright comment. + (init_tokenbuffer): Remove unnecessary parentheses around malloc. + + Update from gnulib. + * getdate.y: Include alloca.h unconditionally. + * xmemcoll.h: Include <stddef.h>. + + * Makefile.am (MOSTLYCLEANFILES): Add alloca.h and alloca.ht. + (MOSTLYCLEANFILES): Add stdbool.ht. + + * human.c: Include <stdio.h>, once again, for declaration of sprintf. + + Update from gnulib. + * tempname.c: Include <stddef.h> unconditionally. + Include <inttypes.h> as an alternative to <stdint.h>. + * strtoimax.c: Include <stdint.h> as an alternative to <inttypes.h>. + * xstrtol.h: Likewise. + * xstrtoimax.c: Likewise. + * xstrtoumax.c: Likewise. + + Update from gnulib. + * strcasecmp.c: Include <stddef.h>, not <sys/types.h>. + * savedir.c: Include <stddef.h>. + (NULL): Don't define, since <stddef.h> does that. + +2003-06-06 Jim Meyering <jim@meyering.net> + + Update from gnulib. + * rpmatch.c: Include <limits.h> without checking for HAVE_LIMITS_H. + Include <stddefs.h> unconditionally. + (NULL): Don't define, since <stddef.h> does that. + * rename.c: #undef rename before defining rpl_rename. + [HAVE_CONFIG_H]: Guard inclusion of config.h. + * putenv.c: Include <stddef.h> rather than <sys/types.h>, + as we merely need size_t. + * realloc.c: Likewise. + * quote.c: Don't include <stddef.h> or <sys/types.h>; not needed. + * modechange.c: Include <stddef.h>. + (NULL): Don't define, since <stddef.h> does that. + * memcoll.h: Include <stddef.h>, to get size_t. + * memcoll.c: Include "memcoll.h", which gets us size_t and checks + our interface, instead of including <sys/types.h> + (memcoll): Fall back on a simple algorithm using + memcmp if strcoll doesn't work. + * memcasecmp.h: Include <stddef.h>. + * memcasecmp.c: Don't include <sys/types.h>. + + From gnulib. + * alloca_.h: New file. + * Makefile.am (EXTRA_DIST): Add alloca_.h. + (all-local $(lib_OBJECTS)): Depend on $(ALLOCA_H). + (alloca.h): New rule. + + * addext.c: Update from gnulib. + * backupfile.c: Likewise. + * config.charset: Likewise. + * dirname.h: Likewise. + * fsusage.c: Likewise. + * userspec.c: Likewise. + * xreadlink.c: Likewise. + * xstrtol.c: Likewise. + * __fpending.h: Likewise. + + * md5.c: Include <string.h> and <stdlib.h> unconditionally. + (memcpy): Remove definition. + + * posixtm.c: Include <stdbool.h> unconditionally. + +2003-06-05 Jim Meyering <jim@meyering.net> + + From gnulib. + * mktime.c: Assume freestanding C89 or better. + (HAVE_LIMITS_H): Remove. Assume it's 1. + (__P): Remove; not used. + (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them. + (mktime, not_equal_tm, print_tm, check_result, + main): Use prototypes. Use const * where appropriate. + (main): Fix typo in testing code that uncovered by above changes. + (Local Variables): Remove -DHAVE_LIMITS_H from compile-command. + +2003-06-04 Paul Eggert <eggert@twinsun.com> + + Merge human.c etc. from gnulib. + * exclude.c, human.c, human.h: Merge from gnulib. + * cycle-check.c, cycle-check.h, src/system.h: + Include <stdbool.h> unconditionally. + +2003-06-02 Jim Meyering <jim@meyering.net> + + * stdbool.hin: New file. From gnulib. + * Makefile.am (MOSTLYCLEANFILES): Initialize. + (stdbool.h): New rule. + (all-local $(lib_OBJECTS)): Depend on $(STDBOOL_H) + (MOSTLYCLEANFILES): Add stdbool.h. + (EXTRA_DIST): Add stdbool.h. + +2003-05-30 Jim Meyering <jim@meyering.net> + + * addext.c: Update from gnulib. + * mktime.c: Likewise. + +2003-05-29 Jim Meyering <jim@meyering.net> + + Make the %r format directive honor any locale setting. + * strftime.c: (my_strftime) [!defined _NL_CURRENT && HAVE_STRFTIME]: + Use underlying_strftime for %r. + +2003-05-15 Jim Meyering <jim@meyering.net> + + * getopt.h: Remove a space before a TAB. + +2003-05-13 Jim Meyering <jim@meyering.net> + + * setenv.c (setenv): Don't apply cast to argument of free. + * putenv.c (rpl_putenv): Likewise. + * alloca.c (alloca): Likewise. + +2003-05-12 Jim Meyering <jim@meyering.net> + + * ftw.c (ftw_startup): Always call free_cwd after restore_cwd. + Reported by Matti Aarnio as + https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=90563. + Forwarded by Tim Waugh. + + * strftime.c (my_strftime): Let the `-' (no-pad) flag affect + the space-padded-by-default conversion specifiers, %e, %k, %l. + +2003-05-07 Paul Eggert <eggert@twinsun.com> + + * xnanosleep.c (timespec_subtract): Don't modify the 2nd arg. + Work even if X-Y overflows when subtracting. Make explicit the + assumption that tv_nsec must be in range. + (clock_get_realtime): Remove. All callers changed to invoke gettime, + for simplicity. + (xnanosleep): Check for gettime failure every time. + +2003-05-06 Jim Meyering <jim@meyering.net> + + * xnanosleep.c (clock_get_realtime): Use gettime.c's gettime function, + rather than an inferior, open-coded version that would fail on + AIX systems due to clock_gettime failing with errno == ENOSYS. + Reported by Jérôme Zago. + +2003-05-05 Jim Meyering <jim@meyering.net> + + Avoid array overrun. + * ftw.c (nftw_arr): Update to reflect complete list of members. + (ftw_arr): Likewise + Reported by Olatunji Oluwabukunmi Ruwase. + + Make it less likely that the above can happen again. + * ftw.c (struct dummy): Ensure that at least the number of + initializers matches the number of members in the corresponding enum. + * ftw_.h (enum Ftw_option): Name this previously-anonymous enum. + (enum Ftw_option) [FTW_N_MEMBERS]: New member. + +2003-05-04 Jim Meyering <jim@meyering.net> + + * setenv.c (__set_errno, LOCK, UNLOCK): Define. + (unsetenv): Update from GNU libc. + Ifdef-out this function, since the only caller + is putenv.c and that file now has its own copy. + + This avoids a core dump on systems without GNU putenv, + when running `env -u SOME_ALREADY_UNSET_VARIABLE'. + * putenv.c (__set_errno, LOCK, UNLOCK): Define. + (unsetenv): New static function, from GNU libc. + (rpl_putenv): Use it. + +2003-05-02 Jim Meyering <jim@meyering.net> + + * canonicalize.c (canonicalize_file_name) [!HAVE_RESOLVEPATH]: + A memory-allocation error could result in heap corruption. Fix it + by also updating `dest' when rpath may be changed by xrealloc. + +2003-04-15 Jim Meyering <jim@meyering.net> + + * getloadavg.c: Remove (or replace-with-TAB(s) to retain alignment) + each sequence of spaces before a TAB character. + * md5.c, getopt.c, getopt.h, obstack.h, strftime.c: Likewise. + +2003-04-11 Jim Meyering <jim@meyering.net> + + * readutmp.c: Include <string.h> and <stdlib.h> unconditionally. + + * canonicalize.c, exclude.c, getgroups.c, getusershell.c: + * group-member.c, idcache.c, mountlist.c, readtokens.c, readutmp.c: + * bumpalloc.h: Remove anachronistic casts of xmalloc, xrealloc, + and xcalloc return values. + + * xalloc.h (PARAMS): Remove definitions and uses. + (XMALLOC, XCALLOC, XREALLOC): Remove unnecessary casts. + + * xmalloc.c: Remove use of PARAMS. + +2003-04-10 Jim Meyering <jim@meyering.net> + + * canonicalize.c (canonicalize_file_name) [HAVE_RESOLVEPATH]: Remove + stray semicolon that caused `readlink --canonical RELATIVE_NAME' to + fail on e.g., Solaris systems. Reported by Bruce Korb. + (canonicalize_file_name): Return NULL immediately if resolvepath fails. + Otherwise, `readlink --canonical /no-such-file' would exhaust + virtual memory on some systems (e.g. Solaris). + (canonicalize_file_name): Always free `extra_buf' before returning. + (canonicalize_file_name): NUL-terminate the result. + +2003-04-05 Jim Meyering <jim@meyering.net> + + * Makefile.am (DEFS): Use += notation rather than `DEFS = ... @DEFS@'. + Use $(VAR) rather than @VAR@, now that we can rely on automake to + emit a definition for each substituted variable. + +2003-03-26 Richard Dawe <rich@phekda.freeserve.co.uk> + + * dirname.c [TEST_DIRNAME]: Update build instructions for test. + Add test-cases for DOS filenames. Declare program_name. + (main): Set up program_name. + +2003-03-22 Jim Meyering <jim@meyering.net> + + * strftime.c (widen): Cast alloca return value to proper type. + + * fnmatch_loop.c + (NEW_PATTERN): Cast alloca return value to proper type. + Otherwise, it wouldn't compile with at least /bin/cc on + ymp-cray-unicos9.0.2.X. + Combine two mostly-identical uses of alloca into one. + Thanks to the Cray-Cyber project for access to a Cray Y-MP. + +2003-03-19 Jim Meyering <jim@meyering.net> + + DJGPP doesn't have S_ISLNK, so provide a replacement. + * ftw.c (S_IFMT): Define, if necessary. + [STAT_MACROS_BROKEN]: Undefine S_ISLNK. + (S_ISLNK): Define, if necessary. + Based on a patch from Rich Dawe. + + * exclude.h (PARAMS): Remove definition and uses. + * exclude.c: Remove uses of `PARAMS'. + + * fnmatch_.h: Don't define __const. + (fnmatch): Use const, not __const in prototype. + From Paul Eggert. + +2003-03-17 Richard Dawe <rich@phekda.freeserve.co.uk> + + * fchdir-stub.c: New file: trivial stub for fchdir. + +2003-03-18 Jim Meyering <jim@meyering.net> + + * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any + error from mntctl. + Use mntctl's return value to drive the entry-processing loop, since + we can't rely on the value of the vmt_length member in the last + entry. On some systems doing so could result in exhausting + virtual memory. Based in part on a patch from Mike Jetzer. + + * quote.c (quote_n): Fix typo in comment. + +2003-03-17 Jim Meyering <jim@meyering.net> + + * raise.c (raise): Rename from rpl_raise. + Without that change, systems lacking raise (SunOS 4) would not be + able to link programs using raise. Reported by Volker Borchert. + + * ftw.c (FTW_STAT): Rename from `STAT', to avoid conflict + with STAT definition from <sys/dir.h> on AIX 5.1. + Suggestion from Mike Jetzer and Petter Reinholdtsen. + + * fchown-stub.c (fchown): Put function type on its own line. + * readlink-stub.c (readlink): Likewise. + * lstat-stub.c (lstat): Likewise. + +2003-03-14 Jim Meyering <jim@meyering.net> + + * Makefile.am (AUTOMAKE_OPTIONS): Remove definition -- + before it pointed to ../src/ansi2knr. Some of these files + have required an ANSI (c89) compiler for a year or two. + (libfetish_a_SOURCES): Remove unused files: c-stack.c, c-stack.h. + +2003-02-04 Dmitry V. Levin <ldv@altlinux.org> + + * stat.c: Include "xalloc.h". + +2003-03-13 Paul Eggert <eggert@twinsun.com> + + Merge changes from Bison. + * obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to + (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5 + when compiling Bison 1.875's `bitset bset = obstack_alloc + (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe. + +2003-01-30 Richard Dawe <rich@phekda.freeserve.co.uk> + + * fchown-stub.c: New file: trivial stub for fchown. + * lstat-stub.c: New file: trivial stub for lstat. + * readlink-stub.c: New file: trivial stub for readlink. + +2003-03-09 Paul Eggert <eggert@twinsun.com> + + * argmatch.c (EXIT_FAILURE): Define if the system doesn't. + Reported by Bruce Becker; see: + http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html + +2003-03-03 Paul Eggert <eggert@twinsun.com> + Bruno Haible <bruno@clisp.org> + + * mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1. + Reported by John Hughes, see + http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html + +2003-03-09 Jim Meyering <jim@meyering.net> + + * ftw.c: Include "save-cwd.h". + (ftw_startup): Avoid use of getcwd, if possible. + Instead, use fopen/fchdir via save_cwd/restore_cwd. + +2003-03-08 Jim Meyering <jim@meyering.net> + + * xnanosleep.c: Don't use `defined' in a #define directive. + +2003-03-07 Jim Meyering <jim@meyering.net> + + * Makefile.am (libfetish_a_SOURCES): Remove mmap-stack.h. + + * mmap-stack.c, mmap-stack.h: Remove files. + + * getcwd.c: #undef getcwd only after *all* included header files. + Declare getcwd unconditionally. The problem was that same.h + included config.h, and that defined getcwd to rpl_getcwd a second + time (after the original #undef), and led to the rpl_getcwd + function calling itself endlessly. This was the cause of at least + the `du' test failures on IRIX 6.5, reported by Nelson Beebe. + + * same.h (same_name): Remove unnecessary inclusion of config.h. + It also happened to lead to infinite recursion in getcwd.c. + (PARAMS): Remove definition and use. + +2003-03-06 Jim Meyering <jim@meyering.net> + + * ftw.c (ftw_startup): Declare `func' parameter to be of type + NFTW_FUNC_T, not void* which may be smaller on 64-bit systems. + Remove now-unnecessary cast. + (FTW_NAME): Cast func argument to type `NFTW_FUNC_T'. + +2003-03-05 Jim Meyering <jim@meyering.net> + + * physmem.c (ARRAY_SIZE): Define it. + +2003-03-04 Jim Meyering <jim@meyering.net> + + * makepath.c (CLEANUP_CWD): Call error here, now that restore_cwd + no longer does it. + + * save-cwd.h (restore_cwd): Update prototype. + * save-cwd.c (restore_cwd): Remove two parameters. + Simplify. Don't call error upon failure. Let callers do that. + (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4 + when auditing is enabled. But don't bother updating the #if. + + * xgetcwd.c (xgetcwd): Improve comment. + + * getcwd.c: New file. + +2003-02-28 Jim Meyering <jim@meyering.net> + + * ftw.c (ftw_startup): Return -1 if alloca fails. + +2003-02-28 Jim Meyering <jim@meyering.net> + + * fts.c (fts_children): If opening `.' fails, set the fts_child + member to NULL before returning. From NetBSD. + + * fts.c (fts_children): If fchdir fails, close file descriptor + before returning. From NetBSD. + +2003-02-27 Jim Meyering <jim@meyering.net> + + * physmem.c (physmem_total, physmem_available): Add comments. + From Kaveh Ghazi. + + * physmem.c: Merge in portability changes from gcc/libiberty + to support AIX, Tru64, and Windows. See the ChangeLog there + for credits and details. Thanks to Kaveh Ghazi for helping + to keep these files in sync. + +2003-02-24 Jim Meyering <jim@meyering.net> + + * fts_.h [__USE_FILE_OFFSET64]: Remove #error directive. + + (fts_open): Initialize local, tmp, to pacify gcc. + + * fts_.h [struct FTS] (fts_dir_signatures): New, opaque member. + * fts.c: Include <search.h>. + (struct known_object): Define. + (object_compare, add_object, find_object): New functions, like + those in ftw.c. + (fts_open): Initialize new member. + (fts_close): Free memory allocated for new member. + (fts_stat): Detect a cycle in O(logN) time per directory processed. + + * fts.c [HAVE_CONFIG_H]: Include <config.h>. + Conditionalize inclusion of <sys/param.h>. + Conditionalize inclusion of <include/sys/stat.h> vs <sys/stat.h>. + Include autoconf-recommended block of dirent/NAMELEN-related + definitions and includes. Use NAMLEN throughout, rather than + _D_EXACT_NAMLEN. + [_LIBC] (close, closedir, fchdir, open, opendir): Define. + [_LIBC] (readdir, tdestroy, tfind, tsearch): Define. + Remove `__' prefix from all uses of the above. This will help + to merge *BSD changes. + [!_LIBC] (internal_function): Define. + [! _LIBC && ! LSTAT_FOLLOWS_SLASHED_SYMLINK]: Define lstat. + (__set_errno): Define if not already defined. + + * fts.c: (fts_open): If fts_alloc returns NULL, don't dereference it. + (fts_read): If fts_safe_changedir fails because it is not + able to chdir into a subdirectory, then inform the caller. + + * fts.c, fts_.h: New files, directly from glibc. + +2003-02-23 Jim Meyering <jim@meyering.net> + + * fts_.h (struct _ftsent) [fts_level]: Change type from short to int, + so it can handle a root-relative file name longer than 32K bytes. + [fts_pathlen, fts_namelen]: Rearrange members to decrease size of + this struct from 84 to 80 bytes. + +2003-02-21 Jim Meyering <jim@meyering.net> + + * mmap-stack.h: Undefine HAVE_MMAP_STACK, thus disabling + this code on all systems. + + Merge in some changes from GNU libc. + * md5.h (md5_uintptr): Define. + + * ftw.c: Include <sys/types.h> before <dirent.h>. + This is required for Apple Darwin 6.3 (MacOS 10.2.3). + Patch by Nelson Beebe. + +2003-02-19 Jim Meyering <jim@meyering.net> + + * md5.c: Merge in some clean-up and optimization changes from glibc. + * sha.c: Apply those same changes here, too. + +2003-02-18 Jim Meyering <jim@meyering.net> + + * md5.c (md5_stream) [BLOCKSIZE]: Move definition to top of file. + Ensure that it is a multiple of 64. + Rearrange loop exit tests so as to avoid performing an + additional fread after encountering an error or EOF. + * sha.c (sha_stream): Likewise. + Reported by Michael Bacarella. + + * Makefile.am (CLEANFILES): Remove ftw.h and search.h. + (DISTCLEANFILES): Add them here. + Add fnmatch.h, too. + + * sha.c (sha_stream): Rearrange loop exit tests so as to avoid + performing an additional fread after encountering an error or EOF. + +2003-02-17 Jim Meyering <jim@meyering.net> + + * mmap-stack.h (RUN_WITH_BIG_STACK_4): Define. + + * physmem.c: Undo most of last change. + Use sysmp instead, since it provides a cleaner interface. + From Kaveh Ghazi. + +2003-02-16 Jim Meyering <jim@meyering.net> + + * Makefile.am (libfetish_a_SOURCES): Add mmap-stack.h. + + * mmap-stack.c (MAP_ANONYMOUS): Use MAP_ANON, if possible. + Initialize `fd' to -1, so Solaris' mmap works with MAP_ANON. + +2003-02-15 Jim Meyering <jim@meyering.net> + + * mmap-stack.c, mmap-stack.h: New files. + Let the caller run a function with a larger (mmap'd) stack. + + Add Irix6 support to physmem.c. + * physmem.c (irix_sysget): New function. + (IRIX_SYSGET_TOTAL, IRIX_SYSGET_AVAILABLE): New macros. + (physmem_total, physmem_available): Use them. + (main) [DEBUG]: New function. + +2003-02-11 Jim Meyering <jim@meyering.net> + + * Makefile.am (libfetish_a_SOURCES): Add euidaccess.h. + * euidaccess.c: Include "euidaccess.h". + * euidaccess.h: New file. + +2003-02-08 Jim Meyering <jim@meyering.net> + + * ftw.c (ftw_startup): Don't shadow outer declaration of save_err. + Merge inconsequential changes from libc. + + * ftw.c (ftw_startup): When using FTW_CHDIR, always remember + the current directory, not just when DIR contains a slash. + Reported by Manoj Srivastava via Michael Stone as Debian bug #180228. + +2003-02-07 Jim Meyering <jim@meyering.net> + + Merge inconsequential changes from libc. + * ftw.c: Include limits.h earlier. + Move PATH_MAX definition `down' a little; add comment. + Rename local, saved_errno to save_err. + +2003-02-06 Jim Meyering <jim@meyering.net> + + Support for pruning. + * ftw_.h (FTW_DPRE) [enum]: New member and definition. + (struct FTW) [skip]: New member. + + * search_.h (__restrict): Define to `restrict' or to nothing. + + * fsusage.c: Remove declaration of statfs. + It conflicted with one from OSF/1 5.1 in <sys/mount.h>. + Reported by Nelson Beebe. + +2003-02-05 Jim Meyering <jim@meyering.net> + + Fix a heap-corruption bug that affected Solaris systems. + * ftw.c: Include <limits.h>. + (PATH_MAX): Define to 1024, if not already defined. + (process_entry): Allocate enough space to hold the resulting + file name. Don't presume that 2*dirbufsize is enough. + (ftw_startup): Always use PATH_MAX to compute buffer size, now that + it is guaranteed to be defined. + Nelson Beebe reported that du would sometimes segfault on Solaris. + + * ftw.c (process_entry): When using FTW_DEPTH, call `func', the + user-supplied callback, once for the current directory before calling + ftw_dir, in case that part of the hierarchy should be pruned. + `func' does that by setting `data->skip'. + (ftw_startup): Likewise. + +2003-02-02 Jim Meyering <jim@meyering.net> + + * ftw.c (lstat) [!_LIBC && !LSTAT_FOLLOWS_SLASHED_SYMLINK]: + Define to rpl_lstat. + +2003-01-25 Jim Meyering <jim@meyering.net> + + * ftw.c (ISSLASH, FILESYSTEM_PREFIX_LEN) [_LIBC]: Define. + (base_name): New function. + (ftw_startup): Don't strip trailing slashes. + Use base_name to find the offset of the basename. + +2003-01-25 Jim Meyering <jim@meyering.net> + + * ftw.c (object_compare): Compare inode numbers before device numbers. + The former is much more likely to differ for any two given file objects. + +2003-01-23 Jim Meyering <jim@meyering.net> + + * tsearch.c [HAVE_CONFIG_H]: Include <config.h>. + Add autoconf-recommended block of alloca-related code. + Cast each use of alloca to the required type, (node**). + + * ftw.c: Add autoconf-recommended block of alloca-related code. + [!_LIBC] (__getcwd): Define to xgetcwd and declare xgetcwd. + +2003-01-22 Jim Meyering <jim@meyering.net> + + * ftw.c (find_object): Don't use c99-style struct initializer. + + * ftw_.h: Change all uses of __const to const. + * search_.h: Likewise. + + * Makefile.am (CLEANFILES): Add generated files: ftw.h search.h. + + * ftw.c (process_entry): Handle FTW_DCHP. + (ftw_dir): Handle FTW_DCH. + + * ftw_.h [!_LIBC && !__USE_XOPEN_EXTENDED]: Define __USE_XOPEN_EXTENDED + and FTW_H_STANDALONE. + [anon enum] (FTW_DCH, FTW_DCHP): New members. + (FTW_DCH, FTW_DCHP): Define. + + * ftw.c: Include autoconf-recommended block of dirent/NAMELEN + related definitions and includes. Use NAMELEN throughout, + rather than _D_EXACT_NAMLEN. + [_LIBC]: Define NAMELEN to _D_EXACT_NAMLEN. + (stpcpy): Declare, if necessary. + (mempcpy): Define, if necessary. + [!_LIBC] (__stpcpy, __mempcpy): Define. + [!_LIBC] (LXSTAT, XSTAT): Define. + +2003-01-21 Jim Meyering <jim@meyering.net> + + * tsearch.c: New file, from GNU libc. + [! weak_alias]: Define __-prefixed names to publicized ones. + [! defined _LIBC] (weak_alias, internal_function): Define-away. + [defined weak_alias]: Guard each use of weak_alias. + +2003-01-20 Jim Meyering <jim@meyering.net> + + * canonicalize.c: Include "path-concat.h". + + * search_.h: New file, from GNU libc. + + * Makefile.am (libfetish_a_SOURCES): Use ftw_.h here, too. + (libfetish_a_SOURCES): Add search_.h. + * ftw_.h: Rename from ftw.h. + + * obstack.h (obstack_object_size): Declare temporary, __o, + to be const, in order to avoid warnings. + (obstack_room): Likewise. + (obstack_empty_p): Likewise. + + Merge in changes from GNU libc + * error.c: Eliminate many `#ifdef USE_IN_LIBIO' conditionals. + +2003-01-19 Ulrich Drepper <drepper@redhat.com> + + From GNU libc. + * strftime.c (my_strftime): Handle very large width + specifications for numeric values correctly. Improve checks for + overflow. + +2003-01-19 Jim Meyering <jim@meyering.net> + + * strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical definitions. + (nl_get_alt_digit) [! defined my_strftime]: Define. + (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of + _nl_get_alt_digit and _nl_get_walt_digit. + + * strftime.c (my_strftime): Merge in locale-related changes from libc. + These changes have no effect outside of _LIBC. + +2003-01-14 Jim Meyering <jim@meyering.net> + + * same.c (same_name): Declare *_basename locals to be `const'. + Consolidate declarations and initializations of *_base* locals. + +2003-01-11 Bruno Haible <bruno@clisp.org> + + * same.c (same_name): Reorder tests so as to avoid calling stat() + when a string comparison is sufficient. + +2003-01-11 Bruno Haible <bruno@clisp.org> + + * readtokens.c (readtoken): Cast character to 'unsigned char', not + 'unsigned int'. + +2003-01-14 Jim Meyering <jim@meyering.net> + + * ftw.c: Merge in Ulrich's and my changes from libc. + +2003-01-12 Jim Meyering <jim@meyering.net> + + * ftw.c (ftw_startup): Rename local-shadowing local to pacify gcc. + Also work on systems that have `struct direct', using autoconf's + AC_HEADER_DIRENT. + Tweak comments. + + * ftw.h, ftw.c: New files, from glibc/io. + + * Makefile.am (libfetish_a_SOURCES): Add ftw.h. + +2003-01-11 Jim Meyering <jim@meyering.net> + + * makepath.c: Don't test HAVE_ERRNO_H. It's not necessary. + + * canonicalize.c: Don't test HAVE_ERRNO_H. It's not necessary. + Don't test HAVE_STDDEF_H. It's not necessary. + Use definition of PTR_INT_TYPE from obstack.h. + +2002-12-01 Dmitry V. Levin <ldv@altlinux.org> + + * canonicalize.c: New file. + The readlink-based implementation imported from GNU C Library. + The resolveip-based implementation imported from src/df.c (show_point). + * canonicalize.h: New file. + * Makefile.am (libfetish_a_SOURCES): Add canonicalize.h. + +2003-01-10 Jim Meyering <jim@meyering.net> + + * save-cwd.h: Remove uses of PARAMS. + +2002-11-30 Dmitry V. Levin <ldv@altlinux.org> + + * xgetcwd.h: New file. + * Makefile.am (libfetish_a_SOURCES): Add xgetcwd.h. + * save-cwd.c: Include "xgetcwd.h". + * xgetcwd.c: Likewise. + +2002-11-30 Dmitry V. Levin <ldv@altlinux.org> + + * getgroups.c: Don't declare functions declared by xalloc.h. + Include "xalloc.h" instead. + * group-member.c: Likewise. + * idcache.c: Likewise. + * readutmp.c: Likewise. + +2003-01-08 Jim Meyering <jim@meyering.net> + + * full-write.c: Undefine and define-away `const' after inclusion + of errno.h, not before. Suggestion from Bruno Haible. + +2003-01-06 Jim Meyering <jim@meyering.net> + + * full-write.c: Rework so that it may serve to define full_read, too. + * full-read.c: Simply #define FULL_READ and include full-write.c. + + * Makefile.am (libfetish_a_SOURCES): Add full-read.c and full-read.h. + * full-read.c, full-read.h: New files. + + Update from gnulib. + + 2002-12-10 Paul Eggert <eggert@twinsun.com> + Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7. + * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS): + Choose values that are less likely to collide with system fnmatch + options. + * exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not + defined (e.g., a pure POSIX system). + (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME + instead of FNM_FILE_NAME, for compatibility with pure POSIX systems. + + Update from gnulib. + + * utime.c (utime_null): Use SAFE_READ_ERROR. + (utime_null): No need to call ftruncate if the file was nonempty. + * getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not HAVE_TM_ZONE. + * canon-host.c (strdup): Remove unused declaration. + * fsusage.c: Include full_read.h. + (get_fs_usage): Use full_read instead of safe_read. + Patches by Bruno Haible. + +2003-01-04 Jim Meyering <jim@meyering.net> + + * version-etc.c: Update copyright date. + +2002-12-31 Jim Meyering <meyering@lucent.com> + + * dev-ino.h: New file. + * cycle-check.c: New file. + * cycle-check.h: New file. + * Makefile.am (libfetish_a_SOURCES): Add cycle-check.c, cycle-check.h, + and dev-ino.h. + +2002-12-21 Jim Meyering <jim@meyering.net> + + * stime.c: Remove file (for real, this time). + +2002-12-15 Jim Meyering <jim@meyering.net> + + * strftime.h: New file, for declaration of nstrftime. + * Makefile.am (libfetish_a_SOURCES): Add strftime.h. + +2002-12-09 Jim Meyering <jim@meyering.net> + + * unlocked-io.h: Sync from gnulib. + +2002-12-06 Jim Meyering <jim@meyering.net> + + * unlocked-io.h: New file, but with proper copyright notice and + attribution. Note: this is *not* the same as the file in gnulib. + This uses #if HAVE_FUNC_UNLOCKED for each `FUNC', rather than + HAVE_DECL_FUNC_UNLOCKED. This usage is consistent with the autoconf + macro in ../m4/jm-glibc-io.m4. Modulo comments, this file still + contains exactly what was generated by gen-uio. + +2002-12-04 Paul Eggert <eggert@twinsun.com> + + Do not generate unlocked-io.h automatically, since it's easier to + maintain it by hand. + + * gen-uio: Remove. + * Makefile.am: Add copyright notice. + (libfetish_a_SOURCES): Add unlocked-io.h. + (BUILT_SOURCES, all-local): Remove unlocked-io.h. + (DISTCLEANFILES, io_functions): Remove macros. + (EXTRA_DIST): Remove gen_uio. + (unlocked-io.h): Remove rule. + +2002-12-05 Paul Eggert <eggert@twinsun.com> + + * alloca.c [defined emacs]: Include "lisp.h". + (xalloc_die) [defined emacs]: New macro. + (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE. + [! defined emacs]: Include <xalloc.h>. + (POINTER_TYPE) [!defined POINTER_TYPE]: New macro. + (pointer): Typedef to POINTER_TYPE *. + (malloc): Remove decl; we now always use xmalloc. + (alloca): Use old-style definition, since Emacs needs this. + Check for arithmetic overflow when computing combined size. + +2002-12-04 Jim Meyering <jim@meyering.net> + + Reflect the fact that stat.c and lstat.c are no longer generated. + * Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c. + (DISTCLEANFILES): Likewise. + (EXTRA_DIST): Likewise. + (all_local): Don't depend on stat.c or lstat.c. + (stat.c, lstat.c): Remove rules. + (EXTRA_DIST): Remove xstat.in. + + * xstat.in: Remove file. Contents moved into stat.c. + * stat.c: Rework so that it may serve to define rpl_lstat, too. + * lstat.c: Simply #define LSTAT and include stat.c. + + * safe-read.c: Rework so that it may serve to define safe_write, too. + * safe-write.c: Simply #define SAFE_WRITE and include safe-read.c. + +2002-12-03 Jim Meyering <jim@meyering.net> + + * safe-read.h: Update from gnulib (add comments, include stddef.h). + +2002-12-02 Jim Meyering <jim@meyering.net> + + * safe-read.c (EINTR): Define. + (safe_read): Rewrite to iterate IFF the read fails with EINTR. + +2002-12-01 Jim Meyering <jim@meyering.net> + + * safe-read.c: Merge from gnulib. + (safe_read): Also exit the loop when read returns zero. + (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define. + + * Makefile.am (libfetish_a_SOURCES): Add safe-write.c and safe-write.h. + + * strtoll.c: Update from gnulib (trivial changes). + * strdup.c: Likewise. + * strpbrk.c: Likewise. + * strstr.c: Likewise. + * tempname.c: Likewise. + * obstack.c: Likewise. + * getopt.c: Likewise. + * getopt1.c: Likewise. + * getopt.h: Likewise. + * quote.h: Update from gnulib: add Copyright comment. + * quote.c: Likewise. + +2002-11-28 Jim Meyering <jim@meyering.net> + + * mktime.c: Merge from gnulib/libc, for a slightly uglier solution. + + Merge some more, in preparation for merge back into libc. + * error.c (_): Define only if not already defined. + Move definition to follow all #include directives. + Include unlocked-io.h only if !_LIBC. + + Merge in changes from libc. + * error.c [_LIBC]: Include <libio/libioP.h>. + [USE_IN_LIBIO]: Include <libio/iolibio.h> + (fflush): Tweak definition to use INTUSE. + (putc): Define. + +2002-11-23 Jim Meyering <jim@meyering.net> + + From gnulib, by Bruno Haible + * closeout.c: Include gettext.h instead of <libintl.h>. + * makepath.c: Likewise. + * rpmatch.c: Likewise. + * userspec.c: Likewise. + * version-etc.c: Likewise. + * xmemcoll.c: Likewise. + * error.c [!_LIBC]: Include gettext.h instead of <libintl.h>. + + * mbswidth.h: Update from gnulib. + * mbswidth.c: Likewise. + * localcharset.c: Likewise. + * config.charset: Likewise. + * unicodeio.c: Likewise. + +2002-11-22 Paul Eggert <eggert@twinsun.com> + + * quotearg.h: Allow multiple inclusion by surrounding with + "#ifndef QUOTEARG_H_". Include <stddef.h>, for size_t, + so that we can be included first. + (PARAMS): Remove; we now assume C89 or later. All uses removed. + * quotearg.c: Include quotearg.h immediately after config.h. + No need to include stddef.h or sys/types.h any more. + Surround local include files with "", not "<>". + Assume HAVE_LIMITS_H unconditionally, as we assume C89. + Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX, + HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS. + (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC. + (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT. + (ISPRINT): Remove; no longer needed now that we assume C89. + + (clone_quoting_options, quotearg_buffer, quotearg_n_options): + Preserve errno. + + (quotearg_buffer_restyled, quotearg_n, quotearg_n_style, + quotearg_char): Use SIZE_MAX rather than + (size_t) -1 when we are talking about "infinity". + + (quotearg_buffer_restyled): Fix bug when quoting trigraphs. + +2002-11-22 Jim Meyering <jim@meyering.net> + + From gnulib. + * strstr.c: Don't include <sys/types.h>. It's unnecessary. + +2002-11-21 Bruno Haible <bruno@clisp.org> + + Remove case insensitive option matching. + * argmatch.h (argcasematch): Remove declaration. + (ARGCASEMATCH): Remove macro. + (__xargmatch_internal): Remove case_sensitive argument. + (XARGMATCH): Update. + (XARGCASEMATCH): Remove macro. + * argmatch.c (argmatch): Renamed from __argmatch_internal. Remove + case_sensitive argument. + (argcasematch): Remove function. + (__xargmatch_internal): Remove case_sensitive argument. + (main): Use XARGMATCH instead of XARGCASEMATCH. + + * argmatch.c: Include gettext.h instead of <locale.h> and <libintl.h>. + +2002-11-21 Bruno Haible <bruno@clisp.org> + + * xmalloc.c: Change compile-time error message. Add comment about + required autoconf version. + * xmalloc.c: Include gettext.h instead of <libintl.h>. + (textdomain): Remove definition. + +2002-11-21 Jim Meyering <jim@meyering.net> + + * strdup.c (strdup): Merge in changes from gnulib; mainly to + use memcpy rather than strcpy. + + * strcspn.c: Update from gnulib. + + * sig2str.c (str2signum): Use unsigned, not size_t, for type of index. + + * quotearg.c: Use `"'s when including quotearg.h and xalloc.h, + not the `<...>' notation. + Include <errno.h> and declare errno if necessary. + + * README: Update from gnulib. + +2002-11-20 Paul Eggert <eggert@twinsun.com> + + Merge argmatch cleanups from Bison. Assume C89. + + * argmatch.c: Include config.h here, not in argmatch.h. + Include stdlib.h, for EXIT_FAILURE. + Always include <string.h>, since we assume C89. + (EXIT_FAILURE): Remove pre-C89 bug workaround. + * argmatch.h: Do not include <config.h> or <sys/types.h>. + Include <stddef.h> instead, since it's all we need for size_t. + (PARAMS): Remove. All uses removed. + (ARRAY_CARDINALITY): Do not bother to #undef. + (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg, + ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH): + Remove unnecessary parentheses. + (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH): + Insert necessary parentheses. + (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros. + (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT. + +2002-11-19 Jim Meyering <jim@meyering.net> + + Be careful not to clobber errno. + * quotearg.c (quotearg_buffer_restyled): If mbrtowc returns + `(size_t) -1' (at which point it would also set errno to EILSEQ), + then restore errno to its previous value. + Reported by Phillip Jones via Tim Waugh as + https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=76334. + + Avoid a link-time failure on some Linux systems. + * mktime.c (STATIC): Define to be empty (_LIBC) or `static' (otherwise). + (__mon_yday): Declare with the STATIC attribute. + (__mktime_internal): Likewise. + Based on a report from Greg Schafer. + +2002-11-14 Jim Meyering <jim@meyering.net> + + * long-options.c: Don't include libintl.h, and don't define `_' -- + they're not used. + * same.c: Likewise. + +2002-11-10 Jim Meyering <jim@meyering.net> + + * raise.c: New file. + +2002-11-08 Paul Eggert <eggert@twinsun.com> + + * human.c (human_readable): Revamp to avoid warning about unused + variable 'amt'. Unfortunately this means using some gotos. + +2002-11-08 Jim Meyering <jim@meyering.net> + + * human.c (human_readable): Avoid warnings from gcc -Wshadow. + +2002-11-06 Jim Meyering <jim@meyering.net> + + * Makefile.am (EXTRA_DIST): Add inttostr.h. + +2002-10-07 Paul Eggert <eggert@twinsun.com> + + * Makefile.am (libfetish_a_SOURCES): Add imaxtostr.c, offtostr.c, + umaxtostr.c. + (EXTRA_DIST): Add inttostr.c. + * inttostr.c, inttostr.h, imaxtostr.c, offtostr.c, umaxtostr.c: + New files, taken from GNU tar. + + * human.c, human.h: Rewrite to support locale-specific + notations like thousands separators. + Specify what includer of include.h must include beforehand. + (human_group_digits, human_suppress_point_zero, human_autoscale, + human_base_1024, human_SI, human_B): New enum values. + (human_readable): Rename from human_readable_inexact; put the + options before the sizes. All uses changed. The old human_readable + function has been removed; use inttostr.h instead. + (human_options): Renamed from human_block_size, with new signature + that allows block sizes up to UINTMAX_MAX. All callers changed. + +2002-10-13 Jim Meyering <jim@meyering.net> + + * xnanosleep.c (initialized): Remove declaration now that it's unused. + +2002-10-12 Paul Eggert <eggert@twinsun.com> + + * xnanosleep.c: There's no need to futz with the rounding mode, + since the code should work properly even in the default rounding mode. + (<fenv.h>): Do not include. + (#pragma STDC FENV_ACCESS ON): Remove. + (xnanosleep): Don't futz with rounding state. + +2002-10-06 Jim Meyering <jim@meyering.net> + + * safe-read.c (safe_read): Change type of function + from ssize_t to size_t. + * safe-read.h: Update prototype. + (SAFE_READ_ERROR): Define. + +2002-09-28 Jim Meyering <jim@meyering.net> + + * makepath.c (make_path): Restore umask *before* creating the final + component. + +2002-09-25 Paul Eggert <eggert@twinsun.com> + + * fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include <stdint.h>. + (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro. + (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than + int. Work more efficiently if X is the same width as uintmax_t. + Do not compare X to -1, to avoid bogus compiler warning. + (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast. + Don't assume that f_frsize and f_bsize are the same type. + +2002-09-25 Jim Meyering <jim@meyering.net> + + * fsusage.c: Remove unneeded parentheses around operands of `defined'. + + * safe-read.c (safe_read): Make comment more precise: + upon error, it returns -1. + +2002-09-22 Jim Meyering <jim@meyering.net> + + * makepath.c (make_path): Minor reformatting. + +2002-09-14 Paul Eggert <eggert@twinsun.com> + + * xnanosleep (xnanosleep): Return -1 on failure, not 1, + for consistency with nanosleep. Check errno after nanosleep + returns -1. + +2002-09-11 Jim Meyering <jim@meyering.net> + + * xnanosleep.c, xnanosleep.h: New files, factored out of sleep.c. + * Makefile.am (libfetish_a_SOURCES): Add them. + +2002-09-04 Jim Meyering <jim@meyering.net> + + * addext.c (addext): Add a cast to avoid gcc's warning about + `comparison between signed and unsigned'. + + * sig2str.c (str2signum, sig2str): Declare loop index variables to be + of type size_t so that they match type of upper bound, thus avoiding + warning about `comparison between signed and unsigned'. + +2002-08-31 Jim Meyering <jim@meyering.net> + + * mktime.c: Update from GNU libc. + * obstack.c: Likewise. + * getopt.c: Likewise. + * getopt1.c: Likewise. + +2002-08-05 Paul Eggert <eggert@twinsun.com> + + Fix some minor time-related bugs with POSIX time arguments. + Some valid time stamps were being rejected (notably -1, and + time stamps before 1900 on 64-bit hosts). And some invalid + time stamps were being accepted, e.g. September 31. + + * posixtm.h (posixtime): Return bool instead of time_t, so + that we can return (time_t) -1 successfully. + * posixtm.c: Likewise. + [HAVE_STDBOOL_H]: Include <stdbool.h>. + (bool, false, true) [!HAVE_STDBOOL_H]: New type. + (t): Remove static var. + (year, posix_time_parse): Now takes struct tm * arg to modify, instead + of static var. All uses changed. + (year): Do not reject years before 1900; they can occur with + 64-bit time_t. + (posix_time_parse): Do not check for out-of-range components; + that is now the caller's responsibility, since our checks were + only approximations. + (posixtime): Use mktime to check for out-of-range components, + since it knows them exactly. + If mktime returns (time_t) -1, check whether an error actually occurred + by invoking localtime on -1. + (main) [TEST_POSIXTIME]: Check for input data errors, and report + posixtime failures better. + Improve the test data (in comments only). + +2002-07-27 Jim Meyering <jim@meyering.net> + + * readutmp.h: If we have both utmpx.h and utmp.h, and there exists + the utmp.ut_exit member, but not the utmpx.ut_exit member, then + undefine HAVE_UTMPX_H. For AIX 4.3.3. Doing all this in cpp is + a big kludge; someday we'll put the brains in an autoconf macro. + (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define. + +2002-07-20 Jim Meyering <jim@meyering.net> + + * xmalloc.c: Adjust to work with new autoconf macros, AC_FUNC_MALLOC + and AC_FUNC_REALLOC: test #ifndef HAVE_MALLOC/HAVE_REALLOC. + + * gettext.h: Upgrade to gettext-0.11.3. + +2002-07-13 Bruno Haible <bruno@clisp.org> + + * xstat.in: Include <string.h>. + * mountlist.c: #undef MNT_IGNORE before defining it, to avoid warning + on FreeBSD. + +2002-07-09 Jim Meyering <jim@meyering.net> + + * mountlist.h (ME_DUMMY): Don't count entries of type `auto' as dummy + ones. At least on GNU/Linux systems, `auto' means something else. + From Michael Stone. + +2002-07-01 Jim Meyering <jim@meyering.net> + + * c-stack.c: Include sys/time.h. + From Volker Borchert. + +2002-06-11 Paul Eggert <eggert@twinsun.com> + + * fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT): + New macro. Use it uniformly instead of + (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H). + It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1 + reported by Vin Shelton. + +2002-06-22 Jim Meyering <jim@meyering.net> + + * fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about + redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h. + +2002-06-22 Paul Eggert <eggert@twinsun.com> + + * c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]: + Do not assume SA_SIGINFO behavior. + Bug reported by Jim Meyering on NetBSD 1.5.2. + +2002-06-22 Jim Meyering <jim@meyering.net> + + * c-stack.c, c-stack.h: New files, from diffutils-2.8.2. + + * exitfail.c, exitfail.h: Likewise. + * Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h. + + * Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place + of fnmatch.h. + (EXTRA_DIST): Add fnmatch_loop.c. + (libfetish_a_SOURCES): Add c-stack.c and c-stack.h. + + * fnmatch_loop.c: New file, from diffutils-2.8.2. + * fnmatch.c: Update from diffutils-2.8.2. + * fnmatch_.h: New file. From diffutils-2.8.2. + * fnmatch.h: Remove file. + +2002-06-18 Paul Eggert <eggert@twinsun.com> + + * file-type.h: Report an error if neither S_ISREG nor + S_IFREG is defined, instead of using a test specific to glibc + 2.2. This should be safe, since POSIX requires S_ISREG and + Unix Version 7 had S_IFREG. We don't need to check for + <sys/types.h> since we don't use any symbols that it defines. + +2002-06-15 Jim Meyering <jim@meyering.net> + + * file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef. + For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h> + have been included before this file. + +2002-06-13 Richard Dawe <richdawe@bigfoot.com> + + * Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than $@-t, + so that each temporary file name is unique and valid in the first + 8 characters, for operation under DOS. + +2002-06-15 Jim Meyering <jim@meyering.net> + + Work even with DJGPP 2.03, which lacks support for symlinks. + From Richard Dawe. + * xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK + is defined. + * lchown.c (S_ISLNK): Likewise. + +2002-06-14 Jim Meyering <jim@meyering.net> + + * file-type.h: Use the version from diffutils-2.8.2. + * file-type.c: Likewise. + +2002-05-27 Jim Meyering <jim@meyering.net> + + Fix a problem seen only on nonconforming systems whereby ls.c's + use of localtime, and then of gettimeofday would cause trouble: + the localtime call used to initialize rpl_gettimeofday's save + mechanism would clobber ls's current local time information so + that in any long listing the first file would always be listed + with date 1970-01-01. Analysis by Volker Borchert. + + * gettimeofday.c (localtime): Undefine. + (rpl_localtime): New function. + +2002-05-22 Jim Meyering <jim@meyering.net> + + * Makefile.am (libfetish_a_SOURCES): Add file-type.c and file-type.h. + * file-type.h: New file. + * file-type.c (file_type): New file/function. Extracted from diffutils. + +2002-04-29 Paul Eggert <eggert@twinsun.com> + + * hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1. + +2002-04-28 Paul Eggert <eggert@twinsun.com> + + * sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid + depending on <sys/wait.h> and WTERMSIG. Default to 64 instead + of 127, since 64 is the largest conceivable number for ancient + nonstandard hosts. + * sig2str.c: Do not include <sys/wait.h>; no longer needed. + +2002-04-28 Jim Meyering <jim@meyering.net> + + * sig2str.c (WTERMSIG): Remove definition (unused). + +2002-04-28 Paul Eggert <eggert@twinsun.com> + + * sig2str.h, sig2str.c: New files. + * Makefile.am (libfetish_a_SOURCES): Add sig2str.h. + +2002-04-24 Jim Meyering <jim@meyering.net> + + * gettext.h: New file, from Gettext. + * Makefile.am (INCLUDES): Remove -I../intl. + (libfetish_a_SOURCES): Add gettext.h. + +2002-04-16 Jim Meyering <jim@meyering.net> + + * readutmp.h (UT_TYPE): Remove definition (now in who.c). + (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define. + (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define. + +2002-04-12 Jim Meyering <jim@meyering.net> + + * dirfd.h (dirfd): Elide prototype if dirfd is a macro. + +2002-03-10 Jim Meyering <jim@meyering.net> + + * makepath.c (make_path): Remove a comma from a diagnostic. + Suggestion from Santiago Vila. + +2002-03-08 Jim Meyering <jim@meyering.net> + + * rename.c: Mention that this wrapper is needed also on + mips-dec-ultrix4.4 systems. + +2002-03-02 Jim Meyering <jim@meyering.net> + + * gettime.c (gettime): Test HAVE_CLOCK_GETTIME, + not HAVE_CLOCK_SETTIME. + +2002-02-27 Paul Eggert <eggert@twinsun.com> + + * nanosleep.h: Rename to.... + * timespec.h: New name for nanosleep.h. All uses changed. + + * gettime.c: New file. + * settime.c: New file. + * stime.c: Remove. + + * Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c, + timespec.h. Remove nanosleep.h. + +2002-02-25 Paul Eggert <eggert@twinsun.com> + + * acl.c, acl.h: New files. + * Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c. + +2002-02-24 Jim Meyering <jim@meyering.net> + + * strnlen.c (strnlen): Define-away/undef so that an inconsistent + prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't + cause trouble. Reported by Nelson Beebe. + +2002-02-23 Paul Eggert <eggert@twinsun.com> + + * path-concat.c (xpath_concat): Reorder code to pacify + compilers that don't know that xalloc_die never returns. + +2002-02-20 Jim Meyering <jim@meyering.net> + + * getdate.c: Regenerate using bison-1.33. + +2002-02-15 Paul Eggert <eggert@twinsun.com> + + * posixver.c, posixver.h: New files. + * Makefile.am (libfetish_a_SOURCES): Add them. + +2002-02-02 Paul Eggert <eggert@twinsun.com> + Bruno Haible <bruno@clisp.org> + + * unicodeio.h (print_unicode_char): Add exit_on_error argument. + (fwrite_success_callback): New declaration. + * unicodeio.c (unicode_to_mb): New function, extracted from + print_unicode_char. Call failure callback instead of error. + (fwrite_success_callback): New function. + (exit_failure_callback): New function. + (fallback_failure_callback): New function. + (print_unicode_char): Call unicode_to_mb. + +2002-01-26 Jim Meyering <jim@meyering.net> + + * Makefile.am (getdate$U.o): Depend on unlocked-io.h. + +2002-01-22 Jim Meyering <jim@meyering.net> + + * Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES). + Otherwise, some versions of automake would omit the rule that makes + Makefile from Makefile.in. + +2001-01-21 Paul Eggert <eggert@twinsun.com> + + * xmemcoll.h, xmemcoll.c: New files. + * Makefile.am (libfetish_a_SOURCES): Add them. + * memcoll.c: Include errno.h, and declare errno if not defined. + (memcoll): Set errno to zero if there is no error. + + * quotearg.c (quotearg_buffer_restyled): + Fix bug with quoting buffers containing NUL when backslashing escapes. + This bug was exposed by the other changes in this patch. + (quotearg_n_options): New arg ARGSIZE. + All callers changed. + (quoting_options_from_style): New function. + (quotearg_n_style): Use it. + (quotearg_n_style_mem): New function. + + * quotearg.h (quotearg_n_style_mem): New function. + +2002-01-16 Jim Meyering <jim@meyering.net> + + * getdate.y: Add three semicolons, each just before a closing brace. + Bison (as of version 1.31) no longer papers over that mistake. + +2002-02-14 Paul Eggert <eggert@twinsun.com> + + * backupfile.c (ISDIGIT): Comment fix. + * getdate.y (ISDIGIT): Likewise. + * posixtm.c (ISDIGIT, year): Likewise. + * strverscmp.c (ISDIGIT): Likewise. + * userspec.c (ISDIGIT): Likewise. + +2002-01-05 Jim Meyering <jim@meyering.net> + + * version-etc.c (version_etc_copyright): Update copyright year. + +2001-01-19 Paul Eggert <eggert@twinsun.com> + + * closeout.c (close_stdout_status): If ferror (stdout), do + not silently exit merely because the output buffer happens to + have nothing pending. + +2001-12-18 Paul Eggert <eggert@twinsun.com> + + See the big note in ../ChangeLog. + * human.c (suffixes): Prefer K to k for 1024. + (generate_suffix_backwards): New function. + (human_readable_inexact): Use it. + * xstrtol.c (__xstrtol): If there is no number but there + is a valid suffix, assume 1. "MB" now means decimal, "MiB" binary. + Accept 'K' as well as 'k'. + +2001-12-15 Jim Meyering <jim@meyering.net> + + * regex.h (__restrict_arr): Update from libc. + + * mountlist.h (ME_REMOTE): Recognize file systems of type smbfs + as `remote' if the name starts with `//'. Suggested by Michael Stone. + (STREQ): Define. + +2001-12-10 Jim Meyering <jim@meyering.net> + + * linebuffer.c: Remove explicit declarations of xmalloc and xrealloc, + Instead, include "xalloc.h". + (initbuffer): Don't cast xmalloc return value to char*. + (readline): Reword comment. + Don't cast xrealloc return value to char* + Return NULL, not 0. + +2001-12-09 Jim Meyering <jim@meyering.net> + + * modechange.c (mode_compile): Add cast to avoid pedantic warning about + `signed and unsigned type in conditional expression'. + * posixtm.c (posix_time_parse): Likewise. + + * xreadlink.c (xreadlink): Add cast to avoid a pedantic warning. + + * readtokens.c (readtoken): Declare an index to be of type unsigned + to avoid a pedantic warning. + + * getstr.c: Don't include assert.h. + (getstr): Remove warning-evoking assertions. + Return -1 if offset parameter is out of bounds. + Change the type of a local from int to size_t. + + * strftime.c (my_strftime_localtime_r): Include this function + definition in the `#if ! HAVE_TM_GMTOFF' block. + + * xgethostname.c: Remove declarations of xmalloc and xrealloc. + Include xalloc.h instead. + +2001-12-02 Jim Meyering <jim@meyering.net> + + * tempname.c: Don't declare getenv, thus reverting the change of + 2001-11-18. It's no longer necessary, now that stdlib.h is always + included. + + * regex.c [!__BOUNDED_POINTERS__]: Define away __bounded, + __unbounded, and __ptrvalue. Reported by Uwe H. Steinfeld. + +2001-11-30 Akim Demaille <akim@epita.fr> + + * xstrdup.c: Include xalloc.h, so that xstrdup is declared + before being defined. + +2001-11-27 Paul Eggert <eggert@twinsun.com> + + * quotearg.h (quotearg_n, quotearg_n_style): + First arg is int, not unsigned. + * quotearg.c (quotearg_n, quotearg_n_style): Likewise. + (SIZE_MAX, UINT_MAX): New macros. + (quotearg_n_options): Abort if N is negative. + Avoid overflow check on hosts where size_t is 64 bits and int + is 32 bits, as overflow is impossible there. + Fix off-by-one typo that caused unnecessary reallocation. + +2001-11-27 Jim Meyering <jim@meyering.net> + + * tempname.c: Merge with version from libc. + * regex.c: Likewise. + + * tempname.c: Include stdlib.h unconditionally. On some old systems + for which STDC_HEADERS is 0, it was not included, resulting in a + warning about an integer-to-pointer conversion problem with getenv. + Reported by Volker Borchert. + +2001-11-26 Jim Meyering <jim@meyering.net> + + * gtod.h: Remove file. + * Makefile.am (libfetish_a_SOURCES): Remove gtod.h. + * gettimeofday.c: Don't include gtod.h. + (GTOD_init): Remove function. + (rpl_gettimeofday): Do its job here instead, rather than aborting. + Suggestion from Volker Borchert. + +2001-11-23 Jim Meyering <jim@meyering.net> + + * hash.h (struct hash_table): Don't define here. Merely declare it. + * hash.c (struct hash_table): Define it here instead. + +2001-11-22 Jim Meyering <jim@meyering.net> + + * hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif. + +2001-11-18 Paul Eggert <eggert@twinsun.com> + + * tempname.c (TMP_MAX): Remove; no longer needed. + (TEMPORARIES): New macro. + (__gen_tempname): Use TEMPORARIES rather than TMP_MAX. This + removes an artificial limitation (e.g. HP-UX 10.20, where + TMP_MAX is 17576). + +2001-11-18 Jim Meyering <jim@meyering.net> + + * tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning + on SunOS 4. + + * Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those + files will be created before anything else. + +2001-11-17 Jim Meyering <jim@meyering.net> + + * modechange.c (mode_adjust): Fix error introduced on 1999-04-26 + that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable + rather than group writable. Patch by Juan F. Codagnone. + + * readtokens.c: Remove explicit declarations of xmalloc and xrealloc, + Instead, include "xalloc.h". + + * mountlist.c: Include unlocked-io.h after all system headers. + Remove explicit declarations of xmalloc, xrealloc, + and xstrdup. Instead, include "xalloc.h". + + * argmatch.c, closeout.c, error.c, exclude.c: Include unlocked-io.h. + * fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c: Likewise. + * mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise. + + * regex.c, sha.c, version-etc.c, yesno.c: Likewise. + Reported by Padraig Brady. + + * mkstemp.c: #undef mkstemp. + Include config.h. + (rpl_mkstemp): Rename from mkstemp. + Protoize. + +2001-11-16 Jim Meyering <jim@meyering.net> + + * physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>. + (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to + determine the amount of total physical memory, use pstat_getstatic. + HPUX-11 doesn't define _SC_PHYS_PAGES. + (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]: + If sysconf couldn't be used to determine the amount of available + physical memory, use both pstat_getstatic and pstat_getdynamic. + Based on a patch from Bob Proulx. + +2001-11-05 Jim Meyering <jim@meyering.net> + + * xstat.in (slash_aware_lstat): Correct a misleading comment. + +2001-11-03 Jim Meyering <jim@meyering.net> + + * argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args + in argmatch_to_argument call. + + * dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an + argument. + + * hash.c (hash_clear): Fix a bug that could lead to an infloop or + e.g., a fault due to an attempt to free a NULL pointer. + +2001-11-01 Jim Meyering <jim@meyering.net> + + * dirfd.c, dirfd.h: New files. + * Makefile.am (libfetish_a_SOURCES): Add dirfd.h. + + * hash.c (hash_print) [TESTING]: Clean up. + +2001-10-22 Paul Eggert <eggert@twinsun.com> + + * hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__, + to avoid a warning if -Wall. + +2001-10-21 Paul Eggert <eggert@twinsun.com> + + * regex.c (uintptr_t): Remove macro and decl; it's config.h's job. + +2001-10-21 Jim Meyering <jim@meyering.net> + + * obstack.c (_): Honor the setting of ENABLE_NLS. Otherwise, + this code would end up calling gettext even in packages built + with --disable-nls. + * getopt.c (_): Likewise. + * regex.c (_): Likewise. + +2001-10-20 Paul Eggert <eggert@twinsun.com> + + * error.c (strerror_r): Do not declare unless !_LIBC. + Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P. + Use strerror_r that is only a macro, even if it is not a function. + (strerror): Check for HAVE_DECL_STRERROR before declaring. + (private_strerror): Use prototypes, not old-style function definition. + (print_errno_message): New function. + Support the POSIX 'int'-flavored strerror_r, as well as the traditional + char*-flavored one. + (error_tail, error, error_at_line): Use it. + +2001-10-11 Jim Meyering <jim@meyering.net> + + * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ... + and quote_n (1, ... to avoid clobbering a buffer. + +2001-10-05 Jim Meyering <jim@meyering.net> + + * Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h. + * hash-pjw.c: New file (factored out of fileutils' remove.c). + * hash-pjw.h: New file. + +2001-09-30 Jim Meyering <jim@meyering.net> + + * mountlist.c [MOUNTED_GETFSSTAT]: + Include <sys/ucred.h>, for Apple Darwin. + Include sys/mount.h and sys/fs_types.h only if available. + (FS_TYPE): Define. + (read_filesystem_list): Use FS_TYPE. + +2001-09-29 Paul Eggert <eggert@twinsun.com> + + * exclude.c (excluded_filename): 0 -> false, since it's + a boolean context. + +2001-09-28 Paul Eggert <eggert@twinsun.com> + + Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which + #defines strtoimax. Also treat the other strto* functions + like strtoimax. + + * xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL. + (strtoul): Do not declare if HAVE_DECL_STRTOUL. + (strtoimax, strtoumax): Do not declare if already defined as a macro. + +2001-09-26 Jim Meyering <jim@meyering.net> + + Most macros in unlocked-io.h had the wrong number of arguments. + * gen-uio: New script. + (USE_UNLOCKED_IO): Define to 1 if not already defined. + * unlocked-io.hin: Remove file. + * Makefile.am (unlocked-io.h): Rewrite to use a separate script, + rather than trying to embed it here. + (EXTRA_DIST): Add gen-uio. Remove unlocked-io.hin + Reported by Padraig Brady. + +2001-09-25 Volker Borchert <bt@teknon.de> + + * gettimeofday.c (rpl_gettimeofday): Declare local variable `result'. + +2001-09-23 Jim Meyering <jim@meyering.net> + + * mountlist.c: Remove useless parentheses in #if directives. + (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when + the deprecated MOUNTED symbol is no longer defined in mntent.h. + +2001-09-22 Jim Meyering <jim@meyering.net> + + * localcharset.c: Update from latest gettext. + * config.charset: Likewise. + +2001-09-20 Jim Meyering <jim@meyering.net> + + * xstrtol.c (strtoimax): Guard declaration with + `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'. + The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0) + have their own, conflicting declaration of strtoimax in sys/inttypes.h. + (strtoumax): Likewise, for completeness (it wasn't necessary). + +2001-09-06 Paul Eggert <eggert@twinsun.com> + + * strtoimax.c (HAVE_LONG_LONG): + Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned. + (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base), + to work around bug in IBM C compiler. + +2001-09-16 Jim Meyering <jim@meyering.net> + + * mkdir.c: New file. + +2001-09-04 Paul Eggert <eggert@twinsun.com> + + * xgetcwd.c: Revert some of the previous change; intead, + fix the HAVE_GETCWD_NULL code to behave more like the + !HAVE_GETCWD_NULL code used to. + + Include "xalloc.h". + (xgetcwd): Do not return NULL when memory is exhausted; instead, + invoke xalloc_die. + +2001-09-04 Paul Eggert <eggert@twinsun.com> + + * xreadlink.c (xreadlink): Omit size_t* arg. All uses changed. + Use ssize_t, not int, to store result of readlink. + Check for ssize_t overflow as well as size_t overflow, + as POSIX says the result of readlink is implementation-defined + when ssize_t overflows. + Remove unnecessary cast to char*. + Use free+malloc instead of realloc, as the storage doesn't need + to be preserved and it's clearer and can be more efficient that way. + (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare. + * xreadlink.h (xreadlink): Update prototype. + +2001-09-03 Paul Eggert <eggert@twinsun.com> + + * exclude.c (fnmatch_no_wildcards): Fix confusion between + usage of FNM_CASEFOLD and FNM_LEADING_DIR. The bug was + spotted by Jim Meyering. + +2001-09-03 Jim Meyering <jim@meyering.net> + + * xreadlink.c (xreadlink): Preserve errno around `free' during failure. + +2001-09-03 Paul Eggert <eggert@twinsun.com> + + * xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more + like the HAVE_GETCWD_NULL code. + Include pathmax.h if not HAVE_GETCWD. + Do not include xalloc.h. + (INITIAL_BUFFER_SIZE): New symbol. + Do not use xmalloc / xrealloc, since the caller is responsible for + handling errors. Preserve errno around `free' during failure. + Do not overrun buffer when using getwd. + +2001-09-03 Paul Eggert <eggert@twinsun.com> + + * xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined + __GLIBC__ && __GLIBC__ >= 2), to decide whether to use getcwd (NULL, 0). + +2001-09-02 Jim Meyering <jim@meyering.net> + + * error.c: Update from GNU libc. + +2001-09-01 Jim Meyering <jim@meyering.net> + + * xreadlink.c: New file. + * xreadlink.h: New file. + * Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h. + + * regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it + doesn't conflict with sparc Solaris 7's definition in + /usr/include/sys/int_types.h. + + * exclude.c: Use `""', not `<>' to #include non-system header files. + (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp + and strncasecmp as r-values. Unixware didn't have declarations. + +2001-08-31 Jim Meyering <jim@meyering.net> + + * xgetcwd.c (xgetcwd): Reorganize to avoid some duplication. + Use an initial, malloc'd, buffer of length 128 rather than + a statically allocated one of length 1024. + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + * xgetcwd.c: Don't include pathmax.h. + Include stdlib.h and unistd.h if available. + Include xalloc.h. + (xmalloc, xstrdup, free): Remove decls. + (xgetcwd): Don't assume sizes fit in unsigned. + Check for overflow when computing sizes. + Simplify reallocation code. + +2001-08-28 Paul Eggert <eggert@twinsun.com> + + * Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c. + + * strtoimax.c: Renamed from strtoxmax.c, removing the + old strtoimax.c. + + Also, make the following further changes to make this file's + configuration more similar to that of strtol.c: + (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED. All uses changed. + (strtoumax, uintmax_t, strtoull, strtol): Remove. + (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED. + (strtoimax): Renamed from strtoumax. All uses of unsigned values + changed to signed values. + + And make the following changes as well: + Fix copyright notice, as 1999 was missing. + (verify): New macro. + (strtoimax): Check sizes at compile-time, not run-time. + Prefer strtol to strtoll if both work. + (main): Remove; it was not that useful and was a pain to maintain. + + * strtoumax.c: Include strtoimax.c, not strtouxmax.c. + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + * savedir.c (savedir): Remove size parameter, as POSIX says that + a directory's st_size can have an arbitrary value, so the old + usage could waste an arbitrary amount of memory. All uses + changed. + * savedir.h: Update prototype. + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + * xstrtol.c (strtoimax): New decl. + +2001-08-28 Paul Eggert <eggert@twinsun.com> + + * xstrtol.h: Add copyright notice. + (_DECLARE_XSTRTOL): Improve quality of diagnostic for + LONGINT_INVALID_SUFFIX_CHAR. + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + * quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct + tm to be declared. + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + * hash.c: Remove '2001' from copyright notice. + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + * full-write.h: New file. + * Makefile.am (libfetish_a_SOURCES): Add full-write.h. + * full-write.c: Correct credits, as cccp.c no longer + exists and anyway it was so heavily changed from the old cccp + code as to be unrecognizable. Include full-write.h. + (full_write) Return size_t, with short writes meaning failure. + All callers changed. This fixes a bug with large buffers + on 64-bit hosts. + * utime.c: Include full-write.h. + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + Merge 'exclude' changes from tar 1.13.22. + This fixes one or two unlikely storage allocation overflow bugs, + but doesn't change user-visible behavior otherwise. + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + * exclude.c (bool): Declare, perhaps by including stdbool.h. + (<sys/types.h>): Include only if HAVE_SYS_TYPES_H. + (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>): + Include if available. + (<xalloc.h>): Include + (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't. + (verify): New macro. Use it to verify that EXCLUDE macros do not + collide with FNM macros. + (struct patopts): New struct. + (struct exclude): Use it, as exclude patterns now come with options. + (new_exclude): Support above changes. + (new_exclude, add_exclude_file): + Initial size must now be a power of two to simplify overflow checking. + (free_exclude, fnmatch_no_wildcards): New function. + (excluded_filename): No longer requires options arg, as the options + are determined by add_exclude. Now returns bool, not int. + (excluded_filename, add_exclude): + Add support for the fancy new exclusion options. + (add_exclude, add_exclude_file): Now takes int options arg. + Check for arithmetic overflow when computing sizes. + (add_exclude_file): xrealloc might modify errno, so don't + realloc until after errno might be used. + + * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS): + New macros. + (free_exclude): New decl. + (add_exclude, add_exclude_file): Now takes int options arg. + (excluded_filename): No longer requires options arg, as the options + are determined by add_exclude. Now returns bool, not int. + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + * alloca.c (alloca): Arg is of type size_t, not unsigned. + +2001-08-27 Jim Meyering <jim@meyering.net> + + * Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c + + * version-etc.c (N_): Remove definition. + Revert most of last change. + Instead, simply don't mark the `Copyright...' string for translation. + Based on advice from Paul Eggert. + + * strtoxmax.c: Tweak comment. + +2001-08-26 Jim Meyering <jim@meyering.net> + + * version-etc.c (version_etc_copyright_fmt): Replace literal year + of copyright with `%s' so translators don't get an untranslated + message in 2002. + (COPYRIGHT_YEAR): Define. + (version_etc): Use fprintf rather than fputs. + Suggestion from Ulrich Drepper. + + * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c. + + * strtoll.c: New file, from GNU libc. + * xstrtoimax.c: New file. + + * xstrtol.h: Add xstrtoimax. + * strtoumax.c: New file. Simply include "strtoumax.c". + * strtoimax.c: New file. Likewise, but first define STRTOUXMAX_SIGNED. + + * strtoumax.c: Factor to work both for unsigned and signed types, ... + * strtoxmax.c: ... then renamed to this. + +2001-08-13 Paul Eggert <eggert@twinsun.com> + + * Makefile.am (unlocked-io.h): Do not append "_unlocked" twice. + Port to Solaris 8, where 'sed' requires a space after the 'r' + command, and where sh dislikes "$/". Clean up the spacing a bit. + Redirect output to $tmp just once. + +2001-08-12 Paul Eggert <eggert@sic.twinsun.com> + + * addext.c (<errno.h>): Include. + (errno): Declare if not defined. + (addext): Work correctly when pathconf returns -1 and leaves + errno alone because there is no limit. Also, work even if + pathconf returns a value greater than SIZE_MAX. + +2001-08-12 Jim Meyering <jim@meyering.net> + + * xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]: + Simply `return getcwd (NULL, 0);'. + [! (defined __GLIBC__ && __GLIBC__ >= 2)]: + Use 1300 as initial value for length, not PATH_MAX. + + * pathmax.h: Clean up cpp syntax. + +2001-08-12 Jim Meyering <jim@meyering.net> + + * gettimeofday.c: New file. + * gtod.h: New file. + * Makefile.am (libfetish_a_SOURCES): Add gtod.h. + +2001-08-04 Jim Meyering <jim@meyering.net> + + * error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt, + to get in sync with glibc. + +2001-08-03 Paul Eggert <eggert@twinsun.com> + + The following changes are from gettext 0.10.39 as maintained by + Bruno Haible. + + * mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID): + Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID + with inverted sense. All uses changed. + + * mbswidth.c: Don't include <limits.h>. + Include <stdlib.h> and <string.h> unconditionally. + (iswcntrl, mbsinit, ISCNTRL): New macros. + (mbsnwidth): Use K&R style function declarations. + Don't bother checking for MB_LEN_MAX == 1, since the compiler + can optimize it when MB_CUR_MAX == 1. + The width of control characters is zero, not 1. + +2001-07-15 Jim Meyering <jim@meyering.net> + + * Makefile.am (EXTRA_DIST): Add unlocked-io.hin. + (BUILT_SOURCES): Add unlocked-io.h. + (io_functions): Define. + (unlocked-io.h): New rule. + (DISTCLEANFILES): Add unlocked-io.h. + (all-local): Depend on unlocked-io.h, to ensure it is created. + + * unlocked-io.hin: New file + + * regex.c: Update from glibc. + +2001-07-05 Jim Meyering <jim@meyering.net> + + * Makefile.am (noinst_HEADERS): Remove definition, per new automake + recommendation. + (libfetish_a_SOURCES): Put all .h files here instead. + Remove a thus-exposed (better checks in automake) duplicate and + two unnecessary .h files. + +2001-06-11 Jim Meyering <jim@meyering.net> + + * regex.c: Update from GNU libc. + +2001-05-27 Jim Meyering <jim@meyering.net> + + * readutmp.h (UT_TYPE): Define. + +2001-05-24 Jim Meyering <jim@meyering.net> + + * argmatch.c: Include "quote.h". + (argmatch_invalid): Remove explicit `' quotes. Instead, use the + quote function. Reported by Göran Uddeborg. + +2001-05-20 Alexandre Duret-Lutz <duret_g@epita.fr> + + * dirname.c (dir_name): Compute append_dot using path, not newpath + which is not yet declared. + +2001-05-11 Paul Eggert <eggert@twinsun.com> + + * Makefile.am (libfetish_a_SOURCES): + Add strftime.c, since we now compile it on all hosts. + + * strftime.c (my_strftime): + Define to nstrftime if emacs, but only if my_strftime is not defined. + (extra_args, extra_args_spec, extra_args_spec_iso): Rename from + ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively. + Add one more extra argument: a nanoseconds value. + All uses changed. + (ns): New macro. + (my_strftime function): Add %N format. + (emacs_strftimeu): Renamed from emacs_strftime, + with extra ut argument. + +2001-05-11 Paul Eggert <eggert@twinsun.com> + + dirname code cleanup. base_name now behaves more compatibly + with POSIX basename when given file names that have trailing + slashes, and similarly for dir_name. Add new primitives + base_len and dir_len. Put the directory-name-related decls + into dirname.h. + + * addext.c (ISSLASH, base_name): Remove; now in dirname.h. + * backupfile.c (base_name): Likewise. + * basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise. + * dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise. + * makepath.c (strip_trailing_slashes): Likewise. + * path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH): + Likewise. + * rename.c (strip_trailing_slashes): Likewise. + * same.c (base_name): Likewise. + * stripslash.c (ISSLASH): Likewise. + + * addext.c: Include <dirname.h> after size_t is defined. + * backupfile.c: Likewise. + + * addext.c (addext): Use base_len to trim redundant + trailing slashes instead of doing it ourselves. + But do not trim the last slash if it is not redundant. + + * backupfile.c (find_backup_file_name, + max_backup_version): Use base_len instead of rolling it ourselves. + Handle the case of "" and (on DOS) "C:" correctly. + + * basename.c: Do not include <stdio.h>, <assert.h>; no longer needed. + Include <string.h>, <dirname.h>. + (base_name): Allow file names ending in slashes, other than names + that are all slashes. In this case, return the basename followed + by the slashes. This is more general, and can be used in places + where the original base_name purposely had an assertion failure. + (base_len): New function. + + * dirname.c: Include <string.h> instead of <stdlib.h>. + Do not include <assert.h>; no longer needed. + Include xalloc.h. + (memrchr): Remove decl. + (dir_name_r): Remove. + (dir_len): Renamed from dirlen. All callers changed. + Rewrite in terms of base_name, for simplicity and consistency. + (dir_name): Never return NULL. All callers changed. + Do not include <stdlib.h> in test program; no longer needed. + return 0; is fine for test program. + + * dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN): + New macros. + (base_name, base_len, dir_len, strip_trailing_slashes): New decls. + + * path-concat.c (path_concat): Use base_len to compute + base length, not strlen; this means we cannot rely on memcpy + to null-terminate. + + * same.c (STREQ): Remove. + (same_name): Handle the case where the basename ends in trailing '/'. + + * stripslash.c (strip_trailing_slashes): Return nonzero if + a slash was stripped. Do not strip the last slash after a + file system prefix. + +2001-04-08 Jim Meyering <jim@meyering.net> + + * getdate.y (get_date): Set tm_isdst to -1 to ensure that it is + recomputed; that's necessary when the offset spans a DST transition. + Patch by David J. MacKenzie. Reported by Hon-Yin Kok. + +2001-04-02 Jim Meyering <jim@meyering.net> + + * regex.h, regex.c: Update from GNU libc. + +2001-03-19 Paul Eggert <eggert@twinsun.com> + + * version-etc.c (version_etc_copyright): Update to 2001. + +2001-03-16 Paul Eggert <eggert@twinsun.com> + + * tempname.c (uint64_t): Define to uintmax_t if + not defined, and if UINT64_MAX is not defined. + Required at least for Vax Ultrix4.3, which doesn't define uint64_t. + Reported by John David Anglin. + +2001-03-10 Bruno Haible <haible@clisp.cons.org> + + * localcharset.c (locale_charset): Allow wildcard syntax. Also resolve + alias if codeset is empty. + * config.charset (BeOS): Use wildcard syntax. + +2001-03-13 Jim Meyering <jim@meyering.net> + + * path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: + Don't insert a backslash when concatenating e.g., `C:' and `foo'. + From Bruno Haible. + +2001-03-06 Bruno Haible <haible@clisp.cons.org> + + * localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL). + Don't return NULL. + * unicodeio.c (print_unicode_char): Simplify accordingly. + +2001-03-06 Bruno Haible <haible@clisp.cons.org> + + * config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add + support for DOS/DJGPP. + +2001-02-28 Paul Eggert <eggert@twinsun.com> + + * Makefile.am (libfetish_a_SOURCES): + Add dup-safer.c, fopen-safer.c. + (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h. + + * dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files. + +2001-02-25 Paul Eggert <eggert@twinsun.com> + + The mkstemp replacement is taken from glibc 2.2.2, with some + portability fixes for use outside glibc, as follows: + + * tempname.c (struct_stat64): New macro. + (direxists, __gen_tempname): Use it. + This avoids a portability problem with Solaris 8. + + * tempname.c (<config.h>): Include if HAVE_CONFIG_H. + (<stddef.h>, <stdint.h>, <string.h>): + Include only if STDC_HEADERS || _LIBC. + (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC. + (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC. + (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC. + (__set_errno): Define this macro if <errno.h> doesn't. + (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE): + Define these macros if <stdio.h> doesn't. + (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR): + Define these macros if <sys/stat.h> + doesn't. Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN. + (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64, + __xstat64): Define if not _LIBC. + (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC). + (__gen_tempname): Invoke gettimeofday only if + HAVE_GETTIMEOFDAY || _LIBC; + otherwise, fall back on plain "time". + Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600. + + * mkstemp.c (__GT_FILE): Define to zero if not defined. + + * mkstemp.c, tempname.c: New files, taken from glibc 2.2.2. + +2001-02-17 Jim Meyering <jim@meyering.net> + + * strtoul.c: Sync from GNU libc. Use double quotes, not <...> + around included file name. + + * strnlen.c (__strnlen): Merge in a change from GNU libc. + + * strftime.c: Update from GNU libc (the only changes were to comments). + +2001-02-13 Bruno Haible <haible@clisp.cons.org> + + * mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash. + +2001-02-17 Paul Eggert <eggert@twinsun.com> + + * mbswidth.c, quotearg.c (mbrtowc, mbsinit): + Remove workaround macros for hosts that have mbrtowc but not + mbstate_t, as we now insist on proper declarations for both + before using mbrtowc. + +2001-02-17 Jim Meyering <jim@meyering.net> + + * regex.c: Update from libc. + +2001-02-16 Paul Eggert <eggert@twinsun.com> + + * alloca.c (malloc): Undef before defining, since stdlib.h + may have defined it. Needed for Encore Umax-3.0.9.16b systems. + Reported by Mark Hounschell via Paul Eggert. + +2001-01-30 Bruno Haible <haible@clisp.cons.org> + + * config.charset: Update for FreeBSD 4.2. + +2001-01-26 Jim Meyering <jim@meyering.net> + + * quotearg.c: Include stddef.h. + * quote.c: Include stddef.h. + Reported by Axel Kittenberger. + + * xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking + line in double quotes so that it evokes a better diagnostic. + [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise. + Reported by Axel Kittenberger. + +2001-01-15 Bruno Haible <haible@clisp.cons.org> + + * unicodeio.c (print_unicode_char): Cast the second iconv() arg, + to avoid a warning. Add back 'const' to inptr. + +2001-01-16 Jim Meyering <jim@meyering.net> + + * basename.c: Include <stdio.h>, needed by assert on SunOS 4. + From Bruno Haible. + +2001-01-14 Jim Meyering <jim@meyering.net> + + * rename.c: New file. From Volker Borchert. + Include stdlib.h, string.h or strings.h, and xalloc.h. + Use strip_trailing_slashes rather than open-coding it. + +2001-01-03 Paul Eggert <eggert@twinsun.com> + + * strftime.c: Sync with glibc time/strftime.c 1.81. + +2001-01-03 Jim Meyering <jim@meyering.net> + + * unicodeio.c (print_unicode_char): Remove `const' from declaration of + local `inptr' to avoid warning with some system declarations of iconv. + +2000-12-29 Paul Eggert <eggert@twinsun.com> + + * modechange.c: Do not assume that mode_t uses the + traditional octal encoding. E.g. "chmod 1 FOO" should set + the other-execute bit of FOO even if S_IXOTH != 1. + + (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH, + WOTH, XOTH, ALLM): New macros. + (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR, + S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH): + Use them. + (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID. + (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above. + (mode_compile): + No need to use uintmax_t; unsigned long is long enough. + Don't bother to get suffix since we don't use it. + +2000-12-24 Jim Meyering <jim@meyering.net> + + * hash.c (is_prime): Return explicit boolean values. + (hash_get_first): Return NULL to appease Irix5.6's 89. + Reported by Nelson Beebe. + +2000-10-31 Bruno Haible <haible@clisp.cons.org> + + * localcharset.c (locale_charset): Add support for Win32. + +2000-12-18 Paul Eggert <eggert@twinsun.com> + + * physmem.h, physmem.c: New files. + + * Makefile.am (libfetish_a_SOURCES): Add physmem.c. + (noinst_HEADERS): Add physmem.h. + + * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and + 't' for compatibility with Solaris 8 sort. + +2000-12-18 Bruno Haible <haible@clisp.cons.org> + + * config.charset: Add support for BeOS. + +2000-12-16 Jim Meyering <jim@meyering.net> + + * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define + SHELLS_FILE to a file name that's useful on djgpp systems. + Include stdlib.h. + (ADDITIONAL_DEFAULT_SHELLS): Define. + (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS. + Based mostly on a patch from Prashant TR. + +2000-12-16 Jim Meyering <jim@meyering.net> + + This bug had a serious impact on chown: `chown N:M FILE' (for integer + N and M) would have treated it like `chown N:N FILE'. + + * userspec.c (parse_user_spec): Fix typo: s/u/g/. + +2000-10-31 Bruno Haible <haible@clisp.cons.org> + + * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII, + CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257 + to the list of canonical encodings. Rename EUC-CN to GB2312. + +2000-12-08 Andreas Schwab <schwab@suse.de> + + * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an + invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set. + +2000-12-07 Jim Meyering <jim@meyering.net> + + * stripslash.c (ISSLASH): Define. + (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'. + From Prashant TR. + + * dirname.c (FILESYSTEM_PREFIX_LEN): Define. + (dir_name_r): Declare this function as static. + [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd + manifest itself on a name containing a mix of slashes and + backslashes. + Make this function work with names starting with a DOS-style + drive letter and colon prefix. + (dir_name): Append `.' if necessary. + Based mostly on patches from Prashant TR and Eli Zaretskii. + + * dirname.h (dir_name_r): Remove prototype. + +2000-12-05 Jim Meyering <jim@meyering.net> + + * dirname.c (dir_name_r): Add `const' in a few local declarations. + +2000-12-04 Jim Meyering <jim@meyering.net> + + * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc. + Also include memory.h, stdlib.h, unistd.h if appropriate. + Reported by Andreas Jaeger (conflicting declaration of malloc). + +2000-12-02 Jim Meyering <jim@meyering.net> + + * closeout.h: Make idempotent, to avoid some obscure warnings. + +2000-12-01 Paul Eggert <eggert@twinsun.com> + + * memrchr.c: Include <config.h> before any system include file. + +2000-11-29 Paul Eggert <eggert@twinsun.com> + + * dirname.c (dir_name_r): Fix typo: int -> size_t. + +2000-11-26 Jim Meyering <jim@meyering.net> + + * memcoll.c: Include sys/types.h. From Werner Almesberger. + +2000-11-22 Paul Eggert <eggert@twinsun.com> + + * strftime.c (my_strftime): Do not invoke mbrlen with a + size of (size_t) -1; it's not portable. + +2000-11-17 Akim Demaille <akim@epita.fr> + + * obstack.h: Formatting changes. + (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would + prevent type checking. + (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't + cast the value to (void *): assigning a `foo *' to a `void *' + variable is valid. + (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int. + +2000-11-17 Jim Meyering <jim@meyering.net> + + * strstr.c: Update from GNU libc. + +2000-11-16 Jim Meyering <jim@meyering.net> + + * strverscmp.c: Incorporate weak-alias-related changes from glibc. + +2000-11-11 Jim Meyering <jim@meyering.net> + + * error.c: Add a couple #includes, merging from GNU libc version. + +2000-11-10 Jim Meyering <jim@meyering.net> + + * obstack.h: Update from GNU libc. + * obstack.c: Likewise. + +2000-11-06 Paul Eggert <eggert@twinsun.com> + + * getusershell.c (setusershell): Use rewind rather than + fseek/fseeko, to avoid configuration hassles with fseeko. + Don't bother opening SHELLS_FILE if shellstream is NULL; + it's not necessary. + +2000-11-05 Jim Meyering <jim@meyering.net> + + * makepath.h (make_dir): Declare. + * makepath.c (make_dir): Remove `static' attribute. + Tweak a comment. + +2000-11-04 Alexandre Duret-Lutz <duret_g@epita.fr> + + * hash.c (hash_get_next): Fix a thinko: when ENTRY is the + last one in a bucket, advance to the next bucket. + +2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg> + + * fnmatch.c: Do not comment out all the code if we are using + the GNU C library, because in some cases we are replacing buggy + code in the GNU C library itself. + +2000-10-30 Paul Eggert <eggert@twinsun.com> + + * error.h, getline.h, modechange.h: + Remove "2000" from Copyright line, as the file hasn't been + changed this year other than in the copyright notice. + + * xalloc.h: Add "2000" to Copyright line, as this file + was changed this year. + +2000-10-30 Paul Eggert <eggert@twinsun.com> + + * fnmatch.c (FOLD): Do not assume that characters are unsigned. + (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs, + e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero. + +2000-10-29 Greg Louis <glouis@dynamicro.on.ca> + + * regex.h (__restrict_arr): Move definition out of #ifndef block. + Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but + doesn't define __restrict_arr. + +2000-10-29 Jim Meyering <jim@meyering.net> + + * xstat.in: Fix grammar in comment. + +2000-10-28 Jim Meyering <jim@meyering.net> + + * memchr.c: Update from libc. + Adjust for portability: + [HAVE_STDLIB_H]: Include stdlib.h. + [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h. + Undef __memchr, too. + [!weak_alias]: Define __memchr to memchr. + + * regex.c: Update from libc. + * regex.h: Likewise. + * getopt1.c: Likewise. + * memcmp.c: Likewise. + + * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko. + Avoid using fseek, when possible -- it's broken by design. + Patch by Ulrich Drepper. + +2000-10-26 Jim Meyering <jim@meyering.net> + + * strftime.c: Update from libc. + +2000-10-25 Jim Meyering <jim@meyering.net> + + * obstack.c: Update from libc. + +2000-10-23 Jim Meyering <jim@meyering.net> + + * hard-locale.c (hard_locale): Revert last change -- it was simply + wrong. That set_locale call must not have any side effects. + From Paul Eggert. + +2000-10-22 Jim Meyering <jim@meyering.net> + + * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC. + [CYCLIC]: Remove now-unused definition. + + * save-cwd.c (O_DIRECTORY): Define, if needed. + (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".". + Suggestion from Ulrich Drepper. + +2000-10-21 Jim Meyering <jim@meyering.net> + + * dirname.c (dir_name_r): New function, factored out of dir_name. + (dir_name): Use dir_name_r. + * dirname.h (dir_name_r): Declare it. + +2000-10-21 Jim Meyering <jim@meyering.net> + + * dirname.c (memrchr): Declare if necessary. + (dir_name): Remove the restriction that there be no + trailing slashes. Now, this code skips past them, effectively + ignoring them. + [TEST_DIRNAME] (main): New unit tests. + + * memrchr.c: New file from GNU libc. + Undef __memrchr, too. + [!weak_alias]: Define __memrchr to memrchr. + Guard weak_alias use with `#ifdef weak_alias'. + +2000-10-17 Jim Meyering <jim@meyering.net> + + * quote.h (PARAMS): Define and use. + Reported by Akim Demaille. + + * getopt.c: Update from libc. + +2000-10-16 Jim Meyering <jim@meyering.net> + + * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale. + From Jan Fedak. + +2000-09-25 Jim Meyering <jim@meyering.net> + + * md5.h (rol): Define (from GnuPG). + + * sha.c: Give credit (GnuPG) where due. + (M): Use rol rather than open-coding it. + Add a FIXME comment. + +2000-09-21 Jim Meyering <jim@meyering.net> + + * userspec.c (parse_user_spec): Remove debugging printf I'd added. + Reported by Michael Stone. + +2000-09-20 Jim Meyering <jim@meyering.net> + + * Makefile.am (libfetish_a_SOURCES): Add sha.c. + (noinst_HEADERS): Add sha.h. + Based on code from Scott G. Miller and from GnuPG. + +2000-09-15 Jim Meyering <jim@meyering.net> + + * regex.c: Update from libc. + +2000-09-10 Jim Meyering <jim@meyering.net> + + * getopt.c (_getopt_internal): Update from glibc. + +2000-09-09 Jim Meyering <jim@meyering.net> + + * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't + think it should be used as a general replacement for isascii. + * fnmatch.c: Likewise. + * mbswidth.c: Likewise + * regex.c: Likewise. + + Don't use atoi. + * userspec.c: Include sys/param.h and limits.h. + Include xstrtol.h. + (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define. + (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define. + (parse_user_spec): Use xstrtoul, not atoi when converting numeric + UID, GID. Check range. + +2000-09-06 Jim Meyering <jim@meyering.net> + + * getopt.c (_getopt_internal): Update from glibc. + +2000-08-30 Jim Meyering <jim@meyering.net> + + * strftime.c: Merge in changes from GNU libc. + +2000-08-26 Jim Meyering <jim@meyering.net> + + * closeout.c: Include "__fpending.h". + (close_stdout_status): Return right away if there's nothing to flush. + + * Makefile.am (noinst_HEADERS): Add __fpending.h. + * __fpending.c: New file. + * __fpending.h: New file. + +2000-08-07 Paul Eggert <eggert@twinsun.com> + + Standardize on "memory exhausted" instead of "Memory exhausted" + or "virtual memory exhausted". + * obstack.c (print_and_abort): Use "memory exhausted", not + "virtual memory exhausted". + * same.c (same_name): Invoke xalloc_die instead of printing + our own message. + * userspec.c (parse_user_spec): Likewise. + * bumpalloc.h: comment fix + * same.c, userspec.c: Include xalloc.h. + + * xalloc.h (xalloc_msg_memory_exhausted): Now char const[], + not char *const and pointing to a constant array. + * xmalloc.c (xalloc_msg_memory_exhausted): Likewise. + (xrealloc): Comment fix. + + * userspec.c (parse_user_spec): + Don't translate a message until just before returning, + to avoid unnecessary translation. + +2000-08-07 Jim Meyering <jim@meyering.net> + + * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h, + chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c, + fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h, + getgroups.c, gethostname.c, getopt.h, group-member.c, + hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c, + linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c, + memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h, + pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c, + stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c, + strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c, + utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c, + yesno.c: Back out Copyright date changes for each file with no change + this year. This eases coordination with other programs using the same + source code modules. From Paul Eggert. + +2000-08-03 Greg McGary <greg@mcgary.org> + + * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER, + ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros. + (EXTEND_BUFFER): Use them. + +2000-08-01 Jim Meyering <jim@meyering.net> + + * dirname.c (ISSLASH): Define. + (BACKSLASH_IS_PATH_SEPARATOR): Define. + (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which + both `\' and `/' may be use as path separators. + Based on a patch from Prashant TR. + +2000-07-31 Paul Eggert <eggert@twinsun.com> + + * quotearg.c (quotearg_n_options): Don't make the initial + slot vector a constant, since it might get modified. + +2000-07-31 Jim Meyering <jim@meyering.net> + + * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'. + * obstack.c (print_and_abort): Likewise. + +2000-07-30 Paul Eggert <eggert@twinsun.com> + + * quotearg.c (quotearg_n_options): Preallocate a slot 0 + buffer, so that the caller can always quote one small + component of a "memory exhausted" message in slot 0. + From a suggestion by Jim Meyering. + +2000-07-30 Jim Meyering <jim@meyering.net> + + * makepath.c (make_path): Quote the other instance, too. + + * quotearg.c (N_STATIC_SLOTVECS): Define. + (STATIC_BUF_SIZE): Define. + (quotearg_n_options): Use only statically allocated storage when + N < N_STATIC_SLOTVECS and the length of the quoted result is smaller + than STATIC_BUF_SIZE. + +2000-07-29 Jim Meyering <jim@meyering.net> + + * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS. + * dirname.c (dir_name): Likewise. + + * basename.c (base_name): Use ISSLASH rather than comparing against `/'. + + * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const. + (dir_name): Assert that there are no trailing slashes. + +2000-07-18 Bruno Haible <haible@clisp.cons.org> + + * mbswidth.h (mbswidth): Add a flags argument. + (mbswidth): New declaration. + (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros. + * mbswidth.c (mbswidth): Add a flags argument. + (mbsnwidth): New function. + +2000-07-24 Jim Meyering <jim@meyering.net> + + * mbswidth.c: Remove useless #else. From Bruno Haible. + +2000-07-23 Paul Eggert <eggert@twinsun.com> + + * mbswidth.c (_XOPEN_SOURCE): + Don't define; this causes problems on Solaris 7. + (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare. + +2000-07-23 Paul Eggert <eggert@twinsun.com> + + * quotearg.c: + Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), + so that mbstate_t is always defined. + + Do not inspect MB_LEN_MAX, since it's incorrectly defined to + be 1 in at least one GCC installation, and this configuration + error is likely to be common. Ignoring MB_LEN_MAX hurts + performance on hosts that have mbrtowc but have only unibyte + locales, but I assume these hosts are rare. + +2000-07-23 Paul Eggert <eggert@twinsun.com> + + * quotearg.c: Streamline by invoking multibyte code only if needed. + <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX. + (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX). + (quotearg_buffer_restyled): If a unibyte locale, don't bother to + invoke multibyte primitives. + +2000-07-23 Jim Meyering <jim@meyering.net> + + * basename.c (base_name): Add an assertion. + +2000-07-15 Bruno Haible <clisp.cons.org> + + * quotearg.c: When the system forces us to redefine mbstate_t, + shadow its mbsinit function. + +2000-07-16 Bruno Haible <haible@clisp.cons.org> + + * mbswidth.h: New file. + * mbswidth.c: New file. + * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c. + (noinst_HEADERS): Add mbswidth.h. + +2000-07-17 Bruno Haible <haible@clisp.cons.org> + + * config.charset: Add support for FreeBSD. Improve support for HP-UX + and IRIX 6. + +2000-07-15 Jim Meyering <jim@meyering.net> + + * makepath.c: Include quote.h. + (make_path): Convert "`%s'" in format strings to "%s", and wrap each + corresponding argument in a `quote (...)' call. + Give better diagnostics. + + * Makefile.am (libfetish_a_SOURCES): Add quote.c. + (noinst_HEADERS): Add quote.h. + + * quote.c (quote, quote_n): New file. Two functions taken verbatim + from tar's src/misc.c. + * quote.h: New file. Prototypes for same. + +2000-07-10 Paul Eggert <eggert@twinsun.com> + + From a suggestion by Bruno Haible. + * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition. + Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT, + to decide whether to define the BeOS workaround macro; + this adjusts to the change to AC_MBSTATE_T. + +2000-07-13 Paul Eggert <eggert@twinsun.com> + + * quotearg.h (enum quoting style): New enum clocale_quoting_style. + + * quotearg.c (quoting_style_args, quoting_style_vals, + quotearg_buffer_restyled): Add support for + clocale_quoting_style. Undo previous change to + locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}" + and "{RIGHT QUOTATION MARK}" msgids. + +2000-07-05 Paul Eggert <eggert@twinsun.com> + + The old behavior of quoting `like this' doesn't look good with + newer, ISO-style fonts. See: + http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html + + Instead, quote "like this" by default. Let the translator + tailor the locale-specific quoting behavior by providing + translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}. + + * quotearg.c (N_): New macro. + (gettext_default): New function. + (quotearg_buffer_restyled): Use + gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and + gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote. + +2000-07-09 Jim Meyering <jim@meyering.net> + + * Most files: Update copyright dates to include 2000. + +2000-07-08 Jim Meyering <jim@meyering.net> + + * xgethostname.c (ENAMETOOLONG): Define to an unlikely value + if not defined. + (xgethostname): Remove now-unnecessary #ifdef. + Move declaration of `err' into loop where it's used. + +2000-07-05 Bruno Haible <haible@clisp.cons.org> + + * xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug + by allocating a larger buffer. Test the gethostname return value for + being >= 0, not == 0, for BeOS. Don't exhaust memory if gethostname + returns an error and ENAMETOOLONG isn't defined. + +2000-07-05 Paul Eggert <eggert@twinsun.com> + and Bruno Haible <haible@clisp.cons.org> + + * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't. + +2000-07-05 Bruno Haible <haible@clisp.cons.org> + + * quotearg.c (struct quoting_options): Simplify quote_these_too + dimension. + +2000-07-03 Jim Meyering <jim@meyering.net> + + * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen. + Reported by Bruno Haible. + +2000-07-04 Jim Meyering <jim@meyering.net> + + * quotearg.c: Make inclusion of <wchar.h> independent of whether + HAVE_MBRTOWC is set. Required at least for irix-5.6, which + lacks mbrtowc. + +2000-07-03 Paul Eggert <eggert@twinsun.com> + and Bruno Haible <haible@clisp.cons.org> + + * quotearg.c (mbrtowc): + Assign to *pwc, and return 1 only if result is nonzero. + (iswprint): Use ISPRINT when substituting our own mbrtowc. + +2000-07-03 Jim Meyering <jim@meyering.net> + + * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H. + This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20. + From Bob Proulx. + +2000-07-02 Jim Meyering <jim@meyering.net> + + * quotearg.c (mbstate_t): Don't define here. + +2000-07-02 Jim Meyering <jim@meyering.net> + + * nanosleep.c (SIGCONT): Define if not already defined. + +2000-06-17 Bruno Haible <haible@clisp.cons.org> + + * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV, + per change in ../m4/ls-mntd-fs.m4. + (read_filesystem_list): Ignore symbolic links. + +2000-06-29 Jim Meyering <jim@meyering.net> + + * same.c: Include <string.h> or <strings.h>, as appropriate, + for declaration of strcmp. + + * long-options.c: Include <stdlib.h>, for declaration of exit. + + * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]: + Avoid warning by casting result to `char *' to remove `const'. + +2000-06-17 Bruno Haible <haible@clisp.cons.org> + + * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c. + +2000-06-26 Paul Eggert <eggert@twinsun.com> + + savedir now sets errno on failure and invokes xmalloc to get memory. + Fix a couple of other minor bugs while we're at it. + + * savedir.c (<unistd.h>): Do not include; there's no need. + (NAMLEN): Remove macro. + (malloc, realloc): Remove decls. + (stpcpy): Likewise. + ("xalloc.h"): Include. + (NAME_SIZE_DEFAULT): New macro. + (savedir): Use xmalloc / xrealloc to allocate memory. + Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero. + Skip "" directory entries. + Use strlen to calculate directory entry length, since the old method + is rarely used these days and isn't worth supporting. + Don't use a pointer after freeing it. + Check for integer overflow when calculating allocation size. + Use memcpy to copy entries, instead of stpcpy. + Set errno properly when returning NULL. + Check for readdir error. + +2000-06-26 Jim Meyering <jim@meyering.net> + + * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort. + +2000-06-17 Bruno Haible <haible@clisp.cons.org> + + * getusershell.c (xmalloc, xrealloc): Remove functions. + Include xalloc.h. + Don't include <stdlib.h>. Don't declare malloc, realloc. + +2000-06-23 Bruno Haible <haible@clisp.cons.org> + + * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency. + +2000-06-24 Jim Meyering <jim@meyering.net> + + * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r. + +2000-06-21 Jim Meyering <jim@meyering.net> + + * getpass.c: New file, from Bruno Haible. Required for BeOS. + +2000-06-19 Paul Eggert <eggert@twinsun.com> + + * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5. + (mbrtowc, mbstate_t): Define substitutes if + HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT. + (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT, + not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H). + +2000-06-17 Bruno Haible <haible@clisp.cons.org> + + * xgetcwd.c (xgetcwd): If the required pathname length is smaller + than 1024, return a memory chunk of least possible size, instead + of size PATH_MAX + 2. In the loop, increment the size proportionally. + Use free/xmalloc instead of xrealloc to avoid copying for very long + paths. + +2000-06-17 Bruno Haible <haible@clisp.cons.org> + + * canon-host.c (canon_host): Use malloc and memcpy to copy an + address, not strdup. Include <stdlib.h> and don't declare free(). + +2000-06-17 Bruno Haible <haible@clisp.cons.org> + + * path-concat.c (path_concat): Don't access dir[-1] if dir is + the empty string. + +2000-06-21 Jim Meyering <jim@meyering.net> + + * Makefile.am (libfetish_a_SOURCES): Add getstr.c. + (noinst_HEADERS): Add getstr.h. + + * getline.c (getstr): Move into a separate file. + * getstr.c (getstr): New file, extracted from getline.c, with + the following changes: new parameter, delim2; both delim[12] + parameters have type `int', not `char'. The latter would lose + with 8-bit delimiters. + * getstr.h: New file. + +2000-06-19 Jim Meyering <jim@meyering.net> + + * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define. + +2000-06-18 Jim Meyering <jim@meyering.net> + + * mkdir.c: Remove file, due mainly to copyright incompatibility. + Besides, these days every porting target provides a mkdir function. + + * strnlen.c: Include memory.h, string.h, and/or strings.h as needed. + (this snippet comes from src/system.h). + +2000-06-15 Paul Eggert <eggert@twinsun.com> + + * human.c (adjust_value): New function. + (human_readable_inexact): Apply rounding style even when + printing approximate values. + +2000-06-14 Paul Eggert <eggert@twinsun.com> + + * human.c (human_readable_inexact): Allow an input block + size that is not a multiple of the output block size, and vice versa. + Reported by Piergiorgio Sartor. + +2000-06-14 Paul Eggert <eggert@twinsun.com> + + * getdate.y (get_date): Apply relative times after time + zone indicator, not before. Reported by Todd A. Jacobs. + +2000-06-13 Jim Meyering <jim@meyering.net> + + * Makefile.am (all-local): Depend on lstat.c and stat.c. + + * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c. + +2000-06-12 Paul Eggert <eggert@twinsun.com> + + * xstat.in: Include <stdlib.h> in lstat, to declare "free". + +2000-06-04 Paul Eggert <eggert@twinsun.com> + + * strnlen.c: Include <config.h> if HAVE_CONFIG_H. + +2000-06-04 Jim Meyering <jim@meyering.net> + + * getugroups.c (getugroups): Cast -1 to gid_t, for systems like + SunOS 4.1.4 for which gid_t is an unsigned type. + +2000-06-03 Jim Meyering <jim@meyering.net> + + * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr. + +2000-05-26 Bruno Haible <haible@clisp.cons.org> + + * Makefile.am (install-exec-local): On systems with glibc-2.1 or + newer, don't install charset.alias. + * config.charset: Change the Linux/glibc rules so they become empty + on glibc-2.1 or newer. + +2000-06-02 Jim Meyering <jim@meyering.net> + + * mountlist.c: Back out last change. Instead, do this... + * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy + member using the same `ignore'-testing code. + * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored + fs_type strings. + From Mark D. Roth. + +2000-05-29 Jim Meyering <jim@meyering.net> + + * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts + with the `ignore' attribute. Based on a patch from Mark D. Roth. + +2000-05-22 Jim Meyering <jim@meyering.net> + + * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block. + +2000-05-18 Jim Meyering <jim@meyering.net> + + * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list + back, too, since it may have been modified by allocate_entry. + (hash_delete): Rewrite to use neither the assignment operator + nor the comma operator in an if-expression. + +2000-05-15 Paul Eggert <eggert@twinsun.com> + + * closeout.c: + <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO): + Remove; no longer needed. + "quotearg.h": Add include. + (file_name): Do not bother to explicitly initialize to NULL; it's less + efficient on some hosts. + (close_stdout_status): Remove test as to whether stdout was already + closed; it breaks for the case "echo x | sort >&-". + Quote file name colons. + Do not assume that _("write error") lacks format strings. + +2000-05-15 Jim Meyering <jim@meyering.net> + + * version-etc.c (version_etc_copyright): Update the copyright string + used in all --version output. + +2000-05-14 Jim Meyering <jim@meyering.net> + + * closeout.c (close_stdout_set_file_name): New function. + (close_stdout_status): Use new file-scoped global. + Return right away if fstat says the stdout file descriptor is invalid. + * closeout.h (close_stdout_set_file_name): Declare. + +2000-05-10 Jim Meyering <jim@meyering.net> + + * closeout.c [default_exit_status]: New file-scoped variable. + (close_stdout_set_status): New function. + * closeout.h (close_stdout_set_status): Declare. + +2000-05-08 Jim Meyering <jim@meyering.net> + + * long-options.c: Don't include closeout.h. + (parse_long_options): Don't call close_stdout for --version. + +2000-05-06 Jim Meyering <jim@meyering.net> + + * strnlen.c: Undefine __strnlen and strnlen. + [!weak_alias]: Define __strnlen to strnlen. + + * atexit.c: New file, from libiberty. + +2000-05-06 Jim Meyering <jim@meyering.net> + + * closeout.c (close_stdout_status): Also check for errors on the + stderr stream. + +2000-05-05 Bruno Haible <haible@clisp.cons.org> + + * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy + instead of xmalloc, xrealloc, path_concat. + (locale_charset): Treat empty environment variables as absent. + (DIRECTORY_SEPARATOR, ISSLASH): New macros. + +2000-05-04 Jim Meyering <jim@meyering.net> + + * getopt.c: Update from glibc. + * obstack.c: Likewise. + * obstack.h: Likewise. + * regex.c: Likewise. NB: K&R compiler support is dropped for this file + + * regex.h: Likewise. + * strndup.c: Likewise. + * strnlen.c: New file, from glibc. + +2000-05-01 Jim Meyering <jim@meyering.net> + + * full-write.c (full_write): Remove `FIXME' part of comment. + +2000-04-29 Jim Meyering <jim@meyering.net> + + * path-concat.c: Declare strdup only if it's not defined. + * canon-host.c: Likewise. + +2000-04-28 Jim Meyering <jim@meyering.net> + + * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid + redefinition warning on some systems (HPUX). Otherwise, regex.h is + included first, then limits.h is included by locale.h by libintl.h. + From John David Anglin. + +2000-04-25 Jim Meyering <jim@meyering.net> + + * makepath.c (S_IRWXUGO): Define. + (make_path): Always perform explicit chmod if MODE specifies any + of the `special' permission bits. Prompted by a bug report against + install from Mate Wierdl and Joost van Baal. + +2000-04-18 Jim Meyering <jim@meyering.net> + + * README: New file. + + * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define + getpagesize. For BeOS. Based on a patch from Bruno Haible. + +2000-04-17 Jim Meyering <jim@meyering.net> + + * strftime.c (my_strftime) [strftime]: Declare strftime here, since + the definition of it to rpl_strftime also defined-away the system's + declaration. + +2000-04-15 Jim Meyering <jim@meyering.net> + + Use `C' to denote so-called `contiguous' files, the same way + that tar does. + * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define. + (ftypelet): Use S_ISCTG. + From Michael Deutschmann. + +2000-04-14 Jim Meyering <jim@meyering.net> + + * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime. + +2000-04-08 Jim Meyering <jim@meyering.net> + + * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3 + names don't conflict. Reported by Eli Zaretskii. + +2000-03-28 Bruno Haible <haible@clisp.cons.org> + + * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv + bug. Deal with the different error behavior of Irix iconv. + +2000-04-07 Jim Meyering <jim@meyering.net> + + * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h, + to work around system header problems on AIX 3.2.5. From Bruno Haible. + +2000-04-05 Jim Meyering <jim@meyering.net> + + Portability tweaks required for ultrix4.3. + * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent. + * readutmp.c: Include sys/types.h before sys/stat.h. + * canon-host.c: Declare strdup. + * path-concat.c: Likewise. + From John David Anglin. + +2000-04-04 Jim Meyering <jim@meyering.net> + + Be more DOS 8.3-friendly. + * ref-add.sin: Renamed from ref-add.sed.in. + * ref-del.sin: Renamed from ref-del.sed.in. + * Makefile.am: Reflect renaming. + Reported by Eli Zaretskii. + + Use a temporary file name that won't clash with `charset.alias' + in the DOS 8.3 name space. + * Makefile.am (charset_tmp): Define. + (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t. + (uninstall-local): Likewise. + Reported by Eli Zaretskii. + +2000-03-29 Paul Eggert <eggert@twinsun.com> + + * time/strftime.c (my_strftime): Make sure we call the system + strftime, not ourselves, when invoking the underlying strftime. + +2000-03-24 Jim Meyering <jim@meyering.net> + + * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in. + (charset_alias): Define. + (install-exec-local): Factor out common code. + (uninstall-local): Split lines longer than 80. + (ref-add.sed, ref-del.sed): Remove rules... (do the following instead) + (SUFFIXES): Define. + (.sed.in.sed): New rule. Don't redirect directly to $@. + (CLEANFILES): Add ref-add.sed and ref-del.sed. + +2000-03-19 Bruno Haible <haible@clisp.cons.org> + + * config.charset: Output a line containing "Packages using this file". + * ref-add.sed.in, ref-del.sed.in: New files. + * Makefile.am (install-exec-local, uninstall-local, ref-add.sed, + ref-del.sed): New rules. + +2000-03-17 Jim Meyering <jim@meyering.net> + + * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H. + Otherwise, include <strings.h> + +2000-03-17 Bruno Haible <haible@clisp.cons.org> + + * unicodeio.c (utf8_wctomb): New function. + (print_unicode_char): Pass the Unicode character to iconv in UTF-8 + format instead of in UCS-4 with platform dependent endianness. + +2000-03-07 Paul Eggert <eggert@twinsun.com> + + * savedir.c (savedir): Work even if directory size is + negative; this can happen with some screwy NFS configurations. + +2000-03-06 Jim Meyering <jim@meyering.net> + + * localcharset.c (get_charset_aliases): Don't try to free file_name + if it's NULL (because we ran out of memory). From Bruno Haible. + +2000-03-05 Jim Meyering <jim@meyering.net> + + * localcharset.c ("path-concat.h"): Include. + (get_charset_aliases): Use path_concat instead of ANSI string + concatenation. + + * unicodeio.h (PARAMS): Define. + Use it to guard prototype. + +2000-03-04 Jim Meyering <jim@meyering.net> + + * Makefile.am (install-exec-local): Create $(libdir) before installing + into it. + (uninstall-local): Uncomment this rule so `make distcheck' works + once again. + + * unicodeio.c (<errno.h>): Include it. + (errno): Declare if not defined. + + * localcharset.c: Add Bruno's comment justifying use of volatile. + + * config.charset: New version, incorporating remarks from a linux + i18n mailing list. From Bruno Haible. + +2000-03-02 Jim Meyering <jim@meyering.net> + + * Makefile.am (EXTRA_DIST): Add config.charset. + +2000-03-01 Jim Meyering <jim@meyering.net> + + * localcharset.c: Guard some #includes with `#if HAVE_...'. + * unicodeio.c: Likewise. + +2000-02-02 Bruno Haible <haible@clisp.cons.org> + + * config.charset: New file. + * localcharset.c: New file. + * unicodeio.h, unicodeio.c: New files. + * Makefile.am (DEFS): Add -DLIBDIR=... + (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c. + (noinst_HEADERS): Add unicodeio.h. + (all-local, install-exec-local, charset.alias): New targets. + +2000-02-28 Paul Eggert <eggert@twinsun.com> + + * quotearg.c (ALERT_CHAR): New macro. + (quotearg_buffer_restyled): Use it. + +2000-02-27 Jim Meyering <jim@meyering.net> + + * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/. + Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'. + + * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H', + not `#if STDC_HEADERS'. + Declare malloc if needed. + + * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..' + now that autoconf always defines the HAVE_DECL_ symbols. + * human.c: Likewise. + * same.c: Likewise. + * strtoumax.c: Likewise. + + * backupfile.c: Arrange for cpp to fail if the configure-time + declaration check was not run. + * hash.c: Likewise. + * human.c: Likewise. + * same.c: Likewise. + * strtoumax.c: Likewise. + + * userspec.c (parse_user_spec): If there is no `:' but there is a `.', + then first look up the entire `.'-containing string as a login name. + +2000-02-18 Paul Eggert <eggert@twinsun.com> + + * getdate.y: Handle two-digit years with leading zeros correctly. + (textint): New typedef. + (parser_control): Member year changed from int to textint. + All uses changed. + (YYSTYPE): Removed; replaced by %union with int and textint members. + (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN, + tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER, + tYEAR_UNIT, tZONE, o_merid): Now of type <intval>. + (tSNUMBER, tUNUMBER): Now of type <textintval>. + (date, number, to_year): Use width of number in digits, not its value, + to determine whether it's a 2-digit year, or a 2-digit time. + (yylex): Store number of digits of numeric tokens. + Reported by John Kendall. + + (parser_control): Changed from struct parser_control to typedef (for + consistency). All uses changed. + + (tID): Removed; not used. + (yylex): Return '?' for unknown identifiers, rather than (unused) tID. + +2000-02-14 Paul Eggert <eggert@twinsun.com> + + * getpagesize.h (getpagesize): Port to VMS for Alpha; + adapted from changes to grep getpagesize.h by Martin P.J. Zinser. + +2000-02-12 Jim Meyering <jim@meyering.net> + + * userspec.c (ISDIGIT): Define it. + (isdigit): Remove definition. + (is_number): Use ISDIGIT, not isdigit. + <libintl.h>: Include. + (_ and N_): Define. + (parse_user_spec): Mark translatable strings. + +2000-02-10 Jim Meyering <jim@meyering.net> + + With these changes, nanosleep.[ch] are finally enough like the other + lib/* replacement files to compile on a few more losing systems. + + * nanosleep.h: Don't include config.h. + Remove prototype from declaration of nanosleep. + (PARAMS): Remove now-unneeded definition. + * nanosleep.c: #undef nanosleep. + (rpl_nanosleep): Rename from nanosleep. + +2000-02-03 Jim Meyering <jim@meyering.net> + + * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION', + rather than with `#if HAVE_UTMPNAME'. + +2000-02-01 Jim Meyering <jim@meyering.net> + + * readutmp.h (UT_USER): Add parens. From Andreas Schwab. + +2000-01-31 Jim Meyering <jim@meyering.net> + + * nanosleep.h (nanosleep): Guard declaration with + `#if ! HAVE_DECL_NANOSLEEP'. + Without this, OFS gets a redeclaration error for rpl_nanosleep, due to + the declaration in that vendor's sys/timers.h. + Reported by Christian Krackowizer. + + * quotearg.c (ISASCII): Add #undef and move definition to follow + inclusion of wctype.h to work around Solaris 2.6 namespace pollution. + (ISPRINT): Likewise. + Reported by Tom Tromey. + +2000-01-30 Jim Meyering <jim@meyering.net> + + * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding + uses of ->ut_name. The latter doesn't work with new Linux header files + where only utmpx.ut_user is declared. + + * readutmp.h (UT_USER): Define. + +2000-01-23 Jim Meyering <jim@meyering.net> + + * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of + obstack.c. + +2000-01-22 Jim Meyering <jim@meyering.net> + + * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul. + [! HAVE_DECL_STRTOULL]: Declare strtoull. + Required for some AIX systems. Reported by Christian Krackowizer. + [TESTING] (main): New function. + + 1997-10-17 Eli Zaretskii <eliz@is.elta.co.il> + * dirname.c (dir_name): Support for DOS-style file names with drive + letters. + + * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint. + + * strverscmp.c (ISDIGIT): Define. + (strverscmp): Use ISDIGIT, not isdigit. + +2000-01-17 Paul Eggert <eggert@twinsun.com> + + * nanosleep.c (nanosleep): + Don't use SA_INTERRUPT to decide whether to call sigaction, as + POSIX.1 doesn't require SA_INTERRUPT and some systems + (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead; + it's been part of POSIX.1 since day 1 (in 1988). + +2000-01-17 Jim Meyering <jim@meyering.net> + + * interlock: Remove unused file. Reported by François Pinard. + +2000-01-16 Paul Eggert <eggert@twinsun.com> + + * quotearg.c (quotearg_buffer_restyled): Do not quote + alert, backslash, formfeed, and vertical tab unnecessarily in + shell quoting style. diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/lib/README b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/lib/README new file mode 100644 index 0000000..100b99d --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/lib/README @@ -0,0 +1,3 @@ +The files in this directory are used in many GNU packages, +including coreutils, diffutils, and tar. +The autoconf tests required for these files are in ../m4. diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/lib/TODO b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/lib/TODO new file mode 100644 index 0000000..4b3fe85 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/lib/TODO @@ -0,0 +1,32 @@ +Things to do to hash.c: + +Always use curly braces around statements in if/else/while/do/etc. +that span more than a line -- even around multiline simple statements +or single-line simple statements preceded by a comment line. + +Never have lines longer than 80 chars. + +Remove ^L characters. We don't want/need such crutches. +Get a good (smart) pagination filter. I have one (a perl script) +that usually does a decent job for me -- I called it something +like stdc-print and think I sent you an early verison. + +I don't like the name `cursor'. I much prefer short names +like `p' for index variables. I doubt I'll change all of them, +but thought you should know why some will probably end up changing. + +#define USE_OBSTACK somewhere + +Fix this comment. Depending on system and application... +Mention fragmentation. + +#if USE_OBSTACK + + /* Whenever obstacks are used, it is possible to allocate all overflowed + + entries into a single stack, so they all can be freed in a single + + operation. It is not clear if the speedup is worth the trouble. */ + + struct obstack entry_stack; + +#endif + + +assert (bucket_limit - bucket == n_buckets) ? + +remove.c: s/done/successful or ok diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/m4/ChangeLog b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/m4/ChangeLog new file mode 100644 index 0000000..7614b20 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/m4/ChangeLog @@ -0,0 +1,3417 @@ +2005-01-04 Jim Meyering <jim@meyering.net> + + * chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown + is sane and DOES follow symlinks. Besides, testing 20 different + systems found no broken chown implementations. + Prompted by a change in rsync's copy of this macro. + +2005-01-03 Paul Eggert <eggert@cs.ucla.edu> + + * ullong_max.m4: New file. + * jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX. + +2005-01-03 Jim Meyering <jim@meyering.net> + + * mkstemp.m4 (gl_FUNC_MKSTEMP): Don't `cd' into the temporary + subdirectory. That would make the subsequent AC_TRY_RUN macro fail, + for lack of the ./confdefs.h file. Instead, use the temporary + directory name as a prefix on the template string. + Include <unistd.h> for the declaration of close. + Remove `.tmp' suffix; mkstemp requires that XXXXXX be a suffix. + +2004-12-23 Paul Eggert <eggert@cs.ucla.edu> + + * getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA. + +2004-12-21 Jim Meyering <jim@meyering.net> + + * mkstemp.m4 (gl_FUNC_MKSTEMP): Remove temporary directory right + away, rather than waiting for configure's at-exit trap code to do it. + Suggestion from Stepan Kasal. + +2004-12-20 Jim Meyering <jim@meyering.net> + + * mkstemp.m4: Do the `cd' in a subshell. + + * mkstemp.m4: Rather than using "conftestXXXXXX" as the mkstemp + template, use a temporary directory and an 8.3-friendly template + to avoid trouble on systems like DJGPP. + Reported by Juan M. Guerrero via Stepan Kasal. + +2004-12-19 Paul Eggert <eggert@cs.ucla.edu> + + * c-strtod.m4 (gl_C99_STRTOLD): New macro. + (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold). + +2004-12-10 Jim Meyering <jim@meyering.net> + + * chdir-long.m4 (gl_FUNC_CHDIR_LONG: Arrange to compile chdir-long.c + only on systems that define PATH_MAX. + +2004-12-07 Paul Eggert <eggert@cs.ucla.edu> + + * ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change: + spurious "-l"s. Problem reported by Stepan Kasal. + +2004-12-06 Paul Eggert <eggert@cs.ucla.edu> + + * ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug + in Autoconf 2.59. Problem reported by Mark D. Baushke. + +2004-12-06 Jim Meyering <jim@meyering.net> + + * save-cwd.m4 (gl_SAVE_CWD): Use AC_LIBSOURCES. + Use AC_LIBOBJ(save-cwd). + * chdir-long.m4 (gl_FUNC_CHDIR_LONG): Use AC_LIBSOURCES. + Use AC_LIBOBJ(chdir-long). + * mempcpy.m4 (gl_FUNC_MEMPCPY): Use AC_LIBSOURCES. + * lchown.m4 (gl_FUNC_LCHOWN): Likewise. + * openat.m4 (gl_FUNC_OPENAT): Likewise. + (gl_PREREQ_GETCWD): Use AC_REQUIRE. + +2004-12-02 Paul Eggert <eggert@cs.ucla.edu> + + * openat.m4: Add copyright notice. + (gl_FUNC_OPENAT): Require gl_USE_SYSTEM_EXTENSIONS, since Solaris + requires __EXTENSIONS__ to be defined when compiling pedantically, + if you want AT_FDCWD. + +2004-12-01 Paul Eggert <eggert@cs.ucla.edu> + + * hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale + exist. + * human.m4 (gl_HUMAN): Assume locale.h and localeconv exist. + * jm-macros.m4 (gl_MACROS): Assume localeconv exists. + +2004-11-30 Paul Eggert <eggert@cs.ucla.edu> + + * getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): + Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working. + + * readutmp.m4 (gl_READUTMP): Don't check for sys/param.h. + +2004-11-30 Jim Meyering <jim@meyering.net> + + * chdir-long.m4: Rename from chdir.m4. + * jm-macros.m4 (gl_MACROS): Reflect renaming. + +2004-11-28 Jim Meyering <jim@meyering.net> + + * chdir.m4: New file. + * openat.m4: New file. + * jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR. + +2004-11-25 Paul Eggert <eggert@cs.ucla.edu> + + * mempcpy.m4: New file, taken from gnulib. + * getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from + GL_FUNC_GETCWD_PATH_MAX for consistency. All uses changed. + Use the _ONCE methods, for efficiency. + Check for fcntl.h. In test program, include <errno.h> + and <fcntl.h> if available. Remove old K&R cruft from + test program. Check for common errors in GNU/Linux, + OpenBSD, and Solaris. Just set gl_cv_func_getcwd_path_max; + don't do AC_LIBOBJ, as that's getcwd.m4's job. + * getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from + AC_FUNC_GETCWD_NULL. All used changed. Change cache variable + name accordingly. + (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros. Revamp to + accommodate new getcwd.c. + * jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX. + * prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY. + * xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since + that's all we need now. + +2004-11-23 Paul Eggert <eggert@cs.ucla.edu> + + * utimens.m4 (gl_UTIMENS): Check for futimes function. + +2004-11-23 Sergey Poznyakoff <gray@Mirddin.farlep.net> + + * getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in + order not to spoil the result of an eventual previous invocation + of gl_GETOPT_SUBSTITUTE. + +2004-11-17 Paul Eggert <eggert@cs.ucla.edu> + + * calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc implementations + that mishandle size_t overflow. + +2004-11-16 Paul Eggert <eggert@cs.ucla.edu> + + * canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo. + +2004-11-13 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Do require gl_FUNC_FPENDING. + * fpending.m4: Restore file. + +2004-11-11 Paul Eggert <eggert@cs.ucla.edu> + + * getopt.m4: Sync from gnulib. + +2004-11-06 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Don't require gl_FUNC_FPENDING. + * fpending.m4: Remove file. + +2004-11-03 Paul Eggert <eggert@cs.ucla.edu> + + * setenv.m4: New file, from gnulib. + * prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV. + * uint32_t.m4: Sync from gnulib. + +2004-11-02 Paul Eggert <eggert@cs.ucla.edu> + + * getpass.m4: Sync from gnulib. + +2004-10-29 Paul Eggert <eggert@cs.ucla.edu> + + * getpagesize.m4: Sync from gnulib. + +2004-10-17 Paul Eggert <eggert@cs.ucla.edu> + + * jm-macros.m4 (gl_MACROS): Check for mbrlen, for pathchk. + (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk. + + Sync from gnulib. + * getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD + implementation of getopt_long. + +2004-10-04 Paul Eggert <eggert@cs.ucla.edu> + + Sync from gnulib. + + * xalloc.m4 (gl_PREREQ_XSTRDUP): Remove. All uses removed. + + * unlocked-io.m4: Add copyright notice. + (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO. + +2004-10-03 Paul Eggert <eggert@cs.ucla.edu> + + Sync from gnulib. + * mbswidth.m4: Add copyright notice. + * vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW. + * eoverflow.m4: New file. + +2004-08-19 Paul Eggert <eggert@cs.ucla.edu> + + * getopt.m4: Sync from gnulib. + +2004-08-11 Paul Eggert <eggert@cs.ucla.edu> + + * obstack.m4 (gl_PREREQ_OBSTACK): Require + gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T. + + * fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy. + +2004-08-09 Paul Eggert <eggert@cs.ucla.edu> + + * sha1.m4: Renamed from sha.m4. + (gl_SHA1): Renamed from gl_SHA. All uses changed. + +2004-08-08 Simon Josefsson <jas@extundo.com> + + * getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU): + Check getpass declaration. + +2004-08-07 Paul Eggert <eggert@cs.ucla.edu> + + * canonicalize.m4, getcwd-path-max.m4, strdup.m4: Merge from gnulib. + +2004-08-05 Paul Eggert <eggert@cs.ucla.edu> + + Merge from gnulib. + + * alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always, + for backward compatibility with older code. We need our own + alloca.h if _AIX is defined. Define HAVE_ALLOCA if we discover + it under some other name, and our alloca.h will define it. + * backupfile.m4, calloc.m4, strtoimax.m4, strtoumax.m4: + Bump serial number only. + * dirfd.m4, intmax_t.m4, inttypes_h.m4, mbrtowc.m4, stdint_h.m4, + uintmax_t.m4: Finish renaming jm_ to gl_. + * dos.m4 (gl_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__. + * host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g. + * prereq.m4 (gl_PREREQ): Add gl_GETTIME, AC_FUNC_CALLOC. + * gettime.m4: New file. + * settime.m4: Require gl_TIMESPEC; check for settimeofday, stime. + * unlocked-io.m4: Remove -*- autoconf -*-. + * xalloc.m4: No longer require AC_FUNC_CALLOC, AC_FUNC_MALLOC, + AC_FUNC_REALLOC. + +2004-08-04 Paul Eggert <eggert@cs.ucla.edu> + + OpenBSD porting fixes. + * boottime.m4: Add copyright notice. + (GNULIB_BOOT_TIME): Include sys/param.h before testing + for sys/sysctl.h. + * fsusage.m4: Add copyright notice. + (gl_FSUSAGE): Include sys/param.h before checking for sys/mount.h. + * jm-macros.m4: Include copyright notice. + (gl_MACROS): Use the _ONCE variants when appropriate. + Include sys/param.h before testing for sys/sysctl.h and sys/mount.h. + * ls-mntd-fs.m4: Include copyright notice. + (gl_LIST_MOUNTED_FILE_SYSTEMS): Include sys/param.h before + testing for sys/mount.h. + * stat-prog.m4: Include copyright notice. + (cu_PREREQ_STAT_PROG): Use the _ONCE variants when appropriate. + Include sys/param.h before testing for sys/mount.h. + +2004-08-01 Paul Eggert <eggert@cs.ucla.edu> + + * jm-macros.m4 (gl_CHECK_ALL_TYPES): + Require gl_AC_TYPE_UINTPTR_T instead of using AC_CHECK_TYPE + on uintptr_t. Require gl_AC_TYPE_UINT32_T. + * md5.m4 (gl_MD5): Require gl_AC_TYPE_UINT32_T. + * uint32_t.m4, uintptr_t.m4: New files. + +2004-07-28 Paul Eggert <eggert@cs.ucla.edu> + + * md5.m4 (gl_MD5): Do not require AC_C_INLINE, since it doesn't + use inline any more. Require AC_C_BIGENDIAN, though. + * sha.m4 (gl_SHA): Require AC_C_BIGENDIAN. + +2004-07-27 Paul Eggert <eggert@cs.ucla.edu> + + * euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't bother checking for + unistd.h, as autoconf does this for us. Check for libgen.h. + Also look for eaccess within -lgen, which is where it is in + Solaris. Set LIB_EACCESS accordingly. + + * backupfile.m4 (gl_BACKUPFILE): AC_REQUIRE + gl_CHECK_TYPE_STRUCT_DIRENT_D_INO instead of invoking it directly. + Do not require AC_FUNC_CLOSEDIR_VOID. + +2004-07-25 Paul Eggert <eggert@cs.ucla.edu> + + * jm-macros.m4 (gl_MACROS): Remove test for setreuid and setregid, + as test.c no longer uses them directly. + + * euidaccess.m4 (gl_FUNC_NONREENTRANT_EUIDACCESS): New macro. + (gl_FUNC_EUIDACCESS): Use AC_CHECK_DECLS_ONCE, not AC_CHECK_DECLS. + (gl_PREREQ_EUIDACCESS): Check for eaccess and setregid decls. + Require AC_HEADER_STAT. + + * prereq.m4 (gl_PREREQ): Invoke gl_FUNC_NONREENTRANT_EUIDACCESS, + not gl_FUNC_EUIDACCESS. + +2004-07-23 Paul Eggert <eggert@cs.ucla.edu> + + * prereq.m4 (gl_PREREQ): Add gl_FCNTL_SAFER. + * fcntl-safer.m4: New file. + +2004-07-12 Paul Eggert <eggert@cs.ucla.edu> + + * c-strtod.m4 (gl_C_STRTOD): Add gl_USE_SYSTEM_EXTENSIONS. + +2004-07-11 Paul Eggert <eggert@cs.ucla.edu> + + * c-strtod.m4: New file. + * prereq.m4 (gl_PREREQ): Add gl_C_STRTOLD. + +2004-04-03 Dmitry V. Levin <ldv@altlinux.org> + + * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): + Do not add canonicalize.c here. + +2004-07-02 Paul Eggert <eggert@cs.ucla.edu> + + * path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the + prerequisite modules now handle the DOS stuff. + Don't check for unistd.h. + +2004-06-30 Paul Eggert <eggert@cs.ucla.edu> + + * dos.m4 (gl_AC_DOS): Define FILE_SYSTEM_PREFIX_LEN, not + FILESYSTEM_PREFIX_LEN. Generate + FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX, not + FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX. Generate + FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR, not + FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR. + * ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Renamed from + gl_LIST_MOUNTED_FILESYSTEMS. All uses changed. + +2004-06-25 Jim Meyering <jim@meyering.net> + + * afs.m4 (gl_AFS): Use AC_ARG_WITH instead of ancient, hard-coded + AC_MSG_CHECKING/AC_MSG_RESULT etc. From Tim Waugh. + +2004-06-15 Paul Eggert <eggert@cs.ucla.edu> + + * getcwd-path-max.m4 (GL_FUNC_GETCWD_PATH_MAX): Fix typo: getcwd + was being replaced when it shouldn't have been, and vice versa. + +2004-06-09 Jim Meyering <jim@meyering.net> + + * calloc.m4 (AC_FUNC_CALLOC): Remove use of AN_FUNCTION. + +2004-06-07 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (gl_MACROS): Check for the directio function. + +2004-06-01 Jim Meyering <jim@meyering.net> + + * stdbool.m4: Update from gnulib. + +2004-05-29 Jim Meyering <jim@meyering.net> + + * xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_FUNC_CALLOC. + * calloc.m4 (AC_FUNC_CALLOC, _AC_FUNC_CALLOC_IF): New file/macros. + +2004-05-21 Jim Meyering <jim@meyering.net> + + * free.m4: Update from gnulib (fix reversed test). + +2004-05-03 Jim Meyering <jim@meyering.net> + + Temporary work-around for the problem reported here: + http://sources.redhat.com/ml/bug-automake/2004/msg00339.html + + * gettext.m4 (AM_GNU_GETTEXT): Don't require AM_INTL_SUBDIR. + (AM_INTL_SUBDIR): Comment out definition. + +2004-05-01 Jim Meyering <jim@meyering.net> + + * jm-mktime.m4: Remove file. This is now part of mktime.m4. + * glibc.m4, c-stack.m4, xsize.m4, size_max.m4: Remove unused files. + * printf-posix.m4, lcmessage.m4: Likewise. + * gettextext.m4, intdiv0.m4, intmax.m4: Likewise. + + * jm-macros.m4 (gl_MACROS): Move fchown-checking code to chown.m4. + * chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h. + See if we need an fchown replacement. + (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro. + (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK, + and use the replacement function if we detect either defect. + +2004-04-22 Paul Eggert <eggert@twinsun.com> + + * jm-macros.m4 (gl_MACROS): Check for tcgetpgrp. + +2004-04-23 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Don't check for values.h; it's no longer used. + +2004-04-20 Jim Meyering <jim@meyering.net> + + Change UTILS_ to gl_ in AC_DEFINE'd names. + Change utils_- and jm_-prefixed variables, too. + * mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from + UTILS_FUNC_MKDIR_TRAILING_SLASH. + * mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP. + * host-os.m4 (gl_HOST_OS): Renamed from UTILS_HOST_OS. + + * dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD. + Don't emit trailing blanks. + Also rename jm_-prefixed variables to have gl_ prefix. + + * jm-macros.m4: Reflect the renamings. + * prereq.m4: Likewise. + +2004-04-19 Jim Meyering <jim@meyering.net> + + * readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE, + now that readutmp.c may call `free (0)'. + +2004-04-14 Jim Meyering <jim@meyering.net> + + * Makefile.am: Remove file. With automake-1.8.3, it's no longer needed. + * Makefile.am.in: Likewise. + * Makefile.in: Likewise. + + * stat-prog.m4 (cu_PREREQ_STAT_PROG): Don't use AC_CHECK_HEADERS to + check for inttypes.h. Instead, require gt_HEADER_INTTYPES_H. + + * jm-macros.m4: Require cu_PREREQ_STAT_PROG. + + * prereq.m4: Move prerequisite function for src/stat.c to ... + * stat-prog.m4 (cu_PREREQ_STAT_PROG): New file. Contents from prereq.m4. + +2004-04-13 Jim Meyering <jim@meyering.net> + + Change `jm_' in AC_DEFINE'd names to `gl_'. Update all uses. + + * afs.m4, allocsa.m4, assert.m4, backupfile.m4, bison.m4: + * check-decl.m4, chown.m4, d-ino.m4, d-type.m4, dirname.m4: + * dos.m4, error.m4, fpending.m4, fstypename.m4, fsusage.m4: + * ftruncate.m4, getdate.m4, getgroups.m4, gettext.m4, glibc21.m4: + * group-member.m4, human.m4, intmax.m4, intmax_t.m4, inttostr.m4: + * inttypes_h.m4, jm-macros.m4, jm-mktime.m4, jm-winsz1.m4: + * jm-winsz2.m4, lchown.m4, lib-check.m4, link-follow.m4, longlong.m4: + * ls-mntd-fs.m4, lstat.m4, makepath.m4, mbrtowc.m4, mbswidth.m4: + * memchr.m4, memcmp.m4, mkstemp.m4, mountlist.m4, nanosleep.m4: + * path-concat.m4, perl.m4, prereq.m4, putenv.m4, quotearg.m4: + * regex.m4, stat.m4, stdint_h.m4, strftime.m4, strtoimax.m4: + * strtoll.m4, strtoull.m4, strtoumax.m4, timespec.m4, uintmax_t.m4: + * ulonglong.m4, unlink-busy.m4, unlocked-io.m4, uptime.m4, utimbuf.m4: + * utime.m4, utimens.m4, utimes-null.m4, vasnprintf.m4, xstrtoimax.m4: + * xstrtol.m4, xstrtoumax.m4: Change jm_ to gl_ in AC_DEFINE'd names. + +2004-03-27 Paul Eggert <eggert@twinsun.com> + + * utimecmp.m4: New file. + * prereq.m4 (jm_PREREQ): Require gl_UTIMECMP. + +2004-04-07 Paul Eggert <eggert@twinsun.com> + + * jm-macros.m4 (jm_MACROS): Check for fdatasync within + -lrt and -lposix4, so that it can be used in Solaris 2.5.1 and later. + +2004-03-30 Paul Eggert <eggert@twinsun.com> + + * c-stack.m4, getline.m4, getndelim2.m4, mbswidth.m4, po.m4, + strdup.m4, xsize.m4: Sync from gnulib. + + * allocsa.m4, cloexec.m4, eealloc.m4, inttostr.m4, mbstate_t.m4: + New files, from gnulib. + + * prereq.m4 (jm_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR. + +2004-03-31 Jim Meyering <jim@meyering.net> + + * prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC. + Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC. + * xalloc.m4: Likewise. + + * realloc.m4: Remove file, since now it does no more than + AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via + the `configure.ac' section of module/realloc. + * malloc.m4: Likewise, but for AC_FUNC_MALLOC. + +2004-02-29 Paul Eggert <eggert@twinsun.com> + + * clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE. + * getdate.m4 (gl_GETDATE): Remove time-related stuff. + Require AM_STDBOOL_H and gl_TIMESPEC instead. + Require gl_CLOCK_TIME. + +2004-03-07 Paul Eggert <eggert@twinsun.com> + + * Makefile.am.in (Makefile.am): + Don't use $<, as it doesn't work with Solaris make. + +2004-01-29 Jim Meyering <jim@meyering.net> + + Avoid a configure-time warning about sys/ucred.h on OSF V4.0. + * ls-mntd-fs.m4: Test for sys/ucred.h separately, since + on some systems one must include <grp.h> before it. + Reported by Christian Krackowizer. + +2004-01-16 Jim Meyering <jim@meyering.net> + + * onceonly.m4: Sync with version from gettext-0.13.1. + +2003-10-08 Paul Eggert <eggert@twinsun.com> + + Merge from gnulib. + + * getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h. + +2003-08-26 Bruno Haible <bruno@clisp.org> + + Merge from gnulib. + + * fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here. + This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch' + followed by '#define fnmatch fnmatch_posix' gives an error. + +2004-01-14 Paul Eggert <eggert@twinsun.com> + + * posixv.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION. + +2004-01-13 Jim Meyering <jim@meyering.net> + + * gettext.m4, lib-ld.m4, lib-prefix.m4, nls.m4, po.m4: + Update from gettext-0.13.1. + * intmax.m4, isc-posix.m4, printf-posix.m4, size_max.m4, xsize.m4: + New files. From gettext-0.13.1. + +2004-01-11 Paul Eggert <eggert@twinsun.com> + + * posixver.m4 (gl_DEFAULT_POSIX2_VERSION): Move + the documentation from 'configure' into 'config.hin', + so that 'configure --help' isn't burdened by it and + we don't have to worry about its formatting there. + Reword the documentation so that it's more succinct + and can be run together into a single paragraph. + +2004-01-12 Jim Meyering <jim@meyering.net> + + * posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro. + +2003-12-20 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX. + + * open-max.m4 (UTILS_SYS_OPEN_MAX): Remove file. No longer used. + + * lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the + value, $ac_cv_search_crypt, if it's "none required". + +2003-12-19 Jim Meyering <jim@meyering.net> + + * clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME + if no library is required. + +2003-12-18 Jim Meyering <jim@meyering.net> + + * search-libs.m4 (AC_SEARCH_LIBS): Remove file/macro, now that + this replacement is no longer needed. Besides, this macro has + no effect with autoconf-2.58, since `undefine' in package-supplied + .m4 files is no longer honored. Reported by Andreas Schwab. + + Remove now-unnecessary (and unused) files. They also used `undefine'. + * isc-posix.m4 (AC_ISC_POSIX): Remove file. + * getloadavg.m4 (gl_FUNC_GETLOADAVG): Remove file. + * prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG, + not gl_FUNC_GETLOADAVG. + +2003-11-08 Jim Meyering <jim@meyering.net> + + * inttypes.m4: Sync from gnulib (this file was previously empty, + to work around some sort of problem). + +2003-11-08 Alexandre Duret-Lutz <adl@gnu.org> + + * nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the + value, $ac_cv_search_nanosleep, if it's "none required". + +2003-11-05 Paul Eggert <eggert@twinsun.com> + + * jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t. + +2003-11-05 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE. + * free.m4: New file, from gnulib. + + * exitfail.m4, host-os.m4, strndup.m4: Update from gnulib. + + * jm-macros.m4 (jm_MACROS): Require autoconf-2.58. + (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58. + +2003-10-13 Paul Eggert <eggert@twinsun.com> + + * xalloc.m4: Import latest version from gnulib. + +2003-10-06 Jim Meyering <jim@meyering.net> + + * ftw.m4: Remove now-unused file. + +2003-10-05 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW. + +2003-09-17 Paul Eggert <eggert@twinsun.com> + + Update from gnulib. + * extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first, + to avoid spurious warnings like "AC_RUN_IFELSE was called before + gl_USE_SYSTEM_EXTENSIONS" from autoreconf. + +2003-09-12 Paul Eggert <eggert@twinsun.com> + + More patches to assume C89 or better. + + * mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C headers. + * strdup.m4 (gl_PREREQ_STRDUP): Likewise. + * userspec.m4 (gl_USERSPEC): Likewise. + * xalloc.m4 (gl_PREREQ_XMALLOC): Likewise. + * xstrtod.m4 (gl_XSTRTOD): Likewise. + * xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise. + * strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h, + memcpy, memset. + (jm_FUNC_GNU_STRFTIME): Don't require standard C headers. + * strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h. + * strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h, strtol. + * strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h. + * userspec.m4 (gl_USERSPEC): Do not check for string.h. + * xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol, + strtoul. + +2003-09-12 Paul Eggert <eggert@twinsun.com> + + * error.m4 (gl_ERROR): Don't check for vprintf. + Require AC_FUNC_STRERROR_R rather than invoking it. + +2003-09-12 Paul Eggert <eggert@twinsun.com> + + * check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h> + unconditionally. + * closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h. + * gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): + Include <string.h>, <stdlib.h> unconditionally. + * lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free. + * readdir.m4 (GL_FUNC_READDIR): Don't check for string.h. + * readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C headers + or for string.h. + * strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlb.h + or strtoul. + * extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX + and AC_MINIX, too, so that their extensions are available. + + * prereq.m4 (jm_PREREQ_ADDEXT): Remove. All uses removed. + This macro has been superseded by gl_BACKUPFILE. + +2003-09-12 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH, + gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS. + * readtokens.m4: New file, from gnulib + * md5.m4: Likewise. + * makepath.m4: Likewise. + * long-options.m4: Likewise. + * idcache.m4: Likewise. + * getugroups.m4: Likewise. + +2003-09-11 Paul Eggert <eggert@twinsun.com> + + More patches to assume C89 or better. + * strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check. + * strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h, + string.h, memchr, STDC_HEADERS. + +2003-09-10 Bruno Haible <bruno@clisp.org> + + * strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check. + * strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check. + * strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check. + * unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check. + * xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check. + * yesno.m4 (gl_YESNO): Remove <stdlib.h> check. + +2003-09-09 Paul Eggert <eggert@twinsun.com> + + * getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h. + * getopt.m4 (gl_GETOPT): Don't check for string.h. + * getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for stdlib.h. + * group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard C + headers. + * hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h, + string.h. + * hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free. + * human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv. + * sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy. + * memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h. + * memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h. + * memcoll.m4 (gl_MEMCOLL): Likewise. + * memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h. + * mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h, + string.h, free. + * mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers. + * modechange.m4 (gl_MODECHANGE): Don't check for standard C headers. + * mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard + C headers, or for string.h. + * obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h. + (gl_PREREQ_OBSTACK): Don't check for stdlib.h. + * path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C + headers, memory.h, stdlib.h, string.h, strings.h. + * posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h. + * posixver.m4 (gl_POSIXVER): Don't check for getenv. + * putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy, + strchr. + * regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h. + * rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h, + free. + * rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C headers. + * save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers. + * savedir.m4 (gl_SAVEDIR): Don't check for standard C headers. + * xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h. + +2003-09-09 Derek Robert Price <derek@ximbiot.com> + + * getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the + C89 spec. + +2003-09-08 Paul Eggert <eggert@twinsun.com> + + Assume C89 or better; remove K&R cruft. + * alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h. + * backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h, + string.h, getenv, malloc. + * dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard + headers. + * canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h. + * error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and + do not check for strerror. + * exclude.m4: Do not check for stdlib.h, string.h, strings.h. + * exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h. + * fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove. All uses removed. + * getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h. + +2003-08-27 Jim Meyering <jim@meyering.net> + + * mkstemp.m4: Require that the system mkstemp be able to create + 70 temporary files, not just 30. Tru64 V4.0F's mkstemp function + would fail after 32. Reported by Danny Levinson. Details here: + http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html + +2003-08-19 Jim Meyering <jim@meyering.net> + + * lib-ld.m4: Revert yesterday's change, per Bruno's request here: + http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html + +2003-08-18 Paul Eggert <eggert@twinsun.com> + + * same.m4 (gl_SAME): Do not check for stdlib.h or string.h or free. + Check for pathconf. + +2003-08-18 Jim Meyering <jim@meyering.net> + + * getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB). + * lib-ld.m4: Likewise. + * po.m4: Likewise. + +2003-08-18 Paul Eggert <eggert@twinsun.com> + and Jim Meyering <jim@meyering.net> + + It turns out that we need AM_NLS and AM_PO_SUBDIRS after all; + otherwise po/POTFILES and po/Makefile aren't built by 'configure'. + I'm not sure why I didn't catch this earlier; most likely some + leftover build files. Sorry about that. + * gettextext.m4 (AM_NLS, AM_PO_SUBDIRS): Remove definitions. + * nls.m4, po.m4: New files, taken from gnulib / gettext. + +2003-08-16 Paul Eggert <eggert@twinsun.com> + + Sync with gnulib. + + * gettextext.m4: New file. + + * atexit.m4, backupfile.m4, canon-host.m4, clock_time.m4, + closeout.m4, dirname.m4, dup2.m4, euidaccess.m4, exclude.m4, + exitfail.m4, file-type.m4, fileblocks.m4, filemode.m4, getdate.m4, + gethostname.m4, getloadavg.m4, getopt.m4, getpagesize.m4, + getpass.m4, getusershell.m4, hard-locale.m4, hash.m4, malloc.m4, + memchr.m4, memcpy.m4, memmove.m4, memrchr.m4, memset.m4, + modechange.m4, mountlist.m4, obstack.m4, path-concat.m4, + pathmax.m4, physmem.m4, posixtm.m4, posixver.m4, quote.m4, + quotearg.m4, readlink.m4, readutmp.m4, realloc.m4, rmdir.m4, + rpmatch.m4, safe-read.m4, safe-write.m4, same.m4, save-cwd.m4, + savedir.m4, settime.m4, sha.m4, sig2str.m4, stdio-safer.m4, + stpcpy.m4, strcase.m4, strcspn.m4, strdup.m4, strndup.m4, + strnlen.m4, strpbrk.m4, strstr.m4, strtod.m4, strtoimax.m4, + strtol.m4, strtoll.m4, strtoul.m4, strtoull.m4, strtoumax.m4, + strverscmp.m4, ulonglong.m4, unicodeio.m4, unistd-safer.m4, + userspec.m4, xalloc.m4, xgetcwd.m4, xreadlink.m4, xstrtod.m4, + xstrtol.m4, yesno.m4: New files, from gnulib. + + * acl.m4, check-decl.m4, chown.m4, c-stack.m4, d-ino.m4, + d-type.m4, fileblocks.m4, fsusage.m4, ftruncate.m4, getcwd.m4, + getgroups.m4, getline.m4, getndelim2.m4, gettext.m4, + gettimeofday.m4, group-member.m4, host-os.m4, iconv.m4, + intmax_t.m4, inttypes-pri.m4, jm-macros.m4, lchown.m4, lib-ld.m4, + lib-link.m4, lib-prefix.m4, longdouble.m4, longlong.m4, + ls-mntd-fs.m4, lstat.m4, mbrtowc.m4, mbswidth.m4, memcmp.m4, + mkdir-slash.m4, mkstemp.m4, nanosleep.m4, onceonly.m4, prereq.m4, + progtest.m4, putenv.m4, readdir.m4, rename.m4, stat.m4, tzset.m4, + utimbuf.m4, utime.m4, vasnprintf.m4, xstrtoimax.m4, xstrtoumax.m4: + Sync with gnulib. + +2003-08-15 Jim Meyering <jim@meyering.net> + + * utimes.m4 (gl_FUNC_UTIMES): Use `conftest.utimes' as the test + file name, not `x'. The former will be removed automatically. + +2003-08-13 Jim Meyering <jim@meyering.net> + + * README: Remove file. + * Makefile.am.in: Simplify. + (Makefile.am): Remove README. + +2003-08-10 Jim Meyering <jim@meyering.net> + + * utimes.m4 (gl_FUNC_UTIMES): New file. + * utimens.m4: Require gl_FUNC_UTIMES. + Don't check for utime or utimes. + + * utimes.m4: Removed. + * utimes-null.m4: Renamed from utimes.m4. + +2003-08-06 Paul Eggert <eggert@twinsun.com> + + * prereq.m4 (jm_PREREQ): Require gl_UTIMENS. + * utimens.m4: New file. + +2003-08-08 Paul Eggert <eggert@twinsun.com> + + * vasnprintf.m4 (gl_PREREQ_VASNPRINTF): + Solaris 2.5.1 needs -lw to get the wcslen function. + +2003-08-08 Paul Eggert <eggert@twinsun.com> + + Use new gnulib 'extensions' module. + * extensions.m4, unlocked-io.m4: New files, from gnulib. + * gnu-source.m4, jm-glibc-io.m4: Remove. + * timespec.m4: Merge from gnulib. + +2003-08-08 Paul Eggert <eggert@twinsun.com> + + * jm-macros.m4 (jm_MACROS): Replace jm_INCLUDED_REGEX([lib/regex.c]) + with gl_REGEX. + Replace jm_FUNC_MKTIME with gl_FUNC_MKTIME. + Remove redundant AC_FUNC_FNMATCH_GNU, jm_FUNC_MKTIME. + Remove AC_FUNC_VPRINTF. + Add gl_ERROR. + +2003-08-05 Paul Eggert <eggert@twinsun.com> + + * jm-macros.m4 (jm_MACROS): Use gl_GETNDELIM2 rather than + checking for getdelim. + (jm_CHECK_ALL_TYPES): Use gt_TYPE_SSIZE_T for ssize_t rather + than rolling our own. + Merge getline from gnulib. + * getline.m4: Merge from gnulib. + * getndelim2.m4, ssize_t.m4: New files, from gnulib. + +2003-08-04 Paul Eggert <eggert@twinsun.com> + + * regex.m4: Merge with gnulib. + (gl_REGEX): New macro. + (jm_INCLUDED_REGEX): Don't assume Latin-1 encoding of source code. + * restrict.m4: Merge with gnulib. + (gl_C_RESTRICT): Renamed from ACX_C_RESTRICT. All uses changed. + Rename cache vars to gl_cv_*. Incorporate latest Autoconf CVS tricks. + +2003-08-05 Paul Eggert <eggert@twinsun.com> + + * gnu-source.m4: New file, taken from gnulib, with support + added for __EXTENSIONS__ a la Solaris. + * jm-macros.m4 (jm_CHECK_ALL_TYPES): Call gl_TIMESPEC rather + than jm_CHECK_TYPE_STRUCT_TIMESPEC. + * st_mtim.m4: Sync with gnulib (white space change only). + * timespec.m4: Sync with gnulib, except also require + AC_GNU_SOURCE. + +2003-08-05 Paul Eggert <eggert@twinsun.com> + + * prereq.m4 (jm_PREREQ_PHYSMEM, jm_PREREQ_STAT): Ignore headers + that are present but cannot be compiled. This avoids spurious warnings + on Solaris 9 sparc with Forte Developer 7 C 5.4. + +2003-08-04 Paul Eggert <eggert@twinsun.com> + + Merge fnmatch module from gnulib. + * fnmatch.m4: New file, from gnulib. + * jm-macros.m4 (jm_MACROS): Require gl_FUNC_FNMATCH_GNU + instead of AC_FUNC_ERROR_AT_LINE. + +2003-08-04 Paul Eggert <eggert@twinsun.com> + + * error.m4: Sync from gnulib. + +2003-07-23 Jim Meyering <jim@meyering.net> + + * lstat.m4, mkstemp.m4, regex.m4, stat.m4: Normalize naming of Sun + operating systems in comments, e.g., SunOS4 -> SunOS 4, + Solaris5.9 -> Solaris 9. From Paul Eggert. + +2003-07-18 Paul Eggert <eggert@twinsun.com> + + * jm-macros.m4 (jm_MACROS): Invoke gl_MEMCOLL. + * memcoll.m4: New file, from gnulib. + Based on a patch from Andreas Schwab. + +2003-07-14 Jim Meyering <jim@meyering.net> + + * Makefile.am.in: Correct comment on first line. + +2003-07-12 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (OPTIONAL_BIN_ZCRIPTS): Remove unused variable. + +2003-07-10 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Require gl_FUNC_VASPRINTF and + gl_FUNC_VASNPRINTF. + + * longdouble.m4, signed.m4, vasnprintf.m4, vasprintf.m4, wchar_t.m4: + * wint_t.m4: New files, in support of new asprintf use. From gnulib. + + * stdint_h.m4: New file. + * inttypes_h.m4: New file. + * uintmax_t.m4: New file. + * intmax_t.m4: New file. + * inttypes.m4: Remove file. Use intmax_t.m4 and uintmax_t.m4 + from gnulib, instead. + +2003-06-09 Jim Meyering <jim@meyering.net> + + * tzset.m4 (gl_FUNC_TZSET_CLOBBER): Also define gmtime. + * gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Likewise. + Suggestion from Paul Eggert. + +2003-06-08 Jim Meyering <jim@meyering.net> + + * tzset.m4 (gl_FUNC_TZSET_CLOBBER): New file/macro. + Used by strftime.m4. + * strftime.m4 (_jm_STRFTIME_PREREQS): Require gl_FUNC_TZSET_CLOBBER. + +2003-06-07 Jim Meyering <jim@meyering.net> + + * strftime.m4: Update from gnulib. + * tm_gmtoff.m4: New file, used by strftime.m4. + * mktime.m4: New file. From gnulib. + +2003-06-06 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Require gl_FUNC_ALLOCA. + * alloca.m4: New file, from gnulib. + + * stdbool.m4: Update from gnulib. + +2003-06-04 Paul Eggert <eggert@twinsun.com> + + Merge human.c etc. from gnulib. + * human.m4: New file, from gnulib. + * prereq.m4 (jm_PREREQ): Use gl_HUMAN, not jm_PREREQ_HUMAN. + (jm_prereq_HUMAN): Remove. + +2003-06-02 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Require AM_STDBOOL_H. + +2003-05-26 Jim Meyering <jim@meyering.net> + + * dirfd.m4 (UTILS_FUNC_DIRFD): Merge in change from gnulib, + fixing an M4 quoting bug. + + * lib-ld.m4 (AC_LIB_PROG_LD_GNU): Use TAB-SP, not SP-TAB + when setting IFS. + * progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise. + +2003-05-06 Jim Meyering <jim@meyering.net> + + * getcwd-path-max.m4 (GL_FUNC_GETCWD_PATH_MAX): Check for the + declaration of getcwd *before* checking for the getcwd kernel bug. + Otherwise, configure-time `checking ...' messages would be intermixed. + +2003-05-02 Jim Meyering <jim@meyering.net> + + * readdir.m4 (GL_FUNC_READDIR): Revive dead file. Change name to + have GL_ (not jm_) prefix. Adjust cache variables similarly. + Create 500 rather than just 300 files, to exercise bug on + Darwin6.5, too. + * jm-macros.m4 (jm_MACROS): Require GL_FUNC_READDIR. + +2003-04-25 Jim Meyering <jim@meyering.net> + + * getcwd-path-max.m4 (GL_FUNC_GETCWD_PATH_MAX): If PATH_MAX + is not defined, don't run the test, and don't use the wrapper. + Otherwise, on the Hurd, it would take a long time to create + and remove a hierarchy about 4000 levels deep. + Based on a patch from Robert Millan. + +2003-04-22 Jim Meyering <jim@meyering.net> + + Aesthetics. + * gettext.m4: Change an occurrence of [ \t] to [\t ]. + +2003-04-07 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_STAT): Add prerequisites and #includes + for Ultrix 4.4. + +2003-04-02 Jim Meyering <jim@meyering.net> + + * perl.m4 (jm_PERL): Use $am_missing_run, not undefined $missing_dir. + +2003-03-19 Jim Meyering <jim@meyering.net> + + * ftw.m4 (AC_FUNC_FTW): Require AC_HEADER_STAT. + +2003-03-17 Richard Dawe <rich@phekda.freeserve.co.uk> + + * jm-macros.m4 (jm_MACROS): Include $(EXEEXT) in DF_PROG's program + name, since automake only adds $(EXEEXT) to programs in its *_PROGRAMS. + Arrange to compile the corresponding stub function if fchdir is missing. + +2003-03-18 Jim Meyering <jim@meyering.net> + + * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the MOUNTED_VMOUNT + test to precede the MOUNTED_GETMNTENT1 tests, since otherwise, AIX 5.1 + systems would end up using the latter. MOUNTED_GETMNTENT1 support + is inadequate on such systems: 1) detecting whether a file system + is remote doesn't work 2) the MOUNTED_VMOUNT code reports the + HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1 code reports + merely /MOUNT_POINT. Reported by Mike Jetzer. + +2003-03-17 Jim Meyering <jim@meyering.net> + + * dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one + that is guaranteed to be `no'. Use `no_such_member' to indicate + that condition, rather than `-1' which is slightly misleading. + Change the name of the cache variable to have the gl_ prefix. + Prompted by a patch from Richard Dawe for DJGPP. + +2003-03-14 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ): Also forbid the gl_[A-Z] prefix. + Don't require jm_PREREQ_C_STACK. + +2003-03-13 Paul Eggert <eggert@twinsun.com> + + [from gnulib] + * onceonly.m4 (m4_quote): New macro. + (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE): + Quote AC_FOREACH variable-expansions properly. + +2003-03-13 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Arrange to compile the corresponding stub + function if any of the following is missing: fchown, lstat, readlink. + From Richard Dawe. + +2003-03-07 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define + using the latest version from cvs. This avoids problems with #line + directives using a vendor (Sun) compiler. + + * jm-macros.m4: Don't require AC_SYS_MMAP_STACK. + * mmap-stack.m4 (AC_SYS_MMAP_STACK): Remove file. + +2003-03-06 Jim Meyering <jim@meyering.net> + + * getcwd-path-max.m4 (GL_FUNC_GETCWD_PATH_MAX): Check for + declaration of getcwd. + +2003-03-04 Jim Meyering <jim@meyering.net> + + * getcwd-path-max.m4 (GL_FUNC_GETCWD_PATH_MAX): New macro. + * jm-macros.m4: Require GL_FUNC_GETCWD_PATH_MAX. + + `df /some/mount-point' no longer hangs when an unrelated hard-mount + is unavailable + * fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point in + /proc/mounts until it finds one with matching device number. This is + unnecessary when the FILE argument *is* a mount point. No stat call + is necessary in that case. So, disable the statvfs-testing code on + systems with GNU libc. Reported by Andrei Gaponenko via Tim Waugh + as RedHat bug# 84846. + +2003-02-27 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_PHYSMEM): Also check for `table' function. + Reported by Kaveh Ghazi. + + * prereq.m4 (gl_SYS__SYSTEM_CONFIGURATION): New function. + (jm_PREREQ_PHYSMEM): Check for new headers and functions. + Use gl_SYS__SYSTEM_CONFIGURATION. + With suggestions from Kaveh Ghazi. + +2003-02-19 Jim Meyering <jim@meyering.net> + + * c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size + to 1MB, so as not to render systems with no stack size limit (e.g., + linux-2.2.x) unusable. Suggestion and code from Bruno Haible. + +2003-02-17 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_PHYSMEM): Undo last change, since + Kaveh Ghazi found a better way to get the required information. + Add check for sys/sysmp.h. + +2003-02-15 Jim Meyering <jim@meyering.net> + + * mmap-stack.m4: New file. + + * jm-macros.m4: Require AC_SYS_MMAP_STACK. + + Add Irix6 support to physmem.c. + * prereq.m4 (jm_PREREQ_PHYSMEM): Also check for sys/sysget.h + and sys/sysinfo.h. + Also check for sysget. + Reported by Kaveh Ghazi. + +2003-02-12 Jim Meyering <jim@meyering.net> + + * restrict.m4 (ACX_C_RESTRICT): Remove #ifndef -- so now this + macro also checks for support when using a C++ compiler. + Also, remove the test for SGI's __restrict. + Suggested by Steven G. Johnson. + + * regex.m4 (jm_PREREQ_REGEX): Require ACX_C_RESTRICT. + + * restrict.m4 (ACX_C_RESTRICT): Minor syntactic changes: + Split long lines, use AC_COMPILE_IFELSE, indent, use `case' + instead of nested `if's, remove unnecessary quotes. + + * restrict.m4 (ACX_C_RESTRICT): New macro. + Copied directly from the URL in the comments. + By Steven G. Johnson. + +2003-02-09 Jim Meyering <jim@meyering.net> + + * check-decl.m4 (jm_CHECK_DECLS): Add euidaccess. + +2003-02-03 Jim Meyering <jim@meyering.net> + + * c-stack.m4: Include <unistd.h>. On some systems, + it is required for the definition of _SC_PAGESIZE. + +2003-02-02 Jim Meyering <jim@meyering.net> + + * onceonly.m4: New file. From gnulib. + + * regex.m4 (jm_PREREQ_REGEX): New function, from gnulib. + (jm_INCLUDED_REGEX): Use it. + * prereq.m4 (jm_PREREQ_REGEX): Remove. + +2003-01-31 Jim Meyering <jim@meyering.net> + + * open-max.m4 (UTILS_SYS_OPEN_MAX): New file/macro. + * jm-macros.m4 (jm_MACROS): Require UTILS_SYS_OPEN_MAX. + +2003-01-29 Jim Meyering <jim@meyering.net> + + * regex.m4: Detect broken re_search in e.g. glibc-2.2.93. + +2003-01-23 Jim Meyering <jim@meyering.net> + + * dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this + from working on systems without dirfd (at least Irix and OSF1/Tru64). + + Merge in change by Bruno Haible from gnulib. + * dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP requirements. + +2003-01-16 Jim Meyering <jim@meyering.net> + + * regex.m4: The `regex' struct is both input and output. + Initialize it before each use. Patch by Tim Waugh. + +2003-01-15 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Require AC_FUNC_FTW. + +2003-01-12 Jim Meyering <jim@meyering.net> + + * ftw.m4: New file. + +2003-01-11 Jim Meyering <jim@meyering.net> + + * canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): New file and macro. + * jm-macros.m4: Require AC_FUNC_CANONICALIZE_FILE_NAME. + (jm_MACROS): No longer check for resolvepath or canonicalize_file_name. + +2002-12-15 Jim Meyering <jim@meyering.net> + + * jm-glibc-io.m4n: Remove now-unused file. + * Makefile.am.in (Makefile.am): Remove jm-glibc-io.m4 + and jm-glibc-io.m4n. + +2002-12-11 Jim Meyering <jim@meyering.net> + + * jm-glibc-io.m4: Maintain this file manually rather than generating it. + Generating it caused too much trouble. From gnulib. + +2002-11-19 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Require Autoconf-2.56. + +2002-09-30 Akim Demaille <akim@epita.fr> + + * prereq.m4: Use AC_REQUIRE everywhere it is possible. + (jm_PREREQ_CANON_HOST): Remove duplicates. + +2002-11-10 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(raise). + +2002-10-30 Paul Eggert <eggert@twinsun.com> + + * getgroups.m4 (jm_FUNC_GETGROUPS): + Fix typo: cv_func_getgroups_works -> ac_cv_func_getgroups_works. + +2002-10-07 Paul Eggert <eggert@twinsun.com> + + * prereq.m4 (jm_PREREQ_HUMAN): Check for locale.h, localeconv, + AC_HEADER_STDBOOL. No need to check for limits.h since it's in + freestanding C89. No need to check for stdlib.h or string.h since + autoconf does this now. + +2002-10-12 Paul Eggert <eggert@twionsun.com> + + * jm-macros.m4 (jm_CHECK_ALL_HEADERS): Remove fenv.h. + +2002-09-29 Jim Meyering <jim@meyering.net> + + * gettext.m4 (AM_INTL_SUBDIR): Don't require gt_HEADER_INTTYPES_H. + It's not necessary with autoconf-2.54. + +2002-09-28 Jim Meyering <jim@meyering.net> + + * getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS + and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB. + * jm-macros.m4 (jm_MACROS): Don't set GETGROUPS_LIB here; now it's + done via getgroups.m4's wrapper function. + + * strerror_r.m4: Remove file -- now it's part of autoconf-2.54. + Reported by Akim Demaille. + +2002-09-25 Jim Meyering <jim@meyering.net> + + * gettext.m4: Upgrade to gettext-0.11.5. + +2002-09-07 Bruno Haible <bruno@clisp.org> + + * host-os.m4 (UTILS_HOST_OS): Add a case for freebsd*-gnu*. + +2002-09-17 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Require gt_INTTYPES_PRI. + * inttypes-pri.m4 (gt_INTTYPES_PRI): New file, mostly from gettext. + +2002-09-16 Jim Meyering <jim@meyering.net> + + * prereq.m4: Forbid symbols matching ^jm_[A-Z]. + (jm_PREREQ_QUOTEARG): Add jm_FUNC_MEMCMP. + From Akim Demaille. + + * error.m4 (jm_PREREQ_ERROR): Check for libintl.h. + Reported by Akim Demaille. + +2002-09-13 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Require autoconf-2.54. + +2002-09-09 Jim Meyering <jim@meyering.net> + + * getloadavg.m4: Remove file -- now it's part of autoconf-2.53c. + * jm-macros.m4: Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new + AC_FUNC_GETLOADAVG where to find getloadavg.c. + +2002-09-03 Jim Meyering <jim@meyering.net> + + * gnu-source.m4: Remove file -- now it's part of autoconf-2.53c. + * mbstate_t.m4: Likewise. + * fnmatch.m4: Likewise. + +2002-08-05 Jim Meyering <jim@meyering.net> + + * jm-winsz1.m4: Also change use of $am_cv_sys_posix_termios + to $ac_cv_sys_posix_termios. Reported by Andreas Schwab. + +2002-08-03 Jim Meyering <jim@meyering.net> + + * jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not AM_SYS_POSIX_TERMIOS. + Reported by mkc@mathdogs.com. + +2002-08-01 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_TEMPNAME): lib/tempname.c may use uintmax_t, + so require jm_AC_TYPE_UINTMAX_T. Patch by Joe Orton. + +2002-07-28 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Don't require jm_FUNC_READDIR. + * readdir.m4 (jm_FUNC_READDIR): Remove file/macro. No longer needed. + +2002-07-27 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_READUTMP): Don't check just + `struct utmpx.ut_exit' and `struct utmp.ut_exit'. Instead, check + all combinations of utmp/utmpx and ut_termination/e_termination + and ut_exit/e_exit. + +2002-07-23 Jim Meyering <jim@meyering.net> + + * c-bs-a.m4 (AC_C_BACKSLASH_A): Remove file, now that autoconf + provides this macro. + +2002-07-20 Jim Meyering <jim@meyering.net> + + * intdiv0.m4: New file. From gettex-0.11.3. + + * jm-macros.m4: Require autoconf-2.53b. + Use new macros AC_FUNC_MALLOC and AC_FUNC_REALLOC, + in place of jm_-prefixed ones. Thanks, Akim! + * malloc.m4: Remove file, now that autoconf provides this macro. + * realloc.m4: Likewise. + +2002-07-18 gettextize <bug-gnu-gettext@gnu.org> + + * gettext.m4: Upgrade to gettext-0.11.3. + * iconv.m4: Upgrade to gettext-0.11.3. + * isc-posix.m4: Upgrade to gettext-0.11.3. + * lcmessage.m4: Upgrade to gettext-0.11.3. + * lib-link.m4: Upgrade to gettext-0.11.3. + +2002-07-17 Jim Meyering <jim@meyering.net> + + * boottime.m4: New file. Extracted from sh-utils' configure.ac + and extended to work also with *BSD systems. + +2002-07-15 Jim Meyering <jim@meyering.net> + + FreeBSD support for uname and uptime. + * jm-macros.m4 (jm_MACROS): Check for the sysctl function. + (jm_CHECK_ALL_HEADERS): Check for sys/sysctl.h. + Suggestion from Bruno Haible. + +2002-06-11 Paul Eggert <eggert@twinsun.com> + + * fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc. + +2002-06-22 Jim Meyering <jim@meyering.net> + + * c-stack.m4: New file, from diffutils-2.8.2. + * prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK. + + * jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE, + now that configure.ac uses AC_GNU_SOURCE. + (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU. + * prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH. + + Update to latest tools. Suggestions from Paul Eggert. + * stdbool.m4: New file, from diffutils-2.8.2. + * gnu-source.m4: Update from diffutils-2.8.2. + * fnmatch.m4: Likewise. + * prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h) + to AC_HEADER_STDBOOL + +2002-06-21 Jim Meyering <jim@meyering.net> + + * c-bs-a.m4: Add comment, from diffutils-2.8.2. + * mbrtowc.m4: Likewise. + + * mbstate_t.m4: Update from diffutils-2.8.2. + * mbswidth.m4: Reflect name change: + s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T. + * prereq.m4 (jm_PREREQ_QUOTEARG): Likewise. + + * lib-link.m4: Update from gettext-0.11.2. + * gettext.m4: Likewise. + + * jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h. + From Alfred M. Szmidt. + +2002-05-19 Paul Eggert <eggert@twinsun.com> + + * jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author. + +2002-06-07 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h. + They're needed at least for NetBSD 1.5.2. + ($statxfs_includes): Include those same headers. + ($statxfs_includes): Include sys/vfs.h if available. + ($statxfs_includes): Likewise for sys/statvfs.h. + Check for the following members in both structs statfs and statvfs: + f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen. + +2002-06-01 Jim Meyering <jim@meyering.net> + + * d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro: + s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/. + +2002-05-28 Jim Meyering <jim@meyering.net> + + * readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'. + Reported by Volker Borchert. + +2002-05-27 Jim Meyering <jim@meyering.net> + + * gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace + localtime. + + * readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to + use the replacement function; it wouldn't resolve at link time. + Reported by Volker Borchert. + +2002-04-30 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT. + +2002-04-29 Paul Eggert <eggert@twinsun.com> + + * prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h. + Do not check for alloca.h (no longer used) or stdbool.h (was never + used?). Add AM_C_PROTOTYPES since hard-locale.h uses it. + +2002-04-28 Paul Eggert <eggert@twinsun.com> + + * prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed. + +2002-04-29 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN. + * prereq.m4: Add jm_PREREQ_STRNLEN. + Use AC_FUNC_STRNLEN here instead. + + * jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]). + With autoconf-2.53a, it's part of AC_PROG_CC. + +2002-04-28 Paul Eggert <eggert@twinsun.com> + + * jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str). + * prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR. + +2002-04-24 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro. + (jm_PREREQ): Use it. + + * getloadavg.m4: Check for these headers: locale.h unistd.h + mach/mach.h fcntl.h. + Check for this function: setlocale. + +2002-04-16 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_READUTMP): Also check for these members: + ut_pid, ut_id, ut_exit. + +2002-04-12 Jim Meyering <jim@meyering.net> + + * ls-mntd-fs.m4 (checking for getmntinfo function...): Remove now-bogus + check for f_type in sys/mount.h. Instead, just test for the existence + of the getmntinfo function. Needed for Darwin 5.3. + + * dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro. + This is necessary at least on Darwin 5.3. + + * jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use + AC_FUNC_STRNLEN. Otherwise, we'd end up putting two copies of strnlen.o + in the library, and that makes some versions of ranlib object. + +2002-04-09 Jim Meyering <jim@meyering.net> + + * malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message + to be more precise. Rather than saying we're checking whether the + function `works', say what we're testing. + * realloc.m4 (jm_FUNC_REALLOC): Likewise. + Reported by Bruno Haible. + +2002-02-27 Paul Eggert <eggert@twinsun.com> + + * jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used. + Check for clock_settime. + +2002-02-25 Paul Eggert <eggert@twinsun.com> + + * acl.m4: New file. + * jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL. + Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now. + +2002-02-16 gettextize <bug-gnu-gettext@gnu.org> + + * codeset.m4: Upgrade to gettext-0.11. + * gettext.m4: Upgrade to gettext-0.11. + * glibc21.m4: Upgrade to gettext-0.11. + * iconv.m4: Upgrade to gettext-0.11. + * isc-posix.m4: Upgrade to gettext-0.11. + * lcmessage.m4: Upgrade to gettext-0.11. + * lib-ld.m4: New file, from gettext-0.11. + * lib-link.m4: New file, from gettext-0.11. + * lib-prefix.m4: New file, from gettext-0.11. + * progtest.m4: Upgrade to gettext-0.11. + +2002-02-15 Paul Eggert <eggert@twinsun.com> + + * prereq.m4 (jm_PREREQ_POSIXVER): New macro. + (jm_PREREQ): Use it. + +2002-01-26 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Require autoconf-2.52g. + * strnlen.m4: Remove file, now that it's part of autoconf. + +2002-01-22 Paul Eggert <eggert@twinsun.com> + + * jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO. + +2002-01-19 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN. + Remove useless quotes: DF_PROG="df". + * strnlen.m4: New file. + +2001-12-14 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Check for iswspace. + Suggestion from Bruno Haible. + +2001-11-20 Jim Meyering <jim@meyering.net> + + * mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that + SunOS 4.1.4 and Solaris 2.5.1 lose, too. + +2001-11-19 Jim Meyering <jim@meyering.net> + + * mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary + directory. Use "conftestXXXXXX" as the template. + Suggestion from Paul Eggert. + + * mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor immediately, + so the test doesn't mistakenly hit the max-open-files limit. + +2001-11-18 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv. + +2001-11-17 Jim Meyering <jim@meyering.net> + + * mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro. + Prompted by a report from Bob Proulx. + + * jm-macros.m4 (jm_MACROS): Don't test for mkstemp here. + Instead, require UTILS_FUNC_MKSTEMP. + +2001-11-11 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM. + Now, that's done as part of AC_FUNC_STRTOD. + +2001-10-22 Paul Eggert <eggert@twinsun.com> + + * jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define + WINSIZE_IN_PTEM if <termios.h> defines struct winsize. + +2001-11-10 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_PHYSMEM): New function. + (jm_PREREQ): Use it. + +2001-11-09 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Require autoconf-2.52f. + (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD): + Use these AC_-prefixed names, not the AM_-prefixed ones. + + * afs.m4 (jm_AFS): Quote the body. Patch by Akim Demaille. + +2001-11-04 Jim Meyering <jim@meyering.net> + + * fpending.m4: Remove unused cruft that saved, set, and restored $DEFS. + +2001-11-03 Jim Meyering <jim@meyering.net> + + * jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg + of AC_DEFUN. + + * dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to + know the name of the variable in the macro definition. + +2001-11-01 Jim Meyering <jim@meyering.net> + + * dirfd.m4 (UTILS_FUNC_DIRFD): New macro. + * jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD. + +2001-10-20 Paul Eggert <eggert@twinsun.com> + + * error.m4 (jm_PREREQ_ERROR): + Do not invoke AC_CHECK_FUNCS with strerror_r, as + AC_FUNC_STRERROR_R does that. + Check for strerror declaration. + + * strerror_r.m4: Add copyright notice, as nontrivial m4 files + are supposed to have them these days. + (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached. + Merge changes from latest Autoconf CVS. + Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p, + and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since + POSIX decided to standardize on the int flavor of strerror_r. + +2001-09-30 Jim Meyering <jim@meyering.net> + + * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if + `struct fsstat' has the `f_fstypename' member. + Use that to define FS_TYPE, which is now used to make + the getfsstat link test tighter. + +2001-09-29 Jim Meyering <jim@meyering.net> + + * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS) + [one-argument getmntent function]): Include stdio.h before mntent.h. + SunOS 4.1.x needs it for the declaration of `FILE'. + Patch by Volker Borchert. + + * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS) + Check for these headers: sys/param.h sys/ucred.h sys/mount.h + sys/fs_types.h, and make the link-test for getfsstat guard #include + directives with appropriate #if HAVE_*_H tests so that we can + detect getfsstat on Apple Darwin1.3.7 systems. + Reported by Nelson Beebe. + Fix harmless typo in cache variable name: s/getsstat/getfsstat/. + +2001-09-28 Paul Eggert <eggert@twinsun.com> + + Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which + #defines strtoimax. Also treat the other strto* functions + like strtoimax. + + * xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): + Check for strtoul and strtoumax, + as those declarations are made even in the signed case. + * xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): + Likewise, for strtol and strtoimax. + +2001-09-24 Jim Meyering <jim@meyering.net> + + * gettext.m4: Use the version from gettext-0.10.40, not CVS. + +2001-09-23 Jim Meyering <jim@meyering.net> + + * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test + instead of the mere test for existence of mntent.h. The latter + would get a false-positive on AIX 3.4 systems. + In the outer getmntent if-block, don't die if neither of the getmntent + tests succeeds. Instead, just fall through and continue with the + remaining tests. + +2001-09-22 Jim Meyering <jim@meyering.net> + + * gettext.m4: New file. From gettext. + * lcmessage.m4: Sync with gettext -- this changes only comments. + * progtest.m4: Likewise + * isc-posix.m4: Decrement serial number to sync with gettext. + * glibc21.m4: Likewise. + + * libintl.m4: Remove. No longer used. + +2001-09-20 Jim Meyering <jim@meyering.net> + + * xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of + strtoimax. + * xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of + strtoumax. + +2001-09-17 Jim Meyering <jim@meyering.net> + + * chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4, + * jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4, + * nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4, + * st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4, + * utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED, + whenever the right hand side need not be expanded by the shell. + +2001-09-16 Paul Eggert <eggert@twinsun.com> + + * fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C + library. It's not correct, as some older glibcs are buggy. + fnmatch wasn't fixed until glibc 2.2. + + Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no + special shell magic here. + +2001-09-16 Jim Meyering <jim@meyering.net> + + * mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro. + * jm-macros.m4: Require it. + +2001-09-15 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Check for help2man. + +2001-09-11 Jim Meyering <jim@meyering.net> + + * host-os.m4 (UTILS_HOST_OS): New file/macro. + The body, by Paul Eggert, was moved here from configure.in. + * jm-macros.m4: Require UTILS_HOST_OS. + +2001-09-04 Paul Eggert <eggert@twinsun.com> + + * prereq.m4 (jm_PREREQ_XREADLINK): New macro. + (jm_PREREQ): Use it. + +2001-09-03 Paul Eggert <eggert@twinsun.com> + + * prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and + sys/param.h, as pathmax.h includes them. + +2001-09-03 Paul Eggert <eggert@twinsun.com> + + * prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD. + (jm_PREREQ_XGETCWD): New macro. + + * getcwd.m4: New file. + +2001-09-01 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name. + Used by df. + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + Simplify code, partly by assuming autoconf 2.52 semantics. + + * Makefile.am (EXTRA_DIST): Remove uintmax_t.m4. + + * inttypes.m4 (AC_PREREQ): Bump to 2.52. + (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52. + All uses removed. + (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): + Move AC_REQUIRE to next-to-top level, to avoid confusion. + Use 2.52's AC_CHECK_TYPE instead of merely looking for the header. + * prereq.m4 (jm_PREREQ_HUMAN): Don't require jm_AC_HEADER_INTTYPES_H. + * jm-macros.m4 (jm_MACROS): Likewise. + + * uintmax_t.m4: Remove, as it duplicates inttypes.m4. + + * xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): + Quote first arg of AC_DEFUN. + Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG + since they are needed to parse the include file even if we need + only xstrtoimax. Simplify logic behind the args to AC_REPLACE. + * xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise, + but with opposite signedness. + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + * prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE. + (jm_PREREQ_EXCLUDE): New macro. + +2001-08-26 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX. + + * xstrtoimax.m4: New file. + * xstrtoumax.m4: Add comments explaining why we + AC_REPLACE_FUNCS(strtol). + +2001-06-20 Paul Eggert <eggert@twinsun.com> + + * inttypes.m4: Add AC_PREREQ(2.13). + (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too. + (jm_AC_TYPE_INTMAX_T): New macro. + (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4. + + * longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro. + + * longlong.m4: Renamed from ulonglong.m4. + * inttypes.m4: Renamed from inttypes_h.m4. + * uintmax_t.m4: Removed. + +2001-08-12 Jim Meyering <jim@meyering.net> + + * afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4, + d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4, + fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4, + group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4, + jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4, + link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4, + mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4, + prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4, + rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, + strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4, + utime.m4, utimes.m4, xstrtoumax.m4: + Quote the first argument in each use of AC_DEFUN. + +2001-08-05 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Require autoconf-2.52. + +2001-08-03 Paul Eggert <eggert@twinsun.com> + + The following changes are from gettext 0.10.39 as maintained by + Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ. + + * codeset.m4: Upgrade to serial AM1. + (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET; + all uses changed. Quote first arg of AC_DEFUN. + (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset. + + * iconv.m4: Upgrade to serial AM2. + (AM_ICONV): Renamed from jm_ICONV; all uses changed. + Add --with-libconv-prefix. + Quote first arg of AC_DEFUN. Add description for ICONV_CONST. + (am_cv_func_iconv): Renamed from jm_cv_func_iconv. + (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv. + (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv. + * jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings. + + * c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN. + * getline.m4 (AM_FUNC_GETLINE): Likewise. + * glibc21.m4 (jm_GLIBC21): Likewise. + * inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise. + * isc-posix.m4 (AC_ISC_POSIX): Likewise. + * lcmessage.m4 (AM_LC_MESSAGES): Likewise. + * progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise. + * uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise. + * ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise. + + * getline.m4 (AM_FUNC_GETLINE): Don't bother checking for + string.h any more. + + * progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no", + not the default value. + + 2001-06-25 Bruno Haible <haible@clisp.cons.org> + * mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES. + Also check for mbsinit. Needed for SCO 3.2v5.0.2. + Also include <string.h>; this is where AIX 3.2.5 declares wcwidth. + Also check for iswcntrl, used for wcwidth fallback. + Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability + to Autoconf 2.13. + +2001-08-03 Jim Meyering <jim@meyering.net> + + * mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include', + as it was in the original. Reported by Paul Eggert. + +2001-07-16 Jim Meyering <jim@meyering.net> + + * gettimeofday.m4: New file. + Prompted by a report from Bernhard Baehr. + +2001-07-15 Jim Meyering <jim@meyering.net> + + * Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h stuff. + Now it's in ../Makefile.cfg. + +2001-07-04 Jim Meyering <jim@meyering.net> + + * Makefile.am.in (glibc-io.struct): New target. Rework the code + that generates jm-glibc-io.m4 so that it doesn't trigger any make + distcheck failure. + +2001-07-02 Jim Meyering <jim@meyering.net> + + The following changes were prompted by suggestions from Bruno Haible. + + * jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4 + is now generated. + * Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted + definition of EXTRA_DIST. + (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to + ensure that the generated file is created/updated whenever the list + of $(unlocked_functions) is changed. + (jm-glibc-io.m4): New rule. + (unlocked-io.h): New rule -- currently unused. + +2001-06-24 Jim Meyering <jim@meyering.net> + + * regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an + unmatched right bracket, rather than kludging it with an extra, + falsely-matching quote in a comment. Patch by Akim Demaille. + +2001-05-27 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx. + Check for ut_type in struct utmp. + +2001-05-22 Jim Meyering <jim@meyering.net> + + * strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime), + now that we use the package-supplied version unconditionally. + (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason. + +2001-05-21 Jim Meyering <jim@meyering.net> + + * regex.m4: Change a couple backticks to single quotes to avoid shell + syntax errors. + +2001-05-19 Alexandre Duret-Lutz <duret_g@epita.fr> + + * dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__. + +2001-05-11 Paul Eggert <eggert@twinsun.com> + + * strftime.m4 (jm_FUNC_GNU_STRFTIME): + Don't bother to check library strftime, since + we'll be using our own my_strftime function anyway. + Define my_strftime instead of strftime. + +2001-05-15 Jim Meyering <jim@meyering.net> + + * regex.m4: Use proper quoting so brackets appear in the test program. + Reported by, and with help from, Bruno Haible. + +2001-05-13 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (major_t, minor_t): Define to unsigned int if undefined. + +2000-11-26 Paul Eggert <eggert@twinsun.com> + + * jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used. + +2001-04-21 Jim Meyering <jim@meyering.net> + + * rmdir-errno.m4: Write to a new file, so that a restrictive umask + doesn't interfere. + +2001-04-21 Alexandre Duret-Lutz <duret_g@epita.fr> + + * ftruncate.m4: Check for chsize. + Link with ftruncate.o unconditionally if ftruncate is missing. + This was required when cross-compiling to i586-mingw32msvc. + +2001-03-24 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Require autoconf-2.49d. + +2001-03-20 Bruno Haible <haible@clisp.cons.org> + + * iconv.m4 (jm_ICONV): Recommend GNU libiconv. + +2001-03-17 Jim Meyering <jim@meyering.net> + + * memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP, + now that the version in autoconf is equivalent. + (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP. + + * error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R. + Suggestion from Akim Demaille. + + * prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME. + (jm_PREREQ_TEMPNAME): New function. + +2001-02-25 Paul Eggert <eggert@twinsun.com> + + * jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system + lacks mkstemp. Compile our own tempname.c if we compile our own + mkstemp.c, as mkstemp relies on tempname. + +2001-03-01 Jim Meyering <jim@meyering.net> + + * dos.m4 (jm_AC_DOS): Remove extra backslashes, now that + AH_VERBATIM really does output its argument verbatim. + +2001-02-18 Paul Eggert <eggert@twinsun.com> + + * jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h. + +2001-02-17 Jim Meyering <jim@meyering.net> + + * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for + getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt + further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on + UnixWare 7.1.1. + + * mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc., + rather than AC_CACHE_VAL. + +2001-02-17 Paul Eggert <eggert@twinsun.com> + + * mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC. + * mbswidth.m4 (jm_PREREQ_MBSWIDTH): + Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc). + * prereq.m4 (jm_PREREQ_QUOTEARG): Likewise. + +2001-02-07 Jim Meyering <jim@meyering.net> + + * regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug. + +2001-02-05 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Require autoconf-2.14d (not yet released), because + it includes the patch required for `large file' support with at least + HP-UX's 10.20 /bin/cc. + +2001-02-03 Jim Meyering <jim@meyering.net> + + * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of + AS_IF, now that it works once again (mysteriously). + * fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise. + +2001-01-30 Jim Meyering <jim@meyering.net> + + Don't use filenames that are 8.3-equivalent to "conftest" on DOS. + * chown.m4: Rename conftestchown to conftest.chown. + * rename.m4: s/conftestdir/conftest.d1/ and s/conftestdir2/conftest.d2/. + * utimes.m4: s/conftestdata/conftest.data/ + Inspired by Pavel Roskin's change in autoconf. + +2001-01-27 Jim Meyering <jim@meyering.net> + + * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was + a use of AS_IF. + * fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise. + +2001-01-26 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that + quotearg.c includes it. + +2001-01-15 Bruno Haible <haible@clisp.cons.org> + + * iconv.m4 (jm_ICONV): Also check whether the iconv declaration + has const. + +2001-01-20 Jim Meyering <jim@meyering.net> + + Be sure that headers are checked before used in code compiled + for the type checks. + * jm-macros.m4 (jm_MACROS): Remove all header checks. + In place of that, invoke jm_CHECK_ALL_TYPES. + (jm_CHECK_ALL_HEADERS): New functions with the above checks. + (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS. + Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES; + The check for ssize_t was mistakenly run before the test for unistd.h. + + The configure-time check for stdbool.h was missing. + * prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH. + (jm_PREREQ_HASH): New function. + +2001-01-17 Jim Meyering <jim@meyering.net> + + * fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE, + for autoconf-2.49c. + * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise. + +2001-01-14 Jim Meyering <jim@meyering.net> + + * rename.m4: Use temporary directories named conftestdir{,2}, not + foo and bar. Create conftestdir/ in the script, not in the C code. + Remove directories in the script, not in the C code. + Remove conftestdir{,2} before trying to create the directory. + Make the entire configure script fail if the mkdir fails. + +2001-01-02 Volker Borchert <bt@teknon.de> + + * rename.m4: New file. + * jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME. + +2001-01-01 Alexandre Duret-Lutz <duret_g@epita.fr> + + * libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by + expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN, + so `make install' also works in VPATH builds. + +2001-01-01 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available), even + on systems with utmpx.h. It's necessary for the declaration of utmp's + ut_user member. Reported by Andreas Jaeger. + + * check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if available. + They are required for the declarations of getgrgid and getpwuid resp. + (_jm_DECL_HEADERS): Check for grp.h and pwd.h. + Reported by Andreas Jaeger. + +2000-12-25 Alexandre Duret-Lutz <duret_g@epita.fr> + + * libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR, + prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it + can be used in subdirectories. + +2000-12-26 Jim Meyering <jim@meyering.net> + + * dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work better + with autoheader. + +2000-12-17 Jim Meyering <jim@meyering.net> + + * dos.m4 (jm_AC_DOS): New file and macro. + * jm-macros.m4 (jm_MACROS): Require jm_AC_DOS. + +2000-12-06 Paul Eggert <eggert@twinsun.com> + + * off_t-format.m4: Remove this file. + * jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT. + +2000-12-06 Jim Meyering <jim@meyering.net> + + * xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the replacement + strtoull, we may well need the replacement strtoul, too. + Check for declarations of strtoul and strtoull. + Check for strtol. Mainly as a cue to cause automake to include + strtol.c -- that file is included by each of strtoul.c and strtoull.c. + Check for limits.h -- strtol.c needs it. + +2000-12-02 Jim Meyering <jim@meyering.net> + + * off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro. + * jm-macros.m4 (jm_MACROS): require it. + +2000-11-30 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Check for stdint.h. + +2000-11-30 Jim Meyering <jim@meyering.net> + + * getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf. + +2000-11-03 Bruno Haible <haible@clisp.cons.org> + + * jm-macros.m4 (jm_MACROS): Add test for wcrtomb. + +2000-11-04 Jim Meyering <jim@meyering.net> + + * regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'. + +2000-10-29 Jim Meyering <jim@meyering.net> + + * fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf renaming. + * ls-mntd-fs.m4: Likewise + +2000-10-28 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR. + (jm_PREREQ_MEMCHR): New function. + +2000-10-21 Jim Meyering <jim@meyering.net> + + * check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr. + * prereq.m4 (jm_PREREQ_DIRNAME): New macro. + * jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr. + +2000-09-18 Jim Meyering <jim@meyering.net> + + * getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of LIBS. + Otherwise, everyone ends up linking with -lelf for some configurations. + Reported by Mike Stone. + +2000-08-26 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Use jm_FUNC_FPENDING. + * fpending.m4: New file. + +2000-08-20 Jim Meyering <jim@meyering.net> + + * check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than + `#if !HAVE_UTMPX_H'. The latter would lose on systems with neither + utmp.h nor utmpx.h. Reported by Eli Zaretskii. + +2000-08-11 J. David Anglin <dave@hiauly1.hia.nrc.ca> + + Improve fileutils installation on systems where running + programs (like install) can't be unlinked. + * unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro. + * jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT. + +2000-08-06 Paul Eggert <eggert@twinsun.com> + + * mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int, + not char, for compatibility with glibc 2.1.3 strftime.c. + +2000-07-23 Paul Eggert <eggert@twinsun.com> + + * mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration. + +2000-07-23 Jim Meyering <jim@meyering.net> + + * check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these, too: + getgrgid, getpwuid, getuid. + +2000-07-16 Bruno Haible <haible@clisp.cons.org> + + * mbswidth.m4: New file. + * prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH. + +2000-07-14 Jim Meyering <jim@meyering.net> + + * xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require jm_AC_TYPE_UINTMAX_T. + +2000-07-10 Paul Eggert <eggert@twinsun.com> + + From a suggestion by Bruno Haible. + * mbstate_t.m4 (AC_MBSTATE_T): + Renamed from AC_MBSTATE_T_OBJECT. All uses changed. + Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT + and mbstate_t, to a single-part test that simply defines mbstate_t. + * prereq.m4 (jm_PREREQ_QUOTEARG): s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/. + +2000-07-10 Jim Meyering <jim@meyering.net> + + * strerror_r.m4: Mirror the correction made in autoconf. + + * gnu-source.m4: Output to confdefs.h directly. + Suggestion from Akim Demaille. + +2000-07-09 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required + to link seq. If so, set SEQ_LIBM to -lm. From Bruno Haible. + + * gnu-source.m4 (AC__GNU_SOURCE): New file/macro. + * jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it. + +2000-07-05 Bruno Haible <haible@clisp.cons.org> + + * strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer + to strerror_r. + Include <ctype.h> for use of isalpha. + +2000-07-05 Paul Eggert <eggert@twinsun.com> + and Bruno Haible <haible@clisp.cons.org> + + * mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t + only if the test for an object-type mbstate_t fails. This + prevents us from mistakenly reporting that mbstate_t is a + system object type after we "#define mbstate_t int" to work + around its lack. + +2000-07-04 Jim Meyering <jim@meyering.net> + + * fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead + of the deprecated AC_CHECKING. + +2000-07-03 Jim Meyering <jim@meyering.net> + + * check-decl.m4 (AC_CHECK_DECLS): Add strnlen. + +2000-07-03 Paul Eggert <eggert@twinsun.com> + + * mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13. + Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H. + +2000-07-02 Jim Meyering <jim@meyering.net> + + * mbstate_t.m4: Also define mbstate_t, if necessary. + + * chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with + AC_LIBOBJ(function_name). + * chown.m4: Likewise. + * fnmatch.m4: Likewise. + * ftruncate.m4: Likewise. + * getgroups.m4: Likewise. + * getline.m4: Likewise. + * group-member.m4: Likewise. + * jm-macros.m4: Likewise. + * lstat.m4: Likewise. + * malloc.m4: Likewise. + * memcmp.m4: Likewise. + * nanosleep.m4: Likewise. + * putenv.m4: Likewise. + * realloc.m4: Likewise. + * regex.m4: Likewise. + * stat.m4: Likewise. + * strftime.m4: Likewise. + +2000-07-01 Jim Meyering <jim@meyering.net> + + * ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated + problem. + +2000-06-17 Bruno Haible <haible@clisp.cons.org> + + * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific + macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV. + +2000-07-01 Jim Meyering <jim@meyering.net> + + * uptime.m4: Put double quotes around use of $cross_compiling. + +2000-06-28 Jim Meyering <jim@meyering.net> + + * mbstate_t.m4: Use stdlib.h, not stdio.h. The latter is not included + by quotearg.c, for which we perform this test. From Bruno Haible. + +2000-06-17 Bruno Haible <haible@clisp.cons.org> + + * check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well. + * prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or + <utmpx.h> exists, put readutmp.o into LIBOBJS. + +2000-06-25 Jim Meyering <jim@meyering.net> + + * mbstate_t.m4: Include stdio.h before wchar.h to work around + Linux header bug when _XOPEN_SOURCE is defined to 500. + +2000-06-24 Jim Meyering <jim@meyering.net> + + * strerror_r.m4: Revive this file -- to try out an experimental + version of AC_FUNC_STRERROR_R that may work even on BeOS, a system + for which strerror does return char*, but which lacks a conveniently + accessible declaration of the function. If the compile-test says + strerror_r doesn't work, then resort to a `run'-test that works on + BeOS and segfaults on DEC Unix. + +2000-06-19 Paul Eggert <eggert@twinsun.com> + + * mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT. + * prereq.m4 (jm_PREREQ_QUOTEARG): Use it. Add check for iswprint. + +2000-06-23 Jim Meyering <jim@meyering.net> + + * afs.m4: Add missing AC_MSG_RESULT. + Reported by Bruno Haible. + + * fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/. + Suggestion from Bruno Haible. + +2000-06-21 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass. + +2000-06-18 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir. + + * link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the + `checking whether...' message to be consistent with that of the + lstat test. + +2000-06-16 Bruno Haible <haible@clisp.cons.org> + + * glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C. + +2000-06-12 Jim Meyering <jim@meyering.net> + + * getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with AC_FUNC_GETLOADAVG + from autoconf, and tweak the latter to accept an optional argument. + * jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply + the optional argument, `lib'. + +2000-06-08 Jim Meyering <jim@meyering.net> + + * largefile.m4: Remove file (now that it's part of autoconf). + +2000-06-04 Paul Eggert <eggert@twinsun.com> + + Rewrite largefile configuration so that we don't need to run + getconf and don't need AC_CANONICAL_HOST. [I'm leaving the use of + AC_CANONICAL_HOST in configure.in -- jmm] + + * largefile.m4 (AC_SYS_LARGEFILE_FLAGS, + AC_SYS_LARGEFILE_SPACE_APPEND): Remove. + (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro. + (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from + CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY. + All uses changed. + Instead of inspecting the output of getconf, try to compile the + test program without and with the macro definition. + (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check + for getconf. Instead, check for the needed flags by compiling + test programs. + +2000-06-03 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS, + now that autoconf requires that. + + * jm-glibc-io.m4: Add a kludge to make autoheader emit the required + #undefs. E.g., #undef HAVE_DECL_FERROR_UNLOCKED. + Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that. + +2000-05-26 Bruno Haible <haible@clisp.cons.org> + + * glibc21.m4: New file. + * jm-macros.m4 (jm_MACROS): Call jm_GLIBC21. + +2000-05-28 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from + jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. + * stat.m4: Likewise. + * lstat.m4: Likewise. + * lstat-slash.m4: Remove file (absorbed into autoconf). + + * jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R. + * strerror_r.m4: Remove file (absorbed into autoconf). + +2000-05-26 Jim Meyering <jim@meyering.net> + + * uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'. + +2000-05-24 Jim Meyering <jim@meyering.net> + + * prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that + autoconf requires that. + * lib-check.m4: Likewise. + * jm-macros.m4: Likewise. + * strftime.m4: Likewise. + + * check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in AC_CHECK_DECLS, + now that autoconf requires that. + +2000-05-22 Jim Meyering <jim@meyering.net> + + * stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. + * lstat.m4: Likewise. + +2000-05-20 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_HUMAN): New macro. + (jm_PREREQ): Use it. + +2000-05-09 Jim Meyering <jim@meyering.net> + + * gettext.m4: Rename this... + * libintl.m4: ...to this. + +2000-05-06 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit. + (AC_REPLACE_FUNCS): Add strnlen. + + * rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file. + * jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY. + + * nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around + AC_SEARCH_LIBS call for nanosleep. + (LIB_NANOSLEEP): Set and AC_SUBST. + +2000-05-03 Paul Eggert <eggert@twinsun.com> + + * largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to + be 500, instead of _GNU_SOURCE to be 1, to work around glibc + 2.1.3 bug. This avoids a clash when files like regex.c define + _GNU_SOURCE. + +2000-05-05 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_MACROS): Save and restore LIBS around AC_SEARCH_LIBS + call for clock_gettime. + (LIB_CLOCK_GETTIME): Set and AC_SUBST. + + * search-libs.m4: Update from autoconf. + + su doesn't work on Solaris 2.6. + * lib-check.m4: When checking for struct spwd.sp_pwdp, also include + <shadow.h>. Reported by Dragos Harabor. + +2000-05-03 Jim Meyering <jim@meyering.net> + + * check-decl.m4 (AC_CHECK_DECLS): Add strndup. + +2000-05-02 Paul Eggert <eggert@twinsun.com> + + * largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if + this is needed to make ftello visible (e.g. glibc 2.1.3). Use + compile-time test, rather than inspecting host and OS, to + decide whether to define _LARGEFILE_SOURCE. + +2000-05-01 Jim Meyering <jim@meyering.net> + + * fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING. + + * ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support. + Based on a patch from Bruno Haible. + +2000-04-18 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro. + (jm_PREREQ): Use it. + +2000-04-17 Jim Meyering <jim@meyering.net> + + Get it right :-) + * jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the + actual #define via AH_VERBATIM. Don't need separate AC_DEFINE. + Suggestion from Akim Demaille. + +2000-04-14 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg form + of AC_DEFINE. Otherwise, the #ifndef in AH_VERBATIM gets clobbered. + +2000-04-13 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new AH_VERBATIM + to insert required #ifndef into config.h.in. + Suggestion from Akim Demaille. + +2000-04-12 Jim Meyering <jim@meyering.net> + + * getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not + `AC_CHECK_HEADER' to check for locale.h. Thanks to a report from + Christian Krackowizer. + + More code moved from ../configure.in into (jm_CHECK_ALL_TYPES). + * jm-macros.m4 (_GNU_SOURCE): Define. + (AC_SYS_LARGEFILE): Require. + (AM_C_PROTOTYPES): Require. + +2000-04-05 Paul Eggert <eggert@twinsun.com> + + * largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on + IRIX if the installer said otherwise. + +2000-04-05 Jim Meyering <jim@meyering.net> + + Portability tweaks required for ultrix4.3. + * check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>. + (jm_CHECK_DECLS): Add getutent to the list of functions. + (_jm_DECL_HEADERS): Add utmpx.h. + From John David Anglin. + + * strftime.m4: Back out the 2000-04-02 change. + Instead of that change, simply undefine putenv in the test program. + +2000-04-03 Jim Meyering <jim@meyering.net> + + * gettext.m4: Fix typo in comment. + + * codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from + textutils/configure.in). Suggestion from Paul Eggert. + (AC_CHECK_FUNCS): Add nl_langinfo. (also from textutils/configure.in) + +2000-04-02 Paul Eggert <eggert@twinsun.com> + + * strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment + variable in the shell rather than using putenv, which isn't + portable. This avoids the configure-time inter-test dependency + on the potentially-renamed putenv function. + +2000-03-30 Paul Eggert <eggert@twinsun.com> + + * jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h> + before checking struct stat.st_blksize, so that + HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly. + +2000-03-29 Paul Eggert <eggert@twinsun.com> + + * strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime, + since strftime.c uses HAVE_STRFTIME to decide whether to use + the underlying strftime. + +2000-03-10 Jim Meyering <jim@meyering.net> + + * lib-check.m4: Look for getspnam in -lgen, too. + From Marco Franzen. + +2000-02-02 Bruno Haible <haible@clisp.cons.org> + + * codeset.m4: New file. + * iconv.m4: New file. + * jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV. + +2000-03-04 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE, + for lib/localcharset.c. + +2000-03-03 Jim Meyering <jim@meyering.net> + + * regex.m4: Make sure re_compile_pattern accepts patterns like `{1'. + +2000-03-02 Jim Meyering <jim@meyering.net> + + * timespec.m4: Require AC_HEADER_TIME before the cache check so + the messages come out on separate lines. + + * jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS, + rather than jm_CHECK_DECLARATIONS. + * decl.m4: Remove now-unused file. + + * check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and geteuid. + +2000-02-27 Jim Meyering <jim@meyering.net> + + * check-decl.m4: Add getenv to the list. + +2000-02-23 Jim Meyering <jim@meyering.net> + + * check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it + in place of my hack. + +2000-02-10 Jim Meyering <jim@meyering.net> + + * nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from + gnu_nanosleep to rpl_nanosleep. + +2000-02-09 Jim Meyering <jim@meyering.net> + + * lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in + struct spwd, rather than in struct passwd. Reported by Gaël Quéri. + +2000-02-08 Akim Demaille <akim@epita.fr> + + * largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with + `[' and `]' and remove uses of `changequote'. + (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise. + (AC_SYS_LARGEFILE): Likewise. + * gettext.m4 (AM_GNU_GETTEXT): Likewise. + * strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use + of changequote. + * regex.m4 (jm_INCLUDED_REGEX): Likewise. + * readdir.m4 (jm_FUNC_READDIR): Likewise + * memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main. + * getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise. + +2000-02-05 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros. + Remove explicit use of AC_HEADER_TIME. It is required by + jm_CHECK_TYPE_STRUCT_TIMESPEC. Using AC_HEADER_TIME and + `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but + in autoconf whereby the expansion of the latter ended up preceding + the expansion of its prerequisite, AC_HEADER_TIME. + Reported by Volker Borchert. + +2000-02-03 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname. + +2000-02-02 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no + definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/. + Reported by Eli Zaretskii. + +2000-01-31 Jim Meyering <jim@meyering.net> + + * check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of + functions. Add the time.h and sys/time.h headers along with the + AC_REQUIRE'ment of AC_HEADER_TIME. + +2000-01-30 Jim Meyering <jim@meyering.net> + + * lib-check.m4: Clean up some kludgy old shadow password tests. + + * prereq.m4 (utmp_includes): Define. + Check for ut_user and ut_name members in both struct utmpx + and struct utmp. + +2000-01-29 Jim Meyering <jim@meyering.net> + + * lib-check.m4: New file containing library-related checks from + fileutils and sh-utils (textutils had none). + +2000-01-28 Jim Meyering <jim@meyering.net> + + * perl.m4: Change format of warning message to look more like that + from the missing script. Suggestion from François Pinard. + +2000-01-25 Jim Meyering <jim@meyering.net> + + * timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as well + as time.h in the compile check. + * nanosleep.m4: Require AC_HEADER_TIME rather than simply using it. + Fix typo in cross-compiling case: s/yes/no/. + +2000-01-23 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Move df-related tests here from fileutils/configure.in + + * ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/ + (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters. + + * fsusage.m4: New file. Extracted from fileutils/configure.in. + s/space/ac_fsusage_space/. + (jm_FILE_SYSTEM_USAGE): Take two parameters. + + * ftruncate.m4: New file (derived from part of fileutils/configure.in). + * jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it. + (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT. + + * jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN): + AC_SUBST these here, rather than just in sh-util/configure.in, so + that the now-shared-by-fileutils-and-textutils lib/Makefile.am are + all the same. + (AM_FUNC_OBSTACK): Add (from fileutils/configure.in). + (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils. + (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in). + (AC_SUBST(POW_LIBM)): Likewise. + (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in. + +2000-01-22 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST. + + * prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h. + + * jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils' + configure.in + (AC_CHECK_HEADERS): Likewise for sh-utils. + (AC_CHECK_HEADERS): Likewise for textutils. + Merge the three lists of headers. + + * prereq.m4 (jm_PREREQ_ADDEXT): New macro. Parts moved here + from fileutils' configure.in. + + * decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)' code. + Moved tests into their own function (_jm_DECL_HEADERS) in check-decl.m4. + + * check-decl.m4: Use #if rather than #ifdef. + Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL. + (jm_CHECK_DECLARATIONS): Add strtoul strtoull. + (_jm_DECL_HEADERS): Define new function. + (jm_CHECK_DECLARATIONS): Require it. + +2000-01-19 Jim Meyering <jim@meyering.net> + + * nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too. + Use AC_HEADER_TIME. Volker Borchert reported that OpenBSD-2.3/sparc + defines `struct timespec' in <sys/time.h> + + * c-bs-a.m4: Remove uses of changequote altogether. + Thanks to Akim for explaining. + +2000-01-16 Jim Meyering <jim@meyering.net> + + * jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV, + AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME, + jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA, + AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME. + +2000-01-16 Jim Meyering <jim@meyering.net> + + * c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )' + because the latter didn't work. + +2000-01-15 Jim Meyering <jim@meyering.net> + + * jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell. + (AC_REPLACE_FUNCS): Add memcpy and memset. + Add these, too: stime strcspn stpcpy strstr strtol strtoul. + Add strpbrk. + Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp. + +2000-01-12 Jim Meyering <jim@meyering.net> + + * prereq.m4 (jm_PREREQ_CANON_HOST): New macro. + (jm_PREREQ): Use it. + (jm_PREREQ_READUTMP): New macro. + (jm_PREREQ): Use it. + +2000-01-11 Paul Eggert <eggert@twinsun.com> + + Quote multibyte characters correctly. + * c-bs-a.m4: New file. + * prereq.m4 (jm_PREREQ_QUOTEARG): New macro. + (jm_PREREQ): Use it. + +2000-01-11 Paul Eggert <eggert@twinsun.com> + + * uintmax_t.m4: Port to autoconf 2.13. + +2000-01-08 Jim Meyering <meyering@ascend.com> + + * strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro. + * jm-macros.m4 (jm_FUNC_STRERROR_R): Require it. + +2000-01-04 Jim Meyering <meyering@ascend.com> + + * d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from + jm_STRUCT_DIRENT_D_TYPE. + * d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from + jm_STRUCT_DIRENT_D_INO. + * utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from + jm_STRUCT_UTIMBUF. + * jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/ renamings. + * utime.m4: Likewise. + + * timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro. + * jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it. + +2000-01-03 Paul Eggert <eggert@twinsun.com> + + * nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt + (for Solaris 7) and in -lposix4 (for Solaris 2.5.1). + +2000-01-02 Jim Meyering <meyering@ascend.com> + + * search-libs.m4: Escape `$' in $3 of dnl comment. I no longer + remember if this is necessary. + +1999-12-26 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4: Use it here. + * nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro. + +1999-12-23 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4: Check for clock_gettime (moved from + fileutils/configure.in) + Check for gettimeofday. + +1999-12-20 Jim Meyering <meyering@ascend.com> + + * strftime.m4: Remove kludge, now that I'm using the fixed + autoconf-2.14a-1999-12-20. + +1999-12-19 Jim Meyering <meyering@ascend.com> + + * lstat-slash.m4: New file. + * jm-macros.m4: Use the new macro: + jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. + +1999-12-07 Jim Meyering <meyering@ascend.com> + + * perl.m4: Require that File::Compare be available, too. + Too many systems seem to lack it. + + * strftime.m4: Add checks for most of the cpp macros tested in + GNU's strftime.c. Prompted by a patch from Paul Eggert. + +1999-11-18 Paul Eggert <eggert@twinsun.com> + + * largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a + problem with the QNX 4.25 shell, which doesn't propagate exit + status of failed commands inside shell assignments. + +1999-11-17 Jim Meyering <meyering@ascend.com> + + * gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES. + +1999-11-07 Jim Meyering <meyering@ascend.com> + + * getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE. + +1999-11-06 Jim Meyering <meyering@ascend.com> + + * link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro. + * jm-macros.m4 (jm_MACROS): Use it here. + +1999-11-05 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from configure.in + of textutils, fileutils, and sh-utils into this one (shared between + those packages) file. + Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated + AC_STRUCT_ST_BLKSIZE. + +1999-11-03 Jim Meyering <meyering@ascend.com> + + * ssize_t.m4: Remove file. No longer needed since the new version of + AC_CHECK_TYPE checks includes unistd.h. + * jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'. + Suggestion from Akim Demaille. + +1999-10-30 Jim Meyering <meyering@ascend.com> + + * uintmax_t.m4: Require 2.14a. Remove backslash before backtick in + m4-quoted string. + * ls-mntd-fs.m4: Likewise. + * jm-macros.m4: Likewise. Also, use AC_TYPE_SSIZE_T instead + * jm-winsz1.m4: Likewise. + + * const.m4: Remove file, since the fix made it into the experimental + version of autoconf. + * mktime.m4: Likewise. + + * check-type.m4: Remove file, now that the latest version of + AC_CHECK_TYPE takes a third arg to specify additional #includes. + + * ssize_t.m4: New file, requires experimental version of autoconf. + * jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked + AC_CHECK_TYPE. + +1999-10-04 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4: Don't require autoconf-2.14.1. + +1999-09-22 Paul Eggert <eggert@twinsun.com> + + * largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC + 2.95.1 bug with HP-UX 10.20. + +1999-09-17 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup. + Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3 + due to missing strdup (against sh-utils-2.0). + +1999-08-29 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4: Require jm_BISON. + * bison.m4: New file. + +1999-08-17 Paul Eggert <eggert@twinsun.com> + + * largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma + in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20. + +1999-08-05 Jim Meyering <meyering@ascend.com> + + * getline.m4: Rename test file from conftestdata to conftest.data + to avoid conflicts with `conftest' on 8+3 filesystems. + Suggestion from Eli Zaretskii. + +1999-08-04 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4: Move a 4-line block of code from the configure.in of + fileutils and sh-utils (textutils's getline test was inadequate). + (AM_FUNC_GETLINE): Run this test. + (AC_CHECK_FUNCS): Check for getdelim. + Reported by Bob Proulx. + +1999-08-02 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4: Add a comment. + +1999-08-01 Jim Meyering <meyering@ascend.com> + + * mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from m4. + +1999-08-01 Paul Eggert <eggert@twinsun.com> + + * lfs.m4: Remove this file. + * largefile.m4: New file. It contains the old contents of + lfs.m4, except that all names with prefix AC_LFS have been + changed to use the prefix AC_SYS_LARGEFILE instead, to be + compatible with future autoconf versions. Also, some minor m4 + quoting problems have been fixed. + +1999-07-16 Paul Eggert <eggert@twinsun.com> + + * ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure + that we can shift, multiply and divide unsigned long long + values; Ultrix cc can't do it. + +1999-07-14 Paul Eggert <eggert@twinsun.com> + + * xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether + <inttypes.h> defines strtoumax as a macro (and not as a + function). + +1999-07-05 Paul Eggert <eggert@twinsun.com> + + * gettext.m4 (AM_WITH_NLS): Remove unnecessary lines. + Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl. + (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting, + and simplify the shell code. + +1999-07-03 Paul Eggert <eggert@twinsun.com> + + * mktime.m4: New file, which is a preview of what should appear + in the next public autoconf release. + +1999-07-20 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove. + +1999-07-15 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize. + +1999-05-22 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr. + +1999-05-20 Jim Meyering <meyering@ascend.com> + + * search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine. + Add a colon after each `then' in case $4 is empty. + +1999-05-16 Jim Meyering <meyering@ascend.com> + + * search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS. + +1999-05-10 Jim Meyering <meyering@ascend.com> + + * jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME. + + * jm-macros.m4: Require 2.14.1, since we use newly-renamed + AC_FUNC_MKTIME. + +1999-05-10 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + + * jm-mktime.m4, putenv.m4: Fix typos in config.h comments. + +1999-05-04 Paul Eggert <eggert@twinsun.com> + + * lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS, + not CPPFLAGS, so that linking works correctly in IRIX. + +1999-04-30 Paul Eggert <eggert@twinsun.com> + + * jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2. + +1999-04-20 Jim Meyering <meyering@ascend.com> + + * xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG. + AC_REPLACE xstroull if necessary. From Paul Eggert. + (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq. + +1999-04-20 Paul Eggert <eggert@twinsun.com> + + * uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long + long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro. + * jm-macros.m4 (jm_CHECK_ALL_TYPES): Require + jm_AC_TYPE_UNSIGNED_LONG_LONG. + * ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro. + + * lfs.m4: Port to AIX and HP-UX. Support cross-compilation. + +1999-04-18 Jim Meyering <meyering@ascend.com> + + * xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro. + * jm-macros.m4: Use it. + +1999-04-06 Jim Meyering <meyering@ascend.com> + + * strftime.m4: Remove test for %f. + +1999-03-29 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the + superset of the AC_TYPE_* checks in the textutils, fileutils, + and sh-utils, plus AC_TYPE_PID_T. Paul Eggert suggested adding + AC_TYPE_PID_T. + +1999-03-28 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4: Define GNU_PACKAGE here. + Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is + replaced e.g., in the *.sh files of the sh-utils. + +1999-03-20 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/. + * regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX. + Don't depend on AM_GLIBC. Suggestions from Alain Magloire. + +1999-03-19 Jim Meyering <meyering@ascend.com> + + * jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro. + +1999-03-12 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED. + +1999-03-07 Jim Meyering <meyering@ascend.com> + + * jm-glibc-io.m4: Use only those *_unlocked macros that are declared. + +1999-02-17 Jim Meyering <meyering@ascend.com> + + * gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of brackets + in macro definition. From Eli Zaretskii and Alain Magloire. + +1999-02-07 Jim Meyering <meyering@ascend.com> + + * group-member.m4: New file -- extracted from sh-utils' configure.in. + + 1999-02-05 Eli Zaretskii <eliz@is.elta.co.il> + * gettext.m4: Support DOS-style d:/foo/bar absolute file names. + +1999-02-06 Jim Meyering <meyering@ascend.com> + + * chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS. + * fnmatch.m4: Likewise. + * getgroups.m4: Likewise. + * lstat.m4: Likewise. + * malloc.m4: Likewise. + * putenv.m4: Likewise. + * realloc.m4: Likewise. + * regex.m4: Likewise. + * stat.m4: Likewise. + * strftime.m4: Likewise. + Suggestion from Alain Magloire. + + * chown.m4: Use `.$ac_objext', not `.o'. + * fnmatch.m4: Likewise. + * getgroups.m4: Likewise. + * getline.m4: Likewise. + * lstat.m4: Likewise. + * malloc.m4: Likewise. + * memcmp.m4: Likewise. + * putenv.m4: Likewise. + * realloc.m4: Likewise. + * regex.m4: Likewise. + * stat.m4: Likewise. + * strftime.m4: Likewise. + Suggestion from Alain Magloire. + + * jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires + an argument. + + * regex.m4: Add a run-time Test for proper operation of + re_compile_pattern. + +1999-01-31 Jim Meyering <meyering@ascend.com> + + * getloadavg.m4: Check for locale.h and the function, setlocale. + +1999-01-30 Jim Meyering <meyering@ascend.com> + + * check-type.m4: Use 3-arg form of AC_DEFINE. + + * jm-mktime.m4: Make this a wrapper around the official AM_FUNC_MKTIME + rather than my private copy, now that the official one is up to date. + * mktime.m4: Remove file. + + * getloadavg.m4: Use 3-arg form of AC_DEFINE. + * uptime.m4: Likewise. + * uintmax_t.m4: Likewise. + +1999-01-28 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4: Use jm_AFS. + * afs.m4: New file (from fileutils' configure.in). + + * assert.m4: Use the 3-argument forms of AC_DEFINE* macros. + * chown.m4: Likewise. + * d-ino.m4: Likewise. + * d-type.m4: Likewise. + * fnmatch.m4: Likewise. + * getgroups.m4: Likewise. + * gettext.m4: Likewise. + * jm-mktime.m4: Likewise. + * jm-winsz2.m4: Likewise. + * lcmessage.m4: Likewise. + * ls-mntd-fs.m4: Likewise. + * malloc.m4: Likewise. + * memcmp.m4: Likewise. + * putenv.m4: Likewise. + * realloc.m4: Likewise. + * st_mtim.m4: Likewise. + * strftime.m4: Likewise. + +1999-01-16 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4 (ARGMATCH_DIE): Define. + (ARGMATCH_DIE_DECL): Define. + +1999-01-12 Jim Meyering <meyering@ascend.com> + + * Makefile.am.in: Rewrite to avoid using fmt. + Reported by Lars Hecking. + +1999-01-10 Jim Meyering <meyering@ascend.com> + + * fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my + gross kludge. + * inttypes_h.m4: Likewise. + * lstat.m4: Likewise. + * malloc.m4: Likewise. + * readdir.m4: Likewise. + * realloc.m4: Likewise. + * st_dm_mode.m4: Likewise. + * stat.m4: Likewise. + * utimbuf.m4: Likewise. + * utimes.m4: Likewise. + + * check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the + AC_CHECK_FUNCS hack. Now, it's still a hack, but at least the + comments in config.h.in are meaningful. + + * jm-macros.m4: Require autoconf-2.13 here. + + * regex.m4: By default, don't use the included regex.c on systems + with glibc 2. Suggestion from Uli Drepper. + +1999-01-02 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4: Replace strcasecmp and strncasecmp. + +1998-12-18 Jim Meyering <meyering@ascend.com> + + * Makefile.am.in (Makefile.am): Simplify rule. + Based on a suggestion from Lars Hecking. + +1998-11-16 Jim Meyering <meyering@ascend.com> + + * lfs.m4: Double-quote the `uname...` expression. + +1998-11-16 Paul Eggert <eggert@twinsun.com> + + * lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11. + +1998-11-14 Jim Meyering <meyering@ascend.com> + + * lstat.m4: Correct comment. POSIX does not permit it to succeed. + * stat.m4: Likewise. + +1998-11-03 Jim Meyering <meyering@ascend.com> + + * stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG. + * lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG. + +1998-10-18 Jim Meyering <meyering@ascend.com> + + * check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro. + +1998-10-17 Jim Meyering <meyering@ascend.com> + + * decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to + include, though we still hard-code the `require'-like AC_CHECK_HEADERS + calls for those previously hard-coded headers. Instead, take a new + parameter. + (jm_CHECK_DECLARATIONS): Reflect interface change. + * check-decl.m4 (jm_CHECK_DECLS): Likewise. + (jm_CHECK_DECL_LOCALTIME_R): New macro. + + * mktime.m4: Test for spring-forward gap before long-running test. + +1998-10-14 Jim Meyering <meyering@ascend.com> + + * mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver". From Paul Eggert. + +1998-10-11 Jim Meyering <meyering@ascend.com> + + * mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro. + This adds a test for a recently added compatibility fix for mktime.c. + * jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME. + +1998-09-27 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH. + + * fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro. Extracted from + ../configure.in, including a change from Gordon Matzigkeit to allow + cross-compiling for the Hurd. + + * glibc.m4: New file/macro to test for the GNU C Library + versions 1 and 2. From Gordon Matzigkeit. + Indent. + +1998-09-21 Jim Meyering <meyering@ascend.com> + + * chown.m4: Declare locals: before, after. From Andries Brouwer. + +1998-08-18 Paul Eggert <eggert@twinsun.com> + + Port nanosecond-resolution times to UnixWare 2.1.2 and + pedantic Solaris 2.6. + + * st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from + AC_STRUCT_ST_MTIM. + * st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): + Generate name of ns member, instead of just 1 or undef. + Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode. + +1998-08-15 Jim Meyering <meyering@ascend.com> + + * ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file. + * check-type.m4: New file. Replacement for AC_CHECK_TYPE. + * jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int) + instead of jm_TYPE_SSIZE_T. + +1998-08-12 Jim Meyering <meyering@ascend.com> + + * st_dm_mode.m4: New file. From Johan Danielsson. + +1998-08-02 Jim Meyering <meyering@ascend.com> + + * st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM + in acconfig.h manually. + +1998-07-31 Paul Eggert <eggert@twinsun.com> + + * st_mtim.m4: New file. + +1998-07-28 Jim Meyering <meyering@ascend.com> + + * utimes.m4: Undef stat. + +1998-07-25 Jim Meyering <meyering@ascend.com> + + * utime.m4 (jm_FUNC_UTIME): New file and macro. + * utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro. + +1998-07-09 Manfred Hollstein <manfred@s-direktnet.de> + + * chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the + uid and gid actually remain unchanged. + +1998-07-07 Jim Meyering <meyering@ascend.com> + + * jm-glibc-io.m4: Remove fclose_unlocked. + +1998-07-04 Jim Meyering <meyering@ascend.com> + + * regex.m4: Use syscmd, ifelse, and sysval. Mainly as an exercise + to prove that this macro can be used in packages without regex.c. + +1998-07-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h> + is to be used. + +1998-07-03 Jim Meyering <meyering@ascend.com> + + * gettext.m4: Add -lintl if it's found to be necessary. + + * gettext.m4: New file -- from gettext-0.10.35. + * lcmessage.m4: Likewise. + * progtest.m4: Likewise. + + * regex.m4 (jm_WITH_REGEX): New file and macro. + * jm-macros.m4: Require the new macro. + +1998-06-29 Jim Meyering <meyering@ascend.com> + + * fstypename.m4: Include sys/param.h. NetBSD 1.3.1 requires this + for the definition of NGROUPS (used in a system header included + by sys/mount.h). + +1998-06-28 Jim Meyering <meyering@ascend.com> + + * ls-mntd-fs.m4: New file. + * fstypename.m4: New file. + + * jm-macros.m4: Require the new macro. + * jm-glibc-io.m4: New file. + +1998-05-19 Jim Meyering <meyering@ascend.com> + + * jm-macros.m4: Add jm_FUNC_LCHOWN. + * lchown.m4: New file. + + * Makefile.am.in: New file. + * Makefile.am (Makefile.am): Depend on Makefile.am.in. + +1998-05-14 Jim Meyering <meyering@ascend.com> + + * Makefile.am (EXTRA_DIST): Add them. + * jm-macros.m4: New file. + * utimbuf.m4: New file. + +1998-05-12 Jim Meyering <meyering@ascend.com> + + * Makefile.am (EXTRA_DIST): Add isc-posix.m4. + +1998-05-11 Jim Meyering <meyering@ascend.com> + + * isc-posix.m4: New file. + +1998-05-10 Jim Meyering <meyering@ascend.com> + + * jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date. + +1998-05-09 Jim Meyering <meyering@ascend.com> + + * Makefile.am (EXTRA_DIST): Add ssize_t.m4. + (EXTRA_DIST): Remove mktime.m4, now that the new version is included + with automake. + + * ssize_t.m4: New file. + * mktime.m4: Remove file -- the new automake has this now. + +1998-04-26 Jim Meyering <meyering@ascend.com> + + * assert.m4: New file. + * Makefile.am (EXTRA_DIST): Add assert.m4. + +1998-04-05 Jim Meyering <meyering@ascend.com> + + * prereq.m4 (jm_PREREQ_REGEX): New macro. + (jm_PREREQ): Use it here. + +1998-03-23 Jim Meyering <meyering@eng.ascend.com> + + * inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H + in acconfig.h. + +1998-03-15 Jim Meyering <meyering@eng.ascend.com> + + * prereq.m4: New file. + * error.m4: New file. + * Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4. + +1998-02-07 Jim Meyering <meyering@eng.ascend.com> + + * getline.m4: Don't set am_cv_func_working_getline before the + cache-check for the same variable -- that defeated the purpose of + the test; the test program was never run. This was a problem only + on systems with losing getline functions -- HP-UX 10.20 is one. + Reported by Bjorn Helgaas. + +1998-02-06 Jim Meyering <meyering@eng.ascend.com> + + * Makefile.am (EXTRA_DIST): Add perl.m4. + +1998-01-10 Jim Meyering <meyering@na-net.ornl.gov> + + * Makefile.am (EXTRA_DIST): Add const.m4. + + * const.m4: New file. Use an initializer in this declaration + typedef int charset[2]; const charset x; + Reported by Bob Glickstein. + +1997-12-21 Jim Meyering <meyering@na-net.ornl.gov> + + * chown.m4: Fix reversed types on -1 args to chown. + From Kaveh Ghazi. + +1997-12-14 Jim Meyering <meyering@na-net.ornl.gov> + + * check-decl.m4: s/DECLARATION_/DECL_/g. + Add lseek and memchr. + + * decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g. + T.E.Dickey <dickey@clark.net> said that some older preprocessors + have a 20-character limit on names. + +1997-11-30 Jim Meyering <meyering@na-net.ornl.gov> + + * inttypes_h.m4: New file. + * uintmax_t.m4: New file. + * Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4. diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/fileutils/ChangeLog b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/fileutils/ChangeLog new file mode 100644 index 0000000..5f12d1c --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/fileutils/ChangeLog @@ -0,0 +1,8382 @@ +2002-07-28 Jim Meyering <meyering@lucent.com> + + * Version 4.1.12. + + * configure.ac: Require automake-1.6b. + + * TODO: Remove entry that mentions rm's HAVE_WORKING_READDIR. + Since remove.c was rewritten, rm is no longer susceptible to that. + +2002-07-26 Jim Meyering <meyering@lucent.com> + + * src/stat.c: Don't include malloc.h -- it was unnecessary. + +2002-07-22 Jim Meyering <meyering@lucent.com> + + * Version 4.1.11. + + * src/stat.c (usage): The short form of --dereference is now -L, not -l. + Reported by Kalle Olavi Niemitalo. + + * src/rm.c: Add new option, --presume-input-tty, for testing only. + Not documented. + + This test might remove a file owned by the person running `make check'. + * tests/rm/fail-eperm: Hoist definition of $target_file, and use + that (not $f) in test for owner/dir/symlink. Patch by Michael Stone. + + * tests/rm/fail-eperm: Handle the case in which rm produces no output. + + rm would prompt for a symlink to an unwritable file + * src/remove.c (prompt): When not interactive, don't prompt + for a symlink. Reported by Dave Beckett. Patch by Michael Stone. + * tests/rm/dangling-symlink: Add a test for the above-fixed bug. + +2002-07-20 Jim Meyering <meyering@lucent.com> + + * src/copy.c (copy_internal): Use file_name_lookup, not getdport. + Patch by Alfred M. Szmidt. + + * Makefile.maint (news-r1, news-r2): Define. Better regexp. + (announcement): Use them here. Also makes the line length < 80. + + * Upgrade to cvs automake -- required to work with 2.53b. + * configure.ac: Require automake-1.6a. + + * Version 4.1.10. + + * Upgrade to gettext-0.11.3. + * Upgrade to autoconf-2.53b. + +2002-07-19 Jim Meyering <meyering@lucent.com> + + * src/dircolors.hin: Add .wav. + + * tests/rm/fail-eperm: Don't expect `ARGV_0=$0 exec ...' to work. + It doesn't work with /bin/sh of Solaris5.6. + Use an explicit `export ARGV_0' instead. + [comparing actual and expected output]: Don't match the entire line, + but rather just the `rm: cannot remove `$dir/$f':' part. + + * tests/rm/dangling-symlink: Use input-tty rather than + testing for /dev/stdin. + + * tests/Makefile.am (EXTRA_DIST): Add input-tty. + * tests/input-tty: New file. + +2002-07-18 Jim Meyering <meyering@lucent.com> + + * src/dircolors.hin: Add the following to the list of colorizable + TERM names: dtterm xterm-color Eterm. + New archive suffix: .jar + New image suffixes: .jpeg .pbm .pgm .tiff .mpeg .xcf .xwd + Audio suffixes: .ogg .mp3 + From Michael Stone. + +2002-07-16 Jim Meyering <meyering@lucent.com> + + * src/stat.c (print_it): Use memcpy and a little pointer arithmetic, + rather than stpncpy. + +2002-07-14 Jim Meyering <meyering@lucent.com> + + Under some circumstances, rm would fail due to a lack of + permissions, but give a misleading diagnostic like this: + rm: cannot chdir from `.' to `foo': Not a directory + * src/remove.c (remove_dir): Detect the case in which unlinking a + non-directory fails with EPERM, and give an appropriate diagnostic. + Reported by Michael Stone. + +2002-07-13 Jim Meyering <meyering@lucent.com> + + * tests/rm/fail-eperm: New file/test, for the above. + * tests/rm/Makefile.am (TESTS): Add fail-eperm. + + * src/stat.c (print_it): Use xstrdup, not strdup. + Use strspn to avoid an explicit loop. + Use fputc rather than printf "\n". + + * src/stat.c: Include quote.h. + (print_stat): Use xreadlink, rather than using readlink directly. + Use the quote function rather than hard-coded double quotes. + Use error, not perror. + +2002-07-09 Martin Michlmayr <tbm@cyrius.com> + + * src/df.c (show_dev): Make the `Use%' column align with + its heading, even when -P is used with -h or -H. + +2002-07-10 Jim Meyering <meyering@lucent.com> + + * man/du.x: Add a description of --exclude=PATTERN. + * src/du.c (usage) [--exclude]: Use PATTERN rather than PAT. + From Martin Michlmayr. + +2002-07-09 Jim Meyering <meyering@lucent.com> + + I added stat.x, but didn't update the definition of dist_man_MANS. + * man/Makefile.am (dist_man_MANS): Add stat.1. + (stat.1): Add dependency. + Reported by Michael Stone. + + Ensure that the above never happens again. + * man/Makefile.am (check-x-vs-1): New target. + (check-local): Depend on check-x-vs-1. + + * src/mv.c (euidaccess): Remove declaration. It was unused. + From Michael Stone. + (yesno): Remove declaration. It too was unused. + +2002-07-08 Paul Eggert <eggert@twinsun.com: + + * NEWS: df now rounds all quantities up, as per POSIX. + This fixes a bug where df would report Size < Used. + * doc/coreutils.texi: Likewise. + * src/df.c (df_readable): Omit last arg; we always round up now. + All callers changed. + +2002-07-07 Paul Eggert <eggert@twinsun.com> + + NEWS, doc/coreutils.texi: + New ls time style: long-iso, which generates YYYY-MM-DD HH:MM. + Any time style can be preceded by "posix-". + The default time style is now posix-long-iso instead of posix-iso. + + * src/ls.c (enum time_style): Remove posix_iso_time_style. + Add long_iso_time_style. + (time_style_args, time_style_types, decode_switches): Likewise. + (decode_switches): If a time style is prefixed by "posix-", ignore + it if in the POSIX locale. Default style is now posix-long-iso. + (usage): Explain the above. + +2002-07-06 Jim Meyering <meyering@lucent.com> + + * tests/Makefile.am (envvar-check): Mark as `.PHONY'. + + * src/stat.c: Remove everything associated with --secure option. + +2002-07-04 Jim Meyering <meyering@lucent.com> + + * src/remove.c (prompt): Fix test for write-protectedness to also + check errno == EACCES. Otherwise, `rm dangling-symlink' would + mistakenly prompt. Reported by Mike Castle. + + * tests/rm/Makefile.am (TESTS): Add dangling-symlink. + * tests/rm/dangling-symlink: New file/test, for the above fix. + +2002-07-03 Jim Meyering <meyering@lucent.com> + + * src/stat.c (usage): Rename --link/-l to --dereference/-L. + Describe --secure. + Describe --format. + (main): Support -L. Deprecate -l. + +2002-07-02 Jim Meyering <meyering@lucent.com> + + * src/chgrp.c, src/chmod.c, src/chown.c, src/cp.c, src/dd.c (usage): + Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it. + * src/df.c, src/dircolors.c, src/du.c, src/install.c: Likewise. + * src/link.c, src/ln.c, src/ls.c, src/mkdir.c, src/mkfifo.c: Likewise. + * src/mknod.c, src/mv.c, src/rm.c, src/rmdir.c, src/shred.c: Likewise. + * src/stat.c, src/sync.c, src/touch.c, src/unlink.c: Likewise. + +2002-07-01 Jim Meyering <meyering@lucent.com> + + * tests/touch/fail-diag: Handle yet another different diagnostic. + Report from Volker Borchert. + +2002-06-29 Jim Meyering <meyering@lucent.com> + + * src/stat.c (print_statfs): Use `fputc ('*', stdout)' + instead of the combination of strcat and printf. + (print_statfs) [!FLASK_LINUX]: Print `*' for %S and %C, + rather than `S' and `C'. + (print_stat) [!FLASK_LINUX]: Likewise. + + * src/remove.c (AD_mark_current_as_unremovable): Replace dead + code with an assertion. + +2002-06-26 Paul Eggert <eggert@twinsun.com> + + * src/ls-test: Use grep, not egrep. + +2002-06-25 Jim Meyering <meyering@lucent.com> + + * src/remove.c (prompt): Add a comment to help translators work + around the problem of making the translations of the adjective + `write-protected' and the corresponding run-time-variable noun + (e.g., file, directory, symlink, etc.) consistent. From Paul Eggert. + +2002-06-24 Jim Meyering <meyering@lucent.com> + + * src/stat.c (usage): Add missing open-quote. + Reported by Michael Piefel. + +2002-06-22 Jim Meyering <meyering@lucent.com> + + * Version 4.1.9. + + * configure.ac: Invoke AC_GNU_SOURCE very early. + + * tests/rm/rm1: Accommodate the slightly different diagnostic we + get on some systems, due to `unlink (dir)' failing with EACCES + rather than EPERM. E.g. for ReiserFS on Linux-2.4.18. + +2002-06-21 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (wget-update): Checkout into config/. + Warn when skipping a file. + + * src/stat.c: Include sys/statvfs.h. + [!HAVE_SYS_STATVFS_H && !HAVE_SYS_VFS_H]: Include sys/param.h + and sys/mount.h, to get decl of struct statfs on NetBSD 1.5.2. + (NAMEMAX_FORMAT, STRUCT_STATVFS): Define. + (HAVE_STRUCT_STATXFS_F_TYPE, SB_F_NAMEMAX): Define. + Remove `static' attribute from decl of program_name. + (human_fstype): Use f_basetype or f_fstypename if available. + (print_human_time): Use nstrftime and an ISO format string, in + place of strftime with `%c'. The latter is too locale-dependent. + (print_statfs): Deal with lots of portability issues: some fields + are available only with statfs, others only with statvfs, and + some are available in both, but with different types. + (do_statfs) [DEFAULT_FORMAT_TERSE]: Factor out. + [DEFAULT_FORMAT_VERBOSE]: Likewise. + + * src/copy.c: Change all `preserving ...' diagnostics to + `failed to preserve ...' to make the failure clearer. + * src/cp.c: Likewise. + +2002-04-03 Alfred M. Szmidt <ams@kemisten.nu> + + * src/copy.c Include hurd.h. + (copy_internal): Preserve the stat.st_author field. + +2002-06-21 Jim Meyering <meyering@lucent.com> + + * src/ls.c (LOGIN_NAME_MAX): Define if not already defined. + (ID_LENGTH_MAX): Define. + (ST_DM_MODE): New macro. Code moved from... + (print_long_format): ...here. + (print_long_format): Itemize and comment the individual parts + of init_bigbuf. Use the above *_MAX macros. + +2002-06-20 Jim Meyering <meyering@lucent.com> + + * src/system.h: Change `defined(X)' syntax to `defined X' + in cpp directives. + +2002-06-17 Jim Meyering <meyering@lucent.com> + + * tests/setgid-check: Interpret a permissions string of + drwxr-xr-x (DOS/Windows) as meaning the cwd is not setgid. + Reported by Rich Dawe. + +2002-05-19 Paul Eggert <eggert@twinsun.com> + + Add support for new ls option --author, for GNU/Hurd. + Derived from a suggestion by Alfred M. Szmidt. + + * doc/coreutils.texi (ls invocation), NEWS: Document this. + * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author. + * src/ls.c (st_author) [! HAVE_STRUCT_STAT_ST_AUTHOR]: New macro. + (print_author): New var. + (AUTHOR_OPTION): New enum val. + (long_options, decode_switches, print_long_format, usage): + Support --author. + (format_user): New function. + (print_long_format): Use it. Make print buffer a bit bigger. + +2002-06-15 Jim Meyering <meyering@lucent.com> + + * tests/sample-test (trap): Make sure the temporary hierarchy is + writable before removing it. + + * tests/mv/perm-1: New file, to demonstrate fix of 2002-06-12. + * tests/mv/Makefile.am (TESTS): Add perm-1. + + * src/system.h: For GNU libc 2.2 and newer, ensure that <sys/types.h> + has been included before this file. + +2002-06-13 Richard Dawe <richdawe@bigfoot.com> + + Accommodate DOS file name limitations. + * tests/cp/same-file: Change temp. file name: s/\.err/_err/, for DOS. + * tests/mv/force: Similar. + * tests/mv/into-self: Similar. + * tests/touch/no-rights: Similar. + * tests/mv/mv-special-1: Remove leading `.' from temp. names. + +2002-06-15 Jim Meyering <meyering@lucent.com> + + * src/sys2.h (S_ISNAM): Add to list of S_IS* macros. + Rearrange #if directives for each S_IS macro. + From diffutils-2.8.2. + +2002-06-12 Jim Meyering <meyering@lucent.com> + + * src/mv.c (do_move): Give one diagnostic, not two, when unable to + unlink a destination file. This bug was introduced in fileutils-3.16l. + +2002-06-07 Jim Meyering <meyering@lucent.com> + + * tests/mv/part-fail: Also accept the permission-denied diagnostic + issued by some losing systems. Reported by Volker Borchert. + + * src/remove.c (remove_entry): Use DT_IS_DIR only if + HAVE_STRUCT_DIRENT_D_TYPE is defined. + +2002-06-02 Jim Meyering <meyering@lucent.com> + + `rm' no longer uses explicit recursion, and as such is now able + to remove hierarchies of effectively unlimited depth. Prior to + this change, on typical systems, rm would fail (segfault) to remove + hierarchies of depth greater than about 25,000. + + * src/remove.c: Merge in all changes from no-recursion branch. + See below for details. + * src/remove.h: Likewise. + * src/mv.c (do_move): Adapt to new calling sequence for rm. + * src/rm.c (main): Likewise. + +2002-06-02 Jim Meyering <meyering@lucent.com> + + * tests/rm/r-2: Adjust, now that we no longer report + `removing all entries of directory ...'. + * tests/rm/r-1: Likewise. + + * src/remove.c (enum Ternary): Define type. + (prompt): Add a parameter. Adjust callers. + (remove_entry): Attempt rmdir here, only if a directory is + `known' to be empty. Significant rework. + (remove_dir): Propagate failure `up' also when rmdir fails. + +2002-06-01 Jim Meyering <meyering@lucent.com> + + * tests/rm/Makefile.am (TESTS): Add rm5. + * tests/rm/rm5: New test. + +2002-05-30 Jim Meyering <meyering@lucent.com> + + In interactive mode, prompt only once about an empty directory. + * src/remove.c (enum Prompt_action): Define. + (prompt): Two new parameters. Adjust all callers. + + Performance. + * src/remove.c (remove_entry) [!ROOT_CAN_UNLINK_DIRS]: + Don't call rmdir here. + +2002-05-29 Jim Meyering <meyering@lucent.com> + + * src/remove.c (AD_pop_and_chdir): Don't use errno (it's not valid) + in diagnostic for changed dev/ino. + (remove_entry): Tweak diagnostic. + +2002-05-27 Jim Meyering <meyering@lucent.com> + + * src/remove.c (ROOT_CAN_UNLINK_DIRS): Define. + (AD_pop_and_chdir): Propagate status as we traverse back `up' the tree. + (DO_UNLINK, DO_RMDIR): Define. + (remove_entry) [ROOT_CAN_UNLINK_DIRS]: Add code so this works also on + systems where root can use `unlink' to remove directories. + +2002-05-24 Jim Meyering <meyering@lucent.com> + + * tests/mv/mv-special-1: Adapt for changed format of --verbose output. + +2002-05-22 Jim Meyering <meyering@lucent.com> + + * src/remove.c: Include file-type.h. + Include file type in prompt when asking whether to remove file. + Based on a patch from Paul Eggert. + + * src/remove.c (prompt): Add comment. + + * src/remove.c (remove_dir): Fix another (known) leak. + + * tests/rm/rm3: Don't depend on order of traversal of dir entries. + It is nondeterministic on some types of filesystems. + + * src/remove.c (hash_freer): New function. + (AD_mark_helper): Use it. + (AD_mark_as_unremovable): xstrdup the filename argument. + (remove_dir): Free directory name. + + * src/remove.c (remove_entry): Fail also when trying to remove a + directory without the --recursive option. + Change a diagnostic, s/unlink/remove/, now that it can apply also + to a directory. + + * src/remove.c (is_empty_dir): New function. + (prompt): New function, factored out of... + (remove_entry): ...here. Call it. + (remove_dir): Call prompt before rmdir. + + * src/remove.c (remove_entry): Add support for prompting (e.g., -i). + + * src/remove.h (UPDATE_STATUS): New macro. + Include save-cwd.h. + (struct File_spec): Remove declaration. + Update prototypes. + + * src/remove.c [AD_ent] (status): New member. This lets us propagate + the status from a subdirectory to its parent via AD_pop_and_chdir. + (AD_push_initial): Set it. + (AD_push): Likewise. + (remove_cwd_entries): Change return type to enum RM_status, and + adjust all callers. + (rm): Use UPDATE_STATUS rather than open-coding it. + + * src/remove.c (remove_entry): New function, factored out of... + (remove_cwd_entries): ...here, and... + (rm_1): ...here. + + * src/remove.c (remove_cwd_entries): Add support for --verbose. + (remove_dir): Likewise. + (rm_1): Likewise. + +2002-05-18 Jim Meyering <meyering@lucent.com> + + * tests/rm/rm3: New file. + * tests/rm/rm4: New file. + * tests/rm/Makefile.am (TESTS): Add rm3 and rm4. + +2002-05-17 Jim Meyering <meyering@lucent.com> + + * tests/rm/rm1: New file. + * tests/rm/rm2: New file. + * tests/rm/unread2: New file. + * tests/rm/Makefile.am (TESTS): Add rm1, rm2, and unread2. + + * src/remove.h (enum RM_status) [RM_NONEMPTY_DIR]: New member. + +2002-05-13 Jim Meyering <meyering@lucent.com> + + * src/remove.c (rm): Free cwd_state, if necessary. + +2002-05-01 Jim Meyering <meyering@lucent.com> + + * src/remove.c (rm_1): Remove now useless (always true) + user_specified_name parameter. Adjust sole caller. + + * src/remove.c (rm): New function. This interface allows + one to remove multiple arguments at a time. This is important in + that it allows us to hide the remove_init/remove_fini functions and + the cwd_state parameter. + (rm_1): Renamed from rm. + (remove_init, remove_fini): Remove functions. Each body is now + part of `rm'. + * src/remove.h (rm): Update prototype. + +2002-06-01 Jim Meyering <meyering@lucent.com> + + * src/ls.c: Remove use of D_TYPE_IN_DIRENT, now that that symbol + has been renamed. + +2002-05-30 Jim Meyering <meyering@lucent.com> + + * src/copy.c (copy_reg): Use a temporary to avoid a warning + from gcc -W about comparison between signed and unsigned. + (copy_internal): Likewise, but use a cast. + +2002-05-22 Jim Meyering <meyering@lucent.com> + + * src/sys2.h (S_ISREG, S_ISDIR): Define if not already defined. + (S_TYPEISSEM, S_TYPEISSHM, S_TYPEISTMO): Likewise. + + * src/ls.c (S_ISLNK, S_ISFIFO, S_ISSOCK, S_ISCHR, S_ISBLK, S_ISDOOR): + Remove definitions. + * src/sys2.c (S_ISLNK, S_ISFIFO, S_ISSOCK, S_ISCHR, S_ISBLK, S_ISDOOR): + Define here instead. + +2002-04-27 Jim Meyering <meyering@lucent.com> + + * src/remove.c (cycle_check): New function containing code factored + out of remove_dir. The sole difference is that upon detecting a + cycle, rm now dies unconditionally. Before, in interactive mode, + it would ask the user whether to continue. + (remove_dir): Call cycle_check. + +2002-04-25 Jim Meyering <meyering@lucent.com> + + Avoid new warnings from gcc. + * src/dd.c: Declare input_file and output_file to be `const'. + (skip): Declare `file' parameter to be `const', too. + + Remove hash table, active_dir_map, used to detect directory cycles. + Instead, detect them lazily with just O(1) memory. + Suggestion from Andi Kleen. + * src/remove.c (is_power_of_two): New function. + (print_nth_dir, make_active_dir_ent): Remove functions. + (hash_active_dir_ent, hash_compare_active_dir_ents): Likewise. + (remove_dir): Check for cycles here, ... + (rm): ... and don't check for cycles here. + + * src/remove.c (rm): Call fspec_get_full_mode here, rather than + fspec_get_filetype_mode. We want to get the dev/ino earlier, and + at the same time as when we get the file type, to avoid the risk + that an attacker would change e.g. a directory to a symlink before + we record its dev/ino. + + * configure.ac (AC_CONFIG_FILES): Remove intl/Makefile. + (AM_GNU_GETTEXT): Add external arg. + + * intl/: Remove directory. + * Makefile.am (SUBDIRS): Remove intl. + (DISTCLEANFILES): Remove definition. + + * src/sys2.h: Remove ENABLE_NLS-related code. + (_, N_) Remove definitions. + Include "gettext.h" instead. + + * src/Makefile.am (INCLUDES): Remove -I../intl. + +2002-04-22 Jim Meyering <meyering@lucent.com> + + * src/remove.c (rm): Call exit with EXIT_FAILURE, not `1'. + +2002-04-19 Jim Meyering <meyering@lucent.com> + + * tests/cp/*: Clean up. + + * tests/sample-test: Use a temporary directory named + `basename $0`.tmp/$$. Create with mkdir -p. + + * tests/cp/backup-1: Use better trap, etc. + * tests/mkdir/p-2: Use better trap. + * tests/mkdir/p-1: Likewise. + * tests/mkdir/concurrent-1: Likewise. + + * tests/rm/deep-1: Set $tmp the new way. + + * tests/rm/ir-1: Use `rm', not $RM. Use better trap. + * tests/rm/i-1: Likewise. + * tests/rm/f-1: Likewise. + + * tests/sample-test: Use automatically-derived name for temporary + directory. This is more 8.3-friendly. Based on a suggestion from + Richard Dawe. + + * tests/sample-test: New file. + * tests/Makefile.am (EXTRA_DIST): Add sample-test. + +2002-04-17 Jim Meyering <meyering@lucent.com> + + * src/touch.c (touch): Don't report errors for nonexistent files + when --no-create is in effect. Based on a patch from TAKAI Kousuke. + * tests/touch/no-create-missing: New file/test for above. + * tests/touch/Makefile.am (TESTS): Add no-create-missing. + +2002-04-16 Jim Meyering <meyering@lucent.com> + + * src/stat.c: Add copyright comment. + (human_fstype): Rename from print_human_fstype, and rework accordingly. + (print_statfs): Use human_fstype to honor format width on %T. + +2002-04-15 Jim Meyering <meyering@lucent.com> + + Handle "lld" vs "ld" printf formats the same way Bash does. + * src/stat.c: Include inttypes.h. + (PRIdMAX, PRIuMAX): Define, if not already defined. + (print_statfs): Use those macros, not the literal strings. + (print_stat): Likewise. + Suggestion from Paul Eggert. + + * src/stat.c (print_human_fstype): Add missing `break;' + for `case S_MAGIC_MINIX:'. + +2002-04-14 Jim Meyering <meyering@lucent.com> + + * src/stat.c (statfs_secure): Define. + (print_stat): Remove another #ifdef. + (do_statfs): Likewise. + (print_statfs): Prefer/use fputs over printf. + (print_stat): Likewise. + + * src/Makefile.am (bin_PROGRAMS): Add stat. + (noinst_HEADERS): Add fs.h. + + * src/stat.c [HAVE_SYS_VFS_H]: Guard incluion of sys/vfs.h. + Constify many parameters. + (print_statfs): Fix typo: Use %u (to match %lu) for namelen, not %d. + (verbose_usage): Remove function. Move contents into usage. + Remove lots of #if directives involving FLASK_LINUX + [!FLASK_LINUX] (is_flask_enabled): Define. + (stat_secure, lstat_secure): Define. + (print_statfs): Remove lots of nested #if directives. + Instead, rely on support fo %llu and %lld printf formats -- + but that is only temporary, since it's not porable enough. + (main): Hoist is_flask_enabled test to be done here, rather + than in each of do_stat and do_statfs for every argument. + +2002-04-13 Jim Meyering <meyering@lucent.com> + + * src/stat.c: Include system.h, error.h, and many other headers. + [HAVE_SYS_SYSMACROS_H]: Guard inclusion of sys/sysmacros.h. + (PROGRAM_NAME, AUTHORS): Define. + (long_options): Declare/define. + (print_human_access): Rewrite to use mode_string. + (usage): Rewrite. + (main): Use getopt_long. + (print_human_type): Call fputs once rather than calling + printf many times. + (print_human_fstype): Revamp in a similar fashion. Don't use strdup. + Declare most functions to be `static'. + +2002-04-12 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (LDADD): List ../lib/libfetish.a both before + and after @LIBINTL@. Thanks to Paul Eggert for the fix and to + Bruno Haible for diagnosing the problem. + + * src/link.c: Include long-options.h. + [long_opts]: Remove. + (usage): Tweak --help output; use *_OPTION_DESCRIPTION macros. + (main): Don't use getopt directly. Use parse_long_options instead. + Tweak a diagnostic. + Use EXIT_FAILURE rather than a literal `1'. + * src/unlink.c: Likewise. + (main): If POSIXLY_CORRECT is set, don't recognize --help or --version, + so the program can operate on a file with one of those names. + +2002-04-11 Jim Meyering <meyering@lucent.com> + + New programs link and unlink. + + * src/Makefile.am (bin_PROGRAMS): Add link and unlink. + * src/link.c, src/unlink.c: New files, from Debian's fileutils_4.1-10. + Written by Michael Stone. + + * man/link.x: New file. + * man/unlink.x: New file. + * man/Makefile.am: Add link and unlink. + +2002-04-07 Jim Meyering <meyering@lucent.com> + + * tests/install/basic-1: Tweak comments to reflect reality. + * tests/cp/fail-perm: Add VERBOSE=yes support. + * tests/mv/mv-special-1: Fix typo in VERBOSE=yes handling. + Reported by Richard Dawe. + +2002-03-30 Jim Meyering <meyering@lucent.com> + + * Version 4.1.8. + + * tests/mv/i-link-no: Use --reply=no rather than -i. + The latter depends on whether stdin is a tty and hence would + fail in some situations where --reply=no doesn't. + + * src/mv.c (do_move): Correct a comment. + + * src/copy.c (copy_internal): Move the block that sets `earlier_file' + down to just before the first use of that variable. Otherwise, it was + possible to make mv (and probably cp, too) malfunction when copying + hard-linked files into a directory containing at least one of the + source file names. Call forget_created everywhere thereafter where + this function returns without creating a destination file that might + subsequently be linked. Reported by Iida Yosiaki. + * src/cp-hash.c (forget_created): New function. + * src/cp-hash.h (forget_created): Prototype. + + * tests/mv/i-link-no: New test for the above. + Based on an example from Iida Yosiaki. + * tests/mv/Makefile.am (TESTS): Add i-link-no. + +2002-03-17 Jim Meyering <meyering@lucent.com> + + * src/copy.c (copy_internal) [move_mode]: Give a better diagnostic, + by using errno from the failed unlink, when a cross-device `mv' + fails, e.g., because the destination cannot be unlinked. + Prompted by a report from Karl Berry. + * tests/mv/part-fail: New test for the above. + * tests/mv/Makefile.am (TESTS): Add part-fail. + +2002-03-16 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (datadir): Don't override $(datadir) + which might be set by --datadir and different from $(prefix)/share. + Patch from Albert Chin-A-Young. + +2002-03-10 Jim Meyering <meyering@lucent.com> + + * Version 4.1.7. + + * src/ln.c (main): Change wording in diagnostic. + * src/cp.c (do_copy): Likewise. + * src/install.c (strip): Likewise. + Suggestions from Santiago Vila. + + * Use autoconf-2.53. Regenerate dependent files. + + * Makefile.maint (GZIP, BZIP2): Remove definitions. + ($(my_distdir).tar.bz2): Remove rule. Now, it's built by `make dist'. + + * configure.ac (AM_INIT_AUTOMAKE): Specify the required version + of automake (1.6), and options (gnits dist-bzip2), rather than... + * Makefile.am (AUTOMAKE_OPTIONS): ...here. Remove definition. + + * src/copy.c (copy_reg): Don't exit upon finding a replaced file. + Instead, just skip it like the diagnostic says. + Reported by Paul Eggert. + +2002-03-09 Paul Eggert <eggert@twinsun.com> + + * src/copy.c (copy_reg): Use a more concise diagnostic for + reporting replaced files. This avoids a bug in the code, + which mishandled ino_t wider than long. + * src/remove.c (remove_dir): Likewise, twice. + +2002-03-09 Jim Meyering <meyering@lucent.com> + + * Makefile.am (EXTRA_DIST): Remove config/config.rpath, + now that automake knows about it. + +2002-03-08 Jim Meyering <meyering@lucent.com> + + Don't allow a malicious user to trick another user's rm process into + removing unintended files. In one scenario, if root is removing a + hierarchy that is writable by the malicious user, that user may trick + root into removing all of `/'. Reported by Wojciech Purczynski. + + * src/remove.c (remove_dir): After chdir `..', call lstat to get the + dev/inode of "." and fail if they aren't the same as the old numbers. + (remove_cwd_entries): New parameter, `cwd_dev_ino'. + (remove_dir): Likewise. + (rm): Likewise. + Adjust all callers. + * src/mv.c (do_move): The first time we resort to copy/remove, + call lstat `.' to get the device/inode numbers now required for rm. + * src/rm.c (main): Call lstat `.' to get the device/inode numbers + now required for rm. + * src/remove.h (struct dev_ino): Declare new type. + (rm): Add a parameter to the prototype. + +2002-03-06 Jim Meyering <meyering@lucent.com> + + * Use automake-1.6. Regenerate dependent files. + +2002-03-05 Jim Meyering <meyering@lucent.com> + + * Makefile.am (EXTRA_DIST): Add config/config.rpath. + +2002-03-04 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (tgz-size): Also handle a suffix of `K', since + the sizes in the output of `du -h' now look like `29K' + +2002-03-03 Jim Meyering <meyering@lucent.com> + + * Version 4.1.6. + +2002-03-03 Paul Eggert <eggert@twinsun.com> + + Make cp -r equivalent to cp -R. Add a new cp option --copy-contents + for people who want to emulate the traditional (and rarely desirable) + cp -r behavior. + + * src/cp.c (COPY_CONTENTS_OPTION): New enum value. + (long_opts): Add --copy-contents. + (usage): Describe new behavior. Sort options. + (main): Implement new behavior. Remove diagnostics for -a and -r; + no longer needed. + * src/copy.c (copy_internal): Remove -r warning; no longer needed. + + * NEWS: Document this. + +2002-03-02 Jim Meyering <meyering@lucent.com> + + * src/copy.c (copy_internal): For each symlink copied by cp -r, + issue a warning that `cp -r' is not portable. + + * src/cp.c (main): Revert change of 2001-12-29. With this change, + cp -r once again preserves symlinks. + (usage): Document the original (now-restored) behavior. + * tests/cp/r-vs-symlink: Reflect changed semantics of cp's -r option. + + * src/cp.c (main): Warn when -r is specified before --archive (-a). + * src/cp.c (main): Fail when -r is specified after --archive (-a) + on the command line. + + * src/copy.c (copy_reg): Detect abuse of a race condition + whereby an unprivileged user could gain read access to otherwise- + inaccessible files when root uses cp or mv to copy a hierarchy + belonging to that user. + +2002-02-27 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (decode_switches, usage): Add --time-style=+FORMAT. + * doc/coreutils.texi (Formatting file timestamps): Document it. + +2002-02-25 Paul Eggert <eggert@twinsun.com> + + Add ACL support to 'ls' for HP-UX and Unixware, and try to + establish a framework for adding it for other hosts. + This builds on a suggestion of Andreas Gruenbacher. + + * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c. + * lib/acl.h, lib/acl.c, m4/acl.m4: New files. + * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL. + Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now. + * src/ls.c: Include "acl.h" rather than <sys/acl.h>. + (USE_ACL): Remove; replaced by HAVE_ACL everywhere. + (gobble_file): Use file_has_acl rather than doing it ourselves. + +2002-02-20 Jim Meyering <meyering@lucent.com> + + * src/touch.c: Include posixver.h. + (usage): Document only the intersection of the old and new behaviors, + to encourage portability. + (main): Use `posix2_version ()' in place of POSIX2_VERSION. + +2002-02-17 Jim Meyering <meyering@lucent.com> + + * ABOUT-NLS, intl/*: Update to Gettext 0.11. + * INSTALL: Update to Autoconf 2.52h. + + * src/Makefile.am (datadir): Use `share' in place of @DATADIRNAME@, + per Gettext-0.11. + (LDADD): Use @LIBINTL@ instead of @INTLLIBS@, per Gettext-0.11. + + * configure.ac (AC_CONFIG_AUX_DIR): New macro invocation. + (ALL_LINGUAS): Remove: now in po/LINGUAS as per Gettext 0.11. + + * config: New subdirectory, containing the following files from .: + config.guess, config.sub, depcomp, missing, install-sh, mkinstalldirs. + Move the following files here from doc: texinfo.tex, mdate-sh. + +2002-02-16 Jim Meyering <meyering@lucent.com> + + * tests/ls/infloop: Use `head -n 7', not `head -7'. + * tests/rm/hash: Likewise. + +2002-02-10 Jim Meyering <meyering@lucent.com> + + * configure.in (ALL_LINGUAS): Add Hungarian (hu). + +2002-02-02 Jim Meyering <meyering@lucent.com> + + * src/shred.c: (VERBOSE_UPDATE): Update every 5 seconds, not every 10. + (wipename): Quote file names only when necessary. + (main): Copy quoted string into malloc'd storage so it doesn't + get clobbered when using -u and --verbose. + + Minor clean-up. + * src/shred.c: + Use `NULL' rather than `(time_t *) 0'. + (dopass): Use STREQ in place of strcmp. + Add parentheses around use of nested ternary operator. + +2002-01-15 Paul Eggert <eggert@twinsun.com> + + * src/shred.c (VERBOSE_UPDATE): Now counts seconds, not bytes. + + (dopass): If verbose, output a line every VERBOSE_UPDATE seconds, + and suppress duplicate output lines. Output a percentage as well + as a count of bytes. + + Also, fix comment/code typo regarding how many bytes have been + written; this typo was harmless before, but is no longer harmless with + the above change in effect. + +2002-02-02 Jim Meyering <meyering@lucent.com> + + * src/remove.c (rm): Add a comment. + +2002-01-28 Jim Meyering <meyering@lucent.com> + + * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.5d. + * configure.ac (AM_INIT_AUTOMAKE): Use zero-arg form of this macro. + +2002-01-21 Jim Meyering <meyering@lucent.com> + + * po/POTFILES.in: Add lib/xmemcoll.c + + * src/chown-core.c: Don't include "xalloc.h", as system.h already + does that via sys2.h. + * src/ls.c: Likewise. + * src/shred.c: Likewise. + +2002-01-20 Paul Eggert <eggert@twinsun.com> + + * src/ls.c: Avoid undefined behavior when strcoll fails, + by resorting the directory with strcmp instead. + + Include <setjmp.h>. + Include "quote.h". + (compare_atime, rev_cmp_atime, compare_ctime, rev_cmp_ctime, + compare_mtime, rev_cmp_mtime, compare_size, rev_comp_size, + compare_name, rev_cmp_name, compare_extension, rev_cmp_extension, + compare_version, rev_compare_version): Move before use, so that + we can remove the forward declaration. Reimplement in terms of + the new functions described below, using xstrcoll instead of strcoll. + (failed_strcoll): New var. + (xstrcoll): New function. + (V): New type. + (cmp_ctime, compstr_ctime, rev_str_ctime): New functions. + (cmp_mtime, compstr_mtime, rev_str_mtime): Likewise. + (cmp_atime, compstr_atime, rev_str_atime): Likewise. + (cmp_size, compstr_size, rev_str_size): Likewise. + (cmp_version): Likewise. + (cmp_name, compstr_name, rev_str_name): Likewise. + (cmp_extension, compstr_extension, rev_str_extension): Likewise. + (sort_files): Use prototype for internal function var. + If the strcoll-based comparison fails, fall back on a strcmp-based one. + +2002-01-19 Jim Meyering <meyering@lucent.com> + + Ensure that the two version numbers in configure.ac remain in sync. + * Makefile.maint (local-check): Depend on ac-check. + (ac_p_pkg, AC_INIT_PKG): Define. + (ac_p_ver, AC_INIT_VER): Define. + (ac-check): New rule. + +2002-01-19 Jim Meyering <meyering@lucent.com> + + * configure.ac: Remove code that set LIBOBJS in support of ansi2knr. + The latest version of autoconf objected to it, and besides, I don't + care too much about K&R support these days. + +2002-01-14 Paul Eggert <eggert@twinsun.com> + + * src/touch.c (main): Issue a warning for obsolete usage, unless + POSIXLY_CORRECT. + +2002-01-14 Paul Eggert <eggert@twinsun.com> + + Add support for POSIX 1003.1-2001, which requires removal for + support of the obsolete `touch [-acm] MMDDhhmm[YY] FILE...' syntax. + + * NEWS: Document this. + * src/touch.c (usage, main): Implement this. + +2002-01-12 Jim Meyering <meyering@lucent.com> + + Avoid giving a misleading diagnostic in some unusual cases. + Instead, give one that makes sense. + + * src/copy.c (copy_reg): Don't treat errno==ENOENT as a special case. + (same_file_ok): Detect a case that would have lead to the errno==ENOENT + condition above (and a misleading diagnostic), and return 0 so we give + a diagnostic about the source and destination being the same file. + (copy_internal): Use an explicit test for errno==EXDEV to detect + that rename has failed because source and destination are on + different devices. This reverts part of a change from 1997-12-13, + and is to avoid letting a race condition evoke a bogus diagnostic. + Note that while POSIX has encouraged the errno==EXDEV test for + years, it was inadequate back in 1997. I'm hoping that many + more systems have conforming support these days. + Reported by Michael Gaughen <mgaughen@polyserve.com> + + * src/shred.c (usage): Also mention Ext3. + Suggestion from Göran Uddeborg. + +2002-01-06 Bruno Haible <bruno@clisp.org> + + * src/ls.c (long_time_format): Extend translator comments. + +2002-01-05 Jim Meyering <meyering@lucent.com> + + * Version 4.1.5. + +2001-12-29 Jim Meyering <meyering@lucent.com> + + * src/cp.c (main): With -r, always dereference symlinks. + Reported by Christian Harkort. Patch by Chris J. Bednar. + + * tests/cp/r-vs-symlink: New file to test for the above fix. + * tests/cp/Makefile.am (TESTS): Add r-vs-symlink. + +2001-12-21 Jim Meyering <meyering@lucent.com> + + * src/shred.c [!HAVE_CONFIG_H]: Remove cpp block that duplicated + code in lib/ in order to facilitate compiling this program without + config.h. + +2001-12-19 Paul Eggert <eggert@twinsun.com> + + * src/shred.c: Add FSF copyright notice. + +2001-12-18 Paul Eggert <eggert@twinsun.com> + + Use notation compatible with SI and with IEC 60027-2. + For example, --block-size=1MB now means --block-size=1000000, + whereas --block-size=1MiB now means --block-size=1048576. + A trailing `B' now means decimal, not binary; this is a silent change. + -H or --si now outputs the trailing 'B', for consistency with this. + Programs now output trailing 'K' (not 'k') to mean 1024. + New df, du short option -B is short for --block-size. + You can omit an integer `1' before a block size suffix, + e.g. `df -BG' is equivalent to `df -B 1G' and to `df --block-size=1G'. + + * NEWS, doc/coreutils.texi: Document this. Remove documentation + for obsolescent constructs MD, --kilobytes, -m or --megabytes. + + * src/dd.c (usage, parse_integer): Prefer K to k for 1024. + * src/shred.c (usage, main): Likewise. + + * src/shred.c (xstrtoumax): If there is no number but there + is a valid suffix, assume 1. "MB" now means decimal, "MiB" binary. + Accept 'K' as well as 'k'. + + * src/dd.c (usage): MD -> MB for decimal. + + * src/df.c (BLOCK_SIZE_OPTION): Remove; no longer needed now that + we have 'B'. + (long_options, usage, main): Add -B. + (usage): Deprecate --kilobytes, -m, --megabytes. + Document size suffixes. + * src/du.c: Likewise. + * src/ls.c (usage): Deprecate --kilobytes. Document size suffixes. + + * src/df.c (print_header, show_dev): Enlarge column widths for + trailing "B". + +2001-12-17 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (real_dir): Remove unused variable. + (url_dir_list): Don't set define it here, but... + * Makefile.cfg (url_dir_list): ...define it here instead. + (hosts, a_host, b_host): Remove now-unused variables. + (alpha_subdir, a_url_dir, b_url_dir): Remove now-unused variables. + +2001-12-15 Jim Meyering <meyering@lucent.com> + + * Version 4.1.4. + + * tests/touch/fail-diag: Also accept SunOS4's `Not owner' diagnostic. + Reported by Volker Borchert. + + * tests/help-version: Fail also if ./$i --version fails. + Run each --help and --version test with a few different settings + of LC_MESSAGES. Prompted by a report from Nelson Beebe. + +2001-12-11 Jim Meyering <meyering@lucent.com> + + Include the word `fail' in some diagnostics to make it clearer + that they indicate a failure. + * src/chgrp.c (main): s/getting attributes/failed to get attributes/. + * src/chmod.c (change_file_mode, main): Likewise. + * src/chown-core.c (change_file_owner): Likewise. + * src/chown.c (main): Likewise. + * src/cp.c (re_protect): Likewise. + * src/touch.c (touch, main):Likewise. + Suggestion from Karl Berry. + +2001-12-10 Jim Meyering <meyering@lucent.com> + + * src/dd.c (buggy_lseek_support): Remove function. + (skip_via_lseek) [__linux__]: New function. + (skip): Use skip_via_lseek, not buggy_lseek_support. + Based on an outline from Paul Eggert. + +2001-12-09 Jim Meyering <meyering@lucent.com> + + * configure.in (ALL_LINGUAS): Add Estonian (et). + +2001-12-08 Jim Meyering <meyering@lucent.com> + + * Makefile.cfg (wget_files): Remove ansi2knr.c, since it's + no longer available at that location. + +2001-12-04 Jim Meyering <meyering@lucent.com> + + * tests/chgrp/basic: Don't use diff's -u option. It's not portable. + Besides, with GNU diff one can use the DIFF_OPTIONS envvar. + * tests/ls/no-arg: Likewise. + * tests/ls/recursive: Likewise. + * tests/ls/rt-1: Likewise. + +2001-12-02 Jim Meyering <meyering@lucent.com> + + * Version 4.1.3. + + * src/sys2.h (HELP_OPTION_DESCRIPTION): New macro. + (VERSION_OPTION_DESCRIPTION): New macro. + * src/chgrp.c, src/chmod.c, src/chown.c, src/cp.c, src/dd.c, + * src/df.c, src/dircolors.c, src/du.c, src/install.c, src/ln.c, + * src/ls.c, src/mkdir.c, src/mkfifo.c, src/mknod.c, src/mv.c, src/rm.c, + * src/rmdir.c, src/shred.c, src/stat.c, src/sync.c, src/touch.c (usage): + Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION + instead of hard-coding --help and --version descriptions. + + * POTFILES.in: Add src/sys2.h. + + * src/touch.c (touch): Extend the change of 2001-09-15 to work on + systems for which errno is set to EPERM in that case. Thus, e.g., + `touch /' by non-root gives a better diagnostic on systems like SunOS4. + Reported by Volker Borchert. + + Don't emulate dd's skip=N for *all* character devices; lseek works + just fine on non-tape character devices like /dev/mem and /dev/kmem. + * src/dd.c (buggy_lseek_support) [__linux__]: Emulate `skip=N' + behavior using reads, not lseek for Linux tape devices (major == 9). + Kernel lseek support for tapes is broken, up to and including + linux-2.4.16. Reported by Herbert Xu. + +2001-11-27 Jim Meyering <meyering@lucent.com> + + * tests/ls/rt-1: Compare all lines of output. + Update code to use `trap' and more up to date infrastructure. + + The change of 2001-11-01 introduced a bug whereby some recursive + listings didn't have a blank line between per-directory groups of files. + * src/ls.c (print_dir): Print a newline before each directory name + except the first one, rather than after each except the last, since + now (after the changes of 2001-11-01) detecting whether a `pending*' + is the last would involve more work. Reported by Andreas Schwab. + * tests/ls/recursive: New file. Test for the above. + * tests/ls/Makefile.am (TESTS): Add recursive. + + This change has no net effect. + * src/ls.c (main): Remove always-true conjunct and add a comment. + +2001-11-26 Jim Meyering <meyering@lucent.com> + + * src/shred.c: Don't include "gtod.h" + (main): Don't `call' GETTIMEOFDAY_INIT. + * src/ls.c: Likewise. + +2001-11-24 Jim Meyering <meyering@lucent.com> + + * Makefile.maint: Include signatures for the xdelta file, too. + + * Makefile.maint (emit-upload-commands): Rename from + emit-rsync-commands. + Output only the package name and the prev and current version numbers. + + * Version 4.1.2. + + * src/sync.c (usage): Make --help and --version strings + start in column 7. + + * Makefile.cfg (move_if_change): Remove definition. + ($(srcdir)/m4/jm-glibc-io.m4): Use mv, not move-if-change. + +2001-11-23 Jim Meyering <meyering@lucent.com> + + * cp.c, df.c, du.c, install.c, ln.c, ls.c, mkdir.c (usage): + * mkfifo.c, mknod.c, mv.c, shred.c, touch.c (usage): + Note that ``Mandatory arguments to long options are mandatory + for short options too.'' + + * src/shred.c (usage): Use `output', not `print' in description of + the --version option, so this message is consistent with all the rest. + + * chgrp.c, chmod.c, chown.c, cp.c, dd.c, df.c, dircolors.c (usage): + * du.c, install.c, ln.c, ls.c, rm.c, rmdir.c, shred.c, touch.c (usage): + Split --help output into smaller pieces. + Use fputs, not printf. + + * src/cp-hash.c: Use opaque type, Hash_table, not `struct hash_table'. + * src/du.c: Likewise. + * src/remove.c: Likewise. + +2001-11-22 Jim Meyering <meyering@lucent.com> + + Don't fail for commands like this: cp a a d/ + This change in behavior was introduced in 4.1.1, as part of the + 2001-09-28 change. cp and mv still fail for commands like this: + rm -rf a b c; mkdir a b c; touch a/f b/f; mv a/f b/f c + + * src/copy.c (triple_hash_no_name): New function. + (src_info_init): New function. + (copy_internal): Warn and return early for the second and subsequent + occurrences of the same source file named on the command line. + * src/copy.h (struct cp_options) [src_info]: New member. + * src/install.c (cp_option_init): Initialize new member. + * src/mv.c (cp_option_init): Likewise. + * src/cp.c (cp_option_init): Likewise. + (do_copy): Call src_info_init. + + * tests/mv/dup-source: New test for the above. + * tests/mv/Makefile.am (TESTS): Add dup-source. + + * src/copy.c (seen_file): Change type of `stats' parameter to pointer. + (copy_internal): Update caller. + + * src/copy.c (struct F_triple): Rename from dest_info. + (seen_file): Rename from seen_dest. Rename parameters accordingly. + (record_file): Rename from record_dest. Rename parameters accordingly. + (triple_hash): Rename from dest_info_hash. + (triple_compare): Rename from dest_info_compare. + (triple_free): Rename from dest_info_free. + + * src/mknod.c (main): Add a literal format string to suppress + a warning from gcc's -Wformat-security. + + copy.c shouldn't maintain static state. + + * src/copy.c (dest_info): Remove declaration of file-scoped global. + (dest_info_init): Require a parameter. + Update all callers. + (seen_dest): Require a hash table parameter. Update callers. + (record_dest): Likewise. + * src/copy.h: Include hash.h. + (struct cp_options) [dest_info]: New member. + * src/install.c (cp_option_init): Initialize new member. + * src/mv.c (cp_option_init): Likewise. + * src/cp.c (cp_option_init): Likewise. + (do_copy): Remove const attribute from declaration of parameter, x. + +2001-11-17 Jim Meyering <meyering@lucent.com> + + * tests/chmod/equals: New test for the just-fixed bug in + lib/modechange.c. + * tests/chmod/Makefile.am (TESTS): Add equals. + + * configure.ac: Replace use of the one-arg form of AC_INIT + with a use of the 3-arg form and a use of AC_CONFIG_SRCDIR. + +2001-11-12 Jim Meyering <meyering@lucent.com> + + * tests/rm/r-3: Clean up. + +2001-11-09 Jim Meyering <meyering@lucent.com> + + * configure.ac: Use AC_CONFIG_FILES(...) and call AC_OUTPUT with no + arguments. + +2001-11-06 Jim Meyering <meyering@lucent.com> + + * src/dircolors.hin: Remove duplicate entry for .png. + Reported by Frédéric L. W. Meunier. + +2001-11-03 Jim Meyering <meyering@lucent.com> + + * Version 4.1.1. + + * src/ls.c (DEV_INO_PUSH): Avoid unnecessary copies. + (dev_ino_pop): Likewise. + +2001-11-02 Jim Meyering <meyering@lucent.com> + + * src/ls.c: Rename global: s/trace_dirs/recursive/. + (extract_dirs_from_files): Rename parameter: + s/recursive/ignore_dot_and_dot_dot/. + + * src/ls.c: (dev_ino_pop): Cast 2nd arg of obstack_blank to `int' + before negating to avoid warning from gcc on systems with 64-bit size_t. + + * src/ls.c: Use XMALLOC and XREALLOC in a several places. It's cleaner. + +2001-11-01 Jim Meyering <meyering@lucent.com> + + * src/ls.c: Include dirfd.h. + (print_dir): If dirfd fails, resort to using stat. + + * tests/ls/infloop: Redirect cmp's stderr to /dev/null. + + * src/ls.c (struct pending) [st_ino, st_dev]: Remove members. + (queue_directory): Remove just-added 3rd parameter + and associated code, and update callers. + (print_dir): Get dev/inode pair via `fstat (dirfd (reading), ...', + and call visit_dir to detect cycles here. + Push the dev/inode pair onto the new stack. + (dev_ino_obstack): New global. + (DEV_INO_PUSH): New macro. + (dev_ino_pop): New function. + (ASSERT_MATCHING_DEV_INO): New macro. + (visit_dir): Take two parameters (dev,ino), not one `pending'. + (main): Initialized the dev_ino_obstack. + Don't call visit_dir here. + Get the dev/ino pair from the new stack, not from the pending entry. + + Make ls -R detect directory cycles. + Add loop detection without incurring an additional stat call per + directory processed. To detect loops efficiently (i.e., time: +O(1) + per directory processed by ls -R, total additional space: + O(max-tree-depth)), record the dev/ino of each `active' directory + in a hash table. To know when a directory is no longer active, + insert a marker (name == NULL) entry for it in the pending queue. + When a marker comes to the front of the queue, that directory is no + longer active, and must be removed from the hash table. To remove it, + we need to know its dev/ino again. Since by the time a directory + has become inactive its files[] info is long gone and it's DIR* + is closed, I must either save the dev/ino someplace (pending seemed + logical) or recompute them via stat. + + The following change will convert to using a stack of dev/ino pairs + instead, pushing an entry when doing the opendir (use fstat on + dirfd (reading)), and popping (when encountering a marker) to get + the dev/ino pair to be removed from the hash table. + + * src/ls.c: Include hash.h, same.h, and xalloc.h. + (INITIAL_TABLE_SIZE, LOOP_DETECT): Define. + (active_dir_set): New global. + (struct dev_ino): Declare. + (dev_ino_hash, dev_ino_compare, dev_ino_free): New functions. + (visit_dir, free_pending_ent): New functions. + (main): Initialize the active_dir_set hash table, if necessary. + Don't confuse a marker entry with a real one. + Detect loops. + Manage the set of active directories. + Free the hash table. + (queue_directory): Add a new parameter. + Ensure that we set the new dev/ino members for each enqueued directory. + Update all callers. + (print_dir): Don't confuse a marker entry with a real one. + (extract_dirs_from_files): Insert a marker entry before inserting + the entries for subdirectories. + + Don't try to print a NULL pointer. + * src/ls.c (main): Don't use ARGMATCH_TO_ARGUMENT. + This reverts part of the 1998-12-31 change. + * tests/ls/dired: New test, for the above. + * tests/ls/Makefile.am (TESTS): Add dired. + +2001-10-24 Jim Meyering <meyering@lucent.com> + + * src/cp.c (main): Free hash table storage. + * src/cp-hash.c (forget_all): Use hash_free, not hash_clear. + +2001-10-22 Paul Eggert <eggert@twinsun.com> + + * src/sys2.h (alloca): Define to __builtin_alloca if __GNUC__, + to avoid a warning if -Wall. + +2001-10-21 Paul Eggert <eggert@twinsun.com> + + * src/dd.c: Remove as many instances of 'unsigned' as + possible, as some of them were not conforming to ANSI C, and + they made the code hard to read. Avoiding 'unsigned' cuts + down on the number of casts. + + (newline_character, space_character, save_char): + Now char, not unsigned char. + (obuf): Now char *, not unsigned char *. + (ascii_to_ebcdic, ascii_to_ibm, ebcdic_to_ascii): + Now char[], not unsigned char[]. + (translate_charset, translate_buffer, swab_buffer, skip, copy_simple, + copy_with_block, copy_with_unblock): + Arg now points to char, not unsigned char. + All callers changed. + (translate_charset, parse_conversion, apply_translations): + Use int index, not unsigned int. + (bit_count): Arg is now int, not unsigned int. + Callers not changed, as they already assumed this. + (translate_buffer): Cast char to unsigned char before using + it as a subscript. + (swab_buffer): Returns char *, not unsigned char *. + (dd_copy): Use char, not unsigned char, for buffers. + Use size_t for possibly-large index, not unsigned int. + +2001-10-21 Jim Meyering <meyering@lucent.com> + + * src/shred.c (isaac_seed_machdep): Handle SIGSEGV, too. Ick. + + * tests/mv/Makefile.am (TESTS): Remove i-3. It's not portable. + + * src/copy.c: Include xreadlink.h. + (copy_internal): Don't use PATH_MAX. + Rewrite the symlink-copying code to use xreadlink. + +2001-10-20 Jim Meyering <meyering@lucent.com> + + * src/touch.c (touch): Extend last change to work on systems + for which errno is set to EINVAL. + + * src/ls.c: Declare some local variables to be `const', where + appropriate. + (usage): Improve the description of --dereference (-L). + + * src/rm.c (usage): Clarify description of --directory (-d). + Based on a patch from Michael Stone. + + * man/chmod.x: Describe sticky files and directories. + From Michael Stone. + + * tests/mv/partition-perm: Don't use a umask that removes owner + read/write. Use a stricter test for permissions. + + * tests/cp/link-preserve: Don't use a umask that removes owner + read/write. That would induce spurious failures in a probably- + outdated version of purify. + +2001-10-18 Jim Meyering <meyering@lucent.com> + + * src/mv.c (movefile): Now that remember_copied xstrdup's the file + name, free `new_dest'. + + Plug a leak. + * src/cp-hash.c (remember_copied): Use src_to_dest_free to free + the entry we couldn't insert. + + Don't use free'd memory. + * src/copy.c (dest_info_free): New function. + (dest_info_init): Make the hash table code use it. + (record_dest): Store each DEST in malloc'd memory. Hence the above. + Use dest_info_free to free the `ent' we couldn't insert. + +2001-10-14 Jim Meyering <meyering@lucent.com> + + Now, -P is the same as --no-dereference, per POSIX. + Use --parents to get the old meaning. + + * src/cp.c (enum) [NO_DEREFERENCE_OPTION]: Remove member. + (long_opts): Associate --no-dereference with `-P'. + (usage): Update description of -P. + (main): Remove local, used_P_option, and code to warn + that the meaning of -P would be changing. + +2001-10-13 Jim Meyering <meyering@lucent.com> + + * src/copy.c (copy_internal): Tighten up and add comments + describing the test for when to record (via remember_copied) + a <dst_path, source_dev, source_ino> triple. + Relax the test that guards the hard-linked-dir check and + the hard-link-preserving code. + + Remove the link-preserving semantics from cp_options.dereference. + Clean up the code that preserves links for `cp -d' and `mv'. + Introduce new options: + --preserve[={mode,ownership,timestamps,links,all}] + --no-preserve={mode,ownership,timestamps,links,all} + -p and --preserve remain unchanged and are equivalent to + `--preserve=mode,ownership,timestamps' + + * src/cp.c (enum) [NO_DEREFERENCE_OPTION]: New member. + (enum) [NO_PRESERVE_ATTRIBUTES_OPTION]: New member. + (enum) [PRESERVE_ATTRIBUTES_OPTION]: New member. + (long_opts): Separate -d and --no-dereference options. + Add `no-preserve'. + Separate -p and --preserve options. + The long-named --preserve now accepts optional arguments; -p doesn't. + (usage): Describe additions and changes. + (cp_option_init): Initialize new member, preserve_links, to 0. + (decode_preserve_arg): New function. + (main) [case 'a']: Set preserve_links to 1. + [case 'd']: Set preserve_links to 1. + Add `case' for long-named --no-dereference. + Handle long-named --no-preserve and --preserve. + + * src/copy.h (enum Dereference_symlink): Add comments. + (struct cp_options) [preserve_links]: New member. + * src/install.c (cp_option_init): Initialize new member to 0. + * src/mv.c (cp_option_init): Initialize new member to 1. + + * tests/cp/link-preserve: Add tests for some of the above. + +2001-10-13 Jim Meyering <meyering@lucent.com> + + * src/copy.h (struct cp_options) [failed_unlink_is_fatal]: Remove + unused member. + * src/mv.c (cp_option_init): Don't set it. + * src/cp.c (cp_option_init): Likewise. + * src/install.c (cp_option_init): Likewise. + + * src/copy.h (struct cp_options): Rename members: + s/preserve_owner_and_group/preserve_ownership/, and + s/preserve_chmod_bits/preserve_mode/. + * src/copy.c, src/cp.c, src/install.c, src/mv.c: Update all uses. + + * man/chown.x: Fix typo: s/Sh/SH/ before OPTIONS. + Reported by Eric S. Raymond. + +2001-10-12 Jim Meyering <meyering@lucent.com> + + * tests/ls/Makefile.am (TESTS): Add infloop. + (XFAIL_TESTS): Mark it as a test that we expect to fail (temporarily). + * tests/ls/infloop: New file. + +2001-10-11 Jim Meyering <meyering@lucent.com> + + * src/mknod.c (main): Tell what's wrong with `mknod c zero 1 5' rather + than saying just `Try `./mknod --help' for more information.'. + Suggestion from Karl Berry. + +2001-10-07 Jim Meyering <meyering@lucent.com> + + * TODO: Remove items relating to cp-hash.c, now that they're done. + + Allow cp -d (and mv when it resorts to copying) to preserve + hard links that span command line arguments. + + * src/cp.c (do_copy): Don't clear the hash table after processing + each command line argument. + * tests/cp/link-preserve: New test for the above. + * tests/cp/Makefile.am (TESTS): Add link-preserve. + + * src/cp-hash.c (remember_copied): Make a local copy of the file name. + (src_to_dest_free): New function (to free the above). + (hash_init): Register src_to_dest_free. + * src/copy.c (copy_dir): Now that remember_copied copies the + file name, free the temporary `dst_path' allocated here. + +2001-10-06 Jim Meyering <meyering@lucent.com> + + Convert du.c to use the functions in lib/hash.c, not private, + slightly-modified copies of those that used to be in cp-hash.c. + + * src/du.c (struct entry) [coll_link]: Remove member. + (struct htab): Remove. + (hash_reset, hash_init, hash_insert2, hash_insert): Remove functions. + + * src/du.c: Include hash.h and same.h. + (htab): Change type of global to `struct hash'; + (entry_hash, entry_compare, hash_ins): New functions. + (count_entry): Use hash_ins instead of hash_insert. + +2001-10-06 Jim Meyering <meyering@lucent.com> + + Rewrite cp-hash.c to use the functions in lib/hash.c. + + * src/cp-hash.c (hash_init): Die if hash_initialize fails. + + * src/cp-hash.c: Rewrite to use the functions in lib/hash.c. + * src/cp-hash.h: Update prototype for hash_init. + * src/mv.c (do_move): Reflect that hash_init now takes no arguments. + * src/install.c (main): Likewise. + * src/cp.c (main): Likewise. + +2001-10-06 Jim Meyering <meyering@lucent.com> + + * src/copy.c (record_dest): Avoid a small leak. + +2001-10-06 Jim Meyering <meyering@lucent.com> + + This decreases the memory footprint a little, when copying + hierarchies containing many files. + + * src/copy.c (copy_internal): Call remember_copied only if + the source file has 1 < st_nlink, or if it's a directory. + Now that EARLIER_FILE is set conditionally, initialize it to NULL. + + * tests/mv/childproof: Redirect stderr on one test. + +2001-10-05 Jim Meyering <meyering@lucent.com> + + * src/copy.c: Include hash-pjw.h and remove definition of hash_pjw. + * src/remove.c: Likewise. + +2001-10-01 Jim Meyering <meyering@lucent.com> + + * src/remove.c (hash_pjw): Remove function. + * src/copy.c: Likewise. + +2001-09-29 Jim Meyering <meyering@lucent.com> + + * src/copy.c (copy_internal): Call record_dest for all types of + files (for which this makes sense), not just regular ones. + + * mkinstalldirs: Update from master. + + * Makefile.maint (wget-update): Add mkinstalldirs. + +2001-09-28 Jim Meyering <meyering@lucent.com> + + This mv command should fail (likewise for cp), rather than + silently clobbering one of the source files. + rm -rf a b c; mkdir a b c; touch a/f b/f; mv a/f b/f c + Reported by Dan Jacobson. + + * src/cp.c (do_copy): Call dest_info_init if necessary. + * src/install.c (main): Likewise. + * src/mv.c (main): Likewise. + * src/copy.h (dest_info_init): Declare. + * src/copy.c: Include "hash.h" and "same.h". + (struct Dest_info): Define. + (dest_info): Declare global. + (DEST_INFO_INITIAL_CAPACITY): Define. + (hash_pjw): New function. + (dest_info_hash): Likewise. + (dest_info_compare): Likewise. + (dest_info_init): Likewise. + (seen_dest): Likewise. + (record_dest): Likewise. + (copy_internal): If the destination exists, fail if it's in the set + of files that have already been created as part of this mv or cp. + (copy_internal) [move_mode]: Record the destination dev/ino/filename. + (copy_internal) [!move_mode, regular file]: Likewise. + + Accept new option: --reply={yes,no,query} + * src/cp.c: (enum) [REPLY_OPTION]: Define. + (usage): Describe new option. + Split long usage string into smaller pieces. + (main): Handle new option. + + * missing: Update from master. + * config.guess: Likewise. + * config.sub: Likewise. + + * configure.ac: Tell automake to use the file name `config.hin' + rather than the two-`.' config.h.in. + +2001-09-26 Jim Meyering <meyering@lucent.com> + + * man/Makefile.am (common_dep): s/configure.in/configure.ac/. + + * configure.ac: Renamed from configure.in. + + * INSTALL, mkinstalldirs: Update to autoconf 2.50 version. + +2001-09-23 Jim Meyering <meyering@lucent.com> + + * tests/mv/childproof: New test, for the above fix. + Based on a report from Dan Jacobson. + * tests/mv/Makefile.am (TESTS): Add childproof. + + * Makefile.am (SUBDIRS): When using newer gettext (in which + intl/libintl.h is created by rules intl/Makefile) + `intl' must precede `lib'. + +2001-09-22 Jim Meyering <meyering@lucent.com> + + Mostly clean-up (modulo the better diagnostic). + * src/copy.c (copy_internal): Rename parameter, move_mode, to + command_line_arg, and adjust caller. Now, move_mode is a local + that is derived from command_line_arg. + Factor some involved code to produce something slightly more readable. + Use x->move_mode, not move_mode in determining which diagnostic + to give (`backing up %s would destroy source; %s not moved'). + +2001-09-16 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (usage): Fix typo in -g usage. + -H now means --dereference-command-line. + +2001-09-16 Jim Meyering <meyering@lucent.com> + + * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.5. + + * man/Makefile.am (*.1): Depend on *source* files, not binaries. + (.x.1): Add code to work around ginstall vs. install exception. + + * man/Makefile.am (dist_man_MANS): Use dist_man_MANS, not man_MANS. + +2001-09-15 Jim Meyering <meyering@lucent.com> + + Convert to a more conventional (e.g., like autoconf) Makefile.am. + * man/Makefile.am: Remove hacks. + * man/GNUmakefile: Remove file. + * man/Makefile.summ: Remove file. + * man/Makefile.maint: Remove file. + * man/ginstall.x: Remove. Renamed to ... + * man/install.x: ... this. New file. + Michael Stone reported that man pages weren't built in non-srcdir build. + + * src/touch.c (EISDIR): Define to 0, if not already defined. + (touch): Give a better diagnostic for e.g., `touch /' by non-root. + Based on a patch from Michael Stone. + Reported by Jeff Sheinberg as Debian bug #101677. + * tests/touch/fail-diag: New test, for the above fix. + * tests/touch/Makefile.am (TESTS): Add fail-diag. + + * src/copy.c (copy_internal) [move_mode]: Support the new + --reply=... option. + (UNWRITABLE): Define (factored out of copy_internal). + (copy_internal): Use UNWRITABLE. + + Accept new option: --reply={yes,no,query} + * src/mv.c: Include argmatch.h. + (enum) [REPLY_OPTION]: Define. + (usage): Describe new option. + Split long usage string into smaller pieces. + (main): Handle new option. + + * src/cp.c (main): Reflect renaming: s/I_ON/I_ASK_USER/. + + * src/copy.h (enum Interactive): Remove members, I_OFF and I_ON. + Instead, add I_ALWAYS_YES, I_ALWAYS_NO, and I_ASK_USER. + + * tests/mv/i-2: Clean up: use priv-check rather than open-coding it. + +2001-05-11 Paul Eggert <eggert@twinsun.com> + + * src/chmod.c, src/chown.c, src/mkdir.c, src/rm.c, src/rmdir.c (main): + Don't strip trailing slashes; POSIX doesn't allow it here. + Don't include "dirname.h" when no longer needed. + +2001-09-08 Jim Meyering <meyering@lucent.com> + + * src/copy.c (copy_internal): Add braces around now-multi-stmt + if-block. This fixes a bug introduced by my 2001-08-06 change. + * tests/mv/i-4: New test, for the above. + * tests/mv/Makefile.am (TESTS): Add i-4. + +2001-09-04 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (get_link_name): Update use of xreadlink. + +2001-09-02 Jim Meyering <meyering@lucent.com> + + * tests/priv-check: Change usage not to use $1. + That's not portable to e.g., Solaris2.6's /bin/sh. + Communicate via an envvar instead. + * tests/mv/i-3: Don't pass an argument to a sourced script. + * tests/cp/special-bits: Likewise. + * tests/chown/basic: Likewise. + + * Makefile.maint (alpha): Depend on local-check so that they run + a little earlier. + +2001-09-01 Jim Meyering <meyering@lucent.com> + + * src/df.c (show_point): Use canonicalize_file_name, if possible. + [HAVE_RESOLVEPATH], [!HAVE_RESOLVEPATH]: Use malloc, not alloca, + so that these two paths also produce `resolved' in malloc'd storage. + Free that memory when done with it. + + * src/ls.c: Include "xreadlink.h". + (get_link_name): Don't use PATH_MAX. + Rewrite to use xreadlink. + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + * src/chgrp.c: Do not include savedir.h; not used. + * src/chown.c: Likewise. + + * src/chmod.c (change_dir_mode): Remove statp arg; no longer needed. + * src/chown-core.c (change_dir_owner): Likewise. + * src/du.c (count_entry): Remove st_size argument. + * src/copy.c (copy_dir): Likewise. + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + * src/copy.c: Include full-write.h. + * src/dd.c: Likewise. + + * src/copy.c (full_write): Remove decl; not needed. + * src/dd.c: Likewise. + * src/install.c: Likewise. + * src/mv.c: Likewise. + + * src/copy.c (copy_reg): + Don't assume read and write size fits in int. + * src/dd.c (open_fd): Likewise. + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + * src/remove.c (bool): Remove; moved to... + * src/system.h: ...here. + + * src/du.c (count_entry, main): Reflect changes to the + exclude functions. + +2001-08-13 Jim Meyering <meyering@lucent.com> + + * src/cp.c, src/dd.c, src/ln.c, src/ls.c, src/mv.c (AUTHORS): Mark + string for translation, since it contains the English word `and'. + + * Makefile.maint (author_mark_check): New rule. + (local-check): Depend on it. + + Change the rules governing when mv prompts before removing an + existing destination file so it is consistent with POSIX: + Now, in the absence of --force (-f), if stdin is a tty and an + existing destination is not writable mv will prompt before + overwriting the destination file. + Reported by Vin Shelton. + + * src/copy.c (overwrite_prompt): New function. + (copy_internal): Separate the mv-specific and non-move_mode code + that determines whether to prompt the user. + [move_mode]: Don't make mv fail (i.e. don't return 1) just because + the user declined to remove one or more of the files. + * src/copy.h (enum Interactive): New type. + (struct cp_options) [interactive]: Change type to Interactive. + (struct cp_options) [stdin_tty]: New member. + * src/cp.c (cp_option_init): Adjust initialization of `interactive', + and initialize new member, stdin_tty. + * src/mv.c (cp_option_init): Likewise. + * src/install.c (cp_option_init): Likewise. + * src/cp.c (main): Adjust initialization(s) of `interactive', + * src/mv.c (main): Likewise. + * tests/mv/i-1: Change expected exit status to reflect the above. + +2001-08-12 Jim Meyering <meyering@lucent.com> + + * tests/mk-script ($program_name): Define. + (main): Use $program_name, rather than long-inaccurate `build-script'. + (main): Iterate over the sorted keys (rather than `while...each...'), + so this script produces the same output regardless of which version + of perl (e.g., perl5.6) is used. + + Work around non-compliant gettimeofday on Mac OS X 10.0.4, + (aka Darwin 1.3.7) that caused the date of the first file listed + in long output to be the current time rather than the file's mtime. + The real work is in m4/gettimeofday.m4 and the wrapper function, + lib/gettimeofday.c. + * src/ls.c: Include gtod.h. + (main): `Call' GETTIMEOFDAY_INIT. + (print_long_format): Add a comment about gettimeofday. + Report and diagnosis from Bernhard Baehr. + + * src/shred.c: Include gtod.h. + (main): `Call' GETTIMEOFDAY_INIT, just in case the code ever changes + to make it necessary. + +2001-08-10 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (print_long_format): Simplify previous patch for + listing negative sizes, by adding OFF_T_MAX - OFF_T_MIN + 1 + instead of doing a fancy conditional shift. This is simpler + and it avoids GCC's bogus compile-time warning about shift + counts. (As a bonus, it is portable to hosts that do not use + twos-complement arithmetic. :-) + +2001-08-10 Jim Meyering <meyering@lucent.com> + + * ls.c (print_long_format): Multiply the shift width by zero + to avoid a warning from gcc on hosts with an unsigned type for the + st_size member. + +2001-08-06 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (print_long_format): If a file size is negative, assume + the typical case where it has wrapped around from a positive value. + +2001-08-07 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (m4-check): New rule. + (local-check): Depend on it. + +2001-08-06 Jim Meyering <meyering@lucent.com> + + Fix the bug whereby `mv -uf source dest' would delete source, + even though it's older than dest. + + * src/mv.c (usage): Correct the description of --update. + * src/copy.c (copy_internal): Set *rename_succeeded, so that + the caller (mv) doesn't remove the source file. + Reported by Phelippe Neveu. + + * tests/mv/update: New test for the above. + * tests/mv/Makefile.am (TESTS): Add update. + +2001-08-05 Jim Meyering <meyering@lucent.com> + + * tests/root-only: Generalize. Rename to ... + * tests/priv-check: ...this. New file. Renamed from the above. + * tests/Makefile.am (EXTRA_DIST): Reflect renaming. + * tests/mv/i-3: Reflect name and usage changes. + * tests/chown/basic: Likewise. + * tests/cp/special-bits: Likewise. + * tests/sample-test: Likewise. + +2001-08-04 Jim Meyering <meyering@lucent.com> + + * tests/root-only: Remove *all* write access, not just that + of the owner. + + * tests/mv/i-3: New test for the above fix. + * tests/mv/Makefile.am (TESTS): Add i-3. + +2001-08-03 Paul Eggert <eggert@twinsun.com> + + * ls.c (quote_name): Pass 0 to mbsnwidth, since the default + got changed and we want the default now. + +2001-08-03 Paul Eggert <eggert@twinsun.com> + + * ls.c (quote_name): Pass 0 to mbsnwidth, since the default + got changed and we want the default now. + +2001-07-15 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (INCLUDES): Add -I../lib so sys2.h can include + the new, generated file, unlocked-io.h. + + * src/sys2.h: Include "unlocked-io.h", rather than hard-coding the + HAVE_*_UNLOCKED macros. + + * Makefile.cfg ($(srcdir)/m4/jm-glibc-io.m4): New rule. + +2001-07-14 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (tgz-size): Also work for sizes in the kilobyte range. + + * Makefile.maint: More changes from autoconf. + + Changes from autoconf. + * Makefile.maint (GZIP_ENV): Add --best. + (AMTAR): Define. + (writable-files): Factor out ../release/ constant, and work (by + creating it) even if such a directory doesn't exist. + +2001-07-08 Jim Meyering <meyering@lucent.com> + + * src/copy.c (get_dest_mode): Clear set-user-ID and set-group-ID bits + when copying (i.e., not in move mode) and not preserving permissions. + Reported by kytek@cybercomm.net. + FIXME: add a test for this!!! + +2001-07-02 Jim Meyering <meyering@lucent.com> + + * src/ln.c (do_link): Test the boolean symbolic_link, not the function, + symlink. Patch by Frederik Eaton. + +2001-06-17 Jim Meyering <meyering@lucent.com> + + * Makefile.maint: Factor out definitions specific to fileutils, + sh-utils, and textutils, so that other packages can use the framework. + Patch by Akim Demaille. + * Makefile.cfg: New file with package-specific definitions. + * GNUmakefile: Include Makefile.cfg. + * Makefile.am (EXTRA_DIST): Add Makefile.cfg. + +2001-06-16 Jim Meyering <meyering@lucent.com> + + * src/ls.c (main): Recheck global print_with_color after calling + parse_ls_color, since that function may have reset it. + Based on a patch from Richard Dawe. + +2001-06-16 Jim Meyering <meyering@lucent.com> + + * config.sub: Update from master repository. + * config.guess: Likewise. + +2001-06-09 Jim Meyering <meyering@lucent.com> + + * configure.in (ALL_LINGUAS): Add Turkish (tr). + +2001-05-25 Jim Meyering <meyering@lucent.com> + + * src/ls.c (print_long_format): Don't truncate user names + or group names that are longer than 8 characters. + + Add definitions that let me factor the wget rule while still letting + me accommodate the fact that these files reside in several different + directories and come from different places. + * Makefile.maint (wget-files): Define. + (get-targets, *-local_dir, *-url_prefix): Likewise. + (target, url, local_file): Convenience variables. + ($(get-targets)): The factored rule. + +2001-05-24 Jim Meyering <meyering@lucent.com> + + * src/ansi2knr.c: Update from master source. + + * Makefile.maint (wget-update): Have wget write to a temporary file, + and replace the original only if wget succeeds. + Also get ansi2nkr.c. + (move-if-change): Define. + (wget-update): Use it in place of mv. + + * src/ls.c: Use `#if D_TYPE_IN_DIRENT && defined DTTOIF' to + determine whether to enable the DT_INIT definition, not the less + portable `#if defined _DIRENT_HAVE_D_TYPE || defined DTTOIF'. + Reported by Eli Zaretskii. + + * src/mkfifo.c (main): Remove quotes around %s. + The argument is already quoted via the quote function. + * src/mknod.c (main): Likewise. + Reported by Göran Uddeborg. + +2001-05-21 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (wget-update): depcomp and missing are now in + automake's lib/ subdirectory. + +2001-05-11 Paul Eggert <eggert@twinsun.com> + + Add new --time-style option. + Change --full-time to be equivalent to --time-style=full-iso. + + * NEWS, doc/omni-utils.texi: Describe this change. + + * src/ls.c: Include "hard-locale.h". + (nstrftime): New decl. + (enum time_style): New enum. + (time_style_args, time_style_types): New constants. + (full_time): Remove. + (long_time_format): Initialize to POSIX defaults. + (TIME_STYLE_OPTION): New constant. + (long_options, decode_switches, usage): Add --time-style support. + (long_time_expected_width): Use nstrftime, not strftime. + (print_long_format): Likewise. + Increase initial size to match new full-iso time style. + + * tests/ls/time-1: Unset QUOTING_STYLE and TIME_STYLE. Set TZ. + Adjust to change in full-time format. + Fix typo in failure messages (-a and -m were interchanged). + +2001-05-20 Jim Meyering <meyering@lucent.com> + + * doc/Makefile.am (EXTRA_DIST): Add constants.texi and doclicense.texi. + (info_TEXINFOS): s/fileutils/omni-utils/. + (check-texinfo): New rule. + (check): Depend on check-texinfo. + + * doc/omni-utils.texi (uniq invocation): Document the new optional + arguments to the --all-repeated option. + Make all references to POSIX use @sc{posix}. + +2001-05-19 Jim Meyering <meyering@lucent.com> + + * doc/fileutils.texi: Remove. + + * doc/omni-utils.texi: Change a few uses of `timezone' to `time zone'. + Reported by Stephen Eglen. + +2001-05-16 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (my-distcheck): Remove work-around kludge and + associated comment, now that automake has ben fixed. + +2001-05-12 Paul Eggert <eggert@twinsun.com> + + Clean up some of the places where the code assumed that random + types like 'mode_t' fit into 'int', which POSIX doesn't guarantee. + + * src/ls.c (struct fileinfo.linkmode): Now st_mode. + (print_color_indicator, print_name_with_quoting, print_type_indicator, + length_of_file_name_and_frills): + Use mode_t, not unsigned int, to store modes. + (dired_dump_obstack): Do not assume size fits in 'int'. + (get_link_name): readlink returns ssize_t, not int. + (make_link_path): Store buffer size as size_t, not int. + (print_long_format): Use unsigned long, not unsigned, to print + nlink_t, uid_t, gid_t, major_t, minor_t. + +2001-05-13 Paul Eggert <eggert@sic.twinsun.com> + + * src/mknod.c (main): Check for NODEV device only if NODEV is defined. + * src/system.h (NODEV): Remove, undoing previous change. + +2001-05-13 Jim Meyering <meyering@lucent.com> + + * src/remove.c (dir_name, dir_len): Define to different names + to avoid shadowing warnings due to new declarations from dirname.h. + + * tests/Fetish.pm (run_tests): Fail if any test name is longer + than 12 bytes. + * tests/ls-2/tests: Shorten test names so the length of a + resulting file name doesn't exceed 14. + +2001-05-12 Paul Eggert <eggert@twinsun.com> + + * src/system.h (NODEV): New macro, if not already defined. + + * src/mknod.c (main): Check for overflow when converting out + of uintmax_t. Do not assume that major_t and minor_t are no + wider than int. Check for makedev failures. Convert device + numbers via uintmax_t, not unsigned long, just in case. + Coalesce duplicate code in the block and character device + cases. + +2001-05-11 Paul Eggert <eggert@twinsun.com> + + Add new --dereference-command-line option. + -H now means this instead of meaning --si, as POSIX requires. + + * NEWS, doc/omni-utils.texi: Document this. + + * src/ls.c (enum Dereference_symlink): New type. + (dereference): New var, replacing trace_links, which was removed. + (long_options, main, decode_switches, gobble_file, usage): + Implement the changes. + + * tests/ls-2/tests: + Rename slink-dir test to slink-dir-dF. Add new tests + slink-dir-F, slink-dir-dFH, slink-dir-dFL. + +2001-05-11 Paul Eggert <eggert@twinsun.com> + + dirname code cleanup. base_name now behaves more compatibly + with POSIX basename when given file names that have trailing + slashes, and similarly for dir_name. Add new primitives + base_len and dir_len. Put the directory-name-related decls + into dirname.h. + + * src/chmod.c (strip_trailing_slashes): Remove; now in dirname.h. + * src/chown.c (strip_trailing_slashes): Likewise. + * src/cp.c (strip_trailing_slashes): Likewise. + * src/df.c (strip_trailing_slashes): Likewise. + * src/ln.c (strip_trailing_slashes): Likewise. + * src/mkdir.c (strip_trailing_slashes): Likewise. + * src/rm.c (strip_trailing_slashes): Likewise. + * src/rmdir.c (strip_trailing_slashes): Likewise. + + * src/dircolors.c, src/ls.c, src/remove.c: + Include "dirname.h", to get base_name. + + * src/cp.c (make_path_private): Use dir_len instead of + dir_name, and avoid an extra mealloc call. + + * src/df.c (find_mount_point): No need to strip trailing + slashes before invoking new dir_name. + + * src/mv.c: Include "dirname.h". + (strip_trailing_slashes_2): Remove; now done by + strip_trailing_slashes. All callers changed. + + * src/sys2.h (base_name): Remove decl; now in dirname.h. + + * src/copy.c (copy_internal): Remove the code that tested for NULL + dir_name return value. That can't happen. + +2001-05-12 Jim Meyering <meyering@lucent.com> + + * src/ls.c (usage): Wording changes related to -o, -n, and -g. + * doc/omni-utils.texi: Likewise. + From Paul Eggert. + +2001-05-11 Paul Eggert <eggert@twinsun.com> + + * src/chmod.c (mode_changed, change_file_mode): + There's no need to invoke both lstat and stat here, so call just + one of the two functions. + +2001-05-11 Jim Meyering <meyering@lucent.com> + + * doc/omni-utils.texi: New file. The union of fileutils.texi, + sh-utils.texi, and textutils.texi. Merged by Brian Youmans. + + * src/shred.c (usage): Warn about backups and mirrors. + * doc/omni-utils.texi (shred invocation): Likewise. + From Nelson Beebe. + +2001-05-09 Jim Meyering <meyering@lucent.com> + + * src/ls.c (main): Don't set `format_needs_stat' for --recursive (-R), + because that would make `ls -RF dir' stat unnecessarily all of the + files in dir/ on some systems. + Similarly, don't set `format_needs_stat' for --dereference (-L), + because that would make `ls -RLF dir' stat unnecessarily all non-symlink + files in dir/ on some systems. + Instead, ... + (gobble_file): ... also stat a file if `trace_dirs' (-R) is set and its + type is unknown. + ... also stat a file if `trace_links' (-L) is set and the file is a + symlink or its type is unknown. + (print_dir): Also recognize DT_REG and DT_LNK. + +2001-05-07 Jim Meyering <meyering@lucent.com> + + * src/chown.c (main): Fix thinko that made --from=... fail: + s/argv[optind]/optarg/. Reported by Andrew Pham. + + * tests/chown: New directory. + * tests/chown/basic: New (root-only) test for the above. + * tests/cp/special-bits: Factor out the root-only test into this ... + * tests/root-only: ... new file. + * tests/Makefile.am (EXTRA_DIST): Add root-only. + (SUBDIRS): Add chown. + * tests/chown/Makefile.am: New file. + * configure.in (AC_OUTPUT): Add tests/chown/Makefile. + +2001-05-05 Jim Meyering <meyering@lucent.com> + + * src/ls.c (decode_switches): Complain if the envvar, QUOTING_STYLE, + is set to an invalid value. + Move some declarations of locals into scopes where they're used. + +2001-05-02 Jim Meyering <meyering@lucent.com> + + * doc/texinfo.tex: Update from master repository. + * config.sub: Likewise. + * config.guess: Likewise. + +2001-05-01 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (tgz-size, xd-size): Compute sizes. + (announcement): Include sizes of .tar.gz and .xdelta files + in the announcement. + + * src/ls.c (print_owner): New global variable. + (usage): Update the descriptions of -g. + (decode_switches): Honor the -g option (omit owner information), + now that POSIX specifies it. + (print_long_format): Don't print owner name if -g was specified. + Move declaration of `user_name' into the scope where it's used. + (print_group): Rename global from `inhibit_group'. Update all + uses accordingly. + * doc/fileutils.texi (What information is listed): Describe -g. + * TODO: Remove item for ls -g. + + * src/ls.c (decode_switches): Make -n work just like -l, except + with numeric IDs, per POSIX. Before, to have any effect, -n had + to be used with -l. Reported by Dale Scheetz. + (usage): Update the description of -n. + Separate the descriptions of -n and --numeric-uid-gid. + Split string in --help output that had exceeded my limit of + 2048 bytes. + +2001-04-29 Jim Meyering <meyering@lucent.com> + + * Version 4.1. + + * configure: Regenerate using a further-patched copy of autoconf-2.49e + to work around a bug in its test for ranlib. This is the change to + autoconf's acgeneral.m4 that was made on 2001-04-24. + + * README: Don't mention mvdir. It is no longer provided. + Don't mention HP/UX vs. du blocksize problem. It's long gone. + Remove note about how cp, mv, and ln couldn't make backups + of files with names of maximum length. Now they can do that. + Thank the people who have provided access to their systems + for portability testing. + Warn about and describe autoconf/automake version requirements. + Use a better URL for the GNU Coding Standards. + + * man/rm.x: Refer to shred. + Remove the example showing how to remove `-foo', since that is now + in the --help output (and hence automatically included). + * src/rm.c (usage): Mention shred. + + * src/shred.c (usage): Include in --help output the warning about + some of the filesystem types on which shred is not effective. + +2001-04-25 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (my-distcheck): Add a comment. + +2001-04-23 Jim Meyering <meyering@lucent.com> + + * Version 4.0.45. + +2001-04-22 Jim Meyering <meyering@lucent.com> + + * src/ls.c (decode_switches): Ensure that -1 has no effect when it + follows -l, per POSIX. Reported by Ulrich Drepper. + + * src/dd.c (usage): Mention that sync makes dd pad with spaces (rather + than NULs) when used with block or unblock. + (dd_copy): When using sync with either block or unblock, + pad with spaces. Reported by Dale Scheetz. + * tests/dd/skip-seek (block-sync-1): New test, for this. Based on + a report from Dale Scheetz. + * doc/fileutils.texi (dd invocation): Document it here, too. + + * configure: Regenerate using a patched copy of autoconf-2.49e to + work around a bug in its test for a working memcmp function. + This is the change to autoconf's acfunctions.m4 that was made + on 2001-04-22. + + * tests/ls/no-arg: New file. + * tests/ls/Makefile.am (TESTS): Add no-arg. + * src/ls.c (main): Fix off-by-one error introduced with last change. + +2001-04-21 Jim Meyering <meyering@lucent.com> + + * Version 4.0.44. + + * configure, aclocal.m4, etc.: Regenerate using autoconf-2.49e. + + * doc/fileutils.texi (touch invocation): Discuss ctime. + Based on suggestions and contributions from Aharon Robbins + and Dan Jacobson. + + * src/ls.c (main): When given two or more arguments but the only one + that exists is a directory, don't treat it as if it were the only + argument. Before, `mkdir d; ls no-dir d 2>/dev/null' would act like + `ls d' and produce no output. Now, it prints `d:'. + Report and patch from Stéphane Chazelas. + * tests/ls-2/tests: New tests, for the above fix. + +2001-04-08 Jim Meyering <meyering@lucent.com> + + * depcomp: New version, from automake. + +2000-10-31 Bruno Haible <haible@clisp.cons.org> + + * ls.c: Don't inspect MB_LEN_MAX. Paul Eggert says it's + not always defined correctly. + +2001-04-03 John David Anglin <dave@hiauly1.hia.nrc.ca> + + * tests/chgrp/basic: Ensure that initial group id's are properly set + for `d' and `d/f3'. + +2001-04-02 Jim Meyering <meyering@lucent.com> + + * tests/mv/setup: Skip nonexistent directories so we don't get + diagnostics from df about e.g., `/usr/tmp not found'. + +2001-03-24 Jim Meyering <meyering@lucent.com> + + * configure.in: Don't require autoconf version here -- it's done in m4/. + +2001-03-23 Jim Meyering <meyering@lucent.com> + + * Version 4.0.43. + + * configure, aclocal.m4, etc.: Regenerate using autoconf-2.49d. + + * Makefile.maint (check-copyright): New target and rule. + (alpha): Depend on it. + + * missing: Handle shell built-ins (only `:' and `cd' for now) to work + around brain damage in Ultrix's /bin/sh. + +2001-03-18 Jim Meyering <meyering@lucent.com> + + * Version 4.0.42. + + * tests/Fetish.pm: If the $DJDIR envvar is defined, set SHELL + to $DJDIR/bin/bash.exe. Patch from Richard Dawe, based on a + suggestion from Eli Zaretskii. + +2001-03-17 Paul Eggert <eggert@twinsun.com> + + * doc/fileutils.texi: Warn that touch DATE FILE will be withdrawn. + +2001-03-17 Jim Meyering <meyering@lucent.com> + + * tests/install/basic-1: Add the standard $VERBOSE-handling hook. + This test currently fails for mips-dec-ultrix4.4. + + * tests/install/create-leading: Use ../envvar-check rather than + open-coding the same tests. + + * tests/envvar-check: Set/use $as_unset, for those shells + (like Ultrix4's /bin/sh) that don't accept `unset'. + + * missing (--run): Use `eval' to run `"$@"'. Otherwise, Ultrix4.4's + /bin/sh fails and outputs garbage. + + * src/touch.c (usage): Tweak the obsolescent usage line so that + help2man recognizes it as such. Reported by Dan Jacobson. + +2001-03-16 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (wget-update): Also get `missing'. + Use for-loops. + + * missing: Update from automake. + +2001-03-11 Jim Meyering <meyering@lucent.com> + + * tests/rm/isatty: Disable this test, for now. + It would block when run in the background. + +2001-03-09 Jim Meyering <meyering@lucent.com> + + * config.guess: Update from master repository. + + * Makefile.maint (my_distdir): Define new variable, and use this + in place of most old uses of $(distdir). + + * src/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES). + Reported by Akim Demaille. + + * tests/help-version: Ensure that /dev/full is a character device + (using test -c) as well as being writable, before trying to write to it. + Otherwise, the test could mistakenly append a newline to an existing, + regular, writable, /dev/full file. + Suggested by Ulrich Drepper. + +2001-03-06 Jim Meyering <meyering@lucent.com> + + * src/dd.c (S_TYPEISSHM): Rename parameter to reflect its type. + (main): Pass a `struct stat *', not stat.st_mode to S_TYPEISSHM. + Patch by Alain Magloire. + +2001-03-04 Jim Meyering <meyering@lucent.com> + + * src/dd.c (output_char): Reformat so each statement is on a + separate line. + +2001-02-21 Jim Meyering <meyering@lucent.com> + + * src/mkdir.c (main): Remove assignment-in-if-expression. + In fact, remove t_errno altogether. Reported by Nelson Beebe. + + * tests/ls-2/tests: Add two tests of existing behavior -- both will + have to be changed (soon after release), once ls is fixed. + +2001-02-20 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (FULL_TIME_OPTION): Renamed from FULL_TIME, for + consistency with the other enum values. + +2001-02-20 Paul Eggert <eggert@twinsun.com> + + * NEWS, doc/fileutils.texi: ls -H is now obsolescent. + * src/ls.c (SI_OPTION): New enum value. + (long_options): Use it instead of 'H' for --si. + (decode_switches): Warn that -H will change soon. + (usage): Likewise. + +2001-02-18 Jim Meyering <meyering@lucent.com> + + * tests/rm/Makefile.am (TESTS): Add isatty. + * tests/rm/isatty: New test, for the bug fixed below. + + * Version 4.0.41. + + * depcomp: New version, from automake. + + `chmod 0 file; rm file' would no longer prompt before removal. + * src/remove.c (remove_file): Revert last change. + Reported by Vin Shelton. + +2001-02-17 Jim Meyering <meyering@lucent.com> + + * Version 4.0.40. + + * src/chown.c (main): `quote' the offending argument. + +2001-02-17 Paul Eggert <eggert@twinsun.com> + + Stop trying to support hosts that have nonstandard declarations for + mbrtowc and/or mbstate_t. It's not worth the portability hassle. + + * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC. + * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): + Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc). + * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise. + * lib/mbswidth.c, lib/quotearg.c, src/ls.c (mbrtowc, mbsinit): + Remove workaround macros for hosts that have mbrtowc but not + mbstate_t, as we now insist on proper declarations for both + before using mbrtowc. + Reported by Matt Schalit. + +2001-02-17 Jim Meyering <meyering@lucent.com> + + * config.sub: Update from master repository. + * config.guess: Likewise. + +2001-02-16 Paul Eggert <eggert@twinsun.com> + + * doc/getdate.texi: Mention that only English is supported. + Show how to use "date" so that the output is acceptable to getdate. + Mention Z as an abbreviation for UTC. + +2001-02-11 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (emit-rsync-commands): Define. + (alpha): Use it here. + +2001-02-10 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (alpha): Fix previous, incomplete change. + + * Version 4.0.39. + + * depcomp: New version, from automake. + +2001-02-04 Jim Meyering <meyering@lucent.com> + + * README: Remove note about now-ancient Sequents. + +2001-02-03 Jim Meyering <meyering@lucent.com> + + * src/ln.c (main): Change type of index variable to `unsigned int' + to avoid a warning. + + * config.guess: Update from master repository. + + * Makefile.maint (a_host): Use fencepost. + (real_dir): Use the same name for both. + (alpha): Print commands for both hosts. + + * src/mv.c (long_options): Use `strip-trailing-slashes', + per the documetation, not `strip-trailing-slash'. + * src/cp.c (long_opts): Likewise. + Reported by Oskar Liljeblad. + + * doc/fileutils.texi (mv invocation): Add a warning about how a trailing + slash makes a difference. Prompted by a report from Oskar Liljeblad + via Michael Stone (Debian bug#83991). + +2001-01-31 Jim Meyering <meyering@lucent.com> + + * config.sub: Update from master repository. + * config.guess: Likewise. + +2001-01-28 Jim Meyering <meyering@lucent.com> + + * Version 4.0.38. + + * configure, aclocal.m4, etc.: Regenerate using autoconf-2.49c. + + * src/ls.c (gobble_file): Add a FIXME comment. + + * TODO: Add a few items. + + * src/ls.c (enum) [FULL_TIME]: Define. + (long_options): Use it. + (decode_switches): Make --full-time imply -l. + Prompted by a report from Karl Eichwalder. + +2001-01-22 Jim Meyering <meyering@lucent.com> + + * src/remove.c (remove_file): Correct an expression to avoid making + an unnecessary call to euidaccess for each file. + +2001-01-21 Jim Meyering <meyering@lucent.com> + + * Version 4.0.37. + +2001-01-20 Jim Meyering <meyering@lucent.com> + + * configure.in: Remove jm_CHECK_ALL_TYPES. + Now it's invoked by jm_MACROS. + +2001-01-17 Jim Meyering <meyering@lucent.com> + + * src/sys2.h (case_GETOPT_VERSION_CHAR): Use PACKAGE, not GNU_PACKAGE. + * src/sync.c (main): Likewise. + * src/shred.c (PACKAGE): Likewise. + * src/dd.c (main): Likewise. + +2001-01-14 Jim Meyering <meyering@lucent.com> + + * Version 4.0.36. + + * src/shred.c (UINT_MAX_32_BITS): Define. + Use UINT_MAX_32_BITS in the cpp conditions that determine + the `word32' typedef. Using a literal `0xffffffff' failed with + HPUX10.20's /bin/cc. + + * config.sub: Update from master repository. + * config.guess: Likewise. + +2001-01-02 Volker Borchert <bt@teknon.de> + + Work around a broken rename system call, e.g. on SunOS 4.1.1_U1, + that fails when the source path has a trailing slash. + * src/copy.h [RENAME_TRAILING_SLASH_BUG]: Use the rename wrapper. + * tests/mv/trailing-slash: Test whether the workaround works. + * tests/m4/Makefile.am (TESTS): Add trailing-slash. + +2001-01-03 Alexandre Duret-Lutz <duret_g@epita.fr> + + * po/Makefile.in.in (update-po): Merge po-files in temporary files + in the build directory, and update the source directory only when + the merged catalog differs from the original. This fixes the known + `make distcheck' failure due to `make update-po' being called + on up-to-date but read-only files. + +2001-01-13 Jim Meyering <meyering@lucent.com> + + * src/copy.c (same_file_ok): When moving a symlink onto itself, + don't remove the symlink. Reported by David Luyer as Debian bug#82089, + via Michael Stone. + * tests/mv/into-self-4: New test for the above. + * tests/mv/Makefile.am (TESTS): Add into-self-4. + + * tests/chmod/setgid: If `chmod g+s d' fails, then try to chgrp + to a group of which we're a member, then try the chmod again. + +2001-01-11 Jim Meyering <meyering@lucent.com> + + * depcomp: New version, from automake. + +2001-01-10 Jim Meyering <meyering@lucent.com> + + * src/copy.c (copy_internal): Add a comment. + Set *copy_into_self in the new code that detects that. + Make diagnostic more consistent: s/won't/will not/. + [move_mode, copy_into_self]: Give a diagnstic here, now that + we have the top_level_* globals. Remove the corresponding diagnostic + from mv.c. + Add a FIXME comment. + * src/mv.c (do_move): Remove diagnostic, now that copy.c issues it. + Set `fail' to nonzero in the primary `if (copy_into_self)' block + rather than in its own tiny one below. + + * src/copy.c (copy_internal): Don't allow cp (or mv, when working + across a partition boundary) to overwrite a non-directory with a + directory. Reported by Michael J. Croghan. + * tests/cp/dir-vs-file: New test for the above. + * tests/cp/Makefile.am (TESTS): Add dir-vs-file. + +2001-01-09 Jim Meyering <meyering@lucent.com> + + Give a better diagnostic for `cp -R a a'. + * src/copy.c (top_level_src_path, top_level_dst_path): New globals. + (copy_internal): Use them. + (copy): Set them. + * src/cp-hash.c [struct entry] (node): Describe how it's used, + now that we've overloaded it, in order to detect and diagnose + the copying-directory-into-self problem. + (new_file): Remove global. + (htab): Declare global to be static. + (remember_created): Insert file name instead of dummy pointer, so + that copy.c can use the just-created directory name to detect + the copying-directory-into-self problem. + * tests/cp/into-self: New test for the above. + * tests/cp/Makefile.am (TESTS): Add into-self. + +2001-01-07 Jim Meyering <meyering@lucent.com> + + * src/cp.c (usage): Split a string that was longer than 2048 bytes. + + * doc/perm.texi: s/can not/cannot/ + +2001-01-07 Karl Eichwalder <ke@suse.de> + + * src/chown.c (usage): Split long message string. + +2001-01-07 Karl Eichwalder <ke@suse.de> + + * src/ls.c (usage): Untabify. + + * src/chgrp.c (parse_group): Normalize spelling. + +2001-01-03 Paul Eggert <eggert@twinsun.com> + + * NEWS: Document the planned --full-time change. + * doc/fileutils.texi: Likewise. + * NEWS: Document that time stamps depend on LC_TIME, not LC_MESSAGES. + +2001-01-03 Paul Eggert <eggert@twinsun.com> + + Use the more precise algorithm of GNU "make" to decide whether + a file is in the future, by looking at high-resolution time + stamps if available. + + * src/ls.c: + (TIMESPEC_NS): New macro. + (current_time): Initialize to the minimum value. + (current_time_ns): New var. + (main): Do not bother to initialize current_time; + it's no longer needed. + (get_current_time): New function. + (print_long_format): Use it when a file appears to be in the future. + Get the nanoseconds of the file's time stamp, if available, + and use that to decide whether the file appears to be in the future. + + * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): New macros. + +2001-01-02 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (long_time_expected_width, print_long_format): Fix + bug: the initial byte passed to strftime wasn't initialized to + a nonzero value after the buffer was reallocated. + +2001-01-02 Paul Eggert <eggert@twinsun.com> + + Make ls -l compatible with POSIX, which requires that the + behavior of time formats must depend only on LC_TIME, not on + LC_MESSAGES. + + * po/Makefile.in.in (install-data-yes): If the package is + fileutils, install LC_TIME as an alias for LC_MESSAGES. + * src/sys2.h (dcgettext): New macro. + * src/ls.c (decode_switches): Use dcgettext with LC_TIME, + not plain gettext, to get the translations of time formats. + +2001-01-02 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (long_time_expected_width): New function. + (print_long_format): Use it, so that we don't assume a + particular width for time stamps in an internationalized + environment. + +2001-01-01 Paul Eggert <eggert@twinsun.com> + + * doc/fileutils.texi, NEWS: + ls -l now reports the year for files even slightly in the future, as + POSIX requires. This helps warn users about clock skew problems. + + * src/ls.c (print_long_format): + Report the year for files even slightly in the future. + Avoid overflow problems near Y2038 on 32-bit hosts. + To calculate "six months", take half the average Gregorian + year, not 180 days. + +2001-01-01 Jim Meyering <meyering@lucent.com> + + * tests/chmod/Makefile.am (TESTS): Add setgid. + * tests/chmod/setgid: Test for chmod's existing behavior. + Based on a report from Paul Eggert. + +2000-12-29 Paul Eggert <eggert@twinsun.com> + + Clean up the terminology a tad: some directories were called "sticky" + when they were really setgid. + * tests/Makefile.am (EXTRA_DIST): sticky-check -> setgid-check + * tests/chmod/c-option, tests/cp/cp-parents, tests/mkdir/parents, + tests/mkdir/perm: Likewise. + * tests/setgid-check: File renamed from tests/sticky-check. + All uses of "sticky" changed to "setgid". + +2000-12-31 Jim Meyering <meyering@lucent.com> + + * tests/cp/Makefile.am (TESTS): Add deref-slink. + * tests/cp/deref-slink: New file. Test for the bug fixed by my + 2000-12-28 change to copy.c. + +2000-12-30 Paul Eggert <eggert@twinsun.com> + + * src/ls.c: Improve performance by invoking gettext twice at the start, + instead of once for each file. + (long_time_format): New var. + (decode_switches): Initialize it, if format == long_format. + (print_long_format): Use it. + +2000-12-30 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (print_long_format): Don't dump core if strftime + returns the empty string. + +2000-12-30 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (gobble_file): If not using long format, don't + invoke acl; it's not needed. + +2000-12-30 Jim Meyering <meyering@lucent.com> + + Avoid an unnecessary `stat' when using --dereference. + * src/copy.c (same_file_ok): Use stat only if lstat reported that + the file was a symbolic link. + +2000-12-29 Paul Eggert <eggert@twinsun.com> + + * doc/perm.texi: append-only directories -> restricted deletion flag, + which is the term that POSIX d5 uses for this notion. + +2000-12-28 Paul Eggert <eggert@twinsun.com> + + * tests/group-names: Try /usr/xpg4/bin/id (Solaris 7) if plain + 'id' doesn't work. + +2000-12-28 Jim Meyering <meyering@lucent.com> + + * tests/cp/cp-parents: Run sticky-check from just-created directory. + +2000-12-28 Jim Meyering <meyering@lucent.com> + + * src/copy.c (same_file_ok): Fix two typos from my 2000-09-03 change: + s/tmp_dst_sb/tmp_src_sb/. + +2000-12-27 Paul Eggert <eggert@twinsun.com> + + * tests/sticky-check: Turn off the working directory's sticky + bit, so that we don't have to worry about it later. + + * src/copy.c (same_file_ok): Use a single auto var for + tmp_dst_sb, instead of two static vars. Likewise for + tmp_src_sb. + +2000-12-26 Jim Meyering <meyering@lucent.com> + + * Version 4.0.35. + + * Regenerate build/config framework to use automake-1.4b and + the latest CVS version autoconf. + + * tests/mkdir/perm: Disable the test if the working directory has + the sticky bit set. + * tests/cp/cp-parents: Likewise. + Reported by Nelson Beebe. + +2000-12-25 Jim Meyering <meyering@lucent.com> + + Clean-up to avoid warnings from Irix's c89. + + * src/remove.c (hash_compare_active_dir_ents): Return explicit `true' + or `false', rather than relying on implicit int-to-enum cast. + * src/copy.c (same_file_ok): Remove declaration and set of unused + variables: src_sb_no_link, dst_sb_no_link. + * src/ls.c (extract_dirs_from_files): Remove unused variable. + Reported by Nelson Beebe. + + * src/ls.c (gobble_file): Move decl of local, val, into the scope + where it's used. + +2000-12-24 Jim Meyering <meyering@lucent.com> + + For both ln and install, when using `--backup=simple --suffix=S', + the suffix `S' wasn't used. + + * src/ln.c (main): Actually use the local variable, + `backup_suffix_string'. + * src/install.c (main): Likewise. + Nelson Beebe reported the unused variables. + * tests/ln/misc: Add a test for this (for all of cp, mv, ln, install). + + * man/help2man: Update to version 1.24. + +2000-12-22 Jim Meyering <meyering@lucent.com> + + * Version 4.0.34. + + * src/shred.c (isaac_seed_machdep) [_ARCH_PPC]: Disable the code + that would use the PPC mfspr `asm' code. Suggestion from Michael Stone. + +2000-12-19 Jim Meyering <meyering@lucent.com> + + * doc/fileutils.texi: Use `ref_file' in place of `file' to make + descriptions of the various --reference=... options clearer. + +2000-12-17 Jim Meyering <meyering@lucent.com> + + * doc/texinfo.tex: Update from master repository. + * config.sub: Likewise. + * config.guess: Likewise. + +2000-12-16 Jim Meyering <meyering@lucent.com> + + * src/chown-core.c (uint_to_string): New function. + (uid_to_name): Use it. + (gid_to_name): Use it. + Rename locals, user/group, to uid/gid. + + * src/chown-core.h (enum Change_status): Start with 1. + + * src/chown.c (main): Rename locals, user/group, to uid/gid. + * src/chgrp.c (main): Rename local, group, to gid. + + * tests/group-names: New file. + * tests/Makefile.am (EXTRA_DIST): Add group-names. + * tests/chgrp/basic: Use group-names. + * tests/chgrp/deref: Likewise. + * tests/chgrp/recurse: Likewise. + + * tests/chgrp/basic: Don't assume that creating a file gives it + group $g1. + + * tests/chgrp/Makefile.am (TESTS): Add recurse. + +2000-12-15 Jim Meyering <meyering@lucent.com> + + * src/chown-core.h [enum Dereference_symlink] (dereference): Rename + from change_symlinks. + * src/chown-core.c: Declare lstat. + Rename change_symlinks member to `dereference' and use the DEREF_* + enum values. + (describe_change): Merge the chgrp and chown switch statements. + Use xmalloc to form the `user:group' string. + (change_file_owner): Record (and later, use) is_symlink and is_directory + from the lstat stats, in order to control whether we operate on symlinks + and whether (with -R) we traverse symlinks to directories. + When dereferencing, use open/fchown (rather than chown) on symlinks. + * src/chown.c (main): Reflect renaming: s/dereference/change_symlinks/. + * src/chgrp.c (main): Likewise. + + * src/chown-core.c (describe_change): Use `:' (not `.') to separate the + username and group in messages evoked by the --verbose and --changes + options. + +2000-12-09 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (noinst_HEADERS): Add chown-core.h. + (chown_SOURCES): Define. + (chgrp_SOURCES): Define. + + * src/chgrp.c: Include "chown-core.h". + [enum Change_status, enum Verbosity]: Remove declarations. + Remove decls of globals that are now part of struct Chown_option. + Remove decl of xstat. + (describe_change): Remove function. + (change_file_group): Likewise. + (change_dir_group): Likewise. + (parse_group): Don't set global, groupname, here... + (main): ... instead, initialize `chopt.group_name' here. + Initialize chopt and update uses of the now-members. + Set group_name also when it's obtained via a --reference=FILE option. + Call change_file_owner (with -1 for uids), not change_file_group. + + * src/chown.c: Don't include pwd.h or grp.h -- no longer needed. + Include "chown-core.h". + [enum Change_status, enum Verbosity]: Remove declarations. + Remove decls of globals that are now part of struct Chown_option. + (describe_change): Remove function. + (change_file_owner): Likewise. + (change_dir_owner): Likewise. + (main): Initialize chopt and update uses of the now-members. + Set user_name and group_name also when they're obtained via a + --reference=FILE option. + Pass `chopt' to change_file_owner. + + * src/chown-core.c: Include <pwd.h>, <grp.h>, and "xalloc.h". + [!_POSIX_VERSION]: Declare getgrnam and getgrgid. + (gid_to_name): New function. + (uid_to_name): Likewise. + (chopt_free): Likewise. + + Factor out code that's common to chgrp.c and chown.c. + * src/chown-core.h: New file. + * src/chown-core.c (chopt_init): New function. + (describe_change): Extracted/combined from chgrp.c and chown.c. + (change_dir_owner): Likewise. + (change_file_owner): Likewise. + * po/POTFILES.in: Add src/chown-core.c. + + * configure.in (AC_OUTPUT): Add tests/chgrp/Makefile. + * tests/Makefile.am (SUBDIRS): Add chgrp. + * tests/chgrp: New directory. + * tests/chgrp/basic: New test. + * tests/chgrp/deref: Likewise. + * tests/chgrp/Makefile.am: New file. + + * src/chown.c (change_file_owner): Restore special file permission + bits, since calling chown resets them on some systems. + Reported by Matt Perry. + +2000-12-08 Andreas Schwab <schwab@suse.de> + + * tests/mv/mv-special-1: Don't make the success of the test depend + on the order in which directory entries are processed. + +2000-12-03 Jim Meyering <meyering@lucent.com> + + * src/ls.c (gobble_file) [USE_ACL]: Set have_acl member unconditionally + to avoid uninitialized memory reference via FILE_HAS_ACL. + + * Makefile.maint (alpha): Use rsync rather than scp, so the destination + file is created only after the successful completion of the copy. + +2000-12-02 Jim Meyering <meyering@lucent.com> + + * tests/ls/Makefile.am (TESTS): Add follow-slink. + * tests/ls/follow-slink: New file. + +2000-12-01 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (gobble_file): Do not fall back on lstat if stat + fails; POSIX.2 does not allow this. Invoke acl only on + non-symlinks, and only if lstat or stat succeeds. + +2000-12-02 Jim Meyering <meyering@lucent.com> + + * configure: Regenerate using the very latest version (in CVS) of + autoconf. + + * tests/dd/skip-seek: Remove test #2, now that support for the + `B' suffix is gone. + * tests/dd/Makefile.am (TESTS): Add skip-seek2 + * tests/dd/skip-seek2: New file. + +2000-12-01 Paul Eggert <eggert@twinsun.com> + + * src/dd.c (skip, dd_copy): Use ssize_t to store result of + safe_read, to avoid overflow e.g. on 64-bit Solaris sparc. + (dd_copy): Remove unnecessary cast. + +2000-12-01 Paul Eggert <eggert@twinsun.com> + + * doc/fileutils.texi: Remove B suffix. Document how to have + the desired effect without it. + + * src/dd.c: Undo most of the changes since 2000-11-24, since we've + documented a standard way to do it. + (skip_bytes, seek_bytes): Remove. + (usage): Remove B suffix. + (scanargs, skip, dd_copy, main): Remove support for B suffix. + +2000-11-28 Jim Meyering <meyering@lucent.com> + + * src/mkdir.c (main): Remove any trailing slash unconditionally. + Reported by Volker Borchert. + * tests/mkdir/t-slash: Add a test for this. + +2000-11-27 Jim Meyering <meyering@lucent.com> + + * Version 4.0.33. + + * tests/touch/no-rights: Use touch with `-d tomorrow' to avoid a + race condition. + + * tests/Fetish.pm (_compare_files): New function. + (_process_file_spec): Likewise. + (_at_replace): Likewise. + (run_tests): Support new keywords, AUX and CMP and associated + syntax and semantics. + + * config.sub: Likewise. + * config.guess: Likewise. + +2000-11-26 Jim Meyering <meyering@lucent.com> + + * src/dd.c (skip): Perform the `records < blocksize' test + at the top of the loop, not at the bottom. + +2000-11-26 Paul Eggert <eggert@twinsun.com> + + * src/dd.c (skip): New arg COUNT_BYTES. Read with BLOCKSIZE + bytes, but consider RECORDS to be a byte count if COUNT_BYTES + is nonzero. + +2000-11-25 Paul Eggert <eggert@twinsun.com> + + * doc/fileutils.texi: Document seek=nB and skip=nB. + + * src/dd.c (skip_bytes, seek_bytes): Now booleans, not counts. + (seek_records): Renamed from seek_record, for consistency with + skip_records and max_records. All uses changed. + + (usage, scanargs): Remove bseek=n and bskip=n; instead, use seek=nB + and skip=nB. + (enum Unit, Unit): Remove. + (skip, dd_copy, main): Undo most recent change. + (dd_copy, main): Pass blocksize of 1 as appropriate when + skip_bytes or seek_bytes is nonzero. + (main): Rework ftruncate failure diagnostic to always use byte count. + +2000-11-25 Jim Meyering <meyering@lucent.com> + + * src/dd.c: Add new options, bskip and bseek. + Based on a patch from Chris Sylvain. + * tests/dd/skip-seek: New tests. + * tests/dd/Makefile.am (TESTS): Add skip-seek. + +2000-11-24 Paul Eggert <eggert@green.twinsun.com> + + * src/dd.c (S_TYPEISSHM): New macro. + (main): Report failed fstat. + Complain only when ftruncate fails on a regular file, + a directory, or a shared memory object. + +2000-11-24 Jim Meyering <meyering@lucent.com> + + * src/dd.c: Declare a pointer parameters to be `const' as appropriate. + + * src/dd.c (main): Use ftruncate only on regular files. + Based on a patch from Michael Stone. + Reported by andras@kolumbus.fi at http://bugs.debian.org/77174. + +2000-11-23 Jim Meyering <meyering@lucent.com> + + * src/df.c (show_point): Before accepting an entry as a match, make + sure that the mount directory exists and has the required device number. + Before, e.g., `df /floppy' would mistakenly report on the root + partition if /floppy were not listed in /etc/mtab but / was. + Patch from Eirik Fuller (http://bugs.debian.org/76923). + + * src/chmod.c (mode_changed): New function. + (change_file_mode): Use it to determine accurately when -c should + make chmod announce there's been a change. + Based on a patch from Michael Stone. + Reported by Kai Henningsen as Debian bug #77349. + + * tests/chmod/c-option: New test for the above fix. + * tests/chmod/Makefile.am (TESTS): Add c-option + + * tests/sticky-check: New file. Factored out of tests/mkdir/parents. + * tests/Makefile.am (EXTRA_DIST): Add sticky-check. + * tests/mkdir/parents: Source sticky-check instead of open-coding it. + +2000-11-19 Jim Meyering <meyering@lucent.com> + + * tests/chmod/equal-x: Update to use its own directory, and better trap. + +2000-11-18 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (BLOCK_SIZE_OPTION, COLOR_OPTION, FORMAT_OPTION, + INDICATOR_STYLE_OPTION, QUOTING_STYLE_OPTION, + SHOW_CONTROL_CHARS_OPTION, SORT_OPTION, TIME_OPTION): New enum + values, to ensure that option values can't collide with chars. + (long_options, decode_switches): Use them. + +2000-11-18 Paul Eggert <eggert@twinsun.com> + + * src/sys2.h (GETOPT_HELP_CHAR, GETOPT_VERSION_CHAR): Now enum + constants rather than macros. Use values that cannot conflict + with C characters or with -1, CHAR_MAX + 1, etc. + +2000-11-18 Jim Meyering <meyering@lucent.com> + + * src/du.c (count_entry): Don't omit the size of a directory entry + merely because we couldn't `chdir' into it. That would give subtly + different results in some cases. Reported by Mattias Wadenstein + via Michael Stone. + + * src/ls.c: Revert change of 2000-11-11. It inadvertently change + the output format of `ls -l --full-time'. + + * src/mkdir.c (main): When failing to create a directory, give only + one diagnostic, not two. Reported by Volker Borchert. + + * src/mkdir.c (main): With --parents, remove any trailing slashes + from the argument to the final mkdir call. Required for NetBSD. + Reported by Volker Borchert. + * tests/mkdir/t-slash: New test for this. + * tests/mkdir/Makefile.am (TESTS): Add t-slash. + + * tests/mv/mv-special-1: Create and `cd' into temporary directory + before anything else. Reported by Volker Borchert. + + * configure, config.h.in, Makefile.in, etc.: Regenerate using the + very latest version (in CVS) of autoconf. + +2000-11-17 Jim Meyering <meyering@lucent.com> + + * Makefile.am (.NOTPARALLEL): Remove target. + * GNUmakefile (.NOTPARALLEL): ... put it here instead, since this + file is common to these packages: fileutils, sh-utils, textutils. + + * Makefile.am (.NOTPARALLEL): New target. Prevent unwanted parallelism. + Suggestion from Ulrich Drepper. + * po/Makefile.in.in (Makefile): Likewise. + + * Makefile.maint (sha1): Define. + (announcement): Include SHA1 digest of .tar.gz file. + +2000-11-14 Jim Meyering <meyering@lucent.com> + + * tests/mkdir/perm: Add an `echo' so that the input to the sed command + is NL-terminated. Otherwise, Solaris' /bin/sed generates no output. + Reported by Vin Shelton. + +2000-11-13 Paul Eggert <eggert@twinsun.com> + + * src/sys2.h (ST_TIME_CMP_NS): Fix typo: ST_MTIM_NSEC should + be tested with #ifdef, not with #if. + +2000-11-12 Jim Meyering <meyering@lucent.com> + + * src/ls.c (print_long_format): Remove obsolete comment. + From Paul Eggert. + + * doc/texinfo.tex: Update from master repository. + +2000-11-11 Paul Eggert <eggert@sic.twinsun.com> + + * src/ls.c (<langinfo.h>): Include if HAVE_LANGINFO_H. + (DATE_FMT_LANGINFO): New macro, taken from sh-utils/src/date.c. + (print_long_format): Use it to determine "date" format. + Do not wrap "%b %e %Y" and "%b %e %H:%M" in _(), as it results in + incorrect behavior when LC_ALL is unset, LC_TIME is "C", and + LC_MESSAGES or LANG is set to something disagreeing with the POSIX + locale. + +2000-11-11 Jim Meyering <meyering@lucent.com> + + * Version 4.0.32. + + * Makefile.maint (GZIP_ENV): Define to --no-name, so the timestamp + is not included in the .tar.gz file. + + * tests/mkdir/perm (tests): Use `empty' (instead of just blanks) to + indicate no `-m' option. Using just blanks wasn't portable to + Solaris2.5.1's /bin/sh. + + * tests/mkdir/perm: Don't put a newline in IFS; that's not portable to + NetBSD's /bin/sh. Instead, filter newlines and leading/trailing blanks + out of `tests' before the `set -'. + + * Makefile.maint (announcement): Limit depth of ChangeLog `find' to 2. + + * src/ls.c (print_long_format): Wrap the `--full-time' date format + string in _(...), so it too may be internationalized. + Suggestion from Jungshik Shin. + +2000-11-10 Jim Meyering <meyering@lucent.com> + + * src/touch.c (main): Interpret a lone numeric argument of 8 or 10 + digits as a file name, rather than as a date/time in the obsolescent + `MMDDhhmm[YY]' format. Reported by Wenjun Zheng. + * tests/touch/obsolescent: New test for this. + * tests/touch/Makefile.am (TESTS): Add obsolescent. + +2000-11-06 Jim Meyering <meyering@lucent.com> + + * tests/cp/cp-parents: Move mkdir tests into ../mkdir. + + * doc/fileutils.texi: Use Free Documentation Licence. + Change GNU to @sc{gnu} in many places. + + * doc/texinfo.tex: Update from master repository. + * config.sub: Likewise. + * config.guess: Likewise. + * man/help2man: Update from latest version: 1.23. + + * src/mkdir.c: Do not set the permissions of the final directory + component if it was not just created. + Based on a patch from Volker Borchert. + + * tests/rwx-to-mode: New file. + * tests/Makefile.am (EXTRA_DIST): Add rwx-to-mode. + * tests/mkdir/parents: New test for the above mkdir.c fix. + * tests/mkdir/Makefile.am (TESTS): Add parents. + (TESTS_ENVIRONMENT): Define srcdir=$(srcdir). + +2000-11-02 Won-kyu Park <wkpark@chem.skku.ac.kr> + + * src/df.c (print_header): Mark strings for translation. + +2000-11-05 Jim Meyering <meyering@lucent.com> + + * Version 4.0.31. + + * configure, config.h.in, Makefile.in, etc.: Regenerate using the + very latest version (in CVS) of autoconf. + + * src/mkdir.c (main): Use make_dir instead of using mkdir directly. + Diagnose as failure when mkdir tries to create (without the + --parent (-p) option) a directory that already exists. + * tests/cp/cp-parents: Add a test for the above fix. + + * tests/mv/mv-special-1: Clean up this test. + +2000-11-01 Jim Meyering <meyering@lucent.com> + + * Version 4.0.30. + + * src/chmod.c (main): Better diagnostics. + +2000-10-31 Jim Meyering <meyering@lucent.com> + + * tests/lang-default: Add all the internationalization-related + variable names autoconf uses. Set and export them in a loop. + + `mkdir -p' would create parent directories with permissions + that did not account for the umask. [introduced with the + 2000-09-30 change that became part of fileutils-4.0.28] + * src/mkdir.c: Include dirname.h. + Compute the parent directory `mode' unconditionally, effectively + as `$(umask -S),u+wx'. + Use make_path to create only the parent directories, thus using + the same code, both with and without -p, to create the final + component in each file name. Reported by Bob Proulx. + + Add tests for the above fix. + * tests/cp/cp-parents: Add some permission tests. + * tests/mkdir/perm: Fix the test so it actually does something. + Run each test also with mkdir's `-p' option and check permissions + on the parent directories. + +2000-10-23 Paul Eggert <eggert@twinsun.com> + + * doc/getdate.texi: Use @sc where appropriate. Document the + ranges of supported times more precisely. Correct menu + spacing. Document old Latin 12m/12pm tradition. Remove list + of alphabetic time zone names, as it wasn't correct and people + shouldn't be relying on it anyway. Relative items also + account for non-DST adjustments. Fix some misspellings. + +2000-10-30 Jim Meyering <meyering@lucent.com> + + * configure, config.h.in, Makefile.in, etc.: Regenerate using the + very latest version (in CVS) of autoconf. + +2000-10-29 Jim Meyering <meyering@lucent.com> + + * Version 4.0.29. + + * src/cp.c (do_copy): When constructing dst_path for use with the + --parents option, first remove any trailing slashes from the command + line argument. Otherwise, tests/cp/cp-parent would fail on NetBSD. + + * tests/cp/cp-parents: Add a test. + + * src/ls.c (DT_INIT): Define. + [enum filetype]: Remove the #ifdef, and use DT_INIT on the + initializers instead. `unknown' was undefined for some systems. + Reported by John David Anglin. + + * tests/lang-default (LC_COLLATE): Set it to the empty string and + export it. Otherwise, tests/cp/cp-mv-backup would fail e.g., when + LC_COLLATE was set to en. Reported by Vin Shelton. + +2000-10-28 Jim Meyering <meyering@lucent.com> + + * src/ls.c (main): In call to gobble_file with `"."', use `directory' + as the type, not `unknown'. + [enum filetype] (arg_directory): Rather than `100', use + a number that should never conflict with another DT_* value. + From Ulrich Drepper. + + * Version 4.0.28. + + Make `ls' a lot more efficient on systems (e.g., linux-2.4.*) + that store file type information in directory entries. + + * src/ls.c [enum filetype] (unknown): + Add members (as yet unused): + (HAVE_STRUCT_DIRENT_D_TYPE): Define. + (format_needs_type): New global. + (main): Set it. + (print_dir): Set `type' from directory entry, if possible. + (gobble_file): Add a parameter, TYPE. + Stat the file only if its type is unknown and we need the type. + Patch from Ulrich Drepper. + + Shred can now determine the size of a block devices (e.g. /dev/fd0) + by writing until a write operation fails. + + * src/shred.c: Include assert.h. + (fillrand): Add a parameter, size_max. + Adjust caller. + Add an assertion. + (dopass): Break out of the `for (;;)' loop if size < offset. + That can happen now that dopass is called with SIZE == -1. + (do_wipefd): Accept a length of zero only for a regular file. + If lseek fails or returns 0 for a non-regular file, let dopass + determine the length. + Inspired by a patch from Alan Iwi. + + * tests/Makefile.am (EXTRA_DIST): Add lang-default. + + * tests/rm/hash: Factor out the expensive-test-checking code, ... + * tests/expensive: ... into this new file. + * tests/cp/perm: Disable this test by default; it's expensive. + Mark this as an expensive test. + * tests/Makefile.am (EXTRA_DIST): Add expensive. + + * doc/fileutils.texi (shred invocation): Give two examples. + +2000-10-26 Jim Meyering <meyering@lucent.com> + + * doc/getdate.texi (Authors of getdate): Add Paul Eggert. + +2000-10-23 Jim Meyering <meyering@lucent.com> + + * Makefile.am (EXTRA_DIST): Add .prev-version. + +2000-10-22 Jim Meyering <meyering@lucent.com> + + * src/cp.c (make_path_private): Add a FIXME comment. + + * tests/lang-default: New file. Set LANG, LC_ALL, and LANGUAGE to '' + (rather than to `C') and export them into the environment. + Suggestion from Bruno Haible. + + * tests/cp/backup-is-src: Source lang-default rather than open-coding + the setting/exporting of LANG, LC_ALL, and LANGUAGE. + * tests/cp/cp-mv-backup: Likewise. + * tests/cp/same-file: Likewise. + * tests/cp/slink-2-slink: Likewise. + * tests/cp/symlink-slash: Likewise. + * tests/ln/sf-1: Likewise. + * tests/ls/symlink-slash: Likewise. + * tests/ls/time-1: Likewise. + * tests/mv/backup-is-src: Likewise. + * tests/mv/diag: Likewise. + * tests/mv/force: Likewise. + * tests/mv/hard-link-1: Likewise. + * tests/mv/i-2: Likewise. + * tests/mv/into-self: Likewise. + * tests/mv/into-self-2: Likewise. + * tests/mv/into-self-3: Likewise. + * tests/mv/mv-special-1: Likewise. + * tests/mv/part-symlink: Likewise. + * tests/mv/partition-perm: Likewise. + * tests/rm/r-1: Likewise. + * tests/rm/r-2: Likewise. + +2000-10-21 Jim Meyering <meyering@lucent.com> + + * tests/cp/cp-parents: New test. + * tests/cp/Makefile.am (TESTS): Add cp-parents; + +2000-10-19 Jim Meyering <meyering@lucent.com> + + * doc/texinfo.tex: Update from master repository. + * config.sub: Likewise. + * config.guess: Likewise. + * depcomp: Likewise. + +2000-10-18 Jim Meyering <meyering@lucent.com> + + * tests/mv/part-symlink: Make sure the programs use C-locale formats + and translations. Bruno Haible reported that this test would fail + when using other locales, because ls printed a translation of `total'. + +2000-10-16 Jim Meyering <meyering@lucent.com> + + * src/ls.c (print_long_format): Wrap date format strings in _(...) + so they may be internationalized. Suggestion from Christian Rose. + +2000-10-13 Jim Meyering <meyering@lucent.com> + + * src/mv.c (rm_option_init): Remove FIXME-maybe comment. + +2000-09-30 Jim Meyering <meyering@lucent.com> + + * tests/du/two-args: Update to use newer template. + + * src/install.c: Remove big, option-describing comment block. + (main): Rename local `symbolic_mode' to `specified_mode'. + + * src/mkdir.c (main): Don't set the umask to 0 and hand-apply + the previously-set umask unconditionally. Do that only when a + MODE has been specified. Otherwise, call mkdir with the full + creation mask (0777 or 0666) and let the kernel apply the umask. + The difference shows up only on file systems with ACL support + when the containing directory has a default ACL. + Patch by Andreas Gruenbacher. + (main): Rename local `symbolic_mode' to `specified_mode'. + * src/mknod.c (main): Likewise (but `call mknod', not mkdir). + Also, when MODE is specified, call chmod to ensure that the + permission bits are set as specified even when the containing + directory has a default ACL. + Patch by Andreas Gruenbacher. + * src/mkfifo.c (main): Likewise (but `call mkfifo', not mkdir). + Patch by Andreas Gruenbacher. + + * tests/mkdir/perm: New test. + * tests/mkdir/Makefile.am (TESTS): Add perm. + +2000-08-17 Andreas Gruenbacher <ag@bestbits.at> + + * src/chmod.c (change_file_mode): Perform the chmod even if the + file mode permission bits are the same as those that should be set. + Omitting the chmod call would be alright with minimal 1003.1e DS17 + ACLs, but eventually there may be other permissions in addition to + rwx. E.g., add and delete for directories, and something analogous + to NT's take ownership permission. + +2000-09-25 Jim Meyering <meyering@lucent.com> + + * tests/cp/same-file: Don't use `diff -u'. It's not portable. + Reported by Christian Krackowizer. + * tests/cp/same-file: Run `diff -c' only if cmp finds a difference. + * tests/mv/part-symlink: Likewise. And clean up. + + `shred --exact file1 file2' wouldn't touch `file1' + * src/shred.c (long_opts): --exact doesn't take an argument. + Reported by Alan Iwi. + * tests/shred/exact: New test for this. + * tests/shred/Makefile.am (TESTS): Add exact. + + * Makefile.maint (PREV_VERSION): Get the value from a file, rather + than trying to derive it from the current version number. + This is much more robust. + (alpha): Record just-released version number in `.prev-version', + and commit (post-tag). + + * Version 4.0.27. + +2000-09-24 Paul Eggert <eggert@twinsun.com> + + * doc/fileutils.texi: Update to more closely match changes in 4.0z. + * src/cp.c (usage): Match revised documentation better. + +2000-09-24 Jim Meyering <meyering@lucent.com> + + * src/cp.c (main): Tweak a relatively new diagnostic. + +2000-09-23 Jim Meyering <meyering@lucent.com> + + * tests/ls/time-1: Output more information when a test fails. + +2000-09-22 Jim Meyering <meyering@lucent.com> + + * src/install.c (cp_option_init): Once again make it so install always + unlinks an existing destination before trying to open it for writing. + Otherwise, installing onto a running shared library would make the + running program malfunction. + Reported by Dan Pascu via Michael Stone. + + * src/mv.c (do_move): Moving a directory specified with a trailing + slash from one partition to another, and giving it a different + name at the destination would cause mv to get a failed assertion. + Reported by Michael Stone. + (strip_trailing_slashes_2): Move function definition to precede + new first use. + * tests/mv/part-rename: New test for the above fix. + * tests/mv/Makefile.am (TESTS): Add part-rename. + + * src/copy.c (copy_internal): Don't try to unlink directories when + using --remove-dest with -R. + * tests/cp/dir-rm-dest: New test for the above fix. + * tests/cp/Makefile.am (TESTS): Add dir-rm-dest. + +2000-09-19 Jim Meyering <meyering@lucent.com> + + * doc/fileutils.texi (cp invocation): Describe how --force works. + Update description of -P (soon to change meaning to conform w/POSIX). + Describe --remove-destination. + + * src/cp.c (main): When used with --force, each of the --link and + --symbolic-link options now implies --remove-destination. + Reported by Miles Bader via Mike Stone. + * tests/cp/link: New file. Test for the above fix. + * tests/cp/same-file: Adjust for this change in behavior. + +2000-09-15 Volker Borchert <bt@teknon.de> + + * tests/Makefile.am (check-root, root-hint): New targets. + (check-recursive): Depend on root-hint. + * Makefile.am (check-root): New target. + +2000-09-16 Jim Meyering <meyering@lucent.com> + + * doc/perm.texi (Changing Special Permissions): Remove this statement: + ``a' in the USERS part of a symbolic mode does not cause the special + permissions to be affected'... It doesn't reflect what the code does + and isn't required by POSIX. Reported by aldomel@ix.netcom.com via + Mike Stone. + +2000-09-15 Jim Meyering <meyering@lucent.com> + + * config.sub: Update from master repository. + +2000-09-10 Jim Meyering <meyering@lucent.com> + + * tests/cp/cp-mv-backup (LC_ALL): Set to `C' and export to ensure + that `ls' sorts the same way for everyone. Reported by Vin Shelton. + + * Makefile.maint (b_host): Use freefriends.org, not tug.org. + +2000-09-09 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (announcement): Use a stricter regexp for the + previous version. + + * Version 4.0z. + + * tests/cp/special-bits: New file. + * tests/cp/Makefile.am (TESTS): Add special-bits. + (TESTS_ENVIRONMENT): Propagate $MAKE into environment, for special-bits. + + * src/copy.c (SAME_OWNER, SAME_GROUP, SAME_OWNER_AND_GROUP): Define. + (copy_internal): Avoid calling chown if we know it's not necessary. + + * src/copy.c (copy_internal): Call chmod also if we've made the + preceding chown call and we're supposed to preserve some special + permission bit(s) that would have been reset by chown. + Reported by Greg Louis. + +2000-09-08 Jim Meyering <meyering@lucent.com> + + * src/mkdir.c (S_IRWXUGO): Remove definition. + * src/sys2.h (S_IRWXUGO): Define here, instead. + +2000-09-07 Jim Meyering <meyering@lucent.com> + + * doc/texinfo.tex: Update from master repository. + * config.sub: Likewise. + * config.guess: Likewise. + +2000-09-05 Jim Meyering <meyering@lucent.com> + + * tests/mv/part-symlink: Redirect stdout to stderr before trying to + remove the temp directory. Otherwise, the `rm -rf' would get an + error because the output file wouldn't be closed and the directory + wouldn't be `empty'. + * tests/cp/same-file: Likewise. + + * tests/cp/same-file: Remove the `cp -dl sl1 sl2' case, + since it's no longer portable (hard link to a symlink). + Likewise for the `cp -bdl symlink foo' case. + + * config.guess: Update from master repository. + +2000-09-04 Jim Meyering <meyering@lucent.com> + + * src/cp.c: Move declaractions of lstat, stat, and rpl_lstat + as well as the definition of lstat from here... + * src/copy.h: ...to here. + * src/copy.c: Remove declaration of lstat, now that it's in copy.h. + + * tests/mv/force: mv's --force (-f) option is no longer needed for + this test, now that all it does is cancel --interactive (-i). + + * tests/cp/same-file: Add new tests using cp's --rem option. + Reflect the fact that cp's -f option no longer causes cp to remove the + destination file before trying to open it. + Reflect the fact that `cp -bdl' now makes a backup when copying a + symlink onto the file it points to (FIXME: look into this, and why + cp -bl does *not* do so). + + * src/ln.c (do_link): Tweak diagnostics. + +2000-09-03 Jim Meyering <meyering@lucent.com> + + * src/install.c (cp_option_init): Initialize new members. + + * src/cp.c (enum): Add UNLINK_DEST_BEFORE_OPENING. + [long_options]: Add an entry for --remove-destination. + (usage): Describe --remove-destination. + (do_copy): Use unlink_dest_after_failed_open member, not `force.' + (cp_option_init): Initialize new members. + (main): Handle UNLINK_DEST_BEFORE_OPENING (aka --remove-destination). + + * src/mv.c: Remove obsolete comment block. + (cp_option_init): Initialize new members. + (usage): Reflect the fact that --force (-f) relates only to whether + mv prompts. + (main): Remove uses of old `force' option member. + + * src/install.c (cp_option_init): Reflect + + `force' no longer means unlink-dest-before-opening + * src/copy.h (struct cp_options) [force]: Remove member. + [unlink_dest_before_opening]: Add member. `cp -f' and `mv -f' used to + do this. Now, you must use `cp --remove-destination' to get this + behavior. Now, `cp -f' and `mv -f' work as required by POSIX. + [unlink_dest_after_failed_open]: Add member. + Paul Eggert reported that `cp -f' removes an existing destination + file unconditionally, and that is contrary to POSIX. + + * src/copy.c (same_file_ok): New function, extracted from copy_internal, + and rewritten. + (copy_internal): Unlink destination file when unlink_dest_before_opening + option is set, and when the source is neither a regular file nor a + directory. + + * tests/mv/Makefile.am (TESTS): Add part-symlink. + + * src/ls.c: Use strcoll (not strcmp) when comparing file names. + Suggestion from Ulrich Drepper. + +2000-08-27 Jim Meyering <meyering@lucent.com> + + * src/copy.c (copy_reg): New parameters: X and NEW_DST. + Remove the SPARSE_MODE parameter. Update caller. + Perform POSIX-mandated (for cp) open-with-O_WRONLY|O_TRUNC when copying + a regular source file and the destination file exists; upon failure, + unlink that existing file, then open again, but with O_WRONLY|O_CREAT. + (copy_internal): `force' is not related to interactive; remove + the conjunct. + Remove the entire `else if (x->force)' block; justifying + removal of the non-directory part is easy: POSIX requires we try + to open an existing regular file, so we can't unlink it beforehand. + The part that changes the mode on a directory to allow overwriting + isn't necessary. + + * src/copy.c (copy_reg): Rename two goto labels. + (copy_internal): Set `new_dst' when the move_mode rename fails, + since we then unlink the destination file. + + * src/cp.c (usage): --force is independent of --interactive. + +2000-08-24 Jim Meyering <meyering@lucent.com> + + Put back the kludge. It's necessary after all. + * src/dd.c (buggy_lseek_support): New function. + (skip): Use it. + Frank Adler reported that although _llseek returns 0, lseek + erroneously returns an offset suggesting the operation succeeded + even though it fails. + + * install-sh: Double quote as needed, to protect against arguments + containing spaces or shell metacharacters. Reported by Bruno Haible. + +2000-08-23 Jim Meyering <meyering@lucent.com> + + * tests/dd/not-rewound: New test, for the SEEK_CUR vs. SEEK_SET part + of the last change. Based on Paul's example. + * tests/dd/Makefile.am (TESTS): Add not-rewound. + +2000-08-22 Paul Eggert <eggert@twinsun.com> + + * src/dd.c (skip): + Assume lseek failed if it returned zero, since a zero return is + impossible and some buggy drivers return zero. + + Use SEEK_CUR rather than SEEK_SET; this fixes a bug when the + file descriptor is not currently rewound. + +2000-08-23 Jim Meyering <meyering@lucent.com> + + * src/dd.c: Back out my last change. Paul's (above) is better. + +2000-08-22 Jim Meyering <meyering@lucent.com> + + Don't even try to use lseek on character devices. + * src/dd.c (buggy_lseek_support): New function. + (skip): Use it. + Reported by Martin Gallant via Michael Stone. + +2000-08-21 Jim Meyering <meyering@lucent.com> + + * tests/cp/same-file: Clean up traps. Create files in a subdir. + + * install-sh (oIFS): Remove unmatched double quote, left over from + my 2000-08-12 change. From J. David Anglin. + + * Makefile.maint (wget-update): Get the latest version of depcomp. + + * depcomp: Update from automake. + +2000-08-20 Jim Meyering <meyering@lucent.com> + + * Version 4.0y. + + Add support for cp's new POSIX-mandated -H and -L options. + * src/copy.h (enum Dereference_symlink): Define. + (struct cp_options) [dereference]: Change type to Dereference_symlink. + * src/copy.c: Declare lstat. + (copy_dir): Set `xstat' member to lstat so that with `-H' we don't + follow symlinks found via recursive traversal. + Update uses of `dereference' to compare against new enum member names. + * src/cp.c (long_opts): Add --dereference, -L. + (usage): Describe -L and -H. + (cp_option_init): Initialize to DEREF_UNDEFINED, not `1'. + (main): Add `H' and `-L' to getopt spec string. + [case 'a']: Initialize `dereference' to DEREF_NEVER, not 0. + [case 'd']: Likewise. + [case 'H']: New case. + [case 'L']: New case. + [case 'R']: Don't set dereference to `0' here. + If it's not yet defined, set x.dereference to DEREF_NEVER + if -R was specified, else set it to DEREF_ALWAYS. + Set x.xstat accordingly for -H. + * doc/fileutils.texi (cp invocation): Describe -H and -L. + * src/mv.c (cp_option_init): Initialize to DEREF_NEVER, not `0'. + * src/install.c (cp_option_init): Initialize to DEREF_ALWAYS, not `1'. + + * tests/cp/Makefile.am (TESTS): Add cp-HL. + * tests/cp/cp-HL: New test. + + * src/du.c (print_totals): Rename global from opt_combined_arguments. + +2000-08-17 Paul Eggert <eggert@twinsun.com> + + * src/copy.c (DO_CHOWN): Do not make a special case for non-root. + POSIX.2 requires that cp -p and mv attempt to set the uid of the + destination file, even if you're not root. This affects behavior + only on hosts that let you give files away via chmod. + * NEWS: Describe the above change. + +2000-08-15 Jim Meyering <meyering@lucent.com> + + * src/du.c (count_entry): Remember the current directory also for `.' + and `..'. Reported by Stephen Smoogen, based on a patch from H.J. Lu. + * tests/du/two-args: Add tests for this. + +2000-08-14 Jim Meyering <meyering@lucent.com> + + * src/copy.c (copy_reg): Move declaration of local, `n_read', into + the scope where it's used. + (copy_internal): In calling copy_reg, pass not the raw `src_mode', + but the possibly-umask-relative mode, `get_dest_mode (x, src_mode)'. + +2000-08-13 Jim Meyering <meyering@lucent.com> + + * src/copy.c (get_dest_mode): Rename from new_nondir_mode. + Honor the umask for `cp', but not for `mv' or `cp -p'. + (copy_reg): New 4th parameter, dst_mode. Pass it as 3rd arg. to open. + (copy_internal): Change type of locals `src_mode' and `src_type' from + int to mode_t. + Remove unnecessary local, `fix_mode'. + Combine two if-stmts into one. + Pass `src_mode' as 4th arg to copy_reg. + If we've just created a new regular file, return early, skipping the + chmod step. copy_reg now sets permissions of such files upon creation. + Use get_dest_mode, so there's just one chmod call here. + + * tests/cp/Makefile.am (TESTS): Add perm. + * tests/cp/perm: New tests, to help ensure the above didn't + change anything. + +2000-08-12 Jim Meyering <meyering@lucent.com> + + * tests/mv/into-self-2: Remove test for the VERSION_CONTROL and/or + SIMPLE_BACKUP_SUFFIX envvars. Source ../envvar-check instead. + * tests/mv/i-2: Likewise. + * tests/mv/to-symlink: Likewise. + * tests/cp/slink-2-slink: Likewise. + * tests/mv/partition-perm: Likewise. + * tests/cp/cp-mv-backup: Likewise. + + * tests/Makefile.am (EXTRA_DIST): Add envvar-check. + * tests/envvar-check: New file. + + * install-sh: Remove trailing blanks. + Output diagnostics to stderr, not stdout. + Remove many useless curly braces and double quotes. + +2000-08-11 J. David Anglin <dave@hiauly1.hia.nrc.ca> + + * install-sh: Improve error handling. + Do the job even when the target file is `busy' on systems + that don't allow such files to be unlinked. + +2000-08-12 Jim Meyering <meyering@lucent.com> + + * README: Remove note about how installation can fail and the + work-around, now that it's all automated. + +2000-08-07 Paul Eggert <eggert@twinsun.com> + + * src/cp.c (usage, main): For cp -P messages, mention the new + behavior as well as the old. + +2000-08-07 Paul Eggert <eggert@twinsun.com> + + Standardize on "memory exhausted" instead of "Memory exhausted" + or "virtual memory exhausted". + Invoke xalloc_die instead of printing our own message. + * src/chmod.c (main): Likewise. + * src/copy.c (copy_dir, copy_internal): Likewise. + * src/cp.c (do_copy): Likewise. + * src/dircolors.c (xstrndup): Likewise. + * src/install.c (main): Likewise. + * src/ln.c (do_link): Likewise. + * src/mkdir.c (main): Likewise. + * src/mkfifo.c (main): Likewise. + * src/mknod.c (main): Likewise. + * src/mv.c (movefile): Likewise. + * src/remove.c (remove_cwd_entries, rm): Likewise. + * src/shred.c (quotearg_colon, xmalloc): + "virtual memory exhausted" -> "memory exhausted" + +2000-08-07 Jim Meyering <meyering@lucent.com> + + * src/cp.c (enum) [PARENTS_OPTION]: New member. + (long_opts): Update "parents" and deprecated "path" entries to use + `PARENTS_OPTION', not `P'. + (usage): Update --help output. + (main): Warn that the meaning of `-P' will soon change. + +2000-08-06 Jim Meyering <meyering@lucent.com> + + * doc/fileutils.texi (cp invocation) [-r]: Remove inaccurate mention of + `non-symbolic links'. + +2000-08-05 Jim Meyering <meyering@lucent.com> + + * config.guess: Update from master repository. + * config.sub: Likewise. + + * Regenerate build/config framework to use the latest CVS versions + of automake and autoconf. + +2000-07-31 Jim Meyering <meyering@lucent.com> + + * src/shred.c [!HAVE_CONFIG_H]: Use `virtual memory exhausted', not + `Memory exhausted'. + +2000-07-30 Jim Meyering <meyering@lucent.com> + + * src/sys2.h (ISPRINT): Undef before defining to avoid warning. + + * src/copy.c (copy_internal): Quote the file names that are displayed + with --verbose and --backup. + * src/remove.c (remove_file): Quote the file names that are displayed + with --verbose. + (remove_dir): Likewise. + * tests/mv/mv-special-1: Add quote marks to match new behavior. + * tests/rm/r-1: Likewise. + * tests/rm/r-2: Likewise. + + * src/df.c: Convert "`%s'" in format strings to "%s", and wrap each + corresponding argument in a `quote (...)' call. + * src/dircolors.c: Likewise. + * src/du.c: Likewise. + * src/mkdir.c: Likewise. + * src/mkfifo.c: Likewise. + * src/mknod.c: Likewise. + * src/shred.c: Likewise. + * src/rmdir.c: Likewise. + * src/cp-hash.c: Likewise. + + * src/chgrp.c: Convert "`%s'" in format strings to "%s", and wrap each + corresponding argument in a `quote (...)' call. + Add more precise diagnostics. + * src/chmod.c: Likewise. + * src/chown.c: Likewise. + + * src/remove.c (remove_cwd_entries): Quote one more file name. + + * src/help-version: Remove file. Move it to ... + * tests/help-version: ...here + * tests/Makefile.am (TESTS): Set to help-version. + (TESTS_ENVIRONMENT): Define. + (EXTRA_DIST): Add $(TESTS). + * src/Makefile.am (EXTRA_DIST): Remove help-version. + (TESTS): Remove definition. + (TESTS_ENVIRONMENT): Remove definition. + +2000-07-24 Bruno Haible <haible@clisp.cons.org> + + * src/ls.c: Include <limits.h>, <stdlib.h>, <wchar.h>, <wctype.h>. + (quote_name): Use mbrtowc to step through the filename string while + replacing nonprintables with question marks. Return the screen width, + not the strlen length. Do no output if the out stream is NULL. + (length_of_file_name_and_frills): Use the quote_name return value. + +2000-07-25 Jim Meyering <meyering@lucent.com> + + * src/chgrp.c (change_file_group): Save errno from a possibly failed + chown, and use that later. Otherwise, errno itself could be clobbered + before used. + * src/chmod.c (change_file_mode): Likewise. + * src/chown.c (change_file_owner): Likewise. + + * src/mv.c (main): Remove unnecessary "%s" argument. + + * src/ln.c: Convert "`%s'" in format strings to "%s", and wrap each + corresponding argument in a `quote (...)' call. + Add more precise diagnostics. + * src/mv.c: Likewise. + * src/cp.c: Likewise. + * src/touch.c: Likewise. + +2000-07-23 Jim Meyering <meyering@lucent.com> + + * Version 4.0x. + + * src/dd.c (main): Give a better diagnostic for e.g., + `dd if=/dev/fd0 seek=100000000000'. + Convert "`%s'" in format strings to "%s", and wrap each + corresponding argument in a `quote (...)' call. + Add many, more precise diagnostics. + + * src/remove.c (ASSIGN_STRDUPA): Remove macro definition. + * src/sys2.h (ASSIGN_STRDUPA): New macro (moved here from remove.c). + + Fix cp so that `cp -r DIR1/ DIR2' works once again. + * src/cp.c (ASSIGN_BASENAME_STRDUPA): New macro. + (do_copy): Use it here (so we always strip trailing slashes before + calling base_name). Reported by Branden Robinson via Michael Stone. + + Test for the above fix. + * tests/cp/Makefile.am (TESTS): Add dir-slash. + * tests/cp/dir-slash: New file. + +2000-07-17 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (WGET): Define. + (ftp-gnu): Define. + (wget-update): New rule, based on the one in autoconf. + + * src/shred.c (usage): Give a little more info. + Remove a FIXME comment. + + Avoid warnings. + * src/ls.c (struct bin_str): Declare `string' member to be `const'. + (put_indicator): Declare local `p' to be `const'. + +2000-07-15 Jim Meyering <meyering@lucent.com> + + Begin converting "`%s'" in format strings to "%s", and wrap each + corresponding argument in a `quote (...)' call -- if there's only one. + If there are two or more, then use `quote_n (0, ...), + quote_n (1, ...), ...'. + + Here's the justification, from Paul Eggert (thanks, Paul): + + [Consider] the following, taken from fileutils/copy.c: + + error (0, errno, _("cannot create directory `%s'"), dst_path); + + Now, suppose dst_path is "/'\nrm: removing all files under `/" + (expressed in C string syntax). This will cause the user to see + the following delightfully ambiguous display: + + cp: cannot create directory `/' + rm: removing all files under `/' + + It would be better to rewrite the above line to be something + like this: + + error (0, errno, _("cannot create directory %s"), quote (dst_path)); + + using the definition of "quote" [in lib/quote.c]. That way, + the user will see the following unambiguous display instead: + + cp: cannot create directory `/\'\nrm: removing all files under `/' + + One might object that any user who asks to copy a file with + a weird name like that deserves to get confused. But this + is not a good objection, as the source of the string may not + be under the user's control, or even visible to the user. + + * src/copy.c: Adapt format strings and args as above. Include quote.h. + I have deliberately not changed the output of --verbose. + FIXME: maybe I should. + * src/cp.c: Likewise. + * src/remove.c: Likewise. + * src/install.c: Likewise. and improve a couple diagnostics. + +2000-07-13 Paul Eggert <eggert@twinsun.com> + + * NEWS: Describe --quoting-style=clocale. + + * doc/fileutils.texi: New clocale quoting style. + Undo the previous change to the locale quoting style. + +2000-07-09 Jim Meyering <meyering@lucent.com> + + * config.guess: Update from FSF. + * config.sub: Likewise. + +2000-07-05 Paul Eggert <eggert@twinsun.com> + + * doc/fileutils.texi: Don't use ` and ' for quoting. + +2000-07-01 Jim Meyering <meyering@lucent.com> + + * Version 4.0w. + + * tests/touch/dangling-symlink: Warn about the problem rather + than failing, on some very recent (at least 2.3.99) versions of + the Linux kernel. Suggestion from Ulrich Drepper. + * tests/touch/Makefile.am (TESTS_ENVIRONMENT): Define host_triplet + for use in the dangling-symlink test. + +2000-06-28 Jim Meyering <meyering@lucent.com> + + * tests/mv/i-2: Don't copy `out' into /tmp. + +2000-06-26 Paul Eggert <eggert@twinsun.com> + + Now that savedir.c has been cleaned up... + * src/chgrp.c (change_dir_group): Don't set errno before + invoking savedir, and assume that errno is nonzero if savedir fails. + * src/chmod.c (change_dir_mode): Likewise. + * src/chown.c (change_dir_owner): Likewise. + * src/copy.c (copy_dir): Likewise. + * src/du.c (count_entry): Likewise. + +2000-06-26 Paul Eggert <eggert@twinsun.com> + + * src/df.c (show_dev): Round disk usage percentage up, not to + nearest value. Use integer arithmetic if it's easy. Fix bug + when converting twos-complement negative values to floating point. + +2000-06-25 Jim Meyering <meyering@lucent.com> + + * src/copy.c (copy_internal): Don't return immediately after a failed + copy_dir call -- otherwise, the failure to read a single file in a + source directory would cause the containing destination directory + not to have the owner and/or permissions set properly. + Reported by Piotr and Maciej Kwapulinski. + * tests/cp/fail-perm: Test for it. + * tests/cp/Makefile.am (TESTS): Add fail-perm. + + * Version 4.0v. + +2000-06-18 Jim Meyering <meyering@lucent.com> + + * README-alpha: Update. + +2000-06-17 Jim Meyering <meyering@lucent.com> + + * tests/install/basic-1: Don't fail (just exit 77) if strip doesn't + work. Suggestion from Ulrich Drepper. + Add canonical trap/mkdir/cd, plus exit portability cruft. + +2000-06-16 Jim Meyering <meyering@lucent.com> + + * src/copy.c (copy_reg): Give a slightly better diagnostic upon + open failure. + +2000-06-15 Paul Eggert <eggert@twinsun.com> + + * NEWS, doc/fileutils.texi: df, du, and ls now round disk + usage up and disk free space down. + + * src/df.c (df_readable): New arg for rounding style. + Round negative numbers correctly. + (show_dev): Round disk usage up and disk free space down. + + * src/ls.c (print_dir, gobble_file, print_long_format, + print_file_name_and_frills): Round disk usage up. + * src/du.c (print_size): Likewise. + +2000-06-14 Andreas Schwab <schwab@suse.de> + + * tests/rm/r-1 (framework_failure): Initialize this instead of + test_failure. + +2000-06-12 Jim Meyering <meyering@lucent.com> + + * Version 4.0u. + + * tests/rm/r-1: Clean up. + Be careful to remove temp directory upon interrupt. + + * src/mv.c (main): Give the correct diagnostic when using the + --target-dir=DIR option, but no arguments. + Patch from Michael Stone. Reported by Herbert Xu. + * tests/mv/diag: New test for this. + * tests/mv/Makefile.am (TESTS): Add diag. + +2000-06-08 Brian Youmans <3diff@gnu.org> + + * doc/perm.texi (Multiple Changes): Fix typo. + * doc/fileutils.texi: A few typos and minor formatting fixes. + * doc/getdate.texi: Likewise. + +2000-06-06 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (alpha_subdir): Factor out `gnu/fetish'. + +2000-06-04 Jim Meyering <meyering@lucent.com> + + * Version 4.0t. + + * src/df.c (show_point) [HAVE_REALPATH && !HAVE_RESOLVEPATH]: + Cast undeclared `realpath' to char* to avoid warning. + +2000-06-03 Jim Meyering <meyering@lucent.com> + + * src/install.c (usage): Document that -v is a synonym for --verbose. + * src/mkdir.c: Allow -v as synonym for --verbose, to be consistent + with other fileutils. + * src/rmdir.c: Likewise. + Suggestion from François Pinard. + +2000-06-02 Jim Meyering <meyering@lucent.com> + + * configure.in (ALL_LINGUAS): Add Danish (da). + +2000-05-29 Jim Meyering <meyering@lucent.com> + + Allow `cp -d -u' to copy one symlink onto another that's identical. + * src/copy.c (copy_internal): Change the || to ^ in the big sameness + test, so copying one symlink onto another, identical one doesn't fail + here. + If the symlink call fails, don't report the failure if the destination + already exists and is a symlink pointing to the proper name. + Reported by Andrew Burgess. + * tests/cp/slink-2-slink: New test. + * tests/cp/Makefile.am (TESTS): Add slink-2-slink. + * tests/cp/same-file: Adapt to fit new semantics of `cp -d'. + +2000-05-25 Jim Meyering <meyering@lucent.com> + + * src/dd.c (close_stdout_wrapper): Don't dereference NULL pointer. + From Bob Proulx. + +2000-05-23 Jim Meyering <meyering@lucent.com> + + * tests/shred/remove: Add traps to clean up. + Correct broken running-as-root test. + + * tests/mv/i-2: Exit 77 when run as root. Reported by Andreas Schwab. + +2000-05-20 Jim Meyering <meyering@lucent.com> + + * Version 4.0s. + + * tests/mv/Makefile.am (TESTS): Add i-2, for 2000-05-12 change. + + * tests/rm/r-2: Clean up. + * tests/ls/time-1 (LC_ALL): Set it unconditionally. + +2000-05-19 Jim Meyering <meyering@lucent.com> + + Save device number as well as inode number for each directory, + and use both in comparisons. This makes the directory cycle + test more robust, and closes the small remaining hole whereby + an attacker could subvert a running `rm -r' command. + + * src/remove.c (struct active_dir_ent) [st_dev]: New member. + [st_ino]: Rename from `inum'. + (make_active_dir_ent) [device]: New parameter. + (hash_compare_active_dir_ents): Compare using SAME_INODE macro. + (fspec_init_common): New function, factored out. + (fspec_init_file): Initialize have_device member. + (fspec_get_full_mode): Remove parameter. Update caller. + Set have_device and st_dev members. + * src/remove.h (struct File_spec) [have_device, st_dev]: New members + +2000-05-18 Jim Meyering <meyering@lucent.com> + + * src/remove.c (rm): Combine adjacent fputc and fprintf. + + * tests/rm/Makefile.am (TESTS): Add hash. + * tests/rm/hash: New test for the fix in lib/hash.c. + +2000-05-17 Jim Meyering <meyering@lucent.com> + + * src/remove.c (remove_dir): Detect (and fail upon) attempt to subvert + a running `rm -r'. Reported by Morten Welinder. + +2000-05-15 Jim Meyering <meyering@lucent.com> + + * src/ln.c (do_link): Use complete strings in diagnostics so they + are easier to translate. Reported by Michel Robitaille. + (main): Drop support for the case in which S_ISLNK wasn't defined. + It was broken in any case. + + * tests/ls/time-1: Set LC_ALL to `C' to avoid failure when the + current locale is not C (POSIX). From Matthew Clarke. + +2000-05-13 Jim Meyering <meyering@lucent.com> + + * src/help-version: New test. + * src/Makefile.am (TESTS): Define. + (TESTS_ENVIRONMENT): Likewise. + (EXTRA_DIST): Add help-version. + + * src/chgrp.c: Arrange to call close_stdout only upon exit. + * src/chmod.c: Likewise. + * src/chown.c: Likewise. + * src/cp.c: Likewise. + * src/df.c: Likewise. + * src/dircolors.c: Likewise. + * src/du.c: Likewise. + * src/install.c: Likewise. + * src/ln.c: Likewise. + * src/ls.c: Likewise. + * src/mkdir.c: Likewise. + * src/mkfifo.c: Likewise. + * src/mknod.c: Likewise. + * src/mv.c: Likewise. + * src/rm.c: Likewise. + * src/rmdir.c: Likewise. + * src/shred.c: Likewise. + * src/sync.c: Likewise. + * src/touch.c: Likewise. + + * src/dd.c: Include closeout.h. + (usage): Don't call close_stdout here. + (close_stdout_wrapper): New, kludgey, function and file-scoped global. + (main): Register it with atexit. + +2000-05-12 Jim Meyering <meyering@lucent.com> + + Unlike for mv, -i doesn't cancel the effect of -f + and -f doesn't cancel the effect of -i. + * src/cp.c (main) ['f']: Don't reset `x.interactive'. + ['i']: Don't reset `x.force'. + * src/copy.c (copy_internal): Fix force and interactive tests. + Patch from Michael Stone, reported by Jeff Sheinberg. + +2000-05-09 Jim Meyering <meyering@lucent.com> + + * src/shred.c: Include sys/types.h in shred.c before including + sys/stat.h or system.h. From John David Anglin. + +2000-05-08 Jim Meyering <meyering@lucent.com> + + * tests/shred/remove: Don't use touch in root test. Instead, append to + the test file, since now touch operates even on files which deny owner + write access. + +2000-05-06 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (shred_LDADD): Add @LIB_CLOCK_GETTIME@. + + * src/rmdir.c (EEXIST): Remove now-unused definition. + (ENOTEMPTY): Likewise. + (errno_rmdir_non_empty): Rewrite to use RMDIR_ERRNO_NOT_EMPTY, + which is determined by the autoconf test in m4/rmdir-errno.m4. + +2000-05-03 Bruno Haible <haible@clisp.cons.org> + + Don't fail when running `make check' with non-`C' locale. + * tests/cp/symlink-slash: During ls, set LANGUAGE (for GNU gettext) + and LC_ALL (for systems which look at LC_MESSAGES). + * tests/rm/r-2: Define LC_ALL instead of LANG, in case the user has + LC_CTYPE or LC_ALL set. Define it and LANGUAGE before the first use + of sort. + +2000-05-03 Jim Meyering <meyering@lucent.com> + + With a recent glibc, _GNU_SOURCE, and -O, strndup may be a macro. + * src/sys2.h (!HAVE_DECL_STRNDUP): Declare strndup. + * src/dircolors.c: Remove declaration of strndup. + Reported by Bruno Haible. + +2000-05-02 Jim Meyering <meyering@lucent.com> + + * src/rm.c (usage): Add the answer to `How do I remove a file named -f?' + +2000-05-01 Jim Meyering <meyering@lucent.com> + + * src/install.c (change_attributes): Don't even attempt the chmod + if the chown fails. Before, when a non-root user ran `install -m 4755 + -o nobody FILE DEST', DEST would set-uid not to `nobody' but rather to + the ID of the installing user. Reported by Marc Olzheim. + +2000-04-30 Jim Meyering <meyering@lucent.com> + + * src/touch.c (O_NOCTTY): Define if not defined already. + (touch): Add O_NOCTTY to the flags passed to open. + +2000-04-29 Jim Meyering <meyering@lucent.com> + + * Version 4.0r. + + * src/cp.c [LSTAT_FOLLOWS_SLASHED_SYMLINK] (lstat): Define to rpl_lstat. + +2000-04-27 Jim Meyering <meyering@lucent.com> + + Clean up. + * tests/mkdir/Makefile.am (TESTS_ENVIRONMENT): Set PATH, not MKDIR. + * tests/mkdir/p-1: Use mkdir, not $MKDIR. + * tests/mkdir/p-2: Likewise. + + * configure.in (AC_OUTPUT): Add tests/du/Makefile. + * tests/Makefile.am (SUBDIRS): Add du. + * tests/du: New directory. + * tests/du/two-args: New test. + + * tests/mkdir/special-1: New test. + * tests/mkdir/Makefile.am (TESTS): Add special-1. + +2000-04-25 Paul Eggert <eggert@twinsun.com> + + * src/du.c (pop_dir): Remove through_symlink arg; use null cwd + for that purpose instead. + (count_entry): Also save the directory if we're saving more + than one level. + Fix file descriptor and memory leak when chdir fails. + +2000-04-26 Jim Meyering <meyering@lucent.com> + + * src/mkdir.c: Rename global: s/path_mode/create_parents/. + (main): No longer perform explicit chmod when creating + parent directories, since make_path now does the chmod. + +2000-04-17 Jim Meyering <meyering@lucent.com> + + * src/chown.c: New option: --from=CURRENT_OWNER:CURRENT_GROUP. + (enum) [FROM_OPTION]: New member. + (long_options): New getopt spec. + (change_file_owner): Add old_user, old_group parameters. Use them. + (change_dir_owner): Likewise. + (usage): Describe. + (main): New case. + From Andries Brouwer. + * doc/fileutils.texi (invoking chown): Document it. + +2000-04-16 Jim Meyering <meyering@lucent.com> + + * src/cp.c: New option: --strip-trailing-slashes. + (enum) [STRIP_TRAILING_SLASHES_OPTION]: New member. + (remove_trailing_slashes): New global. + (long_opts): New getopt spec. + (usage): Describe. + (do_copy): Strip trailing slashes on SOURCE names only if the new + option has been specified. + (main): New case. + + * tests/cp/symlink-slash: New test for the change in behavior. + * tests/cp/Makefile.am (TESTS): Add symlink-slash. + + * doc/fileutils.texi (Trailing slashes): Factor out discussion on + trailing slashes into its own node. + Cross reference from cp and mv. + +2000-04-14 Jim Meyering <meyering@lucent.com> + + * src/touch.c (touch): Add O_NOCTTY to the list of open-time flags. + +2000-04-13 Jim Meyering <meyering@lucent.com> + + Move some code into m4/. + * configure.in (_GNU_SOURCE): Don't define here. + (AC_SYS_LARGEFILE): Don't use here. + (AM_C_PROTOTYPES): Don't use here. + * acconfig.h: Remove now-unused file. + +2000-04-08 Jim Meyering <meyering@lucent.com> + + * doc/fileutils.texi (cp invocation): Mention that there is an + application for cp's --sparse=never option. From Martin Hippe. + (cp invocation): Describe how --backup and --force + can be useful together. + +2000-03-10 Alan Iwi <iwi@atm.ox.ac.uk> + + * src/ls.c: Add support for "ln=target" in the LS_COLORS variable, + to colorize links as for the file/directory pointed to. + * src/dircolors.hin: Add a few words of documentation of the above. + +2000-04-08 Jim Meyering <meyering@lucent.com> + + * src/cp.c (usage): Document that while the --backup option takes an + optional argument, the -b option accepts none. + (main): Use `backup type' in call to xget_version, not the + now-deprecated `--version-control'. + * src/install.c: Likewise. + * src/ln.c: Likewise. + * src/mv.c: Likewise. + +2000-03-12 Jim Meyering <meyering@lucent.com> + + Merge from textutils. + * src/system.h (O_BINARY, O_TEXT): Define if necessary. + (SET_BINARY, SET_BINARY2): Define. + (DEV_BSIZE): Define to BBSIZE if appropriate. + +2000-03-10 Jim Meyering <meyering@lucent.com> + + * tests/mv/mv-special-1: Make the message more like that in the + similar touch and shred tests. + * tests/touch/fifo: Accommodate SunOS-NFS-mounting-OpenBSD mkfifo + bug and `exit 77' if the fifo cannot be created. + Report and suggestion from Volker Borchert. + +2000-03-03 Jim Meyering <meyering@lucent.com> + + * po/Makefile.in.in (dist distdir): Don't use `ln' (which was just a + space optimization anyway) to populate $(distdir). Otherwise, the dist + rules that change permissions would end up affecting the master sources. + +2000-03-01 Paul Eggert <eggert@twinsun.com> + + * src/df.c (show_point): Ignore shortcuts based on path + prefixes that are loop file system mount points, since they + yield undesirable output. + +2000-02-29 Jim Meyering <meyering@lucent.com> + + * src/ls.c (decode_switches): Remove `e' from getopt_long's list of + option characters. Reported by John Summerfield. + +2000-02-28 Jim Meyering <meyering@lucent.com> + + * tests/install/basic-1: Use ginstall, not install. + +2000-02-27 Jim Meyering <meyering@lucent.com> + + * Version 4.0q. + + * src/sys2.h: Guard declaration of strtoull also with + `&& HAVE_UNSIGNED_LONG_LONG'. + + * src/sys2.h: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL...' + now that autoconf always defines the HAVE_DECL_ symbols. + + * src/install.c (install_file_to_path): Always use install_file_in_file. + Based on a patch from Adam Klein via Michael Stone. + + * tests/install/Makefile.am (TESTS): Add create-leading. + * tests/install/create-leading: New file. + + * tests/install/basic-1: Clean up. + * tests/install/Makefile.am (TESTS_ENVIRONMENT): Add PATH. Remove cruft. + +2000-02-26 Jim Meyering <meyering@lucent.com> + + Tranform the generated src/Makefile.in file so it falls back on + using /bin/rm when necessary. The old rule didn't always work. + This is necessary only on certain losing systems, and because this + package builds an `rm' executable and some people put `.' too + early in their PATH. + * Makefile.am (DISTCLEANFILES): Remove .deps and `FIXME' comment. + (EXTRA_DIST): Add .kludge-stamp. + (.kludge-stamp): New rule. + * src/Makefile.am (AUTOMAKE): Remove definition. + (Makefile.in): Remove dependency on automake-wrap script. + (EXTRA_DIST): Remove automake-wrap. + * src/automake-wrap: Remove file. + + * tests/rm/r-2: Don't make the success of the test depend on the + order in which directory entries are processed. + Reported by Andreas Schwab. + +2000-02-12 Jim Meyering <meyering@lucent.com> + + * po/POTFILES.in: Add lib/userspec.c. + + * doc/fileutils.texi (chown invocation): Deprecate use of `.'. + + * src/chown.c (usage): Mention only `:', and not `.' as the separator, + since POSIX allows only the former. + Prompted by a report from Manas Garg. + +2000-02-11 Jim Meyering <meyering@lucent.com> + + * src/df.c (main): Count the stat'able arguments. + Print the header line only if there is at least one valid argument. + Reported by Andy Longton <alongton@metamark.com> + +2000-02-10 Jim Meyering <meyering@lucent.com> + + Make du work when invoked from an unreadable directory. + + * src/du.c (pop_dir): New function. + (count_entry): Factor out common code (pop_dir), and call the new + function instead. + Move declaration of global, `stat_buf' into this function. + (du_files): Don't stat `.' or call save_cwd, since count_entry + never returns with a changed working directory. + +2000-02-09 Jim Meyering <meyering@lucent.com> + + * tests/mv/mv-special-1: Use $null and $dir in place of literals + in `here' script. + Exit 77 if we can't set up the framework (Volker Borchert reported + that this test would fail because mknod failed when run on SunOS4.1.4 + using NFS-mounted disk from an OpenBSD system). + +2000-02-05 Jim Meyering <meyering@lucent.com> + + * src/copy.c (copy_internal): Don't allow mv to move a directory onto + a non-directory. Reported by Brian Kimball via Michael Stone. + +2000-02-03 Jim Meyering <meyering@lucent.com> + + * tests/mv/Makefile.am (TESTS): Add dir-file. + (TESTS_ENVIRONMENT): Remove vestiges of old tests. + * tests/mv/dir-file: New file. + +2000-02-02 Jim Meyering <meyering@lucent.com> + + * tests/touch/Makefile.am (TESTS): Add fifo. + * tests/touch/fifo: New file. + +2000-02-01 Jim Meyering <meyering@lucent.com> + + * src/touch.c (O_NDELAY): Define to 0 if not defined. + (O_NONBLOCK): Define to O_NDELAY if not defined. + (touch): Open with O_NONBLOCK, so one can touch a fifo without hanging. + Reported by Eric G. Miller via Michael Stone. + + * man/*.x: Change ." to .\". + Reported by Andreas Schwab and Brendan O'Dea. + +2000-01-31 Jim Meyering <meyering@lucent.com> + + * man/Makefile.maint (ginstall_filter): Define. + ($(man_MANS)): Use it here so that the install.1 man page refers + to `install', not `ginstall'. Reported by Andreas Schwab. + +2000-01-30 Jim Meyering <meyering@lucent.com> + + * Version 4.0p. + + * configure.in: Move library-related tests into m4/lib-check.m4. + + * src/system.h (ST_NBLOCKS): Use st_size only for regular files and + for directories. From H. J. Lu. + + * src/dd.c (main): Exit with nonzero status if ftruncate fails. + +2000-01-24 Jim Meyering <meyering@lucent.com> + + * src/ln.c (usage): Describe behavior when LINK_NAME is omitted. + From Michael Stone. + + * src/mv.c (main): Don't expect array index `n_files - 1' to evaluate + to `-1' for unsigned int n_files == 0. Doing so lead to a segfault on + alpha. From Michael Stone. + +2000-01-23 Jim Meyering <meyering@lucent.com> + + * configure.in (AM_FUNC_OBSTACK): Remove. (move to m4/.) + Remove nearly all function checks (moved to m4/.) + (AC_SUBST(DF_PROG)): Move this to m4/. + (ftruncate test): Move into new file: m4/ftruncate.m4. + (AC_HEADER_MAJOR, AC_HEADER_DIRENT): Move into m4/. + Remove df-related tests. i.e., move jm_LIST_MOUNTED_FILESYSTEMS, + jm_FSTYPENAME, and jm_FILE_SYSTEM_USAGE) into m4/. + +2000-01-22 Jim Meyering <meyering@lucent.com> + + * configure.in: Move addext.c prerequisites from this file into m4/. + (AC_CHECK_HEADERS): Move these checks into m4/. + +2000-01-17 Paul Eggert <eggert@twinsun.com> + + * src/dd.c (interrupt_handler): Likewise. + (install_handler): Use SA_NOCLDSTOP, not _POSIX_VERSION, + to decide whether to call sigaction; this fixes an old typo. + +2000-01-16 Jim Meyering <meyering@lucent.com> + + * lib/Makefile.am: Sync with sh-utils/lib/Makefile.am. + + * configure.in: Remove AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, + jm_FUNC_GROUP_MEMBER, jm_FUNC_GETGROUPS, AC_FUNC_VPRINTF, and + AC_FUNC_ALLOCA. They're now in m4/. + + Sync with the version from emacs-20.5. + * lib/alloca.c + (<string.h>): Include if HAVE_STRING_H. + (<stdlib.h>): Include if HAVE_STDLIB_H. + (alloca): Abort if malloc fails. + Reported by Paul Eggert. + +2000-01-15 Jim Meyering <meyering@lucent.com> + + * configure.in (AC_REPLACE_FUNCS): Remove these: euidaccess memcpy + memcmp memset mkdir rmdir rpmatch stpcpy strndup strstr strtol + strtoul strverscmp. Now they're in m4/. + +2000-01-12 Jim Meyering <meyering@lucent.com> + + * tests/shred/remove: Make the warning that this shred test may not + be run as root more prominent. Suggestion from Volker Borchert. + +2000-01-11 Paul Eggert <eggert@twinsun.com> + + Quote multibyte characters correctly. + + * lib/quotearg.c (ISGRAPH): Remove. + (ISPRINT): New macro. + (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H. + (isprint, mbrtowc, mbsinit, mbstate_t): New macros, + defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H). + (quotearg_buffer_restyled): New function, with most of the old + quotearg_buffer's contents. + Major rewrite to support multibyte characters. + (quotearg_buffer): Now just calls quotearg_buffer_restyled. + + * m4/c-bs-a.m4: New file. + * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro. + (jm_PREREQ): Use it. + +2000-01-11 Paul Eggert <eggert@twinsun.com> + + * lib/modechange.c (mode_compile): Use uintmax_t, not unsigned + long, to parse numeric modes. Check for any unknown bits, not + just unknown bits left of the leftmost known bit. + +2000-01-11 Paul Eggert <eggert@twinsun.com> + + * lib/getdate.y: Update copyright notice. + +2000-01-11 Paul Eggert <eggert@twinsun.com> + + * COPYING: Sync with latest FSF version (fixing a minor Y2k problem). + +2000-01-11 Paul Eggert <eggert@twinsun.com> + + * lib/exclude.c, lib/exclude.h: Sync to the slightly more + general version of GNU tar. + + * src/du.c (count_entry): + Adjust to new calling convention for excluded_filename. + (main): Likewise, for add_exclude_file. + +2000-01-11 Jim Meyering <meyering@lucent.com> + + * lib/memcpy.c (memcpy): Protoize. + + Prepare to sync lib/ directories of fileutils, sh-utils, and textutils. + * lib/Makefile.am: s/fu/fetish/ + * src/Makefile.am: s/libfu/libfetish/ + + * lib/hash.c (hash_initialize): Fix typo in comment. + From François Pinard. + +2000-01-10 Jim Meyering <meyering@lucent.com> + + * Version 4.0o. + + * lib/Makefile.am (noinst_HEADERS): Add nanosleep.h. + +2000-01-09 Jim Meyering <meyering@lucent.com> + + * Version 4.0n. + + * src/ln.c (do_link): Produce the same sort of one-line output for + `--backup --verbose' as cp, mv, install. Before this, the backup + file name wasn't printed at all. + + This affects cp, install, and mv. + * src/copy.c (copy_internal): When making backup files in verbose + mode, print the backup file name on the same line as the rest of the + information, e.g., `a -> b (backup: b.~13~)' rather than on a separate + line by itself. Suggestion from Karl Berry. + +2000-01-08 Jim Meyering <meyering@ascend.com> + + * lib/error.c (error): Use __strerror_r's return value only if + HAVE_WORKING_STRERROR_R. + (error_at_line): Likewise. + + * Makefile.maint (null_AM_MAKEFLAGS): Define. + (my-distcheck): Use it to avoid distributing out of date files + whose derivation would require a maintainer tool. + +2000-01-07 Jim Meyering <meyering@ascend.com> + + * lib/euidaccess.c: Sync with the GNU C library. + + * tests/dir/Makefile.am (TESTS_ENVIRONMENT): Add `pwd`/ prefix + to exported PATH value (though not strictly necessary, here). + * tests/dd/Makefile.am: Likewise. + * tests/dircolors/Makefile.am: Likewise. + * tests/rm/Makefile.am: Likewise. + * tests/rmdir/Makefile.am: Likewise. + * tests/shred/Makefile.am: Likewise. + * tests/touch/Makefile.am: Likewise. + * tests/shred/Makefile.am: Likewise. + +2000-01-06 Jim Meyering <meyering@ascend.com> + + * man/help2man: Import version 1.020. + + * lib/strftime.c: Sync with the GNU C Library. + +2000-01-06 Paul Eggert <eggert@set.twinsun.com> + + * tar/lib/getdate.y: Sync tm_diff with the GNU C Library. + (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed. + (tm_diff): Renamed from difftm. All uses changed. + Replace body with that taken from GNU C Library 2.1.3pre1. + (get_date): Prefer tm_gmtoff to tm_diff if available. + +2000-01-04 Paul Eggert <eggert@twinsun.com> + + * savedir.c (savedir): Don't store past the end of an array if + name_size is zero and the directory is empty. + + * Makefile.maint (PREV_VERSION): Tweak so it handles e.g., 2.0a -> 2.0. + (alpha): Create xdelta diffs. + +2000-01-02 Jim Meyering <meyering@ascend.com> + + * Version 4.0m. + + * src/mv.c: New option: --strip-trailing-slashes. + + 1999-11-18 Paul Eggert <eggert@twinsun.com> + + * lib/strftime.c (my_strftime): Some old compilers object to + '\a', so don't bother optimizing for it. + +2000-01-01 Paul Eggert <eggert@twinsun.com> + + Fix bug: `df PATH' sometimes misbehaves when there is an + inaccessible mount point unrelated to PATH. + * configure.in (AC_CHECK_FUNCS): Add realpath, resolvepath. + * src/df.c (#pragma alloca): Add if _AIX is defined. + (path-concat.h): Include. + (show_point): If HAVE_REALPATH or HAVE_RESOLVEPATH is defined, + find the real absolute path for PATH, and use that to find the + mount point. + + (show_point): Prefer non-dummy entries in shortcuts, too. + Disable bogus mount dirs instead of restatting them each time. + +1999-12-30 Jim Meyering <meyering@ascend.com> + 1999-12-17 Kalle Olavi Niemitalo <tosi@stekt.oulu.fi> + + * src/rmdir.c (remove_parents, main): Don't pass errno to error + when printing "removing directory" message. Failure of rmdir is + handled elsewhere. + +1999-12-23 Jim Meyering <meyering@ascend.com> + + * configure.in: Remove clock_gettime tests. + Now they're in m4/jm-macros.m4. + + * src/ln.c (usage): Correct typos. + List new --target-directory=... usage. + Reported by Göran Uddeborg + + * src/mv.c (usage): List new --target-directory=... usage. + +1999-12-22 Jim Meyering <meyering@ascend.com> + + * lib/getdate.y (get_date): Fix typo in time_t overflow test. + From Michael Stone. + +1999-12-21 Andreas Schwab <schwab@suse.de> + + * tests/shred/remove: Use $file, not $tmp/file. Exit 77 if run as + root. + +1999-12-20 Paul Eggert <eggert@twinsun.com> + + * src/df.c (ceil_percent): Remove. + (show_dev): Avoid overflow problems when calculating percent. + Do not display negative percents. + +1999-12-19 Jim Meyering <meyering@ascend.com> + + * Version 4.0l. + + * doc/fileutils.texi: Clarify and combine descriptions of -c and of + --time=ctime. + Likewise for -u/--time=atime. + + * src/ls.c [! LSTAT_FOLLOWS_SLASHED_SYMLINK]: Use lstat wrapper. + [Notice the new configure-time test in m4/lstat-slash.m4. ] + (main): Back out change from 1999-02-19 that made ls remove + trailing slashes from command line arguments to accommodate early + versions of Linux. Now, `ls symlink-to-dir/' acts like + `ls symlink-to-dir/.' thus following the symbolic link, as POSIX says + it should. Suggestion from Bruno Haible and Andreas Schwab. + + * lib/xstat.in (slash_aware_lstat): New function. + (rpl_@xstat@): Use it. + * lib/Makefile.am (lstat.c): Adapt rule to handle new parts of xstat.in. + (lstat.c): Likewise. + + Make sure ls does the right thing with symlinks and trailing slashes. + * tests/ls/Makefile.am (TESTS): Add symlink-slash. + * tests/ls/symlink-slash: New test, for above-fixed bug. + +1999-12-18 Jim Meyering <meyering@ascend.com> + + * src/shred.c (wipename): When repeatedly renaming a file, making the + name shorter and shorter, skip to the next shorter length length if a + rename fails (e.g. due to permission denied). Otherwise, this loop + would iterate for so long that shred would appear to be stuck in an + infinite loop for any but the shortest file names. + Reported by Joe Orton. + + * configure.in (AC_OUTPUT): Add tests/shred/Makefile. + * tests/Makefile.am (SUBDIRS): Add shred. + * tests/shred: New directory + * tests/shred/remove: New file. Tests for the above-fixed bug. + +1999-12-13 Jim Meyering <meyering@ascend.com> + + * lib/makepath.c (make_path): Consistently use `error' to output + the verbose, `created directory ...' messages. + Reported by Bernhard Rosenkraenzer. + +1999-12-12 Jim Meyering <meyering@ascend.com> + + Move 120+ lines of stat.h-related macros from system.h (not shared) + to sys2.h, which is shared between fileutils, sh-utils, textutils. + * src/system.h: Move them from here... + * src/sys2.h: ... to here. + + * src/system.h (S_IRUSR, S_IRGRP, S_IWGRP, S_IROTH, S_IWOTH): Define + if not defined. This was necessary on a NeXT Turbostation running + Mach 3.3. Reported by Nelson H. F. Beebe. + + * src/ls.c (decode_switches): If -c or -u is specified and not -l + (or any other option that implies -l), and no sort-type was specified, + then sort by the ctime (-c) or atime (-u). Part of this change reverts + the 1998-01-10 delta. + (usage): Update to reflect this change. + Reported by Paul Slootman via Michael Stone. + +1999-12-09 Jim Meyering <meyering@ascend.com> + + * src/df.c (BLOCK_SIZE_OPTION, SYNC_OPTION, NO_SYNC_OPTION): Define + these and use them instead of `CHAR_MAX + n'. + * src/du.c (BLOCK_SIZE_OPTION, EXCLUDE_OPTION, MAX_DEPTH_OPTION): + Likewise. + * src/touch.c (TIME_OPTION): Likewise. + * src/rmdir.c (IGNORE_FAIL_ON_NON_EMPTY_OPTION): Likewise. + + * tests/ls/time-1: Test more of the framework (touch's -a and -m + options) before running the actual ls test. + +1999-12-07 Jim Meyering <meyering@ascend.com> + + * tests/cp/cp-mv-backup: Use 1>&2 rather than `1<&-'. + Suggestion from Volker Borchert. + +1999-12-05 Jim Meyering <meyering@ascend.com> + + * Makefile.maint: Remove ftp.enst.fr. + +1999-12-04 Jim Meyering <meyering@ascend.com> + + * Version 4.0k. + + * tests/mv/into-self-2: Adapt to reflect this change in behavior. + Make sure the VERSION_CONTROL envvar is not set. + Run diff if comparison fails. + + * src/copy.c (copy_internal): In move mode, if the rename attempt + fails, then unlink any existing destination file. This makes a + cross-device `mv' more consistent with the intra-device behavior. + This change is required by POSIX to make a cross-device move act with + semantics similar to those of the rename syscall. For example now + `mv' can move a file onto a symlink to itself when that symlink + is on a separate partition. With fileutils-4.0j, it would fail with + a diagnostic saying they were the same file. + Reported by Bruno Haible. + + * tests/mv/to-symlink: New file. Adds test for the above. + * tests/mv/Makefile.am (TESTS): Add to-symlink. + + * tests/cp/cp-mv-backup (trap): Be careful to close $actual before + removing the containing directory. Otherwise, on some systems rmdir + fails to remove the containing directory. + + * tests/ls/time-1: List --full-time dates upon failure. + +1999-12-02 Andreas Schwab <schwab@suse.de> + + * src/ls.c (check_symlink_color): New variable. + (main): Set it if we need to check for dangling symlinks when + displaying colors. + (gobble_file): Check check_symlink_color instead of print_with_color. + +1999-11-30 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (usage): Shorten help for --show-control-chars. + +1999-11-30 Jim Meyering <meyering@ascend.com> + + Give the right diagnostic when failing to create a file in an + unwritable directory. + * src/touch.c (touch): Record errno upon failed errno and use that + saved value if a subsequent fstat, stat or utime call fails. + Reported by Wichert Akkerman via Michael Stone. + +1999-11-27 Jim Meyering <meyering@ascend.com> + + Clean up test scripts. + * tests/mv/setup: Don't set/use DF or MKDIR. Use df and mkdir instead. + * tests/mv/mv-special-1: Likewise for these: LS MV MKDIR MKNOD RM TOUCH + * tests/mv/backup-is-src: Likewise for RM and MV. + * tests/mv/hard-link-1: Likewise. + * tests/mv/into-self: Likewise. + * tests/mv/into-self-3: Likewise. + + Add test for 1999-05-23 change to src/copy.c (copy_internal). + * tests/mv/partition-perm: New file. + * tests/mv/Makefile.am (TESTS): Add partition-perm. + + * Version 4.0j. + +1999-11-22 Paul Eggert <eggert@twinsun.com> + + * src/df.c (df_readable): Now returns char const *, not char *. + New arg NEGATIVE. + (ceil_percent): Now returns double, not int. + Be more careful about adding 1 to a wild value. + (show_dev): Don't filter out wild sizes from the underlying operating + system; instead, show them to the user as faithfully as possible. + +1999-11-23 Jim Meyering <meyering@ascend.com> + + * doc/getdate.texi (Calendar date item): Correction regarding 0..68/ + 69-99 split for 1900 vs 2000. From Peter Moulder. + +1999-11-22 Jim Meyering <meyering@ascend.com> + + * lib/Makefile.am (DISTCLEANFILES): Add lstat.c and stat.c. + +1999-11-20 Jim Meyering <meyering@ascend.com> + + * src/rmdir.c (errno_rmdir_non_empty): New function to encapsulate + errno comparison. + (remove_parents): Use it. + (main): Use it. + + * tests/cp/cp-mv-backup: Run `diff -c' if the test fails. + + * tests/ls/time-1: Use `ls' and `touch', not $LS and $TOUCH. + * tests/ls/Makefile.am (TESTS_ENVIRONMENT): Specify PATH, etc. + + * src/chgrp.c: Declare lstat; needed on e.g. SunOS4. + Reported by Tom Tromey. + +1999-11-19 Jim Meyering <meyering@ascend.com> + + * lib/strstr.c (strstr): Include config.h. + Add a `;' between shloop label and `}'. + From Akim Demaille. + +1999-11-17 Jim Meyering <meyering@ascend.com> + + * src/mkdir.c (S_IRWXUGO): Define if necessary. + (main): Use chmod to set the permissions if bits other than those + of S_IRWXUGO were requested. Reported by Sami Farin. + +1999-11-14 Paul Eggert <eggert@twinsun.com> + + * touch.c (touch): Simplify code a tad, using fd == -1 instead + of separate valid_fd variable. + +1999-11-13 Jim Meyering <meyering@ascend.com> + + * src/touch.c (touch): Don't fail just because we couldn't open + an existing file. This makes it so that touching a read-only + file now works. Also clean up and simplify. + Based on a patch from Chip Salzenberg. + * tests/touch/no-rights: New test for this. + * tests/touch/Makefile.am (TESTS): Add no-rights. + +1999-11-12 Jim Meyering <meyering@ascend.com> + + * src/remove.c (print_nth_dir): Write one fewer byte so we don't print + a trailing slash. + (rm): Fix bugs in (and test, this time) the very rarely used code + to warn about directory cycles. + Reported by michael@roka.net. + +1999-11-11 Jim Meyering <meyering@ascend.com> + + * src/copy.c (copy_internal): Treat src and dest as the `same' in + `mv src symlink-to-src' when src and dest are on different partitions. + Otherwise, that `mv' command would silently remove `src'. + Reported by Michael Stone. + * tests/mv/into-self-2: Add a test for this fix. + + * lib/makepath.c (make_path): Fix long-latent bug: s/&&/||/ (others + just like that also dated back to 1992 were fixed in 1998-01-02). + Richard Braakman reported that using `install -d -g foo 1/2` + only sets the group on the intermediate directory, not the final + component. From Michael Stone. + +1999-11-07 Paul Eggert <eggert@set.twinsun.com> + + * human.c (default_block_size): New function. + (humblock): Use it if no block size is specified. + (human_block_size): If the specified block size is zero, report an + error if report_errors is nonzero; otherwise use the default. + +1999-11-07 Jim Meyering <meyering@ascend.com> + + * src/dircolors.hin: Add several more TERM types. + Add .bz2 suffix. + Add .png for real this time. + Change the image types colors to be visible in a black-on-white xterm. + From Michael Stone. + + * src/chgrp.c (xstat): New global. + (main): Define it. + (change_file_group): Use it. Before this change, when running chgrp + on a symlink without --dereference (-h) and when the requested group + is the same as the group for the *symlink*, chgrp would do nothing. + Now it changes the group of the file referenced through the symlink. + Reported by Martin Mitchell. + + * src/chmod.c: Use REFERENCE_FILE_OPTION instead of bare `CHAR_MAX + 1'. + * src/chown.c: Define and use REFERENCE_FILE_OPTION and + DEREFERENCE_OPTION in place of bare `CHAR_MAX + N'. + * src/chgrp.c: Likewise. + + * tests/ln/misc: Add hard-link-to-symlink test. + Move framework_failure test to the end. + Fix a typo: s/||/&&/. + + * src/ln.c (do_link): Warn that making a hard link to a symbolic link + is not portable. + + * tests/ln/misc: Use --b=simple, not the now-deprecated `-V simple'. + * tests/ln/backup-1: Likewise. + + * configure.in (AC_OUTPUT): Add tests/rmdir/Makefile. + * tests/Makefile.am (SUBDIRS): Add rmdir. + * tests/rmdir: New directory + * tests/rmdir/ignore: New file. + + * src/rmdir.c (remove_parents): Use the correct test (just as in + main) in handling --ignore-fail-on-non-empty. From Michael Stone. + (usage): Improve description of --parents. Based on suggestion from + Torsten Landschoff. + +1999-11-06 Jim Meyering <meyering@ascend.com> + + Allow hard links to symlinks on systems that support it. + * src/ln.c (STAT_LIKE_LINK): Define. + (do_link): Use STAT_LIKE_LINK, rather than bare `stat', and perform + the extra lstat only on systems where LINK_FOLLOWS_SYMLINKS. + + * src/ls.c (long_options): Correct typo (s/'F'/'p'/) so that `-p' is + accepted as the short form of --file-type, per the documentation. + From James Sneeringer. + + * src/ln.c (do_link): Fix typo (in which the function name `symlink' + was tested instead of the variable `symbolic_link') that could make + ln perform an unneeded `stat' call. + +1999-11-05 Jim Meyering <meyering@ascend.com> + + * src/system.h: Use HAVE_STRUCT_STAT_ST_BLOCKS, not deprecated + HAVE_ST_BLOCKS. + * src/copy.c: Likewise. + * lib/fileblocks.c: Likewise. + + * configure.in: Move some type/header/member tests into + m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) so they are shared by all of + fileutils, textutils, and sh-utils. + +1999-11-02 Jim Meyering <meyering@ascend.com> + + * man/help2man: Import version 1.018. + * man/Makefile.maint ($(man_MANS)): Remove use of --name=... option. + * man/*.x: Include one-line summary in [NAME] section. + * man/Makefile.summ: Remove the one-line summaries. + Suggestion for clean-up from Akim Demaille. + + * configure.in (ALL_LINGUAS): Add Galician (gl). + +1999-11-01 Jim Meyering <meyering@ascend.com> + + * src/cp.c (usage): Warn about mixing use of `-r' with FIFOs and + other special files like /dev/zero. + + * lib/Makefile.am (MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES). + +1999-10-31 Jim Meyering <meyering@ascend.com> + + * Makefile.maint (my-distcheck): Remove $(DEPDIR) to work around + automake bug. + + * doc/fileutils.texi: Document new --backup[=METHOD] option for + cp, mv, ln, and install. + + * src/ln.c: Convert --backup to take an optional argument. + Deprecate --version-control (-V) in comments. + (usage): Remove mention of --version-control. + (main): Make -V warn then fall through into --backup case. + [--backup case]: Handle optional arg. + * src/install.c: Likewise. + +1999-10-24 Jim Meyering <meyering@ascend.com> + + * src/cp.c (do_copy): Constify `dest', and cast-away the new + const in assignment to new_dest. + +1999-10-23 Jim Meyering <meyering@ascend.com> + + * tests/touch/Makefile.am (TESTS): Add dangling-symlink. + * tests/touch/dangling-symlink: New file. + +1999-10-23 Paul Eggert <eggert@twinsun.com> + + * src/touch.c (full_write): Remove unused decl. + (open_maybe_create): Remove. + (touch): Don't record whether the file was created; this isn't + possible to do reliably and portably without race conditions. + If the file was created and if amtime_now is nonzero, this + change means we'll have to do another utime system call, but + that's no more harmful than the previous version of this code. + Reported by Gabor Z. Papp. + +1999-10-21 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add Japanese (pa). + +1999-10-17 Jim Meyering <meyering@ascend.com> + + * tests/mv/backup-is-src: Remove use of mv's now-deprecated + -V option. Use --b=simple instead of -b -V simple. + + * src/mv.c: Convert --backup to take an optional argument. + Deprecate --version-control (-V) in comments. + (usage): Remove mention of --version-control. + (main): Make -V warn then fall through into --backup case. + [--backup case]: Handle optional arg. + + Accept new option: --target-directory=DIR + * src/cp.c (TARGET_DIRECTORY_OPTION): Define. + (SPARSE_OPTION): Define. + (usage): Describe it. + (do_copy): Change meanings/names of first two parameters: use `n_files' + in place of `argc - optind', and `file' instead of `argv + optind'. + Add parameter, target_directory. + (main): Pass new arg, target_directory. + +1999-10-16 Jim Meyering <meyering@ascend.com> + + * tests/cp/backup-is-src: Remove use of cp's now-deprecated -V option. + Use --b=simple instead of -b -V simple. + * tests/cp/backup-1: Replace use of cp's now-deprecated + --version-control option with use of --backup=simple. + + * src/cp.c: Convert --backup to take an optional argument. + Deprecate --version-control (-V) in comments. + (usage): Remove mention of --version-control. + (main): Make -V warn then fall through into --backup case. + [--backup case]: Handle optional arg. + + * tests/cp/Makefile.am (TESTS): Add cp-mv-backup. + * tests/cp/cp-mv-backup: New file. + +1999-10-11 Jim Meyering <meyering@ascend.com> + + * lib/getopt.c: Merge changes from latest glibc. + * lib/getopt.h: Likewise. + * lib/getopt1.c: Likewise. + +1999-10-09 Jim Meyering <meyering@ascend.com> + + Accept new option: --target-directory=DIR + * src/ln.c (TARGET_DIRECTORY_OPTION): Define. + (usage): Describe it. + (main): Implement it. + Make code clearer: use new variable `n_files' in place of + `argc - optind'. Use `file' instead of `argv + optind'. + +1999-10-04 Jim Meyering <meyering@ascend.com> + + * depcomp: New file, for automake's new dependency support. + * missing: New version, from automake's user-dep-gen-branch. + + * lib/xalloc.h (__attribute__): Apply 1999-10-03 change here, too. + * src/sys2.h (__attribute__): Likewise. + Wrap with #ifndef __attribute__. + +1999-10-03 Paul Eggert <eggert@twinsun.com> + + * getdate.y (__attribute__): Define to empty if GCC claims to + be before 2.8; this is needed for OPENStep 4.2 cc. Also, + define to empty if strict ANSI. + +1999-10-03 Jim Meyering <meyering@ascend.com> + + Accept new option: --target-directory=DIR + * src/mv.c (TARGET_DIRECTORY_OPTION): Define. + (usage): Describe it. + (main): Implement it. + Remove unused variable, stdin_tty. + Make code clearer: use new variable `n_files' in place of + `argc - optind'. Use `file' instead of `argv + optind'. + +1999-09-28 Jim Meyering <meyering@ascend.com> + + * src/system.h: Do s/#ifdef HAVE_/#if HAVE_/ -- solely for aesthetics. + Do the same for other config.h macros like CLOSEDIR_VOID and MAJOR_*. + * src/sys2.h: Likewise. + + * lib/xalloc.h (__attribute__): Protect against redefinition. + From Akim Demaille. + +1999-09-26 Jim Meyering <meyering@ascend.com> + + * lib/xmalloc.c (xalloc_die): Rename from xalloc_fail and + update callers. + Use explicit exit to help avoid warnings. + From Akim Demaille. + + * lib/path-concat.c (DIRECTORY_SEPARATOR): Define. + (ISSLASH): Define. + (path_concat): Allow parameter DIR to be NULL. + (xpath_concat): New function. + From Akim Demaille. + + * lib/xalloc.h (__attribute__): Define. + (ATTRIBUTE_NORETURN): Define. + (xalloc_die): Declare. + (NEW): Define as yet unused macro. + (XFREE): Likewise + (CCLONE): Likewise. + (CLONE): Likewise. + From Akim Demaille. + + * lib/basename.c (base_name): Add prototype. From Akim Demaille. + +1999-09-19 Jim Meyering <meyering@ascend.com> + + * lib/lchown.c [STAT_MACROS_BROKEN] (S_ISLNK): Undefine. + (S_ISLNK): Define if necessary. + This is necessary on a NEC SX-4 with SUPER-UX 9.1. + Based on a patch from Holger Berger. + + * src/dd.c (siginfo_handler): Mark parameter with ATTRIBUTE_UNUSED. + Change many counter and index variables to be of unsigned type. + (dd_copy): Add new unsigned variable, n_bytes_read, in place of + many uses of `nread'. + + * src/sys2.h (__attribute__): Define. + (ATTRIBUTE_NORETURN): Remove #else clause. + (ATTRIBUTE_UNUSED): Define. + +1999-09-17 Jim Meyering <meyering@ascend.com> + + * configure.in (AC_REPLACE_FUNCS): Remove strdup, now that this + is done in m4/jm-macros.m4. + +1999-09-09 Jim Meyering <meyering@ascend.com> + + * src/touch.c (usage): Remove misleading sentence in --help output. + From Karl Heuer. + + * src/Makefile.am (EXTRAdir): Remove unused variable. + +1999-09-03 Paul Eggert <eggert@twinsun.com> + + * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3. + Use EINVAL instead. + +1999-09-01 Jim Meyering <meyering@ascend.com> + + * src/cp.c: Remove declaration of xstrdup. + * src/df.c: Likewise. + * src/ls.c: Likewise. + +1999-09-01 Akim Demaille <akim@epita.fr> + + * lib/xmalloc.c (xalloc_fail_func): Use `PARAMS'. + * lib/xalloc.h (xalloc_fail_func): Likewise. + (xstrdup): Add protoype. + + * lib/version-etc.c (version_etc_copyright): Default copyright string. + (version_etc): Use it. + * lib/version-etc.h: Declare it. + +1999-08-29 Jim Meyering <meyering@ascend.com> + + * configure.in (AC_YACC): Remove use, now that we require bison. + + * src/dircolors.hin: Add .rpm, .png, and .fli. + From Andres Soolo. + +1999-08-28 Paul Eggert <eggert@twinsun.com> + + * getdate.y: Add copyright notice. + + (number): Handle `Nov 11 1996' example; see Risks Digest 20.55 + http://catless.ncl.ac.uk/Risks/20.55.html#subj18 + (1999-08-27) + + (<stdio.h>): Include only if testing. + (ISUPPER): Remove. + (ISLOWER, PC): New macros. + (<string.h>): Include if HAVE_STRING_H, not USG. + (bcopy): Remove. + (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume + bison. + (EPOCH_YEAR): Renamed from EPOCH. + (table): Renamed from TABLE. + (meridian): Now an anonymous enum. + (struct parser_control): New type. + (YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros. + (yyInput, ..., yyRelYear): Migrated into struct parser_control. + (%pure_parser): Added, so that the parser is pure. + (%union): Removed; the type is now just plain int. + All %type directives removed. + (tLOCAL_ZONE): New %token. + (month_day_table): Renamed from MonthDayTable. + (gmtime, localtime, mktime, time): Declare only if not defined. + (meridian_table): New table. + (dst_table): New table. + (units_table): renamed from UnitsTable. + (relative_time_table): Renamed from OtherTable. + (time_zone_table): Renamed from TimezoneTable. Modernized data. + (military_table): Renamed from MilitaryTable. + (to_hour): Renamed from ToHour. + (to_year): Renamed from ToYear. + (lookup_zone): New function. + (LookupWord): Renamed from lookup_word. + Use lookup_zone for time zones. + (yylex): Now reentrant. All callers changed. + (get_date): Add support for local time zone abbreviations. + Make it reentrant. + +1999-08-22 Jim Meyering <meyering@ascend.com> + + * src/sys2.h (IF_LINT): Define new macro. + * src/df.c (main): Rename locals i and j. + Use IF_LINT macro instead of #ifdef lint... + + * src/dd.c (parse_integer): Add `const' to char* parameter and + add a separate `suffix' variable. + +1999-08-20 Jim Meyering <meyering@ascend.com> + + * src/chown.c (usage): Tweak --help output to make it more consistent + with that of chgrp. + * src/chgrp.c (usage): Tweak --help output to make it more consistent + with that of chown. + +1999-08-17 Jim Meyering <meyering@ascend.com> + + * configure.in: Remove check for rename and the code that would + enable building of the `mvdir' program. + * src/Makefile.am (libexec_PROGRAMS): Remove reference to @MVDIR@. + (EXTRA_PROGRAMS): Remove obsolete mvdir. + * lib/rename.c: Remove obsolete file. (it had a bug, too) + * src/mvdir.c: Remove obsolete file. + * po/POTFILES.in: Remove mvdir.c + + * doc/fileutils.texi (chown, chgrp invocation): Make these sections + consistent with each other. + +1999-08-16 Jim Meyering <meyering@ascend.com> + + * src/chown.c (groupname): Declare to be `const'. + (change_dir_owner): Declare statp parameter to be `const'. + (usage): Make the output be more consistent with that from chgrp. + + This change is nearly identical to the chown.c change of 1998-05-24 + * src/chgrp.c: Accept new option, --dereference. + --no-dereference is now the default. Include lchown.h. + (enum Change_status) [CH_NOT_APPLIED]: New member. + (change_symlinks): Enable this by default, now. + (describe_change): Handle new case. + (change_file_group): Add new parameter: cmdline_arg. Update callers. + Reorganize to reflect changed semantics. + (LCHOWN): Remove definitions. + From Bruno Haible. + +1999-08-10 Jim Meyering <meyering@ascend.com> + + * po/POTFILES.in: Add lib/quotearg.c. + +1999-08-09 Paul Eggert <eggert@twinsun.com> + + * NEWS, doc/fileutils.texi, src/ls.c (usage): + Add ls --quoting-style=locale. + + * lib/argmatch.c (ARGMATCH_QUOTING_STYLE): + Change from escape_quoting_style to locale_quoting_style. + (argmatch_invalid): Use new quotearg_style primitive for simplicity. + Also, use ARGMATCH_QUOTING_STYLE to quote, instead of quoting ourselves. + + * lib/quotearg.h (locale_quoting_style): New enum value. + (quotearg_n_style, quotearg_style): New decls. + + * lib/quotearg.c: Include <libintl.h> if ENABLE_NLS. + (_): New macro. + (quoting_style_args, quoting_style_v, quotearg_buffer): Add support + for locale_quoting_style, using _("`") and _("'") for open and close + quote symbols. + Do not quote spaces in escape_quoting_style. + (quotearg_n_style, quotearg_style): New functions. + +1999-08-08 Jim Meyering <meyering@ascend.com> + + * src/touch.c (usage): Clarify description of --time=WORD. + From Karl Berry. + + * lib/savedir.c (savedir): Change type of name_size parameter to off_t. + * lib/savedir.h (savedir): Update prototype. + * src/chmod.c (change_dir_mode): Remove cast of savedir arg. + * src/chown.c (change_dir_owner): Likewise. + * src/chgrp.c (change_dir_group): Likewise. + * src/copy.c (copy_dir): Likewise. + * src/du.c (count_entry): Likewise. + Suggestion from Bob Proulx. + +1999-08-07 Jim Meyering <meyering@ascend.com> + + * po/POTFILES.in: Add lots of lib/*.c files. + Remove src/cp-hash.c, since it doesn't use _(). + +1999-08-04 Jim Meyering <meyering@ascend.com> + + * configure.in: Remove getline-testing code. Now it's in m4/. + +1999-08-01 Paul Eggert <eggert@twinsun.com> + + * configure.in (AC_SYS_LARGEFILE): Renamed from AC_LFS. + +1999-07-30 Jim Meyering <meyering@ascend.com> + + * src/ls.c (usage): Explain about default wrt --hide-control-chars and + --show-control-chars. Reported by Germano Leichsenring. + +1999-07-28 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add Brazilian Portuguese (pt_BR). + +1999-07-24 Jim Meyering <meyering@ascend.com> + + * src/dd.c (PTR_ALIGN, ROUND_UP_OFFSET): New macros. + (dd_copy): Use those to page-align both the input and output buffers. + +1999-06-01 Volker Borchert <bt@teknon.de> + + * tests/Makefile.am: Make envvar-check depend on check-recursive rather + than on `check' so that its tests are performed before any real tests. + +1999-07-15 Jim Meyering <meyering@ascend.com> + + * src/dd.c: Include getpagesize.h. + (dd_copy): Page-align the input buffer. + Based on a patch from Scott Lurndal. + + * getpagesize.h: New file. + * lib/Makefile.am (noinst_HEADERS): Add getpagesize.h. + + * lib/fsusage.c (get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]: + Work around SunOS botch also when block size is different from 1k. + From Jürgen Fluk. + +1999-07-10 Jim Meyering <meyering@ascend.com> + + * man/help2man: Import version 1.012. + +1999-07-04 Jim Meyering <meyering@ascend.com> + + * lib/xstrtol.c [!defined strtoumax]: Declare strtoumax. + +1999-07-04 Paul Eggert <eggert@twinsun.com> + + * lib/xstrtol.c (__strtol): Remove decl; it doesn't work if __strtol + expands to a macro, which occurs in HP-UX 10.20 with strtoumax. + (strtol, strtoul): New decls (for pre-ANSI hosts), to replace + the above decl. + +1999-06-27 Paul Eggert <eggert@twinsun.com> + + Fix some incompatibilities between `df -P' and POSIX.2. + + * lib/human.h (enum human_inexact_style): New enum. + (human_readable_inexact): New decl. + + * lib/human.c (human_readable): New function. + (human_readable_inexact): Renamed from human_readable, with new arg + INEXACT_STYLE. Add support for ceiling and floor. + + * src/df.c (print_header): Conform to POSIX if posix_format). + (df_readable): Take ceiling if posix_format. + (ceil_percent): New function. + (show_dev): Take ceiling of percent if posix_format. + Align with POSIX-conforming header if posix_format. + + * doc/fileutils.texi: Document these changes. + +1999-05-27 Volker Borchert <bt@teknon.de> + + * tests/Makefile.am: Qualify .env-warn with $(srcdir)/ prefix. + +1999-05-23 Jim Meyering <meyering@ascend.com> + + * src/copy.c (copy_internal): Don't apply the umask in move_mode. + Otherwise, `mv' would not preserve the permissions when copying + between partitions. Reported by David Godfrey + + * Version 4.0i. + + * tests/cp/same-file: Correct erroneous expected output from + the `cp -f foo foo' tests. + * po/POTFILES.in: Add same.c. + * lib/same.h: New file. + * lib/same.c: New file (function extracted from ln.c). + * lib/Makefile.am (libfu_a_SOURCES): Add same.c. + (noinst_HEADERS): Add same.h. + * src/copy.c: Include same.h. + * src/ln.c (same_name): Remove function. + <same.h>: Include this instead. + <dirname.h>: No longer include this. + * tests/mv/force: Be sure we still allow `mv -f FILE LINK-TO-FILE'. + + * src/copy.c (copy_internal): Make it so `cp/mv -f FILE FILE' does not + remove FILE. Suggestion from Chris Yeo. + * tests/mv/force: New test, for the above fix. + * tests/mv/Makefile.am (TESTS): Add force. + (TESTS_ENVIRONMENT): Change PATH to be absolute. + + * tests/mv/force (mv): New test. + +1999-05-17 Paul Eggert <eggert@twinsun.com> + + * lib/getdate.y (get_date): Let mktime deduce tm_isdst if we + have an absolute timestamp, or if the relative timestamp + mentions days, months, or years. Reported by Volker Borchert. + + * lib/human.c (human_readable): Allow from_block_size to be zero. + +1999-05-14 Jim Meyering <meyering@ascend.com> + + * tests/Makefile.am (envvar-check): Renamed from check-local. + (check): Depend on envvar-check so the envvar check is performed + before all other tests. Reported by Volker Borchert. + * tests/.env-warn: Use `%%' place-holder that Makefile.am rule expects, + so CDPATH is mentioned in the message. Reported by Volker Borchert. + + * src/df.c (main): When asking for info on an explicit file name, + just warn rather than failing if the table of mounted filesystems + cannot be read. Based on a patch from Mark Kettenis. + + * lib/version-etc.c (version_etc): Put version info and author names + on the first two lines respectively rather than putting the three + lines of copyright info between them. + + * src/touch.c (open_maybe_create): Handle Solaris' failure mode when + FILE is a directory. Reported by Vin Shelton. + + * lib/human.c: Include <string.h> or <strings.h> for strlen prototype. + * lib/getline.h [__GLIBC__ >= 2]: #if-out prototypes. + * src/remove.c (pop_dir): Cast length to `int' to avoid a warning on + 64-bit systems. From Ulrich Drepper. + +1999-05-12 Jim Meyering <meyering@ascend.com> + + * src/shred.c (main): Put `u' for -u in getopt_long's string argument. + Remove the `R'. + +1999-05-07 Jim Meyering <meyering@ascend.com> + + * Version 4.0h. + + * tests/touch/dir-1: New test. + * tests/touch/Makefile.am (TESTS_ENVIRONMENT): Remove individual + upper-case program names. Add a definition of PATH. + (TESTS): Add dir-1. + + * src/mkdir.c (main): Use better wording in diagnostic: `cannot + create directory' rather than `cannot make directory'. The former + also matches the one in makepath.c. + + * src/dd.c (apply_translations): Use TOUPPER and TOLOWER, + not toupper and tolower. + +1999-05-05 Jim Meyering <meyering@ascend.com> + + * lib/makepath.c (make_dir): When reporting a mkdir failure and the + target cannot be `stat'ed, use the errno from the failed mkdir call, + not the one from the stat call. Before this change, running + `mkdir -p /no-dir/no-dir' as an unprivileged user would wrongly + elicit `No such file or directory' instead of `Permission denied'. + + * lib/strtol.c (TYPE_SIGNED, TYPE_MAXIMUM, TYPE_MINIMUM): Define. + (ULONG_LONG_MAX, LONG_LONG_MAX, LONG_LONG_MIN): Define if not defined. + Based on a patch from Kaveh Ghazi. + + * src/ls.c (USE_ACL): Define this only #if + (HAVE_SYS_ACL_H && HAVE_ACL && defined GETACLCNT). + Use `USE_ACL' in place of `HAVE_ACL' everywhere else. From Kaveh Ghazi. + +1999-05-04 Jim Meyering <meyering@ascend.com> + + * lib/makepath.c: Include makepath.h libintl.h, not after it. + Otherwise, we'd get the wrong definition of PARAMS from libintl.h. + (The method of defining PARAMS in libintl.h doesn't check PROTOTYPES, + which is necessary on Irix4 since cc doesn't define __STDC__.) + From Kaveh Ghazi. + +1999-04-30 Jim Meyering <meyering@ascend.com> + + * Makefile.maint: Define several tag-related make variables. + (cvs-dist): Use the make variables instead of shell ones. + (announcement): Automatically generate diffs for all ChangeLog files, + not just the top level one. + +1999-04-30 Paul Eggert <eggert@twinsun.com> + + * lib/dup2.c: New file. + +1999-04-30 Jim Meyering <meyering@ascend.com> + + * src/touch.c (touch): Only do the fstat if we need to. + Resort to calling stat for directories, but only when necessary. + (usage): Mention --no-create. + + * src/copy.c (copy_internal): Move the one-file-system test so that + it follows the `if (new_dst || !S_ISDIR (dst_sb.st_mode))' block. + Prior to this change, `cp --one-file-system' would traverse a file- + system boundary if the destination directory existed. From Ton Hospel. + +1999-04-27 Paul Eggert <eggert@twinsun.com> + + * src/dd.c: Always use STDIN_FILENO for input and STDOUT_FILENO + for output, to avoid confusion with closed input and output fds. + (input_fd, output_fd): Remove; all uses changed to STDIN_FILENO + and STDOUT_FILENO. + (open_fd): New function. + (main): Use it, instead of open, to ensure that file descriptors + don't get confused. + +1999-04-26 Paul Eggert <eggert@twinsun.com> + + * src/ls.c (decode_switches): Use STDIN_FILENO, STDOUT_FILENO instead + of 0, 1. + + * src/dd.c (skip): Don't fstat the input file; the result is + no longer used. + +1999-04-26 Jim Meyering <meyering@ascend.com> + + * tests/mv/into-self-2: Update to reflect this change by reversing + the order of arguments so the symlink is the source, not the + destination (otherwise, the mv command would now succeed). + + * src/copy.c (copy_internal): Don't make `mv foo symlink-to-foo' fail. + That is, even though source and destination are `the same,' don't fail + if the destination is a symlink. From Peter Samuelson. + +1999-04-26 Paul Eggert <eggert@twinsun.com> + + * src/dd.c (main): If you can't open an output file (with + seek=...) read-write, then open it for write and report an + error if we can't seek. + + * lib/filemode.c (setst, ftypelet, mode_string): + * lib/mkdir.c (mkdir): + * lib/makepath.c (make_path): + * lib/modechange.c (make_node_op_equals, mode_compile, + mode_create_from_ref, mode_adjust): + * lib/modechange.h (mode_adjust): + * src/chmod.c (describe_change, change_file_mode): + * src/copy.c (copy_reg, copy_internal): + * src/copy.h (struct cp_options.umask_kill): + * src/cp.c (do_copy, cp_option_init, main): + * src/dd.c (main): + * src/install.c (mode, cp_option_init, DIR_MODE): + * src/mkdir.c (main): + * src/mkfifo.c (main): + * src/mknod.c (main): + * src/mv.c (cp_option_init): + * src/touch.c (open_maybe_create): + Use proper mode_t types and macros. + Don't assume the traditional Unix values for mode bits. + + * lib/filemode.c (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, + S_IXOTH): Define if not defined. + (rwx): Remove. + * lib/mkdir.c (S_IRWXU, S_IRWXG, S_IRWXO): Define if not defined. + * lib/makepath.c (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRWXU): + Define if not defined. + * src/system.h (S_ISUID, S_ISGID, S_ISVTX, S_IRWXU, S_IRWXG, S_IRWXO): + Define if not defined. + (CHMOD_MODE_BITS): New macro. + * src/install.c (isodigit): Remove unused macro. + + * src/mkfifo.c, src/mknod.c (usage): + Use symbolic mode as default, not octal. + + * lib/utime.c (utime_null): + Don't pass 0666 to open; it's not needed and isn't + guaranteed to be portable. + + * lib/filemode.h: <config.h>, <sys/types.h>: Include for mode_t. + (mode_string): Now takes mode_t. + + * lib/modechange.h: Include <config.h>, <sys/types.h> for mode_t. + (struct mode_change): Members affected and value are now mode_t instead + of unsigned short. + + * doc/fileutils.texi, doc/perm.texi: + Don't assume traditional Unix mode numbering. + + * lib/modechange.c: modechange.h now includes sys/types.h. + Include xstrtol.h. + (isodigit, oatoi): Remove. + (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, + S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRWXU, S_IRWXG, + S_IRWXO): Define if not defined. + (CHMOD_MODE_BITS): New macro. + (mode_compile): Convert from octal with xstrtoul, not our own routine. + +1999-04-24 Jim Meyering <meyering@ascend.com> + + * Version 4.0g. + +1999-04-22 Jim Meyering <meyering@ascend.com> + + * src/shred.c (word32): Don't use `#error'; it runs afoul of + SunOS 4.1.4 cc. From Paul Eggert. + + * lib/strtoull.c: Guard strong_alias and weak_alias with #ifdef _LIBC. + +1999-04-20 Paul Eggert <eggert@twinsun.com> + + Replace our temporary hack implementation of strtoumax with + something very close to the real code in glibc. + + * lib/xstrtoumax.c: Remove the temporary strtoumax replacement; + we now have a true replacement in strtoumax.c. + (__strtol): Always define to strtoumax. + (<stdlib.h>): No need to include. + (PARAMS): Remove. + (my_strtoumax): Move this to strtoumax.c, + rename it to strtoumax, and simplify. + + * lib/strtoull.c, lib/strtoumax.c: New files. + + * lib/strtol.c: Update to glibc 2.1.1 version. + +1999-04-20 Jim Meyering <meyering@ascend.com> + + * tests/Makefile.am (EXTRA_DIST): s/posix-warn/env-warn/. + (check-local): Also test and warn if CDPATH is set. + +1999-04-20 Paul Eggert <eggert@twinsun.com> + + * configure.in (AC_CANONICAL_HOST): Add; needed for new AC_LFS's + cross-compilation. + * config.guess: New file (from autoconf). + * config.sub: New file (from autoconf). + + * src/shred.c <config.h>: Include first, since it can do + things like #define const, and this must be done before + including any system headers. + + * lib/xstrtoumax.c (my_strtoumax): Fix typo in computing + whether overflow occurred. Improve overflow-detection to use + only one conditional branch total, rather than 2N+1 + conditional branches for an N-digit number. + +1999-04-18 Jim Meyering <meyering@ascend.com> + + * configure.in (AC_CHECK_FUNCS): Remove strtoull, strtoumax, and + strtouq, now that they're checked in m4/xstrtoumax.m4. + +1999-04-18 Paul Eggert <eggert@twinsun.com> + + * doc/fileutils.texi, src/shred.c (main, longopts): + Use -u instead of -R for --remove, so that we can preserve + future compatibility with rm. + +1999-04-18 Jim Meyering <meyering@ascend.com> + + * src/shred.c [!HAVE_CONFIG_H] (ST_BLKSIZE): Define to 65536. + (do_wipefd): Use ST_BLKSIZE instead of referring to the st_blksize + member directly. + +1999-04-18 Paul Eggert <eggert@twinsun.com> + + Fix shred to do the right thing with off_t longer than long. + Merge large-integer parsing code with similar code in dd.c, + and put the resulting in lib/xstrtoumax.c so that other programs + can use it. Instead of adding a new lib/xstrtoumax.h I thought + it cleaner to put all the xstroto* declarations into a single + header, which for now is lib/xstrtol.h for lack of a better place. + (Mayby lib/xstdlib.h would be better? :-) + + I thought of several other problems with shredding regular files; + shredding devices is much more reliable. So I changed the defaults + to be more suitable for shredding devices; this should help encourage + users to do the right thing. + + pfstatus isn't portable to environments with varying width + fonts, or with internationalized environments where the byte + count of the message is not the same as its print width. + Rather than deal with this, I just simplified it to not do + tricks with carriage-returns and spaces. (I'm also worried + that vprintf may not return the right value on some hosts; I + vaguelly recall this being a problem.) As a result, -v and - + no longer conflict. + + When removing a special file, try to truncate it first, but don't + worry if this reports an error. + + Try to find the size of a non-regular file by seeking to its end. + + Various porting fixes, mostly because of a port to SunOS 4.1.4 cc. + + Some other minor bug fixes. + + * lib/xstrtoul.h: Remove this file. + * lib/xstrtoumax.c: New file. + + * configure.in (AC_CHECK_FUNCS): Add strtoull, strtoumax, strtouq. + + * lib/xstrtoul.c (STRING_TO_UNSIGNED): Remove. + (__strtol, __strtol_t, __xstrtol): New macros. + + * lib/xstrtol.c (__strtol, __strtol_t, __xstrtol): + New macros to specify the + underlying function, its returned type, and our function. Default to + values suitable for xstrtol. + + Include <ctype.h>, since we use its macros. + + (ULONG_MAX, LONG_MAX, ISBLANK): Remove: no longer needed. + (ISSPACE): New macro. + + (bkm_scale, bkm_scale_by_power, __xstrtol, main): __unsigned long int + -> __strtol_t. + + (__xstrtol): Depend on whether __strtol_t is an unsigned type, not on + whether STRING_TO_UNSIGNED is defined. Skip isspace chars, not + isblank chars, to match strtol. When returning + LONGINT_INVALID_SUFFIX_CHAR, store the value that we computed into + *val. + + * lib/xstrtol.h (__xstrtol, __strtol, __unsigned): Remove macro decls. + <inttypes.h>: Include if HAVE_INTTYPES_H. + (_DECLARE_XSTRTOL): New macro. + (xstrtol, xstrtoul, xstrtoumax): Declare all three functions, so that + we need only one include file, not three. + (_STRTOL_ERROR): Do not undef, as this is no longer needed. + Reword overflow message so that it's independent of type. + + * lib/Makefile.am (libfu_a_SOURCES): Add xstrtoumax.c. + (noinst_HEADERS): Remove xstrtoul.h. + + * lib/xmalloc.c (xalloc_fail): + Pass xalloc_msg_memory_exhausted through gettext. + + * lib/getdate.y: + <stdlib.h>: Include if HAVE_STDLIB_H, since bison 1.27 invokes "free". + (LookupWord, yylex): Don't pass negative char to ctype macros. + + * doc/fileutils.texi: + Explain why shredding devices is more reliable, and why the + default options are more suitable for devices. + + Remove withdrawn options -b or --no-contents, -c or --freed-contents, + -C or --all-contents, -k or --no-links, -l or --ordinary-links, -L or + --all-links. + + Add -R or --remove, -s or --size. + + -v can no longer be doubled. + + `file system' --> `filesystem' uniformly. + + * src/chgrp.c: Include xstrtol.h, not obsolete file xstrtoul.h. + + * src/shred.c: Include xstrtol.h, not obsolete file xstrtoul.h. + "human.h", "xalloc.h": Include. + (attribute): Remove; no longer needed. + (xstrdup): New decl. + (STDOUT_FILENO): New macro. + (O_NOCTTY): Make sure it's always defined, even if HAVE_CONFIG_H. + + The following changes have effect only if !HAVE_CONFIG_H. + <ctype.h>: New include. + (RETSIGTYPE): Remove bogus semicolon at end. + (STDOUT_FILENO, uintmax_t, human_readable, LONGEST_HUMAN_READABLE): + New macros. + (xstrtoumax): Renamed from xstrtoul, with corresponding type changes. + Handle suffixes like the real routine does. + (error): Remove bogus assignment of errno to errnum. + (xmalloc, xstrdup): New functions. + + (O_NOCTTY): Define even if !HAVE_CONFIG_H. + (S_ISFIFO, S_ISSOCK): New macros, if not already defined. + (OUTPUT_BLOCK_SIZE): New macro. + (struct Options.verbose): Now a boolean, since we no longer have two + levels of verbosity. + (long_opts, usage, main): Remove -D or --device option. Invert -p or + --preserve option, and rename it to -R or --remove. + (usage): Describe G suffix. + (usage): "-" no longer conflicts with -v. + (UCHAR_MAX): Indent `#error' so that SunOS 4.1.4 cc doesn't reject it. + (ind): Portability fixes: return word32, not unsigned; multiply by + sizeof (word32) instead of shifting left by 2. + (isaac_refill, isaac_mix): Comment out size of array parameter, as + ansi2knr mishandles this. + (status_visible, status_pos, pfstatus, flushstatus): Remove, since + pfstatus isn't portable to users with varying width fonts, or + internationalized messages, and vfprintf is problematic. All callers + of pfstatus changed to use error instead; this removes incompatibility + of -v with -. All calls to flushstatus removed. + (dopass, do_wipefd): Do not translate non-English msgs with gettext. + + (dopass): Cast lseek constant arguments to (off_t) for benefit + of pre-ANSI compilers; fix one lseek call whose args were interchanged. + Remove unnecessary casts to (off_t). Do not check for EIO + when determining file size; this was just my earlier wild guess. + Use human_readable to print off_t, instead of casting to unsigned long + (which doesn't work in Solaris 2.6, where off_t is longer than long). + Output human-readable sizes, instead of always using "K". + Check for offset overflow (it happened to me in SunOS 4.1.4). + (do_wipefd): Do not insist on regular files, but do check for special + files that cannot possibly be shredded. + Use xmalloc instead of malloc + check. + Do not inspect st_size for non-regular files. + Try to find the size of a non-regular file by seeking to its end. + Do not assume that a regular file of size-0 has unknown size. + Check for regular files with negative sizes, + and for overflow after rounding to next block. + Always try to truncate, even for special files, but do not report an + error if truncation fails on a special file. + + (dopass, wipefile): Do not return 1 for special files; the caller + doesn't care any more. + + (wipefd): Remove unnecessary (and nonportable) check for + whether the file descriptor is read-only. Remove + no-longer-needed check for `-v -'. + + (incname): Return 1 for carry bit, like the documentation says. + + (wipename, wipefile): Accept new argument, specifying the + quoted file name. All callers changed. + + (wipename): Use xstrdup instead of strdup+error check. + + (wipefile): Check for ENOTDIR when opening /dev/fd/NNN. Check for + errors in NNN more carefully. Restore errno after the check. + Check for errors when closing the file descriptor. + Use more consistent wording when unable to remove a file. + + (main): Do not remove files by default. + Use xstrtoumax instead of xstrtoul uniformly, since xstrtoul won't + exist if !HAVE_CONFIG_H. + In diagnostics, quote invalid operands to -n and -s options. + Allow T, P, E, Z, and Y suffixes in -s operand. + flags.verbose is now a boolean, not a counter. + Use STDOUT_FILENO instead of 1, for clarity. + + * lib/human.c: + Include xstrtol.h, not xstrtoul.h, since xstrtol.h now defines all the + xstrto... functions. + + * src/dd.c: Include xstrtol.h. + (parse_integer): Migrate most of the work into the new xstrtoumax fn. + + * lib/xstrtoumax.c: New file. + +1999-04-18 Jim Meyering <meyering@ascend.com> + + * src/dd.c (main): Open the output file with *read* access + only if we might need to read to satisfy a `seek=' request. + From Matthias Urlichs. + +1999-04-10 Jim Meyering <meyering@ascend.com> + + * Makefile.maint (alpha): Add trailing slash for ncftp. + + * Version 4.0f. + + * configure.in (AC_OUTPUT): Add tests/dd/Makefile. + * tests/Makefile.am (SUBDIRS): Add dd. + * tests/dd: New directory + * tests/dd/misc: New file. + + `ls --color' would segfault + * src/ls.c: Include assert.h. + (color_indicator[]): Add an entry for the type, `door.' + (main): Assert that the lengths of the color_indicator and + indicator_name arrays are appropriately related. + Reported by John Gotts. + + * src/dd.c (scanargs): Fix bug introduced with last change: now that + the loop is gone, manually decrement argc and increment argv. + Reported by Andreas Jaeger and jvogel@linkny.com. + +1999-04-07 Jim Meyering <meyering@ascend.com> + + * lib/getdate.y (difftm): Protoize. + +1999-04-06 Jim Meyering <meyering@ascend.com> + + * lib/strftime.c: Update from master source in libc. + +1999-04-04 Jim Meyering <meyering@ascend.com> + + * tests/ln/misc: Comment out the test added on 1999-01-31. + + * Makefile.maint (url_dir_list): Define properly. + (real_dir_list): Likewise. + + * src/shred.c: Don't include string.h. + [!HAVE_CONFIG_H]: Include string.h here. + [!HAVE_CONFIG_H]: Hard-code RETSIGTYPE to `int'. + (sigill_handler): Change return type and type of local `oldhandler' to + RETSIGTYPE. + (isaac_seed_machdep): Change and type of local `oldhandler' to + RETSIGTYPE. + From Colin Plumb. + + * Version 4.0e + + * tests/cp/same-file: Change the sed command used to extract the + filename from ls -l output, to accommodate the change in format. + + * src/ls.c (print_long_format): Add a space between %s and %3u. This + assures that even when modebuf has the trailing `+' and there are more + than 99 hard links to a file, the permissions string and the link count + will be separated. + +1999-04-03 Jim Meyering <meyering@ascend.com> + + * src/shred.c (dopass): add curly braces to avoid warning about + ambiguous `else'. + (wipefd): Add parentheses suggested by gcc. + (do_wipefd): Remove declaration of unused local. + +1999-04-02 Colin Plumb <colin@nyx.net> + + * shred.c [!HAVE_CONFIG_H] (xstrtoul, error, close_stdout): Added stubs + to allow standalone compilation. + + (wipefile): Added support for emulating /dev/fd/# files even if + the OS doesn't support them. From Paul Eggert. + + (main, usage): Changed --device short option to -D. + + (wipefd, do_wipefd): Renamed function to do_wipefd and added + separate wipefd that performs sanity checks on externally-opened file + descriptors, such as not append-only. From Paul Eggert. + + (do_wipefd, isaac_seedfd): Do not read file for any reason. + if the file is low-entropy, it's a security hole. + (wipefile) Changed to open O_WRONLY and chmod to write-only when + forcing. + (isaac_seedfd) Function deleted as unnecessary. + From Paul Eggert. + + (dopass): Dynamically fall back to fsync() if fdatasync() fails, + since POSIX, in their infinitesimal wisdom, encourage implementations + that return constant -1, making compile-time testing useless. + From Paul Eggert. + + (dopass): Changed to support a size of -1 to mean "unknown". + This entailed changing to a counting-up offset rather than couting-down + cursize for the central state variable. Also changed size argument to + be call-by-reference so that it can be passed back once known. + (sizer) Function deleted as unnecessary. + (wipefd): Changed to match. From Paul Eggert + + (dopass): Try to skip over bad blocks in destination files. + Also added ftruncate() for more complete destruction of metadata. + + (main, usage): Changed "-" to stand for standard output. + (wipefd): Added error message to detect conflict with -v. + + (dopass): Added periodic fsync() calls to keep the pass progress + display in sync with reality. Hopefully they're sufficiently far spaced + that throughput isn't affected. It might be a good thing to do even in + non-verbose mode, to avoid filling up the kernel caches with dirty data. + Also added ftruncate() for more complete destruction of metadata. + + (quotearg_colon): New function to print + pathological filenames properly. + [!HAVE_CONFIG_H] (quotearg_colon_buf) New internal helper function + that does most of the work. + (wipefd, do_wipefd, dopass) Now take a qname (pre-quoted name) argument. + (wipename, wipefile, main) Changed diagnostics to use quotearg_colon. + Error messages are also in a more uniform format. + From Paul Eggert. + + (struct Options, main, do_wipefd): Added -s/--size=N flag. + (xstrtoul): Added support for valid_suffixes to help this. + (usage) Documented it. + + (error): Changed some arguments from N_() to _(), since error() + does not translate its argument. I think this is a bug. + + (struct Options do_wipefd, wipefd, wipefile, main): moved passes + argument into the Options structure as n_iterations, which is now a + size_t. From Paul Eggert. + + (isaac_seed_start, isaac_seed_data, isaac_seed_finish): New functions + to manage seeding of RNG with arbitrary-sized data. + (isaac_init): commented out as dead code. + (isaac_seed): changed to use new functions to prevent any possibility of + a buffer overflow. + + (isaac_seed): Added support for Solaris' gethrtime() + configure.in: Corresponding feature test. From Paul Eggert. + + (wipename): Change remove() to unlink() for speed & portability. + Use lstat() instead of access() to see if a filename is taken. This + works even on dangling symlinks and avoids the suid problems of + access(2). From Paul Eggert. + + (isaac_seed_machdep): New function for reading cycle counters + +1999-04-02 Paul Eggert <eggert@shade.twinsun.com> + + * configure.in (AC_CHECK_FUNCS): Add gethrtime. + + * src/shred.c (isaac_seed): Don't overrun the s->mm buffer. + Use gethrtime if available. Don't assume that clock_gettime succeeds. + Put most random sources first. + +1999-04-02 Paul Eggert <eggert@twinsun.com> + + shred: Add new options -bcCklL and fix some porting problems. + Remove options -dp. Do not read output files. + + * src/shred.c (long_opts, usage, main, wipefile): Adjust to + new options. + ("human.h", "quotearg.h"): New includes. + (struct Options): New members contents, links, n_iterations. + Remove allow_devices, remove_file. Change n_iterations to size_t. + All uses changed. + (output_block_size): New var. + (usage): Declare __noreturn__ attribute. + (fdatasync): Define to -1 if not present, since we need to invoke both + fdatasync and fsync if both are present. All invokers of fdatasync + now try fdatasync, then fsync. + (MIXIN): New macro. + (isaac_seed): Use it to mix in values. Add uid, gid to mix. + Don't use gettimeofday, as it has too many porting problems. + (isaac_seedfd): Remove, since we no longer read the output files. + (sizefd): Remove; we now determine size by writing sequentially. + (dopass, wipename, wipefile, main): Clean up error messages. + (dopass): Keep track of offset relative to start of file, not + end, since we may not know how large the file is. If size is + negative, write until we fall off the end of the file. + (wipefd): Do not read output file. + Return 0 if successful, -1 if not; do not make a special case for + non-regular files, since our callers have that info now. + (wipename): Now static. Return errno if error. + (main): "-" now stands for standard output. + Do not shred append-only standard output. + (wipefile): Do not grant read permission to file when wiping it. + Use symbolic permission (S_IWUSR), not octal. + + * src/system.h (S_IWUSR): Define if not already defined. + + * configure.in (AC_SEARCH_LIBS): Prefer rt to posix4, for Solaris 7. + (AC_CHECK_FUNCS): Remove gettimeofday. + + * doc/fileutils.texi: Document recent changes. + +1999-04-01 Jim Meyering <meyering@ascend.com> + + * configure.in (AC_CHECK_FUNCS): Add acl. + (AC_CHECK_HEADERS): Add sys/acl.h. + * src/ls.c [HAVE_SYS_ACL_H]: Include sys/acl.h. + (struct fileinfo): New member `have_acl'. + (gobble_file): Initialize it. + (print_long_format): Use it. + Mostly from Alen Muzinic. + + * src/touch.c (open_maybe_create): New function. + (touch): Rewrite not to use `creat' and to eliminate a race + condition that could make touch truncate a nonempty file. + Report and suggestions from Andrew Tridgell. + +1999-03-31 Jim Meyering <meyering@ascend.com> + + * src/du.c: Remove prototypes and tsort function definitions. + + * src/chown.c (main): Move the declaration of `e' into the scope + where it's used and make it `const'. + + * src/install.c (main): Qualify a char* with the `const' keyword. + (install_file_in_dir): Likewise. + * src/ln.c (main): Likewise. + * src/mkdir.c (main): Likewise. + * src/mkfifo.c (main): Likewise. + * src/mknod.c (main): Likewise. + * src/mv.c (main): Likewise. + * src/touch.c (touch): Likewise. + +1999-03-30 Jim Meyering <meyering@ascend.com> + + * src/*.c: Don't include closeout.h or version-etc.h explicitly. + Now, they're included via sys2.h. + +1999-03-29 Jim Meyering <meyering@ascend.com> + + * configure.in (GNU_PACKAGE): Remove related code -- now it's in + the catch-all for shared autoconf code, m4/jm-macros.m4. + (jm_CHECK_ALL_TYPES): Remove explicit AC_TYPE_* macros and use + this instead. + +1999-03-29 Paul Eggert <eggert@twinsun.com> + + Minor lint removal in code that forks and execs. + + * lib/mkdir.c (mkdir): Use pid_t instead of int; check status + against zero. This is to improve portability. + * lib/rename.c (rename): Likewise. + * lib/rmdir.c (rmdir): Likewise. + + * lib/rename.c (rename): + (rename): Do not print any error messages, so that the messages + are internationalized properly. + + * src/install.c (strip): Use standard "cannot fork" message. + Check for strip nonzero exit status. + +1999-03-28 Jim Meyering <meyering@ascend.com> + + `chmod =OP' did not properly apply the umask + * lib/modechange.c (make_node_op_equals): New function. + (mode_append_entry): Likewise. + (mode_compile): When none of [ugoa] is specified in an `=OP' change + mode request, insert a `=0' entry into the linked list so that all + bits are cleared first. Use the new functions. + Reported by Andrew Dalke. + + New test for the above. + * configure.in (AC_OUTPUT): Add tests/chmod/Makefile. + * tests/Makefile.am (SUBDIRS): Add chmod. + * tests/chmod: New directory + * tests/chmod/equal-x: New file. + +1999-03-27 Jim Meyering <meyering@ascend.com> + + * lib/modechange.c (mode_compile): Upon allocation failure, free + everything starting with the head, not the tail. + + * src/install.c (strip): Use pid_t, not int. From John Bley. + +1999-03-26 Jim Meyering <meyering@ascend.com> + + * src/dd.c (PROGRAM_NAME, AUTHORS): Define + (long_options): Remove unused struct. + (scanargs): Remove useless loop. + (main): Use PROGRAM_NAME and AUTHORS in call to parse_long_options. + * src/mvdir.c: Likewise. + * src/sync.c (PROGRAM_NAME, AUTHORS): Define and use. + +1999-03-25 Jim Meyering <meyering@ascend.com> + + * lib/Makefile.am (libfu_a_SOURCES): Add version-etc.c. + (noinst_HEADERS): Add version-etc.h. + + * lib/long-options.c (parse_long_options): Remove version-, copyright-, + and author-printing code. Do it via version_etc. + + * lib/version-etc.c: New file. + * lib/version-etc.h: Prototype for same. + + * src/sys2.h (GETOPT_HELP_CHAR): Define. + (GETOPT_VERSION_CHAR): Define. + (GETOPT_HELP_OPTION_DECL): Define. + (GETOPT_VERSION_OPTION_DECL): Define. + (case_GETOPT_HELP_CHAR): Define. + (case_GETOPT_VERSION_CHAR): Define. + + * src/chgrp.c: No longer include long-options.h. + Include version-etc.h instead. + (PROGRAM_NAME, AUTHORS): Define. + [long_options]: Add entries for --help and --version. + Remove parse_long_options call. + (main) [getopt switch]: Add a case for each of --help and --version. + * src/chgrp.c: Likewise. + * src/chmod.c: Likewise. + * src/cp.c: Likewise. + * src/df.c: Likewise. + * src/dircolors.c: Likewise. + * src/du.c: Likewise. + * src/install.c: Likewise. + * src/ln.c: Likewise. + * src/ls.c: Likewise. + * src/mkdir.c: Likewise. + * src/mkfifo.c: Likewise. + * src/mknod.c: Likewise. + * src/mv.c: Likewise. + * src/rm.c: Likewise. + * src/rmdir.c: Likewise. + * src/shred.c: Likewise. + * src/touch.c: Likewise. + +1999-03-24 Jim Meyering <meyering@ascend.com> + + * man/help2man: Import version 1.010. + +1999-03-22 Jim Meyering <meyering@ascend.com> + + * src/chmod.c (usage): Add one-liner. Suggestion from Karl Berry. + +1999-03-19 Jim Meyering <meyering@ascend.com> + + * src/automake-wrap: Rewrite the automake-generated rule for + clean-binPROGRAMS so that it removes rm even with a losing PATH on a + losing system (PATH with `.' before /bin on a system where you can't + unlink a running executable). Reported by William Bader. + + * configure.in: Use jm_WINSIZE_IN_PTEM. + * src/ls.c [WINSIZE_IN_PTEM]: Include sys/stream.h and sys/ptem.h. + Required by SCO ODT 2.0 systems. Reported by William Bader. + +1999-03-18 Jim Meyering <meyering@ascend.com> + + * src/remove.c (remove_cwd_entries): Reflect changes in hash_insert. + (remove_init): Call hash_initialize with one more argument. + +1999-03-15 Jim Meyering <meyering@ascend.com> + + Revamp to allow fine-tuning to control when and by how + much the table grows and shrinks. + * lib/hash.c (next_prime): Don't assert. + (hash_reset_tuning): New function. + (check_tuning): New function. + (hash_initialize): Accept and use new tuning parameter. + (hash_rehash): Rewrite, updating for tuning. + (hash_insert): Honor tuning semantics. + (hash_delete): Likewise. + From François Pinard. + + * lib/hash.h (struct hash_tuning): Define. + (struct hash_table) [tuning]: Add member. + (hash_initialize): Add `tuning' parameter. + + * lib/hash.c (hash_insert): Remove last parameter and change semantics. + * lib/hash.h (hash_insert): Update prototype. + + * lib/hash.c (hash_insert): Don't increment n_entries unconditionally -- + otherwise, we'd do so even when the insertion failed. + From François Pinard. + +1999-03-07 Jim Meyering <meyering@ascend.com> + + * lib/xmalloc.c (xalloc_fail): Use "%s" format so the message doesn't + have to be scanned for % signs. Suggestion from François Pinard. + + * Makefile.maint: Add two more URLs and the loops to use them. + + * lib/long-options.c (parse_long_options): Include `Copyright...' line + in --version output. + Add the `...NO warranty...' message. + +1999-03-03 Jim Meyering <meyering@ascend.com> + + * lib/long-options.c (_): Define it. + (parse_long_options): Accept new parameter, authors, and print it. + + * lib/long-options.h: Update prototype. + + * src/chgrp.c: Include long-options.h + [long_options]: Remove the "help" and "version" entries. + (main): Use parse_long_options, including author name(s). + Remove the show_version and show_help blocks. + * src/chmod.c: Likewise. + * src/chown.c: Likewise. + * src/cp.c: Likewise. + * src/dd.c: Likewise. + * src/df.c: Likewise. + * src/dircolors.c: Likewise. + * src/du.c: Likewise. + * src/install.c: Likewise. + * src/ln.c: Likewise. + * src/ls.c: Likewise. + * src/mkdir.c: Likewise. + * src/mkfifo.c: Likewise. + * src/mknod.c: Likewise. + * src/mv.c: Likewise. + * src/mvdir.c: Likewise. + * src/rm.c: Likewise. + * src/rmdir.c: Likewise. + * src/shred.c: Likewise. + * src/sync.c: Likewise. + * src/touch.c: Likewise. + +1999-02-18 Paul Eggert <eggert@twinsun.com> + + * getdate.y: <alloca.h>: Include if HAVE_ALLOCA_H, not FORCE_ALLOCA_H. + The FORCE_ALLOCA_H was a relic of the bad old pre-autoconf Emacs days. + +1999-02-17 Jim Meyering <meyering@ascend.com> + + * src/shred.c (wipename): Fix string thinko. Now, shredding files + in subdirectories works (dir/file). From Janos Farkas. + +1999-02-13 Jim Meyering <meyering@ascend.com> + + * src/dircolors.c (dc_parse_stream): Don't try to dereference + NULL if there's an error in our built-in list. + Suggestion from François Pinard. + +1999-02-13 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + + * src/install.c (main): Set x.backup_type only if backups are requested. + (cp_option_init): Initialize backup_type. + (backup_type): Remove unused variable. + + * doc/fileutils.texi: Fix use of @item vs @itemx. + +1999-02-08 Jim Meyering <meyering@ascend.com> + + * src/dircolors.c (slack_codes): Add "DOOR". + (ls_codes): Add corresponding "do". + Reported by John Gotts. + + * configure.in (ALL_LINGUAS): Add Italian (it). + +1999-02-07 Jim Meyering <meyering@ascend.com> + + * Version 4.0d (aka 4.1-b4). + + * Makefile.maint (my-distcheck): Don't depend on dist, now that this + is hooked up to the distcheck rule. + * Makefile.am (distcheck-hook): New target and rule -- link to shared + rule, my-distcheck, in Makefile.maint. + + * doc/fileutils.texi (shred invocation): New section. From Colin Plumb. + + * configure.in (jm_FUNC_GETGROUPS): Move the test into a new file, + group-member.m4, and just use this new macro. + Use `.$ac_objext', not the literal `.o'. + +1999-02-02 Jim Meyering <meyering@ascend.com> + + * src/ls.c (S_ISLNK, S_ISFIFO, S_ISSOCK, S_ISCHR, S_ISBLK, S_ISDOOR): + Define to zero if not already defined. + (HAVE_SYMLINKS): Define. + (gobble_file): Remove #ifdef. + (get_link_name, make_link_path): Guard these with #if HAVE_SYMLINKS + rather than #ifdef S_ISLNK. + (print_type_indicator): Remove #ifdefs and reorganize. + (print_color_indicator): Remove #ifdefs. + (length_of_file_name_and_frills): Likewise. + +1999-02-01 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * src/dircolors.hin: Handle DOOR. + + * src/ls.c (print_type_indicator): Print doors as '>'. + (length_of_file_name_and_frills): Account for this. + (indicator_no): Define C_DOOR. + (indicator_name): Add corresponding name. + + * lib/filemode.c (ftypelet): Handle doors. + + * lib/filemode.c, src/system.h (S_ISDOOR): Define if missing. + +1999-02-01 Jim Meyering <meyering@ascend.com> + + * lib/strcasecmp.c (STRXCASECMP_FUNCTION): Don't increment within macro + argument list. From Akim Demaille. + +1999-01-31 Jim Meyering <meyering@ascend.com> + + * doc/fileutils.texi: Wrap the @top node in @ifnottex instead of + @ifinfo so `makeinfo --html ...' works. From Karl Berry. + + * tests/ln/misc: Add test for this. + * src/ln.c (do_link): Allow creation of a hard link to a dangling + symlink. Reported by Alexey Solovyov. + + * src/copy.c (copy_internal): Describe any backup-related renaming + operations when in verbose mode. + (copy_internal): Likewise. + Based on changes from Marty Leisner. + + * lib/lchown.c: Declare chown. + +1999-01-30 Jim Meyering <meyering@ascend.com> + + * acconfig.h: Remove uintmax and STAT* #undefs. + * configure.in: Require autoconf 2.13. + Remove test for AFS. + Use 3-argument form of AC_DEFINE*. + +1999-01-28 Jim Meyering <meyering@ascend.com> + + * po/POTFILES.in: Add src/shred.c. + + * src/system.h: Use TIME_WITH_SYS_TIME-based #if test rather than + TM_IN_SYS_TIME based one (for shred). + + * acconfig.h: Remove lots of `#undef's, now that we use the + 3-argument forms of AC_DEFINE* macros. + +1999-01-25 Jim Meyering <meyering@ascend.com> + + * configure.in (fdatasync): Use AC_CHECK_FUNCS instead of + AC_REPLACE_FUNCS. + (AC_CHECK_FUNCS): Add clock_gettime. + + * src/shred.c (isaac_seed): Guard clock_gettime with test of + HAVE_CLOCK_GETTIME, not CLOCK_REALTIME. + (wipename): Rename local dirfd to dir_fd to avoid shadowing the + function declared in Linux's dirent.h. + +1999-01-25 Akim Demaille <demaille@inf.enst.fr> + + * lib/argmatch.h (ARRAY_CARDINALITY): Define. + (ARGMATCH_ASSERT): New macro. + + * lib/argmatch.c (program_name): Remove dcl. + Include error.h. + (argmatch_invalid): Use error rather than fprintf. + +1999-01-24 Jim Meyering <meyering@ascend.com> + + * src/ansi2knr.c: Exit nonzero upon failed write to stdout. + New version from L. Peter Deutsch. + + * lib/quotearg.c (quotearg_n_options): Revert type of parameter `n' + (and hence that of the local `n1', too) to `int' at Paul's request. + + * lib/closeout.c: Add comments. + + * src/shred.c (fdatasync): Remove function. instead, ... + (fdatasync) [! HAVE_FDATASYNC]: Define to fsync. + From Colin Plumb. + +1999-01-23 Jim Meyering <meyering@ascend.com> + + * src/Makefile.am (bin_PROGRAMS): Add shred. + * src/shred.c: New file. + Portability tweaks. + Internationalize. + (wipename): Print the `FILE: deleted' and `FILE: deleting' messages + only when in verbose mode. + (fdatasync) [! HAVE_FDATASYNC]: New function. + + * man/Makefile.am (man_MANS): Add shred.1. + * man/Makefile.summ (shred-summary): Define. + * man/shred.x: New file. + + * src/shred.c: New file. From Colin Plumb. + Include config.h, getopt.h, system.h and error.h. + Use #else/#if, not #elif. + +1998-11-05 Paul Eggert <eggert@twinsun.com> + + * lib/mktime.c (__mktime_internal): Adopt the traditional (and + problematic) notion of what to do when tm_isdst doesn't match. + +1999-01-17 Jim Meyering <meyering@ascend.com> + + * tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set PATH here, rather + than setting RM and CP. + * tests/cp/*: Now that PATH is set properly, use rm and cp rather + than $RM and $CP. + + * tests/ln/Makefile.am (TESTS): Add backup-1. + (TESTS_ENVIRONMENT): Set PATH here, rather than setting LN. + * tests/ln/*: Now that PATH is set properly, use ln rather than $LN. + * tests/ln/backup-1: New test for this. + * src/ln.c (do_link): Try to remove DEST even after renaming it. + This fixes a bug reported by Jamie Lokier. + + * src/ln.c (same_name): Use SAME_INODE rather than open coding it. + +1999-01-16 Jim Meyering <meyering@ascend.com> + + * lib/argmatch.c (ARGMATCH_DIE_DECL): Use it. + + * acconfig.h: Remove @BOTTOM@ section. + Instead, add the define and decl via m4/jm-macros.m4. + + * src/ls.c: Don't declare base_name. + Use function-style XARGMATCH once again. + * src/touch.c: Likewise. + * acconfig.h: Add a @BOTTOM@ section. + (ARGMATCH_DIE) [@BOTTOM@]: Define to usage(1). + Declare usage. + From Akim Demaille. + + * src/cp.c: Remove declarations of base_name and get_version. + (main): Don't call getenv ("VERSION_CONTROL"); xget_version does it. + Use xget_version and function-style XARGMATCH. + * src/mv.c (main): Likewise. + * src/ln.c (main): Likewise. + * src/install.c (main): Likewise. + * lib/quotearg.c (quotearg_n_options): Declare n1 to be of type + unsigned int, not just int. + * lib/backupfile.h (get_version): Adjust prototype. + (xget_version): Add prototype. + (base_name): Remove prototype. + * lib/backupfile.c [!HAVE_DECL_GETENV]: Declare getenv. + (backup_args): Reorder enum members. + (backup_types): Likewise. + (get_version): Take an additional parameter, `context'. + (xget_version): Like get_version, but if the `version' argument is NULL, + use the value of the envvar VERSION_CONTROL. + (base_name): Declare. + Mostly from Akim Demaille. + + * lib/addext.c (base_name): Declare. + * src/sys2.h: Add prototype for base_name. + + * lib/argmatch.c: s/argmatch_exit_failure/argmatch_die/ + * lib/argmatch.h: Likewise. + + * lib/argmatch.h (XARGMATCH): Define to return a value once again. + (XARGCASEMATCH): Likewise. + + * lib/argmatch.c (EXIT_FAILURE): Define. + (ARGMATCH_DIE): Provide default. + (__xargmatch_internal): New function. + s/rogram_name/program_name. + From Akim Demaille. + +1999-01-14 Akim Demaille <demaille@inf.enst.fr> + + * src/touch.c (usage): Don't make it static so that it can be + called from libfu.a by xargmatch. + * src/chgrp.c (usage): Likewise + * src/chmod.c (usage): Likewise + * src/chown.c (usage): Likewise + * src/cp.c (usage): Likewise + * src/dd.c (usage): Likewise + * src/df.c (usage): Likewise + * src/dircolors.c (usage): Likewise + * src/du.c (usage): Likewise + * src/install.c (usage): Likewise + * src/ln.c (usage): Likewise + * src/ls.c (usage): Likewise + * src/mkdir.c (usage): Likewise + * src/mkfifo.c (usage): Likewise + * src/mknod.c (usage): Likewise + * src/mv.c (usage): Likewise + * src/mvdir.c (usage): Likewise + * src/rm.c (usage): Likewise + * src/rmdir.c (usage): Likewise + * src/sync.c (usage): Likewise + +1999-01-12 Akim Demaille <demaille@inf.enst.fr> + + * lib/backupfile.c (get_version): added the parameters KIND. + (xget_version): like get_version, but if argument is NULL, honor + the envvar VERSION_CONTROL. + * src/cp.c: Remove declarations of base_name and get_version. + (main): Use xget_version. + * src/mv.c (main): Likewise. + * src/ln.c (main): Likewise. + * src/install.c (main): Likewise. + +1999-01-12 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add Greek (el). + * po/el.po: New file. + + * install-sh: New version from autoconf. + * missing: New version from automake. + * src/ansi2knr.c: Likewise. + * lib/getopt.c: New version from glibc. + * lib/getopt.h: Likewise. + * lib/getopt1.c: Likewise. + * lib/regex.c: Likewise. + * lib/regex.h: Likewise. + * lib/ylwrap: Remove unused file. + +1999-01-10 Jim Meyering <meyering@ascend.com> + + * Version 4.0c (aka 4.1-b3). + + * Upgrade to autoconf-2.13 and automake-1.3b. + + * src/copy.c (copy_internal): Handle two more values of errno from + failed rename of a directory into a subdirectory of itself. + Thanks to Volker Borchert for testing many types and combinations + of systems. + + * lib/argmatch.c (ARGMATCH_QUOTING_STYLE): Change from c_quoting_style + to escape_quoting_style. + (argmatch_invalid): Now that the quoted quantity is no longer double + quoted, remove the code that removed leading and trailing double quotes. + + * src/ls.c (decode_switches): Now that escape_quoting_style no longer + escapes the SPACE character, arrange for SPACEs to be quoted here. + * lib/quotearg.c (quotearg_buffer): Change escape_quoting_style so that + it no longer escapes ` '. + Suggestion from Paul Eggert. + +1999-01-05 Jim Meyering <meyering@ascend.com> + + * configure.in (space): Add `for' in message of statvfs check. + From Ulrich Drepper. + +1999-01-04 Jim Meyering <meyering@ascend.com> + + * Version 4.1-b2. + +1999-01-02 Jim Meyering <meyering@ascend.com> + + * lib/argmatch.c (argmatch_invalid): Remove double quotes from the + offending quoted argument before using it in explanatory diagnostic. + Use a single fprintf stmt. + + * lib/argmatch.h (XARGMATCH): Don't return a value; instead, + modify a parameter. Add a `Die_stmt' parameter. + Add parentheses. + * lib/argmatch.c (__xargmatch_internal): Remove now-unused function. + (argmatch_to_argument): Add `const' attribute to first parameter. + + * configure.in (AC_REPLACE_FUNCS): Remove strcasecmp (now it's + done in m4/jm-macros.m4). + + * lib/backupfile.c (get_version): Adapt to use new interface to + XARGMATCH. + * src/cp.c: Likewise. + * src/ls.c: Likewise. + * src/touch.c: Likewise. + +1999-01-01 Jim Meyering <meyering@ascend.com> + + * lib/makepath.c (make_dir): New function, factored out of make_path. + (make_path): Use make_dir rather than open-coding it twice. + This effectively reverses the order of the latter pair of stat/mkdir + calls and fixes a race condition bug whereby one of two concurrent + `mkdir -p' processes could fail with EEXIST. + Include locale.h and libintl.h, and define `_()'. + Mark translatable strings. + + * lib/xmalloc.c: Add comments. + (xcalloc, xmalloc, xrealloc): Remove prototypes. + (xcalloc): Remove `#ifdef NOT_USED' that used to hide this function. + * lib/xalloc.h: Add comments. + (PARAMS, XMALLOC, XCALLOC, XREALLOC): Define. + (xcalloc, xmalloc, xrealloc): Add prototypes here. + Based on changes from Akim Demaille. + + * lib/quotearg.c (quotearg_buffer): Cast -1 to size_t before comparing. + (quotearg_n): Change type of 1st parameter from int to unsigned int. + (quotearg_n_options): Likewise. + * lib/quotearg.h (quoting_style_vals): New public array. + From Akim Demaille. + (quotearg_n_options): Declare `options' parameter to be `const'. + + * lib/human.c (humblock): Use ARGMATCH in place of argmatch. + + * lib/backupfile.c (get_version): Use XARGMATCH in place of + argmatch & co. + +1998-12-31 Jim Meyering <meyering@ascend.com> + + * src/ls.c (indicator_style_types): New variable. + (format_types): Rename from `formats'. + (color_args): Remove unnecessary `no' string. + (color_types): Remove corresponding `color_never' entry. + (main): Use ARGMATCH_TO_ARGUMENT. + (decode_switches): Use ARGMATCH instead of argmatch code + in each of several cases. + From Akim Demaille. + + * src/cp.c (main): Use XARGMATCH in place of argmatch & co. + * src/touch.c (main): Likewise. + * lib/backupfile.c (get_version): Likewise. + From Akim Demaille. + + * lib/strncasecmp.c: New file. + * lib/strcasecmp.c: Add #ifdefs so it can be used for strncasecmp, too. + * lib/argmatch.c (strncasecmp): Move to a separate file. + Add curly braces around some one-stmt-but-multiline blocks. + + * lib/argmatch.c: Improvements from Akim Demaille. + * lib/argmatch.h: Likewise. + + * lib/addext.c (addext): Protoize. + Indent cpp directives to match nesting. + + Fix warnings from gcc -W -Wall + * lib/posixtm.c (posix_time_parse): Change type of index `i' from + int to unsigned int. + * lib/getdate.y (__attribute__): Define. + (ATTRIBUTE_UNUSED): Define. + (yyerror): Mark parameter as unused with ATTRIBUTE_UNUSED. + (MonthDayTable): Add initializers for last entry. + (UnitsTable): Likewise. + (OtherTable): Likewise. + (MilitaryTable): Likewise. + +1998-12-22 Jim Meyering <meyering@ascend.com> + + * Version 4.1-b1. + + * configure.in (ALL_LINGUAS): Add chinese (zh). + +1998-12-19 Jim Meyering <meyering@ascend.com> + + * tests/ln/misc: Use absolute path for final rm. + + * Makefile.maint (my-distcheck): Run make with + CFLAGS='-Wformat -Werror'. + +1998-12-18 Jim Meyering <meyering@ascend.com> + + * src/copy.c (copy_internal): Remove errnoeous `%s: ' prefix + from format string. From Michiel Bacchiani. + + * src/chgrp.c (MAXGID): Define. + Use gid_t (not int) as the type for `group' variables. + (parse_group): Use MAXGID, not INT_MAX. + + * src/install.c (UID_T_MAX, GID_T_MAX): Remove definitions. + * src/sys2.h (UID_T_MAX, GID_T_MAX): Define them here instead. + +1998-12-13 Jim Meyering <meyering@ascend.com> + + * lib/Makefile.am (EXTRA_DIST): Add xstat.in. + +1998-12-12 Jim Meyering <meyering@ascend.com> + + 1998-10-15 Akim Demaille <demaille@inf.enst.fr> + * src/ls.c: Group DIRED's code together. + (full_time, inhibit_group, col_ext_type): Declare static. + (dired_dump_obstack): Apply sizeof to variable, instead of its type. + (parse_ls_color): Rename ext2 as e2. Move into the block where it + is used. + + 1998-10-15 Akim Demaille <demaille@inf.enst.fr> + * src/ls.c: In order to distinguish col(umn|or): + (init_column_info): Renamed from init_col_info. + (struct column_info): Renamed from struct col_info. + (struct color_ext_type): Renamed from struct col_ext_type. + +1998-12-11 Jim Meyering <meyering@ascend.com> + + * lib/Makefile.am (lstat.c): Add rule to generate this from xstat.in. + (stat.c): Likewise. + * lib/stat.c: Remove file. + * lib/lstat.c: Remove file. + * lib/xstat.in (xstat@): New file. + + * lib/quotearg.c (quotearg_buffer): Use `7' as the mask, not `3'. + From Bruno Haible. + * tests/ls-2/tests: Add a test for this. + + * man/help2man: import version 1.006. + +1998-12-07 Jim Meyering <meyering@ascend.com> + + * src/copy.c: Use dir_name, not dirname. Include dirname.h. + * src/cp.c: Likewise. + * src/df.c: Likewise. + * src/install.c: Likewise. + * src/ln.c: Likewise. + * src/mvdir.c: Likewise. + + * lib/dirname.c (dir_name): Rename from dirname. + Make argument `const'. Include "dirname.h" + * lib/dirname.h: New file. + * lib/Makefile.am (noinst_HEADERS): Add dirname.h. + +1998-12-06 Jim Meyering <meyering@ascend.com> + + * lib/rpmatch.c (rpmatch) [!ENABLE_NLS]: Hard-code tests to use + `^[yY]' and `^[nN]' (avoiding regex). From Karl Heuer. + + * lib/*.c: Ansideclify. + + Fix `ls -R .' formatting bug that broke mktexlsr. + * src/ls.c: Include path-concat.h. + (basename_is_dot_or_dotdot): New function, derived from + is_not_dot_or_dotdot. + (is_not_dot_or_dotdot): Remove function. + (extract_dirs_from_files): Use `!basename_is_dot_or_dotdot' + instead of is_not_dot_or_dotdot and use path_concat instead of attach. + + * tests/ls-2/tests: New file (renamed from quoting), + with new test for the `ls -R .' fix. + * tests/ls-2/quoting: Remove file. + * tests/ls-2/Makefile.am (TESTS): s/quoting/tests/. + +1998-11-29 Jim Meyering <meyering@ascend.com> + + * src/remove.c (DOT_OR_DOTDOT): Move definition from this file... + * src/sys2.h (DOT_OR_DOTDOT): ...to this one. + + * src/dd.c (dd_copy): Rename function from `copy'. + + * src/cp.c (do_copy): Rename local: s/unused/copy_into_self/. + + Per Kristian Hove reported that a certain move-directory-into-self + wasn't properly diagnosed. + + * tests/mv/into-self-3: New file. + * tests/mv/Makefile.am (TESTS): Add into-self-3. + * src/copy.c (copy_internal): Remove earlier (but less effective) + test for move/copy-into-self. + Instead, deduce the move-into-self condition from errno==EINVAL + after a failed rename. + * src/mv.c (do_move): Don't arrange to remove DEST in the + copied-into-self case. + +1998-11-15 Jim Meyering <meyering@ascend.com> + + Bob McCracken reported that mv couldn't handle certain combinations + of hard linked source files. + + * tests/mv/hard-link-1: New file. + * tests/mv/Makefile.am (TESTS): Add hard-link-1. + * src/mv.c (movefile): Don't free new_dest. + + * lib/error.c (error): Don't use strerror_r's return value. + From Johan Danielsson. + +1998-11-14 Jim Meyering <meyering@ascend.com> + + * Version 4.0. + + * Makefile.maint (cvs-dist): Search for `$tag:' rather than just $tag + to avoid matching a prefix of another tag. + +1998-11-10 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add Greek (el). + * po/el.po: New file. + +1998-11-07 Jim Meyering <meyering@ascend.com> + + * Version 4.0-b7. + + Accommodate the Hurd (defining lstat to rpl_lstat via config.h didn't + work on Hurd systems because of an inline definition of lstat in a + system header file). This also makes it so that you may run `ls '' ' + on systems that let l?stat operate on the empty string. + + * src/remove.c [HAVE_LSTAT_EMPTY_STRING_BUG]: Define lstat to rpl_lstat + and declare the latter. + * lib/stat.c [stat]: Remove #undef. + (rpl_stat): Protoize. + * lib/lstat.c [lstat]: Remove #undef. + (rpl_lstat): Protoize. Use ENOENT, not EINVAL, to be consistent + with lib/stat.c. + * acconfig.h: Remove #undef's for lstat and stat. + +1998-10-31 Jim Meyering <meyering@ascend.com> + + * tests/rm/Makefile.am (TESTS): Add new test `empty-name', + but comment it out. + * tests/rm/empty-name: New file. + + * acconfig.h (stat): New #undef. + This omission was uncovered when Mark Kettenis reported that + `rm -r ''' got a failed assertion on the Hurd. This change + doesn't fix *that* problem -- see above. + +1998-10-25 Jim Meyering <meyering@ascend.com> + + * Version 4.0-b6. + + * README: Man pages will now be supported to the extent that + people send patches. + + * tests/rm/unreadable: Two new tests. + * tests/rm/Makefile.am (TESTS): Add new test `unreadable'. But comment + it out since we're so close to release and since the test compares the + text of diagnostics that are likely to vary between systems. + (TEST_ENVIRONMENT): Add required framework. + + * src/remove.c (remove_cwd_entries): Don't apply CLOSEDIR to a NULL + pointer. (provoke with `mkdir -m 0100 x; rm -rf x') + Upon CLOSEDIR failure, set `status' to RM_ERROR, not RM_OK. + (remove_dir): Return `status', rather than always RM_OK. + +1998-10-18 Jim Meyering <meyering@ascend.com> + + * Version 4.0-b5. + + * lib/mktime.c: Update from libc with this additional change from Paul. + * lib/strftime.c: Likewise. + + 1998-10-17 Paul Eggert <eggert@twinsun.com> + + Don't invoke localtime_r or gmtime_r unless it's the GNU C + library's localtime_r and gmtime_r; there are too many buggy + implementations of localtime_r and gmtime_r out there, and + it's not worth keeping track of all the different bugs. + + * mktime.c (__EXTENSIONS__, HAVE_LOCALTIME_R): Remove. + (my_mktime_localtime_r): Renamed from localtime_r; all uses changed. + Base it on localtime unless _LIBC. + + * strftime.c (__EXTENSIONS__): Remove. + (my_strftime_gmtime_r): Renamed from gmtime_r; all uses changed. + (my_strftime_localtime_r): Renamed from localtime_r; all uses changed. + Base them on localtime/gmtime if not _LIBC. + +1998-10-17 Jim Meyering <meyering@ascend.com> + + * Version 4.0-b4. + + * lib/mktime.c: Declare localtime_r if necessary. + * lib/strftime.c: Likewise. + + * tests/Fetish.pm (run_tests): Run $prog with --version only + if $verbose. + +1998-10-11 Jim Meyering <meyering@ascend.com> + + * Version 4.0-b3. + +1998-10-08 Paul Eggert <eggert@twinsun.com> + + * mktime.c (__mktime_internal): When the requested time falls + in a spring-forward gap of size DT, return a time that is DT + away from the requested time, preferring a time whose tm_isdst + differs from the requested value. Bump the max number of + probes from 4 to 6 to account for the extra probes needed to + discover a spring-forward gap in the worst case. + +1998-10-08 Paul Eggert <eggert@twinsun.com> + + * mktime.c (my_mktime_localtime_r): Renamed from localtime_r. + Define also if HAVE_LOCALTIME_R && defined (localtime_r), with + a body that merely expands localtime_r; this works around a + bug in Digital Unix 4.0A and 4.0D. + +1998-10-05 Jim Meyering <meyering@ascend.com> + + * po/Makefile.in.in (uninstall): Remove (historical?) command that + removed po-Makefile.in.in. From Akim Demaille. + + * src/install.c (long_options): Add entry for --suffix=SUFFIX option. + From aldomel. + +1998-10-04 Jim Meyering <meyering@ascend.com> + + * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define PERL. + From Kaveh Ghazi. + +1998-10-03 Jim Meyering <meyering@ascend.com> + + * Version 4.0-b2. + + * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Add PATH. + + * man/Makefile.maint ($(man_MANS)): Don't depend on actual executables. + Instead, depend on corresponding source file and on configure.in. + Based on suggestion and code from Akim Demaille. + Factor out irregular men into Makefile.summ. + + * man/Makefile.am (EXTRA_DIST): Add Makefile.summ. + + * man/Makefile.summ: New file. + * man/Makefile.maint: Include it. + + * tests/Fetish.pm: Make `DEBUG' be a little more verbose. + + * tests/mv/Makefile.am (TESTS): Add i-1. + * tests/mv/i-1: New test. + +1998-10-02 Jim Meyering <meyering@ascend.com> + + * tests/ls-2/Makefile.am (EXTRA_DIST): Remove run-test. + * tests/ls-2/run-test: Remove file. + * tests/ls-2/quoting: Include /bin/sh driver framework. + + * tests/dircolors/simple: Remove file. + * tests/dircolors/run-test: Embed it here instead. + * tests/dircolors/simple: Rename from run-test. + +1998-10-01 Jim Meyering <meyering@ascend.com> + + * tests/Makefile.am (EXTRA_DIST): Remove README. + From Akim Demaille. + +1998-09-28 Jim Meyering <meyering@ascend.com> + + * Version 4.0-pre1. + + * Use automake-1.3b. See notes in README. + + * src/copy.c (copy_internal): Do honor `n' reply in move-mode. + Otherwise, `touch a b; echo n|mv -i a b' would remove b. + From Bernd Leibing. + +1998-09-27 Jim Meyering <meyering@ascend.com> + + * Version 3.16z. + + * Makefile.maint (alpha): New target. + (my-distcheck): Tweak. + + * lib/backupfile.h: Protect against multiple inclusion. + From Akim Demaille. + + * configure.in: Remove use of AC_FUNC_FNMATCH and associated code. + Now, it is invoked through jm_MACROS. + + * lib/strftime.c (my_strftime): Update from FSF. + +1998-09-26 Jim Meyering <meyering@ascend.com> + + * src/copy.c (copy_internal): Don't preserve hard-linked directories + to avoid damaging the destination filesystem when copying from a + Netapp snapshot directory. With code from Kjetil Torgrim Hollstein + and Paul Eggert. + +1998-09-24 Jim Meyering <meyering@ascend.com> + + * man/Makefile.maint ($(man_MANS)): Correct typo: s/-tmp/-t/. + From Akim Demaille. + +1998-09-21 Jim Meyering <meyering@ascend.com> + + * man/Makefile.maint ($(man_MANS)): Remove `echo'. + +1998-09-20 Jim Meyering <meyering@ascend.com> + + * Version 3.16y. + + * src/install.c (install_file_to_path) [-D]: Create any leading + directories with permissions of 0755. + +1998-09-19 Jim Meyering <meyering@ascend.com> + + * src/install.c (install_file_to_path): Copy the file after creating + any leading directories. + (main) [case 'v']: Set `x.verbose' to 1, not 0. + Reported by Marty Leisner. + + * man/Makefile.am (transform): Define. + (man_MANS): Include ginstall.1, not install.1, to match the name + of the executable in ../src. + * man/ginstall.x: New file. + * man/install.x: Remove file. + * man/Makefile.maint (ginstall-summary): Renamed from install-summary. + + * man/Makefile.am (EXTRA_DIST): Add Makefile.maint and GNUmakefile. + Reported by Akim Demaille. + + * lib/modechange.c: Fix post-protoization typo. + + * lib/posixtm.h (PARAMS): Define and use. + From Kaveh Ghazi. + +1998-09-12 Jim Meyering <meyering@ascend.com> + + * Version 3.16x. + + * src/remove.c (remove_cwd_entries): Declare to be static. + + Automatically generate man pages from combination of --help + output and the contents of new, man/*.x files. + * man/Makefile.am (HELP2MAN): Define. + (man_aux): Define. + (EXTRA_DIST): Add $(HELP2MAN) and $(man_aux). + (MAINTAINERCLEANFILES): Add $(man_MANS). + * man/*.x: New files. + * man/GNUmakefile: New file. + * man/Makefile.maint: New file. + * man/help2man: New file. + +1998-09-09 Jim Meyering <meyering@ascend.com> + + * lib/modechange.c: Protoize. + +1998-09-07 Jim Meyering <meyering@ascend.com> + + * Version 3.16w. + + * src/df.c (show_dev) [!posix_format]: When using --print-type, + let the device path and the file system type share a single (wider) + field if their combined lengths allow it. From Andries Brouwer. + + * tests/touch/empty-file: Upon failure, suggest how to rerun the test + with longer delay, in case NFS clock skew was the cause of the failure. + Reported by Kaveh Ghazi. + + * tests/ls-2/quoting: Add tests. + * tests/Fetish.pm (run_tests): Add simple PRE/POST hooks. + (_create_file): Don't include $$ in temp file name. + (run_tests): Use shorter suffixes for temp file names. + +1998-09-06 Jim Meyering <meyering@ascend.com> + + * src/touch.c: Include posixtm.h. + (usage): Correct the description of the format of the + date string argument to -t option. + (main): Update to use rewritten posixtime function. + Reported by Andries Brouwer. + + * lib/Makefile.am (libfu_a_SOURCES): Change posixtm.y to posixtm.c. + (noinst_HEADERS): Add posixtm.h. + + * lib/posixtm.h: New file. + * lib/posixtm.c: New file. Rewritten based on posixtm.y. + * lib/posixtm.y: Remove file. + +1998-09-05 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * src/ls.c (print_dir_name): Put back. + (print_dir): Also print directory name header if print_dir_name is + true. + +1998-08-29 Jim Meyering <meyering@ascend.com> + + * Version 3.16v. + + * src/du.c (long_options): Use corresponding short-option character + in place of `1', and `NULL' in place of pointer in initialization. + * src/cp.c (long_opts): Likewise. + * src/ln.c (long_options): Likewise. + * src/mkdir.c (longopts): Likewise. + * src/rmdir.c (longopts): Likewise. + * src/chown.c: Replace 12 and 13 with CHAR_MAX + 1 and CHAR_MAX + 2 + respectively. + * src/chmod.c (long_options): Replace 12 with CHAR_MAX + 1. + * src/chgrp.c (long_options): Replace 12 with CHAR_MAX + 1. + + * tests/Fetish.pm: New file -- moved from ls-2/. + * configure.in (AC_OUTPUT): Add tests/dircolors/Makefile. + * tests/Makefile.am (SUBDIRS): Add dircolors. + (EXTRA_DIST): Add Fetish.pm. + * tests/dircolors: New directory + + * src/ls.c (print_dir_name): Remove global variable. + (print_dir): When trace_dirs is set, always print the directory + name header. + +1998-08-26 Jim Meyering <meyering@ascend.com> + + * src/dircolors.c (dc_parse_stream): Don't segfault when a line + contains only one token. Reported by Olav Morkrid. + +1998-08-24 Paul Eggert <eggert@twinsun.com> + + * src/system.h (CHAR_MIN, CHAR_MAX): + Renamed from SCHAR_MIN, SCHAR_MAX, since these + macros apply to char, not signed char. + + * src/df.c, src/du.c, src/touch.c (long_options, main): + Don't assume ASCII. + +1998-08-18 Paul Eggert <eggert@twinsun.com> + + Port nanosecond-resolution times to UnixWare 2.1.2 and + pedantic Solaris 2.6. + + * configure.in (AC_STRUCT_ST_MTIM_NSEC): Renamed from AC_STRUCT_ST_MTIM. + * acconfig.h (ST_MTIM_NSEC): New #undef. + * src/system.h (ST_TIME_CMP_NS, ATIME_CMP, CTIME_CMP, MTIME_CMP): + Use new ST_MTIM_NSEC macro. + +1998-08-16 Jim Meyering <meyering@ascend.com> + + * lib/filemode.h (PARAMS): Define and use. + From Kaveh Ghazi. + +1998-08-15 Jim Meyering <meyering@ascend.com> + + * Version 3.16u. + + * Makefile.maint (announcement): New target. + + * tests/mv/into-self: Update to reflect changed behavior of mv. + * src/mv.c (do_move): Fail upon attempt to move a directory into itself. + With prodding from François Pinard :-) + + * tests/ls-2/Fetish.pm: New file + * tests/ls-2/run-test: New file + + * src/copy.c (copy_internal) [one-file-system]: Do copy mount point + directories (but none of their entries). This makes `cp --archive + --one-file-system' use the same policy `tar --one-file-system' does. + From Marty Leisner. + + * src/ls.c (qmark_funny_chars): Add comment from Paul eggert. + +1998-08-14 Jim Meyering <meyering@ascend.com> + + * tests/mv/setup: Work around another bug in Ultrix4.3a's /bin/sh. + Reported by Christian von Roques. + + * configure.in (AC_OUTPUT): Add tests/ls-2/Makefile. + * tests/Makefile.am (SUBDIRS): Add ls-2. + * tests/ls-2: New directory + +1998-08-14 Christian von Roques <roques@pond.sub.org> + + * lib/mountlist.c (read_filesystem_list) [MOUNTED_GETMNT]: Don't + infloop on getmnt(2) returning 0. + + * tests/cp/backup-is-src: Avoid bug in Ultrix4.3a /bin/sh, + not initializing output redirection of : command. + * tests/mv/backup-is-src: Likewise. + * tests/rm/i-1: Likewise. + +1998-08-12 Jim Meyering <meyering@ascend.com> + + * po/Makefile.in.in: Provide automake-style DESTDIR support. + From Johan Danielsson. + (DISTFILES): Remove ChangeLog. + po/ChangeLog: Remove empty file. + + * configure.in (AC_STRUCT_ST_DM_MODE): Use it. + + * src/ls.c: Include filemode.h. + * src/chmod.c: Likewise. + + * lib/filemode.c (ftypelet): Add comments for Cray DMF support. + From Johan Danielsson. + Protoize. Tsort function definitions and remove prototypes of + static functions. + (mode_string): Remove prototype. + * lib/filemode.h (mode_string): New file. + * lib/Makefile.am (noinst_HEADERS): Add filemode.h. + +1998-08-09 Jim Meyering <meyering@ascend.com> + + * Version 3.16t. + +1998-07-31 Paul Eggert <eggert@twinsun.com> + + Add support for filesystems whose timestamps have better resolution + than 1 second (e.g. Solaris 2.6, recent Linux kernels). + + * configure.in (AC_STRUCT_ST_MTIM): Add. + + * src/copy.c (copy_internal): Compare time stamps with + subsecond resolution if available. + + * src/ls.c (compare_ctime, rev_cmp_ctime, compare_mtime, + rev_cmp_mtime, compare_atime, rev_cmp_atime): Compare time + stamps with subsecond resolution if available. + + * src/system.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, + CTIME_CMP, MTIME_CMP): New macros. + +1998-08-01 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add slovak (sk) and norwegian (no). + +1998-07-28 Paul Eggert <eggert@twinsun.com> + + * lib/mountlist.c (read_filesystem_list): Remove all_fs + argument, but put the necessary information into the result so + that the caller can ignore filesystems that he's not + interested in. + + * lib/mountlist.h (struct mount_entry): + New members me_dummy, me_remote. + (read_filesystem_list): Remove all_fs argument. + (REMOTE_FS_TYPE): Remove. + (ME_DUMMY, ME_REMOTE): New macros. + + * lib/xstrtol.c: Remove duplicate include of <stdio.h>. + + * src/df.c (show_all_fs): + Revert to boolean value; the old negative value is + now in show_local_fs. + (show_local_fs): New variable. + (show_dev): New args me_dummy and me_class. Use show_local_fs + and boolean show_all_fs in combination with these new args + to decide whether to show a device. + (show_disk): Pass flags to show_dev. + (show_point): Use a non-dummy mount entry if possible. + (show_all_entries): Pass flags to show_dev. + (main): --local sets show_local_fs now. Ask for file system types if + show_local_fs is nonzero, since ME_REMOTE might need them. + +1998-07-27 Jim Meyering <meyering@ascend.com> + + * tests/install/Makefile.am (TESTS_ENVIRONMENT): Set LS, MKDIR, and RM. + + * tests/install/basic-1: Add a test for this. + * src/install.c: Make copy create each destination file initially + with mode 0600 so strip will work, then apply specified mode. + Arne Henrik Juul reported that `./ginstall -s -c -m 555 dd /tmp' failed. + +1998-07-25 Jim Meyering <meyering@ascend.com> + + * src/mv.c (chown): Remove unused definition. + Reported by Kaveh Ghazi. + + * src/rmdir.c (main): rmdir fails with EEXIST on some systems. + Handle that, so --ignore-fail-on-non-empty works. + (EEXIST): Define to zero if not defined. + (ENOTEMPTY): Likewise. + + * tests/cp/same-file: Remove `diff' I'd put in for debugging. + Exit with the status from cmp. + + * Version 3.16s. + + * tests/cp/same-file: Skip three more unportable tests. + These failed on SunOS4.1.4. + + * src/copy.c (SAME_INODE): Remove definition. + * src/sys2.h (SAME_INODE): Define it here instead. + + * src/remove.c (same_file): New function. + (remove_dir): Use it to give a better diagnostic when rmdir fails + because it can't remove the current directory. + + * src/df.c (long_options): Changes table entries not to use this form: + {"all", no_argument, &show_all_fs, 1}, + but rather this form: + {"all", no_argument, NULL, 'a'}, + Using the latter, all the option handling in one place: the getopt loop. + + * lib/mountlist.c (read_filesystem_list) [MOUNTED_GETMNTINFO]: + Use fsp_to_string. + (fsp_to_string): Don't xmalloc return value (yet). + (xatoi): Ansideclify. + (fstype_to_string): Ansideclify. + * lib/mountlist.h: Define and use PARAMS macro. + + * lib/utime.c: New file. + * src/touch.c (utime_now): Moved into m4/utimes.m4. + (touch) [!HAVE_UTIME_NULL]: Remove #ifdef and the use of utime_now + in the if-block. + + * configure.in (jm_FUNC_UTIME): Use this, not AC_FUNC_UTIME. + +1998-07-22 Paul Eggert <eggert@twinsun.com> + + * lib/human.c (human_readable): amt -> damt, to fix typo when + computing which power to use after overflow occurs during + multiplication. + + * lib/xstrtol.c: Include <stdio.h> if NDEBUG is not defined; + needed on SunOS 4. + +1998-07-21 Paul Eggert <eggert@twinsun.com> + + Add df -l or --local option. + * doc/fileutils.texi: Document it. + * lib/mountlist.h (REMOTE_FS_TYPE): New macro. + * lib/mountlist.c (read_filesystem_list): + If all_fs is negative, omit non-local filesytems. + + * src/df.c (show_dev): Omit local devices if show_all_fs is negative. + (show_all_fs): If negative, omit non-local filesystems. + All uses of (all_fs != 0) changed to (all_fs > 0). + (long_options, usage, main): Add -l or --local option. + (main): When asking for df of an explicit file name, get all + the mount points, so that we're more likely to find it when + we look it up. + +1998-07-18 Jim Meyering <meyering@ascend.com> + + * src/copy.c (copy_internal): Add another exclusion from the + sameness test: when --force has been specified, the destination + is unlinked before any copy. + (copy_internal): Add yet another: when both src and dest are symlinks. + + * tests/touch: New subdir. + * tests/Makefile.am (SUBDIRS): Add touch. + * configure.in (AC_OUTPUT): Add tests/touch/Makefile. + + * tests/mv/into-self-2: New test. + * tests/mv/Makefile.am (TESTS): Add into-self-2. + +1998-07-06 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * lib/mountlist.c (read_filesystem_list): Fix more memory leaks on + failure. + +1998-07-16 Jim Meyering <meyering@ascend.com> + + Work around failure of chown calls on m68k-motorola-sysv systems. + * src/chown.c: Include lchown.h. + * lib/Makefile.am (noinst_HEADERS): Add lchown.h. + * lib/lchown.h: New file, just to define ENOSYS on systems that lack it. + * lib/lchown.c: Include lchown.h. + Reported by and with suggestions from Manfred Hollstein. + +1998-07-12 Paul Eggert <eggert@twinsun.com> + + * src/df.c (print_header): Print "1k-blocks", not "1.0k-blocks". + +1998-07-07 Jim Meyering <meyering@ascend.com> + + * src/sys2.h [HAVE_FCLOSE_UNLOCKED]: Remove unnecessary block. + Suggestion from Ulrich Drepper. + +1998-07-04 Jim Meyering <meyering@ascend.com> + + * lib/safe-read.c (safe_read): Change type of pointer parameter to + `void' to avoid Irix4 cc errors. Reported by Kaveh Ghazi. + * lib/safe-read.h: Update prototype. + + * src/dircolors.c (parse_line): Add casts to avoid errors from + Irix4's `cc' C compiler. From Kaveh Ghazi. + + * lib/xstrtol.c: Include stdio.h. Required on some systems when + using assert. From Kaveh Ghazi. + + * tests/mv/backup-is-src: Use cmp, not diff. + Reported by Kaveh Ghazi. + +1998-07-03 Jim Meyering <meyering@ascend.com> + + * Version 3.16r. + + * src/remove.c (remove_dir): Use fprintf (not error) to avoid + newline in prompt. + +1998-06-30 Paul Eggert <eggert@shade.twinsun.com> + + * lib/mountlist.c (read_filesystem_list): + Don't leak memory on failure. + Don't create a dummy struct mount_entry entry; + use the address-of-the-tail-address method instead. + Preserve errno if possible on failure, setting it to 0 if inapplicable. + Close file descriptor leak if the F_SETLKW failed. + Report an error if SVR4 lock file cannot be opened for some reason + other than a nonexistent lock file. + +1998-07-03 Jim Meyering <meyering@ascend.com> + + * configure.in (AM_WITH_REGEX): Remove. Now the replacement + macro, jm_WITH_REGEX, is bundled with the rest in jm_MACROS. + * acconfig.h (WITH_REGEX): Remove undef. + * lib/Makefile.am (noinst_HEADERS): Add regex.h. + * lib/rpmatch.c: Remove #ifdef around <regex.h> inclusion. + * lib/rx.c: Remove file. + * lib/rx.h: Remove file. + + * src/df.c (df_readable): Rename local so as not to shadow global. + + * src/copy.c (SAME_INODE): New macro. + Use it to replace open-coded equivalents. + (copy_internal): Rename variable and reverse sense of tests + to make the code a little clearer. + +1998-07-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * src/copy.c (copy_internal): Try harder identifying a relative + symbolic link in the current directory. + + * src/copy.c (copy_internal): Don't skip test for same file if + creating a hardlink from symlink over a non-symlink while making + backups. + * tests/cp/same-file: Skip tests that depend on link(2) not + following symlinks. + +1998-07-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * src/copy.c (copy_internal): Don't call chown on a symlink. + +1998-07-01 Jim Meyering <meyering@ascend.com> + + * lib/xstrtol.c: Don't define NDEBUG here, now that it's done via + configure's --disable-assert option. + +1998-06-29 Paul Eggert <eggert@twinsun.com> + + * lib/mountlist.c (read_filesystem_list): + Plug file descriptor leak on failure. + Report failure if lock file can't be opened for some reason + other than nonexistence. + +1998-06-29 Jim Meyering <meyering@ascend.com> + + * Version 3.16q. + + * lib/mountlist.c (read_filesystem_list) [MOUNTED_GETMNTENT2]: + Always close stream and file descriptor before returning. + + * src/df.c (main): Move the test of the result of the + read_filesystem_list call up out of if-block -- code in the + else-block depends on it too. + +1998-06-29 Paul Eggert <eggert@twinsun.com> + + * lib/mountlist.c (read_filesystem_list): If SVR4, lock + /etc/.mnttab.lock if available, to avoid race conditions + (e.g. with the automounter on Solaris 2.6). + + Include <errno.h>, <fcntl.h>, <unistd.h>. + +1998-06-29 Jim Meyering <meyering@ascend.com> + + * lib/mountlist.c (fstype_to_string): Guard with + #if ! HAVE_F_FSTYPENAME_IN_STATFS. + +1998-06-28 Paul Eggert <eggert@twinsun.com> + + Add support for new --block-size option and + BLOCK_SIZE. DF_BLOCK_SIZE, etc. variables to `df', `du', and `ls'. + Adjust df output slightly to accommodate larger filesystems. + + * lib/human.c, lib/human.h (human_readable): Coalesce last two args + into one, for convenience. All callers changed. + (human_block_size): New function. + * lib/human.c: Include <config.h> only if HAVE_CONFIG_H. + Include <stdlib.h> if HAVE_STDLIB_H; + declare getenv unless HAVE_DECL_GETENV. + (_): New macro. + Include <argmatch.h>, <error.h>, <xstrtoul.h>. + (DEFAULT_BLOCK_SIZE): New macro. + (block_size_args, block_size_types): New constants. + (humblock): New function. + * lib/xstrtol.h (__ZLONG_MAX): Remove. + * lib/xstrtol.c (bkm_scale): Don't assume that you can convert + unsigned long to double without losing information. + (bkm_scale_by_power): New function. + + * lib/xstrtol.c (__xstrtol), src/dd.c (parse_integer): + Add support for SI-like suffixes like "GB" and "TD". + * src/dd.c (usage): Describe it. + + * src/df.c, src/du.c, src/ls.c (human_readable_base, output_units): + Remove; replace with new variable output_block_size. All uses changed. + (long_options, usage, main): Add --block-size. + (main, decode_switches): Use new human_block_size function to + initialize output block size consistently with other programs. + + * src/df.c (print_header, show_dev): Shrink some columns and expand + others, to squeeze in support for today's larger filesystems. + (print_header): Print output block size using power-of-1024 SI format. + (df_readable): Coalesce last two args into one, for convenience. + All callers changed. + (main): Remove check for portable output format and larger + or human-readable block sizes. + + * NEWS, doc/fileutils.texi: Describe above changes. + +1998-06-28 Jim Meyering <meyering@ascend.com> + + * src/ls.c (usage): Make --kilobytes description consistent with + that in du and df. From Göran Uddeborg. + + * lib/mountlist.c (fsp_to_string): Clean out some crufty #ifdefs + now that we're using the jm_FSTYPENAME autoconf macro. + James Tanis reported the old version didn't compile on BSDI3. + + * configure.in: Move big block of list_mounted_fs checks into + new jm_LIST_MOUNTED_FILESYSTEMS macro. + Use new jm_FSTYPENAME macro. + + * src/sys2.h: Add macro definitions for GNU libc *_unlocked wrappers. + * src/ls.c: Add DIRED_ prefix to the macros: PUTCHAR, FPUTS, and + FPUTS_LITERAL + +1998-06-27 Jim Meyering <meyering@ascend.com> + + * src/copy.c (copy_reg): Detect identical source and dest here. + (copy_internal): Make the test symmetric. + + * tests/cp/same-file: New file. + * tests/cp/Makefile.am (TESTS): Add it. + +1998-06-26 Jim Meyering <meyering@ascend.com> + + * src/remove.c (remove_file): Remove `non-directory' part of + `removing non-directory FILE' verbose message. + +1998-06-23 Jim Meyering <meyering@ascend.com> + + * src/df.c (show_dev): Increase field width for blocks, used, + and available columns from 7 to 8. + +1998-06-21 Jim Meyering <meyering@ascend.com> + + * aclocal.m4: Regenerate with fixed gettext.m4 installed. + See README-alpha for details. + +1998-06-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * src/automake-wrap: Quote `&' in sed replacement text. + +1998-05-31 Jim Meyering <meyering@ascend.com> + + * Version 3.16p. + + * src/install.c (main): Fix argv-handling bug in my 1998-05-09 change. + Reported by Don Parsons. + +1998-05-30 Jim Meyering <meyering@ascend.com> + + * tests/ls/time-1: Clean up ctime test. Note that it fails also + on Solaris5.5.1 tmpfs file systems. + + Solve the `rm -f rm' problem more cleanly. + * src/.rm-warning: Remove file. + * src/automake-wrap: New file. + * src/Makefile.am (AUTOMAKE): Define to use automake-wrap. + (Makefile.in): Depend on automake-wrap. + (EXTRA_DIST): Add automake-wrap. + (DISTCLEANFILES): Remove definition. + (rm_DEPENDENCIES): Likewise. + (.rm-warn-stamp): Remove rule. + +1998-05-27 Jim Meyering <meyering@ascend.com> + + * tests/ls/Makefile.am (TESTS): s/cr-1/rt-1/ + * tests/ls/rt-1: New file, renamed from cr-1. + +1998-05-26 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * src/Makefile.am (.rm-warn-stamp): Cope with $(srcdir) != ".". + + * tests/ls/cr-1: Don't use the ctime for testing, it is impossible + to set it reliably. + +1998-05-25 Jim Meyering <meyering@ascend.com> + + * configure.in (_GNU_SOURCE): AC_DEFINE it here. + * acconfig.h (_GNU_SOURCE): Remove definition from @TOP@ section. + [!_GNU_SOURCE]: Add #undef instead. + +1998-05-24 Jim Meyering <meyering@ascend.com> + + * Version 3.16o. + + * src/ansi2knr.c: Use new version from automake-1.3. + + * src/chown.c: Accept new option, --dereference. + --no-dereference is now the default. + (enum Change_status) [CH_NOT_APPLIED]: New member. + (change_symlinks): Enable this by default, now. + (describe_change): Handle new case. + (change_file_owner): Add new parameter: cmdline_arg. Update callers. + Reorganize to reflect changed semantics. + (LCHOWN): Remove definitions. + + * lib/lchown.c: New file. + +1998-05-21 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add russian (ru). + +1998-05-16 Jim Meyering <meyering@ascend.com> + + * src/remove.c (hash_compare_strings): Return true or false, not 1/0. + (remove_cwd_entries): Use RM_OK, not equivalent literal `1'. + + * lib/hash.c (is_prime): Ansideclify. + (next_prime): Ansideclify. Add an assertion. + + * lib/Makefile.am (EXTRA_DIST): Remove. Automake groks the `LIBOBJS=' + lines from the m4/*.m4 macros, so the hack of including some + custom-replaced C source file names here is no longer needed. + + * configure.in (jm_MACROS): New wrapper macro. + Remove uses of most jm_* macros. + + * acconfig.h (HAVE_STRUCT_UTIMBUF): Remove #undef. Now it's handled + as part of utimbuf.m4. + (memcmp): Add #undef. + +1998-05-12 Jim Meyering <meyering@ascend.com> + + * configure.in: Use my replacement AC_ISC_POSIX rather than + open-coding it. + + * src/copy.c (copy_internal): Plug a small leak. + +1998-05-10 Jim Meyering <meyering@ascend.com> + + * src/mv.c (do_move): Remove lots of code that was duplicated in + copy.c (copy), now that copy() has better support for mv. This fixes + a bug with cross-filesystem `mv -i' whereby you could get two prompts + for the same destination file and eventually remove the destination + file even though one of the responses was negative. + Reported by Dirk Lattermann. + + * src/copy.h: Better support for mv: + [struct cp_options] (move_mode): New member. + * src/copy.c (copy_internal): Use new move_mode member. + Add parameter. + (copy): Add parameter. + + * tests/cp/Makefile.am (TESTS): Add backup-is-src. + * tests/mv/Makefile.am (TESTS): Likewise. + + * lib/userspec.c: Don't declare strdup if it's defined as a macro. + Reported by Lorne Baker. + + * src/Makefile.am (ginstall_SOURCES): Add copy.c and cp-hash.c. + + * src/mv.c (cp_option_init): Initialize new members. + * src/cp.c (cp_option_init): Likewise. + (main): Set new preserve_* options. + +1998-05-09 Jim Meyering <meyering@ascend.com> + + * src/copy.h: Support for install: + [struct cp_options] (failed_unlink_is_fatal): New member. + (preserve_owner_and_group): New member. + (preserve_chmod_bits): New member. + (preserve_timestamps): New member. + (preserve): Remove member. + (set_mode): New member. + (mode): New member. + * src/copy.c (new_nondir_mode): New function. Use where appropriate. + Use more-specific preserve_* members in place of removed `preserve'. + (copy_internal): Honor failed_unlink_is_fatal. + + * src/install.c (main): Rewrite argv-handling to be clearer. + (copy_file): Rewrite to use copy.c (copy). + (change_attributes): Get rid of now-(with chown wrapper)-unnecessary + `no_need_to_chown' parameter. Fix caller. + (install_file_in_file): Remove now-unnecessary `to_created' parameter. + (cp_option_init): New function. + Update several functions to take new parameter specifying copy options. + + * tests/install: New subdir, with one basic test. + * tests/Makefile.am (SUBDIRS): Add install. + * configure.in (AC_OUTPUT): Add tests/install/Makefile. + + * src/dd.c: Include safe-read.h. + Don't declare safe_read. + * src/touch.c: Likewise. + + * configure.in (jm_TYPE_SSIZE_T): Use it. + * acconfig.h (ssize_t): Add undef. + +1998-05-03 Jim Meyering <meyering@ascend.com> + + * po/: Update from gettext-0.10.35. + * intl/: Likewise. + * configure.in: Remove use of AC_LINK_FILES. + (AC_OUTPUT): Remove po/Makefile-generating sed command. + +1998-04-28 Jim Meyering <meyering@ascend.com> + + * src/dircolors.c (parse_line): Use ISSPACE, not isspace. + Use unsigned char * pointers, not potentially signed ones, to avoid + sign extension. + +1998-04-26 Jim Meyering <meyering@ascend.com> + + * configure.in: Use jm_ASSERT. + * acconfig.h: Add NDEBUG. + + * src/mv.c: Don't define NDEBUG. + * src/cp.c: Likewise. + +1998-04-14 Jim Meyering <meyering@ascend.com> + + * src/.rm-warning: New file. + * src/Makefile.am (EXTRA_DIST): Add .rm-warning + (DISTCLEANFILES): Add .rm-warn-stamp. + (rm_DEPENDENCIES): Depend on .rm-warn-stamp. + (.rm-warn-stamp): New rule. + (rm_prep): Comment out rule. + + * src/df.c (main): Use STREQ in string equality tests, not strcmp. + * src/dircolors.c (dc_parse_stream): Likewise. + (dc_parse_file): Likewise. + * src/du.c (main): Likewise. + * src/ls.c (decode_switches): Likewise. + * src/remove.c (hash_compare_strings): Likewise. + * src/touch.c (main): Likewise. + +1998-04-13 Jim Meyering <meyering@ascend.com> + + * lib/Makefile.am (noinst_HEADERS): Add safe-read.h. + +1998-04-11 Jim Meyering <meyering@ascend.com> + + * lib/hash.c: Add curly braces around statements in + if/else/while/do/etc. that span more than a line -- even around + multiline simple statements or single-line simple statements + preceded by a comment line. + +1998-04-09 Jim Meyering <meyering@ascend.com> + + * configure.in: Don't use AC_PATH_PROG to check for perl, now that + we use jm_PERL. + +1998-04-06 Jim Meyering <meyering@ascend.com> + + * src/cp-hash.c (cph_hash_insert): Rename from now-conflicting + hash_insert. Also declare to be static. + * src/cp-hash.h (hash_insert): Remove declaration. + + * lib/hash.c: Lots of minor spec and name changes, and new comments. + (hash_rehash): Rewrite to be easier on the allocator. + From François Pinard. + * lib/hash.h: More comments. + * src/remove.c: Change names/usage of hash-related functions to work + with the above. + +1998-04-05 Jim Meyering <meyering@ascend.com> + + * lib/regex.c (WIDE_CHAR_SUPPORT): Define. + This now depends on HAVE_BTOWC so systems that lack btowc (like + solaris-2.5.1) don't lose. + +1998-04-04 Jim Meyering <meyering@eng.ascend.com> + + * GNUmakefile: Add conditionals so that running `make' in an + unconfigured source directory will get a reasonable diagnostic. + + * Makefile.am (ACLOCAL_AMFLAGS): Define this, so automake/aclocal + know about the m4/ subdirectory. + * Makefile.maint (aclocal-files): Remove now-unnecessary (with + automake-1.2h and the above change) aclocal-related rules and includes. + +1998-04-01 Jim Meyering <meyering@eng.ascend.com> + + * tests/ls/cr-1: New file. + * tests/ls/Makefile.am (TESTS): Add cr-1. + +1998-03-31 Jim Meyering <meyering@eng.ascend.com> + + * src/system.h (TYPE_MAXIMUM): Cast result to `(t)' so this macro + works with `unsigned char'. + From Greg Wooledge. + (SCHAR_MIN, SCHAR_MAX, SHRT_MIN, SHRT_MAX, LONG_MAX, ULONG_MAX): Define. + + * lib/xstrtol.c: Merge with the version from textutils. + + * lib/memcmp.c (rpl_memcmp): Rename from memcmp. + +1998-03-30 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * src/ls.c (compare_ctime, rev_cmp_ctime, compare_mtime, + rev_cmp_mtime, compare_atime, rev_cmp_atime, compare_size, + rev_cmp_size): Use file name as secondary sort key to get + consistent sorting. + +1998-03-28 Jim Meyering <meyering@eng.ascend.com> + + * src/copy.c: Add copyright. + * src/remove.c: Add copyright. + [_AIX]: Add #pragma alloca. + +1998-03-27 Jim Meyering <meyering@eng.ascend.com> + + * Makefile.maint ($(ACLOCAL_M4)): Replace old rule with this + dependency and the := assignment of ACLOCAL to make the default + rule use the `-I m4' option. + + * Makefile.am (AUTOMAKE_OPTIONS): Require 1.2h. + +1998-03-23 Jim Meyering <meyering@eng.ascend.com> + + * acconfig.h: Remove HAVE_INTTYPES_H, now that m4/inttypes_h.m4 + automatically handles it. + +1998-03-21 Jim Meyering <meyering@eng.ascend.com> + + * lib/quotearg.h: Update from patch-2.5.3. + * lib/quotearg.c: Likewise. + * src/ls.c (decode_switches): Pass a null pointer instead of address + of quotearg_quoting_options. + +1998-03-19 Paul Eggert <eggert@twinsun.com> + + * lib/fsusage.h (struct fs_usage): New member + fsu_bavail_top_bit_set. + * lib/fsusage.c: Include <limits.h>. + (CHAR_BIT, EXTRACT_TOP_BIT, PROPAGATE_TOP_BIT): New macros. + (get_fs_usage): If top bit of system variable corresponding to + fsu_bavail is set, then set fsu_bavail_top_bit_set, and + sign-extend the value when storing it into fsu_bavail. + * src/df.c (show_dev): If fsu_bavail_top_bit_set is nonzero, + assume the original value corresponding to fsu_bavail was negative. + Reported by Arne Juul. + +1998-03-18 Jim Meyering <meyering@eng.ascend.com> + + * src/Makefile.am (rm-prep): Add dependency and rule to save users + with `.' too early in their PATH from the `rm: cannot unlink `rm': + Text file busy' error. Suggestion from Philippe De Muyter. + +1998-03-15 Jim Meyering <meyering@eng.ascend.com> + + * Version 3.16n. + + * lib/chown.c: Use #if, not #ifdef with HAVE_ macros. + * lib/closeout.c: Likewise. + * lib/dirname.c: Likewise. + * lib/euidaccess.c: Likewise. + * lib/fileblocks.c: Likewise. + * lib/filemode.c: Likewise. + * lib/ftruncate.c: Likewise. + * lib/group-member.c: Likewise. + * lib/isdir.c: Likewise. + * lib/long-options.c: Likewise. + * lib/mountlist.c: Likewise. + * lib/path-concat.c: Likewise. + * lib/save-cwd.c: Likewise. + * lib/savedir.c: Likewise. + * lib/strcasecmp.c: Likewise. + * lib/strdup.c: Likewise. + * lib/userspec.c: Likewise. + * lib/yesno.c:: Likewise. + + * src/chgrp.c: Use #if, not #ifdef with HAVE_ macros. + Use #if !, not #ifndef with HAVE_ macros. + * src/chown.c: Likewise. + * src/copy.c: Likewise. + * src/dd.c: Likewise. + * src/dircolors.c: Likewise. + * src/install.c: Likewise. + * src/ls.c: Likewise. + * src/mv.c: Likewise. + * src/touch.c: Likewise. + + * configure.in: Use jm_PREREQ. + +1998-03-14 Jim Meyering <meyering@eng.ascend.com> + + Revert most `getdate.h -> get-date.h' changes of 1998-02-20. + With automake-1.2f, that hack is no longer needed. + + * src/remove.c: Use `virtual memory exhausted' message, not + `Memory exhausted' to be consistent with the majority of other + such messages. + Say `removing all...', not `removing any...'. + * src/rmdir.c (remove_parents): Be consistent with documentation of + --verbose option and with remove.c in saying `removing...' before + the operation is attempted. + (main): Likewise. + Suggestions from Santiago Vila. + + * src/copy.c (copy_dir): Add new parameter, copy_into_self, and set it. + (copy_internal): Likewise. + (copy): Likewise. + Update all callers. + * src/copy.h (copy): Update prototype. + * src/cp.c (do_copy): Add unused arg in calls to copy. + * src/mv.c (do_move): Add ©_into_self arg in call to copy. + Don't remove source directory when copy_into_self is nonzero. + Reported by Arne Henrik Juul. + + * tests/mv/into-self: Test for the above. + * tests/mv/Makefile.am (TESTS): Add into-self. + +1998-02-28 Eli Zaretskii <eliz@is.elta.co.il> + + * userspec.c (parse_user_spec) [__DJGPP__]: Make function know + about any arbitrary user and group by pretending to be the user + and to belong to the group specified in `spec_arg' argument. + + * idcache.c (getuidbyname) [__DJGPP__]: Make function know about + any arbitrary user name. + (getgidbyname) [__DJGPP__]: Make function know about any arbitrary + group name. + +1998-02-24 Jim Meyering <meyering@eng.ascend.com> + + * lib/xstrtol.c (TYPE_SIGNED): Define. + (TYPE_MAXIMUM): Define. + (ULONG_MAX): Use TYPE_MAXIMUM. + (LONG_MAX): Use TYPE_MAXIMUM. + + * lib/fnmatch.c: Update from libit. + * lib/idcache.c: Update from libit. + +1998-02-23 Paul Eggert <eggert@twinsun.com> + + * lib/quotearg.h, lib/quotearg.c: New files. + * lib/Makefile.am (libfu_a_SOURCES): Add quotearg.c. + (noinst_HEADERS): Add quotearg.h. + + * src/ls.c: Include new file quotearg.h. + (enum indicator_style): Rename all to classify, and not_programs + to file_type, to match option spellings. All users changed. + (indicator_style_args): New constant. + (quote_funny_chars, quote_as_string, quote_shell): Remove; + (filename_quoting_options, dirname_quoting_options): Use these + variables instead. + (long_options): Add --indicator-style, --quoting-style, + --show-control-chars. Remove --quote-shell. + (dired_dump_obstack): Remove style parameter and don't output style. + (main): Go back to previous method of outputting //DIRED// + and //SUBDIRED// lines, without style. But add a new + //DIRED-OPTIONS// line that does output style. + (decode_switches, usage): Add --indicator-style, --quoting-style, + --show-control-chars. Remove --quote-shell. + (decode_switches): Default from QUOTING_STYLE environment variable. + Set new quoting vars. + (quote_name): Renamed from quote_filename. + Take new arg specifying quoting options. + Always print; do not have a special case for null FILE * argument. + All callers changed. + Move the guts of this function to new file quotearg.c. + (length_of_file_name_and_frills): Use quotearg_buffer instead + of (old) quote_filename to find length of file name. + + (decode_switches, parse_ls_color, print_dir, gobble_file, + get_link_name): Quote output in diagnostics. + + * NEWS, doc/fileutils.texi: Describe above changes. + * doc/fileutils.texi: Mention that control characters are output + as question marks if output is a terminal. + +1998-02-22 Jim Meyering <meyering@eng.ascend.com> + + * Version 3.16m. + + * ChangeLog-1997: New file. + * Makefile.am (EXTRA_DIST): Add ChangeLog-1997. + +1998-02-21 Jim Meyering <meyering@eng.ascend.com> + + * configure.in (AC_OUTPUT): Add tests/mv/Makefile. + * tests/Makefile.am (SUBDIRS): Add mv. + * tests/mv: New directory + * tests/mv/mv-special-1: New test. + +1998-02-20 Jim Meyering <meyering@eng.ascend.com> + + * src/touch.c: Include get-date.h. + Remove get_date decl. + + * lib/getdate.h: Removed. Could cause confusion with an + automake-generated `.y.h' rule. + * lib/get-date.h: Renamed from getdate.h. + * lib/getdate.y: s/getdate.h/get-date.h/ + * lib/Makefile.am (noinst_HEADERS): s/getdate.h/get-date.h/ + +1998-02-19 Jim Meyering <meyering@eng.ascend.com> + + 1997-10-17 Eli Zaretskii <eliz@is.elta.co.il> + * lib/fileblocks.c [__DJGPP__]: Add missing typedef for daddr_t. + +1998-02-13 Jim Meyering <meyering@eng.ascend.com> + + * src/mv.c (cp_option_init): Set copy_as_regular to 0, not 1. + Otherwise, mv tries to open special files. + Reported by Kjetil Torgrim Homme. + +1998-02-08 Jim Meyering <meyering@eng.ascend.com> + + * Makefile.maint (cvs-dist): Update po/ to clear modified status + of *.po files before running cvs tag -c. + + * src/ln.c (usage): Reword to use `TARGET' and `LINK_NAME' in + description. + +1998-02-07 Jim Meyering <meyering@eng.ascend.com> + + * GNUmakefile: New file. + * Makefile.am (EXTRA_DIST): Add GNUmakefile. + Don't include Makefile.maint from here. It's included from GNUmakefile. + + * configure.in: Don't use AM_MAINTAINER_MODE. + (jm_PERL): Use this. + + * src/Makefile.am (EXTRA_DIST): Remove dcgen.pl. Add dcgen. + (CLEANFILES): Remove dcgen. + (dircolors.h): Use $(PERL). + (.pl): Remove rule. + +1998-02-01 Jim Meyering <meyering@na-net.ornl.gov> + + * POTFILES.in: Add remove.c. Reported by Santiago Vila. + +1998-01-28 Jim Meyering <meyering@na-net.ornl.gov> + + * src/df.c (print_header): Tweak format to align heading over + last column of `df -i' output. From Andreas Schwab. + +1998-01-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * Makefile.am: Include Makefile.maint from $(srcdir). + +1998-01-25 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 3.16l. + + * Makefile.maint: New file. + * Makefile.am: Move rules common to textutils, fileutils, sh-utils + into Makefile.maint. + Include Makefile.maint. + (EXTRA_DIST): Add Makefile.maint. + + * src/cp.c (re_protect): Don't fail for non-root when chown fails + due not only to lack of permission (EPERM), but also to lack of + support (EINVAL). Reported by Bengt Martensson. + * src/copy.c (DO_CHOWN): Likewise. + +1998-01-24 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/ls/time-1 (test_failure): Rename does not update ctime; + link does -- so use ln, not mv. + Note that the SunOS4.1.4 failure of the ctime test is expected. + + * src/system.h (TYPE_MINIMUM): Add extra outer cast to work around + bug in Cray C 5.0.3.0 when T == time_t. + + * tests/rm/r-1: Adjust expected output for changed format of + `rm --verbose'. + * tests/rm/r-2: Likewise. + +1998-01-23 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/mktime.c (__mktime_internal): Work around bug in Irix4.0.5's + C compiler. From Kaveh Ghazi. + (TYPE_MINIMUM): Define. + (TYPE_MAXIMUM): Define. + (TIME_T_MIN): Use TYPE_MINIMUM. + (TIME_T_MAX): Use TYPE_MAXIMUM. + +1998-01-22 Jim Meyering <meyering@na-net.ornl.gov> + + * src/dd.c: Reorder functions to obviate forward dcls. + (quit): Declare to be inline to stifle compile warning. + + * src/cp.c (do_copy): Add unreachable `return 0' to stifle warning. + + * tests/rm/sunos-1: Don't use -f. Do adjust $RM if it's a + relative path. + + * tests/ls/time-1: Use GNU touch to work around problems with NFS + caching and/or clock skew. Reported by Kaveh Ghazi. + + * tests/ls/Makefile.am (TESTS_ENVIRONMENT): Add TOUCH. + + * src/Makefile.am (noinst_HEADERS): Add remove.h. + (mv_SOURCES): Define. + (rm_SOURCES): Define. + +1998-01-21 Jim Meyering <meyering@na-net.ornl.gov> + + * src/install.c: Declare new global, backup_type. + (main): Initialize backup_type unconditionally. + (copy_file): Call find_backup_file_name with new argument, backup_type. + * src/ln.c: Declare new global, backup_type. + (main): Initialize backup_type unconditionally. + (do_link): Call find_backup_file_name with new argument, backup_type. + + * src/copy.c (copy_internal): Use x->backup_type, not the global. + (valid_options): Use VALID_BACKUP_TYPE and VALID_SPARSE_MODE. + + * src/copy.h (VALID_SPARSE_MODE): Define. + [struct cp_options] (backup_type): New member. + + * src/cp.c [NDEBUG]: Comment out definition. + (do_copy): Use x->backup_type, not the global. + + * src/remove.c: New file. Contains guts of old rm.c. + (remove_init): New function. + (remove_fini): New function. + (rm): Take third argument, specifying options. + * src/remove.h: New file. Associated dcls. + * src/rm.c: Remove and minimally librarify guts for use in mv.c. + (main): Pass options (`&x') to rm. + Call remove_init and remove_fini instead of open-coding them. + + * src/mv.c (rm_option_init): New function. + (cp_option_init): New function. + (copy_reg): Remove now-unused function. + (do_move): Set up for and use `copy.c (copy)' in place of copy_reg. + Set up for and use `remove.c (rm)' in place of unlink. + +1998-01-20 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/backupfile.c: Use ANSI function definitions. + Remove global declaration of backup_type. + (simple_backup_suffix): Default to `~', not `.orig'. + Use PARAMS, not __BACKUPFILE_P. + (find_backup_file_name): Add parameter, backup_type. + * lib/backupfile.h: Remove extern declaration of backup_type. + Use PARAMS, not __BACKUPFILE_P. + (VALID_BACKUP_TYPE): Define. + (find_backup_file_name): Adjust prototype. + +1998-01-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * src/df.c (print_header): Fix inode format header to line it up + with the rest of the output. + +1998-01-13 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/stat.c: Set errno to ENOENT, not EINVAL. This is consistent + with most other implementations. + +1998-01-12 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/fileblocks.c: Include sys/param.h only #if HAVE_SYS_PARAM_H. + Move function-spanning `#if ...BSIZE' directive to follow inclusion + of sys/param.h since BSIZE is sometimes defined in sys/param.h. + Reported by Philippe De Muyter. + +1998-01-10 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 3.16k. + + * src/install.c (install_file_to_path): New function. + FIXME: update fileutils.texi. + (main): Handle new option, -D. + Based on a patch from Marty Leisner. + (usage): Describe -D. + + * src/ls.c (decode_switches) [-u]: Fix bug whereby -u worked only + with -l or -t. Now, -u (like -c) implies --sort=time. + (usage): Correct descriptions of --sort, --time, and -t. + Suggestions from Andreas Schwab. + + Add test for the above fix. + * configure.in (AC_OUTPUT): Add tests/ls/Makefile. + * tests/Makefile.am (SUBDIRS): Add ls. + * tests/ls: New directory. + * tests/ls/Makefile.am: New file. + * tests/ls/time-1: New file. + + * lib/makepath.c (make_path): Reformat 3 if-stmts to test + `if (newly_created_dir)' only once. Suggestion from Andreas Schwab. + +1998-01-06 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/getdate.y: Move inclusion of getdate.h and dependent extern + declarations down so getdate.h's prototype follows the sometimes- + enabled definition of `const' to nothing. Otherwise, the prototype + wouldn't match the definition because of the defined-away `const'. + From Kaveh Ghazi. + (get_date): ANSI-fy definition. + Add %expect directive. + +1998-01-05 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * lib/makepath.c (make_path): Put only newly created directories + on the LEADING_DIRS list. + +1998-01-05 Paul Eggert <eggert@twinsun.com> + + * lib/fsusage.c (PROPAGATE_ALL_ONES): New macro. + (get_fs_usage): If a value consists entirely of 1 bits, + propagate this info to the output by setting it to (uintmax_t) -1. + * src/df.c (df_readable): New function. + (show_dev): If a value consists entirely of 1 bits, or is derived + from some other value that consists entirely of 1 bits, report "-". + Check inode and block counts more carefully for plausibility, + to avoid arithmetic overflow when computing percentages. + +1998-01-04 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 3.16j. + + * lib/Makefile.in: Regenerated with patched automake-1.2d. + See README-alpha. + + * src/chgrp.c: Use a single enumerated type, Verbosity, instead of + the two booleans, verbose and changes_only. This fixes a bug whereby + --change had the same effect as --verbose. + * src/chmod.c: Likewise. + * src/chown.c: Likewise. + Reported by Paul Eggert. + +1998-01-04 Paul Eggert <eggert@twinsun.com> + + Check for write errors more carefully. + + * lib/Makefile.am (libfu_a_SOURCES): Add closeout.c. + (noinst_HEADERS): Add closeout.h. + * lib/closeout.c, lib/closeout.h: New files. + * lib/long-options.c (parse_long_options), + src/chgrp.c, src/chmod.c, src/chown.c, src/cp.c, src/dd.c, + src/df.c, src/dircolors.c, src/du.c, src/install.c, src/ln.c, + src/ls.c, src/mkdir.c, src/mkfifo.c, src/mknod.c, src/mv.c, + src/mvdir.c, src/rm.c, src/rmdir.c, src/sync.c, src/touch.c + (main, usage): Check for write error to stdout before exiting. + Include "closeout.h". + +1998-01-03 Jim Meyering <meyering@na-net.ornl.gov> + + * src/df.c (show_dev): Treat `fsu.fsu_bavail == (unsigned long) -1' + just like `fsu.fsu_blocks == 0' as an indicator that usage information + is invalid. This happens with Solaris-5.5.1 CD-ROM mount points. + + * lib/save-cwd.h: Guard PARAMS-enabling definition with + `defined PROTOTYPES || (defined __STDC__ && __STDC__)' to avoid + problems with Irix4's cc. From Kaveh Ghazi. + * lib/getdate.h: Likewise, but just to be consistent. + + * configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so + those files will be built via the ANSI2KNR-filtering rules if necessary. + Reported by Kaveh Ghazi. + +1998-01-02 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 3.16i. + + Fix problem with `install -d'. Reported by Marty Leisner. + + * src/install.c (get_ids): When otherwise unspecified, + set uid and gid to -1. + * lib/makepath.c (make_path): Try to change ownership only if we've + just created the directory. Fix latent bug (s/&&/||/ in two places -- + also, note that it could not be exercised via install or mkdir) + whereby chown would not be invoked when only one of owner/group is + not -1. + +1998-01-01 Jim Meyering <meyering@na-net.ornl.gov> + + * src/rm.c (remove_cwd_entries): Initialize the entry-name obstack + only once and never free it. diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/fileutils/NEWS b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/fileutils/NEWS new file mode 100644 index 0000000..b89ca31 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/fileutils/NEWS @@ -0,0 +1,748 @@ +[4.1.11] +* `rm symlink-to-unwritable' doesn't prompt [introduced in 4.1.10] +[4.1.10] +* rm once again gives a reasonable diagnostic when failing to remove a file + owned by someone else in a sticky directory [introduced in 4.1.9] +* df now rounds all quantities up, as per POSIX. +* New ls time style: long-iso, which generates YYYY-MM-DD HH:MM. +* Any time style can be preceded by "posix-"; this causes "ls" to + use traditional timestamp format when in the POSIX locale. +* The default time style is now posix-long-iso instead of posix-iso. + Set TIME_STYLE="posix-iso" to revert to the behavior of 4.1.1 thru 4.1.9. +* `rm dangling-symlink' doesn't prompt [introduced in 4.1.9] +* stat: remove support for --secure/-s option and related %S and %C format specs +* stat: rename --link/-l to --dereference/-L. + The old options will continue to work for a while. +[4.1.9] +* rm can now remove very deep hierarchies, in spite of any limit on stack size +* new programs: link, unlink, and stat +* New ls option: --author (for the Hurd). +* `touch -c no-such-file' no longer fails, per POSIX +[4.1.8] +* mv no longer mistakenly creates links to preexisting destination files + that aren't moved +[4.1.7] +* rm: close a hole that would allow a running rm process to be subverted +[4.1.6] +* New cp option: --copy-contents. +* cp -r is now equivalent to cp -R. Use cp -R -L --copy-contents to get the + traditional (and rarely desirable) cp -r behavior. +* ls now accepts --time-style=+FORMAT, where +FORMAT works like date's format +* The obsolete usage `touch [-acm] MMDDhhmm[YY] FILE...' is no longer + supported on systems conforming to POSIX 1003.1-2001. Use touch -t instead. +* cp and inter-partition mv no longer give a misleading diagnostic in some + unusual cases +[4.1.5] +* cp -r no longer preserves symlinks +* The block size notation is now compatible with SI and with IEC 60027-2. + For example, --block-size=1MB now means --block-size=1000000, + whereas --block-size=1MiB now means --block-size=1048576. + A missing `B' (e.g. `1M') has the same meaning as before. + A trailing `B' now means decimal, not binary; this is a silent change. + The nonstandard `D' suffix (e.g. `1MD') is now obsolescent. +* -H or --si now outputs the trailing 'B', for consistency with the above. +* Programs now output trailing 'K' (not 'k') to mean 1024, as per IEC 60027-2. +* New df, du short option -B is short for --block-size. +* You can omit an integer `1' before a block size suffix, + e.g. `df -BG' is equivalent to `df -B 1G' and to `df --block-size=1G'. +* The following options are now obsolescent, as their names are + incompatible with IEC 60027-2: + df, du: -m or --megabytes (use -BM or --block-size=1M) + df, du, ls: --kilobytes (use --block-size=1K) +[4.1.4] +* df --local no longer lists smbfs file systems whose name starts with // +* dd now detects the Linux/tape/lseek bug at run time and warns about it. +[4.1.3] +* ls -R once again outputs a blank line between per-directory groups of files. + This was broken by the cycle-detection change in 4.1.1. +* dd once again uses `lseek' on character devices like /dev/mem and /dev/kmem. + On systems with the linux kernel (at least up to 2.4.16), dd must still + resort to emulating `skip=N' behavior using reads on tape devices, because + lseek has no effect, yet appears to succeed. This may be a kernel bug. +[4.1.2] +* cp no longer fails when two or more source files are the same; + now it just gives a warning and doesn't copy the file the second time. + E.g., cp a a d/ produces this: + cp: warning: source file `a' specified more than once +* chmod would set the wrong bit when given symbolic mode strings like + these: g=o, o=g, o=u. E.g., `chmod a=,o=w,ug=o f' would give a mode + of --w-r---w- rather than --w--w--w-. +[4.1.1] +* mv (likewise for cp), now fails rather than silently clobbering one of + the source files in the following example: + rm -rf a b c; mkdir a b c; touch a/f b/f; mv a/f b/f c +* ls -R detects directory cycles, per POSIX. It warns and doesn't infloop. +* cp's -P option now means the same as --no-dereference, per POSIX. + Use --parents to get the old meaning. +* When copying with the -H and -L options, cp can preserve logical + links between source files with --preserve=links +* cp accepts new options: + --preserve[={mode,ownership,timestamps,links,all}] + --no-preserve={mode,ownership,timestamps,links,all} +* cp's -p and --preserve options remain unchanged and are equivalent + to `--preserve=mode,ownership,timestamps' +* mv and cp accept a new option: --reply={yes,no,query}; provides a consistent + mechanism to control whether one is prompted about certain existing + destination files. Note that cp's and mv's -f options don't have the + same meaning: cp's -f option no longer merely turns off `-i'. +* remove portability limitations (e.g., PATH_MAX on the Hurd, fixes for + 64-bit systems) +* mv now prompts before overwriting an existing, unwritable destination file + when stdin is a tty, unless --force (-f) is specified, as per POSIX. +* mv: fix the bug whereby `mv -uf source dest' would delete source, + even though it's older than dest. +* chown's --from=CURRENT_OWNER:CURRENT_GROUP option now works +* cp now ensures that the set-user-ID and set-group-ID bits are cleared for + the destination file when when copying and not preserving permissions. +* `ln -f --backup k k' gives a clearer diagnostic +* ls no longer truncates user names or group names that are longer + than 8 characters. +* ls's new --dereference-command-line option causes it to dereference + symbolic links on the command-line only. It is the default unless + one of the -d, -F, or -l options are given. +* ls -H now means the same as ls --dereference-command-line, as per POSIX. +* ls -g now acts like ls -l, except it does not display owner, as per POSIX. +* ls -n now implies -l, as per POSIX. +* ls can now display dates and times in one of four time styles: + + - The `full-iso' time style gives full ISO-style time stamps like + `2001-05-14 23:45:56.477817180 -0700'. + - The 'iso' time style gives ISO-style time stamps like '2001-05-14 ' + and '05-14 23:45'. + - The 'locale' time style gives locale-dependent time stamps like + 'touko 14 2001' and 'touko 14 23:45' (in a Finnish locale). + - The 'posix-iso' time style gives traditional POSIX-locale + time stamps like 'May 14 2001' and 'May 14 23:45' unless the user + specifies a non-POSIX locale, in which case it uses ISO-style dates. + This is the default. + + You can specify a time style with an option like --time-style='iso' + or with an environment variable like TIME_STYLE='iso'. GNU Emacs 21 + and later can parse ISO dates, but older Emacs versions cannot, so + if you are using an older version of Emacs outside the default POSIX + locale, you may need to set TIME_STYLE="locale". + +* --full-time is now an alias for "-l --time-style=full-iso". + +Changes in release 4.1: +[4.0.45] +* dd conv=sync,block now pads only with spaces +* ls's -1 option no longer cancels the effect of a preceding -l +* regenerate configure using a patched version of autoconf-2.49e to work + around a bug in its test for a working memcmp function +* ls: fix off-by-one error introduced with the previous change +[4.0.44] +* ls: When given two or more arguments but the only one that exists is a + directory, don't treat it as if it were the only argument. Before, + `mkdir d; ls no-dir d 2>/dev/null' would act like `ls d' and produce + no output. Now, it prints `d:'. +* touch -d 'last friday' would use a time stamp that was one hour off + (e.g., 23:00 on *thursday* rather than 00:00 of the preceding friday) + when run such that the current time and the target date/time fall on + opposite sides of a daylight savings time transition. + This problem arises only with relative date strings like `last monday'. + It is not a problem with strings that include absolute dates. +[4.0.43] +* regenerate configure-related files using autoconf-2.49d +[4.0.42] +* Using ls's short-named `-H' option evokes the warning that the + meaning of `-H' will soon change. Use `--si' instead. +[4.0.41] +* fix bug in rm introduced in 4.0.38: `chmod 0 f; rm f' would no longer prompt + before removal. +[4.0.40] +* portability fixes, mainly for UnixWare 7.1.1 +[4.0.39] +* cp and mv accept --strip-trailing-slashes, not just --strip-trailing-slash +[4.0.38] +* ls --full-time now implies -l; before, without -l it was a no-op +[4.0.37] +* portability fixes for SunOS4.1.1, Fujitsu (f300-fujitsu-uxpv4.1_ES), + and Unicos (alphaev5-cray-unicosmk2.0.5.X) +[4.0.36] +* `mv dir/ new-name' no longer fails on SunOS4.1.1U +* attempting to use mv to move a symlink onto itself no longer removes + the symlink +* `cp -R directory file' no longer removes `file'. now it fails and gives + a diagnostic +* The manual now warns that ls's --full-time format string is planned + to change in a future release. +* ls -l's time stamp format now depends on LC_TIME, not LC_MESSAGES, + as POSIX requires. +* ls -l now reports the year for files even slightly in the future, as + POSIX requires. This helps warn users about clock skew problems. +* `cp -d file symlink-to-some-other-file' no longer fails +* performance improvements for ls +[4.0.35] +* ln --backup=simple --suffix=SUFFIX once again uses SUFFIX +* install: Likewise. +[4.0.34] +* fix a bug (introduced in 4.0z) that made `chown 123:456 file' act like + `chown 123:123 file'. Other uses with a numeric group ID would cause + chown to fail when it shouldn't have. +* the chown and chgrp programs preserve set-uid and set-gid bits, even on + systems for which the chown function call resets those bits. +* `ls -L dangling-symlink' now fails (per POSIX) rather than printing the + link name +* dd no longer honors the just-added `B' suffix on skip= and seek= arguments. +* `mkdir no-such-dir/' no longer fails on NetBSD systems +[4.0.33] +* dd now accepts skip=nB and seek=nB, to advance past some number of bytes, n, + that need not be a multiple of the block size. +* dd (without conv=notrunc) now complains only when ftruncate fails on a + regular file, a directory, or a shared memory object -- not when it fails + to truncate other types of files, like /dev/fd0. +* chmod --changes (-c) once again issues diagnostics only for the files + with changed permissions +* mkdir now gives one diagnostic (rather than two) for certain failures +* mkdir portability fix for NetBSD +[4.0.32] +* touch now interprets a lone numeric argument of 8 or 10 digits as a file name, + rather than as a date/time in the obsolescent `MMDDhhmm[YY]' format. +* mkdir no longer sets the permissions of the final directory component + if it already exists (this bug, too, was introduced recently) +* ls's --full-time format string is now locale dependent +[4.0.31] +* mkdir: fix a bug introduced in 4.0.30 whereby `mkdir existing-dir' would + succeed. Now it fails, as it should (and used to). +[4.0.30] +* mkdir: fix a bug introduced in 4.0.28 whereby parent directories created + via `mkdir -p' would have permissions that did not account for the umask +[4.0.29] +* ls.c wouldn't compile on some systems: fix it +* `cp -R --parents dir1/ dir2' failed on NetBSD, due to a portability problem +[4.0.28] +* ls is much more efficient on systems (e.g., linux-2.4.*) that store file + type information in directory entries. +* shred now automatically determines the size of each block device argument +* ls's date/time format strings are now locale dependent +* mkdir, mknod, mkfifo, and chmod work better in conjunction with ACLs +* `cp --parents dir1/ dir2' no longer gets a failed assertion +* shred now determines the size of block devices like /dev/fd0 +* `shred --exact file1 file2' now erases `file1', too +[4.0.27] +* install once again unlinks an existing destination before trying to open it +* mv no longer gets a failed assertion when moving a directory (specified with + a trailing slash) from one partition to another, and giving it a different + name at the destination. +* `cp --link -f src existing-dest' no longer fails (bug introduced in 4.0z) +* cp's new --remove-destination option now works with -R +[4.0z] +* `cp -p' once again preserves `special' permission bits (this bug was + introduced in 4.0y) +* mv's --force (-f) option now controls solely whether mv prompts (per POSIX) +* `cp -f' now first attempts to open an existing destination file, and only + if that fails does it resort to unlinking the file and retrying the open. + Before, it would unlink the file before trying to open it. +* cp accepts a new option, --remove-destination, that provides the old behavior +* cp's -f option no longer cancels the effect of --interactive (-i) (per POSIX) +* when ls sorts directory entries, it now honors the current locale settings +* dd's `skip=BLOCKS' operator once again works on systems with a buggy lseek + function (Linux, at least on SCSI tape devices) +* fix a typo in install-sh +[4.0y] +* cp now accepts the POSIX-mandated -H and -L options. +* cp -p and mv now try to preserve uid even if you're not root, as per POSIX.2. + This affects behavior only on hosts that let you give files away via chmod. +* du would fail when given `.' or `..' followed by other command line arguments +* Using cp's short-named `-P' option evokes the warning that the + meaning of `-P' will soon change. Use `--parents' instead. +* chgrp, chmod, and chown: when used with the --verbose option, might give an + invalid diagnostic (due to clobbered errno) when failing. +[4.0x] +* Fix cp so that `cp -r DIR1/ DIR2' works properly once again. +* New ls option --quoting-style=clocale acts like --quoting-style=locale, + except that it quotes "like this" by default instead of `like this'. +[4.0w] +* When `cp -pR' fails to copy a file, it now preserves permissions, owner, + and group of the containing directory. +[4.0v] +* df, du, and ls now round disk usage up and disk free space down +* df, du, ls: --block-size=N now works for values of N that are e.g., + not a multiple of the file's block size +[4.0u] +* give proper diagnostic for mv usage error +* fix compile problem with lib/strnlen.c +[4.0t] +* `cp -d -u' no longer fails with certain existing destination symlinks +* rmdir and mkdir accept -v as synonym for --verbose +[4.0s] +* rm no longer segfaults on certain very deep hierarchies +* IMPORTANT SECURITY FIX: a running `rm -r' may no longer be subverted to + remove unintended directories +* cp can now remove unwritable files in interactive mode; contrary to how mv + works, cp's --interactive (-i) option does *not* cancel the effect of a + preceding --force (-f) option. +* all programs fail when printing --help or --version output to a full device +* install no longer performs chmod if chown fails (see ChangeLog for example) +[4.0r] +* `du dir/subdir1 dir/subdir2' no longer fails +* chown accepts new option: --from=CURRENT_OWNER:CURRENT_GROUP +* cp accepts new option: --strip-trailing-slashes +* install --directory (-d) may now be used to set special bits + e.g., `install -m a=rwx,o+t -d DIR' now honors the `o+t' part +* cp, mv, ln, install: document that while the --backup option takes an + optional argument, the -b option accepts none +* `ls -e' fails with a more useful diagnostic +* df produces better output for loop file system mount points +[4.0q] +* install -D bug is fixed +* chown now works properly when the specified login name contains a period + This is at the expense of always looking up the entire USER.GROUP string + as a login name first, and only then (upon failure) interpreting the `.' + as a separator and looking up `USER'. To avoid the extra getpwnam call, + always use the POSIX-mandated `:' character as the separator. +* `du some-other-dir' no longer fails if it can't open the current directory +* `mv DIR EXISTING-FILE' no longer removes EXISTING-FILE. Now it gets an error + as POSIX says it must. +* touch no longer hangs on fifos +[4.0p] +* various tools: quote multibyte characters correctly in diagnostics +* mv: portability fix for alpha +* dd: portability fix +* unified lib/: now that directory and most of the configuration framework + is common between fileutils, textutils, and sh-utils +[4.0o] +* Include lib/nanosleep.h. +[4.0n] +* cp, install, ln, and mv: when making backup files in verbose mode, these + commands now print the backup file name on the same line as the rest of the + information, e.g., `a -> b (backup: b.~13~)' rather than on a separate line + as all but ln used to do. ln didn't output the backup file name at all. +[4.0m] +* mv accepts new option: --strip-trailing-slashes (soon, many other + programs will, too) +* df no longer hangs when there is an inaccessible mount point unrelated to PATH +* rmdir --verbose no longer prints extra, bogus diagnosic upon failure +* fix df bug that made it print bogus values in the `Use%' column. +* touch -d once again parses dates with `hh:mm ZONE' time zone info. +[4.0l] +* ls -l honors a trailing slash on a symlink argument, per POSIX. +* shred no longer appears to infloop when asked to remove files in + unwritable directories +* `ls -ul' and `ls -uc' sort by name once again, as they should +[4.0k] +* mv may now be used to move a file onto a symlink to itself when that + symlink is on a separate partition. With fileutils-4.0j, it would + fail with a diagnostic saying they were the same file. +* touch would fail with the misleading diagnostic `no such file' when asked + to create a file in an unwritable directory. Now it says something like + `permission denied' or `read-only file system'. +[4.0j] +* mkdir may now be used to set special bits e.g., `mkdir -m o+t dir' works +* touch can now change the time(s) of a file you own even if you don't have + read or write access to it +* rm no longer dumps core after warning about directory cycles +* mv now refuses to move a file onto a symlink to itself when that symlink + is on a separate partition. Before, it would remove the file and leave + only the symlink. +* `install -d -g foo 1/2' now sets the `group' of the final component as well + as that of the leading one. +* df, du, and ls no longer divide by zero when an invalid block size is + specified through an environment variable +* under certain conditions, chgrp would fail to affect files referenced + through symlinks. Now it does. +* ln now makes hard links to symlinks on systems that support it. +* touch: no longer infloop on dangling symlinks +* cp, install, ln, mv: deprecate the --version-control option. Use --backup's + new optional argument instead. The old option still works, but now evokes a + warning. +* cp, install, ln, mv: the --backup option now accepts an optional argument +* cp, install, ln, mv: accept new option: --target-directory=DIR +* chgrp: accept new option, --dereference. --no-dereference is now the default. +* New ls option --quoting-style=locale acts like --quoting-style=c, except + with locale-specific quoting symbols (` and ' by default) instead of ". +* `df DIR' is less likely to hang due to bad NFS mounts +* As per POSIX.2, `df -P' now uses ceiling rather than rounding, and its + header now says `1024-blocks ... Capacity' instead of `1k-blocks ... Use%'. +[4.0i] +* `cp -f FILE FILE' and `mv -f FILE FILE' no longer remove FILE +* touch works once again (DST-wise) when certain `--date DATE-TIME' + values are specified. +* shred's -u option (short form of --remove) is now accepted +[4.0h] +* cp --one-file-system (-x) no longer crosses filesystem boundaries. +* touch can once again operate on directories +[4.0g] +* New large-file support for AIX and HP-UX, and for cross-compiles. +* shred's default options are now suitable for devices, not files, since + shred is more reliable on devices. shred now does not remove by default; + the old -p or --preserve option was inverted and renamed to -u or --remove. +* shred -u now attempts to truncate devices before removing them. +* shred -v no longer outputs carriage-returns; shred -vv has no extra effect; + shred -v now outputs to stderr. +* shred now tries to find the size of a non-regular file by seeking to its end. +* dd now opens the output file for *read* access only if `seek=' is used. +[4.0f] +* `ls --color' no longer segfaults +* dd works once again +[4.0e] +* shred --devices option renamed to -D so that -d, -i and -r can be + compatible with rm. +* shred -s/--size=N option added to specify the size of the object to be + shredded. +* `shred -' now shreds stdout rather than stdin. This is incompatible with -v. +* shred now does not need to read from its output file, so opens it O_WRONLY +* `ls -l' uses `+' to designate each file that has a custom ACL +* eliminate race condition that could make touch truncate a nonempty file +* No longer use *_unlocked I/O macros on systems (like solaris5.5.1) where + they're not declared, so selected executables (e.g., rm) that are linked + with shared libraries will once again run on solaris5.6 systems. +[4.0d (aka 4.1-b3)] +* ls recognizes solaris 2 `doors' +* new program: shred +* ln: Allow creation of a hard link to a dangling symlink +* cp, mv, install: --verbose now prints a message for each backup-related + renaming +* portability fixes for copy.c's code to detect move-directory-into-self +* upgrade to automake-1.3b +* upgrade to autoconf-2.13, and... +* remove some of the kludges in m4/*.m4 that permitted +[4.1-b2] +* concurrent `mkdir -p' processes no longer fail when creating the + same hierarchy +* argmatch.c has been fixed so that the unambiguous usage `ls --color=n' + no longer evokes an error. +* now, specifying an improper argument for an option that accepts enumerated + values evokes diagnostics like this: + $ src/touch --time=x file + src/touch: invalid argument `x' for `--time' + Valid arguments are: + - `atime', `access', `use' + - `mtime', `modify' + Try `src/touch --help' for more information. +[4.1-b1] +* ls --quoting-style=c prints correct octal escapes for certain nonprinting + characters in file names. +* fix `ls -R .' formatting bug that broke mktexlsr +* moving a directory into itself is properly diagnosed in more cases +* moving a directory containing hard-linked files now works + +Changes in release 4.0: +[4.0-b7] +* rm -rf '' no longer gets a failed assertion on the Hurd +[4.0-b6] +* rm simply fails as it should (rather than segfaulting) for + `mkdir -m 0100 x; rm -rf x' +[4.0-b5] +* still *more* mktime.c portability tweaks +[4.0-b4] +* mktime.c portability tweak for headers with GNU libc 5.4.44. +[4.0-b3] +* mktime.c works around problems with Digital Unix 4.0A and 4.0D. +* mktime.c handles dates in the spring-forward gap the same way other + implementations do +* install accepts long option --suffix=SUFFIX +[4.0-b2] +* man/Makefile.maint framework tweaks +* add test for `mv -i' bug +[4.0-pre1] +* fix serious bug whereby `touch a b; echo n|mv -i a b' would remove b. +[3.16z] +* portability tweaks +* avoid `root `cp -a' from Netapp snapshot' corruption +[3.16y] +* `install -D' now works +* distribute maintainer Makefiles in man/ +[3.16x] +* man pages are now automatically generated from a combination of --help + output and the contents of new (though mostly empty), man/*.x files. +[3.16w] +* touch now interprets `-t TIME-DATE' as POSIX specifies +* `ls EMPTY-DIR EMPTY-DIR' once again outputs the directory names +[3.16v] +* portability fixes +* `ls -R EMPTY-DIR' now outputs the name of the directory +[3.16u] +* mv now fails (as it should) upon attempt to move a directory into itself +* `cp -a --one-file-system' now copies any mount point directories it + encounters on the selected file system. +[3.16t] +* cp (with --update) and ls compare time stamps with subsecond resolution when + available (e.g., on systems with recent Linux kernels and on Solaris 2.6). +* install once again does the -m-specified chmod *after* running strip + (this fixes another bug introduced in 3.16o) +[3.16s] +* df accept a new option --local (-l) +* touch works around a system-specific bug so it now affects existing, + zero-length files on certain systems +* chown now works even on certain SVR3 systems where it used to fail +[3.16r] +* include gettext's m4 macros +* minor cp bug fixed +* non-portable cp tests removed +* --without-included-regex now means don't compile regex.c +* rx support removed +[3.16q] +* `df', `du', and `ls' now accept a new option --block-size=SIZE, + where SIZE can be a positive integer block size, followed by an + optional SI prefix (e.g. `k' for kilo, `M' for Mega), followed by an + optional `B' (for ``byte'', indicating powers of 1024, which is the + default) or `D' (for ``decimal byte'', indicating powers of 1000). + SIZE can also be `human-readable' (for -h or --human-readable + behavior) or `si' (for -H or --si behavior). +* These suffixes can also be used by `dd'; e.g. `dd bs=1MB' is equivalent + to `dd bs=1048576'. +* The default block size for the `df' command is now obtained from the + DF_BLOCK_SIZE environment variable or, if that is not set, from BLOCK_SIZE. + Similarly for `du' and `ls'. +* The output columns of `df' have been adjusted slightly to accommodate + larger filesystems. +* fix gettext-related link failures seen when configuring certain ways +[3.16p] +* fix install bug introduced in 3.16o +* build/test changes only +[3.16o] +* chown accepts new option, --dereference. --no-dereference is now the default. +* install now shares core copying code with mv and cp +* mv (between distinct filesystems) now uses more of the core copying code +* fixed a bug or two in mv +* df once again displays negative numbers when that's what's returned + by get_fs_usage +[3.16n] +* `mv dir dir' once again does *not* remove dir/ +* ls accepts new options: + --indicator-style=none (no indicators, the default) + --indicator-style=classify (all indicators) + (equivalent to -F or --classify) + --indicator-style=file-type (file type indicators) + (equivalent to -p or --file-type) + + --quoting-style=literal (do not quote output) + --quoting-style=shell (minimally quote output for the shell) + --quoting-style=shell-always (always quote output with '' for the shell) + --quoting-style=c (quote output as for a C-language string) + (equivalent to -Q or --quote-name) + --quoting-style=escape (like c but omit enclosing "") + (equivalent to -b or --escape) + + --show-control-chars is the opposite of --hide-control-chars + This option can be useful if output is to a terminal, + to override the default beahvior of hiding control characters. + +* The QUOTING_STYLE environment variable can now be used to specify the + default value for ls's --quoting-style option. If not specified, + the default quoting style is 'literal', but this default may change to + 'shell' in a future version of this package. +* ls's quoting style now affects operands in diagnostics, too. +* ls's --dired option now outputs the quoting style + using the format of the new --quoting-style option. +* ls's -e or --quote-shell option (introduced in 3.16j) has been removed; + use --quoting-style=shell to get its functionality. +[3.16m] +* mv can move (and doesn't read) special files +* remove maintainer mode +[3.16l] +* mv can finally move non-regular files between partitions +[3.16k] +* install accepts new option, -D +[3.16j] +* du accepts new options, --exclude=PAT and --exclude-from=FILE (-X FILE) +* ls now quotes file names for the shell by default, if they contain + characters that need quoting. Use -N to get the old default behavior. + The new behavior is also enabled by the new option -e or --quote-shell. +* ln --backup is now consistent with cp and mv in that --force is no longer + required when the destination is an existing non-directory. +* install accepts new option, --verbose (-v) +* mkdir -p is a lot faster when creating very deep directories on some systems +* rm -i no longer exits with status indicating failure solely because the + user declines to remove a file +* rm -r is a lot faster on some systems when removing deep hierarchies +* chgrp, chmod, and chown no longer give contradictory output when --verbose + is used and an operation fails +* ls's multicolumn option now uses variable width columns to conserve + vertical space +* install accepts new option, --preserve-timestamps +* du --megabytes --total now shows total in megabytes +* ls accepts new option, -h or --human-readable +* df, du, and ls now accept new option, -H or --si, for powers of 1000 not 1024 +* df, du, and ls now consistently round to nearest, with ties going to even +* df, du, and ls now use `k' instead of `K' for `kilo', + and support larger abbreviations T(era), P(eta), E(xa), Z(etta), Y(otta) +* touch -d DATE now works on Unicos +* du accepts new option --max-depth=N +* rmdir accepts new options: --ignore-fail-on-non-empty and --verbose +* on most hosts df, du, and ls now overflow at 2**64 bytes, not 2**31 bytes +* all programs now work on large files on LFS systems like Solaris 2.6 and + Linux with the pre-2.1 development version of GNU libc. +* df now works with OpenBSD 2.1 beta +* cp -d FILE SYMLINK-TO-FILE doesn't erase FILE. Now it gives an error. + +Changes in release 3.16: +* du --megabytes (-m) works +* ls -l works even on systems with non-POSIX strftime in their C library + +Changes in release 3.15: +* touch --date=DATE bug (due to broken getdate.y) has been fixed +* ls -l no longer misformats the date when run in a locale for which the + locale's abbreviated week-day name (strftime's %a format) is shorter or + longer than the `normal' three bytes (with LANG=de it's a two-byte string). +* Using --program-prefix no longer applies the prefix twice +* ls --color properly restores color attributes upon completion when the + normal (`no') color attribute is not the default color. +* with ls -s --color, the `total' and size of the first file are printed +* ls --color stats symlinks and distinguishes between regular symlinks + and orphan ones. +* cp --preserve preserves owner and group of symlinks on Linux when run + with EUID == 0 +* dircolors no longer accepts --print-data-base (alternate spelling of + --print-database) + +Changes in release 3.14: +* ls --color highlights based on suffix rules only for regular files +* touch --date=DATE accepts dates like those in an RCS log listing, e.g., + `1992/11/01 05:44:34'. +* install SRC DST no longer rejects non-regular, non-directory SRC +* df accepts -F as a synonym for -t for compatibility with Solaris +* cp -i /dev/null existing-file now prompts before overwriting the target +* ls --color highlights orphaned symlinks text on terminals that support it +* ls -l honors current locale with respect to abbreviated month names (and, + with --full-time day names) on systems with a locale-supporting strftime + function, e.g., ones based on recent versions of the GNU C library +* ls -l recognizes Cray's migrated dmf files. +* chgrp no longer aborts when given a group number larger than INT_MAX +* chgrp now fails when run by root with an unrecognized group name +* when possible, cp -p preserves owner/group even on symlinks in case + they're in a directory that has the sticky-bit set. +* cp --recursive --parents SRC DEST works when SRC is an absolute file name. + +Changes in release 3.13: +* ls properly determines window size on SunOS and Solaris systems +* ls accepts new option --color[=WHEN] where WHEN is `always', `never', + or `auto'. --color=never is the default. --color is equivalent + to --color=always. +* new program: dircolors +* ls allows 0 as argument to --tabsize (-T) option. Using --tabsize=0 + inhibits the use of TAB characters for separating columns. +* you can create a backup of FILE with cp --force --backup FILE FILE. Before, + that command failed saying that ``FILE' and `FILE' are the same file'. +* uses automake-generated Makefile templates +* chown and chgrp accept new option --no-dereference (-h) +* ln -f FILE FILE fails with a diagnostic rather than silently removing FILE +* when building on systems that have getopt_long (most GNU-oriented ones), + the system-provided function will be used -- so executables may be a + little smaller +* cp -p, and mv modify owner and/or group of symlinks on systems + (like Solaris) that provide the lchown system call. +* df no longer invokes the sync system call by default. You can use the + --sync option to make df invoke sync before getting file system sizes. +* internationalized diagnostic messages +* mkdir accepts new option: --verbose +* `cp file D/' uses the full file name `D/file' instead of `D//file'. +* cp --backup a~ a fails instead of silently destroying the source file +* df and du have new options --human-readable (-h) and --megabytes (-m). +* install now honors --backup (-b), --suffix=SUFFIX (-S SUFFIX), and + --version-control=WORD (-V WORD) options just as cp, ln, and mv do. +* ln --verbose output is less prone to misinterpretation +* ls -o works like -lG; for compatibility with other versions of ls +* cp has a new option to control creation of sparse files: + --sparse={auto,always,never}. --sparse=auto is the default. +* rm -rf '' behaves properly on SunOS 4 systems +* touch: rename long option name, --file, to --reference. + `touch --file' will continue to work a little longer. +* df fails if the same file system type is both selected and excluded. +* df works around SunOS statfs brokenness wrt filesystems larger than 2GB +* df better handles inconsistent mtab entries +* `ls -lDR dir dir2' works +* `ls -c' does what it's supposed to +* all programs include program name in --version output +* `ls --quote-name' works +* mv properly determines whether src and dest are the same file + Before, it could (though with very low probability) fail to do the move, + reporting that distinct source and destination are the same file. +* du --dereference (-L) works with directory symlinks +* du works on SunOS 4 systems even when accounting is enabled +* many programs that convert strings to integers now use strtol or strtoul + and detect overflow + +User-visible changes in release 3.12: +* None. +User-visible changes in release 3.11: +* None. +User-visible changes in release 3.10: +* mkdir -p now ignores arguments that are existing directories. Before, + (contrary to POSIX spec) it would attempt to change ownership and/or + protections of existing directories listed on the command line. And + it would fail when such a directory was owned by another user. +* Fix bug in cp that made the commands `mkdir dir; touch foo; cp -P foo dir' + incorrectly change the permissions on directory, dir. +* df accepts a new option, --no-sync, that inhibits the default invocation + of the sync system call. +* ls accepts a new option, --dired, that makes emacs' dired mode more efficient +* skeletal texinfo documentation (mainly just the `invoking' nodes) +* ln accepts a new option: --no-dereference (-n). With this option, + if the destination command line argument is a symlink to a directory, + use that as the destination instead of the file in the directory. +* `ln -i no-such-file existing-file' gives a diagnostic and fails. + Before, if you responded `yes' to the prompt it would both remove + `existing-file' and fail to make a link. +* du no longer requires read access to all of the directory components + of the current working directory on systems with fchdir. +* touch -d 'date' is no longer off by one hour. +* New program: sync. +* Fix bug in cp that made the commands `ln -s . s; cp -rd s r' incorrectly + create `r' as a symlink instead of as a regular file. +* du's -S and -c options now work when used together. + Before, the grand total was always reported to be zero. + +Major changes in release 3.9: +* --help gives a one-line description of each option and shows the + correspondence between short and long-named options. +* work around systems with BROKEN_STAT_MACROS +* work around problem where $(srcdir)/config.h was used instead of + ../config.h -- this happened only when building in a subdirectory + and when config.h remained in $(srcdir) from a previous ./configure. +* GNU chmod treats symlinks the same way other vendor's versions do. + Now symlinks listed on the command line are processed (they were + ignored before); the permissions of the dereferenced files are + changed. Symlinks encountered in recursive traversals are still + ignored. This makes GNU chmod act more like e.g. Sun's. +* configure uses config.h, so DEFS won't exceed preprocessor limits of + some compilers on the number of symbols defined via -D. +* ls and cp can handle mount points on more systems +* cp, mkdir, and rmdir long option --path renamed to --parents; --path + will still work for a while +* cp, ln, and mv convert `cp A B/' to cp A B/A when A is not a directory. + This change affects only the two-argument form of the commands. It makes + such commands fail when the target has a trailing slash but is not a + directory or symlink to a directory and the source is not a directory. + They used to succeed, ignoring the implicitly contradictory trailing slash. + +Major changes in release 3.8: +* install isn't as likely to produce spurious errors +* avoid redundant compilations for `dir' and `vdir'; +* configure properly defines STAT_STATFS2_BSIZE on a Pyramid MIServer + running OSx 5.1 + +Major changes in release 3.7: +* none +Major changes in release 3.6: +* `ln -s dir_pathname .' works when the pathname has a trailing slash +* with the --version option programs print the version and exit immediately +* GNU ls -f works like Unix ls -f +* mktime replacement works + +Major changes in release 3.5: +* adds support for DEC Alpha under OSF/1 +* configuring with gcc uses CFLAGS='-g -O' by default +* all programs accept --help and --version options +* long-named options must be introduced with `--'; `+' is no longer + accepted since it is incompatible with the POSIX.2 standard +* chmod accepts long-named options +* dd conv=unblock doesn't hang +* new df option --exclude=fstype +* new ls option --full-time + +Major changes in release 3.4: +* cp -p and mv preserve setuid and setgid bits +* chown works on systems where sizeof(uid_t) != sizeof(int) + or sizeof(uid) != sizeof(gid) +* catch errors from spurious slashes at ends of arguments + +Major changes in release 3.3: +* df sped up by not calling sync for every filesystem +* df ported to AIX (RS/6000 and PS/2), and SVR2 port fixed +* df -i now also prints the total number of inodes per filesystem +* ls sped up by not reading symlink contents unnecessarily +* du doesn't die on POSIX systems when the root filesystem is NFS mounted +* cp and mv report chown Permission denied errors when run by root diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/sh-utils/ChangeLog b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/sh-utils/ChangeLog new file mode 100644 index 0000000..9005a62 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/sh-utils/ChangeLog @@ -0,0 +1,4850 @@ +2002-08-08 Jim Meyering <meyering@lucent.com> + + * Version 2.0.15. + +2002-08-05 Paul Eggert <eggert@twinsun.com> + + Fix some minor time-related bugs with POSIX time arguments. + Some valid time stamps were being rejected (notably -1, and + time stamps before 1900 on 64-bit hosts). And some invalid + time stamps were being accepted, e.g. September 31. + + * src/date.c (main): Adjust to posixtime signature change. + +2002-08-05 Jim Meyering <meyering@lucent.com> + + * configure.ac: Change $am_cv_sys_posix_termios to + $ac_cv_sys_posix_termios. From Andreas Schwab. + +2002-08-04 Jim Meyering <meyering@lucent.com> + + * Version 2.0.14. + +2002-07-30 Paul Eggert <eggert@twinsun.com> + + * src/chroot.c (main): Exit with status 126 or 127 when execvp or + execv fails, for consistency with POSIX commands like env and nice. + * src/su.c (run_shell): Likewise. + +2002-07-29 Paul Eggert <eggert@twinsun.com> + + * src/nohup.sh: Change behavior to conform to POSIX 1003.1-2001: + - Do not adjust scheduling priority. + - Redirects stderr to stdout, if stderr is not a terminal. + - Exit status is now 126 if command was found but not invoked, + 127 if nohup failed or if command was not found. + Fix bug: command was run if nohup.out wasn't writeable. + * NEWS, doc/coreutils.texi: Document the above. + +2002-07-28 Jim Meyering <meyering@lucent.com> + + * configure.ac: Require automake-1.6b. + +2002-07-27 Jim Meyering <meyering@lucent.com> + + * Version 2.0.13. + + * src/who.c (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Remove definitions. + Now they're defined in readutmp.h. + (print_deadprocs): Remove obsolete FIXME comment. + +2002-07-07 Paul Eggert <eggert@twinsun.com> + + * src/nohup.sh: Port to POSIX 1003.1-2001 "nice", which + requires the option "-n 5" rather than "-5". This matters + with GNU "nice" if the user has set the _POSIX2_VERSION + environment variable. + +2002-07-24 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): Exempt false. + +2002-07-20 Jim Meyering <meyering@lucent.com> + + * Upgrade to cvs automake -- required to work with 2.53b. + * configure.ac: Require automake-1.6a. + + * tests/Makefile.am (TESTS_ENVIRONMENT): Remove now-unused parts + of this definition. + (EXTRA_DIST): Add priv-check. + * tests/priv-check: New file. + + * Upgrade to gettext-0.11.3. + * Upgrade to autoconf-2.53b. + +2002-07-18 Jim Meyering <meyering@lucent.com> + + * src/uname.c (main): Test sysctl(...) >= 0, not == 0, since + on NetBSD the return value may well be positive. + Use one-line aggregate initializations. + Use tightly scoped static buffers to avoid warnings about + unused variables on some systems. + +2002-05-07 Paul Eggert <eggert@twinsun.com> + + Add support for BSD-style sysctl to get the strings needed for + uname -p and uname -i. Unfortunately the different BSDs vary, + but I've surveyed FreeBSD, NetBSD, and OpenBSD. + + * src/uname.c (UNAME_HARDWARE_PLATFORM, UNAME_PROCESSOR): New macros. + (main): Use them, along with sysctl, to support uname -i and uname -p + on BSD hosts. + +2002-07-17 Jim Meyering <meyering@lucent.com> + + * src/uptime.c (print_uptime): Restore use of (equivalent, but + more readable) `>=' from Bruno's patch. + + * configure.ac (jm_BOOT_TIME): Remove. (moved/renamed to m4/boottime.m4) + Use the replacement: GNULIB_BOOT_TIME. + +2002-07-13 Bruno Haible <bruno@clisp.org> + + * src/uptime.c: Include sys/sysctl.h. + (print_uptime): Add support for determining the boot time on FreeBSD. + +2002-07-15 Jim Meyering <meyering@lucent.com> + + * src/uptime.c (print_uptime): Use STREQ in place of !strcmp. + + * src/uname.c (main): Remove unnecessary uses of `defined' when + operating on `HAVE_...' symbols. Remove unnecessary parentheses. + +2002-07-02 Jim Meyering <meyering@lucent.com> + + * src/basename.c, src/chroot.c, src/date.c, src/dirname.c (usage): + Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it. + * src/echo.c, src/env.c, src/expr.c, src/factor.c: Likewise. + * src/hostname.c, src/id.c, src/kill.c, src/logname.c: Likewise. + * src/nice.c, src/pathchk.c, src/pinky.c, src/printenv.c: Likewise. + * src/printf.c, src/pwd.c, src/seq.c, src/sleep.c, src/stty.c: Likewise. + * src/su.c, src/tee.c, src/test.c, src/true.c, src/tty.c: Likewise. + * src/uname.c, src/uptime.c, src/users.c, src/who.c: Likewise. + * src/whoami.c, src/yes.c: Likewise. + + * src/Makefile.am (.sh): Also substitute @PACKAGE_BUGREPORT@. + * src/groups.sh (usage): Use @PACKAGE_BUGREPORT@, rather than + hard-coding a deprecated address. + * src/nohup.sh (usage_help): Likewise. + + * src/date.c (usage): Mention that the expansions of %p and %P are + empty in many locales. From matthew arnison. + +2002-06-22 Jim Meyering <meyering@lucent.com> + + * configure.ac: Invoke AC_GNU_SOURCE very early. + +2002-05-24 Jim Meyering <meyering@lucent.com> + + * tests/nice: Move this file... + * tests/misc/nice: ...to here. + * tests/Makefile.am (TESTS): Remove nice. + * tests/misc/Makefile.am (TESTS): Add nice. + * configure.ac (AC_CONFIG_FILES): Add tests/misc/Makefile. + + * src/pathchk.c (validate_path): Compare the result of the function -- + not its (constant) address -- against zero. + Patch from Tim J. Robbins <tjr@FreeBSD.ORG> + * tests/misc/pathchk1: New test for the above. + * tests/misc: New directory. + * tests/Makefile.am (SUBDIRS): Add misc. + * tests/misc/Makefile.am: New file. + +2002-05-03 Jim Meyering <meyering@lucent.com> + + * src/uptime.c (print_uptime): Use ngettext for day/days and user/users. + Suggestion from Karl Eichwalder. + + * src/kill.c (usage): Add a little to the description of --list. + Uncapitalize first word and remove period at end of each one line + option description. + + * src/who.c (usage): Tweak description of --users. + From Karl Eichwalder. + +2002-04-29 Jim Meyering <meyering@lucent.com> + + * Version 2.0.12. + + Avoid warnings from gcc. + * src/who.c (PIDSTR_DECL_AND_INIT): Cast ut_pid value to int. + (make_id_equals_comment): Cast sizeof expression (used as field + width argument) to `int'. + + * configure, config.hin, Makefile.in, etc.: Regenerate using + autoconf-2.53a. + +2002-04-28 Jim Meyering <meyering@lucent.com> + + * src/who.c: Don't include xalloc.h. + It's already included via system.h. + +2002-04-28 Paul Eggert <eggert@twinsun.com> + + * src/kill.c: Rewrite from scratch. Support everything + required by POSIX 1003.1-2001; when this conflicts with Bash, + stick with POSIX. The conflicts are kill -l output format, + and lower case signal names preceded by `-' (e.g., "kill -hup" + is no longer supported). Remove -L or --long-list option. + Add -t or --table option. Rename --sigspec to --signal; + remove --signum and do not advertise obsolescent option -n. + Use str2sig and str2sig to convert between signal names and + numbers. + + * doc/coreutils.texi (kill invocation): Document the above. + Document POSIX signals better. + + * lib/sig2str.h, lib/sig2str.c: New files. + * configure.ac (AC_CHECK_DECLS): Add str2signal, strtoimax, + sys_siglist, _sys_siglist. + * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h. + * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str). + * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR. + (jm_PREREQ_SIG2STR): New macro. + +2002-04-28 Jim Meyering <meyering@lucent.com> + + * src/test.c (test_syntax_error): Add `const' to paramater + declarations to avoid new warning from gcc. + (integer_expected_error): Likewise. + +2002-04-25 Jim Meyering <meyering@lucent.com> + + * configure.ac (AM_GNU_GETTEXT): Add external arg. + (AC_CONFIG_FILES): Remove intl/Makefile. + * Makefile.am (SUBDIRS): Remove intl. + * src/Makefile.am (INCLUDES): Remove -I../intl. + +2002-04-16 Jim Meyering <meyering@lucent.com> + + * src/who.c (BOOT_TIME): Define. + (NEW_TIME): Define to 0, not INT_MAX. + (UT_PID, UT_ID, UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define. + Replace literal uses of ut_pid, ut_id, and ut_exit members with + uses through macros. + (make_id_equals_comment): New function, factored out of three others. + (UT_TYPE_UNDEF, UT_TYPE, IS_USER_PROCESS): Define. + (print_line): Use "%-8.8s" for the format: the user name is not + always NUL terminated. + (scan_entries) [need_users]: Use IS_USER_PROCESS, so that this works + even on systems without ut_type. + +2002-04-15 Jim Meyering <meyering@lucent.com> + + * src/who.c: Include xalloc.h. + Use xmalloc everywhere, not malloc. + +2002-04-12 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (LDADD): List ../lib/libfetish.a both before + and after @LIBINTL@. Thanks to Paul Eggert for the fix and to + Bruno Haible for diagnosing the problem. + +2002-02-26 Paul Eggert <eggert@twinsun.com> + + * src/test.c (age_of): Return -1 and 0 rather than 0 and 1. + Might as well keep it simple, and like bash. + (binary_operator): Fix bug with -nt and -ot, when one of the + files did not exist. We want to be compatible with the ksh93 + documentation, and with Bash. + +2002-03-17 Jim Meyering <meyering@lucent.com> + + * src/seq.c (usage): Mention that --format=FORMAT must be + a *floating-point* format, also in description of that option. + Reported by Karl Eichwalder. + (usage): Also add the `=' signs here: --format=FORMAT, + --separator=STRING. + +2002-03-16 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (datadir): Don't override $(datadir) + which might be set by --datadir and different from $(prefix)/share. + Patch from Albert Chin-A-Young. + +2002-03-10 Jim Meyering <meyering@lucent.com> + + * configure.ac (AM_INIT_AUTOMAKE): Specify here the required version + of automake (1.6), and options (gnits dist-bzip2), rather than... + * Makefile.am (AUTOMAKE_OPTIONS): ...here. Remove definition. + +2002-03-09 Jim Meyering <meyering@lucent.com> + + * Makefile.am (EXTRA_DIST): Remove config/config.rpath, + now that automake knows about it. + +2002-03-05 Jim Meyering <meyering@lucent.com> + + * Makefile.am (EXTRA_DIST): Add config/config.rpath. + +2002-03-02 Jim Meyering <meyering@lucent.com> + + * tests/nice: Export _POSIX2_VERSION=199209, so we can continue + to exercise the now-obsolete options. + + * Makefile.maint (strftime-check): Add `N'. + +2002-02-27 Paul Eggert <eggert@twinsun.com> + + * doc/coreutils.texi (Time directives): Add %N for nanoseconds. + This documents the recent change to 'ls'. But for this to + be accurate we also have to update 'date', as follows: + + * src/Makefile.am (date_LDADD): New macro. + + * src/date.c: Include timespec.h. + (strftime, time, stime): Remove declarations; no longer needed. + (usage): Document %N. + (main): Use gettime rather than time to get the time of day, + so that we can get fractional times. + Similarly for settime and stime, so that we can set fractional times + (though this currently is not available to the user since we don't + parse fractional times; add FIXMES for that). + Check for gettime failures; e.g. this can occur if it + is past 2038 and we are a 32-bit app running on a 64-bit OS. + Get fractional part of file time stamps. + Do not falsely report failures just because time_t happens to be -1 + (e.g. a file time stamp 1 second before the epoch). + (show_date): 2nd arg is now struct timespec, not time_t. + All uses changed. Use nstrftime rather than strftime, so that + we can format fractional seconds. + +2002-02-24 Jim Meyering <meyering@lucent.com> + + * src/nice.c: Include posixver.h. + * src/date.c: Likewise. + +2002-02-17 Jim Meyering <meyering@lucent.com> + + * ABOUT-NLS, intl/*: Update to Gettext 0.11. + * INSTALL: Update to Autoconf 2.52h. + + * src/Makefile.am (datadir): Use `share' in place of @DATADIRNAME@, + per Gettext-0.11. + (LDADD): Use @LIBINTL@ instead of @INTLLIBS@, per Gettext-0.11. + + * configure.ac (AC_CONFIG_AUX_DIR): New macro invocation. + (ALL_LINGUAS): Remove: now in po/LINGUAS as per Gettext 0.11. + + * config: New subdirectory, containing the following files from .: + config.guess, config.sub, depcomp, missing, install-sh, mkinstalldirs. + Move the following files here from doc: texinfo.tex, mdate-sh. + +2002-02-15 Paul Eggert <eggert@twinsun.com> + + Add support for _POSIX2_VERSION, which lets you pick which POSIX + version you want the utilities to conform to. Remove warnings about + failure to conform to a future POSIX version. + + * src/date.c (ISO_8601_OPTION): Remove; no longer needed. + All uses changed to back to the corresponding short options. + (short_options): Remove; no longer needed. + (COMMON_SHORT_OPTIONS): New macro. + + * src/date.c (usage): Document only the intersection of the + old and new behaviors, to encourage portability. + (main): Parse options using POSIX 1003.1-2001 rules if + conforming to that standard. Do not warn of obsolete options. + * src/nice.c (usage, main): Likewise. + +2002-02-11 Paul Eggert <eggert@twinsun.com> + + * src/nice.c (main): Output warnings only if OBSOLETE_OPTION_WARNINGS. + +2002-02-11 Jim Meyering <meyering@lucent.com> + + * src/date.c (usage): Describe %F, %g, %G, %P, and %R. + Tweak the description of %p. + + * tests/stty/basic-1: Use `tail -n +2', rather than `tail +2'. + +2002-02-03 Paul Eggert <eggert@twinsun.com> + + Add more support for POSIX 1003.1-2001, which requires removal + for support of obsolete "-DIGITS" option syntax in nice, and + which prohibits options with optional arguments like date's + -I option. + + * NEWS, coreutils.texi: Document this. + + * src/date.c (ISO_8601_OPTION): New enum value. + (long_options): Use it. + (short_options): New constant. + + * src/date.c (usage): Document the change. + * src/nice.c (usage): Likewise. + + * src/date.c (main): Conform to POSIX 1003.1-2001 if + POSIX2_VERSION says to, otherwise warn of obsolete usage if + OBSOLETE_OPTION_WARNINGS is nonzero and if not POSIXLY_CORRECT. + * src/nice.c (main): Likewise. + +2002-02-02 Bruno Haible <bruno@clisp.org> + + * printf.c (print_esc): Call print_unicode_char with exit_on_error = + false. + +2002-01-28 Jim Meyering <meyering@lucent.com> + + * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.5d. + * configure.ac (AM_INIT_AUTOMAKE): Use zero-arg form of this macro. + +2002-01-22 Jim Meyering <meyering@lucent.com> + + * po/POTFILES.in: Add lib/xmemcoll.c and src/sys2.h. + +2002-01-21 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (strftime-check): New rule. + (local-check): Convert this target to a list. Update uses. + Mark them as .PHONY. + (header-check): New rule. + (local-check): Add header-check. + + * src/dirname.c: Don't include "xalloc.h", as system.h already + does that via sys2.h. + * src/expr.c: Likewise. + +2002-01-19 Jim Meyering <meyering@lucent.com> + + * configure.ac: Remove code that set LIBOBJS in support of ansi2knr. + The latest version of autoconf objected to it, and besides, I don't + care too much about K&R support these days. + +2002-01-14 Paul Eggert <eggert@twinsun.com> + + * src/date.c, src/logname.c, src/pathchk.c: Comment fixes + to bring us up to date with respect to POSIX 1003.1-2001. + In particular, POSIX.2 is now obsolete. + +2001-12-28 Jim Meyering <meyering@lucent.com> + + * configure.ac (ALL_LINGUAS): Add Catalan (ca). + +2001-12-17 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (real_dir): Remove unused variable. + (url_dir_list): Don't set define it here, but... + * Makefile.cfg (url_dir_list): ...define it here instead. + (hosts, a_host, b_host): Remove now-unused variables. + (alpha_subdir, a_url_dir, b_url_dir): Remove now-unused variables. + +2001-12-15 Jim Meyering <meyering@lucent.com> + + * src/basename.c, src/chroot.c, src/date.c, src/dirname.c, src/echo.c, + * src/env.c, src/expr.c, src/factor.c, src/hostid.c, src/hostname.c, + * src/id.c, src/kill.c, src/logname.c, src/nice.c, src/pathchk.c, + * src/pinky.c, src/printenv.c, src/printf.c, src/pwd.c, src/seq.c, + * src/sleep.c, src/stty.c, src/su.c, src/tee.c, src/test.c, src/true.c, + * src/tty.c, src/uname.c, src/uptime.c, src/users.c, src/who.c, + * src/whoami.c, src/yes.c (usage): Use fputs, not printf. + Split --help output into smaller pieces. + Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION + instead of hard-coding --help and --version descriptions. + +2001-12-08 Jim Meyering <meyering@lucent.com> + + * Makefile.cfg (wget_files): Remove ansi2knr.c, since it's + no longer available at that location. + +2001-11-25 Jim Meyering <meyering@lucent.com> + + * basename.c, dirname.c, expr.c, factor.c, hostname.c (usage): + * logname.c, printenv.c, printf.c, pwd.c, sleep.c, test.c (usage): + * true.c, whoami.c, yes.c (usage): + Indent --help and --version strings to start in the 7th column. + +2001-11-17 Jim Meyering <meyering@lucent.com> + + * configure.ac: Replace use of the one-arg form of AC_INIT + with a use of the 3-arg form and a use of AC_CONFIG_SRCDIR. + +2001-11-11 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (printf_LDADD): Reflect spelling change: + s/POW_LIBM/POW_LIB/. + (sleep_LDADD): Likewise. + +2001-11-10 Jim Meyering <meyering@lucent.com> + + * src/date.c (usage): Document %u. Reported by Albert Hopkins. + +2001-11-09 Jim Meyering <meyering@lucent.com> + + * configure.ac: Use AC_CONFIG_FILES(...) and call AC_OUTPUT with no + arguments. + +2001-09-28 Jim Meyering <meyering@lucent.com> + + * configure.ac: Tell automake to use the file name `config.hin' + rather than the two-`.' config.h.in. + +2001-09-26 Jim Meyering <meyering@lucent.com> + + * man/Makefile.am (common_dep): Define it, so we depend on configure.ac. + + * configure.ac: Renamed from configure.in. + +2001-09-25 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am: + (factor_DEPENDENCIES, printf_DEPENDENCIES seq_DEPENDENCIES): + (sleep_DEPENDENCIES uptime_DEPENDENCIES su_DEPENDENCIES): + Remove unnecessary definitions. They can cause trouble + when @INTLLIBS@ expands to -lintl. + +2001-09-23 Jim Meyering <meyering@lucent.com> + + * Makefile.am (SUBDIRS): When using newer gettext (in which + intl/libintl.h is created by rules intl/Makefile) + `intl' must precede `lib'. + +2001-09-17 Jim Meyering <meyering@lucent.com> + + * src/printf.c (main): Change the `ignoring excess arguments' diagnostic + to list the first one we're ignoring. Suggestion from Karl Berry. + +2001-09-16 Jim Meyering <meyering@lucent.com> + + * src/stty.c (usage): Prefix each line with a space, so that + help2man produces a better stty.1 man page. + From Colin Watson, via Michael Stone. http://bugs.debian.org/95816 + + * src/test.c (usage): Describe -h option. + From Colin Watson, via Michael Stone. http://bugs.debian.org/99272 + + * man/pwd.x: Add note to help people understand that this documentation + may not refer to the (shell built-in) command they're running. + * man/echo.x: Likewise. + * man/printf.x: Likewise. + From Michael Stone. + + * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.5. + + * man/Makefile.am: Revamp this file, as for fileutils. + +2001-09-11 Jim Meyering <meyering@lucent.com> + + * configure.in: Move HOST_OPERATING_SYSTEM code from this file + into a new macro defined in m4/host-os.m4. + +2001-09-09 Jim Meyering <meyering@lucent.com> + + * src/test.c (binary_operator): Correct typo in diagnostic. + From Jochen Hein. + +2001-09-03 Paul Eggert <eggert@twinsun.com> + + * NEWS: New 'uname' options -i or --hardware-platform, + and -o or --operating-system. + 'uname -a' now outputs -i and -o information at the end. + New uname option --kernel-version is an alias for -v. + Uname option --release has been renamed to --kernel-release, + and --sysname has been renamed to --kernel-name; + the old options will work for a while, but are no longer documented. + + * configure.in (HOST_OPERATING_SYSTEM): New macro; set it + from $host_os with a translation table and other heuristics. + + * src/uname.c: Correct copyright notice as per latest coding standards. + Remove list of options in comment, which wasn't + worth maintaining separately from usage(). + + (print_element): Move definition up, avoiding the need for + declaration and allowing inlining on some platforms. + Keep track of whether something has been printed; this is more + natural than modifying `toprint'. + + (PRINT_KERNEL_NAME): Renamed from PRINT_SYSNAME. + (PRINT_KERNEL_RELEASE): Renamed from PRINT_RELEASE. + (PRINT_KERNEL_VERSION): Renamed from PRINT_VERSION. + (PRINT_HARDWARE_PLATFORM, PRINT_OPERATING_SYSTEM): New macros. + (toprint): Remove global var; now local in `main'. + (long_options, usage, main): Implement changes described in NEWS. + Reorder options to reflect output order. + (main): Use buffers one byte longer, for compatibility with Solaris 8. + Output newline at end. -a sets `toprint' to -1 now; this is simpler. + Do not bother invoking system calls like uname if the resulting + information does not need to be printed. + Do not fail if sysinfo fails; just print "unknown". + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + * src/tee.c (full_write): Remove decl; not needed. + +2001-06-19 Paul Eggert <eggert@twinsun.com> + + * NEWS: expr now uses LC_COLLATE for string comparison, as per POSIX. + * src/expr.c (nextarg): Use strcoll, not strcmp. + +2001-08-24 Jim Meyering <meyering@lucent.com> + + * src/pinky.c (main): Fail if -l is specified with no username. + + * src/pinky.c (usage): Clarify description of -l. From Clark Morgan. + +2001-06-21 Paul Eggert <eggert@twinsun.com> + + * NEWS: 'expr' now requires '+' rather than 'quote' to quote tokens. + + * src/expr.c (posixly_correct): Remove; no longer needed. + (main): Do not worry about POSIXLY_CORRECT, as it's OK for + expr to have options (so long as they do not begin with digits). + (eval6, usage): Use "+" rather than "quote" to quote tokens. + +2001-08-19 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (bin_PROGRAMS): Add kill. + * src/kill.c: New program. Written by Marcus Brinkmann. + +2001-08-19 Jim Meyering <meyering@lucent.com> + + * po/POTFILES.in: Add src/kill.c + +2001-06-21 Paul Eggert <eggert@twinsun.com> + + * src/expr.c (nextarg): Advance ARGS by one if the next token matches. + All callers changed. + +2001-06-21 Paul Eggert <eggert@twinsun.com> + + * src/expr.c (isstring): Remove. + (eval2): Do comparisons as strings first, before trying to convert to + integer. This avoids loss of information and wrong result, e.g. for + "expr '00' '<' '0!'", where you don't want to convert '00' to '0'. + +2001-08-18 Jim Meyering <meyering@lucent.com> + + * tests/expr/basic (00): New test for the above. + +2001-06-21 Paul Eggert <eggert@twinsun.com> + + * src/expr.c: Code cleanup to avoid tricky macros and + old-style function declarations. + + (cmpf, less_than, less_equal, equal, not_equal, greater_equal, + greater_than, arithf, arithdivf, plus, minus, multiply, divide, mod): + Remove. + + (eval4, eval3, eval2): Rewrite to avoid the need for the above macros + and functions. + +2001-08-18 Jim Meyering <meyering@lucent.com> + + * src/test.c (binary_operator): Move declarations of lt,rt `down' + into the scopes where they're actually used. + (unary_operator): Likewise for `fd'. + +2001-06-20 Paul Eggert <eggert@twinsun.com> + + * src/test.c (isint, binary_operator, unary_operator): + Use intmax_t for argument integers, not long. + (age_of, binary_operator): Use time_t for times, not long. + (unary_operator): If N is out of int range, -t N now returns false. + +2001-06-20 Paul Eggert <eggert@twinsun.com> + + * src/expr.c (main): Handle a leading "--" option as POSIX requires. + +2001-08-18 Jim Meyering <meyering@lucent.com> + + * tests/expr/basic: Add a test for the above. + +2001-06-20 Paul Eggert <eggert@twinsun.com> + + * src/expr.c (toarith): Don't accept plain "-" as a valid integer. + +2001-06-20 Paul Eggert <eggert@twinsun.com> + + Modify 'expr' so that it uses intmax_t, not int, to calculate + the value of integer expressions. + + * src/expr.c (struct valinfo.i): Now intmax_t, not int. + (docolon, int_value, str_value, isstring, nextarg, toarith, + freev, tostring, trace): Remove unnecessary forward decls. + (int_value, printv, tostring, toarith, arithf, arithdivf, docolon, + eval6, eval4, eval3): Do integer arithmetic using intmax_t, not int. + (docolon): Don't assume size_t fits in int. + +2001-08-18 Jim Meyering <meyering@lucent.com> + + * tests/expr/basic: New test for the above. + * tests/expr/Makefile.am: New file. + * tests/expr: New directory. + * tests/Makefile.am (SUBDIRS): Add expr. + * configure.in (AC_OUTPUT): Add tests/expr/Makefile. + +2001-08-18 Jim Meyering <meyering@lucent.com> + + Revert part of last change and solve the problem a better way. + * src/date.c (show_date) [--rfc-822]: Set LC_ALL=C just before + calling strftime and restore it just afterwards. + Suggestion from Ulrich Drepper. + +2001-08-18 H. Peter Anvin <hpa@transmeta.com> + + * src/date.c (show_date) [--rfc-822]: Don't space-pad the day of + the month. + Set only LC_TYPE to the "C" locale. Setting LC_ALL is overkill, + and would have unwanted side effects if there is an error message. + +2001-08-16 Jim Meyering <meyering@lucent.com> + + * src/date.c (main): When there are too many non-option arguments, + include the first offending argument in the diagnostic. + Suggestion from Karl Berry. + +2001-08-14 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (INCLUDES): Add -I../lib so sys2.h can include + the new, generated file, unlocked-io.h. + + * tests/Makefile.am (TESTS_ENVIRONMENT): Remove first definition + of this variable, and move its RHS into the RHS of the second. + Thanks, automake! + + * src/su.c (xputenv): Remove parameter's const qualifier. + + * src/dirname.c, src/env.c, src/id.c, src/pathchk.c, src/pinky.c, + * src/printenv.c, src/sleep.c, src/tee.c, src/test.c, src/uptime.c, + * src/users.c, src/who.c: (AUTHORS): Mark string for translation, + since it contains the English word `and'. + +2001-08-12 Jim Meyering <meyering@lucent.com> + + * src/pathchk.c (PATH_MAX_FOR): Use pathconf via wrapper. + (NAME_MAX_FOR): Likewise. + Guard the above pathconf-using definitions with `#if HAVE_PATHCONF' + rather than with `#ifdef _POSIX_VERSION'. + (pathconf_wrapper): New function. + (validate_path): Declare length variables to be `long', not `int'. + Adjust corresponding printf-style specs to use %ld. + Reported by Neal H Walfield. + +2001-08-07 Jim Meyering <meyering@lucent.com> + + * src/printf.c (cfcc_msg): Remove now-inaccurate part of comment. + From Bruno Haible. + +2001-07-04 Jim Meyering <meyering@lucent.com> + + * Makefile.cfg: New file with package-specific definitions. + * Makefile.am (EXTRA_DIST): Add Makefile.cfg. + +2001-06-09 Jim Meyering <meyering@lucent.com> + + (PIDSTR_DECL_AND_INIT): Define. + +2001-06-05 Jim Meyering <meyering@lucent.com> + + * configure.in (ALL_LINGUAS): Add Turkish (tr). + +2001-05-27 Jim Meyering <meyering@lucent.com> + + * src/dirname.c (main): Add `const' to declaration of local, `result'. + +2001-04-01 Jim Meyering <meyering@lucent.com> + + Add options to make `who' more POSIX compliant. + * who.c: Accept new options: --all (-a), --boot (-b), --dead (-d), + --login, --process (-p), --runlevel (-r), --short (-s), --time (-t), + --users (-u). + The -u option now produces POSIX-specified results and is the same as + the long option `--users'. --idle is no longer the same as -u. + (time_string, print_line, print_boottime, print_deadprocs, print_login, + print_initspawn, print_clockchange, print_runlevel): New functions. + (print_user): Renamed from print_entry and reworked. + (search_entries): Remove function. + (who_am_i): Likewise. + (usage): Describe new options. + (main): Handle new options. + Mostly from Michael Stone. + +2001-05-11 Paul Eggert <eggert@twinsun.com> + + dirname code cleanup. base_name now behaves more compatibly + with POSIX basename when given file names that have trailing + slashes, and similarly for dir_name. Add new primitives + base_len and dir_len. Put the directory-name-related decls + into dirname.h. + + * basename.c: Include "dirname.h". + (base_name, strip_trailing_slashes): Remove decls; now in dirname.h. + (main): Use base_len instead of strip_trailing_slashes to strip + trailing slashes. + + * dirname.c (strip_trailing_slashes): Remove decl; + now in dirname.h. + (main): Use dir_len rather than dir_name_r. + + * su.c: Include "dirname.h". + (base_name): Remove decl; now in dirname.h. + +2001-04-20 Jim Meyering <meyering@lucent.com> + + * doc/sh-utils.texi (false invocation): Describe how --help and + --version are treated with and without POSIXLY_CORRECT. + (true invocation): Likewise. Forwarded by Michael Stone. + +2001-03-18 Jim Meyering <meyering@lucent.com> + + * tests/Fetish.pm: If the $DJDIR envvar is defined, set SHELL + to $DJDIR/bin/bash.exe. Patch from Richard Dawe, based on a + suggestion from Eli Zaretskii. + +2001-03-10 Jim Meyering <meyering@lucent.com> + + * doc/sh-utils.texi (date invocation): Correct the description of how + date works when given no format. Reported by Ole Laursen. + + * src/factor.c: Include wheel-size.h. + (WHEEL_START): Adjust definition. + (wheel_tab[]): Remove body of definition. + Include generated file, wheel.h, instead. + + * src/wheel-gen.pl: New file. + * src/Makefile.am (noinst_HEADERS): Add wheel.h wheel-size.h. + (EXTRA_DIST): Add wheel-gen.pl. + (PERL): Define. + (wheel-size.h, wheel.h): New rules. + (BUILT_SOURCES): Add wheel.h and wheel-size.h. + (MAINTAINERCLEANFILES): Define. + +2001-03-09 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (my_distdir): Define new variable, and use this + in place of most old uses of $(distdir). + + * src/date.c (usage): Describe %C. + * doc/sh-utils.texi (Date directives): Likewise. + + * tests/help-version: Ensure that /dev/full is a character device + (using test -c) as well as being writable, before trying to write to it. + Otherwise, the test could mistakenly append a newline to an existing, + regular, writable, /dev/full file. + Suggested by Ulrich Drepper. + +2001-03-07 Jim Meyering <meyering@lucent.com> + + * tests/stty/Makefile.am (EXTRA_DIST): Remove input-tty. + * tests/Makefile.am (EXTRA_DIST): Add input-tty. + + * tests/stty/basic-1: Reflect change in location of input-tty. + * tests/stty/row-col: Likewise. + * tests/stty/input-tty: Move this file... + * tests/input-tty: ... to here. + +2001-02-24 Paul Eggert <eggert@twinsun.com> + + * doc/sh-utils.texi: Fix typo: '-d=1may' -> '-d 1may'. + Fix and clarify time zone usage in 'date' examples. + +2001-02-04 Jim Meyering <meyering@lucent.com> + + * src/factor.c (usage): Tweak --help output: it prints the _prime_ + factors, not just any factors. + +2001-02-03 Jim Meyering <meyering@lucent.com> + + Improve the performance of `factor' (more than 2x speed-up for large N). + * src/factor.c (wheel_tab): New global table. + (WHEEL_START, WHEEL_END): Define. + (factor): Remove the loop that special-cased `2'. + Instead of incrementing by `2', use the offsets from the wheel table. + From Michael Steffens. + +2000-11-27 Prashant TR <rprash@wilco-int.com> + + * src/test.c (eaccess) [__MSDOS__]: Just use access. + +2001-01-26 Jim Meyering <meyering@lucent.com> + + * src/dirname.c (main): Declare local result as non-const, now + that it's freed. + +2001-01-20 Jim Meyering <meyering@lucent.com> + + * configure.in: Remove jm_CHECK_ALL_TYPES. + Now it's invoked by jm_MACROS. + +2001-01-04 Jim Meyering <meyering@lucent.com> + + * src/date.c (main): Fail when --rfc-822 (-R) is specified along + with a format string. Reported by Jochen Hein. + +2000-12-17 Jim Meyering <meyering@lucent.com> + + * doc/texinfo.tex: Update from master repository. + * config.sub: Likewise. + * config.guess: Likewise. + + * djgpp: New directory. + * djgpp/*: New files. + * Makefile.am (SUBDIRS): Add djgpp. + * configure.in (AC_OUTPUT): Add djgpp/Makefile. + From Prashant TR. + +2000-12-08 Jim Meyering <meyering@lucent.com> + + * src/dirname.c: Include xalloc.h. + (main): Use dir_name rather than the underlying dir_name_r. + The former now handles cwd-relative names with drive-letter prefixes. + +2000-12-02 Jim Meyering <meyering@lucent.com> + + * src/seq.c (valid_format): Move pre-increment to a separate statement + to avoid a warning. + + * src/id.c: Move dcls of globals used only in main... + (main): ...to here. + (usage): Clarify option descriptions. + +2000-11-18 Jim Meyering <meyering@lucent.com> + + * po/Makefile.in.in: Sync with the one from fileutils. + + * configure, config.h.in, Makefile.in, etc.: Regenerate using the + very latest version (in CVS) of autoconf. + +2000-11-17 Jim Meyering <meyering@lucent.com> + + * GNUmakefile (.NOTPARALLEL): New target. Prevent unwanted parallelism. + Suggestion from Ulrich Drepper. + + * src/pinky.c: Explicitly include sys/types.h before including system.h. + * src/uptime.c: Likewise. + * src/users.c: Likewise. + * src/who.c: Likewise. + +2000-11-13 Paul Eggert <eggert@twinsun.com> + + * src/sys2.h (ST_TIME_CMP_NS): Fix typo: ST_MTIM_NSEC should + be tested with #ifdef, not with #if. + +2000-11-12 Jim Meyering <meyering@lucent.com> + + * src/date.c (show_date): Add a comment explaining why the + format string must not be translatable via _(). From Paul Eggert. + +2000-10-31 Jim Meyering <meyering@lucent.com> + + * doc/sh-utils.texi: Clean up indentation and punctuation. + Fix a couple typos. From Brian Youmans. + +2000-10-30 Jim Meyering <meyering@lucent.com> + + * configure, config.h.in, Makefile.in, etc.: Regenerate using the + very latest version (in CVS) of autoconf. + +2000-10-29 Jim Meyering <meyering@lucent.com> + + * Version 2.0.11. + +2000-10-27 Jim Meyering <meyering@lucent.com> + + * src/date.c (usage): Mention the time zone, UTC, and write the date + in ISO format in the description of %s. Suggestion from Karl Berry. + +2000-10-25 Jim Meyering <meyering@lucent.com> + + * src/dirname.c: Include dirname.h. + (main): Use dir_name_r rather than open-coding it. + +2000-10-23 Jim Meyering <meyering@lucent.com> + + * Makefile.am (EXTRA_DIST): Add .prev-version. + +2000-10-18 Paul Eggert <eggert@twinsun.com> + + * src/date.c (universal_time): Remove; it's just a temptation to + do the wrong thing. + (main): The -u option now just sets TZ; it doesn't do anything else. + (show_date): Do not do anything special if -u is set. + This affects the behavior of the -I and -R options. + * doc/sh-utils.texi: Document the above. + +2000-10-18 Jim Meyering <meyering@lucent.com> + + * doc/sh-utils.texi (Examples of date): Fix a typo. + +2000-10-11 Jim Meyering <meyering@lucent.com> + + * doc/sh-utils.texi (Time directives) [%S]: Range is 0..60, not 0..61. + +2000-10-06 Paul Eggert <eggert@twinsun.com> + + Undo the effect of the 1997-07-12 change to date.c; it + broke "date -u MMDDhhmm" and it wasn't documented. + This reverts to the behavior of the 1996-01-03 patch. + + * src/date.c (TZ_UTC0, MAYBE_SET_TZ_UTC0, set_tz): Remove. + (batch_convert): Don't futz with TZ. + (main): -u now parses all dates as UTC, not just some. + Reported by Karl-Michael Schneider. + * tests/date/Test.pm (utc-0, utc-1, relative-2): Adjust to + above change. + +2000-09-29 Jim Meyering <meyering@lucent.com> + + * src/yes.c (usage): Add a separate usage line, just for `OPTION'. + Suggestion from M. P. Suzuki. + +2000-09-09 Jim Meyering <meyering@lucent.com> + + * src/date.c (usage): Make the second `Usage' line more precise + (also making it match the texinfo documentation). + From Karl Eichwalder. + + * doc/sh-utils.texi (Setting the time): Correct the capitalization of + `HHMM' in the info-rendering of the texinfo documentation. + Reported by Karl Eichwalder. + +2000-08-14 Jim Meyering <meyering@lucent.com> + + * src/tee.c (main): Remove incorrect `FIXME' comment. + +2000-08-07 Paul Eggert <eggert@twinsun.com> + + * src/su.c (xputenv): Invoke xalloc_die instead of printing + our own message. + +2000-07-30 Jim Meyering <meyering@lucent.com> + + * src/tee.c (tee): Use SET_BINARY and SET_BINARY2. + From Prashant TR. + + * src/help-version: Remove file. Move it to ... + * tests/help-version: ...here + * tests/Makefile.am (TESTS): Add help-version. + (TESTS_ENVIRONMENT): Define. + * src/Makefile.am (EXTRA_DIST): Remove help-version. + (TESTS): Remove definition. + (TESTS_ENVIRONMENT): Remove definition. + +2000-07-23 Jim Meyering <meyering@lucent.com> + + * src/help-version (su_args): Punt, so we don't try to start a shell. + + * src/su.c: Include <sys/param.h> if HAVE_SYS_PARAM_H is defined, + rather than if _POSIX_VERSION is defined. Remove declarations of + getpwuid, getgrgid, and getuid, now that they're in sys2.h. + Prompted by a report from John David Anglin. + + * src/sys2.h [!HAVE_DECL_GETPWUID]: Declare getpwuid. + [!HAVE_DECL_GETGRGID]: Declare getgrgid. + [!HAVE_DECL_GETUID]: Declare getuid. + +2000-07-19 Jim Meyering <meyering@lucent.com> + + * src/date.c (batch_convert): Free `initial_TZ' only if it was set. + Reported by Michael Hohn. + +2000-07-17 Jim Meyering <meyering@lucent.com> + + * src/stty.c (visible): Don't mark `<undef>' for translation. + The standard requires that exact string. + +2000-07-09 Jim Meyering <meyering@lucent.com> + + * config.guess: Update from FSF. + * config.sub: Likewise. + + * src/Makefile.am (seq_LDADD): Don't hard-code `-lm' -- some systems + don't have/need it. From Bruno Haible. + +2000-07-06 Jim Meyering <meyering@lucent.com> + + * src/help-version: Punt on `groups' test, since all it does + is run `id -Gn', and groups fails if GNU id is not installed. + Reported by Christian Krackowizer. + +2000-07-05 Bruno Haible <haible@clisp.cons.org> + + * tests/nice: Avoid syntax error in "test" when `nice` generates + no output. + +2000-07-04 Jim Meyering <meyering@lucent.com> + + * Version 2.0j. + + * tests/date/Test.pm (test_vector): Disable test #2 for all systems, + even though it fails only on SunOS4. + +2000-07-01 Jim Meyering <meyering@lucent.com> + + * configure.in (jm_DUMMY_1): Wrap a snippet in a macro definition + so we can use AC_REQUIRE. + (jm_BOOT_TIME): Likewise. + +2000-06-17 Bruno Haible <haible@clisp.cons.org> + + * configure.in: Add pinky, users, who to OPTIONAL_BIN_PROGS if either + <utmp.h> or <utmpx.h> exists. Add uptime only if either <utmp.h> or + <utmpx.h> exists. + * src/Makefile.am (bin_PROGRAMS): Remove pinky, users, who from here... + (EXTRA_PROGRAMS): ... and add them here. + +2000-06-26 Jim Meyering <meyering@lucent.com> + + `id -Gn' (invoked by groups) would fail without giving a diagnostic + on malconfigured systems. + * src/id.c (print_user): Give a diagnostic if number->name lookup fails. + (print_group): Likewise. + +2000-06-25 Jim Meyering <meyering@lucent.com> + + * configure.in (ALL_LINGUAS): Add Danish (da). + +2000-06-21 Jim Meyering <meyering@lucent.com> + + * tests/stty/basic-1: New test for that. + * src/stty.c (valid_options): Don't segfault on `stty erase -'. + Patch from Harry Liu. + +2000-06-15 Jim Meyering <meyering@lucent.com> + + * tests/date/Test.pm: Add tests for getdate.y fix. + +2000-06-14 Jim Meyering <meyering@lucent.com> + + * src/help-version: Punt on nohup; give it --version. + +2000-06-10 Jim Meyering <meyering@lucent.com> + + * doc/sh-utils.texi: Typo-fixes and some clean-up from Brian Youmans. + +2000-05-29 Jim Meyering <meyering@lucent.com> + + * tests/nice: Remove now-unused reference to srcdir. + + * src/help-version: Use `WARNING', not just `Warning' in the + broken-/bin/sh diagnostic, to be consistent with other such warnings. + +2000-05-21 Jim Meyering <meyering@lucent.com> + + * tests/nice: Disable test on djgpp. + +2000-05-15 Jim Meyering <meyering@lucent.com> + + * tests/date/Test.pm (test_vector): Skip the %c test on SunOS4 systems. + Suggested by Paul Eggert. Reported by Volker Borchert. + +2000-05-13 Jim Meyering <meyering@lucent.com> + + * src/groups.sh: Detect and report write failure of --help/--version. + * src/nohup.sh: Likewise. + +2000-05-11 Jim Meyering <meyering@lucent.com> + + * src/date.c (usage): Don't call close_stdout_status directly, + since that didn't cover --version output. + (main): Instead, call close_stdout_set_status and arrange to + call close_stdout via atexit. + * src/printenv.c: Likewise. + * src/tty.c: Likewise. + + * src/true.c (usage): Don't call close_stdout directly, since that + didn't cover --version output. + (main): Arrange to call close_stdout via atexit, instead. + * src/yes.c: Likewise. + * src/sleep.c: Likewise. + +2000-05-09 Jim Meyering <meyering@lucent.com> + + * src/sys2.h (case_GETOPT_VERSION_CHAR): Don't call close_stdout. + * src/help-version: New test. + * src/Makefile.am (TESTS): Define. + (TESTS_ENVIRONMENT): Likewise. + (EXTRA_DIST): Add help-version. + +2000-05-08 Jim Meyering <meyering@lucent.com> + + * Version 2.0i. + +2000-05-07 Jim Meyering <meyering@lucent.com> + + * Version 2.0h. + + * src/basename.c: Include "closeout.h". + (main): Call atexit with close_stdout. + * src/chroot.c: Likewise. + * src/dirname.c: Likewise. + * src/echo.c: Likewise. + * src/env.c: Likewise. + * src/expr.c: Likewise. + * src/factor.c: Likewise. + * src/hostid.c: Likewise. + * src/hostname.c: Likewise. + * src/id.c: Likewise. + * src/logname.c: Likewise. + * src/nice.c: Likewise. + * src/pathchk.c: Likewise. + * src/pinky.c: Likewise. + * src/printf.c: Likewise. + * src/pwd.c: Likewise. + * src/seq.c: Likewise. + * src/stty.c: Likewise. + * src/su.c: Likewise. + * src/test.c: Likewise. + * src/uname.c: Likewise. + * src/uptime.c: Likewise. + * src/users.c: Likewise. + * src/who.c: Likewise. + * src/whoami.c: Likewise. + * src/tee.c: Likewise. Remove explicit close_stdout. + + * src/yes.c Include "closeout.h". + (usage): Call close_stdout just before exit. + * src/sleep.c: Likewise. + * src/true.c: Likewise. + * src/date.c (usage): Call close_stdout_status. + * src/printenv.c (usage): Likewise. + + * tests/date/Test.pm ($Test::env{'rfc822-1'}): Add TZ=UTC0. + +2000-05-06 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (sleep_LDADD): Add @LIB_CLOCK_GETTIME@ and + @LIB_NANOSLEEP@. + + * src/tty.c (main): Warn about arguments, don't fail. + (usage): Call close_stdout_status from here as well as from main. + +2000-05-05 Jim Meyering <meyering@lucent.com> + + Exit nonzero upon write failure. + * src/printf.c: Include "closeout.h". + (main): Call close_stdout. + Reported by Ian Jackson via Michael Stone. + +2000-05-04 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (my-distcheck): Remove spurious blank line. + Remove $(DEPDIR) *after* making distclean, not before. + +2000-04-30 Jim Meyering <meyering@lucent.com> + + * src/yes.c: Detect and terminate upon write failure. + +2000-04-14 Jim Meyering <meyering@lucent.com> + + * src/seq.c: Shorten `#ifdef HAVE_...' to `#if HAVE_...' and + remove unnecessary uses of `defined' (aesthetics). + +2000-04-12 Jim Meyering <meyering@lucent.com> + + Move some code into m4/. + * configure.in (_GNU_SOURCE): Don't define here. + (AC_SYS_LARGEFILE): Don't use here. + (AM_C_PROTOTYPES): Don't use here. + (AC_DEFINE): Use 3-arg form. + * acconfig.h: Remove now-unused file. + +2000-04-09 Jim Meyering <meyering@lucent.com> + + * configure.in (ALL_LINGUAS): Add Estonian (et). + +2000-04-01 Jochen Hein <jochen@jochen.org> + + * src/date.c: Use the "C" locale when using --rfc-822 (-R), as + required by rfc822. Before, in the de_DE locale, date would + print the German weekday and month abbreviations. + + * tests/date/Test.pm: Add test for rfc822 format and foreign + locale settings. + +2000-04-04 Jim Meyering <meyering@lucent.com> + + * man/Makefile.am (man_MANS): Add uptime.1. + * man/uptime.x: New file. + + * man/Makefile.am (man_MANS): Add factor.1. + * man/factor.x: New file. + + * tests/seq/basic: Split a long line and tweak for font-lock mode. + * tests/factor/basic: Likewise. + * tests/basename/basic: Likewise. + +2000-03-29 Paul Eggert <eggert@twinsun.com> + + * src/date.c: Include <langinfo.h> if it exists. + (DATE_FMT_LANGINFO): New macro. + (show_date): Use it to get the locale-specific default format for + "date" if it exists. + +2000-03-19 Jim Meyering <meyering@lucent.com> + + * Version 2.0g. + + * doc/sh-utils.texi (chroot invocation): Include a couple tips and + a simple example. + + * doc/getdate.texi (Calendar date item): Fix typos. + From Per Cederqvist. + +2000-03-18 Jim Meyering <meyering@lucent.com> + + * src/uptime.c (print_uptime): Use `buf' only if fgets succeeds. + +2000-03-12 Jim Meyering <meyering@lucent.com> + + Merge from textutils. + * src/system.h (O_BINARY, O_TEXT): Define if necessary. + (SET_BINARY, SET_BINARY2): Define. + (DEV_BSIZE): Define to BBSIZE if appropriate. + +2000-03-11 Jim Meyering <meyering@lucent.com> + + * tests/date/Test.pm: Set the default TZ value to UTC0, not UTC. + The latter didn't have any effect on alphaev56-dec-osf4.0f. + + Final merge with fileutils. + * src/system.h: Use standard `#if TIME_WITH_SYS_TIME...' block + rather than `#if TM_IN_SYS_TIME' one. + +2000-02-02 Bruno Haible <haible@clisp.cons.org> + + * printf.c: Include "unicodeio.h". + (usage): Mention \u and \U directives. \x outputs a byte, not a + character. + (print_esc): Implement \u and \U. + * Makefile.am (printf_LDADD): Add @LIBICONV@. + +2000-03-03 Jim Meyering <meyering@lucent.com> + + Make it so stty's rprnt attribute works on HPUX 10.20. + * src/stty.c [CREPRINT && !CRPRNT] (CRPRNT): Define. + (control_info): Recognize HPUX's CREPRINT. + +2000-03-02 Jim Meyering <meyering@lucent.com> + + * doc/sh-utils.texi (printf invocation): Describe new unicode syntax. + From Bruno Haible. + + Unify with fileutils/src/system.h. + * src/system.h (ST_NBLOCKS): Sync with recent changes in fileutils. + [!_POSIX_VERSION]: Remove declarations of getlogin, ttyname, geteuid. + * src/sys2.h: Declare them here, if needed. + +2000-03-01 Jim Meyering <meyering@lucent.com> + + * Makefile.am (EXTRA_DIST): Include GNUmakefile. + + * src/seq.c (get_width_format): Fix portability problem with + `-0' vs. `0'. + +2000-02-22 Jim Meyering <meyering@lucent.com> + + * tests/date/Test.pm (datevtime-1): New test. + From John Kendall. + +2000-02-15 Jim Meyering <meyering@lucent.com> + + * man/Makefile.maint ($(man_MANS)): Remove $@-t1. + +2000-02-13 Jim Meyering <meyering@lucent.com> + + * tests/Fetish.pm (run_tests): Discard stderr. + Reverse diff args, so `expected' is last, as in mk-script. + +2000-02-12 Jim Meyering <meyering@lucent.com> + + * tests/mk-script: Invoke `diff' when differences are found. + * tests/Fetish.pm (run_tests): Likewise. + +2000-02-09 Jim Meyering <meyering@lucent.com> + + * src/su.c (correct_password): Correct HAVE_STRUCT_* name in #if guard + to go along with corrected autoconf test: Reported by Gaël Quéri. + +2000-02-05 Jim Meyering <meyering@lucent.com> + + * Version 2.0f. + + * src/who.c: Use UT_USER in place of hard-coded `->ut_name' here, too. + * src/pinky.c: Likewise. + Reported by Tom Tromey and Andreas Schwab. + * src/uptime.c (print_uptime): Likewise. + * src/users.c (list_entries_users): Likewise. + +2000-01-30 Jim Meyering <meyering@lucent.com> + + * Version 2.0e. + + * src/su.c (correct_password): Guard with `HAVE_GETSPNAM && + HAVE_STRUCT_PASSWD_SP_PWDP', rather than just `#ifdef HAVE_SHADOW_H'. + + * po/POTFILES.in: Add lib/makepath.c, lib/obstack.c, lib/rpmatch.c, + and lib/same.c. + +2000-01-29 Jim Meyering <meyering@lucent.com> + + * configure.in: Move library-related tests into m4/lib-check.m4. + Remove lib-check for cposix now that we use m4/isc-posix.m4. + + * src/seq.c: Back out most of the 2000-01-21 and 01-22 changes. + [Instead, merely give examples showing how to accomplish the same + task with fewer limitations using existing tools. ] + Suggestion from Bruno Haible. + (valid_format): Rename from check_format. + * tests/seq/basic: Remove associated tests and add two equal-width ones. + + * tests/stty/row-col-1: Set COLUMNS envvar, just to be safe. + +2000-01-28 Jim Meyering <meyering@lucent.com> + + * src/stty.c (wrapf): Emit a newline only if 0 < current_col. + (screen_columns): Use xstrtol, not atoi. + If get_win_size fails and $COLUMNS == 0, then return 80, not `0'. + +2000-01-23 Jim Meyering <meyering@lucent.com> + + * configure.in (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN): + AC_SUBST these not here, but rather in m4/, so that the now-shared + lib/Makefile.am are all the same. + (AC_CHECK_FUNCS): Remove check for utmpname, since it's already + in m4/prereq.m4. + Remove many function checks (moved to m4/.) + + * configure.in (AM_FUNC_STRTOD): Move to m4/. + (AC_SUBST(POW_LIBM)): Likewise. + + * configure.in (SEQ_LIBM): Remove AC_SUBST of a constant. + * src/Makefile.am (seq_LDADD): Add -lm rather than constant $(SEQ_LIBM). + +2000-01-22 Jim Meyering <meyering@lucent.com> + + * src/sys2.h [! HAVE_DECL_STRTOUL]: Declare strtoul. + [! HAVE_DECL_STRTOULL]: Declare strtoull. + Required for some AIX systems. Reported by Christian Krackowizer. + + * configure.in (ALL_LINGUAS): Add Slovenian (sl). + (AC_CHECK_HEADERS): Move these checks into m4/. + + * src/seq.c (enum Format_type): Declare. + (format_type): New global to take place of intconv. + (format_str): Move global declaration... + (main): ... to here. + (check_format): Rename parameter to avoid shadowing global. + (DO_printf): New macro. + (main): Use it. + Topologically sort the functions and remove fwd declarations. + +2000-01-21 Bruno Haible <haible@linuix.math.u-bordeaux.fr> + + Add support for octal and hexadecimal output. + * seq.c (intconv): New variable. + (usage): Update. + (main): Call scan_arg instead of scan_double_arg. Call check_format + before scan_arg. + (scan_int_arg, scan_arg): New functions. + (check_format): Add intconv argument. Accept %d, %u, %o, %x, %X. + (print_numbers): If intconv is true, pass an int argument to printf. + +2000-01-21 Jim Meyering <meyering@lucent.com> + + * configure.in (ALL_LINGUAS): Add Galician (gl). + +2000-01-16 Jim Meyering <meyering@lucent.com> + + * lib/Makefile.am: Sync with fileutils/lib/Makefile.am. + + * src/date.c (usage): Correct error in %V description. + From Wolfram Kleff. + + * configure.in: Remove jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV, + AM_FUNC_GETLOADAVG, jm_SYS_PROC_UPTIME, AM_SYS_POSIX_TERMIOS, + jm_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL. + +2000-01-15 Jim Meyering <meyering@lucent.com> + + * configure.in (AC_REPLACE_FUNCS): Remove gethostname, getusershell, + memcpy, and memset. Now that's done in m4/. + Remove these, too: stime strcspn stpcpy strstr strtol strtoul. + +2000-01-12 Jim Meyering <meyering@lucent.com> + + * configure.in: Remove the tests that are now in jm_PREREQ_CANON_HOST. + +2000-01-11 Jim Meyering <meyering@lucent.com> + + Sync lib/ directories of sh-utils, and textutils. + + * lib/Makefile.am (libfetish_a_SOURCES): Add diacrit.c, hard-locale.c, + linebuffer.c, md5.c, memcasecmp.c, memcoll.c, obstack.c, safe-read.c + (noinst_HEADERS): Add bumpalloc.h, diacrit.h, hard-locale.h, + linebuffer.h, md5.h, memcasecmp.h, memcoll.h, obstack.h, safe-read.h. + + * lib/Makefile.am: s/su/fetish/ + * src/Makefile.am: s/libsu/libfetish/ + +2000-01-10 Jim Meyering <meyering@lucent.com> + + * Version 2.0d. + + * src/Makefile.am (sleep_LDADD): Add @POW_LIBM@, for systems that use + lib/strtod.c and need -lm to resolve its pow reference. + +2000-01-07 Jim Meyering <meyering@ascend.com> + + * Version 2.0c. + + * tests/basename/Makefile.am (TESTS_ENVIRONMENT): Add `pwd`/ prefix + to exported PATH value (though not strictly necessary, here). + * tests/factor/Makefile.am (TESTS_ENVIRONMENT): Likewise. + * tests/seq/Makefile.am (TESTS_ENVIRONMENT): Likewise. + * tests/stty/Makefile.am (TESTS_ENVIRONMENT): Likewise. + +2000-01-06 Paul Eggert <eggert@set.twinsun.com> + + * tar/lib/getdate.y: Sync tm_diff with the GNU C Library. + (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed. + (tm_diff): Renamed from difftm. All uses changed. + Replace body with that taken from GNU C Library 2.1.3pre1. + (get_date): Prefer tm_gmtoff to tm_diff if available. + +2000-01-05 Paul Eggert <eggert@twinsun.com> + + Minor code cleanup. + * src/sleep.c (clock_get_realtime): Return argument, for convenience. + (main): Use this to simplify main sleep loop. + +2000-01-05 Jim Meyering <meyering@ascend.com> + + Some systems lack a definition of struct timespec (AIX, Ultrix) + Reported by Christian Krackowizer. + * lib/Makefile.am (noinst_HEADERS): Add nanosleep.h. + * lib/nanosleep.h: New file. + * lib/nanosleep.c: Include it. + Don't include time.h or sys/time.h here. + * src/sleep.c: Include it. + (AUTHORS): Add Paul Eggert. + +2000-01-04 Jim Meyering <meyering@ascend.com> + + * lib/nanosleep.c: Include both time.h and sys/time.h only + #if TIME_WITH_SYS_TIME. + +2000-01-03 Paul Eggert <eggert@twinsun.com> + + Fix some porting and rounding problems with the new `sleep' code. + + * configure.in (AC_CHECK_HEADERS): Add fenv.h. + (FESETROUND_LIBM): New macro. + + * lib/xstrtod.c: Add #pragma STDC FENV_ACCESS ON if C99. + * src/sleep.c: Likewise. + + * src/Makefile.am (sleep_LDADD, sleep_DEPENDENCIES): New macros. + + * src/sleep.c (<fenv.h>): Include if available. + (main): Always round floating-point interval calculations upwards, + as we must sleep for at least the specified time. + Do the right thing with NaNs. + + (main): Sleep forever if the time calculations overflow. + (apply_suffix): Don't assert that *s <= TIME_T_MAX. + + (clock_get_realtime): Fix typo; address was improperly taken. + +2000-01-02 Jim Meyering <meyering@ascend.com> + + * Version 2.0b. + + * lib/Makefile.in: Regenerate. + + * Version 2.0a. + +1999-12-26 Jim Meyering <meyering@ascend.com> + + * lib/nanosleep.c (nanosleep): New file. + +1999-12-23 Jim Meyering <meyering@ascend.com> + + * src/sleep.c (USE_CLOCK_GETTIME): Define. + [USE_CLOCK_GETTIME]: Include sys/time.h. + (timespec_subtract): New function. + (clock_get_realtime): New function. + (sighandler): Remove function. + (main): Reimplement again, using nanosleep and clock_gettime. + + * configure.in: Remove check for gettimeofday. + Now it's in m4/jm-macros.m4 + + * man/Makefile.summ: Remove now-unused summaries. + +1999-12-22 Jim Meyering <meyering@ascend.com> + + * lib/getdate.y (get_date): Fix typo in time_t overflow test. + From Michael Stone. + + * tests/date/Test.pm (regress-1): New test for the above. + +1999-12-18 Jim Meyering <meyering@ascend.com> + + * src/who.c (print_entry): Correct do_lookup test so that who + prints whatever host information it has, even without --lookup. + Reported by Bill Peters. + +1999-12-12 Jim Meyering <meyering@ascend.com> + + Move 120+ lines of stat.h-related macros from system.h (not shared) + to sys2.h, which is shared between fileutils, sh-utils, textutils. + * src/system.h: Move them from here... + * src/sys2.h: ... to here. + +1999-11-27 Jim Meyering <meyering@ascend.com> + + Rewrite to allow fractional seconds and to handle SIGCONT. + * src/sleep.c (main): Rewrite. + (sighandler): New function. + (apply_suffix): New function. + (timeval_subtract): New function. + Reported by Raul Miller. + + * src/sleep.c (argdecode): Move definition to precede use. + Remove prototype. + (usage): Add elipses to show that sleep allows more than one argument. + +1999-11-22 Jim Meyering <meyering@ascend.com> + + * lib/Makefile.am (DISTCLEANFILES): Add lstat.c and stat.c. + +1999-11-09 Jim Meyering <meyering@ascend.com> + + * src/expr.c (NEW): Undefine to avoid warning about redefinition. + (NEW): Redefine in terms of XMALLOC. + + * lib/xalloc.h (XMALLOC): Correct misnamed macro parameter name: + s/N_bytes/N_items/. + (XCALLOC): Likewise. + (XREALLOC): Likewise. + +1999-11-05 Jim Meyering <meyering@ascend.com> + + * src/system.h: Use HAVE_STRUCT_STAT_ST_BLOCKS, not deprecated + HAVE_ST_BLOCKS. + + * configure.in: Move some type/header/member tests into + m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) so they are shared by all of + fileutils, textutils, and sh-utils. + +1999-11-01 Jim Meyering <meyering@ascend.com> + + * lib/Makefile.am (MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES). + +1999-10-07 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add Japanese (ja). + +1999-10-04 Jim Meyering <meyering@ascend.com> + + * depcomp: New file, for automake's new dependency support. + * missing: New version, from automake's user-dep-gen-branch. + +1999-09-28 Jim Meyering <meyering@ascend.com> + + * src/system.h: Update from the system.h from fileutils. + Now they're finally almost identical... + +1999-09-09 Jim Meyering <meyering@ascend.com> + + * src/Makefile.am (EXTRAdir): Remove unused variable. + (installed_su): Use `$(DESTDIR)$(bindir)' in place of $(bindir). + (install-exec-local): Likewise. + (.sh): Substitute `$(bindir)' rather than @bindir@. + Based on a patch from Andreas Schwab. + +1999-09-08 Andreas Schwab <schwab@suse.de> + + * tests/nice: Instead of failing, exit with 77 if running niced. + +1999-09-08 Jim Meyering <meyering@ascend.com> + + * src/su.c: Remove declaration of xstrdup. + +1999-09-02 Jim Meyering <meyering@ascend.com> + + * src/expr.c: Remove xstrdup declaration. + * src/date.c: Likewise. + * src/pathchk.c: Likewise. + * src/su.c: Likewise. + +1999-08-29 Jim Meyering <meyering@ascend.com> + + * tests/nice: Use `nice' instead of $nice. + * tests/Makefile.am (TESTS_ENVIRONMENT): Prepend ../src to PATH so + the above works. + + * src/env.c (main): Call exit explicitly to avoid warning from gcc. + * src/nice.c (main): Likewise. + Include "xstrtol.h". + (isinteger): Remove function and prototype. + (main): Use xstrtol in place of atoi. Remove associated FIXME comments. + + * configure.in (AC_YACC): Remove use, now that we require bison. + + * tests/date/Test.pm (test_vector): Add a test for the Risks-reported + problem with syntax like this: Nov 11 1996. + + * lib/getdate.y (get_date): Rename outermost local `probe' to `quarter'. + (get_date): Rename latter local `tm' to probe_tm. + + * lib/getdate.y (relative_time_table): Change `type' of `THIS' from + tMINUTE_UNIT to tUNUMBER. From Urs Thuermann. + * tests/date/Test.pm (test_vector): Add tests for use of `this'. + +1999-08-25 Jim Meyering <meyering@ascend.com> + + * man/Makefile.summ (seq-summary): Define. + * man/Makefile.am (man_MANS): Add seq.1. + Reported by Dirk-Jan Faber. + +1999-08-23 Jim Meyering <meyering@ascend.com> + + * src/pathchk.c (longopts): Restore accidentally-removed entry for + `--portability' long option. + * src/chroot.c (usage): Correct --help message. + * src/hostid.c (usage): Likewise. + * src/hostname.c (usage): Likewise. + * src/logname.c (usage): Likewise. + * src/nice.c (usage): Likewise. + * src/printenv.c (usage): Likewise. + * src/sleep.c (usage): Likewise. + * src/stty.c (usage): Likewise. + Reported by Daniel Bergstrom. + +1999-08-22 Jim Meyering <meyering@ascend.com> + + * src/sys2.h (ATTRIBUTE_NORETURN): Define. + * src/test.c: Use ATTRIBUTE_NORETURN instead of NO_RETURN_ATTRIBUTE. + (NO_RETURN_ATTRIBUTE): Remove definition. + + * src/su.c (run_shell): Declare with gcc's noreturn attribute. + Use an explicit exit(1) rather than doing that through error. + + * src/sys2.h (IF_LINT): Define new macro. + * src/date.c (batch_convert): Use IF_LINT macro instead of #ifdef lint. + * src/pathchk.c (validate_path): Likewise. + +1999-08-21 Jim Meyering <meyering@ascend.com> + + * src/hostid.c (usage): Remove the ` [-v]' from the Usage: line. + Reported by Daniel Bergstrom. + +1999-08-17 Jim Meyering <meyering@ascend.com> + + * tests/stty/input-tty: New file, containing code factored out of + the two test scripts. Mention `at' and `batch' in addition to `rsh'. + * tests/stty/basic-1: Source it. + * tests/stty/row-col-1: Source it. + * tests/stty/Makefile.am (EXTRA_DIST): Add input-tty. + +1999-08-14 Jim Meyering <meyering@ascend.com> + + * Version 2.0. + + * tests/stty/basic-1: Fail-77 if stdin is not a tty. + * tests/stty/row-col-1: Likewise. + Suggestion from Volker Borchert. + +1999-08-07 Jim Meyering <meyering@ascend.com> + + * Version 1.16m. + + * Makefile.maint (po-check): New rule. + (alpha): Make it. + + * po/POTFILES.in: Add the following from lib/: argmatch.c, closeout.c, + error.c, getopt.c, human.c, long-options.c, version-etc.c, xmalloc.c. + Add these from src/: false.c, hostid.c, true.c. + + * lib/getdate.y (OtherTable[]): Use tDAY_UNIT for `tomorrow,' + `yesterday,' `today,' and `now' rather than tMINUTE_UNIT. Of course + with correspondingly smaller numbers for tomorrow and yesterday. + This change does not change the way the code works, since the + grammar rules for the two symbols are analogous. + From Tadayoshi Funaba. + +1999-08-04 Jim Meyering <meyering@ascend.com> + + false and true once again generate --help and --version output + * src/true.c: Honor --help and --version once again, bug ignore + those options when POSIXLY_CORRECT is set. + * src/false.c: Fail even for --help and --version. + * src/Makefile.am (false.c): Generate automatically from true.c. + (BUILT_SOURCES): Add false.c. + * man/Makefile.am (EXTRA_DIST): Remove false.1in and true.1in. + * man/Makefile.summ: Remove the rules added on 1999-07-31. + * man/Makefile.maint: Likewise. + * man/true.1in: Removed. + * man/false.1in: Removed. + + * configure.in: Remove getline-testing code. Now it's in m4/. + +1999-08-01 Jim Meyering <meyering@ascend.com> + + * src/date.c (usage): Correct description of %S; (00..60, not 00..61). + From Ken Pizzini. + +1999-08-01 Paul Eggert <eggert@twinsun.com> + + * configure.in (AC_SYS_LARGEFILE): Renamed from AC_LFS. + +1999-07-31 Jim Meyering <meyering@ascend.com> + + * Version 1.16l. + + false and true are now C programs rather than shell scripts + * src/true.c: New file. + * src/false.c: New file. + * src/true.sh: Removed. + * src/false.sh: Removed. + * src/Makefile.am (bin_PROGRAMS): Add true and false. + (bin_SCRIPTS): Remove true and false. + (EXTRA_DIST): Remove false.sh and true.sh. + * man/true.1in: New file. + * man/false.1in: New file. + * man/Makefile.am (EXTRA_DIST): Remove extra (shadowed) assignment. + (EXTRA_DIST): Add false.1in and true.1in. + * man/Makefile.maint (helpful-men): Define. + * man/Makefile.summ ($(helpless-men)): New manual-generating rules to + accommodate the fact that false and true no longer accept --help. + * doc/sh-utils.texi: Include a couple of sentences from the + truefalse package. + Prompted by Christi Alice Scarborough's truefalse package. + +1999-07-30 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add Brazilian Portuguese (pt_BR). + +1999-07-26 Jim Meyering <meyering@ascend.com> + + * src/tee.c (tee): Convert from open/fds to using fopen/streams for + output, in preparation for addition of new compression option. + +1999-07-21 Jim Meyering <meyering@ascend.com> + + * tests/stty/basic-1 (options): Avoid Solaris' broken /usr/ucb/tr by + removing offending use of tr altogether and removing hyphens with sed. + Reported by Kaveh Ghazi. + +1999-06-01 Volker Borchert <bt@teknon.de> + + * tests/Makefile.am: Make envvar-check depend on check-recursive rather + than on `check' so that its tests are performed before any real tests. + +1999-07-15 Jim Meyering <meyering@ascend.com> + + * src/false.sh: Always exit unsuccessfully, even with + --help and --version. Suggested by Felix Lee. + +1999-07-12 Jim Meyering <meyering@ascend.com> + + * src/sys2.h (mempcpy): Define only if not already defined. + Reported by Collin Rogowski. + +1999-05-27 Volker Borchert <bt@teknon.de> + + * tests/Makefile.am: Qualify .env-warn with $(srcdir)/ prefix. + +1999-05-25 Jim Meyering <meyering@ascend.com> + + * tests/stty/basic-1: Fix non-portable use of `tr' that caused + this test to fail when run with a SysV-style tr. + Based on a patch from Kaveh Ghazi. + +1999-05-21 Jim Meyering <meyering@ascend.com> + + * Version 1.16k. + * configuration fixes: see m4/ChangeLog. + +1999-05-16 Jim Meyering <meyering@ascend.com> + + * Version 1.16j. + + * configure.in (AC_SEARCH_LIBS): Set LIB_CRYPT to $ac_cv_search_crypt, + to go along with the new macro in m4/search-libs.m4. + +1999-05-14 Jim Meyering <meyering@ascend.com> + + * lib/getugroups.c (getugroups): Don't dereference a null pointer when + running `id USER' for some USER that is listed on the RHS in /etc/group. + From Sander van Malssen. + Add some curly braces, use STREQ, reverse the sense of a test + and use `continue' to save a level of nesting. + + * tests/Makefile.am (envvar-check): Renamed from check-local. + (check): Depend on envvar-check so the envvar check is performed + before all other tests. Reported by Volker Borchert. + * tests/.env-warn: Use `%%' place-holder that Makefile.am rule expects, + so CDPATH is mentioned in the message. Reported by Volker Borchert. + +1999-05-10 Jim Meyering <meyering@ascend.com> + + * src/uptime.c (AUTHORS): add Kaveh. + + Expand each `&' character in the gecos field. + * src/pinky.c (count_ampersands): New function. + (create_fullname): New function. + (print_entry): Use create_fullname here. + (print_long_entry): Use it here, too. + From Kaveh Ghazi. + +1999-05-09 Jim Meyering <meyering@ascend.com> + + * lib/regex.c: Update from libc. + + * Version 1.16i. + + * configure.in: Clean up checks for libraries so that we don't add + -lshadow unless necessary. Reported by Joseph S. Myers. + +1999-05-05 Jim Meyering <meyering@ascend.com> + + Add definitions to help read utmpx on systems with utmpname. + * lib/readutmp.h (UTMP_NAME_FUNCTION): Define. + (SET_UTMP_ENT): Likewise. + (GET_UTMP_ENT): Likewise. + (END_UTMP_ENT): Likewise. + * lib/readutmp.c (read_utmp): Use the new definitions. + From Kaveh Ghazi. + + * src/date.c (show_date): Change an automatic aggregate initializer + to be a static one. For SunOS4's cc. From Kaveh Ghazi. + +1999-05-03 Jim Meyering <meyering@ascend.com> + + * configure.in: Remove duplicate use of jm_FUNC_GNU_STRFTIME. + Kaveh Ghazi reported that strftime.o was listed twice in the command + to build libsu.a. + +1999-05-02 Jim Meyering <meyering@ascend.com> + + * Version 1.16h. + + * src/hostname.c (main): Give a better diagnostic when we fail to + set the hostname. + + * man/Makefile.summ (hostid-summary): Use correct description. + Reported by Joseph S. Myers. + + * lib/readutmp.c (read_utmp): Ignore the return value from utmpname. + +1999-04-30 Jim Meyering <meyering@ascend.com> + + * src/dirname.c (main): Manually handle `--', since we no longer + call getopt. Reported by Joseph S. Myers. + * src/basename.c (main): Likewise. + * src/factor.c (main): Likewise. + +1999-04-25 Jim Meyering <meyering@ascend.com> + + * src/seq.c (main): Handle the case in which seq is given no args. + Reported by John Gotts. + (main): Revert last change. + Instead, loop on `optind < argc' to protect use of argv[optind]. + + * lib/human.c <inttypes.h>: Don't include it here. + * lib/human.h <inttypes.h>: Include it here instead. + <config.h>: Include it here too. + Reported by Andreas Jaeger. + + * src/nice.c [NDEBUG]: Remove definition. + Reported by Andreas Jaeger. + +1999-04-24 Jim Meyering <meyering@ascend.com> + + * src/who.c (print_entry): Use `#if', not `#ifdef HAVE_UT_HOST'. + + * Version 1.16g. + + * configure.in: Use AC_CANONICAL_HOST. + +1999-04-20 Jim Meyering <meyering@ascend.com> + + Update factor to use `uintmax_t'. + * src/factor.c <xstrtol.h>: Include this, not xstrtoul.h. + <human.h>: Include. + Use uintmax_t in place of unsigned long. + Use human_readable to convert to strings for printing. + * lib/xstrtoumax.c: New file. + * lib/human.c: New file. + * lib/human.h: New file. + * lib/Makefile.am (libsu_a_SOURCES): Add human.c and xstrtoumax.c. + (noinst_HEADERS): Add human.h. Remove xstrtoul.h. + +1999-04-19 Jim Meyering <meyering@ascend.com> + + * src/seq.c (main): Restore `+' in getopt_long string. Otherwise, + commands like `seq 10 -2 0' wouldn't work. From Andreas Schwab. + * tests/seq/basic: Add tests for that. + +1999-04-17 Jim Meyering <meyering@ascend.com> + + * tests/seq: New directory and basic tests. + * tests/Makefile.am (SUBDIRS): Add seq. + * configure.in (AC_OUTPUT): Add tests/seq/Makefile. + +1999-04-17 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + + * configure.in: Check for localeconv. + + * src/seq.c (decimal_point): New variable. + (main): Set it to locale's decimal point. Fix recognition of + negative number as argument. + (get_width_format): Correctly handle a negative min_val or step + when computing fraction width. Use decimal_point. + +1999-04-08 Jim Meyering <meyering@ascend.com> + + 1999-03-25 James R. Van Zandt <jrv@vanzandt.mv.com> + * doc/sh-utils.texi (Options for date): Document --iso-8601 + * src/date.c: Accept new option: --iso-8601. + * lib/Makefile.am (libsu_a_SOURCES): Add argmatch.c and quotearg.c. + (noinst_HEADERS): Add argmatch.h and quotearg.h. + * lib/argmatch.c: New file. + * lib/argmatch.h: New file. + * lib/quotearg.c: New file. + * lib/quotearg.h: New file. + +1999-03-30 Jim Meyering <meyering@ascend.com> + + * src/sys2.h: Include "closeout.h" and "version-etc.h" + + * src/*.c (PROGRAM_NAME, AUTHORS): Define and use. + + * src/date.c: No longer include long-options.h. + [long_options]: Add entries for --help and --version. + Remove parse_long_options call. + (main) [getopt switch]: Add a case for each of --help and --version. + * src/env.c: Likewise. + * src/id.c: Likewise. + * src/pinky.c: Likewise. + * src/seq.c: Likewise. + * src/su.c: Likewise. + * src/sys2.h: Likewise. + * src/tee.c: Likewise. + * src/tty.c: Likewise. + * src/uname.c: Likewise. + * src/who.c: Likewise. + +1999-03-29 Jim Meyering <meyering@ascend.com> + + * configure.in (GNU_PACKAGE): Remove related code -- now it's in + the catch-all for shared autoconf code, m4/jm-macros.m4. + (jm_CHECK_ALL_TYPES): Remove explicit AC_TYPE_* macros and use + this instead. + +1999-03-28 Jim Meyering <meyering@ascend.com> + + * src/test.c (PROGRAM_NAME): Rename from COMMAND_NAME. + +1999-03-28 Paul Eggert <eggert@twinsun.com> + + * lib/getdate.y (get_date): Reuse tm_isdst of first localtime + call; this is an improvement on a bug fix suggested by + martin@dresden.nacamar.de. Do not assume that localtime and + gmtime return non-null. + +1999-03-27 Jim Meyering <meyering@ascend.com> + + * src/false.sh (usage): Change `[OPTION]...' to `[OPTION]' to show + that only one of --help or --version is recognized at a time. + Reported by Meelis Roos. + * src/true.sh: Likewise. + + * src/id.c (print_user): Use uid_t instead of int. + (print_group): Use gid_t instead of int. + From John Bley. + +1999-03-26 Jim Meyering <meyering@ascend.com> + + * lib/Makefile.am (libfu_a_SOURCES): Add version-etc.c. + (noinst_HEADERS): Add version-etc.h. + +1999-03-20 Jim Meyering <meyering@ascend.com> + + * src/nohup.sh: Don't modify PATH just to get GNU nice. Instead, + try to find an absolute path for GNU nice. From Bruno Haible. + +1999-03-19 Jim Meyering <meyering@ascend.com> + + * configure.in: Use new macro, jm_WINSIZE_IN_PTEM, instead of + open-coding it. + +1999-03-17 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add Italian (it) and Slovak (sk). + +1999-03-13 Jim Meyering <meyering@ascend.com> + + * lib/basename.c (base_name): If NAME is all slashes, return `/' (in + conformance with the single unix spec). Reported by Peter Moulder. + +1999-03-10 Jim Meyering <meyering@ascend.com> + + * src/uptime.c: Declare getloadavg so I can build with -Werror. + + * tests/stty/basic-1: Skip failing tests: parenb, -parenb, -cread. + + * lib/canon-host.c (canon_host): Don't use he->h_addr directly. + Based on a patch from Savochkin Andrey Vladimirovich. + +1999-03-09 Jim Meyering <meyering@ascend.com> + + Running `id USER' doesn't report any groups if there is no entry + for USER in /etc/group. Always include the one from /etc/passwd. + * src/id.c (xgetgroups): Take new parameter, gid, and pass + it to getugroups. + (print_group_list): Call getpwuid and adjust calls to xgetgroups + to include new parameter. + * lib/getugroups.c (getugroups): Take new parameter, gid. + Add gid to the list of groups. + From Ulrich Drepper. + * lib/getgroups.c (getgroups): Protoize. + +1999-03-08 Jim Meyering <meyering@ascend.com> + + * tests/basename: New directory and tests. + * tests/Makefile.am (SUBDIRS): Add basename. + * configure.in (AC_OUTPUT): Add tests/basename/Makefile. + +1999-03-06 Jim Meyering <meyering@ascend.com> + + * src/date.c (batch_convert): Use a `%s' format in error call, + in case the argument string contains a `%'. + + * man/Makefile.am (man_MANS): Add pinky.1. + * man/Makefile.summ (pinky-summary): Define. + + * src/date.c: Include long-options.h. + [long_options]: Remove the "help" and "version" entries. + Remove declarations of show_help and show_version. + (main): Use parse_long_options, including author name(s). + Remove the show_version and show_help blocks. + * src/env.c: Likewise. + * src/id.c: Likewise. + * src/logname.c: Likewise. + * src/pathchk.c: Likewise. + * src/pinky.c: Likewise. + * src/printenv.c: Likewise. + * src/seq.c: Likewise. + * src/sleep.c: Likewise. + * src/su.c: Likewise. + * src/tee.c: Likewise. + * src/tty.c: Likewise. + * src/uname.c: Likewise. + * src/uptime.c: Likewise. + * src/users.c: Likewise. + * src/who.c: Likewise. + * src/whoami.c: Likewise. + +1999-03-04 Jim Meyering <meyering@ascend.com> + + * src/basename.c (main): Include author name argument in call to + parse_long_options. + * src/chroot.c: Likewise. + * src/dirname.c: Likewise. + * src/echo.c: Likewise. + * src/expr.c: Likewise. + * src/factor.c: Likewise. + * src/hostid.c: Likewise. + * src/hostname.c: Likewise. + * src/nice.c: Likewise. + * src/printf.c: Likewise. + * src/pwd.c: Likewise. + * src/stty.c: Likewise. + * src/test.c: Likewise. + * src/yes.c: Likewise. + +1999-03-02 Jim Meyering <meyering@ascend.com> + + * lib/readutmp.c (read_utmp) [HAVE_UTMPNAME]: Rewrite. + +1999-02-15 Jim Meyering <meyering@ascend.com> + + * src/stty.c (main): #ifdef-out unreachable code. + + * src/pinky.c (usage): Add a one-line description. + Suggestion from Karl Berry. + +1999-02-08 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add Czech (cs). + +1999-02-07 Jim Meyering <meyering@ascend.com> + + * tests/stty/basic-1: Run all tests even if some fail. + Don't use trap. + + * tests/stty/basic-1: Use `stty', not $STTY. + Fix typo in VERBOSE code: s/\$RM/stty/. + * tests/stty/row-col-1: Likewise. + + * tests/stty/Makefile.am (TESTS_ENVIRONMENT): Set PATH, not STTY. + + Include stdio.h before defining `_unlocked' macros. + * src/pinky.c: Include stdio.h. + * src/uptime.c: Likewise. + * src/users.c: Likewise. + * src/who.c: Likewise. + * lib/readutmp.c: Include stdio.h here... + * lib/readutmp.h: ...not here. + From Ulrich Drepper. + + * Version 1.16f. + + * Makefile.maint (my-distcheck): Don't depend on dist, now that this + is hooked up to the distcheck rule. + * Makefile.am (distcheck-hook): New target and rule -- link to shared + rule, my-distcheck, in Makefile.maint. + + * configure.in (jm_FUNC_GETGROUPS): Move the test into a new file, + group-member.m4, and just use this new macro. + +1999-01-31 Jim Meyering <meyering@ascend.com> + + * doc/sh-utils.texi: Wrap the @top node in @ifnottex instead of + @ifinfo so `makeinfo --html ...' works. From Karl Berry. + + * src/chroot.c (main): Call chdir ("/") after chroot. + Suggestion from James Youngman. + + * src/uptime.c (print_uptime): Use the C numeric locale for sscanf + of /proc/uptime data, then restore. + * lib/getloadavg.c: Include locale.h. + [!HAVE_SETLOCALE]: Define-away setlocale. + (getloadavg): Ensure the sscanf of /proc/getloadavg data uses the + `C' numeric locale. Restore afterwards. + Based on a suggestion from Thomas Quinot. + + * lib/strtod.c: Protoize. + +1999-01-30 Jim Meyering <meyering@ascend.com> + + * acconfig.h: Remove lots of now-unnecessary #undefs. + + * configure.in: Require autoconf 2.13. + + * doc/Makefile.am (DISTCLEANFILES): Arrange to remove sh-utils.fl. + + * configure.in (ALL_LINGUAS): Add Greek (el). + * po/el.po: New file. + +1999-01-25 Jim Meyering <meyering@ascend.com> + + * src/date.c (usage): Remove static attribute. + Move function be the first in the file. + * src/env.c: Likewise. + * src/id.c: Likewise. + * src/nice.c: Likewise. + * src/pathchk.c: Likewise. + * src/tty.c: Likewise. + * src/uname.c: Likewise. + + * src/*.c (usage): Remove static attribute. + +1999-01-14 Jim Meyering <meyering@ascend.com> + + * src/date.c: Include closeout.h. + (main): Use close_stdout_status. + * src/printenv.c: Likewise. + * src/tty.c: Likewise. + + * src/hostid.c: Include closeout.h. + (main): Use close_stdout. + * src/tee.c: Likewise. + +1999-01-10 Jim Meyering <meyering@ascend.com> + + * src/Makefile.am (pinky_LDADD, pinky_DEPENDENCIES, who_LDADD, + who_DEPENDENCIES): Remove definitions. + + * lib/Makefile.am (BUILT_SOURCES): Add lstat.c and stat.c. + (lstat.c, stat.c): New rules. + + * lib/canon-host.c (main) [TEST_CANON_HOST]: Add a simple test driver. + + * configure.in: Require autoconf-2.13. + Use new AC_SEARCH_LIBS to see if we need nsl or inet libraries + to resolve gethostbyname. + +1998-12-22 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add chinese (zh). + +1998-12-13 Jim Meyering <meyering@ascend.com> + + * lib/putenv.c: Don't include stdlib.h and declare malloc and free. + This works around Solaris 5.7's conflicting prototype. + Reported by Karl Berry. + + * lib/Makefile.am (lstat.c): Add rule to generate this from xstat.in. + (stat.c): Likewise. + (EXTRA_DIST): Add xstat.in. + * lib/stat.c: Remove file. + * lib/lstat.c: Remove file. + * lib/xstat.in (xstat@): New file. + +1998-12-10 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + + * src/date.c (main): Arrange to exit unsuccessfully when stime fails. + +1998-12-07 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add Russian (ru). + +1998-10-31 Jim Meyering <meyering@ascend.com> + + * tests/Makefile.am (EXTRA_DIST): Add Fetish.pm. + * tests/Fetish.pm: New file. + + * tests/factor/Makefile.am: Rewrite to use new testing framework. + * tests/factor/Test.pm: Remove file. + * tests/factor/factor-tests: Remove file. + * tests/factor/basic: New file (rewrite of Test.pm). + + * acconfig.h (stat): New #undef. + +1998-10-03 Jim Meyering <meyering@ascend.com> + + * man/Makefile.am: Switch to using help2man. + (EXTRA_DIST): Add Makefile.summ. + + * man/help2man: Invoke program with --manhelp option only if + --name=STRING not specified. Otherwise, this would fail with `yes'. + * man/Makefile.summ: New file. + * man/Makefile.maint: Include it. + * man/help2man: New file. + * man/GNUmakefile: New file. + * man/Makefile.maint: New file. + * man/*.x: New files. + * man/*.1: Remove files. + + * src/Makefile.am (install-exec-local): Change comments to use `##' + to avoid automake warning. + + * lib/Makefile.am (noinst_HEADERS): s/posixtm.c/posixtm.h/ + (libsu_a_SOURCES): s/posixtm.y/posixtm.y/ + (libsu_a_SOURCES): Remove getdate.c. Add fnmatch.h. + + * src/date.c (main): Update to use new version of posixtime. + * lib/posixtm.c: New file. + * lib/posixtm.h: New file. + * lib/posixtm.y: Remove file. + + * lib/fnmatch.c: New file. (unused) + * lib/fnmatch.h: New file. (unused) + +1998-09-27 Jim Meyering <meyering@ascend.com> + + * src/seq.c (main): Decrement optind when we find an `option' that + looks like -N. Reported by Clark Morgan. + +1998-09-26 Jim Meyering <meyering@ascend.com> + + * lib/xstrtol.c (__xstrtol) [STRING_TO_UNSIGNED]: Return + LONGINT_INVALID for strings that begin with `-'. + + * tests/factor/Test.pm: Add a test for negative argument. + Tweak postprocessing framework. + +1998-09-19 Jim Meyering <meyering@ascend.com> + + * src/stty.c (main): Revamp option processing, again. + stty couldn't parse some of its options. + * tests/stty/basic-1: New test. + * tests/stty/Makefile.am (TESTS): Add basic-1. + +1998-08-29 Jim Meyering <meyering@ascend.com> + + * src/su.c (longopts): Use corresponding short-option character + in place of `1', and `NULL' in place of pointer in initialization. + +1998-08-11 Jim Meyering <meyering@ascend.com> + + * src/uptime.c (usage): Correct description. Reported by John Murphy. + +1998-07-16 Jim Meyering <meyering@ascend.com> + + * lib/Makefile.am (noinst_HEADERS): Add lchown.h. + * lib/lchown.h: New file, just to define ENOSYS on systems that lack it. + * lib/lchown.c: Include lchown.h. + +1998-07-15 Jim Meyering <meyering@ascend.com> + + * src/seq.c (check_format): Add `5' to the list of digits. + Reported by Donni Erpel. + +1998-07-12 Jim Meyering <meyering@ascend.com> + + * tests/test: New directory and tests. + * tests/Makefile.am (SUBDIRS): Add test. + * configure.in (AC_OUTPUT): Add tests/test/Makefile. + +1998-07-04 Jim Meyering <meyering@ascend.com> + + * lib/Makefile.am (libsu_a_SOURCES): Remove regex.c, now that it's + automatically discovered by automake. + (noinst_HEADERS): Remove unused safe-read.h. + + * src/Makefile.am (CLEANFILES): Put $(SCRIPTS) here rather than in + DISTCLEANFILES. + (CLEANFILES): Add su, since we build it unconditionally, yet it's + never put in @OPTIONAL_BIN_PROGS@. + +1998-06-29 Jim Meyering <meyering@ascend.com> + + * src/uptime.c: Include system.h only after error.h and readutmp.h + so we don't get redefinition warnings about getc, etc. + * src/who.c: Likewise. + * src/users.c: Likewise. + +1998-06-28 Jim Meyering <meyering@ascend.com> + + * src/sys2.h: Add macro definitions for GNU libc *_unlocked wrappers. + +1998-06-06 Jim Meyering <meyering@ascend.com> + + * src/test.c (unary_operator): Fail if the operand to -t is not valid. + (posixtest): Treat `test -t' the same as `test -t 1'. + +1998-05-26 Jim Meyering <meyering@ascend.com> + + * src/test.c (two_arguments): Don't test argv[pos][2] if it's + past end of string. + +1998-05-25 Jim Meyering <meyering@ascend.com> + + * configure.in (_GNU_SOURCE): AC_DEFINE it here. + * acconfig.h (_GNU_SOURCE): Remove definition from @TOP@ section. + [!_GNU_SOURCE]: Add #undef instead. + +1998-05-16 Jim Meyering <meyering@ascend.com> + + * lib/readutmp.c (read_utmp): Add variant for systems that have + the utmpname function. + Ansideclify. + * configure.in: Check for utmpname. + + * configure.in (jm_MACROS): New wrapper macro. + Remove uses of most jm_* macros. + + * acconfig.h (chown): Add undef. + (D_INO_IN_DIRENT): Likewise. + (D_TYPE_IN_DIRENT): Likewise. + (ssize_t): Likewise. + + * lib/Makefile.am (EXTRA_DIST): Remove. Automake groks the `LIBOBJS=' + lines from the m4/*.m4 macros, so the hack of including some + custom-replaced C source file names here is no longer needed. + +1998-05-03 Jim Meyering <meyering@ascend.com> + + * po/: Update from gettext-0.10.35. + * intl/: Likewise. + * configure.in: Remove use of AC_LINK_FILES. + (AC_OUTPUT): Remove po/Makefile-generating sed command. + +1998-05-02 Jim Meyering <meyering@ascend.com> + + * src/seq.c (check_format): Use ISDIGIT, not isdigit. + +1998-04-26 Jim Meyering <meyering@ascend.com> + + * configure.in: Use jm_ASSERT. + * acconfig.h: Add NDEBUG. + +1998-04-13 Jim Meyering <meyering@eng.ascend.com> + + * lib/Makefile.am (noinst_HEADERS): Add safe-read.h. + +1998-04-09 Jim Meyering <meyering@ascend.com> + + * configure.in (AM_MAINTAINER_MODE): Remove it. + No longer use AC_PATH_PROG to check for perl. + (jm_PERL): Use this instead. + +1998-04-04 Jim Meyering <meyering@ascend.com> + + * lib/readutmp.h (PARAMS): Define. + + * tests/Makefile.am (SUBDIRS): Add stty. + * tests/stty/row-col-1: New file. + * tests/stty: New directory. + * configure.in (AC_OUTPUT): Add tests/stty/Makefile. + + * src/stty.c: Use STREQ in place of strcmp everywhere. + (valid_options): Indent. + Parenthesize assignment in while expr. + (main): s/case 'f':/case 'F':/ + Tweak error messages to make them consistent. + Remove #if-0'd block. + Move dcl of `fdflags' into scope where it's used. + Remove dcl of unused `cp'. + Use "%s", not device_name, as the format string, in case the + latter contains `%'. + + [1998-03-31 Theodore Ts'o <tytso@rsts-11.mit.edu>] + * src/stty.c (valid_options): New function. + (main): Fix broken options parsing that worked only + by serendipity (getopt_long_only already parsed short options; no + need to parse them again manually!). Add support for the --file + option, which allows the user to specify the device whose line + settings are to be set. This is necessary because POSIX ttys will + block waiting for carrier detect to go high if CLOCAL is not set, + unless the device is opened with the O_NONBLOCK flag. + Unfortunately, the shell doesn't use this flag, so users lose. + Opening the device in stty is the easist way to fix this. + (speeds): Add support for 230400 and 460800 line speeds, which are + supported by Linux. + + * acconfig.h (uintmax_t): Add #undef. + + * configure.in (jm_AC_HEADER_INTTYPES_H): Use it. + (jm_AC_TYPE_UINTMAX_T): Use it. + (jm_PREREQ): Use it. + + * src/system.h: Sync with system.c from fileutils. + + * Makefile.am (ACLOCAL_AMFLAGS): Define this, so automake/aclocal + know about the m4/ subdirectory. + * Makefile.maint (aclocal-files): Remove now-unnecessary (with + automake-1.2h and the above change) aclocal-related rules and includes. + +1998-04-03 Jim Meyering <meyering@eng.ascend.com> + + * lib/closeout.c: New file. + * lib/closeout.h: New file. + * lib/Makefile.am (libsu_a_SOURCES): Add closeout.c. + (noinst_HEADERS): Add closeout.h. + +1998-03-27 Jim Meyering <meyering@eng.ascend.com> + + * Makefile.am (AUTOMAKE_OPTIONS): Require 1.2h. + +1998-03-26 Jim Meyering <meyering@eng.ascend.com> + + * src/date.c (batch_convert): Remove spurious space in error message. + Reported by Karl Berry. + +1998-03-13 Jim Meyering <meyering@eng.ascend.com> + + * lib/getugroups.c (getugroups): Don't add a group number if it + would be a duplicate. From Ulrich Drepper. + +1998-02-22 Jim Meyering <meyering@eng.ascend.com> + + * tests/Makefile.am (EXTRA_DIST): Add mk-script. + * tests/Makefile.am.in (EXTRA_DIST): Remove mk-script.pl. + (mk_script): Set to ../mk-script. + (x-tests): Use `$(PERL) -w -- $(mk_script)', not ./mk-script. + Remove @MAINT@ cruft. + (Makefile.am): Likewise. + Remove @MAINT@ cruft. Now `missing' will explain the failure + when people don't have Perl yet modify a file whose rebuilding + would lead to the use of Perl. + + * src/Makefile.am (pinky_LDADD): Explicitly add @GETHOSTBYNAME_LIB@. + (who_LDADD): Likewise. + (pinky_DEPENDENCIES): Set to $(LDADD) + (who_DEPENDENCIES): Likewise. + +1998-02-20 Jim Meyering <meyering@eng.ascend.com> + + * lib/getdate.h: Removed. Could cause confusion with an + automake-generated `.y.h' rule. + * lib/get-date.h: Renamed from getdate.h. + * lib/getdate.y: s/getdate.h/get-date.h/ + * lib/Makefile.am (noinst_HEADERS): s/getdate.h/get-date.h/ + * src/date.c: s/getdate.h/get-date.h/ + +1998-02-16 Jim Meyering <meyering@eng.ascend.com> + + * configure.in (jm_FUNC_LSTAT): Use it. + (jm_FUNC_STAT): Use it. + * acconfig.h: Add lstat. + * lib/Makefile.am (EXTRA_DIST): Add lstat.c and stat.c. + +1998-02-06 Jim Meyering <meyering@eng.ascend.com> + + * tests/nice: Fail immediately if this test is run with `nice' + level different from zero. Reported by Philippe De Muyter. + +1998-02-03 Philippe De Muyter <phdm@macqel.be> + + * src/id.c (xgetgroups): Guard function defn with #if HAVE_GETGROUPS. + + * lib/putenv.c (sys/types.h): Include to get size_t on some systems. + (NULL): Define if needed. + +1998-01-31 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AC_LFS): Use it. + +1998-01-25 Jim Meyering <meyering@na-net.ornl.gov> + + * Makefile.maint: New file. + * Makefile.am: Move rules common to textutils, fileutils, sh-utils + into Makefile.maint. + Include Makefile.maint. + (EXTRA_DIST): Add Makefile.maint. + +1998-01-03 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/Makefile.am (AUTOMAKE_OPTIONS): Define to ../src/ansi2knr. + + * configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so + those files will be built via the ANSI2KNR-filtering rules if necessary. + +1997-12-25 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in: Remove AC_DEFINE of _GNU_SOURCE. + * acconfig.h (_GNU_SOURCE): Define if not already defined. + Put this code in @TOP@ section. + (_GNU_SOURCE): Remove #undef. + +1997-12-22 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in: AC_DEFINE _GNU_SOURCE. + * acconfig.h: Add _GNU_SOURCE. + +1997-12-21 Jim Meyering <meyering@na-net.ornl.gov> + + * src/date.c: s/__P/PARAMS/ + * src/env.c: Likewise. + * src/expr.c: Likewise. + * src/id.c: Likewise. + * src/nice.c: Likewise. + * src/pathchk.c: Likewise. + * src/seq.c: Likewise. + * src/sleep.c: Likewise. + * src/stty.c: Likewise. + * src/tee.c: Likewise. + * src/test.c: Likewise. + * src/tty.c: Likewise. + * src/uname.c: Likewise. + + * src/system.h: Merge in several things from fileutils' version of + this file. + + * src/factor.c: Don't include limits.h. + (UINT_MAX): Don't define. + (INT_MAX): Don't define. + These are all done in system.h now. + * src/hostname.c: Don't include limits.h. + * src/id.c: Don't include limits.h or sys/param.h. + * src/pathchk.c: Don't include limits.h. + * src/su.c: Likewise. + +1997-12-10 Jim Meyering <meyering@na-net.ornl.gov> + + * src/su.c (main): Make sure pw->pw_shell is non-NULL before trying + to strdup it. + Patch from Dick Streefland. + +1997-11-17 Paul Eggert <eggert@twinsun.com> + + * lib/mktime.c, lib/strftime.c (_REENTRANT): #define, + as some hosts need this to declare localtime_r properly. + +1997-11-15 Jim Meyering <meyering@na-net.ornl.gov> + + * intl/Makefile.in (distclean): Don't remove libintl.h here. + * Makefile.am (DISTCLEANFILES): Remove it here instead. + + * m4/Makefile.am (EXTRA_DIST): Add mktime.m4. + * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not the one from automake. + + * m4/strftime.m4: Check for %F format. + +1997-11-14 Jim Meyering <meyering@na-net.ornl.gov> + + * m4/mktime.m4: Temporarily add a copy of this file from the automake + distribution. + (jm_AM_FUNC_MKTIME): Renamed from AM_FUNC_MKTIME. + (irix_6_4_bug): New function based on code from Ariel Faigon. + (bigtime_test): New function from Paul Eggert to detect SunOS4.1.4's + infinite looping mktime. + Portability tweaks from Paul Eggert. + +1997-11-13 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/mktime.c: Update from FSF. + * lib/strftime.c: Update from FSF. + * m4/strftime.m4: Check for POSIX.2's %f format spec. + +1997-11-12 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AC_CHECK_FUNCS): Add mempcpy. + * src/system.h [!HAVE_MEMPCPY] (mempcpy): Define. + * src/date.c (batch_convert): Use mempcpy rather than stpcpy. + +1997-11-09 Jim Meyering <meyering@na-net.ornl.gov> + + * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Check for localtime_r. + * m4/strftime.m4 (jm_STRFTIME_PREREQS): Check for localtime_r. + (jm_FUNC_GNU_STRFTIME): Use new macro. + (jm_FUNC_STRFTIME): New macro. Likewise. + Reported by Noel Cragg. + +1997-11-02 Jim Meyering <meyering@na-net.ornl.gov> + + * acconfig.h: Add malloc and realloc. + +1997-10-25 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/xmalloc.c (xalloc_fail): Renamed from fixup_null_alloc. + (xcalloc): #ifdef-out unused function. + (xrealloc): Remove code to work around deficient versions of realloc. + Now we have an autoconf-enabled replacement version. + (xmalloc): Remove code to work around deficient versions of malloc. + Now we have an autoconf-enabled replacement version. + + * configure.in (jm_FUNC_MALLOC): Use it. + (jm_FUNC_REALLOC): Use it. + * lib/Makefile.am (noinst_HEADERS): Add xalloc.h. + (EXTRA_DIST): Add realloc.c. + (EXTRA_DIST): Add malloc.c. + + * lib/malloc.c: New file. + * m4/malloc.m4: New file. + * m4/Makefile.am (EXTRA_DIST): Add malloc.m4. + + * lib/xalloc.h: New file. + * lib/xmalloc.c: Updated from textutils. + + * src/*.c: Remove old-style xmalloc and xrealloc decls. + * src/system.h: Include xalloc.h. + Remove dcls of xmalloc, xcalloc and xrealloc. + +1997-10-23 Jim Meyering <meyering@na-net.ornl.gov> + + * Makefile.am (aclocal-files): Also depend on m4/Makefile.am. + + * src/system.h [!HAVE_DECLARATION_FREE]: Declare free. + [!HAVE_DECLARATION_MALLOC]: Declare malloc. + [!HAVE_DECLARATION_REALLOC]: Declare realloc. + [!HAVE_DECLARATION_STPCPY]: Declare stpcpy. + [!HAVE_DECLARATION_STRSTR]: Declare strstr. + [STREQ]: Define. + * src/date.c: Remove stpcpy decl. + * src/expr.c: Remove strstr decl. + * src/test.c [STREQ]: Undef then redefine. + On some systems, strstr and stpcpy are macros, so declaring them + unconditionally gets syntax errors. + Reported by Mark M. Kettenis. + + * configure.in: Use jm_CHECK_DECLS. + * m4/Makefile.am (EXTRA_DIST): Add decl.m4 and check-decl.m4. + +1997-10-22 Jim Meyering <meyering@na-net.ornl.gov> + + * m4/decl.m4: New file. + * m4/check-decl.m4: New file. New macro, jm_CHECK_DECLS. + +1997-10-07 Jim Meyering <meyering@na-net.ornl.gov> + + * src/*.c: Update bug-reporting address. + * src/*.sh: Update bug-reporting address. + +1997-10-02 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/date/Test.pm (test_vector): Remove _%Z from test `9'. + The timezone string was too system dependent. + +1997-09-25 Jim Meyering <meyering@na-net.ornl.gov> + + * src/echo.c: Make echo conform to POSIX. By default, don't + interpret backslash escape sequences. + [V9_DEFAULT]: Don't #define. + (usage): Document -e option. + (main): Recognize options iff POSIXLY_CORRECT is not set. + From Bruno Haible. + +1997-09-19 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/getusershell.c (IN_CTYPE_DOMAIN): Define. + (ISSPACE): Define. + (readname): Use ISSPACE, not isspace. + * lib/strtod.c (IN_CTYPE_DOMAIN): Define. + (ISSPACE): Define. + (ISDIGIT): Define. + (TOLOWER): Define. + Use upper-case versions of ctype macros. + * lib/strtol.c (IN_CTYPE_DOMAIN): Define. + (ISSPACE): Guard with IN_CTYPE_DOMAIN. + (ISDIGIT): Guard with IN_CTYPE_DOMAIN. + (TOUPPER): Guard with IN_CTYPE_DOMAIN. + From Bruno Haible. + +1997-09-17 Jim Meyering <meyering@na-net.ornl.gov> + + * src/yes.c (main): Call parse_long_options only if POSIXLY_CORRECT + is *not* set. Reported by Frank T Lofaro. + + * src/hostid.c: New file. + * src/Makefile.am (EXTRA_PROGRAMS): Add hostid. + * configure.in (OPTIONAL_BIN_PROGS): Check for gethostid, + and if found add hostid to the list. + * man/hostid.1: New file. + * man/Makefile.am (man_MANS): Add hostid.1. + +1997-08-31 Jim Meyering <meyering@na-net.ornl.gov> + + * src/who.c (main): New option --lookup (-l). + (print_entry): Only call canon_host if user explicitly asks for it. + (usage): Describe --lookup. + From Galen Hazelwood. + + * configure.in (ALL_LINGUAS): Add Spanish (es). + +1997-08-02 Jim Meyering <meyering@na-net.ornl.gov> + + * src/Makefile.am (bin_PROGRAMS): Add pinky. + + * src/pinky.c: New file. From Kaveh Ghazi. + * po/POTFILES.in: Add pinky.c. + +1997-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * src/date.c (show_date): Don't hang if strftime produces an empty + string. + +1997-07-16 Jim Meyering <meyering@na-net.ornl.gov> + + * src/groups.sh: Exit with status from subsidiary `id' command. + Don't print `$name : $groups' if id fails. + Reported by Austin Donnelly. + +1997-07-15 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/getloadavg.c: Merge in changes from FSF. + +1997-07-13 Jim Meyering <meyering@na-net.ornl.gov> + + * doc/Makefile.am (EXTRA_DIST): Remove explicit mention of texinfo.texi. + Now, automake includes it automatically. + +1997-07-12 Jim Meyering <meyering@na-net.ornl.gov> + + * po/Makefile.in.in (DISTFILES): Remove ChangeLog. + * po/POTFILES.in: Add who.c, users.c, uptime.c. + Remove who-users.c. + + * src/who.c: Rename lots of `this' locals. + Make some parameters `const'. + (who): Update read_utmp caller. + (search_entries): Take additional param: utmp_buf. + Update read_utmp caller. + (who_am_i): Update read_utmp caller. + + * src/users.c (users): Update read_utmp caller. + * src/uptime.c (uptime): Update read_utmp caller. + + * lib/readutmp.h (PARAMS): Update prototype. + (utmp_contents): Remove dcl. + + * lib/readutmp.c (read_utmp): Take new params: count and buffer. + Return boolean indicating failure. + Now, caller must give diagnostic upon failure. + +1997-07-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * lib/readutmp.c, lib/readutmp.h: New files implementing shared + functionality from src/who-users.c. + + * lib/Makefile.am (libsu_a_SOURCES): Add readutmp.c. + (noinst_HEADERS): Add readutmp.h. + + * src/who.c, src/users.c, src/uptime.c: Split these so they no + longer derive from the template source file who-users.c. Use + shared functionality from lib/readutmp.c instead. + + * src/Makefile.am: Remove rules to build who.c, users.c and + uptime.c from template source file who-users.c. Handle these + files as stand-alone sources. + + * src/who-users.c: Remove file. It is no longer used. + +1997-07-12 Jim Meyering <meyering@na-net.ornl.gov> + + * src/date.c (MAYBE_SET_TZ_UTC0): New macro. + (set_tz): New function. + (batch_convert): If necessary, save the initial value of TZ and + for each date in the file, restore it before each call to get_date, + then set it to UTC0 before each show_date call. + (main): Don't set TZ before calling get_date. + Set TZ after get_date call and before show_date call. + Reported by Matthew Braun. + * tests/date/Test.pm: Add new tests for this bug. + Add tests based on new examples in documentation. + + * stpcpy.c: New file. + * configure.in (AC_REPLACE_FUNCS): Add stpcpy.c + +1997-07-05 Jim Meyering <meyering@na-net.ornl.gov> + + * src/Makefile.am (EXTRA_PROGRAMS): Add su here. + (bin_PROGRAMS): Remove su here. + (install-exec-local): Rewrite rule so that su is installed only if + it can be made setuid root. Before it was always installed and then + removed if it could *not* be made setuid root. That had the potential + undesirable side effect of removing (and not replacing) a working + version of su. + (all_local): New target. Dependend on su. Required now that su is + no longer in bin_PROGRAMS. + (uninstall-local): Remove su only if it comes from the GNU sh-utils. + + * src/su.c: Redefine/undef getusershell around inclusion of <unistd.h> + (via system.h) so Cray's int-returning prototype doesn't conflict + with our char*-returning one. Reported by Johan Danielsson. + +1997-07-04 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/Makefile.am.in (Makefile.am): Clean up and enable rule to + generate tests/*/Makefile.am. + + * configure.in (ALL_LINGUAS): Add Norwegian (no). + + * tests/date/mk-script.pl (validate): Create test files in $(srcdir), + not in build dir. + * tests/Makefile.am.in ($x-tests): Create $x-tests in $(srcdir), + not in build dir. + * Makefile.am (aclocal-files): Look in source directory, not build dir. + From Andreas Schwab. + +1997-07-03 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/date/Test.pm (test_vector): Remove bogus TZ=GMT environment + setting. + +Wed Jul 2 11:05:09 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/printf.c (STRTOX): Convert function header in macro definition + to K&R-style. Otherwise, ansi2knr would fail to convert the function + definitions to K&R for old style compilers. From Kaveh Ghazi. + +Tue Jul 1 06:28:00 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/putenv.c [putenv]: Undefine before including system headers. + Otherwise, the declaration of *rpl_putenv* conflicts with the system + prototype on at least Irix5.3. From Marcus Daniels. + +Sun Jun 29 07:18:25 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/putenv.c (rpl_putenv): Renamed from putenv. + [putenv]: Remove definition and subsequent #undef hack that avoided + conflicts with system prototypes. That didn't let the definition of + putenv to rpl_putenv from config.h get through. + Suggestion from Marcus Daniels. + + * configure.in (LIB_CRYPT): AC_SUBST new variable. Use it to add + crypt-related library (-lufc or -lcrypt) only for the program that + needs it (su), rather than to all executables. + * src/Makefile.am (su_LDADD): Set to `$(LDADD) @LIB_CRYPT@'. + Suggestion from Ulrich Drepper. + + * tests/date/mk-script.pl: Set and export LANGUAGE, LC_ALL, and LANG + so tests get english strings. From Ulrich Drepper. + +Mon Jun 16 11:06:57 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * m4/putenv.m4 (jm_FUNC_PUTENV): New file and macro. + * configure.in (jm_FUNC_PUTENV): Use it. + * acconfig.h (putenv): Add #undef. + * lib/Makefile.am (EXTRA_DIST): Add putenv.c. + (libsu_a_SOURCES): Remove putenv.c. + * m4/Makefile.am (EXTRA_DIST): Add putenv.m4. + +Thu Jun 12 06:48:23 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/expr.c (eval6): Accept new unary operator, quote. + From Karl Heuer. + +Wed Jun 11 15:13:56 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/expr.c (docolon): Test (re_buffer.re_nsub > 0) rather than + searching for `\(' to determine whether to return 0 or the empty + string. Before it would improperly return '' if the pattern + contained a substring like this: `\\('. From Karl Heuer. + For example, running expr c : '\\(' should print `0'. + +Sun Jun 1 12:00:10 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/getdate.y (OtherTable): Interpret `next' as 1 (not 2) units. + Patch from Richard Sharman <rsharman@magmacom.com>. + * tests/date/Test.pm: Add tests using `next'. + +Tue May 27 06:08:06 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/basename.c: Don't include backupfile.h. + + * lib/Makefile.am (noinst_HEADERS): Add backupfile.h. + + * src/basename.c: Use base_name, not basename. + * src/su.c: Use base_name, not basename. + + * configure.in: Don't replace basename. Now it's always required. + + * lib/Makefile.am (libsu_a_SOURCES): Add basename.c. + + * lib/getopt.c: Update from glibc via patch-2.2.93. + * lib/getopt1.c: Likewise. + * lib/getopt.h: Likewise. + * lib/basename.c: Likewise. + +Sat May 24 13:26:04 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * man/Makefile.am (EXTRA_DIST): Put man_MANS here so they are + distributed. This seems to be necessary for automake-1.1p. + +Thu May 1 00:10:11 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * ansi2knr.c echo.c factor.c hostname.c id.c nice.c pathchk.c + spline.c test.c uname.c: Indent cpp-directives. + + * src/system.h (N_): Define. + +Sun Apr 27 18:30:53 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/printf.c (cfcc_msg): File-scope constant. + (STRTOX): Use new constant as error message format string in macro. + Suggestion from Andreas Schwab. + (STRTOX): Don't fail because of extra character(s) following a + character constant. Give the *warning* only if !POSIXLY_CORRECT. + +Sun Apr 6 14:29:14 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/printf.c: Reorder functions to obviate forward decls. + Change most char* dcls to const char*. + (STRTOX): New macro to eliminate code duplication. + (xstrtod, xstrtol, xstrtoul): Remove functions. + Use the STRTOX instead. + + * src/printf.c (STRTOX): Interpret arguments like 'a and "a + as POSIX requires. Derived from a patch by Dennis Henriksen. + +Sun Mar 23 15:20:17 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (ALL_LINGUAS): Add polish (pl). + +Sat Mar 22 00:03:02 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.1l. + (aclocal.m4): Use aclocal's new -I option. + + * missing: New file -- from the automake-1.1m distribution. + +Thu Mar 20 21:10:44 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * m4/ccstdc.m4: Remove file. + * m4/init.m4: Likewise. + * m4/sanity.m: Likewise. + * m4/protos.m: Likewise. + * m4/dmalloc.m4: Likewise. + * m4/error.m4: Likewise. + * m4/header.m4: Likewise. + * m4/install.m4: Likewise. + * m4/lispdir.m4: Likewise. + * m4/maintainer.m4: Likewise. + * m4/obstack.m4: Likewise. + * m4/ptrdiff.m4: Likewise. + * m4/regex.m4: Likewise. + * m4/strtod.m4: Likewise. + * m4/termios.m4: Likewise. + * m4/winsz.m4: Likewise. + +Tue Mar 18 06:46:54 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/su.c: Indent cpp-directives to reflect nesting. + Change a few #ifdef to #if. + Remove 3 spurious #ifdef that were guarding an #undef each. + + * src/seq.c (check_format): Rename local, FORMAT_STRING, to avoid + shadowing global. + (print_numbers): Likewise. + + * src/who-users.c (idle_string): Rename local, IDLE, to avoid + shadowing global. + + * src/su.c (log_su): Resort to getpwuid if getlogin fails. + If no tty name is found, use `none' in the log message. + Based on a patch from Galen Hazelwood. + +Thu Mar 13 21:27:36 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/mktime.c (TIME_T_MIN): Work around a bug in Cray C 5.0.3.0. + +Wed Feb 19 23:06:46 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/factor.c (factor): Rewrite inner loop to be more efficient. + Patch from Torbjorn Granlund. + +Tue Feb 18 21:18:04 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/date/Test.pm: Add tests for %U, %V, and %W and for a bug + fixed on 1996-03-05. + Remove misleading `-' from leap-1 test. + + * tests/Makefile.am (SUBDIRS): Add factor. + * tests/factor: New directory. + * configure.in (AC_OUTPUT): Add tests/factor/Makefile. + +Tue Feb 4 22:03:13 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/stty.c: Bracket inclusion of termios.h with #if HAVE_TERMIOS_H. + Masami Takikawa reported that NeXTStep 3.0 doesn't have termios.h. + * configure.in (AC_CHECK_HEADERS): Add termios.h. + +Fri Jan 31 21:13:13 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/*.c (usage): Bracket bug-reporting address with <> and append + a period. + * src/*.sh: Likewise. + + * src/*.c: Compare getopt_long return value against -1, not EOF. + Use NULL, not `(int *) 0' as last parameter in getopt_long call. + +Mon Jan 27 21:43:50 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/chroot.c (usage): Remove one space in message to make + colons line up. + +Sun Jan 26 12:51:05 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 1.16. + + * src/who-users.c (usage): Fix typo (--writeable -> --writable) + in help output. From Galen Hazelwood. + +Sat Jan 25 21:01:13 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/factor.c (print_factors): Reflect changes to xstrtoul interface. + + * tests/date/mk-script.pl: Generated script now reflects + specification (in Test.pm) of default and per-test environment + settings. + +Fri Jan 24 23:36:00 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/long-options.c (parse_long_options): Reset optind to zero + before just returning so that getopt internals get initialized from + the probably-new parameters when/if getopt is called later. + This solves the problem (reintroduced with 1.15) where `stty -tabs' + would not work as advertised but instead act like `stty -a'. + Reported by Arne Juul. + Suggested fix from Ulrich Drepper. + +Wed Jan 22 20:12:31 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/getopt.c: Update from GNU C library. + * lib/getopt1.c: Update from GNU C library. + * lib/getopt.h: Update from GNU C library. + + * tests/Makefile.am (EXTRA_DIST): Add README Makefile.am.in. + (SUBDIRS): Set to `date'. + + * configure.in: Check for perl. + (AC_OUTPUT): Add tests/date/Makefile. + * tests/date: New directory. + + * m4/getgroups.m4: Move the code from configure.in into + this macro that resorts to looking for getgroups in -lbsd. + Set new shell variable, GETGROUPS_LIB (that callers should check), + if it is found there. + * configure.in: Check $GETGROUPS_LIB just after jm_FUNC_GETGROUPS. + (AC_CHECK_FUNCS): Remove getgroups. + Remove code that resorts to looking for getgroups in -lbsd. + + * m4/mktime.m4 (AM_FUNC_MKTIME): Run tests for each of a few values + for the TZ environment variable. Andre Novaes Cunha provided the + hairy TZ setting that exercized the Solaris tzset bug. + +1997-01-22 Paul Eggert <eggert@twinsun.com> + + * lib/strftime.c (_strftime_copytm): + New function, to work around Solaris 2.5 tzset bug. + + * m4/mktime.m4 (AM_FUNC_MKTIME): Fix bug in mktime test -- don't + test now, test a couple of thousand times. + + * m4/strftime.m4 (main): Use TZ=GMT0, not TZ=GMT, since only GMT0 is + specified by Posix.1. + +Sat Jan 18 09:32:26 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/getdate.y (get_date): Change prototype to reflect const'ness + of parameters. + Indent cpp-directives to reflect nesting. + Indent with GNU indent. + + * lib/getdate.h: New file. + * src/date.c: Include getdate.h. + (<time.h>, <sys/time.h>): Don't include -- now getdate.h does it. + (get_date): Don't declare. getdate.h does it. + + * lib/Makefile.am (noinst_HEADERS): Add getdate.h. + + 1997-01-06 Paul Eggert <eggert@twinsun.com> + + * getdate.y: Rewrite to use mktime. + + <sys/timeb.h>: Don't include. + (mktime): Declare. + + (struct timeb, timezone, DOOMSDAY, SECSPERDAY, DSTMODE, yyDSTmode, + ToSeconds, Convert, DSTcorrect, RelativeDate, RelativeMonth): Remove. + (ToHour): New function (part of the old ToSeconds fn). + (ToYear): New function (part of the old Convert fn). + + (TABLE.value, yyDayOrdinal, yyDayNumber, yyTimezone, yyDay, yyHour, + yyMinutes, yyMonth, yySeconds, yyYear, yyRelMonth, yyRelSeconds, + Number): Now int instead of time_t. + (HOUR): Don't cast to time_t. + + (tDAY_UNIT, tHOUR_UNIT, tYEAR_UNIT): New %tokens. + (UnitsTable): Use new units that are closer to the keywords. + + (yyRelDay, yyRelHour, yyRelMinutes, yyRelYear): New variables. + (rel, relunit, get_date): Add support for them. + + (time): Fix timezone calculations for negative half-hour offsets + when integer division truncates towards minus infinity. + + (zone): Incorporiate DST calculation directly. + + (get_date): 2nd arg is now time_t *, not struct timeb *. + Use mktime to do most of the work, instead of computing it ourselves. + Guard against falsely reporting errors near the time_t boundaries + when parsing times in other time zones. + +Thu Jan 16 20:58:40 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Check for pstat_getdynamic. + * configure.in (AC_CHECK_FUNCS): Don't check for pstat_getdynamic here. + +Tue Jan 14 22:45:36 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AC_CHECK_FUNCS): Add pstat_getdynamic. + Alphabetize functions. + + * lib/getloadavg.c [hpux && HAVE_PSTAT_GETDYNAMIC]: Use HPUX's + pstat_getdynamic function so we don't need any special privileges + to determine load averages. Patch from Kaveh Ghazi, based on a + sample implementation from Richard J. Rauenzahn. + Indent cpp-directives to reflect nesting. + +Wed Jan 8 16:38:24 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 1.15. + + * lib/getopt.c (_getopt_internal): Use `_', rather than the + (sometimes-)expansion `gettext'. + +Tue Jan 7 22:10:51 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/nice.c (main): Work around failures induced by new version of + getopt.c by not modifying optind before the first getopt_long call + in main. With suggestions from Ulrich Drepper. + + * lib/getopt.c: New (more POSIX compliant) version from GNU libc. + [_]: Define to gettext also if ENABLE_NLS is defined. + This is temporary. + +Fri Jan 3 21:08:29 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * acconfig.h (getgroups): Add #undef. + From Marcus Daniels. + +Fri Dec 27 17:25:18 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/who-users.c [!WTMP_FILE]: Provide default path. + (UTMP_FILE) [UTMPX_FILE]: Use UTMPX_FILE in favor of UTMP_FILE. + Patch from Kaveh R. Ghazi. + Indent cpp directives. + + * m4/getgroups.m4: Rewrite the test so that systems lacking + getgroups don't try to use the supplied replacement function -- + that depends on the existence of such a function. + + * Makefile.am (aclocal.m4): No longer depend on acinclude.m4. + + * configure.in (jm_FUNC_GETGROUPS): Use it. + Reported by Marcus Daniels. + AC_REQUIRE version 2.12 of autoconf. + +Sun Dec 22 23:31:32 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in: Increment version to 1.14a. + + * m4/Makefile.am (EXTRA_DIST): Add README. + +Fri Dec 20 19:28:37 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/who-users.c (usage): Say that UTMP_FILE is the default FILE + rather than hard-coding /etc/utmp. Replace hard-coded /etc/wtmp + with WTMP_FILE. Suggestion from Eivind. + + * src/seq.c (usage): Tweak --help text. + + * configure.in (AC_OUTPUT): Add m4/Makefile. + + * lib/Makefile.am (EXTRA_DIST): Add getgroups.c. + + * Makefile.am (SUBDIRS): Add m4. + (aclocal-files): Add rules that rely on (GNU) make's include + directive that computes dependencies for aclocal.m4. + (aclocal.m4): Override automake-generated rule. + + * m4/Makefile.am: New file. + + * lib/strftime.c: Update from GNU libc. + + * m4/getline.m4: New file, extracted from acinclude.m4. + * m4/getloadavg.m4: Likewise. + * m4/jm-mktime.m4: Likewise. + * m4/jm-winsz1.m4: Likewise. + * m4/jm-winsz2.m4: Likewise. + * m4/memcmp.m4: Likewise. + * m4/strftime.m4: Likewise. + * m4/uptime.m4: Likewise. + + * m4/ccstdc.m4: Copied from automake-1.1l. + * m4/dmalloc.m4: Likewise. + * m4/error.m4: Likewise. + * m4/gettext.m4: Likewise. + * m4/header.m4: Likewise. + * m4/init.m4: Likewise. + * m4/install.m4: Likewise. + * m4/lcmessage.m4: Likewise. + * m4/lispdir.m4: Likewise. + * m4/maintainer.m4: Likewise. + * m4/mktime.m4: Likewise. + * m4/obstack.m4: Likewise. + * m4/progtest.m4: Likewise. + * m4/protos.m4: Likewise. + * m4/ptrdiff.m4: Likewise. + * m4/regex.m4: Likewise. + * m4/sanity.m4: Likewise. + * m4/strtod.m4: Likewise. + * m4/termios.m4: Likewise. + * m4/winsz.m4: Likewise. + + * m4/getgroups.m4: New file. + (jm_FUNC_GETGROUPS): New macro + * lib/getgroups.c: New file. + + * m4: New directory. + +Wed Dec 18 07:47:29 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AC_CHECK_HEADERS): Add paths.h. + * src/su.c [HAVE_PATHS_H]: Include <paths.h>. + [_PATH_DEFPATH]: Use this to define DEFAULT_LOGIN_PATH. + [_PATH_DEFPATH_ROOT]: Use this to define DEFAULT_ROOT_LOGIN_PATH. + From Rik Faith. + + * acinclude.m4 (jm_FUNC_GNU_STRFTIME): Change m4 quote strings + outside the quoted test program. Quote the test program with <<, >>. + Reported by Andreas Schwab. + (AM_FUNC_GETLOADAVG): Likewise. + (jm_FUNC_GNU_STRFTIME): Add tests for new, upcasing ^ modifier + +Tue Dec 17 18:54:32 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/Makefile.am (install-exec-local): Properly redirect stdout + and stderr to /dev/null. From Eric Backus. + + * lib/strftime.c: Update from GNU libc. + + * acinclude.m4 (jm_SYS_PROC_UPTIME): Require AC_PROG_CC, rather than + now-obsolete AC_C_CROSS. + (jm_FUNC_MKTIME): When redefining, use rpl_ prefix, not gnu_ one + since there's nothing GNU-specific about the replacement. Contrast + with gnu_ prefix added to strftime. + (jm_FUNC_MEMCMP): New macro. + * configure.in: Use jm_FUNC_MEMCMP instead of AM_FUNC_MEMCMP. + * acconfig.h: Add memcmp. + +Sun Dec 15 18:37:08 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (check for 3-argument setpriority function): Complete + partial change made on Dec 12. From Arne Juul. + +Sat Dec 14 14:51:50 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * acinclude.m4 (jm_SYS_PROC_UPTIME): Fix typo in cache variable + name for cross compiling. + Remove definitions of gettext-related macros. The gettext + installation procedure installs corresponding .m4 files so that + aclocal will use them. + +Thu Dec 12 06:07:30 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 1.14. + + * src/system.h (ISDIGIT): Replace with smaller, faster edition + that yields nonzero only on ASCII digits. + (ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT + used to have. From Paul Eggert. + + * configure.in: Bump version to 1.14. + + * lib/getdate.y (IN_CTYPE_DOMAIN): Rename from ISASCII. + (ISDIGIT): New definition from Paul Eggert. + This one evaluates its argument exactly once. + (yylex): Move increment out of ISALPHA argument. Use a + comma-expression instead. + + * src/false.sh (usage): Update bug-reporting address. + * src/groups.sh (usage): Likewise. + * src/nohup.sh (usage): Likewise. + * src/true.sh (usage): Likewise. + Reported by Karl Heuer. + + * configure.in (check for 3-argument setpriority function): Add nohup + to list of scripts, not the list of programs. + From Karl Heuer. + + * POTFILES.in: Add chroot.c. Reported by Michel Robitaille. + +Wed Dec 11 19:33:36 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 1.13. + +Tue Dec 10 06:36:57 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * acinclude.m4 (jm_SYS_PROC_UPTIME): New macro. Derived from the + code in configure.in, except now it punts when cross compiling. + Suggestion from Karl Heuer. + * configure.in (jm_SYS_PROC_UPTIME): Use it instead of open-coded + version. + + * lib/Makefile.am (EXTRA_DIST): Add mktime.c. + Reported by Thomas Bushnell. + + * configure.in: Bump version to 1.12t. + + * Regenerate all Makefile.in using a patched version of automake-1.1l. + + * acconfig.h (strftime): Add #undef. + From Karl Heuer. + + * acinclude.m4 (AM_GNU_GETTEXT): Don't require AC_ISC_POSIX. + From Karl Heuer. + +Mon Dec 9 06:58:11 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in: Bump version to 1.12s. + + * lib/getdate.y (Convert): Don't reject all dates in 2038. + Some fit in 31 bits. + + * configure.in (jm_FUNC_GNU_STRFTIME): Use it. + + * acinclude.m4 (AC_REPLACE_GNU_GETOPT): Remove unused macro. + (jm_FUNC_GNU_STRFTIME): New macro. + + * lib/Makefile.am (libsu_a_SOURCES): Remove strftime.c. + (EXTRA_DIST): Add strftime.c. + + * configure.in (jm_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Fix typo: + Change $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h to + $jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h. + Patch from Kaveh R. Ghazi. + + * src/stty.c: Include config.h before testing for + TERMIOS_NEEDS_XOPEN_SOURCE. + Patch from Karl Heuer. + + * configure.in (AC_ISC_POSIX): Remove kludgy macro. + Use this test instead: + (LIBS): Add -lcposix if it contains strerror. + Patch from Karl Heuer. + + * acinclude.m4 (AM_FUNC_GETLOADAVG): Put shell assignments to + ac_save_LIBS and LIBS on separate lines to avoid order-of-evaluation + problems -- some versions of sh (e.g. SunOS4.1.3's) evaluate such + space-separated assignments from right to left. Patch from Karl Heuer. + (AM_FUNC_GETLOADAVG): Fix typo: su_save_LIBS => am_cv_saved_LIBS. + Patch from Karl Heuer. + + * lib/strftime.c [HAVE_TZNAME]: Declare tzname. + Patch from Karl Heuer. + + * src/Makefile.am (.sh): Also substitute @bindir@. + Reported by Karl Heuer. + +Sun Dec 8 07:22:38 1996 Jim Meyering <meyering@na-net.ornl.gov> + + =========== Update for automake-1.1k. + * Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k. + * configure.in (AM_CONFIG_HEADER): Use it. + (AC_OUTPUT): Remove stamp-h timestamping statement. + Now, AM_CONFIG_HEADER does it automatically. + * lib/Makefile.am (noinst_LIBRARIES): Rename to libsu.a as per + new automake requirement. + Rename su_* variables to libsu_a_*. + +Sun Dec 8 00:08:44 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/stty.c (get_win_size): Rename formal parameter from fileno to FD. + +Sat Dec 7 12:52:00 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/chroot.c (main): Call setlocale, bindtextdomain, and textdomain. + From Michel Robitaille. + + * configure.in (ALL_LINGUAS): Add Portuguese (pt). + + * lib/getloadavg.c [__SVR4]: Define SVR4. + Remove duplicate `|| defined(SVR4)' disjunct guarding the + #define KERNEL_FILE "/unix" definiton. + + * configure.in (jm_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Use this variant + of the AM_ prefixed macro. + (check for TIOCGWINSZ in sys/pty): In essence, require + jm_HEADER_TIOCGWINSZ_IN_TERMIOS_H so that + $jm_cv_sys_tiocgwinsz_needs_termios_h (renamed from + $gwinsz_in_termios_h) is defined. + + * lib/strftime.c (strftime): Remove " %Z" part of format for %c. + Correction from Paul Eggert. + +Fri Dec 6 20:52:07 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * acinclude.m4 (jm_FUNC_MKTIME): Rather than including the text of + AM_FUNC_MKTIME, simply AC_REQUIRE it. + +Mon Dec 2 20:59:38 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (su_cv_func_ut_host_in_utmp): Move test that can + define WINSIZE_IN_PTEM to precede test that checks whether + `TIOCGWINSZ in sys/pty.h'. The latter test uses the symbol. + (jm_FUNC_MKTIME): Use this instead of AM_FUNC_MKTIME. + +Sun Dec 1 13:07:39 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/getdate.y (date): Interpret the date, L/M/N, as YYYY/MM/DD + if L >= 1000, otherwise as MM/DD/YY. With this change, + date --date=DATE accepts dates like those in an RCS log listing. + +Sat Nov 30 22:08:00 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/strftime.c: Update from GNU libc. + +Fri Nov 29 22:16:40 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/uname.c (main) [HAVE_SYSINFO && SI_ARCHITECTURE]: Support + --processor (-p). Print processor type. + (usage): Document it. + +Thu Nov 28 00:28:37 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT + for gettext-0.10.25. + (AM_FUNC_GETLINE): Move the test to just before the check for getdelim. + +Sun Nov 24 11:02:29 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/system.h [!defined STDIN_FILENO]: Define it. + [!defined STDOUT_FILENO]: Define it. + [!defined STDERR_FILENO]: Define it. + + * src/stty.c (get_win_size): Take a FILENO parameter rather than + trying to get a size from both stdin and stdout. + Update callers. + Use STDIN_FILENO and STDOUT_FILENO instead of literal 0, 1. + + ========== From Karl Heuer ========= + * src/stty.c [TERMIOS_NEEDS_XOPEN_SOURCE]: Define _XOPEN_SOURCE. + i386-pc-isc3.0, needs that in order to cause all of the useful + termios symbols to be defined, instead of just those that are + required by POSIX. This enables all of: iuclc ixany olcuc ocrnl + onlcr onocr onlret ofill ofdel nl0 cr0 tab0 bs0 vt0 ff0 xcase. + + [GWINSZ_IN_SYS_PTY]: Include sys/ioctl.h, sys/tty.h, and sys/pty.h. + + [!VSUSP && !VSWTCH]: Map VSWTCH and CSWTCH to VSUSP and CSUSP resp. + termio.h defines VSWTCH, but termios.h defines VSUSP instead (since + POSIX requires that symbol). Define VSWTCH as a synonym if needed, + so that either one can be used on input. + (display_changed): If the slot for swtch is the same as the one for + susp, display only the setting for susp. + (display_all): Likewise. + + (display_changed): Some systems still have (VEOF,VEOL) == (VMIN,VTIME). + On such systems, it's confusing to print both pairs. So, skip eof and + eol when icanon is unset, and skip min and time when icanon is set. + (display_all): Likewise. + + (set_window_size): Check only stdin (the device being queried) for + window size info. You don't want "stty </dev/foo" to report the size + of your current window when /dev/foo has no size info. + (display_window_size): Likewise. + + (screen_columns): Check only stdout for window size info. You want + "stty </dev/foo" to wrap columns at the right margin of your current + window, not the /dev/foo width. + + * acconfig.h (GWINSZ_IN_SYS_PTY): Add #undef. + (TERMIOS_NEEDS_XOPEN_SOURCE): Add #undef. + + * configure.in (whether termios.h needs _XOPEN_SOURCE): New test. + (whether TIOCGWINSZ is defined in sys/pty.h): New test. + +Sat Nov 23 16:15:37 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/Makefile.am (EXTRA_DIST): Add getline.c now that getline + isn't mentioned in AC_REPLACE_FUNCS. + + * env.c (usage): Alphabetize option descriptions the way sort -f would. + * test.c (usage): Likewise. + * who-users.c (usage): Likewise. + From Karl Berry. + +Fri Nov 22 20:33:26 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AC_REPLACE_FUNCS): Don't try to replace getline this + way. AM_FUNC_GETLINE does it now. + + * configure.in New test to check for TIOCGWINSZ in sys/pty.h. + * config.h.in (GWINSZ_IN_SYS_PTY): Add #undef. + From Karl Heuer. + + * src/printf.c (main): Warn if excess arguments are ignored. + E.g., printf foo bar now warns that it is ignoring the single + non-format argument, bar. + +Wed Nov 20 20:37:54 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/xgethostname.c (xgethostname): Work around bug in SunOS5.5's + gethostname. Reported by Fletcher Mattox. + +Tue Nov 19 23:01:01 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AM_SANITY_CHECK_CC): Remove it. Autoconf-2.11 + has this built-in. + (OPTIONAL_BIN_ZCRIPTS): Rename from OPTIONAL_SCRIPTS -- because + automake-1.1g couldn't deal with the _SCRIPTS suffix. + * src/Makefile.am (bin_SCRIPTS): Rename @OPTIONAL_SCRIPTS@. + +Sun Nov 17 20:49:37 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/id.c (main): Ignore -a, for compatibility with SVR4. + Suggestion from Noah Friedman. + +Mon Nov 4 20:24:31 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (test for group_member): Handle it separately + so I can keep the hyphen (not the underscore) in the filename. + + Thu Oct 31 19:32:32 1996 Miles Bader <miles@gnu.ai.mit.edu> + + * lib/xgethostname.c [ENAMETOOLONG] (xgethostname): If gethostname + returns an error other than buffer overflow, exit with an error + message instead of allocating infinite amounts of space. + [!EXIT_FAILURE] (EXIT_FAILURE): New macro. + <errno.h>: New include. + [!errno] (errno): New declaration. + + * acinclude.m4 (AM_FUNC_GETLINE): Use cache. + + * configure.in: Check for -linet library before checking for the + gethostbyname function. Suggested by Karl Heuer. + Use AM_FUNC_GETLINE. + + * acinclude.m4 (AM_FUNC_GETLINE): Add run-time test for getline. + Based on a test from Karl Heuer. + +Sun Nov 3 14:57:09 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * acinclude.m4 (GETLOADAVG_LIBS): Unanchor the sed regexp that removes + am_cv_saved_LIBS from LIBS. From Karl Heuer. + + * src/stty.c (recover_mode): Fail also if there are too many fields. + From Karl Heuer. + + * lib/canon-host.c: Include sys/types.h for the definitions + (otherwise missing on some systems) of caddr_t (used by + sys/socket.h) and ushort (used by netinet/in.h). From Karl Heuer. + +Sat Nov 2 00:16:16 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split. + Otherwise, the generated info files have names longer than + the 14-byte max of some old systems. + Reported by Karl Heuer. + + * src/date.c (main): Give better diagnostic. + Suggestion from Karl Berry. + +Thu Oct 31 18:28:05 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/posixtm.y: Remap yacc globals to have pt_ prefix. + * lib/getdate.y: Remap yacc globals to have gd_ prefix. + Suggestion to do as in gdb/c-exp.y from Tom Tromey. + +Mon Oct 28 17:40:54 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/Makefile.am (install-exec-local): Redirect stderr of chown to + /dev/null and suggest running `make install-root' upon failure to + install su. Suggestions from François Pinard. + + * configure.in: Don't output confusing diagnostic: `checking for + shadow password routines'. Suggestion from François Pinard. + +Thu Oct 24 13:50:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * src/tee.c (main): Ignore SIGPIPE. + +Wed Oct 23 23:42:43 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/stty.c: Guard inclusion of stdarg.h and definition of VA_START + with #if PROTOTYPES rather than with #ifdef __STDC__. The latter + loses with Dynix/PTX. + (wrapf) [PROTOTYPES]: Similarly, guard ANSI-style ... definition. + Suggestion from Marcus Daniels. + +Mon Oct 21 16:49:08 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/getloadavg.c [__linux__]: Don't bother with a.out/nlist/kernel + defines or includes -- Linux systems simply read /proc/loadavg. + From Ulrich Drepper. + + * lib/Makefile.am (EXTRA_DIST): Remove group-member.c. + + * configure.in: Remove hack that created link from group_member.c + to group-member.c. + + * lib/group_member.c: New file. Renamed from group-member.c. + * lib/group-member.c: Delete. + + * src/stty.c (main): Remove TAB from diagnostic, for consistency. + +Sun Oct 20 09:03:51 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * Makefile.am (install-root): Add it here, too. + + * lib/Makefile.am (INCLUDES): Add -I../intl. Reported by Eric Backus. + + * src/Makefile.am (install-root): New rule. + Suggestion from François Pinard. + + * src/who-users.c (print_entry): Don't take address of UT_TIME_MEMBER + directly. From Ulrich Drepper. + + * Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits'. + (EXTRA_DIST): Remove @README_ALPHA@. + + * configure.in: Remove README_ALPHA related code. Automake takes + care of it automatically now when in gnits mode. + + * acinclude.m4 (AM_FUNC_GETLOADAVG): Use $srcdir (not $top_srcdir) in + #include $srcdir/lib/getloadavg.c. The latter isn't defined at that + point in configure script. From Eric Backus. + +Fri Oct 18 21:31:58 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * Makefile.am (cvs-dist): Uncomment cvs tag command. + (cvs-dist): Use cvs tag's -c option. + +Thu Oct 17 23:48:16 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (LIBS): Add -lypsec on m88k/svr3 DolphinOS systems + using YP. From Arne Juul. + +Sun Oct 13 07:34:15 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in: Don't save and restore LIBS around AM_FUNC_GETLOADAVG. + * acinclude.m4 (AM_FUNC_GETLOADAVG): Don't modify LIBS in this macro + (by saving and restoring initial value). Instead, arrange for + substitution of @GETLOADAVG_LIBS@. + * src/Makefile.am (uptime_LDADD): Add @GETLOADAVG_LIBS@, + not @UPTIME_LIBS@. + + * configure.in (ALL_LINGUAS): Add swedish (sv). + +Fri Oct 11 22:51:50 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/who-users.c (print_uptime): Change #ifdef guard on getloadavg + call from just HAVE_GETLOADAVG to HAVE_GETLOADAVG || C_GETLOADAVG. + From Kaveh R. Ghazi. + + * src/Makefile.am (uptime_LDADD): Add @UPTIME_LIBS@. + + * acinclude.m4 (AM_FUNC_GETLOADAVG): Like AC_FUNC_GETLOADAVG, but + with the following changes: + - include $top_srcdir/lib/getloadavg.c, not src/getloadavg.c. + Reported by Eric Backus. + - Check for Solaris' libkstat. + - Define C_GETLOADAVG if we end up using getloadavg.c. + From Kaveh R. Ghazi. + * acconfig.h (C_GETLOADAVG): Add it. + From Kaveh R. Ghazi. + + * configure.in: Use new AM_FUNC_GETLOADAVG and be careful to add + getloadavg-related libraries only when linking uptime. + +Thu Oct 10 23:50:05 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/Makefile.am (EXTRA_DIST): Remove posixtm.y and getdate.y. + (su_SOURCES): Put them here instead. + Remove rules for building getdate.c and posixtm.c; now automake + generates those rules. + * lib/ylwrap: New file. + * lib/interlock: New file. + +Wed Oct 9 00:26:55 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/getloadavg.c [__sun]: Define sun. Reported by Kaveh Ghazi. + + * lib/strftime.c (strftime): Accommodate the broken C compiler + that comes with SunOS -- don't initialize aggregates in decls of + automatic variables. Reported by Kaveh Ghazi. + + * tests/: Renamed checks/ directory. + * Makefile.am (SUBDIRS): Rename checks to tests. + * configure.in (AC_OUTPUT): Rename checks to tests. + + * configure.in (/proc/uptime check): Guard the read of /proc/uptime + with an existence test to avoid a messy configure-time warning on + systems that lack that special file. Reported by Kaveh R. Ghazi. + + * configure.in (check whether floor needs -lm): Fix typo: save $LIBS, + not $LIB. From Kaveh R. Ghazi. + + * checks/nice: Protect echoed args with leading `x' so echo doesn't + interpret leading -n on e.g. SunOS systems. + +Mon Oct 7 18:46:28 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/getloadavg.c [__hpux]: Define hpux. From Eric Backus. + + * lib/Makefile.am (EXTRA_DIST): Remove alloca.c, error.c, and mktime. + (su_SOURCES): Remove memcmp.c. + Automake automatically includes at least these, now. + From François Pinard. + + * lib/Makefile.am (su_SOURCES): Remove getline.c. + +Sat Oct 5 11:38:23 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/Makefile.am (su_SOURCES): Remove gethostname.c -- + it's AC_REPLACE'd and already in EXTRA_DIST. + + * configure.in: Use AM_SANITY_CHECK_CC. + + * configure.in: Use AM_FUNC_ERROR_AT_LINE. + * lib/Makefile.am (EXTRA_DIST): Put error.c here. + (su_SOURCES): Remove error.c + Suggested by Ulrich Drepper. + + * configure.in (GNU_PACKAGE): AC_SUBST it for the src/*.sh scripts. + * src/Makefile.am (.sh): Substitute for @GNU_PACKAGE@ and @VERSION@ + in the four installed scripts. + * src/*.sh: Update --version output to conform to the coding standard. + + * acinclude.m4 (AC_HEADER_SYS_TIME_H): New macro. + (AM_FUNC_MKTIME): Require AC_HEADER_SYS_TIME_H so that configure's + checking... messages don't get nested. + + * configure.in (GNU_PACKAGE): New variable. + (PACKAGE_VERSION): Remove it. + + * acconfig.h (GNU_PACKAGE): New variable. + (PACKAGE_VERSION): Remove now-unused variable. + + * src/*.c: Update --version output to conform to the coding standard. + +Sun Sep 22 22:41:54 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AC_CHECK_HEADERS): Alphabetize. + Update for automake-1.1e. + +Thu Sep 19 07:47:18 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/regex.c: Merge with FSF version. + * lib/getloadavg.c: Replace with FSF version. + +Mon Sep 16 23:13:04 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/strftime.c (strftime): New version, from GNU libc. + +Sun Sep 15 23:08:48 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * Makefile.am (EXTRA_DIST): Remove acinclude.m4. + +Mon Sep 9 22:10:45 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in: Improve handling of math library so -lm is used + only when it's actually required. That makes a difference when + using dynamic linking. + Remove check that added -lm to LIBS. + (SQRT_LIBM): Test for and AC_SUBST it. + (POW_LIBM): Likewise. + (SEQ_LIBM): Likewise. + Motivation and suggestions from Ulrich Drepper. + + * src/Makefile.am (factor_LDADD, printf_LDADD, seq_LDADD): + Set these using new @SQRT_LIBM@, @POW_LIBM@, and @SEQ_LIBM@ resp. + Also set corresponding _DEPENDENCIES variables. + +Sat Sep 7 12:41:39 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/system.h: Add comments justifying IS* versions of ctype.h macros. + + * lib/getdate.y: Define and use upper case variants of ctype.h + is* macros. From Bruno Haible. + +Thu Sep 5 22:12:20 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/strftime.c: New version from glibc. + +Wed Sep 4 23:39:51 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (ALL_LINGUAS): Add dutch (nl). + +Mon Sep 2 10:52:55 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/*.c (usage): Tell where to report bugs. + +Sun Sep 1 07:56:07 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AM_FUNC_MKTIME): Use it. + (AC_REPLACE_FUNCS): Remove mktime. + (AM_INIT_AUTOMAKE): Use it. + (AM_PROG_INSTALL): Remove. AM_INIT_AUTOMAKE does this. + (AC_PROG_MAKE_SET): Likewise. + (jm_MAINTAINER_MODE, fp_C_PROTOTYPES): Rename with + AM_ prefix for latest automake/aclocal. + + * Makefile.am (EXTRA_DIST): Add acinclude.m4. + + * acinclude.m4: New file -- derived from aclocal.m4. + * aclocal.m4: This file is now generated by the aclocal program + (which comes with the automake package.) + +Sat Aug 17 00:14:55 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/strftime.c: Update from GNU libc -- this adds back %z and %s + formats and reverts to old behavior where unrecognized format like + %E is treated as eqivalent to `E'. + +Sun Aug 4 09:14:28 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * checks/: New directory. + * checks/Makefile.am: New file. + * checks/nice: New file. Derived from tests from Eric Backus. + * configure.in (AC_OUTPUT): Add new directory: checks. + * Makefile.am (SUBDIRS): Likewise. + + * src/nice.c (main): Allow `+' in options like -+8 and -+13. + +Fri Aug 2 21:45:06 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/nice.c (main): Set minus_flag to zero in two places. + Otherwise, `nice --1 -3' would mistakenly do the equivalent of + `nice --3'. Thanks to Eric Backus <ericb@lsid.hp.com> for the + test cases. + + * configure.in (check for /proc/uptime): New check. + * acconfig.h (SAVE_PROC_UPTIME): #undef it. Reorder so symbols + are sorted again. + *src/who-users.c (print_uptime) [HAVE_PROC_UPTIME]: Read from + /proc/uptime. + From Ulrich Drepper. + +Thu Aug 1 22:38:38 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AC_REPLACE_GNU_GETOPT): No longer use it. + It isn't necessary because the cpp-time checks of getopt.c and + getopt1.c are at least as good. + * lib/Makefile.am (EXTRA_DIST): Remove getopt.c and getopt1.c. + (su_SOURCES): Add getopt.c and getopt1.c + This reverts much of the April 23 change. + +Sat Jul 27 17:22:14 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid + redefinition warnings on solaris. + (textdomain) [!ENABLE_NLS]: Likewise. + +Sun Jul 21 09:47:55 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AC_REPLACE_FUNCS): Replace getline.c. + Add related check for the getdelim function. + From Ulrich Drepper -- as done in gettext. + + * src/stty.c (usage): Correct typo (-iucl -> -iuclc) in usage message. + From Thomas Olsson <d95to@efd.lth.se>. + +Sat Jul 20 17:01:56 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (PACKAGE_VERSION): Use space instead of hyphen to + separate PACKAGE and VERSION. + +Wed Jul 17 23:13:19 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/chroot.c: Include <sys/types.h> before system.h. + * src/seq.c: Likewise. + * src/yes.c: Likewise. + From Arne Juul. + +Tue Jul 16 00:06:33 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/strftime.c (strftime): Use `(void)0' as second arg to add macro. + Omitting that second arg made some HPUX C compiler report an error. + From Kaveh R. Ghazi. + +Mon Jul 15 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/who-users.c (print_uptime): Reverse `days' and `day' in + uptime message. From Kaveh R. Ghazi. + + * Many files: Update FSF address. + +Sun Jul 14 20:05:34 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/who-users.c (print_uptime): Use 0, not undefined errno in + couldn't-get-boot-time diagnostic. From Ulrich Drepper. + +Sat Jul 13 14:22:54 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/chroot.c (usage): Add a `\' after `\n' in usage message. + Otherwise, SunOS's /bin/cc chokes. + + * src/stty.c [GWINSZ_BROKEN]: Remove thus-guarded `#undef TIOCGWINSZ'. + GWINSZ_BROKEN can't be defined anymore. + + * configure.in (boot time test): Use AC_EGREP_CPP instead of + AC_EGREP_HEADER; #endif, instead of #fi. + (AM_SYS_POSIX_TERMIOS, AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Use + these macros instead of the tests from which they were derived. + ($am_cv_sys_posix_termios): Renamed to have am_ prefix instead of su_. + +Wed Jul 10 22:57:29 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program + so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with + those options on that system, sys/stat.h gets compile errors. + With help from Marcus Daniels. + + * getopt.c: Update from gettext-0.10.23. + * getopt1.c: Likewise. + * getopt.h: Likewise. + +Sun Jul 7 22:40:08 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * aclocal.m4 (AM_SYS_POSIX_TERMIOS): New macro, derived from test + in configure.in. + (AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Likewise. + +Sat Jul 6 12:47:48 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AC_REPLACE_FUNCS): Add group_member. + (AC_LINK_FILES): Create link lib/group_member.c to lib/group-member.c. + * lib/Makefile.am (su_SOURCES): Remove group-member.c. + (EXTRA_DIST): Add group-member.c here. + +Thu Jul 4 22:40:06 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/expr.c (docolon): Remove space before newline in usage message. + +Sat Jun 29 18:58:20 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (PACKAGE_VERSION): Add `GNU ' prefix so we see + it in the output of --version. Reported by RMS. + +Tue Jun 18 22:14:42 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * aclocal.m4: Update from gettext-0.10.20. + * ABOUT-NLS: Likewise. + * intl/*: Likewise. + +Sun Jun 16 13:44:36 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * doc/Makefile.am (EXTRA_DIST): Add texinfo.tex. + +Thu Jun 6 21:57:08 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * po/Makefile.in.in: Update from gettext-0.10.16. + * intl/*: Likewise. + * ABOUT-NLS: Likewise. + * aclocal.m4 (AC_REPLACE_GNU_GETOPT): Move definition to precede + gettext-related ones. + Update from gettext-0.10.16. + +Wed May 29 21:28:53 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * expr.c (docolon): Give a warning when the first character + of the basic regular expression is `^'. + +Mon May 20 22:56:06 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * id.c (xgetgroups): New function, factored out of + print_group_list and print_full_info. + (print_group_list): Call it. + (print_full_info): Call it. + + * lib/Makefile.am (getdate.c): Disable dependencies that can + require rerunning YACC when not in maintainer mode. + (posixtm.c): Likewise. + +Tue May 14 18:47:35 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * id.c (print_group_list): When USERNAME is specified use + getugroups to get the number of groups. + (print_full_info): Likewise. + +Sun May 19 21:45:49 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * seq.c (usage): Make it clearer. + +Sat May 18 13:29:46 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * expr.c (main): Don't recognize --help, --h, --he, --version, + --v, etc. if the POSIXLY_CORRECT environment variable is set. + * echo.c (main): Likewise. + * printf.c (main): Likewise. + * test.c (main): Likewise. + + * expr.c (docolon) [RE_SYNTAX_POSIX_BASIC]: Revert change of Mar 1. + +Tue May 7 22:10:20 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * configure.in: Require autoconf-2.10. + + * aclocal.m4 (jm_MAINTAINER_MODE): New macro. + * configure.in (jm_MAINTAINER_MODE): Use it. + +Mon May 6 22:40:54 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * lib/strftime.c: Update from GNU libc. + +Sat May 4 20:54:32 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * system.h [IN_CTYPE_DOMAIN]: Rename from ISASCII. + * seq.c: Remove useless void casts of *printf return values. + +Mon Apr 29 22:23:40 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * basename.c (usage): Mark translatable strings. + * chroot.c (main): Likewise. + * basename.c (main): Separate messages about `too few' and `too many' + arguments to ease translation. + * dirname.c (main): Likewise. + * date.c (usage): Change TAB in message to spaces. Doing that seems + to have worked around a problem with something in gettext that was + producing a truncated usage message for date's usage. + From François Pinard. + +Sun Apr 28 17:10:03 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * configure.in: Make fp_C_PROTOTYPES precede AC_C_INLINE. + Otherwise, some systems lose because the value AC_C_INLINE choses + with plain `cc' is different from that chosen when using the ANSI-mode + C compiler. From Kaveh Ghazi. + +Tue Apr 23 22:05:35 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro. + * configure.in: Use it. + * lib/Makefile.am (su_SOURCES): Remove getopt.c and getopt1.c. + (EXTRA_DIST): Add getopt.c and getopt1.c + + * whoami.c (main): Declare to return int, not void. + * who-users.c (main): Likewise. + * yes.c (main): Likewise. + + * src/*.c, src/*.h: Update Copyright years to include 1996. + +Sun Apr 21 08:04:51 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * date.c (usage): Describe new %V format. From Karl Berry. + + * Makefile.am (LDADD): Put @INTLLIBS@ before package library. + +Sat Apr 20 22:22:01 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * chroot.c (usage): Improve help message. + Enclose message strings in _(). + * seq.c (usage): Improve help message. + * factor.c (usage): Likewise. + From Karl Berry. + +Fri Apr 19 23:48:53 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * Makefile.am (cvs-dist): New rule. Based on the one from + Tom Tromey's automake. + +Thu Apr 18 23:16:41 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * basename.c (basename): Rewrite so it doesn't rely on strrchr, + and hence doesn't need to include string.h -- on some alpha-based + OSF systems, there's a conflicting prototype for basename in string.h. + Reported by Kaveh Ghazi. + + * configure.in (AC_REPLACE_FUNCS): Add basename. + * lib/Makefile.am (EXTRA_DIST): Add basename.c. + (su_SOURCES): Remove basename.c. + From Kaveh Ghazi. + +Tue Apr 16 20:24:44 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * src/Makefile.am (who.c): Qualify who-users.c reference with + $(srcdir)/ prefix. + (users.c): Likewise. + (uptime.c): Likewise. + From François Pinard. + + * configure.in: Always invoke AC_GETLOADAVG, not just if we're + building uptime. + +Sat Apr 13 13:24:35 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * getloadavg.c: Test cpp-defined __sun as well as sun, because + in strict ANSI mode, only __sun is defined. From Kaveh Ghazi. + + * date.c (usage): Add missing `\n\' at the end of newly added + lines for %e and %z. + + * who-users.c (print_uptime): Call getloadavg only if we have it. + +Fri Apr 12 22:03:13 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * configure.in (LINGUAS): Add de. + + * date.c (usage): Describe %e and %z. Reported by Karl Berry. + + * who-users.c: Mark translatable strings in new code. + +Wed Apr 10 21:26:30 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * configure.in: Add test for boot_time. + From Kaveh Ghazi. + + * lib/Makefile.am (EXTRA_DIST): Add getloadavg.c. + + * src/Makefile.am (EXTRA_PROGRAMS): Add uptime. + (BUILT_SOURCES): Add uptime.c. + (MOSTLYCLEANFILES): Add uptime.c. + (uptime.c): Add rule to build it from who-users.c. + + * who-users.c: Reindent. + (UT_TIME_MEMBER): New macro. + (print_uptime): Use it instead of #ifdef HAVE_UTMPX_H #else. + (print_entry): Likewise. + +Tue Apr 9 23:57:19 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * who-users.c (print_uptime) [UPTIME]: New function. From Kaveh Ghazi. + +Sun Apr 7 11:58:13 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * seq.c (print_numbers): Rearrange loops to get it right. + Reported by Karl Eichwalder <ke@ke.Central.DE>. + + * seq.c (print_numbers): Give more precise diagnostic when INCREMENT + is inconsistent with START and LIMIT. + (usage): Clean up help message. + + * factor.c (usage): Give minimal description of the program. + (print_factors): Give a better diagnostic. + (main): Suggest --help upon failure. + Reported by Karl Eichwalder <ke@ke.Central.DE>. + + * seq.c (print_numbers): Fix off-by-one error in + backwards-counting loop. Reported by Karl Eichwalder. + + * strftime.c (mon_week_ISO): New function to implement new %V format. + (sun_week): Make TM parameter `const'. + (mon_week): Likewise. + (mon_week): Rewrite to implement %W format correctly. + (strftime): Handle %V format. + Reported by Arne Juul. + +Fri Apr 5 07:33:00 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * strftime.c (sun_week): Make %U work properly. + Before, `date -d '1 Jan 1995' +%U' output `00'. Now it prints `01'. + + * nice.c (main): Simplify option handling. Before, `nice -18 -- nice' + improperly printed `8'. Patch from Frank Korz. + (main): Use `if' stmt, not while loop, around getopt invocation. + Otherwise, `./nice --a=1 -1 ./nice' (in which old-style option + follows a long option) gets an error. + +Thu Apr 4 20:14:02 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * aclocal.m4 (fp_PROG_CC_STDC): Change -Xc -D_POSIX_C_SOURCE to + `-Xc -D__EXTENSIONS__' because of problems with Solaris header + files. Suggested by Kaveh Ghazi. + +Wed Apr 3 07:08:57 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h + when srcdir != builddir. From Kaveh Ghazi. + + * lib/getugroups.c: Include stdio.h before grp.h. Because + <grp.h> on alpha OSF1 V2.0 uses "FILE *". From Kaveh Ghazi. + +Sun Mar 31 16:26:06 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * configure.in: Simplify checking for math library. + This also eliminates some confusing output from configure. + Suggested by François Pinard. + +Fri Mar 29 22:13:10 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * src/Makefile.am (INCLUDES): Replace -I$(top_srcdir)/intl with + -I../intl. With the former, compiles didn't find libintl.h when + configured with `--srcdir=..'. Reported by Marcus Daniels + <marcus@sysc.pdx.edu>. + + * doc/Makefile.am (EXTRA_DIST): Set to getdate.texi so that file + gets distributed. + + * src/Makefile.am (EXTRAdir): Set to $(bindir). + +Thu Mar 28 23:01:48 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * ChangeLog.0: New file. + * Makefile.am (EXTRA_DIST): Add ChangeLog.0. + +Thu Mar 28 00:06:28 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * man/Makefile.am (man_MANS): Add chroot.1. + * src/Makefile.am (EXTRA_PROGRAMS): Add chroot. + +Sun Dec 24 10:55:34 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * configure.in: Check for chroot a la uname. + * src/chroot.c, man/chroot.1: New files. + +Sun Mar 24 11:44:35 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * su.c: Protoize and reorder functions to obviate forward decls. + + * seq.c: Make parameters const where appropriate. + Rename global FROM to START. + (print_numbers): Rewrite loops to avoid incrementing. Instead, + use `x = first + i * increment' paradigm. Otherwise, with inexact + increment, you could miss the last value. + + * xstrtod.c: New file. + * xstrtod.h: New file. + * lib/Makefile.am: Add xstrtod.c and xstrtod.h. + * seq.c: Include xstrtod.h. + (scan_double_arg): Use xstrtod rather than strtod directly. + + * src/*: Update FSF's address. + +Thu Mar 21 16:43:13 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * src/*.c (main): Declare to be of type int, not void. + +Sat Mar 16 10:07:49 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * configure.in (PACKAGE_VERSION): New macro. + (OPTIONAL_BIN_PROGS): Rename from OPTIONAL_PROGS. + * acconfig.h (PACKAGE_VERSION): Add it. + * src/Makefile.am: Remove rules for generating version.c. + Remove references to version.o, version.h, and stamp-v. + [.sh]: Change @VERSION@ to @PKG_VERSION@. + On RHS of sed substitution, use @PACKAGE_VERSION@, not GNUVER. + (OPTIONAL_BIN_PROGS): Rename from OPTIONAL_PROGS. + (install-exec-local): New target/rules to make the installed su + binary setuid root or failing that, to delete it. + * false.sh groups.sh nohup.sh true.sh: Use @PKG_VERSION@, + not @VERSION@. + * version.c: Remove file. + * version.h: Remove file. + * basename.c date.c dirname.c echo.c env.c expr.c factor.c + hostname.c id.c logname.c nice.c pathchk.c printenv.c printf.c + pwd.c seq.c sleep.c stty.c su.c tee.c test.c tty.c uname.c + who-users.c whoami.c yes.c: Don't include version.h. + (main): Use PACKAGE_VERSION instead of version_string. + +Fri Mar 15 23:42:29 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * basename.c: Remove __P-protected prototype for basename. + Reported by François Pinard. + (remove_suffix): Move to precede use. Remove prototype. + Declare formal parameter SUFFIX to be const. + + * pathchk.c (validate_path): Cast path_max to size_t before + comparing with strlen(path). + + * who-users.c (read_utmp): Declare n_read to be of type size_t + rather than int. + +Tue Mar 12 17:52:05 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * basename.c date.c dirname.c echo.c env.c expr.c factor.c hostname.c + id.c logname.c nice.c pathchk.c printenv.c printf.c pwd.c seq.c + sleep.c stty.c su.c tee.c test.c tty.c uname.c who-users.c whoami.c + yes.c (main): Initialize for internationalized message support: + call setlocale, bindtextdomain, and textdomain. + * system.h: Add definitions and includes for NLS. + * Makefile.am (SUBDIRS): Add intl and po. + * src/Makefile.am (datadir): Define. + (localedir): Define. + (DEFS): Add LOCALEDIR definition. + (LDADD): Add @INTLLIBS@. + * aclocal.m4: Add NLS-related macro definitions from + gettext distribution. + * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES, + HAVE_STPCPY): New macros. + Add PACKAGE and VERSION. + * configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED. + (VERSION): Likewise. + (ALL_LINGUAS): Define. + (ud_GNU_GETTEXT): Use it. + Link an nls file. + (AC_OUTPUT): Reflect addition of two new directories, intl and po. + Create po/Makefile. + Mostly from François Pinard. + +Wed Mar 6 21:40:34 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * who-users.c (print_entry): Use STRUCT_UTMP, not `struct utmp' to + declare formal parameter. + +Tue Mar 5 22:49:33 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * getdate.y (RelativeMonth): Add 1900 to the year so that relative + date specs that push the year through the end of the century work. + For example, `date -d "01/01/1998 3 years" +%Y' now prints 2001. + From Peter Dalgaard (pd@kubism.ku.dk). + +Mon Mar 4 23:46:43 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * seq.c (main): Exit after processing --version. + Reported by François Pinard. + +Fri Mar 1 23:46:32 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * expr.c (docolon): Don't initialize re_syntax_options to + deceptively-named RE_SYNTAX_POSIX_BASIC -- it recognizes non-BRE + \?, \+, and \|. Use RE_SYNTAX_POSIX_MINIMAL_BASIC instead. + + * od.c (WINDOWS_SETFILEMODE_BINARY): New macro. + (skip) [_WIN32 && _O_BINARY]: Use it. + (read_char): Likewise. + (read_block): Likewise. + [_WIN32 && _O_BINARY]: Include malloc.h and io.h. + Based on changes by Gary Newman <gnewman@shore.net>. + +Wed Feb 28 21:48:07 1996 Paul Eggert <eggert@twinsun.com> + + * configure.in (LOCALTIME_CACHE): + Also define if localtime mishandles unsetting TZ. + This works around a localtime bug in mips-dec-ultrix. + +Wed Feb 28 23:08:24 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * lib/Makefile.am (su_SOURCES): Add xstrtoul.c. + (noinst_HEADERS): Add xstrtoul.h. + + * factor.c: General cleanup. Use xstrtoul, not atoi. + Change output format. Allow inputs as large as ULONG_MAX. + Allow more than one command line argument. + + * stty.c (wrapf) [!__STDC__]: Indent by one space the first line + of the pre-ANSI function definition so ansi2knr doesn't munge it. + + * src/Makefile.am: Adapt for automake-0.30. + * lib/Makefile.am: Likewise. + + * expr.c (eval6): Cast strlen to int to avoid warning from gcc -Wall. + +Sun Feb 25 22:19:52 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * src/Makefile.am (BUILT_SOURCES): Set to `who.c users.c'. + (MOSTLYCLEANFILES): Add who.c and users.c. + (who.c): New rule to create this file. Concatenate definition of + WHO and contents of who-users.c. + (users.c): New rule to create this file. Concatenate definition of + USERS and contents of who-users.c. + +Sat Feb 24 12:20:58 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * readtokens.c: Unprotoize. + + * expr.c (cmpf): Indent macro uses so ansi2knr doesn't mistake them + for function dcls and munge them. + (arithf): Likewise. + (arithdivf): Likewise. + + * test.c: __P-protect forward declarations. + (main): Protoize function definition. + + * date.c (batch_convert): Declare BUFLEN local to be of type size_t, + not int. + + * expr.c (docolon): Set re_syntax_options to RE_SYNTAX_POSIX_BASIC + so expr's pattern matching uses BASIC (not GNU-extended) REs. + Reported by Jim Kingdon. + + * who-users.c (print_entry): Use strchr, not index. + + * configure.in (AC_CHECK_HEADERS): Add sys/socket.h. + * canon-host.c [HAVE_SYS_SOCKET_H]: Include <sys/socket.h> for + definition of AF_INET on at least SunOS 4. + +Tue Feb 13 23:49:16 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * who-users.c (main): When failing because there were + `too many arguments,' say so. + +Mon Feb 12 23:26:05 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * configure.in (AC_CHECK_FUNCS): Add gethostbyname, gethostbyaddr, + and inet_ntoa. + (AC_CHECK_HEADERS): Add netdb.h netinet/in.h arpa/inet.h. + * lib/canon-host.c: New file. + * lib/Makefile.am (su_SOURCES): Add canon-host.c. + * src/who.c (print_entry): If possible, canonicalize the host hame. + From Miles Bader (miles@gnu.ai.mit.edu). + + Update for automake-0.29. + * Makefile.am (CONFIG_HEADER): Don't define. Automake now does it. + * src/Makefile.am: Likewise. + * lib/Makefile.am: Likewise. + * doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS. + * man/Makefile.am (man_MANS): Renamed from MANS. + +Wed Jan 31 23:40:50 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * lib/strftime.c (add_num_tz): New function. + (strftime): Handle new %z format. + * date.c (main): Accept new option, --rfc-822 (-R). + (show_date): Use RFC822-mandated strftime format. + From H. Peter Anvin (hpa@storm.net). + (usage): Add a line describing the new option. + + * lib/strftime.c (add_num_tz): Don't use local, LENGTH, + before it's defined. + +Mon Jan 29 19:24:04 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * acconfig.h (PROTOTYPES): Define it. + +Fri Jan 19 22:00:08 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * aclocal.m4 (fp_PROG_INSTALL): New macro. + * configure.in: Use it instead of AC_PROG_INSTALL. + + * who-users.c: Protoize. + +Wed Jan 17 23:37:59 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * stty.c: Protoize and __P-protect forward dcls. + (visible): Change parameter type to unsigned int from unsigned char. + (integer_arg): Use xstrtol instead of open-coding this. + + * lib/Makefile.am (su_SOURCES): Add xstrtol.c. + (HEADERS): Add xstrtol.h. + + * test.c (advance): Protoize function. + + * sleep.c (argdecode): Declare parameter const. + +Sat Jan 13 22:31:23 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * stty.c: Indent cpp directives. + +Sun Jan 7 23:56:03 1996 Jim Meyering (meyering@na-net.ornl.gov) + + Use automake to generate Makefile.in files. + * Makefile.am: New file. + * doc/Makefile.am: New file. + * lib/Makefile.am: New file. + * man/Makefile.am: New file. + * src/Makefile.am: New file. + + * configure.in (OPTIONAL_PROGS, OPTIONAL_SCRIPTS): New variables + used in place of PROGS. + +Sat Jan 6 05:13:40 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * configure.in (PACKAGE, VERSION): New variables. + (fp_C_PROTOTYPES): Use it. + + * printf.c (print_esc_char): Change type of argument from char + to int to avoid potential promotion problem. + * uname.c (print_element): Likewise. + + * system.h [__P]: New macro. + + * basename.c, date.c, dirname.c, echo.c, env.c, expr.c, factor.c, + hostname.c, id.c, logname.c, nice.c, pathchk.c, printenv.c, + printf.c, pwd.c, seq.c, sleep.c, tee.c, test.c, tty.c, uname.c, + whoami.c, yes.c: Protoize and __P-protect forward dcls. + + * who-users.c: New file. Renamed from who.c. + * who.c: Define WHO and include who-users.c. + * uses.c: Define USERS and include who-users.c. + + * id.c Remove no-longer-used NGROUPS_MAX cpp macros. + (print_group_list) [HAVE_GETGROUPS]: Reorganize to use + getgroups (0, NULL) to compute number of groups at run time + rather than relying on NGROUPS_MAX at compile time. + (print_full_info) [HAVE_GETGROUPS]: Likewise. + Suggestion from Roland McGrath. + + * su.c: Remove NGROUPS_MAX junk. It wasn't being used. + +Wed Jan 3 19:03:26 1996 Paul Eggert <eggert@twinsun.com> + + * configure.in (LOCALTIME_CACHE): Define if tzset exists and + if localtime caches TZ. Check for tzset. + * acconfig.h (LOCALTIME_CACHE): New macro. + * date.c (putenv): Declare. + (universal_time): Remove. + (main): If -u is given, set TZ to "UTC0"; this causes date to use + UTC uniformly and fixes bugs in the handling of date -u +'%s %Z'. + (show_date): Just use localtime and a single format, since TZ will + be set properly if -u is given. + +Fri Dec 22 21:34:55 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * configure.in: Touch stamp-h only if config.h is remade. + +Sun Nov 26 16:09:33 1995 Jim Meyering (meyering@comco.com) + + * test.c (usage): Clarify usage. From Karl Berry. + +Wed Nov 22 23:12:47 1995 Jim Meyering (meyering@comco.com) + + * Makefile.in (all et. al.): If make was invoked with -k and a + sub-make fails, fail after the loop rather than exiting right away. + Otherwise, make's -k option could be ineffective. + +Thu Nov 16 21:25:45 1995 Jim Meyering (meyering@comco.com) + + * Makefile.in (default): New default target. Depend on `all' to work + around bug in AIX-3.2.5's /bin/make. Reported by Andreas Luik + <luik@isa.de>. + +Tue Nov 7 23:53:20 1995 Jim Meyering (meyering@comco.com) + + * stty.c (usage): Clarify descriptions of ignpar and ignbrk. + From Theodore Ts'o and Ulrich Windl. + +Sun Oct 29 08:47:50 1995 Jim Meyering (meyering@comco.com) + + * test.c [TEST_STANDALONE]: Define. + * src/Makefile.in (test.o): Remove special rule. + +Sat Oct 28 00:49:13 1995 Jim Meyering (meyering@comco.com) + + * aclocal.m4 (jm_WITH_AUTODEPS): New directive. + * configure.in: Use it. + + * lib/Makefile.in (INCLUDE, COMPILE): New variables. + (.c.o): Rewrite to be more like src/Makefile.in. + Add line that (--with-autodeps) will include mkdep-Makefile. + (distclean): Remove .deps. + * src/Makefile.in: Likewise. + + * mkdep-Makefile: New file. + * Makefile.in (DISTFILES): Add mkdep-Makefile. + + * doc/Makefile.in (mostlyclean): Remove *.info. + + * date.c: New option --reference=FILE (-r FILE) analogous to the + like-named touch option. + (main): Recognize it and give diagnostic for misuse. + (usage): Describe briefly. + From Franc,ois Pinard. + + * date.c (batch_convert): Close input stream also when it's not stdin. + (main): Reorganize to do option-consistency checks before all else. + +Tue Sep 26 23:05:01 1995 Jim Meyering (meyering@comco.com) + + * man/Makefile.in (install-data, uninstall): Use sed not basename. + The GNU Coding Standard suggests that only a select set of + relatively standard utilities be used in Makefiles. basename is + not among them. Suggested by Ulrich Drepper. + +Tue Aug 8 22:57:34 1995 Jim Meyering (meyering@comco.com) + + * yes.c: Include system.h to get definition of _. + +Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com) + + * system.h (_): Define macro -- as empty for now. + * src/*.c: Annotate localizable strings with _(...). From Franc,ois. + + * Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB. + From Franc,ois. + +Fri Jun 23 23:04 1995 Jim Meyering (meyering@comco.com) + + * configure.in (AC_REPLACE_FUNCS): Add memcpy and memset. + Add checks for floor, modf, and rint -- all used by seq.c. + +Mon Jun 12 00:26:54 1995 Jim Meyering (meyering@comco.com) + + * getdate.y (Convert): Use 2037 as threshold, not 1999. + Before years after 1999 were treated as invalid. + From Andreas Schwab. + +Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com) + + * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h. + Without this, SunOS doesn't get type for memchr. + Reported by Kaveh Ghazi. + +Sun May 21 07:20:55 1995 Jim Meyering (meyering@comco.com) + + * Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois. + + * All Makefile.in (install-exec, install-exec): New targets. + From Karl Berry. + + * all Makefile.in (maintainer-clean): Renamed from realclean + per GNU Standards. + +Mon May 15 01:00:08 1995 Jim Meyering (meyering@comco.com) + + * all source files (usage): Include one- or two-line synopsis + in --help output. From Karl Berry. + +Sat May 13 08:57:20 1995 Jim Meyering (meyering@comco.com) + + * lib/Makefile.in (maintainer-clean): Rename from realclean. + (.PHONY): New dependencies. + [.c.o]: Remove -I. since safe-l?stat.h are no longer used. + +Fri May 12 21:25:50 1995 Jim Meyering (meyering@comco.com) + + * test.c (usage): Remove duplicate descriptions of --help + and --version. From Karl Berry. + + * pathchk.c: Use stat (lstat), not safe_stat (safe_lstat). + * test.c: Likewise. + * who.c: Likewise. + + * lib/Makefile.in (SOURCE): Add memcpy.c, memset.c. + Remove all reference to (now unused) safe-xstat.hin. + +Tue Apr 18 22:57:43 1995 Jim Meyering (meyering@comco.com) + + * configure.in (AC_OUTPUT): Use echo, not date, to avoid creating + unnecessary conflicts for people using version control software + like RCS and CVS. + (AC_ARG_PROGRAM): Use it. + +Fri Mar 10 21:14:11 1995 Jim Meyering (meyering@comco.com) + + * src/*.c: Update Copyright dates. + +Mon Feb 27 08:05:25 1995 Jim Meyering (meyering@comco.com) + + * system.h: Separate errno declaration from STDC_HEADERS. + Remove bcopy, bzero, strchr, strrchr definitions. + + * stty.c (main, set_window_size): Use memset instead of bzero. + * su.c (correct_password): Likewise. + + * seq.c Remove \n's from error format strings. + (main): Let `seq 1 1' work. + Invoke usage always with 1 when failing. + +Sat Feb 11 08:27:12 1995 Jim Meyering (meyering@comco.com) + + * src/Makefile.in (install): Fix rules for su to avoid relying on + just-built `id' executable. That would lose when cross-compiling and + on systems like GNU in which a user may have several effective IDs. + (SOURCES, OBJECTS, PROGS): Add seq. + * Makefile.in (PROGS): Add seq. + + * configure.in (AC_REPLACE_FUNCS): Add memcmp, memcpy, and memset. + (AC_CHECK_FUNCS): Add strchr and strrchr. + * lib/Makefile.in (SOURCES): Add memcmp.c, memcpy.c, and memset.c. + + * system.h: Remove index/rindex and bcmp/bcopy/bzero references. + Separate errno declaration from STDC_HEADERS. + +Thu Jan 26 23:38:04 1995 Jim Meyering (meyering@comco.com) + + * getdate.y (ToSeconds): Properly convert 12am and 12pm. + From Takeshi Sone <ts1@tsn.or.jp>. + + * lib/Makefile.in (SOURCES, OBJECTS, DISTFILES): Add readtokens.[coh]. + (all): Depend on safe-stat.h and safe-lstat.h. + + * date.c (batch_convert): Remove any trailing newline from offending + line before including it in the `invalid date' error from `date -f'. + Reported by Franc,ois Pinard. + +Sat Dec 31 09:25:09 1994 Jim Meyering (meyering@comco.com) + + * factor.c: New file. + * Makefile.in (PROGS): Add factor. + * src/Makefile.in (SOURCES, OBJECTS, PROGS): Add factor. + (factor): New rule. + +Mon Dec 26 18:31:08 1994 Jim Meyering (meyering@comco.com) + + * test.c (term): Running `./test \( a -o b' got a seg fault. + From from Klaus.Reichl@aut.alcatel.at. + +Mon Dec 19 22:05:12 1994 Jim Meyering (meyering@comco.com) + + * src/*.c: Include "error.h" rather than simply declaring + `void error ();'. + * src/Makefile.in (OBJECTS): Depend on ../lib/error.h. + + * lib/Makefile.in (DISTFILES): Remove safe-xstat.cin. + (distclean): Remove references to safe-l?stat.c. + Remove all related rules and dependencies. + + * safe-xstat.hin (SAFE_LSTAT, SAFE_STAT): Remove macros. + Now that we always define the functions, these are no longer needed. + + * pathchk.c (dir_ok): Use safe_stat instead of SAFE_STAT. + * who.c (print_entry): Likewise. + * test.c (test_stat, binary_operator): Likewise. + (unary_operator): Use safe_lstat instead of SAFE_LSTAT. + +Mon Dec 12 22:42:09 1994 Jim Meyering (meyering@comco.com) + + * expr.c (docolon): Zero out re_buffer and re_regs before using them. + From H.J. Lu <hjl@nynexst.com>. + +Sun Dec 4 14:53:12 1994 Jim Meyering (meyering@comco.com) + + * dirname.c (main): Use strchr and strrchr instead of index and rindex. + * echo.c (main): Likewise. + * env.c (main): Likewise. + * pathchk.c (validate_path): Likewise. + * printf.c (print_formatted, print_esc): Likewise. + * test.c [member]: Likewise. + * who.c (extract_trimmed_name): Likewise. + * system.h [!HAVE_STRING_H]: Define strchr to index and strrchr to + rindex instead of the other way around. + + * doc/Makefile.in (DISTFILES): Add getdate.texi. + +Sat Dec 3 07:59:55 1994 Jim Meyering (meyering@comco.com) + + * configure.in (AC_CHECK_FUNCS): Add strchr and strrchr. + (AC_CHECK_HEADERS): Add stdlib.h. + (LIBS): If the strtod replacement is required, check for pow in -lm. + * src/Makefile.in (printf): Remove hard-coded -lm. Not every + system has it. + +Thu Nov 17 23:47:26 1994 Jim Meyering (meyering@comco.com) + + * who.c (list_entries): Delete. Split in two actually... + (list_entries_users, list_entries_who, userid_compare): New functions. + (list_entries_users): Sort the user names. Reported by + Michael I Bushnell. + Topologically sort the functions and remove fwd declarations. diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/sh-utils/NEWS b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/sh-utils/NEWS new file mode 100644 index 0000000..7da709d --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/sh-utils/NEWS @@ -0,0 +1,272 @@ + [2.0.15] +* date no longer accepts e.g., September 31 in the MMDDhhmm syntax +* fix a bug in this package's .m4 files and in configure.ac + [2.0.14] +* nohup's behavior is changed as follows, to conform to POSIX 1003.1-2001: + - nohup no longer adjusts scheduling priority; use "nice" for that. + - nohup now redirects stderr to stdout, if stderr is not a terminal. + - nohup exit status is now 126 if command was found but not invoked, + 127 if nohup failed or if command was not found. + [2.0.13] +* uname and uptime work better on *BSD systems +* pathchk now exits nonzero for a path with a directory component + that specifies a non-directory + [2.0.12] +* kill: new program +* who accepts new options: --all (-a), --boot (-b), --dead (-d), --login, + --process (-p), --runlevel (-r), --short (-s), --time (-t), --users (-u). + The -u option now produces POSIX-specified results and is the same as + the long option `--users'. --idle is no longer the same as -u. +* The following changes apply on systems conforming to POSIX 1003.1-2001, + and are required by the new POSIX standard: + - `date -I' is no longer supported. Instead, use `date --iso-8601'. + - `nice -NUM' is no longer supported. Instead, use `nice -n NUM'. +* New 'uname' options -i or --hardware-platform, and -o or --operating-system. + 'uname -a' now outputs -i and -o information at the end. + New uname option --kernel-version is an alias for -v. + Uname option --release has been renamed to --kernel-release, + and --sysname has been renamed to --kernel-name; + the old options will work for a while, but are no longer documented. +* 'expr' now uses the LC_COLLATE locale for string comparison, as per POSIX. +* 'expr' now requires '+' rather than 'quote' to quote tokens; + this removes an incompatibility with POSIX. +* date -d 'last friday' would print a date/time that was one hour off + (e.g., 23:00 on *thursday* rather than 00:00 of the preceding friday) + when run such that the current time and the target date/time fall on + opposite sides of a daylight savings time transition. + This problem arose only with relative date strings like `last monday'. + It was not a problem with strings that include absolute dates. +* factor is twice as fast, for large numbers + [2.0.11] +* setting the date now works properly, even when using -u +* `date -f - < /dev/null' no longer dumps core +* some DOS/Windows portability changes + [2.0j] +* `date -d DATE' now parses certain relative DATEs correctly + [2.0i] +* fixed a bug introduced in 2.0h that made many programs fail with a + `write error' when invoked with the --version option + [2.0h] +* all programs fail when printing --help or --version output to a full device +* printf exits nonzero upon write failure +* yes now detects and terminates upon write failure +* date --rfc-822 now always emits day and month names from the `C' locale +* portability tweaks for Solaris8, Ultrix, and DOS + [2.0g] +* date now handles two-digit years with leading zeros correctly. +* printf interprets unicode, \uNNNN \UNNNNNNNN, on systems with the + required support; from Bruno Haible. +* stty's rprnt attribute now works on HPUX 10.20 +* seq's --equal-width option works more portably + [2.0f] +* fix build problems with ut_name vs. ut_user + [2.0e] +* stty: fix long-standing bug that caused test failures on at least HPUX + systems when COLUMNS was set to zero +* still more portability fixes +* unified lib/: now that directory and most of the configuration framework + is common between fileutils, textutils, and sh-utils + [2.0d] +* fix portability problem with sleep vs lib/strtod.c's requirement for -lm + [2.0c] +* fix portability problems with nanosleep.c and with the new code in sleep.c + [2.0b] +* Regenerate lib/Makefile.in so that nanosleep.c is distributed. + [2.0a] +* sleep accepts floating point arguments on command line +* sleep's clock continues counting down when sleep is suspended +* when a suspended sleep process is resumed, it continues sleeping if + there is any time remaining +* who once again prints whatever host information it has, even without --lookup +Changes in release 2.0 +* disable stty tests (otherwise they fail) when `make check' is run via rsh + [1.16m] +* false and true now ignore --help and --version when POSIXLY_CORRECT is set + [1.16l] +* false and true are now C programs rather than shell scripts + [1.16k] +* fix typos in my version of AC_SEARCH_LIBS. +* fix dates on config files so builders don't need autoconf/automake + [1.16j] +* work around problems with my use of AC_SEARCH_LIBS +* fix a bug in id + [1.16i] +* portability tweaks for lib/readutmp.[ch] and src/date.c + [1.16h] +* seq with no arguments now elicits a useful diagnostic rather than a segfault +* portability tweaks to work around utmpname differences +* who works on Solaris + [1.16g] +* factor now uses uintmax_t, so the largest number it can factor is now 2^64 - 1 + on systems with type `long long'. +* nohup no longer modifies the shell's search path +* `basename /' now prints `/', per the single unix spec +* `who --lookup' no longer erroneously reports `localhost' for IP addresses + for which it could not do a reverse lookup. +* `id user' wouldn't report a group id in some situations. Now it always does. + [1.16f] +* chroot now calls chdir ("/") after chroot. +* `date -s' now exits with nonzero status upon failure +* new autoconf tests detect bugs in vendor mktime from Irix-6.4 and SunOS4.1.4 + Your executables will be a little larger on such systems because you'll use + GNU's mktime function, but date will work more reliably. +* hostid: new program +* `yes --help' and `yes --version' print those strings when the POSIXLY_CORRECT + environment variable is set +* who no longer does DNS lookups by default -- the new option, --lookup (-l), + enables lookups + [1.16e] +* pinky: new lightweight finger-style program + [1.16d] +* the groups script now exits non-zero and doesn't print anything more + when `id' fails + [1.16c] +* date -u -d DATE now prints the correct date +* don't remove already-installed su unless it is possible to install the + new one setuid root. + [1.16b] + [1.16a] +* expr accepts new unary operator, quote. +* expr now returns 0 for failed matches where pattern contained e.g., `\\(' +* date -d DATE now works on Unicos systems +* add tests for factor and more for date. +* factor runs a lot faster for large 64-bit inputs +* date works with relative offsets involving the `next' keyword + +Changes in release 1.16 +* stty -tabs works properly +* add tests for date +* date --date "02/29/1996 - 1 year" now works properly + +Changes in release 1.15 +* nice works with very recently-changed GNU libc getopt +* fix several bugs in m4 macros used to create `configure' script +* id works on systems with disfunctional getgroups function +* uptime configure test detects /proc/uptime on Linux + +Changes in release 1.14 +* fix bug in getdate.y that broke date's --date=DATE option on systems + like SunOS4. +* expr treats unadorned ? and + as literals. To make expr treat them as + operators you have to use \? and \+. + +Changes in release 1.13 +* two patches for ISC +* Regenerate all Makefile.in using a patched version of automake-1.1l. + [1.12s] +* lots of little bug fixes -- see ChangeLog + [1.12r] +* uname --processor (-p) works on systems that have sysinfo and define + SI_ARCHITECTURE. +* stty works better on systems like i386-pc-isc3.0 +* date --date=DATE accepts dates like those in an RCS log listing, e.g., + `1992/11/01 05:44:34'. +* printf now warns if excess arguments are ignored. +* tee no longer fails immediately upon receipt of SIGPIPE + [1.12q] +* running `make check' runs tests of nice +* lots of configuration-related improvements +* nice allows `+' in options like -+8 and -+13. +* when matching, expr warns about non-portability when the first character + of the basic regular expression is `^' +* `id user' no longer prints bogus group list +* uses automake-generated Makefile templates +* date accepts new %V format +* date's %U and %W formats work properly +* nice option handling works with 2-digit old-style-option adjustments. + Now, `nice -18 -- nice' prints `18'. Before it printed `8'. +* internationalized diagnostic messages +* `date -d "01/01/1998 3 years" +%Y' now works properly. It prints 2001. +* New programs: chroot, factor, seq, uptime. +* date accepts new option: --rfc-822 (-R) +* date accepts new format, %z, for RFC-822 style numeric timezone (-0500) +* date: fix bugs in the handling of date -u +'%s %Z'. +* date accepts new option --reference=FILE (-r FILE) analogous to the + like-named touch option. +* date can now format dates up to and including ones in the year 2037 +User visible changes in release 1.12 +* None. +User visible changes in release 1.11 +* date accepts new option: (-f) --file=DATEFILE +* skeletal texinfo documentation (mainly just the `invoking' nodes) +* `stty werase ^W' works. Before, werase wasn't enabled for AIX-3.2.5. +* su with no arguments works properly +* nice accepts options like `--5' (this is interpreted like `-n -5') +* nice now interprets `-1 -1' like `-1' not like `-11' +* `stty speed' and `stty size' no longer output a spurious newline +User visible changes in release 1.10 +* change package name from shellutils to sh-utils +* add hostname, pwd, and users commands +* --version outputs the name of the utility as well as the package name + and version number. +* Configure properly determines options for stty on SCO ODT 3.0 systems. +* `date -d' works better. Before, `date -d '4apr94'' produced + `Sun Apr 3 23:00:00 CDT 1994'. +User visible changes in release 1.9.4 +* Repair stty option handling. +User visible changes in release 1.9.3 +* `stty -a -g' gets a diagnostic +* `stty {-a|-g} any-other-argument' gets a diagnostic +* stty no longer ignores some of its arguments +* basename and dirname no longer treat `--' specially +* `basename -- file.c .c' generates a usage error. Before, it output `file'. +* `basename file-dist -dist' outputs `file'. Before it output `file-dist'. +* stty defaults `swtch' to undefined for Solaris so `susp' (^Z) will work. + Before, with the default settings ^Z did nothing. +* stty no longer gives an error message when it finds a spurious difference + (due to buggy tcgetattr/tcsetattr) between requested and current tty + modes under SunOS 4.1.x. +* stty no longer fails if the ioctl to determine the display width fails + when displaying settings. +* stty works around SunOS 4.x kernel bug that made `stty rows 0 cols 0' fail. +* who and tee no longer fail gratuitously when continued after an + interrupted read or write system call. +* date accepts new format: %s time in seconds since 1970-01-01 00:00:00 UCT +* date -d can parse dates like `11-JUL-1991' +* expr '' == 0 works (before, it printed 1) +* stty no longer fails on telnet sessions to Solaris systems +* `cd /etc; who utmp' now works. Before, any filename argument had to be + absolute or relative to /dev. + +User visible changes in release 1.9.2: +* who output is better formatted on Solaris and other SysVr4 systems +* fix a minor problem in formatting the output from `stty -a' +* yes with arguments outputs newlines again +* partial stty failures are reported + +Major changes in release 1.9.1: +* stty can be built on Suns again +* minor fix for who -q + +Major changes in release 1.9: +* su fails gracefully when getpass is unable to open /dev/tty. +* printenv and tty detect and report write errors +* fix bug in stty +* stty accepts the new options status and flush on systems that provide them +* `expr 1 / 0' gives an error message rather than trying to divide by zero +* expr's `substr' doesn't overrun malloc'd buffer +* expr recognizes the string `0' as zero +* better support for Linux, Dec Alpha, and SGI Irix +* all programs (even true and false) accept --version and --help options +* uname's --version option is no longer equivalent to its -v option +* configure uses config.h, so DEFS won't exceed preprocessor limits of + some compilers on the number of symbols defined via -D. +* work around problem where $(srcdir)/config.h was used instead of + ../config.h -- this happened only when building in a subdirectory + and when config.h remained in $(srcdir) from a previous ./configure. +* make may be run from the subdirectories + +Major changes in release 1.8: +* add echo command +* fix some incorrect warnings in pathchk +* look at the right utmp file on 386BSD +* date doesn't dump core on some systems now + +Major changes in release 1.7: +* add su, who, true, false commands +* add more tests to expr +* fix printf program handling of \ escapes +* printf can re-use format string for multiple groups of arguments +* printf catches numeric conversion errors with an ANSI C library +* stty nl and -nl were backwards +* date can format an arbitrary date without setting it diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/textutils/ChangeLog b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/textutils/ChangeLog new file mode 100644 index 0000000..12ceb73 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/textutils/ChangeLog @@ -0,0 +1,8738 @@ +2002-07-29 Jim Meyering <meyering@lucent.com> + + * Version 2.1. + + * src/tail.c: Adjust command examples in comments to use + POSIX 1003.1-2001 option syntax. + * src/sort.c: Likewise. + From Paul Eggert. + +2002-07-28 Jim Meyering <meyering@lucent.com> + + * configure.ac: Require automake-1.6b. + +2002-07-20 Jim Meyering <meyering@lucent.com> + + * Version 2.0.22. + + * Upgrade to cvs automake -- required to work with 2.53b. + * configure.ac: Require automake-1.6a. + + * Upgrade to gettext-0.11.3. + * Upgrade to autoconf-2.53b. + +2002-07-02 Jim Meyering <meyering@lucent.com> + + * src/cat.c, src/cksum.c, src/comm.c, src/csplit.c, src/cut.c (usage): + Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it. + * src/expand.c, src/fmt.c, src/fold.c, src/head.c, src/join.c: Likewise. + * src/md5sum.c, src/nl.c, src/od.c, src/paste.c, src/pr.c: Likewise. + * src/sort.c, src/split.c, src/sum.c, src/tac.c, src/tail.c: Likewise. + * src/tr.c, src/tsort.c, src/unexpand.c, src/uniq.c, src/wc.c: Likewise. + +2002-06-22 Jim Meyering <meyering@lucent.com> + + * configure.ac: Invoke AC_GNU_SOURCE very early. + +2002-06-15 Jim Meyering <meyering@lucent.com> + + * src/cksum.c: Include <sys/types.h> before system.h. + +2002-05-22 Jim Meyering <meyering@lucent.com> + + * src/od.c [struct dummy]: Renamed. Don't rely on portability of + zero-length arrays. Instead, use sizes of -1 or +1. + Reported by Eric Backus. + +2002-05-14 Jim Meyering <meyering@lucent.com> + + `od -t f8' didn't work. + This bug was introduced with my change of 2000-10-22 (textutils-2.0.8). + * src/od.c (ulonglong_t): Move declaration to precede new use. + [enum size_spec] (N_SIZE_SPECS): New member. + (width_bytes): Add initializer corresponding to ulonglong_t type. + (struct assert_width_bytes_matches_size_spec_decl): Declare. + Based on a patch from Tony Kocurko. + +2002-04-29 Paul Eggert <eggert@twinsun.com> + + Use ENABLE_NLS only for gettext-related stuff, not also for + setlocale-related stuff. From a patch suggested by Bruno + Haible. + + Since setlocale is now almost universal, this patch also + removes some of the optimizations that clutter up the code and + which don't help all that much even on hosts that lack + setlocale. + + * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1. + * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h. + Do not check for alloca.h (no longer used) or stdbool.h (was never + used?). Add AM_C_PROTOTYPES since hard-locale.h uses it. + + * src/sys2.h (HAVE_SETLOCALE): Define to 0 if not defined. + * src/comm.c (compare_files): Replace #ifdef ENABLE_NLS + with if (HAVE_SETLOCALE). + * src/join.c (keycmp): Likewise. + * src/sort.c (keycompare, compare): Likewise. + + * src/comm.c (hard_LC_COLLATE): Define even if ! ENABLE_NLS. + * src/join.c (hard_LC_COLLATE): Likewise. + * src/sort.c (hard_LC_COLLATE): Likewise. + + * src/comm.c (main): Always initialize hard_LC_COLLATE. + Put initialization next to other locale-related stuff. + * src/join.c (main): Likewise. + * src/sort.c (main): Likewise. + + * src/sort.c: Include <langinfo.h> even if ! ENABLE_NLS. + (decimal_point, th_sep): Depend on HAVE_SETLOCALE, not ENABLE_NLS. + (main): Likewise. + (MONTHTAB_CONST): Remove; all uses removed. + (struct_month_cmp, inittables): Do not depend on ENABLE_NLS. + (main): hard_LC_TIME locale does not depend on ENABLE_NLS. + +2002-04-29 Jim Meyering <meyering@lucent.com> + + * src/tail.c (parse_obsolescent_option): Do not limit the maximum + line/byte count (when specified via obsolete option syntax) to be + less than ULONG_MAX on systems where OFF_T_MAX is larger. + +2002-04-28 Paul Eggert <eggert@twinsun.com> + + * src/tail.c (tail_forever): Do not treat + max_n_unchanged_stats_between_opens specially (as if it were + infinite) if it has its maximal value. Similarly for + max_n_consecutive_size_changes_between_opens. + +2002-04-28 Jim Meyering <meyering@lucent.com> + + Avoid new warnings from gcc. + * src/pr.c [struct COLUMN] <name>: Declare member to be const. + (init_fps): Declare local variable `firstname' to be const. + +2002-04-25 Jim Meyering <meyering@lucent.com> + + * src/wc.c (usage): Adjust ordering to match that of default output. + Suggestion from Gaute Hvoslef Kvalnes. + + * configure.ac (AM_GNU_GETTEXT): Add external arg. + (AC_CONFIG_FILES): Remove intl/Makefile. + * Makefile.am (SUBDIRS): Remove intl. + * src/Makefile.am (INCLUDES): Remove -I../intl. + +2002-04-15 Jim Meyering <meyering@lucent.com> + + * src/tr.c (usage): Give a verbose description of --squeeze-repeats, + including the mention of SET1. Reported by Dan Jacobson. + +2002-04-12 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (LDADD): List ../lib/libfetish.a both before + and after @LIBINTL@. Thanks to Paul Eggert for the fix and to + Bruno Haible for diagnosing the problem. + +2002-03-16 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (datadir): Don't override $(datadir) + which might be set by --datadir and different from $(prefix)/share. + Patch from Albert Chin-A-Young. + +2002-03-10 Jim Meyering <meyering@lucent.com> + + * configure.ac (AM_INIT_AUTOMAKE): Specify the required version + of automake (1.6), and options (gnits dist-bzip2), rather than... + * Makefile.am (AUTOMAKE_OPTIONS): ...here. Remove definition. + +2002-03-09 Jim Meyering <meyering@lucent.com> + + * Makefile.am (EXTRA_DIST): Remove config/config.rpath, + now that automake knows about it. + +2002-03-05 Jim Meyering <meyering@lucent.com> + + * Makefile.am (EXTRA_DIST): Add config/config.rpath. + +2002-02-23 Paul Eggert <eggert@twinsun.com> + + * src/cat.c (simple_cat, cat, main): Use char * rather than + unsigned char *, to avoid some technical violations of the C + standard, and to avoid the need for casts. I guess the + unsigned char * was probably there for improved performance + with ancient compilers, but the code wasn't using the + unsignedness any more. + Reported by Nelson H. F. Beebe. + + (cat): int -> size_t for full_write arg. This doesn't + fix any bugs since the buffer size is small, but it makes + the code a bit clearer. + +2002-02-18 Jim Meyering <meyering@lucent.com> + + * Version 2.0.21. + + * tests/tail/Test.pm: For tests matching /^(obs|err-[134])/, + put _POSIX2_VERSION=199209 in the environment, so the tests succeed + even when the environment would have contained _POSIX2_VERSION=200112. + * tests/uniq/Test.pm (test_vector): Rename tests of obsolete usage + to have prefix of `obs'. Adjust environment for those tests as above. + + * tests/mk-script: When getting input via a pipe, apply the + environment settings to the command in question, not to `cat'. + No longer allow more than one element in the $Test::env or + $Test::env_default arrays. No caller used that feature. + +2002-02-17 Jim Meyering <meyering@lucent.com> + + * tests/head/Test.pm: Accept pre-POSIX 1003.1-2001 options. + * tests/pr/Test.pm: Likewise. + * tests/sort/Test.pm: Likewise. + + * Makefile.cfg (wget_files): Reflect new location of these files. + +2002-02-16 Jim Meyering <meyering@lucent.com> + + * ABOUT-NLS, intl/*: Update to Gettext 0.11. + * INSTALL: Update to Autoconf 2.52h. + + * src/Makefile.am (datadir): Use `share' in place of @DATADIRNAME@, + per Gettext-0.11. + (LDADD): Use @LIBINTL@ instead of @INTLLIBS@, per Gettext-0.11. + + * configure.ac (AC_CONFIG_AUX_DIR): New macro invocation. + (ALL_LINGUAS): Remove: now in po/LINGUAS as per Gettext 0.11. + + * config: New subdirectory, containing the following files from .: + config.guess, config.sub, depcomp, missing, install-sh, mkinstalldirs. + Move the following files here from doc: texinfo.tex, mdate-sh. + +2002-02-15 Paul Eggert <eggert@twinsun.com> + + Add support for _POSIX2_VERSION, which lets you pick which POSIX + version you want the utilities to conform to. Remove warnings about + failure to conform to a future POSIX version. + + * NEWS, doc/coreutils.texi: Document _POSIX2_VERSION. + * doc/coreutils.texi (Standards Conformance): New section. + + * src/expand.c: Include posixver.h. + (usage): Document only the intersection of the old and new behaviors, + to encourage portability. + * src/fold.c: Likewise. + * src/head.c: Likewise. + * src/od.c: Likewise. + * src/pr.c: Likewise. + * src/sort.c: Likewise. + * src/split.c: Likewise. + * src/uniq.c: Likewise. + * src/tail.c: Likewise. + * src/unexpand.c: Likewise. + + * src/expand.c (shortopts): Remove; no longer needed. + * src/od.c (short_options): Likewise. + * src/pr.c (short_options): Likewise. + * src/sort.c (short_options): Likewise. + * src/split.c (shortopts): Likewise. + * src/uniq.c (shortopts): Likewise. + * src/unexpand.c (shortopts): Likewise. + + * src/od.c (COMMON_SHORT_OPTIONS): New macro. + * src/pr.c (COMMON_SHORT_OPTIONS): Likewise. + * src/sort.c (COMMON_SHORT_OPTIONS): Likewise. + + * src/expand.c (main): Revert to previous behavior, except report + an error and exit if the obsolete syntax is used and if conforming + to the new standard. + * src/fold.c (main): Likewise. + * src/head.c (main): Likewise. + * src/split.c (main): Likewise. + * src/uniq.c (main): Likewise. + * src/tail.c (main, parse_obsolescent_option): Likewise. + * src/unexpand.c (main): Likewise. + + * src/od.c (STRINGS_OPTION, WIDTH_OPTION): Remove; no longer needed. + All uses changed back to the corresponding short options. + * src/pr.c (SEP_STRING_OPTION): Likewise. + + * src/od.c (main): Parse options using POSIX 1003.1-2001 rules if + conforming to that standard. Do not warn of obsolete options. + * src/pr.c (main): Likewise. + * src/sort.c (main): Likewise. + + * src/system.h (_POSIX2_VERSION, POSIX2_VERSION): Remove definitions. + (OPTARG_POSIX, OBSOLETE_OPTION_WARNINGS): Likewise. + +2002-02-16 Jim Meyering <meyering@lucent.com> + + * tests/misc/split-a: New test for change of 2002-02-05. + * tests/misc/Makefile.am (TESTS): Add split-a. + +2002-02-12 Jim Meyering <meyering@lucent.com> + + * src/split.c (DEFAULT_SUFFIX_LENGTH): Define constant. + (suffix_length): Use it here. + (usage): Use it here. + +2002-02-05 Paul Eggert <eggert@twinsun.com> + + Change 'split' to conform to POSIX. It now accepts an -a or + --suffix-length option, and refuses to generate more files + than there are suffixes. + + * NEWS, doc/coreutils.texi: Document this. + * src/split.c: Include "dirname.h". + (outbase): Now a global var. + (outfile_end): Remove. + (suffix_length): New var. + (shortopts, longopts, main): Add -a or --suffix-length. + (next_file_name): Implement -a. Do not extend the suffix length. + Check for file names that are too long. + (main): Move outfile initialization to next_file_name. + + * src/split.c (shortopts): Remove -v (a typo). + +2002-02-11 Jim Meyering <meyering@lucent.com> + + * tests/misc/head-pos: New file/test for the change of 2002-02-08. + * tests/misc/Makefile.am (TESTS): Add head-pos. + + * src/tr.c (unquote): Make comment a little clearer. + +2002-02-08 Paul Eggert <eggert@twinsun.com> + + * src/head.c (head_lines): If we have read too much data, try + to seek back to the position we would have gotten to had we + been reading one byte at a time. POSIX currently doesn't + require this, but it's easy to do and some software relies on it. + +2002-02-02 Jim Meyering <meyering@lucent.com> + + * src/uniq.c (main): Prepend `warning: ' to the diagnostic, so it's + consistent with all of the other `... is obsolete...' diagnostics. + +2002-01-31 Paul Eggert <eggert@twinsun.com> + + Add more support for POSIX 1003.1-2001, which requires removal for + support of obsolete "-N" option syntax in expand, head, fold, + split, tail, unexpand, uniq, and which prohibits options with + optional arguments in od and pr. + + * NEWS: Document this. + * doc/coreutils.texi: Likewise. + * src/expand.c (usage): Likewise. + * src/fold.c (usage): Likewise. + * src/head.c (usage): Likewise. + * src/od.c (usage): Likewise. + * src/pr.c (usage): Likewise. + * src/split.c (usage): Likewise. + * src/unexpand.c (usage): Likewise. + * src/uniq.c (usage): Likewise. + + * NEWS: Improve doc for previous fix in this area. + + * src/expand.c (shortopts): New constant. + * src/od.c (short_options): Likewise. + * src/pr.c (short_options): Likewise. + * src/sort.c (short_options): Likewise. + * src/split.c (shortopts): Likewise. + * src/unexpand.c (shortopts): Likewise. + * src/uniq.c (shortopts): Likewise. + + * src/expand.c (main): Check for obsolete options. + * src/fold.c (main): Likewise. + * src/head.c (main): Likewise. + * src/od.c (main): Likewise. + * src/pr.c (main): Likewise. + * src/sort.c (main): Likewise. + * src/split.c (main): Likewise. + * src/tail.c (parse_obsolescent_option, main): Likewise. + * src/unexpand.c (main): Likewise. + * src/uniq.c (main): Likewise. + + * src/head.c (header_mode_option): New constant. + + * src/od.c: New enum for long options. + + * src/pr.c (SEP_STRING_OPTION): New enum value. + (long_options): Use it. + + * src/split.c (main): Use -1, not EOF, for getopt_long. + + * src/system.h (OPTARG_POSIX, OBSOLETE_OPTION_WARNINGS): New macros. + + * src/fold.c (main): Fix bug: -- -N was treated as -N --. + +2002-02-01 Jim Meyering <meyering@lucent.com> + + * src/tail.c (start_lines): Handle the case in which bytes_read is zero. + +2002-01-28 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (ac-check): Remove, now that we no longer have + to duplicate that information. + (local-check): Remove ac-check. + + * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.5d. + + * configure.ac (AM_INIT_AUTOMAKE): Use zero-arg form of this macro. + (ALL_LINGUAS): Add the bokmÃ¥l dialect of Norwegian (nb). + +2002-01-27 Jim Meyering <meyering@lucent.com> + + tail -n +2 would perform an extra read after encountering EOF + * src/tail.c (start_lines): Detect EOF, inform caller. + (tail_lines): Upon EOF in start_lines, return immediately. + +2002-01-22 Jim Meyering <meyering@lucent.com> + + * Version 2.0.20. + +2002-01-22 Paul Eggert <eggert@twinsun.com> + + * src/od.c (skip): Remove redundant check for overflow. + fseeko's seek argument is already known to be in range, + since it is less than the file size. + +2002-01-22 Jim Meyering <meyering@lucent.com> + + * po/POTFILES.in: Add lib/xmemcoll.c. + +2002-01-22 Paul Eggert <eggert@twinsun.com> + + * src/tac.c (save_stdin): Report proper errno value after + fwrite failures. Do not bother to rewind the temp file, as + it'll be read backwards anyway. + +2002-01-22 Paul Eggert <eggert@twinsun.com> + + * src/ptx.c (swallow_file_in_memory): Work even if `open' returns 0. + Check for `close' error. + +2002-01-22 Paul Eggert <eggert@twinsun.com> + + Port to glibc 2.2.5, whose mmap stdio positions the underlying + file descriptor at a nonzero offset after an fopen. + + * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO. + * src/od.c (skip): Use fseeko rather than lseek. + (Also, check for overflow when converting uintmax_t to off_t.) + * src/sys2.h (EOVERFLOW, fseeko): New macros. + +2001-01-21 Paul Eggert <eggert@twinsun.com> + + * src/comm.c: Include xmemcoll.h, not memcoll.h. + Use xmemcoll instead of memcoll. + * src/join.c: Likewise. + * src/sort.c: Likewise. + + * src/sort.c (die): Do not invoke cleanup; atexit does this now. + (main): Use atexit to invoke cleanup on exit. + Set xmemcoll_exit_failure to SORT_FAILURE. + +2002-01-20 Paul Eggert <eggert@twinsun.com> + + * src/comm.c (compare_files): Don't assume that the difference + between two size_t values can be stored in an int; this doesn't + work, for example, on 64-bit Solaris. + * src/sort.c (CMP_WITH_IGNORE): Likewise. + * src/join.c (keycmp): Likewise. Also, fix the type of two locals + to be size_t instead of int. + +2002-01-20 Paul Eggert <eggert@twinsun.com> + + * src/csplit.c: Don't include "xalloc.h", as system.h already + does that via sys2.h. + * src/sort.c: Likewise. + +2002-01-19 Jim Meyering <meyering@lucent.com> + + * configure.ac: Remove code that set LIBOBJS in support of ansi2knr. + The latest version of autoconf objected to it, and besides, I don't + care too much about K&R support these days. + +2002-01-18 Jim Meyering <meyering@lucent.com> + + Fix tr so it no longer gets a failed assertion for [::] or [==]. + + * src/tr.c (xmemdup): Rename from `substr' and rewrite to + take only pointer/length parameters. + (build_spec_list): Update sole caller. + Properly diagnose the invalid specs [::] and [==]. + Pawel Prokop reported that `tr '[::]' x' elicits a failed assertion. + * tests/tr/Test.pm: Add tests for the above fix. + +2002-01-14 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (main): Issue a warning for obsolete usage, unless + POSIXLY_CORRECT. + * src/tail.c (parse_obsolescent_option): Likewise. + * src/uniq.c (main): Likewise. + +2002-01-14 Paul Eggert <eggert@twinsun.com> + + Add support for POSIX 1003.1-2001, which requires removal for + support of obsolete "+" option syntax in sort, tail, and uniq. + + * NEWS: Document this. + + * src/sort.c (usage, main): Implement this. + * src/tail.c (usage, parse_obsolescent_option): Likewise. + * src/uniq.c (usage, main): Likewise. + * src/system.h (_POSIX2_VERSION, POSIX2_VERSION): New macros. + + * src/sys2.h (ISDIGIT, S_ISVTX, S_IXUGO): Comment fix. + +2002-01-14 Jim Meyering <meyering@lucent.com> + + * tests/misc/sort: New test, for just-fixed bug. + * tests/misc/Makefile.am (TESTS): Add sort. + (TESTS_ENVIRONMENT): Add PROG=$$tst. This is a gross kludge + that depends on the name of an automake-generated local variable. + +2002-01-13 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (mergefps): Fix bug when eliminating empty files. + Bug reported by James Hutt. + +2002-01-13 Jim Meyering <meyering@lucent.com> + + * tests/help-version: Tweak to work with the programs in diffutils. + +2002-01-09 Jim Meyering <meyering@lucent.com> + + * configure.in (ALL_LINGUAS): Add Turkish (tr). + +2001-12-18 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (usage, specify_sort_size): Accept 'K' (which is + now preferred, as it connotes 1024) as well as 'k'. + * NEWS: Document this change. + +2001-12-17 Jim Meyering <meyering@lucent.com> + + * src/uniq.c (usage): Remove stray `)' in --help output. + Reported by Padraig Brady. + + * Makefile.maint (real_dir): Remove unused variable. + (url_dir_list): Don't set define it here, but... + * Makefile.cfg (url_dir_list): ...define it here instead. + (hosts, a_host, b_host): Remove now-unused variables. + (alpha_subdir, a_url_dir, b_url_dir): Remove now-unused variables. + +2001-12-12 Bruno Haible <bruno@clisp.org> + Paul Eggert <eggert@twinsun.com> + + * src/wc.c (wc): Use ISSPACE and iswspace in addition to hard-coding + the ASCII space character. + +2001-12-08 Jim Meyering <meyering@lucent.com> + + * Version 2.0.19. + + * Makefile.cfg (wget_files): Remove ansi2knr.c, since it's + no longer available at that location. + +2001-12-03 Jim Meyering <meyering@lucent.com> + + * src/od.c, src/tail.c, src/tr.c (usage): I will not split translatable + strings in the middle of a sentence. I will not split translatable + strings in the middle of a sentence. I will not split translatable + strings in the middle of a sentence. ... + * src/join.c (usage): Merge lone "\n" into adjacent string. + * src/md5sum.c (usage): Likewise. + * src/paste.c (usage): Likewise. + Reported by Karl Eichwalder. + +2001-12-02 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (emit-upload-commands): Fix typo: s/distdir/PACKAGE/. + +2001-12-01 Jim Meyering <meyering@lucent.com> + + * Version 2.0.18. + + * Makefile.maint (po-check): Check for uses of _() not just in .c + files, but also in .h files. + + Ideally, there would be just one translation for all --help + and --version description strings. Before this change, they + differed only in the number of blanks between the option name + and the description. Someday gettext may be smart enough + to merge such strings and to reconstruct the proper spacing at + run time. In the mean time, now there is one string for each, + and those descriptions in the --help output are no longer aligned + with the others. + * src/sys2.h (HELP_OPTION_DESCRIPTION): New macro. + (VERSION_OPTION_DESCRIPTION): New macro. + * src/cat.c, src/cksum.c, src/comm.c, src/csplit.c, src/cut.c: + * src/expand.c, src/fmt.c, src/fold.c, src/head.c, src/join.c: + * src/md5sum.c, src/nl.c, src/od.c, src/paste.c, src/pr.c, src/ptx.c: + * src/sort.c, src/split.c, src/sum.c, src/sys2.h, src/tac.c: + * src/tail.c, src/tr.c, src/tsort.c, src/unexpand.c, src/uniq.c: + * src/wc.c (usage): Use new macros, HELP_OPTION_DESCRIPTION and + VERSION_OPTION_DESCRIPTION instead of hard-coding --help and + --version descriptions. + * po/POTFILES.in: Add src/sys2.h. + +2001-11-27 Jim Meyering <meyering@lucent.com> + + * src/system.h (SET_MODE) [O_BINARY]: Call setmode, not set_mode. + From Matthew Smith. + +2001-11-26 Jim Meyering <meyering@lucent.com> + + * src/cat.c (cat): Don't test whether the full_write return value + (of type size_t) is less than 0. Reported by Nelson H. F. Beebe, + as a warning from Irix 6.5's C compiler. + +2001-11-25 Jim Meyering <meyering@lucent.com> + + * src/cksum.c (usage): Indent --help and --version strings to + start in the 7th column. + * src/pr.c (usage): Likewise. + +2001-11-23 Jim Meyering <meyering@lucent.com> + + Factor out some common strings to make translation easier. + + * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fmt.c, fold.c: + * head.c, join.c, md5sum.c, nl.c, od.c, paste.c, pr.c, ptx.c: + * sort.c, split.c, sum.c, tac.c, tail.c, tr.c, tsort.c, unexpand.c: + * uniq.c, wc.c: Split usage strings so that --help and --version + descriptions are alone in their own string. + Likewise for the one that says ``Mandatory arguments to long + options are mandatory for short options too.'' + Suggestion from Karl Eichwalder. + + * src/ptx.c (main): Don't split copyright string in the middle + of a sentence. + +2001-11-22 Jim Meyering <meyering@lucent.com> + + * Version 2.0.17. + + csplit could get a failed assertion: printf 'a\n\n'|csplit - '/^$/' 2 + * src/csplit.c: No longer include assert.h. + (process_line_count): Remove invalid assertion. The test that caused + the failure has been in the code since before 1992-11-08, but since + 1996 it's been in an assertion. That assertion was disabled by default + until textutils-1.22g (1999-01-10). Reported by Eric Pemente. + + * tests/misc/csplit: New file. Test for the above fix and others. + * tests/misc/Makefile.am (TESTS): Add csplit. + * tests/Makefile.am (EXTRA_DIST): Add lang-default. + +2001-11-19 Jim Meyering <meyering@lucent.com> + + * src/tail.c (xlseek): New function. + Call it instead of lseek, in most cases, so any failure is reported. + +2001-11-18 Jim Meyering <meyering@lucent.com> + + * config.sub: Update from master repository. + * config.guess: Likewise. + +2001-11-17 Jim Meyering <meyering@lucent.com> + + * Makefile.cfg ($(srcdir)/m4/jm-glibc-io.m4): Use $(move_if_change), + not the literal `move-if-change'. + + * src/tail.c (tail_forever): Add a cast. + + Avoid compiler warnings. + * src/fmt.c: Remove `unsigned' attribute from type of global `prefix'. + (copy_rest): Cast to (unsigned char *) before dereferencing. + (get_prefix): Likewise. + + * configure.ac: Replace use of the one-arg form of AC_INIT + with a use of the 3-arg form and a use of AC_CONFIG_SRCDIR. + +2001-11-14 Paul Eggert <eggert@twinsun.com> + + * src/tail.c (file_lines): Remove unnecessary cast. + (tail_lines): Could have called file_lines even though the first + lseek failed. Fix that. + +2001-11-14 Jim Meyering <meyering@lucent.com> + + * src/tail.c (file_lines): Add a parameter, start_pos. + Work properly even when the read pointer is not at beginning of file. + (tail_lines): Call file_lines for any regular file, as long as lseek + can be used to seek to its end, not just when the initial read pointer + is at beginning of file. + +2001-11-13 Jim Meyering <meyering@lucent.com> + + * src/tail.c (tail_lines): Move declaration of local `length' + into scope where it's used. + (tail_file): Likewise for local `stats'. + + * tests/tail-2/Makefile.am (TESTS): Add proc-ksyms and start-middle. + * tests/tail-2/start-middle: New test, for the bug fixed on 1995-07-24. + + `tail /proc/ksyms' would segfault on Linux. + * src/tail.c (tail_lines): Use status of lseek (...SEEK_END) call + in deciding whether to call file_lines or pipe_lines. + From Herbert Xu. + * tests/tail-2/proc-ksyms: New test, for the above fix. + +2001-11-11 Jim Meyering <meyering@lucent.com> + + * src/od.c (struct tspec): Declare function pointer with prototype. + + * src/sum.c (main): Declare function pointer with prototype. + + * src/tsort.c (count_items): Mark parameter as unused. + + * src/sort.c (struct_month_cmp): Guard definition with the same + cpp condition that guards the use. + + * src/tail.c (xwrite): Remove assertion that size_t N >= 0. + + * src/pr.c (struct COLUMN) [print_func]: Declare with a protype. + (struct COLUMN) [char_func]: Declare with a protype. + + * src/od.c (parse_old_offset): Declare to be static. + + * src/join.c (make_blank): Declare to be static. + (prfield): Declare local to be of type size_t, not int. + + Some help strings were very long. Split them so that + they're no longer than the magic length 509 that ISO C89 + compilers are required to support. Sorry, translators :-( + + * src/md5sum.c (usage): Split --help output into smaller pieces. + * src/ptx.c (main, usage): Likewise. + * src/fmt.c (usage): Likewise. + + * src/wc.c (usage): Split --help output into smaller pieces. + Use fputs, not printf. + * src/cat.c (usage): Likewise. + * src/cut.c (usage): Likewise. + * src/csplit.c (usage): Likewise. + * src/expand.c (usage): Likewise. + * src/head.c (usage): Likewise. + * src/join.c (usage): Likewise. + * src/nl.c (usage): Likewise. + * src/od.c (usage): Likewise. + * src/pr.c (usage): Likewise. + * src/sort.c (usage): Likewise. + * src/split.c (usage): Likewise. + * src/tac.c (usage): Likewise. + * src/tr.c (usage): Likewise. + * src/unexpand.c (usage): Likewise. + * src/uniq.c (usage): Likewise. + * src/tail.c (usage): Likewise. + + * src/sys2.h (alloca) [__GNUC__]: Define only if not already defined. + + * src/Makefile.am (sort_LDADD): Reflect spelling change: + s/POW_LIBM/POW_LIB/. + +2001-11-10 Jim Meyering <meyering@lucent.com> + + * src/nl.c (proc_text): Use `puts' to output a string of spaces, + not printf. This avoids a warning from gcc's -Wformat-security. + +2001-11-09 Jim Meyering <meyering@lucent.com> + + * configure.ac: Use AC_CONFIG_FILES(...) and call AC_OUTPUT with no + arguments. + +2001-11-05 Jim Meyering <meyering@lucent.com> + + * src/sort.c (usage): Don't recommend setting LC_COLLATE=C. + That can cause problems (now documented in coreutils.texi). + +2001-11-04 Jim Meyering <meyering@lucent.com> + + * uniq.c, unexpand.c, tail.c, tac.c, split.c, sort.c, pr.c, paste.c: + * od.c, nl.c, head.c, fold.c, expand.c, cut.c, csplit.c (usage): + Say that ``Mandatory arguments to long options are mandatory for + short options too.'' + + * src/ptx.c (usage): Add one-line description. + +2001-10-28 Jim Meyering <meyering@lucent.com> + + * tests/sum/sysv: New test for the fix below. + * tests/sum/Makefile.am (TESTS): Add sysv. + +2001-10-27 Paul Eggert <eggert@twinsun.com> + + * src/sum.c: Include human.h. + (ROTATE_RIGHT): Remove; it was slow and the comment was + misleading anyway. + (bsd_sum_file): Avoid unsigned and long when they're not needed. + Compute total input bytes as uintmax_t, not long, so that the + code works even with files whose size does not fit in 'long'. + (sysv_sum_file): Likewise. + (sysv_sum_file): Do not reduce checksum until the end; this is + what System V does. + Reported by Nick Lawes. + +2001-10-27 Jim Meyering <meyering@lucent.com> + + Give an accurate diagnostic when `head --bytes=30M' fails. + * src/head.c (string_to_integer): Check explicitly for overflow, + and lump everything else together as `invalid'. + +2001-10-04 Jim Meyering <meyering@lucent.com> + + Rename --all-repeated argument `precede' to `prepend'. + * src/uniq.c (enum delimit_method): s/DM_PRECEDE/DM_PREPEND/ + and change all uses. + (delimit_method_string): s/precede/prepend/ + * tests/uniq/Test.pm: Adjust tests accordingly. + Patches by Padraig Brady. + + * src/uniq.c (usage): Correct typo in description of --all-repeated. + Patch by Padraig Brady. + +2001-09-30 Jim Meyering <meyering@lucent.com> + + * Version 2.0.16. + + tail -F would segfault + * src/tail.c (parse_options): Add missing `break;' from last change. + +2001-09-28 Jim Meyering <meyering@lucent.com> + + * configure.ac: Tell automake to use the file name `config.hin' + rather than the two-`.' config.h.in. + +2001-09-26 Jim Meyering <meyering@lucent.com> + + * man/Makefile.am (common_dep): Define it, so we depend on configure.ac. + + * configure.ac: Renamed from configure.in. + +2001-09-25 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (sort_DEPENDENCIES): Remove definition altogether. + It adds nothing to the existing: $(PROGRAMS): ../lib/libfetish.a. + +2001-09-24 Paul Eggert <eggert@twinsun.com> + + * src/Makefile.am (sort_DEPENDENCIES): Depend only on + ../lib/libfetish.a, not on $(LDADD), since the latter may + contain `-lintl'. This resembles yesterday's patch for the + `$(PROGRAMS)' rule. + +2001-09-23 Jim Meyering <meyering@lucent.com> + + * Version 2.0.15. + + * src/Makefile.am ($(PROGRAMS)): Depend only on ../lib/libfetish.a, + not on $(LDADD), since the former may contain `-lintl'. + + * Makefile.am (SUBDIRS): When using newer gettext (in which + intl/libintl.h is created by rules intl/Makefile) + `intl' must precede `lib'. + +2001-09-22 Jim Meyering <meyering@lucent.com> + + * ABOUT-NLS: Upgrade to gettext 0.10.40 + * intl: Upgrade entire directory to gettext 0.10.40 + * po/ChangeLog: New file. + + * Makefile.am (DISTCLEANFILES): Remove definition, since intl/libintl.h + is no longer created via configure. + + * tests/od/od-N: New test for the 2001-09-19 fix by Ian Bruce. + * tests/od/Makefile.am: New file. + * tests/od: New directory. + * tests/Makefile.am (SUBDIRS): Add od. + * configure.in (AC_OUTPUT): Add tests/od/Makefile. + +2001-09-19 Paul Eggert <eggert@twinsun.com> + + * src/od.c (MAX_ADDRESS_LENGTH, pseudo_offset, format_address, + n_bytes_to_skip, skip, format_address_none, + format_address_std, format_address_paren, + format_address_label, write_block, parse_old_offset, dump, + dump_strings, main): + Use uintmax_t, not off_t, for file addresses, so that we can + handle multiple large files even if the sum of their sizes + exceeds off_t limits. + + (print_s_char, print_char, print_s_short, print_short, + print_int, print_long, print_long_long, print_float, + print_double, print_long_double, dump_hexl_mode_trailer, + print_named_ascii, print_ascii, decode_one_format): + Use size_t, not off_t, for in-memory byte counts. + + (end_offset): New var. + (dump, dump_strings): Use it. + (main): Set it, but check for overflow while doing so. + + (skip): Report an error if an in-range lseek fails on a + regular file, as something's seriously wrong. Check for + negative regular file sizes (possible with some broken NFS + implementations). + + (parse_old_offset): Now all offsets are valid, so return a + success boolean and take a pointer to an offset as an argument. + All callers changed. + + (dump_strings): Check for overflow when computing end_offset - + string_min. + + (main): Remove OFF_T_MAX checks that are no longer needed. + Don't bother assigning through temporary when there's no size + limit to check. + +2001-09-19 Jim Meyering <meyering@lucent.com> + + * src/od.c (open_next_file): Use SETVBUF, not setbuf. + (skip): Revert part of last change: use lseek, not fseek. + + When --read-bytes=N (-N N) is used, disable input buffering in + the standard I/O library. Otherwise, od would read more input + than requested. This could have caused problems when reading + from pipes, character devices, or open file descriptors inherited + from a parent process. + + * src/od.c (open_next_file): New function, factored out of... + (skip): Adapt to use open_next_file. + (read_char): Likewise. + (read_block): Likewise. + (main): Likewise. + (dump): Fix an off-by-one error that could have made od fail to + report a read error when reading from a named file (not stdin). + (check_and_close): Account for the fact that in_stream may now be NULL. + (usage): Correct descriptions of -j and -N options. + Patch by Ian Bruce. + +2001-09-16 Jim Meyering <meyering@lucent.com> + + * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.5. + + * man/Makefile.am: Revamp this file, as for fileutils. + + * src/md5sum.c (digest_check): On systems for which setmode actually + does something, arrange to read the file containing checksum strings + in text mode. Based on a patch from Chris Faylor. + * src/system.h (SET_MODE): Define. + +2001-09-12 Jim Meyering <meyering@lucent.com> + + The command `echo a|./fmt -2147483647' would cause fmt to segfault. + * src/fmt.c (fmt_paragraph): Test for sentinal directly, rather than + doing arithmetic with it's potentially large (INT_MAX) length. + * tests/fmt/basic: Add tests for the above. + + tail: accept new option: -F, equivalent to `--follow=name --retry', + for compatibility with FreeBSD and NetBSD versions of tail. + + * src/tail.c (usage): Describe new option. + (parse_options): Accept it. + Patch by Christian Kurz, via Herbert Xu. + + The command `echo foo|fmt -w N' for N>=32K would cause fmt to segfault. + + * src/fmt.c [struct Word]: Declare members length, space, and + line_length to be of type `int', not short. + (MAXCOST): Define using TYPE_MAXIMUM. + Reported by Herbert Xu. + +2001-08-31 Jim Meyering <meyering@lucent.com> + + * src/fmt.c (bool): Remove typedef, now that it's in system.h. + (TRUE): Define to `true', not 1. + (FALSE): Define to `false', not 0. + +2001-08-30 Paul Eggert <eggert@twinsun.com> + + * src/cat.c: Include full-write.h. + (full_write): Remove decl; not needed. + * src/split.c: Likewise. + + * src/cat.c (simple_cat, cat): + Don't assume read and write size fits in int. + +2001-08-28 Jim Meyering <meyering@lucent.com> + + * src/fmt.c (main): Correct the diagnostic for invalid argument to -w. + (main): Diagnose an invalid, old-style width option. + +2001-08-27 Jim Meyering <meyering@lucent.com> + + * Makefile.maint: Undo last change. Instead, simply remove `N_(', + since the `Copyright ...' line should not be translated. + +2001-08-26 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (copyright-check): Update to reflect fact that + the copyright year is now defined separately. + +2001-08-08 Charles Randall <crandall@matchlogic.com> + + * src/sort.c (mergefps): Do not allocate at least sort_size + bytes for each merge buffer. Instead, allocate at least + sort_size bytes total. + +2001-08-25 Jim Meyering <meyering@lucent.com> + + * tests/uniq/Test.pm: Re-enable some commented-out tests. + +2001-08-25 Paul Eggert <eggert@twinsun.com> + + * src/uniq.c (main): Fix a typo in the previous patch: missing + a bounds check for examples like `uniq a b c'. + + * uniq.c (main): Fix some more incompatibilities with POSIX.2, + (e.g. `uniq +3 --' did not work) by invoking getopt_long with + leading '-', resembling what was done to 'sort' on 2001-03-20. + Recognize an +N option only if it is an integer in range, and + (if POSIXLY_CORRECT) only if a file name argument has not been seen; + otherwise silently treat it as a file name. + + If the user specifies too many operands, output the first one + in the error message, as a diagnostic aid. + +2001-08-24 Paul Eggert <eggert@twinsun.com> + + * src/uniq.c (main): Don't report an error when given the + valid options `+3 -d'. + +2001-08-24 Paul Eggert <eggert@twinsun.com> + + * src/uniq.c (different): Don't assume that lengths can fit + into size_t. Tune code for the common case where the line + lengths differ: we avoid comparing them entirely in that case. + +2001-08-25 Jim Meyering <meyering@lucent.com> + + * tests/uniq/Test.pm: Add tests for -s 0 and -w 0. + +2001-08-24 Paul Eggert <eggert@twinsun.com> + + Remove arbitrary restrictions on sizes, fixing a bug reported + by Geoff Whale. + + * src/uniq.c (skip_fields, skip_chars, check_chars): Now size_t, + not int. + (size_opt): New function. Do not arbitrarily reject size zero. + Change the wording of the error message slightly, for convenience. + (find_field): Use size_t, not int, to compute sizes. + (different, main): check_chars==0 is no longer a special case, as + it defaults to SIZE_MAX. + (main): Check for overflow with args like -234234234234234. + Use 'size_opt' to convert optional arguments to sizes. + +2001-08-25 Jim Meyering <meyering@lucent.com> + + * tests/uniq/Test.pm: Add new test, #54, for the just-fixed bug. + +2001-08-24 Paul Eggert <eggert@twinsun.com> + + * src/uniq.c (find_field): Don't count trailing newline to be + part of the field. This disagrees with POSIX.2, but it's + gotta be a bug in the standard. An interpretations request + has been submitted to PASC. + Reported by Geoff Whale. + +2001-08-18 Jim Meyering <meyering@lucent.com> + + * Makefile.maint: Merge in changes from autoconf. + + * Makefile.maint ($(v_etc_file)): Define. + (copyright-check): Use the new variable. + (my-distcheck): Depend on local-check so those checks are once + again run by `make distcheck'. + + * src/head.c (head_bytes): Read no more than the specified + number of bytes. Patch by Ian Bruce. + + * tests/misc/head-c: New test for the above. + * tests/misc/Makefile.am: New file. + * tests/misc: New directory. + * tests/Makefile.am (SUBDIRS): Add misc. + * configure.in (AC_OUTPUT): Add tests/misc/Makefile. + +2001-08-14 Jim Meyering <meyering@lucent.com> + + * src/Makefile.am (INCLUDES): Add -I../lib so sys2.h can include + the new, generated file, unlocked-io.h. + +2001-08-13 Jim Meyering <meyering@lucent.com> + + * src/cat.c (AUTHORS): Mark string for translation, since it + contains the English word `and'. + * src/comm.c: Likewise + * src/csplit.c: Likewise + * src/cut.c: Likewise + * src/md5sum.c: Likewise + * src/nl.c: Likewise + * src/paste.c: Likewise + * src/pr.c: Likewise + * src/sort.c: Likewise + * src/split.c: Likewise + * src/sum.c: Likewise + * src/tac.c: Likewise + * src/uniq.c: Likewise + * src/wc.c: Likewise + +2001-08-12 Jim Meyering <meyering@lucent.com> + + * tests/mk-script ($program_name): Define. + (main): Use $program_name, rather than long-inaccurate `build-script'. + (main): Iterate over the sorted keys (rather than `while...each...'), + so this script produces the same output regardless of which version + of perl (e.g., perl5.6) is used. + +2001-08-04 Jim Meyering <meyering@lucent.com> + + * Makefile.am (EXTRA_DIST): Add Makefile.cfg. + + * man/Makefile.am (EXTRA_DIST): Remove duplicate definition. + +2001-07-08 Jim Meyering <meyering@lucent.com> + + * src/tail.c (usage): Reformat so help2man generates a properly + indented man page. Patch by Herbert Xu. + +2001-07-04 Jim Meyering <meyering@lucent.com> + + * Makefile.cfg: New file with package-specific definitions. + * Makefile.am (EXTRA_DIST): Add Makefile.cfg. + +2001-07-01 Jim Meyering <meyering@lucent.com> + + * src/sort.c (usage): Suggest setting LC_COLLATE=C, rather + than LC_ALL=C. + +2001-06-10 Jim Meyering <meyering@lucent.com> + + * tests/sort/Test.pm: Add a test based on a report from Herbert Xu. + +2001-05-20 Jim Meyering <meyering@lucent.com> + + * src/uniq.c: Rename new option values: s/all/precede/ and + s/minimum/separate/. + * tests/uniq/Test.pm: Reflect the above renamings. + +2001-05-12 Bruno Haible <haible@clisp.cons.org> + + * src/tail.c (parse_obsolescent_option): Accept a b suffix. + +2001-05-19 Jim Meyering <meyering@lucent.com> + + msgmerge-0.10.37 complains about some `invalid multibyte sequences.' + * po/el.po: Remove the offending entries. + * po/ko.po: Likewise. + * po/zh.po: Likewise. + +2001-05-19 Jim Meyering <meyering@lucent.com> + + Support new modes for uniq's --all-repeated option. + The default behavior is unchanged. + + * src/uniq.c: Include argmatch.h. + (usage): Update. + (check_file): Implement it. + (main): Handle new, optional arguments. + * tests/uniq/Test.pm: New tests for the above. + Patch by Padraig Brady. + +2001-05-12 Bruno Haible <haible@clisp.cons.org> + + * src/tail.c (parse_obsolescent_option): Use t_count_lines, not + count_lines, in error message. + +2001-05-05 Jim Meyering <meyering@lucent.com> + + * src/comm.c (usage): Correct description of -3. + Reported by Soeren Sonnenburg. + +2001-04-22 Jim Meyering <meyering@lucent.com> + + * Version 2.0.14. + + * configure: Regenerate using a patched copy of autoconf-2.49e to + work around a bug in its test for a working memcmp function. + +2001-03-28 Paul Eggert <eggert@twinsun.com> + + * src/cksum.c: Fix bugs when computing length of large files. + Add overflow and write error checks. Use uint_fast32_t, not + unsigned long, to do checksum calculation, as C99 says + uint_fast32_t should be no slower and might be faster. + + Include <stdio.h> and "system.h" even if CRCTAB is defined, + so that the code will compile if CRCTAB is defined. + Include "human.h" if CRCTAB is not defined. + (uint_fast32_t): Define if it appears that stdint.h didn't. + (BIT, remainder, main, crctab): Use uint_fast32_t, not unsigned long, + for checksums. + (fill_r, remainder, main): Use ANSI prototypes. + (fill_r, remainder, main): Omit duplicate code. + (main): Use uintmax_t, not unsigned long, for file lengths. + Use size_t, not long, for result of fread. + Check for overflow when computing file lengths. + Check for write error immediately after printing a line, so that + we don't write to stdout indefinitely after an error. + +2001-04-14 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (default_sort_size): Leave a 1/16 margin for RSS. + Suggestion from Solar Designer. + +2001-04-14 Jim Meyering <meyering@lucent.com> + + * src/wc.c (usage): Tweak --help output: s/line,/newline,/ + +2001-04-13 Jim Meyering <meyering@lucent.com> + + * src/sort.c (main): Add a comment justifying the use of + `multi-character' rather than `multibyte' in a diagnostic. + From Paul Eggert. + +2001-04-12 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (RLIMIT_AS): Do not define; just use conditional + code, since RLIMIT_RSS is similar (and is not standardized). + (default_sort_size): Don't allocate more than the RSS limit, + if this host has such a limit. + +2001-03-20 Paul Eggert <eggert@twinsun.com> + + * NEWS, doc/textutils.texi: sort now accepts long options and + checks POSIX option syntax. + + * doc/textutils.texi: Document --, -, sort long options, and + sort -o after files. + + * src/sort.c: Include <getopt.h>. + (usage, main): Add support for long options, and check option + syntax as POSIX requires, though (as usual for GNU apps) + options can follow file names unless POSIXLY_CORRECT is set. + Many diagnostic revamped. + (long_options): New constant. + (badfieldspec): New arg MSGID. Mark as noreturn. + (parse_field_count): New arg MSGID; if null, just return null on error. + (new_key): Renamed from key_init. All callers changed. Now allocates + the new key. + +2001-03-18 Jim Meyering <meyering@lucent.com> + + * Version 2.0.13. + + * tests/Fetish.pm: If the $DJDIR envvar is defined, set SHELL + to $DJDIR/bin/bash.exe. Patch from Richard Dawe, based on a + suggestion from Eli Zaretskii. + +2001-03-17 Paul Eggert <eggert@twinsun.com> + + * src/sort.c, src/tail.c, src/uniq.c (usage): + Warn that the +N form will be withdrawn. + * doc/textutils.texi: Likewise. + +2001-03-08 Paul Eggert <eggert@twinsun.com> + + * NEWS, doc/textutils.texi: Document pr changes. + + * src/pr.c: Include mbswidth.h. + (standard_header, header, test_suite): Remove. + (date_format, date_text, file_text, header_width_available): New vars. + (long_options, main, init_header, usage): + Add new -D or --date-format option. + (CHARS_FOR_DATE_AND_PAGE, T_BUF_FMT, T_BUF_SIZE, NO_DATE): Remove. + (init_header): Allow arbitrary width for date format. Change + "Page %5d" to "Page %d", since the code no longer assumes fixed width. + Do not assume that localtime succeeds. + (init_header, print_header, usage): Do not truncate headers. + (init_header, print_header): Defer width calculations until + page is printed, since "Page 100000" is wider than "Page 1". + Count columns, not bytes, in page headers. + Custom headers take up only the center, not the whole header. + (print_header): Use printf rather than fprintf(stdout). + + * po/Makefile.in.in (install-data-yes): Install LC_TIME locale + for all packages, not just for fileutils. + (uninstall): Remove LC_TIME locale too. + + * src/sys2.h (INT_STRLEN_BOUND): New macro. + + * tests/pr/0F, tests/pr/0FF, tests/pr/2-S_f-t_notab, + tests/pr/2-Sf-t_notab, tests/pr/2f-t_notab, + tests/pr/2s_f-t_notab, tests/pr/2s_w60f-t_nota, + tests/pr/2sf-t_notab, tests/pr/2sw60f-t_notab, + tests/pr/2w60f-t_notab, tests/pr/3-0F, tests/pr/3-5l17f-t, + tests/pr/3-FF, tests/pr/3a2l17-FF, tests/pr/3a3f-0F, + tests/pr/3a3l15-t, tests/pr/3a3l8f-t, tests/pr/3b2l17-FF, + tests/pr/3b3f-0F, tests/pr/3b3f-0FF, tests/pr/3b3f-FF, + tests/pr/3b3l15-t, tests/pr/3b3l8f-t, tests/pr/3f-0F, + tests/pr/3f-FF, tests/pr/3l17f-t, tests/pr/3l24-t, + tests/pr/3ml17f-t, tests/pr/3ml24-FF, tests/pr/3ml24-t, + tests/pr/3ml24-t-FF, tests/pr/4-7l24-FF, tests/pr/4l24-FF, + tests/pr/a2l15-FF, tests/pr/a2l17-FF, tests/pr/a3-0F, + tests/pr/a3f-0F, tests/pr/a3f-0FF, tests/pr/a3f-FF, + tests/pr/a3l15-t, tests/pr/a3l17f-lm, tests/pr/a3l8f-t, + tests/pr/b2l15-FF, tests/pr/b2l17-FF, tests/pr/b3-0F, + tests/pr/b3f-0F, tests/pr/b3f-0FF, tests/pr/b3f-FF, + tests/pr/b3l15-t, tests/pr/b3l17f-lm, tests/pr/b3l8f-t, + tests/pr/FF, tests/pr/Ja3l17f-lm, tests/pr/Jb3l17f-lm, + tests/pr/Jml17f-lm-lo, tests/pr/l17f-t, tests/pr/l24-FF, + tests/pr/l24-t, tests/pr/ml17f-0F, tests/pr/ml17f-lm-lo, + tests/pr/ml17f-t, tests/pr/ml17f-t-0F, tests/pr/ml20-FF-t, + tests/pr/ml24-FF, tests/pr/ml24-t, tests/pr/ml24-t-FF, + tests/pr/n+2-5l17f-0FF, tests/pr/n+2l17f-0FF, + tests/pr/n+2l17f-bl, tests/pr/n+3-7l24-FF, + tests/pr/n+3l17f-0FF, tests/pr/n+3l17f-bl, + tests/pr/n+3ml13f-bl-FF, tests/pr/n+3ml17f-bl-tn, + tests/pr/n+3ml17f-tn-bl, tests/pr/n+4-8a2l17-FF, + tests/pr/n+4b2l10f-0FF, tests/pr/n+5-8b3l10f-FF, + tests/pr/n+5a3l6f-0FF, tests/pr/n+6a2l17-FF, + tests/pr/n+6b3l6f-FF, tests/pr/n+7l24-FF, + tests/pr/n+8l20-FF, tests/pr/nJml17f-lmlmlo, + tests/pr/nJml17f-lmlolm, tests/pr/nl17f-bl, + tests/pr/nN1+3l17f-bl, tests/pr/nN15l17f-bl, + tests/pr/nSml13-bl-FF, tests/pr/nSml13-t-t-FF, + tests/pr/nSml13-t-tFFFF, tests/pr/nSml17-bl-FF, + tests/pr/nSml17-t-t-FF, tests/pr/nSml17-t-tFFFF, + tests/pr/o3a3l17f-tn, tests/pr/o3a3Sl17f-tn, + tests/pr/o3a3Snl17f-tn, tests/pr/o3b3l17f-tn, + tests/pr/o3b3Sl17f-tn, tests/pr/o3b3Snl17f-tn, + tests/pr/o3Jml17f-lm-lo, tests/pr/o3ml17f-bl-tn, + tests/pr/o3mSl17f-bl-tn, tests/pr/o3mSnl17fbltn, + tests/pr/Test.pm, tests/pr/W-72l17f-ll, tests/pr/W20l17f-ll, + tests/pr/W26l17f-ll, tests/pr/W27l17f-ll, + tests/pr/W28l17f-ll, tests/pr/W35a3l17f-lm, + tests/pr/W35b3l17f-lm, tests/pr/W35Ja3l17f-lm, + tests/pr/W35Jb3l17f-lm, tests/pr/W35Jml17f-lmlo, + tests/pr/W35ml17f-lm-lo, tests/pr/W72Jl17f-ll, + tests/pr/w72l17f-ll: + Adjust to minor spacing changes in pr headers. + +2001-03-11 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (die): New message arg, to describe failures + better. All callers changed. + +2001-03-11 Paul Eggert <eggert@twinsun.com> + + * src/sort.c: Decrease buffer size when only merging or checking. + (sort_size): Now the user-specified sort size. + (MIN_MERGE_BUFFER_SIZE): New macro. + (MIN_SORT_SIZE): Use it. + (merge_buffer_size): New variable. + (fillbuf): Increase merge_buffer_size if a longer line is encountered. + (checkfp, mergefps): Do not allocate a buffer smaller than + merge_buffer_size. + (sort): Use the default_sort_size if sort_size is zero. + (main): Do not set sort_size to default_sort_size. + +2001-03-06 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (sort): If all the input files are empty, create + an empty output file. + * tests/sort/Test.pm: Test for this. + +2001-03-13 Jim Meyering <meyering@lucent.com> + + * src/sort.c (merge): Move declarations of local variables into + the inner scope where they're used. + (sort): Likewise. + +2001-03-06 Paul Eggert <eggert@sic.twinsun.com> + + Avoid the need for a copy of the input file when the input and + output overlap, e.g. 'sort F -o F'. With -m, though, a copy + is still needed sometimes. + + * doc/textutils.texi: 'sort F -o F' no longer needs to copy F. + + * src/sort.c: Do not include closeout.h. + (xfopen): Use stdout if *how != 'r'. + (mergefps): Remove FPS arg. + Open all input files, and close all files when done. + If OFP is null, open the output file (but after opening input files). + All callers changed. + (first_same_file): New function. + (sort, merge): Remove arg OFP; we now open the output file as needed. + All callers changed. + (merge): New arg MAX_MERGE. All callers changed. + (sort): For "sort F -o F", close the input before opening the output. + (main): Do not use close_stdout; 'sort' and 'merge' now close stdout. + (This also fixes a close-stdout-twice bug.) + Remove test for overlapping input and output files, as 'sort' no longer + needs to worry about overlap, and 'merge' checks for overlap itself. + Use first_same_file to inform 'merge' about how much to merge at + the top level, to avoid overlap. + +2001-03-12 Jim Meyering <meyering@lucent.com> + + `fmt --prefix=S' would not work properly for any string S containing + a byte with the high bit set. + * src/fmt.c (prefix): Declare to be of type unsigned char, not `char'. + (get_prefix): Likewise for local, `p'. + Reported by François Pinard. + + Add a test for the above-fixed problem. + * tests/fmt: New directory/files. + * configure.in (AC_OUTPUT): Add tests/fmt/Makefile. + * tests/Makefile.am (SUBDIRS): Add fmt. + +2001-03-05 Andreas Schwab <schwab@suse.de> + + * src/tac.c (save_stdin): Use mkstemp to create temporary file. + +2001-03-09 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (my_distdir): Define new variable, and use this + in place of most old uses of $(distdir). + + * tests/help-version: Ensure that /dev/full is a character device + (using test -c) as well as being writable, before trying to write to it. + Otherwise, the test could mistakenly append a newline to an existing, + regular, writable, /dev/full file. + Suggested by Ulrich Drepper. + +2001-03-08 Jim Meyering <meyering@lucent.com> + + * tests/sha1sum/sample-vec: Insert the `--text' argument for each test. + Reported by Matthew Smith. + +2001-03-04 Jim Meyering <meyering@lucent.com> + + * Makefile.maint (my_distdir): Define. + Use it in place of $(distdir) almost everywhere. + + * Version 2.0.12. + + * Makefile.maint (alpha): Use $(PACKAGE)-$(VERSION), not $(distdir), + since the latter now has a `$(top_distdir)/' prefix. + +2001-03-01 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (die): New function. + (create_temp_file, xfopen, xfclose, write_bytes, sort_buffer_size, + fillbuf, main): Use it to regularize error messages. The only change + in behavior is that write_bytes and the final close used to say "write + error" but now give just the output file name, which should be enough. + +2001-03-01 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (xfclose): Add FILE arg, and report the file name + on error. All callers changed. + +2001-03-01 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (main): When fclose (stdin) fails, do not mention + the output file in the error message; mention "-" instead. + +2001-02-28 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (xfopen): Set have_read_stdin to 1 only if file is "-". + Use fopen_safer, not fopen, to avoid subtle bugs when fopen returns + stdin, stdout, or stderr. + (xfclose): stdout is no longer a special case. + (main): Close output file, don't just flush it; there might be + an error on the close. + +2001-02-27 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (initbuf): If the desired size cannot be + allocated, repeatedly halve it until allocation succeeds. + Reported by Solar Designer. + +2001-02-26 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (parse_field_count): Comment fix. + +2001-02-25 Paul Eggert <eggert@twinsun.com> + + * src/sort.c: Tune allocation and comparison of nodes + representing temp files. This improved CPU performance of + 'sort -S 1 *.[ch]' by 17% on my host. + + (struct tempnode): name member now uses struct hack. + (temphead): Now a pointer, not a structure. All uses changed. + (create_temp_file): Allocate node using struct hack. + (zaptemp): Free node using struct hack. Use pointer comparison, not + string comparison. + +2001-02-25 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (eolchar, trim_trailing_blanks): Now static. + +2001-02-25 Paul Eggert <eggert@twinsun.com> + + 'sort' race condition fixes. + + Defend against a DoS attack where someone else creates a + temporary file with the same name as ours. Use mkstemp to do + this, supplying our own mkstemp if the system doesn't have one. + + Also, fix a race condition during cleanup on hosts without + sigaction. + + * src/sort.c (NAME_MAX_IN_DIR): Remove. + (sigprocmask, sigset_t): New macros, defined only on older hosts. + (caught_signals): New var. + (xtmpfopen, tempname): Removed. + (create_temp_file): New function, combining the functions of the old + xtmpfopen and tempname. All callers changed. + Use mkstemp to create the file. + (sighandler): On hosts without sigaction, ignore signals while + cleaning up, instead of letting them interrupt cleanup. + (main): Initialize caught_signals. On hosts with sigaction, block all + caught signals while handling one. Remove duplicate code. + +2001-02-22 Jim Meyering <meyering@lucent.com> + + * src/sort.c (keycompare): Move declarations of locals, lena and lenb, + into the inner scope where they are used. + +2001-02-19 Jim Meyering <meyering@lucent.com> + + * src/sort.c (AUTHORS): Add Paul Eggert. + + * src/wc.c (wc): Rename innermost `buf' to avoid shadowing warning. + (wc): Rename local `wc' to avoid shadowing function name. + +2001-02-18 Paul Eggert <eggert@twinsun.com> + + Fix a race condition: freed storage accessed during a signal handler. + + * src/sort.c (struct tempnode.next): Now volatile. + (zaptemp): Free the file name after removing it from the temp list, + not before, because a signal can arrive between the two actions + and cleanup () traverses the list. + +2001-02-18 Paul Eggert <eggert@twinsun.com> + + Check for input size, and do not overallocate memory. + Also check for memory quotas. + + Revamp storage management so that line tables and character data are + taken from the same buffer. Line tables are now in reverse order, + since they grow down while the character data grow up. + + * src/sort.c: + (<sys/resource.h>): Include if HAVE_SYS_RESOURCE_H. + (struct rlimit, getrlimit): Define a replacement if RLIMIT_DATA + is not defined. + (RLIMIT_AS): Define to RLIMIT_DATA if not defined. + (struct lines): Remove. + (struct buffer): New members nlines, line_bytes, eof. + Remove member newline_free; no longer needed, since the code no longer + runs out of line table space. + (SORTALLOC_MIN, SORTALLOC_DEFAULT_MIN): Remove. + (sort_size): Renamed from sortalloc; now applies to the sum of the + character data and the line table, not just the character data. + (MIN_SORT_SIZE, INPUT_FILE_SIZE_GUESS): New macros. + (linelength): remove. + (specify_sort_size): Don't worry about the distinction between the + character data and the line table; that is now the caller's + responsibility. + (default_sort_size): Return the value, instead of being executed for + side effect. Return half of available memory, or 1/16 of total memory, + whichever is greater; except do not exceed 1/2 of quota. + (sort_buffer_size): New function. + (initbuf): New arg LINE_BYTES. Ensure that the line array is properly + aligned. Initialize the new set of struct buffer members. + (buffer_linelim): New function. + (fillbuf): Return int, not size_t, since the callers merely care + whether the result is nonzero. New arg FILE so that error messages + can report the file name. Keep track of eof. Initialize the line + table too, taking its memory from the input buffer's memory; this + subsumes the old findlines function and removes the need for worrying + about running out of line table entries. + (checkfp, mergefps, sortlines, merge, sort): Adjust to the new storage + management regime, in particular the fact that line tables are now + filled in by fillbuf and are in reverse order. + (checkfp): Now takes char *, not const char *, since subroutines + require that now. Rewrite to avoid lint and duplicate code. + If line length alloc calculation overflows, + simply allocate enough memory to hold the line. + (mergefps): New arg FILES, used for buffer size calculation and error + messages. Rewrite to avoid lint. Do not loop if savealloc*2 + overflows. + (mergefps, merge): Zap temporary files eagerly rather than lazily; + this is needed because we now pass FILES to mergefps. + (sortlines): Args now point at end of arrays, not at beginnings. + (sort): Do not allocate temporary line array for sortlines; + instead, take the space from the same buffer. + (main): Adjust to sort_size and default_sort_size changes. + +2001-02-18 Jim Meyering <meyering@lucent.com> + + Rename test input files to avoid conflicts on case-insensitive + file systems. + * tests/pr/2-Sf-t_notab: Rename from 2Sf-t_notab. + * tests/pr/2-S_f-t_notab: Rename from 2S_f-t_notab. + * tests/pr/W-72l17f-ll: Rename from W72l17f-ll. + * tests/pr/Test.pm: Update file names to reflect renamings. + Reported by Matthew Smith. + +2001-01-20 Jim Meyering <meyering@lucent.com> + + * configure.in: Remove jm_CHECK_ALL_TYPES. + Now it's invoked by jm_MACROS. + +2001-01-17 Jim Meyering <meyering@lucent.com> + + * src/cksum.c (main): Use PACKAGE, not GNU_PACKAGE. + * src/tsort.c (main): Likewise. + * src/sort.c (main): Likewise. + (usage): Convert each TAB in --help output to a sequence of 8 spaces. + +2001-01-07 Jim Meyering <meyering@lucent.com> + + * src/tail.c (usage): Split a string that was longer than 2048 bytes. + +2001-01-03 Jim Meyering <meyering@lucent.com> + + * src/sort.c (main): Remove embedded \n from diagnostic. + +2001-01-02 Jim Meyering <meyering@lucent.com> + + * src/od.c (ulonglong_t): Define place-holder type to avoid some #if + directives. + (LONGEST_INTEGRAL_TYPE): Remove definition. + (MAX_INTEGRAL_TYPE_SIZE): Use ulonglong_t instead of + LONGEST_INTEGRAL_TYPE. + (print_long_long): Compile this function even on systems without + long long support. + (decode_one_format): Remove #if directive. + + * src/od.c (decode_one_format): Guard use of print_long_long with + `#if HAVE_UNSIGNED_LONG_LONG'. From Darren Salt. + Change all `#ifdef HAVE_UNSIGNED_LONG_LONG' to use `#if' instead. + +2000-12-23 Jim Meyering <meyering@lucent.com> + + * src/sys2.h [HAVE_INTTYPES_H]: Include <inttypes.h>. + +2000-12-19 Jim Meyering <meyering@lucent.com> + + * Version 2.0.11. + +2000-12-18 Paul Eggert <eggert@twinsun.com> + + * NEWS, doc/textutils.texi: New "sort" option -S SIZE. + + * src/sys2.h (UINTMAX_MAX): New macro, taken from C99. + + * src/sort.c: Include physmem.h. + (SORTALLOC, mergealloc, LINEALLOC): Remove. + (sortalloc): Default to zero at program startup. + (SORTALLOC_MIN, SORTALLOC_DEFAULT_MIN): New macros. + (usage, main): Add support for new -S SIZE option. + (specify_sort_size, default_sort_size): New functions. + (initlines): Do not let alloc exceed limit. + (findlines): Likewise. + (checkfp, mergefps, sort): Use sortalloc to size everything + else, instead of relying on precomputed sizes. + +2000-12-17 Jim Meyering <meyering@lucent.com> + + * doc/texinfo.tex: Update from master repository. + * config.sub: Likewise. + * config.guess: Likewise. + +2000-12-11 Jim Meyering <meyering@lucent.com> + + * Version 2.0.10. + +2000-12-07 Jim Meyering <meyering@lucent.com> + + * src/od.c (address_base): Declare to be static. + +2000-12-06 Paul Eggert <eggert@twinsun.com> + + * src/od.c (address_base, address_pad_len): New var. + (output_address_fmt_string, address_fmt_buffer, address_pad): Remove. + (flag_pseudo_start): Now int, not long int. + (pseudo_offset): Now off_t, not long int. + (n_specs, n_specs_allocated): Now size_t, not unsigned int. + (format_address, format_address_none, format_address_std, + format_address_label): Now accepts an extra char argument (an extra + char to print if nonzero), and prints instead of returning a string. + All callers changed. + (bytes_per_block): Now size_t, not int. + (format_address_none): Do not even print the extra char argument. + This simplifies the callers. + (format_address_std, format_address_label): Print off_t ourself + instead of trying to use autoconfigured format. This is faster and + more portable. + (format_address_paren): New function. + (dump): Remove unnecessary cast. + (expand_address_fmt): Remove. + (main): Use size_t, off_t, etc. instead of builtin types where this is + advisable. Adjust to above changes. Remove unnecessary cast. + +2000-12-03 Jim Meyering <meyering@lucent.com> + + * src/tail.c (tail_file): Initialize ignore, dev, and ino members, + when tailing forever and the open failed. Otherwise, we could get + uninitialized memory references of those fields in recheck. + * tests/tail-2/Makefile.am (TESTS): Add assert-2. + * tests/tail-2/assert-2: New file. + + * Version 2.0.9. + + Make od print valid addresses for offsets of 2^32 and larger, and + allow byte offset (-j) and byte count (-N) to be 2^32 and larger. + + * src/od.c (MAX_ADDRESS_LENGTH): Don't hard-code as a literal. + Rather, define in terms of the type, off_t. + (string_min): Declare to be of type size_t. + (flag_dump_strings): Declare to be of type int. + (print_s_char): Declare the n_bytes parameter and the local, `i', + to be of type off_t. + (print_char): Likewise. + (print_s_short): Likewise. + (print_short): Likewise. + (print_int): Likewise. + (print_long): Likewise. + (print_long_long): Likewise. + (print_float): Likewise. + (print_double): Likewise. + (print_long_double): Likewise. + (dump_hexl_mode_trailer): Likewise. + (print_named_ascii): Likewise. + (print_ascii): Likewise. + (write_block): Likewise. + (print_ascii): Declare local, `print_function' with a prototype. + Change a few `>' comparisons to the equivalent `<' form. + (parse_options): Declare `tmp' to be of type uintmax_t. + Use xstrtoumax, not xstrtoul. + Fail if the specified offset if larger than OFF_T_MAX. + (dump_strings): Declare local `i' to be of type size_t. + Remove the now-unnecessary cast-to-off_t. + (main) [IF_LINT]: Initialize desired_width to avoid a warning. + Declare `tmp' to be of type uintmax_t. + Use xstrtoumax, not xstrtoul. + Fail if minimum string length is larger than SIZE_MAX. + Fail if specified width is larger than ULONG_MAX. + + * src/od.c (format_address): Use off_t, not long unsigned_int as the + parameter type. + (format_address_none): Likewise. Mark parameter as unused. + (format_address_std): Likewise. + (format_address_label): Likewise. + (print_ascii): Mark format string parameter as unused. + (write_block): Use off_t, not long unsigned_int as offset type. + (expand_address_fmt): New function. + (main): Use it to expand each address format string template. + Reported by Mark Nudelman, via Andreas Jaeger. + + * src/sys2.h (OFF_T_MIN): Define here instead. + (OFF_T_MAX): Likewise. + (CHAR_BIT): Define. + + * src/tail.c (parse_options): Use xstrtoumax to parse the byte and line + offset. Give a better diagnostic when the requested offset is still + representable but larger than OFF_T_MAX. + (OFF_T_MIN): Remove definition. + (OFF_T_MAX): Likewise. + +2000-12-02 Jim Meyering <meyering@lucent.com> + + * src/sort.c (checkfp): Rename local `buf' to avoid shadowing previous + declaration. + + * src/sort.c (NONZERO): Define and use it to make the code a tiny + bit more readable. + + * doc/textutils.texi (sort invocation): Clarify how -t works + when a sort key specifies a range of fields. From Karl O. Pinc. + +2000-11-26 Paul Eggert <eggert@twinsun.com> + + * src/od.c (skip): Use lseek instead of worrying about fseeko or fseek. + This should be portable, as we seek before doing any I/O. + (fseeko): Remove; no longer used. + +2000-11-30 Jim Meyering <meyering@lucent.com> + + * src/sort.c: s/SIZE_T_MAX/SIZE_MAX/. + +2000-11-30 Paul Eggert <eggert@twinsun.com> + + * src/sys2.h: Include <stdint.h> if HAVE_STDINT_H. + (SIZE_MAX): Renamed from SIZE_T_MAX, as C99 uses SIZE_MAX. + All uses changed. + +2000-11-30 Jim Meyering <meyering@lucent.com> + + * src/sort.c: SIZE_MAX is not defined, so s/SIZE_MAX/SIZE_T_MAX/, and... + * src/sys2.h (SIZE_T_MAX): ... define. + +2000-11-29 Paul Eggert <eggert@twinsun.com> + + Port GNU "sort" to hosts where sizes don't fit in "int", + e.g. 64-bit Solaris (sparc). + + * src/sort.c ("human.h", "xstrtol.h"): Include. + (struct line): length member is now size_t, not int. + (struct lines): Likewise for used, alloc, limit members. + (struct buffer): Likewise for used, alloc, left, newline_free members. + (struct keyfield): Likewise for sword, schar, eword, echar members. + (sortalloc, mergealloc, linelength): Now size_t, not int. + + (initbuf, fillbuf, initlines, begfield, limfield, findlines, + numcompare, getmonth, keycompare, compare, checkfp, mergefps, + sortlines, sort): Accept, return, and use size_t for sizes, not int. + + (fillbuf, initlines, findlines, checkfp, sort): Check for overflow + when computing buffer sizes. + + (begfield, limfield): Do not index past end of array. + + (checkfp): Return a boolean, not a line number, as the line + number may not fit in int. All callers changed. Use + uintmax_t for line numbers, not int. + + (sort): Don't allocate tmp until we need it (and know the right size). + + (parse_field_count): New function. + + (main): Use it to check for overflow in field counts. + "outfile" is now a pointer to const. + +2000-11-27 Jim Meyering <meyering@lucent.com> + + * src/checksum.h: Don't include system.h here. + * src/md5.c: Include config.h, stdio.h, sys/types.h. and system.h here + instead. + * src/sha1sum.c: Likewise. + +2000-11-18 Paul Eggert <eggert@twinsun.com> + + * src/pr.c (main): Do not assume EOF == -1. + Handle the case correctly when digits options immediately precede a + non-option. + +2000-11-18 Jim Meyering <meyering@lucent.com> + + * doc/textutils.texi: Change GNU to @sc{gnu} in many places. + Update to use the Free Documentation Licence. + + * configure, config.h.in, Makefile.in, etc.: Regenerate using the + very latest version (in CVS) of autoconf. + +2000-11-17 Jim Meyering <meyering@lucent.com> + + * GNUmakefile (.NOTPARALLEL): New target. Prevent unwanted parallelism. + Suggestion from Ulrich Drepper. + +2000-11-16 John David Anglin <dave@hiauly1.hia.nrc.ca> + + * tsort.c: Include sys/types.h before system.h. + +2000-11-16 Jim Meyering <meyering@lucent.com> + + * src/join.c: Declare global `tab' to be of type *unsigned* char, + so join works with 8-bit delimiter characters. + Reported by Antonio Rendas. + * tests/join/Test.pm (8-bit-t): New test for the above fix. + +2000-11-13 Paul Eggert <eggert@twinsun.com> + + * src/sys2.h (ST_TIME_CMP_NS): Fix typo: ST_MTIM_NSEC should + be tested with #ifdef, not with #if. + +2000-11-11 Jim Meyering <meyering@lucent.com> + + * doc/textutils.texi: More minor rewording and grammar correction. + From Brian Youmans. + +2000-11-06 Paul Eggert <eggert@twinsun.com> + + * src/od.c (skip): st_size is not defined for directories. + +2000-11-03 Jim Meyering <meyering@lucent.com> + + * tests/sha1sum/sample-vec: New file, with tests derived from + http://csrc.nist.gov/cryptval/shs/sha1-vectors.zip + * tests/sha1sum/Makefile.am (TESTS): Add sample-vec. + +2000-10-30 Jim Meyering <meyering@lucent.com> + + * configure, config.h.in, Makefile.in, etc.: Regenerate using the + very latest version (in CVS) of autoconf. + + * src/wc.c: Include "system.h" after wctype.h (not before) + to avoid a compilation error on Solaris 5.5.1 systems. + Reported by Vin Shelton. + +2000-10-23 Jim Meyering <meyering@lucent.com> + + * Makefile.maint: Clean up version-related variables. + + * Version 2.0.8. + + * Makefile.am (EXTRA_DIST): Add .prev-version. + +2000-10-22 Jim Meyering <meyering@lucent.com> + + * tests/Makefile.am (SUBDIRS): Add sha1sum. + * tests/sha1sum/basic-1: New file. + * configure.in (AC_OUTPUT): Add tests/sha1sum/Makefile. + + * src/Makefile.am (bin_PROGRAMS): Add sha1sum. + (md5sum_SOURCES): Define. + (sha1sum_SOURCES): Define. + (noinst_HEADERS): Add checksum.h. + + * src/md5sum.c: Factor out the differences between MD5 and SHA1, + and parameterize so this code may be used by both md5sum and the new + program, sha1sum. Loosely based on a patch from Scott Miller. + * src/checksum.h: New file. + * src/md5.c: New file that simply defines `algorithm'. + * src/sha1sum.c: Likewise. + + * man/Makefile.am (man_MANS): Add sha1sum.1. + * man/sha1sum.x: New file. + + Support 8-byte integers, assuming they're printable with e.g., %lld. + * src/od.c: Add support for printing data as unsigned + long long integers. + +2000-10-21 Jim Meyering <meyering@lucent.com> + + The command, `yes ''|./cat -n' would stop printing after INT_MAX lines. + * src/cat.c (cat): Never let `newlines' exceed 3. + +2000-10-21 Jim Meyering <meyering@lucent.com> + + Prevent a counter buffer overrun when numbering lines and when + processing 100 billion lines (or more) of input. + * src/cat.c (LINE_COUNTER_BUF_LEN): Define to allow numbering as + many as 10^18 - 1 lines (the old limit was 10^11 - 1, and could + be exceeded without too much trouble). Use this symbol rather + than hard-coding the constant everywhere. + (next_line_num): Rather than overrunning for input with more lines, + mark the line number by putting a `>' in the leftmost slot. + Patch by Jan Nieuwenhuizen. + + * src/sort.c (SORT_OUT_OF_ORDER): Define. + (main): Use it instead of hard-coding the `1'. + +2000-10-10 Jim Meyering <meyering@lucent.com> + + * src/sort.c (main): Use EXIT_SUCCESS rather than 0. + Fail when checking (-c) with more than one file argument, + rather than simply ignoring the extra arguments. + +2000-09-07 Jim Meyering <meyering@lucent.com> + + * src/cut.c: Remove obsolete comment block. + (usage): Note that when using -f, lines with no delimiters are + also printed. + * doc/textutils.texi (cut invocation): Likewise. + +2000-08-23 Jim Meyering <meyering@lucent.com> + + * src/md5sum.c: Include <config.h> unconditionally, to be consistent + with all the other programs in this directory. + * src/tsort.c: Likewise. + +2000-08-19 Jim Meyering <meyering@lucent.com> + + * src/comm.c (writeline): Correct comments. From Bruno Haible. + +2000-08-11 Paul Eggert <eggert@twinsun.com> + + * doc/textutils.texi: + + Portable shell scripts should specify global options before + key fields. + + Move global LC_CTYPE remark to each sort option that depends + on LC_CTYPE. + + sort -g depends on LC_NUMERIC. + + Add @vindex where it's missing. + + "radix character" -> "decimal-point character", to match Standard C + terminology, which is easier for most people to follow. + + "comm" does not consider trailing newlines to be significant. + +2000-08-10 Paul Eggert <eggert@twinsun.com> + + * doc/textutils.texi: Recommend against the System V syntax + for tr ranges, and don't use it in examples. Use POSIX + classes rather than ranges, for portability. + * src/tr.c (usage): Don't describe System V syntax, as it + doesn't always work. + + * src/sort.c (usage): Describe -d and -i in a locale-independent way. + + * doc/Makefile.am (constants.texi): Use the C locale so that + [A-Z] works as expected. + +2000-08-07 Paul Eggert <eggert@twinsun.com> + + * src/cut.c (cut_fields): Invoke xalloc_die instead of printing + our own message. + (cut_fields): Check for I/O error as well as end-of-file + +2000-08-06 Bruno Haible <haible@clisp.cons.org> + + * src/wc.c: Add support for multi-byte locales. + (iswprint, mbrtowc, wcwidth): Provide default definitions. + (total_bytes): New variable. + (print_bytes): New variable. + (longopts): Change abbreviation for --chars from 'c' to 'm'. + (usage): Update. + (write_counts): Add `bytes' argument. + (wc): New variables `bytes', `count_bytes', `count_chars', + `count_complicated'. The old code determines `bytes', not `chars'. + New case for MB_CUR_MAX > 1. A non-printable non-space character does + not increment the line position or start a word. Update `total_bytes'. + (main): Initialize `print_bytes' and `total_bytes' to 0. Accept 'm' + option. Pass `total_bytes' to write_counts. + * doc/textutils.texi (wc invocation): Update accordingly. + +2000-08-06 Bruno Haible <haible@clisp.cons.org> + + * src/head.c (head): Call write_header here. + (head_file): ... not here. + + * src/cat.c (closeout_func): Remove variable. + (close_stdout_wrapper): Remove unused function. + (main): Remove assignment to closeout_func. + + * src/fold.c (fold_file): Remove ferror(stdout) check, already done + in close_stdout. + +2000-08-06 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (usage): Warn more succinctly about the effects of + the locale on sort order. + +2000-08-06 Jim Meyering <meyering@lucent.com> + + * Version 2.0g. + + * src/tail.c (pipe_lines): Declare local `cp' to be const. + +2000-08-04 Greg McGary <greg@mcgary.org> + + * src/tail.c (pipe_lines): Add variable `nbytes' so we can free + `tmp' immediately after read loop. Don't process an empty file. + [This fixes a buffer-underrun error -- detected thanks to + bounded pointers -jmm] + +2000-08-05 Jim Meyering <meyering@lucent.com> + + Fix buffer-overrun error. + * src/pr.c (init_header): Allocated buffer was sometimes too small. + Reported by Greg McGary (who found this bug using his + bounded-pointers-enabled gcc). + (init_header): Move declarations of several variables into the + inner scope where they are used. + * tests/pr/Test.pm (narrow-1): New test, for the above. + + * src/csplit.c (MAX): Remove definition (It's in sys2.h). + +2000-08-04 Jim Meyering <meyering@lucent.com> + + * src/sort.c (main): Rename local `t' to `tmp_dir' to avoid shadowing + a previous local by that name. + (usage): Warn that GNU sort is now locale-aware, and suggest + people put LC_ALL=POSIX in their environment. + + * src/pr.c (store_columns): Remove conjunct that would dereference + an out-of-bounds pointer. Reported by Greg McGary (who found this + bug using his bounded-pointers-enabled gcc). + +2000-08-03 Jim Meyering <meyering@lucent.com> + + * tests/Makefile.am.in ($(srcdir)/$x-tests): Use -I$(srcdir), not `-I.'. + (Makefile.am): Likewise. Reported by Greg McGary. + +2000-08-01 Jim Meyering <meyering@lucent.com> + + * doc/textutils.texi (tr invocation): Note that ranges are not portable. + Update examples not to use ranges. + +2000-07-31 Jim Meyering <meyering@lucent.com> + + * src/cut.c (cut_fields): Use `virtual memory exhausted', + not `Memory exhausted'. + +2000-07-30 Jim Meyering <meyering@lucent.com> + + * src/help-version: Remove file. Move it to ... + * tests/help-version: ...here + * tests/Makefile.am (TESTS): Set to help-version. + (TESTS_ENVIRONMENT): Define. + (EXTRA_DIST): Add $(TESTS). + * src/Makefile.am (EXTRA_DIST): Remove help-version. + (TESTS): Remove definition. + (TESTS_ENVIRONMENT): Remove definition. + +2000-07-28 Paul Eggert <eggert@twinsun.com> + + sort's -T option can now appear multiple times. + Thanks to Charles Randall for suggesting this idea. + + * doc/textutils.texi, NEWS: Document this. + + * src/sort.c (temp_dir): Remove. + (temp_dirs, temp_dir_count, temp_dir_alloc): New vars. + (process_id): New var. + (usage): Describe new use of -T. + (add_temp_dir): New function. + (tempname): Use new temp_dirs array. + Do not discard information from the process-id or sequence + number, unless we have short file names. + (sighandle): Use process_id instead of getpid. + (main): Initialize process_id. + Add support for the new use of -T. + +2000-07-23 Jim Meyering <meyering@lucent.com> + + * tests/head/Test.pm: Rename tests (and hence files) to have a short + enough prefix so that they're not truncated on 8+3 file systems. + Reported by Eli Zaretskii. + +2000-07-09 Jim Meyering <meyering@lucent.com> + + * config.guess: Update from FSF. + * config.sub: Likewise. + +2000-07-02 Jim Meyering <meyering@lucent.com> + + * Version 2.0f. + +2000-07-01 Jim Meyering <meyering@lucent.com> + + * src/cut.c: Change type of global, field_1_bufsize, from int to size_t. + +2000-06-29 Jim Meyering <meyering@lucent.com> + + * src/tr.c (find_bracketed_repeat): Add a cast to suppress a warning. + Reported by Gerhard Poul. + + * src/tail.c (enum): Remove comma from end of enumerator list. + From Gerhard Poul. + +2000-06-25 Jim Meyering <meyering@lucent.com> + + * configure.in (ALL_LINGUAS): Add Danish (da). + +2000-06-24 Jim Meyering <meyering@lucent.com> + + * doc/textutils.texi: Lots of minor rewording and grammar correction. + From Brian Youmans. + + * tests/sum/basic-1: New file. + * tests/sum/Makefile.am: New file. + * configure.in (AC_OUTPUT): Add tests/md5sum/Makefile. + * tests/Makefile.am (SUBDIRS): Add sum. + +2000-06-22 Bruno Haible <haible@clisp.cons.org> + + * src/sum.c (sysv_sum_file): Avoid overflowing 32-bit accumulator + on files whose bytes sum to 2^32 or larger. The smallest such file + contains 16,843,010 bytes, nearly all of which have the value 0xff. + +2000-06-22 Bruno Haible <haible@clisp.cons.org> + + * src/cat.c (main): Correct a comment. + +2000-06-21 Jim Meyering <meyering@lucent.com> + + * src/cut.c (getstr): Remove private (and out of date) version of + this function. + (cut_fields): Adjust caller to use the just-extended one in ../lib. + Reported by Paul Sauer. + +2000-06-20 Jim Meyering <meyering@lucent.com> + + * src/uniq.c (main): Fix off-by-argc test, so +N-style options are + recognized once again. Reported by Geoff Keunning. + Fix typo in diagnostic: s/compare/skip/. + +2000-05-27 Jim Meyering <meyering@lucent.com> + + * src/tail.c: Arrange to call close_stdout upon exit. + Don't close stdout explicitly. + (usage): Add missing backslash at end of line. + (write_header): Remove now-unused COMMENT parameter. + Update all callers. + +2000-05-24 Jim Meyering <meyering@lucent.com> + + * src/head.c (head_file): Use STDIN_FILENO in place of `0'. + (main): Likewise. + +2000-05-20 Jim Meyering <meyering@lucent.com> + + * src/cat.c: Arrange to call close_stdout upon exit. + Don't close stdout explicitly. Replace uses of global constant, + output_desc, with uses of STDOUT_FILENO. + + Arrange to call close_stdout upon exit. Don't close stdout explicitly. + * src/cksum.c: Likewise. + * src/comm.c: Likewise. + * src/csplit.c: Likewise. + * src/cut.c: Likewise. + * src/expand.c: Likewise. + * src/fmt.c: Likewise. + * src/fold.c: Likewise. + * src/head.c: Likewise. + * src/join.c: Likewise. + * src/md5sum.c: Likewise. + * src/nl.c: Likewise. + * src/od.c: Likewise. + * src/paste.c: Likewise. + * src/pr.c: Likewise. + * src/ptx.c: Likewise. + * src/sort.c: Likewise. (but set exit status and file name, too) + * src/split.c: Likewise. + * src/sum.c: Likewise. + * src/tac.c: Likewise. + * src/tr.c: Likewise. + * src/tsort.c: Likewise. + * src/unexpand.c: Likewise. + * src/uniq.c: Likewise. + * src/wc.c:: Likewise. + +2000-05-13 Jim Meyering <meyering@lucent.com> + + * src/help-version: Run each program successfully at least once. + +2000-05-12 Jim Meyering <meyering@lucent.com> + + * src/head.c (string_to_integer): Restrict base to 10. + Reported by Joseph S. Myers. + * tests/head/Test.pm: Add a few tests for this. + + New option: --first-only + * src/unexpand.c (anonymous enum) [CONVERT_FIRST_ONLY_OPTION]: Define. + (long_options): Add `first-only'. + (main): Handle new option. + +2000-05-11 Jim Meyering <meyering@lucent.com> + + * tests/unexpand/basic-1: New tests. + +2000-04-17 Bruno Haible <haible@clisp.cons.org> + + * src/system.h [__BEOS__]: Ignore O_BINARY and O_TEXT. + +2000-04-16 Jim Meyering <meyering@lucent.com> + + * src/tail.c: Prepare to remove option: --max-consecutive-size-changes. + Doesn't seem useful. + (usage): Remove description. + * doc/textutils.texi (tail invocation): Remove description. + +2000-04-12 Jim Meyering <meyering@lucent.com> + + * src/tail.c (usage): Tweak --help output. Suggestions from Karl Berry. + + Move some macros into m4/. + * configure.in (_GNU_SOURCE): Don't define here. + (AC_SYS_LARGEFILE): Don't use here. + (AM_C_PROTOTYPES): Don't use here. + * acconfig.h: Remove now-unused file. + +2000-04-09 Jim Meyering <meyering@lucent.com> + + * doc/textutils.texi: Include constants.texi. + (tail invocation): Use `@value's instead of referring to the + output of `tail --help' for defaults. + * doc/Makefile.am (constants.texi): New rule. + (EXTRA_DIST): Add constants.texi. + (MAINTAINERCLEANFILES): Add it here, too. + (textutils.dvi, textutils.info): Depend on constants.texi. + + * src/tail.c (usage): Clarify descriptions of the --max-* options. + From Karl Berry. + +2000-04-03 Jim Meyering <meyering@lucent.com> + + * configure.in (AC_CHECK_HEADERS): Remove langinfo.h. Now it's in m4/. + (AC_CHECK_FUNCS): Remove nl_langinfo. Now it's in m4/. + +2000-03-17 Jim Meyering <meyering@lucent.com> + + * configure.in (ALL_LINGUAS): Add Slovenian (sl). + +2000-03-12 Jim Meyering <meyering@lucent.com> + + Merge from fileutils. + * src/system.h "pathmax.h": Include. + <sys/time.h>: Include if appropriate. + <time.h>: Likewise. + <sys/mkdev.h>: Likewise. + <sys/sysmacros.h>: Likewise. + <utime.h>: Likewise. + (major, minor, makedev): Define if needed. + (struct utimbuf): Declare if missing. + (ST_BLKSIZE, ST_NBLOCKS, ST_NBLOCKSIZE): Define. + + * src/cksum.c (usage): Correct --help output. + Prompted by a report from Gregory Leblanc. + +2000-03-05 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (struct buffer.newline_free): New member. + (initbuf, findlines): Set it. + (fillbuf): Do not double the size of a full buffer to append a newline + unless the buffer is known to be newline free. + +2000-03-05 Jim Meyering <meyering@lucent.com> + + * Version 2.0e. + +2000-03-04 Jim Meyering <meyering@lucent.com> + + Don't get failed assertion for `tail -f directory'. + * src/tail.c: Revert most of 1999-10-20 change. Instead, ... + (IS_TAILABLE_FILE_TYPE): Define to produce similar result. + (recheck): Use it here. + (tail_file): Use it here. + Reported by François Pinard. + + Once we encounter a file that is not of IS_TAILABLE_FILE_TYPE, + marke it as such and ignore it forever after. + * src/tail.c (struct File_spec): New member. + (recheck): Initialize new member. + (tail_file): Likewise. + (tail_forever): Skip the file if it's marked as ignorable. + +2000-03-03 Jim Meyering <meyering@lucent.com> + + * src/sort.c (fillbuf): Move declaration of local, cc, into scope of + `while' loop where it's used. + +2000-03-02 Paul Eggert <eggert@set.twinsun.com> + + Big performance improvement when sorting many small files, + building on a suggestion by Charles Randall. + + * src/sort.c (fillbuf): Skip memmove if it would be a no-op, + as many memmove implementations are slow in that case. + Don't examine leftover bytes for eolchar, since they may be left + over from a previous file, and we want to read from this file. + + (sort): At end of file, if there is more input and buffer room, + concatenate the next input file. + +2000-02-29 Jim Meyering <meyering@lucent.com> + + * src/join.c (make_blank): Add an explicit cast to `unsigned char *' + to placate HPUX's C compiler. Reported by Bob Proulx. + +2000-01-30 Jim Meyering <meyering@lucent.com> + + * Version 2.0d. + + * Makefile.maint (my-distcheck): Depend on po-check, so I'll be warned + about any required changes at `make distcheck' time rather than at + `make alpha' time. + (writable-files): New target. + (my-distcheck): Depend on it. + (alpha): Likewise. + + * po/POTFILES.in: Add these: lib/makepath.c, lib/rpmatch.c, + and lib/same.c + +2000-01-29 Jim Meyering <meyering@lucent.com> + + * configure.in: Remove lib-check for cposix now that we use + m4/isc-posix.m4. + (jm_LIB_CHECK): Use this even though the library checks aren't + required for this patchage (so all three lib/Makefile.in files + will be the same). + +2000-01-24 Mark Kettenis <kettenis@gnu.org> + + * src/tsort.c (exit_status): New variable. + (loop): New varibale. + (count_items, scan_zeroes): Change return type to int. + (detect_loop): Complete rewrite to correctly implement detection + of loops. Also change return type to int. + (recurse_tree): Stop if ACTION returns non-zero. This involves + changing the return type of this function and ACTION to int. + (walk_tree): Change return type of ACTION to int. + (tsort): Continue sort after a loop has been detected (and + broken). Set exit_status to 1 if a loop was detected. + (main): Use exit_status to determine exit code. + * tests/tsort/basic-1: Change expected output for cycle-1 and + cycle-2 tests. + +2000-01-23 Jim Meyering <meyering@lucent.com> + + * configure.in (AM_FUNC_STRTOD): Move to m4/. + (AC_SUBST(POW_LIBM)): Likewise. + +2000-01-22 Jim Meyering <meyering@lucent.com> + + * src/sort.c (keycompare): Use global, hard_LC_COLLATE in place of + local that is sometimes undeclared. + + * configure.in (ALL_LINGUAS): Add Brazilian Portuguese (pt_BR). + (AC_CHECK_HEADERS): Move these checks into m4/. + + * src/tr.c ("xstrtol.h"): Include. + (Filter): Rename from PFL. + (non_neg_strtol): Remove function. + (find_bracketed_repeat): Use xstrtoul instead of non_neg_strtol. + (squeeze_filter, set_initialize, main): Use size_t and ssize_t in + place of long and int in several decls. + (read_and_delete, read_and_xlate): Likewise, and remove assertion. + * tests/tr/Test.pm (o-rep-1, o-rep-2): New tests. + + * src/cut.c: Correct copying notice to use GPL, per author's request. + * src/paste.c: Likewise. + (AUTHORS): Add djm. + +1999-09-19 Bruno Haible <haible@clisp.cons.org> + + * src/tr.c (PFI): Return `long', not `int'. + (PFL): Rename from PFI now that it returns long. + (squeeze_filter): Declare as `long': i, nr, out_len. + +2000-01-17 Paul Eggert <eggert@twinsun.com> + + Tweak sort performance. + + * src/sort.c (hard_LC_CTYPE): Remove. + (keylist): Renamed from keyhead. Now a pointer, not a + mostly-unused struct. All uses changed. + (findlines, keycompare, CMP_WITH_IGNORE, compare, checkfp, mergefps, + sort): Tune and use a more consistent style for reallocation. + (keycompare, main): Don't worry about LC_CTYPE; + it's buggy with multibyte chars anyway. + (compare): Invoke alloca (0) after each call to keycompare, + not just the ones that return nonzero. This avoids a memory + leak on architectures without builtin alloca that occurs + sometimes when a file contains all duplicate lines. + +2000-01-17 Paul Eggert <eggert@twinsun.com> + + * src/csplit.c (interrupt_handler, main): + Don't use SA_INTERRUPT to decide whether to call sigaction, as + POSIX.1 doesn't require SA_INTERRUPT and some systems + (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead; + it's been part of POSIX.1 since day 1 (in 1988). + * src/sort.c (sighandler, main): Likewise. + +2000-01-16 Jim Meyering <meyering@lucent.com> + + * lib/Makefile.am: Merge with fileutils/lib/Makefile.am. + + * configure.in: Remove AM_FUNC_ERROR_AT_LINE, jm_FUNC_STRFTIME, + AC_FUNC_VPRINTF, and AC_FUNC_ALLOCA. Now they're in m4/. + +2000-01-15 Jim Meyering <meyering@lucent.com> + + * configure.in (AC_REPLACE_FUNCS): Remove these: memcpy memset stpcpy + strpbrk strtol strtoul. Now that's in m4/. + + unexpand could infloop + * src/unexpand.c (TAB_STOP_SENTINEL): Define. + (unexpand): Use it instead of INT_MAX. + Declare column and pending to be `unsigned'. + Increment pending and column counters only if column is smaller + than TAB_STOP_SENTINEL. + * tests/Makefile.am (SUBDIRS): Add unexpand. + * tests/unexpand/basic-1: New tests for the above-fixed bug. + * configure.in (AC_OUTPUT): Add tests/unexpand/Makefile. + Reported by John Kodis. + +2000-01-12 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (fillbuf): Avoid quadratic behavior with long lines. + Also, stop worrying about ancient memchr bug (misbehavior when + size is zero), since other code doesn't worry either. + +2000-01-11 Jim Meyering <meyering@lucent.com> + + Sync lib/ directories of sh-utils, and textutils. + + * lib/Makefile.am (libfetish_a_SOURCES): Add getdate.y, posixtm.c, + basename.c, canon-host.c, readutmp.c, stripslash.c, xgetcwd.c, + xgethostname.c. + (noinst_HEADERS): Add getdate.h, group-member.h, posixtm.h, + pathmax.h, readutmp.h + + * lib/Makefile.am: s/tu/fetish/ + * src/Makefile.am: s/libtu/libfetish/ + +2000-01-10 Jim Meyering <meyering@lucent.com> + + * Version 2.0c. + + * Makefile.maint (announcement): Include URLs for xdelta files. + (alpha): Use scp, not ncftp. + + * lib/Makefile.am (noinst_HEADERS): Add nanosleep.h. + +2000-01-08 Jim Meyering <meyering@ascend.com> + + * Version 2.0b. + + More nits. + * src/cut.c (OUTPUT_DELIMITER_OPTION): Define this and use it + instead of `CHAR_MAX + n'. + * src/pr.c (PAGES_OPTION, COLUMNS_OPTION): Likewise. + +2000-01-07 Jim Meyering <meyering@ascend.com> + + * tests/tsort/Makefile.am (TESTS_ENVIRONMENT): Add `pwd`/ prefix + to exported PATH value (though not strictly necessary, here). + * tests/md5sum/Makefile.am: Likewise. + + Nits. + * lib/memcasecmp.c: Use `#if' instead of `#ifdef' for `HAVE_CONFIG_H'. + Capitalize all macro parameters. + (memcasecmp): Ansideclify. + Don't cast away `const'ness of parameters. + * lib/strpbrk.c (strpbrk): Ansideclify. + Use `#if' instead of `#ifdef' for `HAVE_CONFIG_H'. + Suggestions from François Pinard. + +2000-01-06 Jim Meyering <meyering@ascend.com> + + * tests/tail-2/assert: Tell the user just before sleeping for 7 seconds. + + * tests/tail-2/Makefile.am (TESTS): Remove fflush test. It didn't + test the losing behavior, and left a stray tail process to boot. + +2000-01-01 Jim Meyering <meyering@ascend.com> + + * Version 2.0a. + + * lib/Makefile.am (lstat.c): Adapt rule to handle new parts of xstat.in. + +1999-12-12 Jim Meyering <meyering@ascend.com> + + Move 120+ lines of stat.h-related macros from system.h (not shared) + to sys2.h, which is shared between fileutils, sh-utils, textutils. + * src/system.h: Move them from here... + * src/sys2.h: ... to here. + +1999-12-09 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add Galician (gl). + +1999-12-06 Jim Meyering <meyering@ascend.com> + + * tests/tail-2/fflush: New test for latest change. + * tests/tail-2/Makefile.am (TESTS): Add fflush. + +1999-10-26 Marc Boucher <marc@mbsi.ca> + + * src/tail.c (main): Flush stdout before switching to unbuffered mode + and calling tail_forever. Required only on Solaris 5.7 -- on other + systems, using setvbuf to switch to unbufferd mode does the flush. + +1999-11-22 Jim Meyering <meyering@ascend.com> + + * lib/Makefile.am (DISTCLEANFILES): Put $(BUILT_SOURCES) here rather + than in $(MAINTAINERCLEANFILES). + + * src/tail.c (recheck): Handle a race condition (including <dev,inode> + reuse) that would lead to a failed assertion. + Reported by Ken Pizzini. + (tail_forever): Record errno before using it in call to `error' + which might change it. + (tail_file): Likewise. + + New test for the above. + * tests/tail-2/assert: New file. + * tests/tail-2/Makefile.am: New file. + * tests/tail-2: New directory. + * tests/Makefile.am (SUBDIRS): Add tail-2. + * configure.in (AC_OUTPUT): Add tests/tail-2/Makefile. + +1999-11-05 Jim Meyering <meyering@ascend.com> + + * src/system.h: Use HAVE_STRUCT_STAT_ST_BLKSIZE not HAVE_ST_BLKSIZE. + + * configure.in: Move some type/header/member tests into + m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) so they are shared by all of + fileutils, textutils, and sh-utils. + +1999-11-04 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (SORTALLOC): New macro. + (sortalloc, mergealloc, LINEALLOC): Use it. + (sortalloc, mergealloc, linelength): Now const. + (sortalloc): Increase from 0.5 to 8 MB. + (mergealloc): Increase from 16 to 256 kB. + (LINEALLOC): Increase from 0.25 to 4 MB. + +1999-11-03 Paul Eggert <eggert@twinsun.com> + + * NEWS, doc/textutils.texi: + Do not consider newline to be part of a line when comparing lines + in `sort' and `comm'. POSIX.2 requires that we consider newline, + but this is a bug in the spec and the bug will likely be fixed. + * src/comm.c (compare_files): Likewise. + * src/sort.c (begfield, limfield, findlines, keycompare, compare): + Likewise. + * tests/sort/Test.pm: Update tests `use-nl' and `11d' to reflect + this change. + + * lib/linebuffer.c (readline): Do not leave room for an extra + byte after the newline; it's no longer needed. + * src/sort.c (sortalloc, mergealloc, fillbuf, checkfp, mergefps): + Likewise. + + * lib/memcoll.c (memcoll): The two arguments cannot be + adjacent any more, so remove the alloca/copy workaround for + that case. + +1999-11-03 Jim Meyering <meyering@ascend.com> + + Fix so that `tail -fn 2 file' works again. + * src/tail.c (anonymous enum) [LONG_FOLLOW_OPTION]: Define. + (long_options): Use LONG_FOLLOW_OPTION here, instead of 'f'. + (main): Remove the `::' after the `f' in getopt_long string. + Add `case LONG_FOLLOW_OPTION' after `case 'f':'. + Based on a patch from Tim Waugh. + + * src/tail.c (anonymous enum) [RETRY_OPTION]: Define. + [MAX_UNCHANGED_STATS_OPTION]: Likewise. + [MAX_CONSECUTIVE_SIZE_CHANGES_OPTION]: Likewise. + [PID_OPTION]: Likewise. + (long_options): Use *_OPTION instead of CHAR_MAX + N. + (main): Likewise. + +1999-11-02 Jim Meyering <meyering@ascend.com> + + * man/help2man: Import version 1.018. + * man/Makefile.maint ($(man_MANS)): Remove use of --name=... option. + * man/*.x: Include one-line summary in [NAME] section. + * man/Makefile.summ (cat-summary): Remove now-unused file. + * man/Makefile.am (EXTRA_DIST): Remove Makefile.summ. + * man/Makefile.maint: Include Makefile.summ with leading `-'. + This file is shared by fileutils and sh-utils, both of which still + have the file (albeit nearly empty now). + Suggestion for clean-up from Akim Demaille. + +1999-11-01 Jim Meyering <meyering@ascend.com> + + * lib/Makefile.am (MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES). + +1999-10-20 Jim Meyering <meyering@ascend.com> + + * src/tail.c (recheck): Don't refuse to tail a non-regular, non-pipe. + (tail_file): Likewise. + +1999-10-07 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add Japanese (ja). + +1999-10-04 Jim Meyering <meyering@ascend.com> + + * depcomp: New file, for automake's new dependency support. + * missing: New version, from automake's user-dep-gen-branch. + +1999-09-28 Jim Meyering <meyering@ascend.com> + + * src/system.h: Update from the system.h from fileutils. + + * lib/error.c (error_at_line): Use strerror portably here, too, + just as was done in error. + +1999-09-02 Jim Meyering <meyering@ascend.com> + + * src/cut.c: Remove xstrdup declaration. + * src/sort.c: Likewise. + * src/tsort.c: Likewise. + +1999-08-22 Jim Meyering <meyering@ascend.com> + + * src/tsort.c (detect_loop): There's no loop if k->top is NULL. + Niklas Edmundsson showed how to make tsort segfault. + + * tests/tsort/Makefile.am: Rewrite to use Fetish.pm-based framework. + * tests/tsort/basic-1: New file. + Add a few more tests. + * tests/tsort/Test.pm: Remove. + + * man/help2man: Escape backslashes so tr's manual comes out right. + Reported by Andreas Schwab. + + * src/tsort.c (usage): Correct address for bug reports. + (tsort): Remove trailing `\n' in error format. + + * src/md5sum.c (md5_check): Remove trailing `\n' in error format. + + * src/sys2.h (IF_LINT): Define new macro. + * src/od.c (dump): Use IF_LINT macro instead of #ifdef lint... + (main): Likewise. + * src/paste.c (paste_parallel): Likewise. + * src/pr.c (read_line): Likewise. + * src/sort.c (checkfp): Likewise. + (mergefps): Likewise. + + * src/cksum.c (cksum): Constify a char*. + * src/comm.c (writeline): Likewise. + + * src/uniq.c (check_file): Move declarations of local variables + into the scopes where they're used. + (min): Remove macro definition. + (different): Use MIN, not min. + (SWAP_LINES): New macro. + (check_file): Use it here. + + * src/uniq.c (check_file): Generate each line of output earlier, + when possible. It is possible when using none of these options: + --count, -repeated, --all-repeated, --unique. + Based on a patch from Ian Turner. + +1999-08-15 Jim Meyering <meyering@ascend.com> + + * src/tail.c (ENOSYS): Define to a bogus value if not already defined. + +1999-08-13 Eli Zaretskii <eliz@is.elta.co.il> + + * src/tail.c (parse_options): Warn if --pid=PID is used and kill() + returns ENOSYS (e.g. when compiled with DJGPP). + +1999-08-13 Jim Meyering <meyering@ascend.com> + + * src/tsort.c (usage): Use consistent bug-reporting address. + + * tests/tsort/Test.pm: New file. + * tests/tsort/Makefile.am: New file. + * tests/tsort: New directory. + * tests/Makefile.am (SUBDIRS): Add tsort. + * configure.in (AC_OUTPUT): Add tests/tsort/Makefile. + +1999-08-11 Paul Eggert <eggert@twinsun.com> + + * doc/textutils.texi: Document how to ignore newline during sort. + +1999-08-07 Jim Meyering <meyering@ascend.com> + + * po/POTFILES.in: Add lots of lib/*.c files. Remove src/system.h. + +1999-08-06 Jim Meyering <meyering@ascend.com> + + * Version 2.0. + + * src/sort.c: Include file name in `write error' diagnostics. + (write_bytes): Add output_file parameter and use it. Update callers. + (mergefps): Likewise. + (merge): Likewise. + (sort): Likewise. + Reported by John Summerfield. + +1999-08-05 Jim Meyering <meyering@ascend.com> + + * src/tail.c (Follow_mode): Remove comma at end of enumerator list. + Reported by Kaveh Ghazi. + + * config.sub: Update from autoconf. + * config.guess: Update from autoconf. + +1999-08-04 Jim Meyering <meyering@ascend.com> + + * Version 1.22q. + + * configure.in: Remove inadequate getline-testing code. md5sum would + segfault on HPUX because of the getline function in their C library. + Use the AM_FUNC_GETLINE test in m4/ instead. + +1999-08-03 Jim Meyering <meyering@ascend.com> + + * src/tail.c (tail_forever): When following by name and calling recheck + because of exceeding max_n_consecutive_size_changes_between_opens, + `continue' so we don't fall through and (assuming the file finally grew) + get the erroneous `file truncated' message. This was hard to reproduce. + +1999-08-01 Jim Meyering <meyering@ascend.com> + + * Version 1.22p. + + * configure.in (AM_C_PROTOTYPES): Move test to precede a few + header tests -- merely on principle. + +1999-08-01 Paul Eggert <eggert@twinsun.com> + + * configure.in (AC_SYS_LARGEFILE): Renamed from AC_LFS. + +1999-07-16 Paul Eggert <eggert@twinsun.com> + + * lib/quotearg.c (quotearg_buffer): + Don't quote spaces if C quoting style. + +1999-07-31 Jim Meyering <meyering@ascend.com> + + * src/tail.c (tail_forever): Don't call kill if pid is 0. + Detect when `writer_is_dead' also when the writer is some other user. + From Karl Heuer. + + * src/tail.c (parse_options): Warn if --pid=PID is used without -f. + +1999-07-30 Jim Meyering <meyering@ascend.com> + + * Version 1.22o. + + * src/tail.c: New option: --pid=PID. + Include signal.h for kill prototype. + (pid): New global. + (long_options): Add `pid'. + (usage): Describe it. + (tail_forever): Implement it. + (parse_options): Handle the new option and required arg. + Suggestion and pseudo-code from Karl Heuer. + +1999-07-27 Jim Meyering <meyering@ascend.com> + + * lib/linebuffer.c: Include <sys/types.h> now that linebuffer.h uses + size_t. This is required on at least SunOS4. From Kaveh Ghazi. + +1999-07-26 Jim Meyering <meyering@ascend.com> + + * src/sys2.h (PID_T_MAX): Define. + + * src/tail.c (struct File_spec) [n_stat_calls]: Remove unused member. + +1999-07-25 Jim Meyering <meyering@ascend.com> + + * src/pr.c (usage): Remove `NEWS'-style paragraph (sorry to have + let that in, translators). + + * Version 1.22n. + +1999-06-01 Volker Borchert <bt@teknon.de> + + * tests/Makefile.am: Make envvar-check depend on check-recursive rather + than on `check' so that its tests are performed before any real tests. + +1999-07-20 Jim Meyering <meyering@ascend.com> + + * configure.in (AC_REPLACE_FUNCS) Remove memmove, now that it's + AC_REPLACE...'d in m4/jm-macros.m4. + + * src/wc.c (posixly_correct): Declare global. + (write_counts): Use it to select printf formats. + (main): Set posixly_correct from the POSIXLY_CORRECT envvar. + From Peter Moulder. + +1999-07-15 Jim Meyering <meyering@ascend.com> + + * tests/md5sum/Makefile.am: Revert the 1999-02-15 change. + * tests/md5sum/basic-1, newine-1: Add --text for each individual test. + Reported by Eli Zaretskii. + +1999-07-12 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add Slovak (sk). + +1999-07-11 Jim Meyering <meyering@ascend.com> + + * src/tail.c (recheck): Use assert instead of unnecessary close_fd. + Remove a couple of unnecessary FIXME comments. + +1999-07-10 Jim Meyering <meyering@ascend.com> + + * doc/textutils.texi: Document new tail options. + + * src/tail.c (struct File_spec) [tailable]: Rename from `missing' and + document. Change all uses and locals like was_missing to was_tailable. + Invert expressions as appropriate. + (reopen_inaccessible_files): Rename from allow_missing. + (sleep_interval): Describe. + (--allow-missing): Deprecate. + (--retry): New option, equivalent to --allow-missing. + (usage): Document name vs. descriptor differences. + Refer to manual for descriptions of --max-unchanged-stats=N + and --max-consecutive-size-changes=N. + (valid_file_spec): New function. + (recheck): Assert valid_file_spec. + Remove dead else-if block (suggestion from Eli Zaretskii). + Adjust stmts that set f->tailable -- unlike for `missing', tailable + doesn't depend on errno == ENOENT. + (parse_options): Give a warning if --retry is used when not following + by name. + + * tests/join/Test.pm: New test case (but commented out) for + Paul's 1999-06-01 fix. + +1999-07-09 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add Greek (el). + +1999-07-04 Jim Meyering <meyering@ascend.com> + + * tests/join/Test.pm: New test case for Paul's 1999-06-03 fix. + +1999-07-03 Eli Zaretskii <eliz@is.elta.co.il> + + * src/tail.c (struct File_spec): New member, errnum. + (recheck): Record the new value of errno in f->errnum. Don't + output an error message unless the new value of errno differs from + the old one. Output a message if previously-inaccessible file + becomes accessible. + (tail_forever): Always recheck files whose fd is negative. If the + file cannot be fstat'ed, record the errno value in f[i].errnum. + (tail_file): If the file cannot be open, record the errno value in + f->errnum. If it can be opened, initialize f->errnum to zero. If + it's a non-regular non-fifo file, initialize f->errnum to -1. + +1999-06-21 Jim Meyering <meyering@ascend.com> + + * doc/textutils.texi: Use lower case characters in sc{} context. + Reported by Eli Zaretskii. + +1999-06-03 Paul Eggert <eggert@shade.twinsun.com> + + * src/join.c (xfields): Only <blank>s separate fields, not <space>s. + +1999-06-01 Paul Eggert <eggert@twinsun.com> + + * lib/linebuffer.c (readline): Leave room for an extra byte + after the newline; comm needs this for memcoll. + +1999-06-01 Paul Eggert <eggert@twinsun.com> + + Add LC_COLLATE support to `join'. + + * doc/textutils.texi: Describe join and LC_COLLATE. + + * src/join.c: Add support for LC_COLLATE locale. + Include hard-locale.h, linebuffer.h, memcoll.h. + (struct line): New member `buf', replacing `beg' and `lim'. + All uses changed. + (hard_LC_COLLATE): New var. + (main): Initialize it. + (get_line): Use readline to read the line, + instead of doing it by hand. + That way, we get a buffer that we can pass to memcoll. + (keycmp): Use memcoll to compare lines if hard_LC_COLLATE is nonzero. + +1999-05-27 Volker Borchert <bt@teknon.de> + + * tests/Makefile.am: Qualify .env-warn with $(srcdir)/ prefix. + +1999-05-25 Paul Eggert <eggert@twinsun.com> + + Add LC_COLLATE support to `comm', so that `comm' is compatible + with `sort' in nontrivial locales. + + * doc/textutils.texi: Document locale-specific mode for comm. + + * lib/Makefile.am (libtu_a_SOURCES): Add hard-locale.c, memcoll.c. + (noinst_HEADERS): Add hard-locale.h, memcoll.h. + + * src/comm.c: Include hard-locale.h, memcoll.h. + (hard_LC_COLLATE): New variable. + (compare_files): Use memcoll to compare if hard_LC_COLLATE. + (main): Initialize hard_LC_COLLATE from locale. + + * src/sort.c: Include hard-locale.h, memcoll.h. + (hard_LC_COLLATE, hard_LC_CTYPE, hard_LC_TIME): New variables, + replacing `need_locale'. + (memcoll): Move to lib/memcoll.c. + (keycompare): No need to alloc (0), since our caller now does it. + (compare): alloca (0) before returning. + (my_setlocale): Remove; hard_locale now dows this. + (main): Invoke setlocale, bindtextdomain, and textdomain before + invoking anything that might print an error. + Use hard_locale to determine which locales are hard. + + * lib/hard-locale.c, lib/hard-locale.h, lib/memcoll.c, lib/memcoll.h: + New files. + +1999-05-25 Paul Eggert <eggert@shade.twinsun.com> + + * lib/linebuffer.c (readline): + Append trailing newline to line. + * lib/linebuffer.h + [struct linebuffer] (size): Declare to be of type size_t, not long. + [struct linebuffer] (length): Likewise. + * src/comm.c, (writeline): Lines now contain trailing newline. + * src/uniq.c (find_field, different): Use size_t, not int, for lengths. + (writeline): Lines now contain trailing newline. + (check_file): Use size_t, not int, for lengths. + * src/nl.c (proc_text, check_section, main): More of the same. + + * lib/linebuffer.h (struct linebuffer): Use size_t for sizes. + src/nl.c (header_del_len, body_del_len, footer_del_len, main): + Likewise. + src/uniq.c (find_field, different, check_file): Likewise. + + * lib/linebuffer.c (readline): Silently append trailing + newline if needed. Do not bother setting buffer length to 0 + at EOF, since it's not part of the spec and nobody relies on + it. Do not compute the difference between unrelated pointers. + +1999-05-25 Paul Eggert <eggert@twinsun.com> + + * src/tac.c (memrchr): Ifdef out this unused function. + +1999-05-25 Jim Meyering <meyering@ascend.com> + + * doc/textutils.texi (Squeezing): Remove misleading square brackets + from SET1 in the one-word-per-line example. + +1999-05-22 Jim Meyering <meyering@ascend.com> + + * lib/Makefile.am (libtu_a_SOURCES): Remove memchr.c. + From Ulrich Drepper. + + * Version 1.22m. + +1999-05-22 Paul Eggert <eggert@twinsun.com> + + * doc/textutils.texi: Document locale-specific changes to `sort', + as well as the new, POSIX-compliant definition of line comparison, + and -g's more careful treatment of NaNs, infinities and zeros. + + * src/sort.c (general_numcompare): Put exceptional cases + first, not last, to be consistent with -M. + +1999-05-21 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (strtod): Declare if STDC_HEADERS is not defined. + (general_numcompare): Use strtod, not xstrtod. + Do not consider partial conversions to be errors. + Put -infinity at the start, and +infinity at the end; + follow +infinity with NaNs (sorted by bit pattern), + and finally by conversion errors. + +1999-05-21 Jim Meyering <meyering@ascend.com> + + * tests/sort/Test.pm (11d): Reverse lines in expected output + to reflect latest change. + (use-nl): New test from Paul Eggert. + +1999-05-20 Paul Eggert <eggert@twinsun.com> + + * src/sort.c: Treat the trailing newline as part of the line, + as required by POSIX.2. + + (struct line, findlines, compare, checkfp, mergefps, sort): + A line now includes its trailing newline. + (findlines): Do not replace newline with NUL. + (memcoll, keycompare): Work even if the data to be compared are + adjacent strings; this is possible now that lines contain the + trailing newline. + (fillbuf): Always have an unused byte at the end of the buffer, + since memcoll and keycompare want to modify a byte after the last line. + (sortalloc, mergealloc): Increase by 1, for trailing byte. + +1999-05-20 Jim Meyering <meyering@ascend.com> + + * tests/sort/Test.pm: Add test case from Paul Eggert. + +1999-05-20 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (keycompare): Ignore any length difference if the + localized comparison says the strings are equal. + + * src/sort.c (memcoll, keycompare, compare): Handle NUL + characters properly when comparing with LC_COLLATE semantics. + (NLS_MEMCMP): Remove. + (memcoll): Renamed from strncoll. + Take separate lengths for each string. + This function is now invoked only when need_locale. + (keycompare): Don't copy strings when ignore and translate + are both NULL. + +1999-05-18 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (MONTHTAB_CONST): Renamed from NLS_CONST; the use + is also changed. Define to const also if !HAVE_NL_LANGINFO. + + (usage): `,' -> `;' (English typo). + +1999-05-17 Eli Zaretskii <eliz@is.elta.co.il> + + * src/cat.c (main): When stdout is in binary mode, make sure all + input files are also read in binary mode. + +1999-05-16 Jim Meyering <meyering@ascend.com> + + * Version 1.22l. + +1999-05-11 Paul Eggert <eggert@twinsun.com> + + * src/sort.c: Don't autodetect the locale of numbers and + months, as this conflicts with POSIX.2 and is tricky to boot. + + (FLOATING_COMMA, NLS_STRNCMP, NLS_MAX_GROUPS, + NLS_ONE_CHARACTER_STRING): Remove macros no longer used. + + (nls_grouping, nls_fraction_found, nls_month_found, nos_monthtab, + nls_months_collide, nls_keyhead, us_monthtab): Remove variables no + longer used. + + (struct nls_keyfield): Remove types no longer used. + + (strncoll_s2_readonly, nls_set_fraction, look_for_fraction, + nls_month_is_either_locale, nls_numeric_format): Remove functions no + longer used. + + (monthtab): Now has the role that us_monthtab had, but it's const only + if ENABLE_NLS is not defined. + + (C_DECIMAL_POINT): Renamed from FLOATING_POINT. All uses changed. + (MONTHS_PER_YEAR): Renamed from NLS_NUM_MONTHS. All uses changed. + (struct_month_cmp): Renamed from nls_sort_month_comp. All uses changed. + Use strcmp, not strcoll, since the user doesn't care about collating + here. + + (inittables): Read locale data into monthtab, rather than modifying a + separate month table and futzing with indirection. Do not worry about + colliding months, since we no longer autodetect month locale. + + (fraccompare): Don't set no-longer-used variable nls_fraction_found. + + (getmonth): Use strncmp to compare months, since user doesn't care + about collating here. Fix bug where code incorrectly assumed that + strlen (monthtab[lo].name) == strlen (monthtab[ix].name). + + (keycompare, main): Don't autodetect month locale. + + (compare): Don't use NLS_MEMCP in code that can't be executed if + need_locale is false, as NLS_MEMCP is equivalent to memcmp in that + case. + + (sort, insertkey, main): Don't autodetect numeric locale. + +1999-05-15 Jim Meyering <meyering@ascend.com> + + * tests/join/Test.pm (trailing-sp): New test for this fix. + * src/join.c (xfields): Don't interpret a trailing blank as a + delimiter when e.g. -t: was specified. From Tim Smithers. + +1999-05-12 Jim Meyering <meyering@ascend.com> + + * tests/Makefile.am (envvar-check): Renamed from check-local. + (check): Depend on envvar-check so the envvar check is performed + before all other tests. Reported by Volker Borchert. + * tests/.env-warn: Use `%%' place-holder that Makefile.am rule expects, + so CDPATH is mentioned in the message. Reported by Volker Borchert. + +1999-05-11 Jim Meyering <meyering@ascend.com> + + * src/sort.c (usage): Split the --help message into two pieces so that + neither is longer than 2048. For Irix4's cc. Reported by Kaveh Ghazi. + +1999-05-09 Jim Meyering <meyering@ascend.com> + + * lib/regex.c: Update from libc. + + * Version 1.22k. + + * Makefile.maint (alpha): Put the announcement in + /tmp/announce-$(distdir) + + * tests/sort/Test.pm (neg-nls): New test. + +1999-05-08 Jim Meyering <meyering@ascend.com> + + * src/system.h (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, + and all the *_MIN and *_MAX symbols): Remove definitions. + * src/sys2.h: Put the definitions here instead (this file is shared + between all three *utils packages, while system.h is not). + +1999-05-06 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (fraccompare, numcompare): Merge the NLS and + non-NLS versions into a single function. + + (decimal_point): Now char, since we no longer convert to unsigned + char. + (th_sep): Now int, since we use a value out of char range to denote + the absence of a thousands separator. + (IS_THOUSANDS_SEP): New macro. + (USE_NEW_FRAC_COMPARE): Remove. + (nls_set_fraction): Arg is now char, not unsigned char. + Set th_sep to CHAR_MAX + 1 if there is no thousands separator. + (numcompare): Don't convert to unsigned char unless necessary. + (main): Turn off decimal points and thousand separators if they + are multibyte characters, as we don't support that yet. + +1999-05-06 Paul Eggert <eggert@twinsun.com> + + * src/system.h (CHAR_MIN, CHAR_MAX): New macros. + (SCHAR_MIN, SCHAR_MAX): Don't assume that char is signed. + +1999-05-06 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (numcompare): Handle comparison of two negative + numbers correctly in the ENABLE_NLS case. + +1999-05-04 Jim Meyering <meyering@ascend.com> + + * src/pr.c (usage): Break the usage message into 3 pieces instead of + only 2. The strings had grown to be longer than 2048, which evokes + errors when compiling with Irix4's cc. Reported by Kaveh Ghazi. + + * src/tsort.c (search_item): Use `1' instead of `+1'. The latter + elicits a syntax error from SunOS4's cc. From Kaveh Ghazi. + +1999-05-03 Jim Meyering <meyering@ascend.com> + + * src/ptx.c <ctype.h>: Don't include. + [!STDC_HEADERS]: Remove definitions of ctype macros. + Convert e.g., isspace to ISSPACE to use definitions from sys2.h. + Reported by Kaveh Ghazi. + + * src/sys2.h (TOLOWER): Define. + (TOUPPER): Define. + * src/join.c (TOLOWER): Remove definition. + * src/md5sum.c (TOLOWER): Remove definition. + +1999-04-30 Jim Meyering <meyering@ascend.com> + + * src/sort.c (usage): Document the differences between the + obsolescent, +POS1[-POS2] form, and the POSIX -k option. + +1999-04-24 Jim Meyering <meyering@ascend.com> + + * configure.in: Use AC_CANONICAL_HOST. + + * lib/Makefile.am (libtu_a_SOURCES): Add xstrtoumax.c + (noinst_HEADERS): Remove xstrtoul.h. + + * src/csplit.c: Include new "xstrtol.h", not "xstrtoul.h". + (struct control) [repeat]: Declare as uintmax_t, not int. + (struct control) [lines_required]: Likewise. + (handle_line_error): Use human_readable to print lines_required. + (parse_repeat_count): Parse a uintmax_t. + (parse_patterns): Parse a uintmax_t. + + * src/tail.c: Include new "xstrtol.h", not "xstrtoul.h". + * src/od.c: Likewise. + + * src/head.c: Include new "xstrtol.h", not "xstrtoul.h". + Change all U_LONG_LONG to uintmax_t. + (head_lines): Move a couple dcls into an inner scope. + (string_to_integer): Rename from string_to_ull. + +1999-04-19 Jim Meyering <meyering@ascend.com> + + * Makefile.maint (b_host): Remove /pub suffix. + +1999-04-18 Jim Meyering <meyering@ascend.com> + + * Version 1.22j. + + * Makefile.maint (my-distcheck): Use AMTAR, not TAR. + + * src/sort.c (usage): s/DIRECT/DIRECTORY/g + Rename global: s/temp_file_prefix/temp_dir/. + (NAME_MAX_IN_DIR): Rename from PATH_MAX_IN_DIR. Use _POSIX_NAME_MAX, + not _POSIX_PATH_MAX. Guard with #if HAVE_PATHCONF rather than + #if HAVE_UNISTD_H. + (tempname): Wrap after 99999 only for length-impaired file systems. + +1999-04-17 Jim Meyering <meyering@ascend.com> + + * src/tail.c (file_lines): Fix serious bug introduced with last changes. + From Andreas Schwab. + +1999-04-15 Jim Meyering <meyering@ascend.com> + + * tests/Makefile.am (EXTRA_DIST): Rename .posix-warn to .env-warn. + (check-local): Warn about CDPATH in the same way + we warn about POSIXLY_CORRECT, since the cp/same-file test fails at + least when using bash with CDPATH set. Reported by Mark Hewitt. + + * src/pr.c Add comments. + (init_header): Tweak white space in Date/Time header. + * tests/pr/Test.pm: Updated all tests to reflect the big + 1999-02-13 change. From Roland Huebner. + +1999-04-12 Jim Meyering <meyering@ascend.com> + + * src/cat.c (main): Declare out_dev to be of type dev_t, not `int'. + Declare out_ino to be of type ino_t, not `int'. + From John Bley. + + * src/od.c (MIN, MAX): Remove definitions. + * src/sys2.h (MIN, MAX): Define here instead. + Reported by John Bley. + +1999-04-11 Jim Meyering <meyering@ascend.com> + + * Version 1.22i. + + * tests/pr/Test.pm (test_vector): Disable all tests while I wait for + an updated suite. + + Fix the problem whereby `yes > k & sleep 1; tail -2c k' would infloop. + * src/tail.c (COPY_TO_EOF): Define. + (dump_remainder): Add parameter, n_bytes, and rewrite to use it. + Update callers. + (file_lines): Rename parameter. + (tail_bytes): Remove obsolete comment. + + Fix the problem whereby `yes > k & sleep 1; tail -1 k' would infloop. + * src/tail.c (dump_remainder): Move this function to precede the + new use in file_lines. + (tail_lines): Don't call dump_remainder here. + (file_lines): Call dump_remainder here instead. + Reported by Lehti Rami. + + * lib/readtokens.c (readtoken, readtokens): Protoize. + +1999-04-10 Jim Meyering <meyering@ascend.com> + + * src/tail.c (xwrite): Use STDOUT_FILENO instead of literal `1'. + +1999-04-04 Jim Meyering <meyering@ascend.com> + + * src/cat.c: Standardize --help and --version processing. + * src/comm.c: Likewise. + * src/csplit.c: Likewise. + * src/cut.c: Likewise. + * src/expand.c: Likewise. + * src/fmt.c: Likewise. + * src/fold.c: Likewise. + * src/head.c: Likewise. + * src/join.c: Likewise. + * src/md5sum.c: Likewise. + * src/nl.c: Likewise. + * src/od.c: Likewise. + * src/paste.c: Likewise. + * src/pr.c: Likewise. + * src/ptx.c: Likewise. + * src/split.c: Likewise. + * src/sum.c: Likewise. + * src/tac.c: Likewise. + * src/tail.c: Likewise. + * src/tr.c: Likewise. + * src/unexpand.c: Likewise. + * src/uniq.c: Likewise. + * src/wc.c: Likewise. + +1999-03-29 Jim Meyering <meyering@ascend.com> + + * configure.in (GNU_PACKAGE): Remove related code -- now it's in + the catch-all for shared autoconf code, m4/jm-macros.m4. + (jm_CHECK_ALL_TYPES): Remove explicit AC_TYPE_* macros and use + this instead. + +1999-03-26 Jim Meyering <meyering@ascend.com> + + * lib/Makefile.am (libfu_a_SOURCES): Add version-etc.c. + (noinst_HEADERS): Add version-etc.h. + +1999-03-25 Jim Meyering <meyering@ascend.com> + + * src/tail.c (recheck): Factor out a block of duplicated code. + Set f->size to 0 upon encountering a new file so we read it from + the beginning rather than from the end of the first line or + block. Otherwise, after a log rotation, tail would omit the first + line or block of the new file. Reported by Ed Avis. + +1999-03-20 Jim Meyering <meyering@ascend.com> + + * tests/Makefile.am (SUBDIRS): Temporarily remove pr. + +1999-03-13 Jim Meyering <meyering@ascend.com> + + * src/tac.c (tac_mem): `#if-0'-out this unused function. + (tac_stdin_to_mem): Likewise. + + * doc/textutils.texi (cut invocation): Describe --output-delimiter. + +1999-03-12 Jim Meyering <meyering@ascend.com> + + * src/sys2.h (SETVBUF): Define new macro. + * src/tail.c (dump_remainder): Don't fflush stdout here. + (main) [if forever]: Make stdout unbuffered, instead. + Akim Demaille pointed out that when running `echo x>a; tail -f a>>a' , + the file `a' didn't grow longer than two lines. Now it grows + without bound. + +1999-03-07 Jim Meyering <meyering@ascend.com> + + * tests/md5sum/newline-1: Test for the actual feature. + With help from Eli Zaretskii. + + * src/pr.c (usage): Add missing \n\. + + The newline test would always fail on MSDOS/Windows systems -- + so move it to a separate file where we can test for that. + * tests/md5sum/basic-1: Remove newline test. + * tests/md5sum/newline-1: New file. + * tests/md5sum/Makefile.am (TESTS): Add newline-1. + Pointed out by Eli Zaretskii. + + 1999-02-13 Roland Huebner <rh@pelikan.cologne.de> + * src/pr.c + (main): Redefine options -s, -w to be POSIX compliant; introduce + new options -J, -S, -W to disentangle -s and -w when used together + with the three column options; + (add_line_number): Make POSIX compliant; use default number + separator TAB with single column output. + (add_line_number): Make POSIX compliant; with multicolumn output + now prefer `text columns of equal width' rather than a consequent + use of `default n-separator TAB'. + (add_line_number): Change line number cut-off from lower-oder to + higher-oder digit to avoid loss of information; no consequent + handling exists in different utilities and other UNIXes. + (char_to_clump): Expand input text tabs to 8 spaces, if + input_tab_char doesn't equal TAB (adapted to other UNIXes). + (usage): Update POSIX compliant options -s, -w; add new options -J, + -S, -W. + (main): Update the source internal documentation. + Some smaller BUGFIXES (print_sep_string, init_header, skip_to_page, + reset_status, print_header). + + * tests/md5sum/basic-1 (backslash): Use .\foo instead of \.foo so we + don't tramp on root directory in MSDOS/Windows. + Suggestion from Eli Zaretskii. + + 1999-02-15 Eli Zaretskii <eliz@is.elta.co.il> + + * tests/md5sum/Makefile.am (TESTS_ENVIRONMENT): Run md5sum with the + --text option (for MSDOS). + +1999-03-06 Jim Meyering <meyering@ascend.com> + + * src/cut.c (getstr): Change type of `delim' parameter from char to int. + (cut_fields): Cast to `unsigned char' before comparing. + (main): Cast to `unsigned char' before assigning. + From Arne Juul. + * tests/cut/Test.pm: Add a test to exercise the bug. + + * src/ptx.c (swallow_file_in_memory): Use a `%s' format in error call, + in case the argument string contains a `%'. + (main): Likewise. + * src/fmt.c (main): Likewise. + * src/sort.c (main): Likewise. + + 1999-02-13 Eli Zaretskii <eliz@is.elta.co.il> + + * src/sys2.h [__DJGPP__]: Include <io.h> and <sys/exceptn.h>. + + * src/ptx.c (swallow_file_in_memory): Slurp up the whole file at + once on MSDOS as well, but we have to relax the test for whether + reading it succeeded. + +1999-03-03 Jim Meyering <meyering@ascend.com> + + * src/cat.c: Include long-options.h + [long_options]: Remove the "help" and "version" entries. + Remove declarations of show_help and show_version. + (main): Use parse_long_options, including author name(s). + Remove the show_version and show_help blocks. + * src/cksum.c: Likewise. + * src/comm.c: Likewise. + * src/csplit.c: Likewise. + * src/cut.c: Likewise. + * src/expand.c: Likewise. + * src/fmt.c: Likewise. + * src/fold.c: Likewise. + * src/head.c: Likewise. + * src/nl.c: Likewise. + * src/od.c: Likewise. + * src/paste.c: Likewise. + * src/pr.c: Likewise. + * src/split.c: Likewise. + * src/sum.c: Likewise. + * src/tac.c: Likewise. + * src/tail.c: Likewise. + * src/tr.c: Likewise. + * src/unexpand.c: Likewise. + * src/uniq.c: Likewise. + * src/wc.c: Likewise. + + * src/ptx.c: Include long-options.h + [long_options]: Remove the "help" and "version" entries. + Remove declarations of show_help and show_version. + (main): Remove `const' attribute from dcl of argv parameter. + Call bindtextdomain and textdomain. + Use parse_long_options, including author name(s). + Remove the show_version and show_help blocks. + + * src/join.c (main): Include author name argument in call to + parse_long_options. + * src/md5sum.c (main): Likewise. + * src/sort.c (main): Likewise. + * src/tsort.c (main): Likewise. + +1999-02-07 Jim Meyering <meyering@ascend.com> + + * Version 1.22h. + + * Makefile.maint (my-distcheck): Don't depend on dist, now that this + is hooked up to the distcheck rule. + * Makefile.am (distcheck-hook): New target and rule -- link to shared + rule, my-distcheck, in Makefile.maint. + +1999-01-31 Jim Meyering <meyering@ascend.com> + + * doc/textutils.texi: Wrap the @top node in @ifnottex instead of + @ifinfo so `makeinfo --html ...' works. From Karl Berry. + +1999-01-30 Jim Meyering <meyering@ascend.com> + + * acconfig.h: Remove lots of `#undef's, now that we use the + 3-argument forms of AC_DEFINE* macros. + + * configure.in: Require autoconf 2.13. + Use 3-argument form of AC_DEFINE*. + +1999-01-24 Jim Meyering <meyering@ascend.com> + + * src/tac.c (DONT_UNLINK_WHILE_OPEN) [__MSDOS__ || _WIN32]: Define. + + * lib/quotearg.c (quotearg_n_options): Revert type of parameter `n' + (and hence that of the local `n1', too) to `int' at Paul's request. + +1999-01-18 Akim Demaille <demaille@inf.enst.fr> + + * doc/textutils.texi: Harmonization of @samp use for options. + +1999-01-17 Jim Meyering <meyering@ascend.com> + + * Makefile.am (SUBDIRS): Add djgpp. + * configure.in (AC_OUTPUT): Add djgpp/Makefile. + * djgpp/: New directory. + + * man/Makefile.maint ($(man_MANS)): Don't remove the target (the + man page) until after we've created its replacement. + +1999-01-16 Eli Zaretskii <eliz@is.elta.co.il> + + * GNUmakefile: Add SHELL = /bin/sh. + * man/GNUmakefile: Likewise. + +1999-01-16 Jim Meyering <meyering@ascend.com> + + * acconfig.h: Remove @BOTTOM@ section. + Instead, add the define and decl via m4/jm-macros.m4. + + * lib/argmatch.h (XARGMATCH): Define to return a value once again. + (XARGCASEMATCH): Likewise. + + * lib/argmatch.c (EXIT_FAILURE): Define. + (ARGMATCH_DIE): Provide default. + (__xargmatch_internal): New function. + s/rogram_name/program_name. + From Akim Demaille. + +1999-01-14 Jim Meyering <meyering@ascend.com> + + * tests/md5sum/basic-1: Use `f', not `x' as temp. file name to avoid + warnings from perl5.004. + Reported by Volker Borchert. + + * lib/long-options.c (parse_long_options): Rename `usage' parameter + to avoid shadowing globally scoped function. + +1999-01-14 Akim Demaille <demaille@inf.enst.fr> + + * acconfig.h: Add a @BOTTOM@ section. + (ARGMATCH_DIE) [@BOTTOM@]: Define to usage(1). + Declare usage. + * src/*.c: Don't prototype usage as static. + +1999-01-10 Jim Meyering <meyering@ascend.com> + + * Version 1.22g. + + All of the following new code is protected by + `#if DONT_UNLINK_WHILE_OPEN' + * src/tac.c (file_to_remove): New global. + (fp_to_close): New global. + (unlink_tempfile): New function. + (record_tempfile): New function. + (save_stdin): Call record_tempfile. + Use SET_BINARY. + (main): Use SET_BINARY and SET_BINARY2. + From Eli Zaretskii. + +1999-01-09 Jim Meyering <meyering@ascend.com> + + * tests/uniq/Test.pm: Add tests from Jochen Hein. + * src/uniq.c: New option: --all-repeated (-D). + (output_all_repeated) [output_mode]: New enum value. + (usage): Describe it. + (writeline): Test for new mode. + (check_file): Likewise. + Based on patches from Jochen Hein and Florin Iucha. + (main): Diagnose `too many arguments'. + + * tests/head/Test.pm (null-1): Add test from Jochen Hein. + + * src/tail.c (parse_obsolescent_option): Interpret `number' as decimal. + (parse_options): Likewise. + Reported by Kamal Paul Nigam. + + * src/tail.c: New option: --max-unchanged-stats=N. + New option: --max-n-consecutive-size-changes=N. + +1999-01-03 Jim Meyering <meyering@ascend.com> + + * src/md5sum.c (usage): Remove third program_name argument -- there + were only two `%s' in the format string. + +1999-01-02 Jim Meyering <meyering@ascend.com> + + * src/tsort.c (tsort): Use a single call to error instead of two + to fprintf. + (main): Remove `%s: ' prefix on format string. + + * src/tail.c (parse_options): Use XARGMATCH in place of argmatch. + + * src/ptx.c (format_vals): New array. + (main): Use XARGMATCH in place of argmatch. + + * lib/argmatch.h (XARGMATCH): Don't return a value; instead, + modify a parameter. Add a `Die_stmt' parameter. + Add parentheses. + * lib/argmatch.c (__xargmatch_internal): Remove now-unused function. + (argmatch_to_argument): Add `const' attribute to first parameter. + +1999-01-01 Jim Meyering <meyering@ascend.com> + + * src/tsort.c: Move inclusion of assert.h to follow that of stdio.h. + Some losing systems require this. + Use STREQ macro instead of strcmp in a few places. + + * po/POTFILES.in: Add tsort.c. + + * man/Makefile.maint ($(man_MANS)): `exit 1' if any of help2man, + chmod, or mv fails. Otherwise, the failure could go unnoticed. + + * man/Makefile.summ: Add entries for ptx and tsort. + + * src/tsort.c: Include readtokens.h. + (zeros): Rename global from `rr'. + (getstr): Remove function. + (tsort) Use readtoken instead of getstr. + + * lib/readtokens.c: New file. + * lib/readtokens.h: New file. + * lib/Makefile.am (libtu_a_SOURCES): Add readtokens.c. + (noinst_HEADERS): Add readtokens.h. + + * man/Makefile.am (man_MANS): Add ptx.1. + * man/ptx.x: New file. + + * src/tail.c (parse_options): Use XARGMATCH in place of argmatch. + + * man/Makefile.am (man_MANS): Add tsort.1. + * man/tsort.x: New (essentially empty) file. + + * src/tsort.c: Rename globals N and R so they don't shadow locals. + (tsort): Rename from `sort'. + + 1998-11-07 Mark Kettenis <kettenis@phys.uva.nl> + * src/Makefile.am (bin_PROGRAMS): Add tsort. + * src/tsort.c: New program. + + * lib/Makefile.am (libtu_a_SOURCES): Add quotearg.c. + (noinst_HEADERS): Add quotearg.h. + + ============================ + All of the following are from: + 1998-04-17 Eli Zaretskii <eliz@is.elta.co.il> + + * src/system.h (SET_BINARY, SET_BINARY2, fileno, setmode): New + macros. + + * src/cat.c (usage) [O_BINARY]: Describe -B,--binary option. + (main) [O_BINARY]: binary_files, binary_output, file_open_mode: + new variables. Add --binary to long_options[]. Switch stdin and + stdout to binary mode unless file contents are not important + anyway. Open files in binary mode when required. + + * src/cksum.c (cksum) [O_BINARY]: Read redirected stdin in binary + mode. + + * src/expand.c (expand): Use binary I/O where appropriate. + + * src/head.c (head_bytes, head_lines) [O_BINARY]: Use binary I/O. + + * src/md5sum.c (OPENOPTS) [O_BINARY]: Use binary I/O when non-zero + argument. + (md5_file) [O_BINARY]: Switch redirected stdin to binary mode. + (main) [O_BINARY]: Use binary reads by default on those systems + which care about the difference. + + * src/od.c (skip, read_char, read_block) [O_BINARY]: Switch input + stream to binary mode. + + * src/sort.c (PATH_MAX_IN_DIR) [HAVE_UNISTD_H]: New macro, for max + file name characters in a given directory. + (tempname): Make sure the temp file name is unique even if long + file names aren't supported. + + * src/split.c (cwrite) [O_BINARY]: Write output in binary mode. + (main) [O_BINARY]: Read input in binary mode. + + * src/sum.c (bsd_sum_file, sysv_sum_file) [O_BINARY]: Read input + in binary mode. + + * src/tac.c (record_tempfile, unlink_tempfile) + [DONT_UNLINK_WHILE_OPEN]: New functions, for systems where a file + cannot be removed before it is closed. + (save_stdin) [DONT_UNLINK_WHILE_OPEN]: Record the temporary file, + to be removed before exit. + (tac_file, save_stdin, main): Use binary I/O when appropriate. + + * src/tail.c (tail_lines, tail_bytes) [O_BINARY]: Use binary I/O + when appropriate. + + * src/tr.c (main) [O_BINARY]: Use binary I/O when appropriate. + + * src/unexpand.c (unexpand): Use binary I/O where appropriate. + + * src/wc.c (wc): Use binary mode for input. + + * doc/textutil.texi: Add comments about peculiarities of Textutils + operation on MS-DOS/MS-Windows. + +1998-12-22 Jim Meyering <meyering@ascend.com> + + * configure.in (ALL_LINGUAS): Add chinese (zh). + +1998-12-17 Jim Meyering <meyering@ascend.com> + + New options for tail: + --follow=name, --follow=descriptor, --allow-missing + * src/tail.c (Follow_mode): New enum. + (n_live_files): New function. + (tail_forever): Avoid starvation with --follow=name and a + continually-growing unlinked or renamed file. + +1998-12-13 Jim Meyering <meyering@ascend.com> + + * tests/uniq/Test.pm: New file. + * tests/uniq/Makefile.am: New file. + * tests/uniq: New directory. + * tests/Makefile.am (SUBDIRS): Add uniq. + * configure.in (AC_OUTPUT): Add tests/uniq/Makefile. + From Jochen Hein. + + * lib/Makefile.am (lstat.c): Add rule to generate this from xstat.in. + (stat.c): Likewise. + (EXTRA_DIST): Add xstat.in. + * lib/stat.c: Remove file. + * lib/lstat.c: Remove file. + * lib/xstat.in (xstat@): New file. + + * configure.in (ALL_LINGUAS): Add Russian (ru). + +1998-10-31 Jim Meyering <meyering@ascend.com> + + * acconfig.h (stat): New #undef. + +1998-10-22 Jim Meyering <meyering@ascend.com> + + * src/fold.c (usage): Add mention of --version and --help. + Reported by Matej Vela <mvela@public.srce.hr>. + +1998-10-04 Jim Meyering <meyering@ascend.com> + + * lib/fnmatch.h: New file. (unused) + * lib/fnmatch.c: New file. (unused) + * lib/Makefile.am (noinst_HEADERS): Add fnmatch.h. + +1998-10-03 Jim Meyering <meyering@ascend.com> + + * man/Makefile.am: Switch to using help2man. + (EXTRA_DIST): Add Makefile.summ. + + * man/help2man: Invoke program with --manhelp option only if + --name=STRING not specified. Otherwise, this would fail with `yes'. + * man/Makefile.summ: New file. + * man/Makefile.maint: Include it. + * man/help2man: New file. + * man/GNUmakefile: New file. + * man/Makefile.maint: New file. + * man/*.x: New files. + * man/*.1: Remove files. + + * src/md5sum.c (split_3): Rename local variable, to `escaped_filename'. + (main): Output the leading backslash not just when there's a newline + in the file name, but also when there's a backslash. + Reported by Jim Dennis. + + * tests/md5sum/basic-1: Add tests with filenames containing newline + and backslash characters. (for the bug fixed above) + + * tests/Makefile.am (EXTRA_DIST): Add Fetish.pm. + * tests/Fetish.pm: New file. + + * tests/md5sum/basic-1: New file: rewrite of old tests to use Fetish.pm. + * tests/md5sum/Test.pm: Remove file. + * tests/md5sum/Makefile.am: Rewrite. + +1998-09-19 Jim Meyering <meyering@ascend.com> + + * src/ptx.c (program_name): Declare *not* to be const. + +1998-08-29 Jim Meyering <meyering@ascend.com> + + * src/cut.c: Don't assume ASCII. + * src/pr.c: Likewise. + * src/tail.c: Likewise. + +1998-08-15 Jim Meyering <meyering@ascend.com> + + * src/pr.c (usage): Reformat. + + * src/ptx.c: Add braces to suppress warning about ambiguous `else'. + * lib/bumpalloc.h: Likewise. + +1998-08-13 François Pinard <pinard@iro.umontreal.ca> + + * src/ptx.c: New file. + * src/Makefile.am (bin_PROGRAMS): Add ptx. + * lib/bumpalloc.h, lib/diacrit.h, lib/diacrit.c: New files. + * lib/Makefile.am (libtu_a_SOURCES): Add diacrit.c. + (noinst_HEADERS): Add bumpalloc.h and diacrit.h. + +1998-08-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * src/pr.c (long_options): Add long names for all options. + (usage): Update help string. + (main): Handle the special options --pages and --columns. + +1998-08-02 Jim Meyering <meyering@ascend.com> + + * lib/linebuffer.c (readline): Return zero upon error as well as upon + end of file. From James Youngman. + Ansideclify. + +1998-08-01 Jim Meyering <meyering@ascend.com> + + * src/sort.c (my_setlocale): Guard definition within #ifdef ENABLE_NLS. + From Manfred Hollstein. + +1998-07-30 Jim Meyering <meyering@ascend.com> + + * tests/cut/Test.pm: Avoid broken pipe message for tests that fail + with usage errors. + + * src/sort.c (usage): Add angle brackets to make `Report bugs...' + message consistent with all the rest. + +1998-07-28 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * tests/cut/Test.pm: Avoid broken pipe for 'y' and 'z' tests. + + * src/sort.c (NEGATION_SIGN): Renamed from NEGATIVE_SIGN to avoid + clash with <langinfo.h>. All uses changed. + +1998-07-26 Jim Meyering <meyering@ascend.com> + + * intl/localealias.c (read_alias_file): Avoid mixing `char*' and + `unsigned char*' variables. Again for irix4. + Mostly from Kaveh Ghazi. + + * src/join.c: Convert some char* dcls to `unsigned char*' and remove + a cast -- to placate irix4's cc. + * src/fmt.c (check_punctuation): Add cast to placate irix4's cc. + Reported by Kaveh Ghazi. + + * src/md5sum.c (split_3): Add cast to placate irix4's cc. + From Kaveh Ghazi. + +1998-07-25 Jim Meyering <meyering@ascend.com> + + * Version 1.22f. + + * tests/cut/Test.pm: Add tests for new --output-delimiter option, + as well as for NUL input delimiter (--delimiter=''). + * src/cut.c (cut_fields): Honor new --output-delimiter option. + (main): Fix handling of --delimiter='' (-d ''). Until now, it has + never worked as advertised. I guess no one tried it. + + * tests/sort/Test.pm: Add two tests relating to this. + * src/sort.c (main): Stat all non-`-' input file files (and fail if a + stat fails) when an output file is specified by `-o' but doesn't exist. + Reported by Will Edgington. + + * tests/sort/Test.pm: New tests of -o. + +1998-07-16 Jim Meyering <meyering@ascend.com> + + * lib/Makefile.am (noinst_HEADERS): Add lchown.h. + * lib/lchown.h: New file, just to define ENOSYS on systems that lack it. + * lib/lchown.c: Include lchown.h. + +1998-07-04 Jim Meyering <meyering@ascend.com> + + * configure.in (AM_WITH_REGEX): Remove. Now the replacement + macro, jm_WITH_REGEX, is bundled with the rest in jm_MACROS. + * acconfig.h (WITH_REGEX): Remove undef. + * src/csplit.c: Remove #ifdef around <regex.h> inclusion. + * src/nl.c: Likewise. + * src/tac.c: Likewise. + * src/csplit.c (extract_regexp): Remove #if !WITH_REGEX...#endif block. + * lib/Makefile.am (noinst_HEADERS): Remove rx.h. + * lib/rx.c: Remove file. + * lib/rx.h: Remove file. + +1998-06-29 Jim Meyering <meyering@ascend.com> + + * src/wc.c: Update calls to human_readable -- now there's one fewer arg. + + * lib/Makefile.am (libtu_a_SOURCES): Add argmatch.c. + (noinst_HEADERS): Add argmatch.h. + +1998-06-28 Jim Meyering <meyering@ascend.com> + + * src/sys2.h: Add macro definitions for GNU libc *_unlocked wrappers. + +1998-06-27 Jim Meyering <meyering@ascend.com> + + * tests/pr/Test.pm: Add two tests for double spacing. + * src/pr.c (print_page): If cols_ready_to_print is zero, + break out of loop just before the double-space test. + Reported by Michael Stutz. + +1998-06-18 Jim Meyering <meyering@ascend.com> + + * tests/Makefile.am.in (check): Depend on $(maint_gen) so + `make maintainer-clean; ./configure; make check' works. + +1998-05-25 Jim Meyering <meyering@ascend.com> + + * configure.in (_GNU_SOURCE): AC_DEFINE it here. + * acconfig.h (_GNU_SOURCE): Remove definition from @TOP@ section. + [!_GNU_SOURCE]: Add #undef instead. + +1998-05-16 Jim Meyering <meyering@ascend.com> + + * configure.in (jm_MACROS): New wrapper macro. + Remove uses of most jm_* macros. + + * src/tac.c (tac_seekable): Fix error in handling regex separators. + * tests/tac/Test.pm (opt-b, opt-s, opt_sb, opt_r): New tests. + (opt_br): New test -- exercises above-fixed bug. + + * lib/Makefile.am (EXTRA_DIST): Remove. Automake groks the `LIBOBJS=' + lines from the m4/*.m4 macros, so the hack of including some + custom-replaced C source file names here is no longer needed. + + * acconfig.h (chown): Add undef. + (D_INO_IN_DIRENT): Likewise. + (D_TYPE_IN_DIRENT): Likewise. + (ssize_t): Likewise. + +1998-05-09 Jim Meyering <meyering@ascend.com> + + * src/tac.c (tac_seekable): Rename from tac_stream. + Change `FILE *in' parameter to `int input_fd'. Adjust callers. + +1998-05-03 Jim Meyering <meyering@ascend.com> + + * po/: Update from gettext-0.10.35. + * intl/: Likewise. + * configure.in: Remove use of AC_LINK_FILES. + (AC_OUTPUT): Remove po/Makefile-generating sed command. + +1998-04-26 Jim Meyering <meyering@ascend.com> + + * tests/tail/Test.pm: Disable test f-1, now that it fails. + + * src/sort.c (keycompare) (CMP_WITH_IGNORE): Don't return 0 from inside + the keyspec-iterating loop. With this change, test 22a passes. + Reported by Zvi Har'El. + (strncoll): Remove bogus assertion. + * tests/sort/Test.pm: Add tests for the above fix. + + * configure.in: Use jm_ASSERT. + * acconfig.h: Add NDEBUG. + + * src/cut.c: Don't define NDEBUG. + * src/csplit.c: Likewise. + * src/join.c: Likewise. + * src/sort.c: Likewise. + * src/tr.c: Likewise. + + * src/cut.c: Don't define _GNU_SOURCE (now it's in config.h). + * src/expand.c: Likewise. + * src/fold.c: Likewise. + * src/join.c: Likewise. + * src/sort.c: Likewise. + * src/tr.c: Likewise. + * src/unexpand.c: Likewise. + * src/uniq.c: Likewise. + + * src/tail.c (close_fd): New function -- converted from macro. + [struct File_spec] (n_stat_calls): New member. + [struct File_spec] (n_unchanged_stats): New member. + (max_n_unchanged_stats): New global. + Initialize new members. + (xwrite): New function -- converted from macro. + [struct File_spec] (pretty_name): Remove member. + (pretty_name): New function. + + * src/md5sum.c (md5_check): Declare local, `md5num' as _unsigned_ char*. + (hex_digits): Declare parameter `s' as _unsigned_ char*. + (split_3): Declare parameter `u' as _unsigned_ char**. + +1998-04-17 Jim Meyering <meyering@ascend.com> + + * src/fmt.c (check_punctuation): Used unsigned char* pointers to avoid + new warning. + * src/join.c (xfields): Likewise. + +1998-04-12 Jim Meyering <meyering@ascend.com> + + * src/cat.c: Use STREQ macro rather than strcmp. + * src/cksum.c: Likewise. + * src/comm.c: Likewise. + * src/csplit.c: Likewise. + * src/cut.c: Likewise. + * src/fmt.c: Likewise. + * src/fold.c: Likewise. + * src/head.c: Likewise. + * src/join.c: Likewise. + * src/md5sum.c: Likewise. + * src/nl.c: Likewise. + * src/paste.c: Likewise. + * src/pr.c: Likewise. + * src/split.c: Likewise. + * src/sum.c: Likewise. + * src/tac.c: Likewise. + * src/uniq.c: Likewise. + * src/wc.c: Likewise. + +1998-04-11 Jim Meyering <meyering@ascend.com> + + * lib/safe-read.h: New file. + * lib/safe-read.c: Include it. + * src/cat.c: Include it instead of merely declaring safe_read. + * src/csplit.c: Likewise. + * src/head.c: Likewise. + * src/split.c: Likewise. + * src/sum.c: Likewise. + * src/tac.c: Likewise. + * src/tail.c: Likewise. + * src/tr.c: Likewise. + * src/wc.c: Likewise. + + * lib/Makefile.am (noinst_HEADERS): Add safe-read.h. + + * src/wc.c [HAVE_INTTYPES_H]: Include inttypes.h. + Declare counters to be of type uintmax_t. + (write_counts): Use human_readable to format potentially-long-long + numbers. Suggestion from Rogier Wolff. + (wc): Declare per-file counters to be of type uintmax_t. + Declare bytes_read to be ssize_t. + * lib/Makefile.am (libtu_a_SOURCES): Add human.c. + (noinst_HEADERS): Add human.h. + + * lib/human.c: New file. + * lib/human.h: New file. + +1998-04-04 Jim Meyering <meyering@eng.ascend.com> + + * configure.in (jm_AC_HEADER_INTTYPES_H): Use it. + (jm_AC_TYPE_UINTMAX_T): Use it. + (jm_PREREQ): Use it. + + * Makefile.am (ACLOCAL_AMFLAGS): Define this, so automake/aclocal + know about the m4/ subdirectory. + * Makefile.maint (aclocal-files): Remove now-unnecessary (with + automake-1.2h and the above change) aclocal-related rules and includes. + +1998-04-03 Jim Meyering <meyering@eng.ascend.com> + + * lib/closeout.c: New file. + * lib/closeout.h: New file. + * lib/Makefile.am (libtu_a_SOURCES): Add closeout.c. + (noinst_HEADERS): Add closeout.h. + +1998-03-31 Jim Meyering <meyering@eng.ascend.com> + + * lib/xstrtol.c: Merge with the version from fileutils. + +1998-03-27 Jim Meyering <meyering@eng.ascend.com> + + * Makefile.am (AUTOMAKE_OPTIONS): Require 1.2h. + +1998-03-23 Jim Meyering <meyering@eng.ascend.com> + + * acconfig.h: Remove HAVE_INTTYPES_H, now that m4/inttypes_h.m4 + automatically handles it. + +1998-03-19 Jim Meyering <meyering@eng.ascend.com> + + * src/system.h (SCHAR_MIN): Define. + (SHRT_MIN): Define. + od.c needs these when compiling with NCR's R2.0c C compiler. + (TYPE_MAXIMUM): Cast result to `(t)' so this macro works with + `unsigned char'. + From Greg Wooledge. + +1998-03-15 Jim Meyering <meyering@eng.ascend.com> + + * src/tail.c (tail_file): Merge largely-duplicated blocks of code. + +1998-03-03 Paul Eggert <eggert@twinsun.com> + + * src/sort.c (xtmpfopen): Open temporary file exclusively, to + foil a common denial-of-service attack. + * src/tac.c (save_stdin): Likewise. + +1998-02-16 Jim Meyering <meyering@eng.ascend.com> + + * configure.in (jm_FUNC_LSTAT): Use it. + (jm_FUNC_STAT): Use it. + * lib/Makefile.am (EXTRA_DIST): Add lstat.c and stat.c. + +1998-02-06 Jim Meyering <meyering@eng.ascend.com> + + * configure.in: Don't use AM_MAINTAINER_MODE or + AC_PATH_PROG(PERL, perl). + (jm_PERL): Use this. + +1998-02-04 Jim Meyering <meyering@eng.ascend.com> + + * tests/Makefile.am.in (EXTRA_DIST): Remove mk-script.pl. + (mk_script): Set to ../mk-script. + (x-tests): Use `$(PERL) -w -- $(mk_script)', not ./mk-script. + Remove @MAINT@ cruft. + (Makefile.am): Likewise. + Remove @MAINT@ cruft. Now `missing' will explain the failure + when people don't have Perl yet modify a file whose rebuilding + would lead to the use of Perl. + + * tests/Makefile.am (EXTRA_DIST): Add mk-script. + * tests/*/mk-script.pl: Remove files. + + * GNUmakefile: New file. + * Makefile.am (EXTRA_DIST): Add GNUmakefile. + Don't include Makefile.maint from here. It's included from GNUmakefile. + +1998-01-30 Paul Eggert <eggert@twinsun.com> + + * configure.in (AC_LFS): Put before anything that can affect or use + CPPFLAGS, LDFLAGS, or LIBS. + +1998-01-25 Jim Meyering <meyering@na-net.ornl.gov> + + * Makefile.maint: New file. + * Makefile.am: Move rules common to textutils, fileutils, sh-utils + into Makefile.maint. + Include Makefile.maint. + (EXTRA_DIST): Add Makefile.maint. + + * src/cat.c (cat): Convert comma-expressions to pairs of + semicolon-terminated stmts. + Add braces around compound if/else stmts. + +1998-01-24 Jim Meyering <meyering@na-net.ornl.gov> + + * src/tail.c (parse_obsolescent_option): Do not interpret `-f -n 1 ...' + as obsolescent options. + Accept new option: --sleep-interval=SECONDS (-s). + (parse_options): Recognize it. + (usage): Describe it. + (tail_forever): Use it. + (dump_remainder): Use it. + * tests/tail/Test.pm (f-1): Add test for option-processing of `-f -n 1'. + + * tests/cut/: Rename directory to remove `-test' suffix. + * tests/join/: Likewise. + * tests/md5sum/: Likewise. + * tests/pr/: Likewise. + * tests/sort/: Likewise. + * tests/tr/: Likewise. + * configure.in (AC_OUTPUT): Reflect renamings in tests/. + * tests/Makefile.am (SUBDIRS): Reflect renamings in tests/. + + * src/system.h (TYPE_MINIMUM): Add extra outer cast to work around + bug in Cray C 5.0.3.0 when T == time_t. + +1998-01-18 Jim Meyering <meyering@na-net.ornl.gov> + + * src/sort.c (strncoll, strncoll_s2_readonly, look_for_fraction, + numcompare): Remove the `unsigned' from some `unsigned char*' + parameter types. Add casts via UCHAR where necessary to avoid + problems with unwanted sign extension. Based on a patch from + Kaveh Ghazi to appease Irix4's cc compiler. + +1998-01-17 Jim Meyering <meyering@na-net.ornl.gov> + + * src/split.c (next_file_name): Rewrite. This removes an artificial + limit (albeit already high, at INT_MAX :-) on the number of files + split could create. Reported by Ralf W. Stephan. + +1998-01-16 Jim Meyering <meyering@na-net.ornl.gov> + + * src/sort.c (mergefps): Add braces to avoid ambiguous `else' stmt. + (nls_set_fraction): Likewise. + + * src/sort.c: Guard inclusion of langinfo.h also with HAVE_LANGINFO_H, + for Irix-4.0.5. From Kaveh Ghazi. + * configure.in: Check for langinfo.h. + + * lib/getline.c: Make PARAMS-defining conditionals consistent. + * lib/linebuffer.h: Likewise. + * lib/long-options.h: Likewise. + * lib/memcasecmp.h: Likewise. + * lib/xstrtod.h: Likewise. + * lib/xstrtol.h: Likewise. + Suggestion from Kaveh Ghazi. + + * tests/head/Test.pm (fail-0): Disable test. It depends on + sizeof(long) being 32 bits. Reported by Kaveh Ghazi. + +1998-01-10 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 1.22d. + + * src/system.h [HAVE_LIMITS_H]: Include limits.h + (TYPE_SIGNED): Define. + (TYPE_MINIMUM): Define. + (TYPE_MAXIMUM): Define. + (CHAR_BIT): Define. + (SCHAR_MAX): Define. + (UCHAR_MAX): Define. + (SHRT_MAX): Define. + (INT_MAX): Define. + (UINT_MAX): Define. + (LONG_MAX): Define. + (ULONG_MAX): Define. + * src/*.c: Remove definitions of those symbols. + + * src/csplit.c: Move inclusion of regex.h/rx.h to follow system.h + since it now includes limit.h which defines RE_DUP_MAX. + * src/nl.c: Likewise. + * src/tac.c: Likewise. + + * lib/xstrtol.c (bkm_scale): Renamed from BKM_SCALE. + Rewrite macro as function. Return a value. Update caller. + Cast __ZLONG_MAX `__unsigned long int' before casting to double to + avoid SunOS /bin/cc compiler bug. + +1998-01-08 Jim Meyering <meyering@na-net.ornl.gov> + + * src/tac-pipe.c: New file. But not yet used. + * src/Makefile.am (EXTRA_DIST): Add tac-pipe.c. + + * src/tac.c (tac_stream): Don't perform arithmetic on now-void* pointer + result of xrealloc (until recently it was char*). + + * configure.in (AC_CHECK_FUNCS): Add nl_langinfo. + * src/sort.c (inittables): Add && HAVE_NL_LANGINFO to the #if-test + guarding the nls month-checking code. + (nls_numeric_format): Remove unnecessary (and error-evoking w/SunOS' cc) + `unsigned' from dcls of text and lim. + (main): Cast lconvp->grouping to `unsigned char*' to appease SunOS's cc. + +1998-01-03 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/Makefile.am (AUTOMAKE_OPTIONS): Define to ../src/ansi2knr. + + * configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so + those files will be built via the ANSI2KNR-filtering rules if necessary. + +1997-12-25 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in: Remove AC_DEFINE of _GNU_SOURCE. + * acconfig.h (_GNU_SOURCE): Define if not already defined. + Put this code in @TOP@ section. + (_GNU_SOURCE): Remove #undef. + +1997-12-22 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in: AC_DEFINE _GNU_SOURCE. + * acconfig.h: Add _GNU_SOURCE. + +1997-12-21 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AC_CHECK_HEADERS): Add stdlib.h. + + * src/system.h: Merge in things from fileutils' version of this file. + * src/csplit.c: s/__P/PARAMS/. + * src/fmt.c: s/__P/PARAMS/. + * src/od.c: s/__P/PARAMS/. + * src/pr.c: s/__P/PARAMS/. + +1997-12-14 Jim Meyering <meyering@na-net.ornl.gov> + + * src/sys2.h: s/HAVE_DECLARATION_/HAVE_DECL_/g. + +1997-12-13 Jim Meyering <meyering@na-net.ornl.gov> + + * src/fmt.c (main): Add some braces. + Check return code from fclose of each input file. + Close stdout and check for errors. + + * src/csplit.c (close_output_file): Check ferror before calling fclose. + (main): Close stdout and check for errors. + +1997-11-15 Jim Meyering <meyering@na-net.ornl.gov> + + * acconfig.h: Add mktime. + * configure.in (jm_FUNC_MKTIME): Use it. + * lib/mktime.c: New file. + * lib/Makefile.am (EXTRA_DIST): Add mktime.c + + * intl/Makefile.in (distclean): Don't remove libintl.h here. + * Makefile.am (DISTCLEANFILES): Remove it here instead. + +1997-11-13 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/strftime.c: Update from FSF. + * m4/strftime.m4: Check for POSIX.2's %f format spec. + +1997-11-12 Jim Meyering <meyering@na-net.ornl.gov> + + * src/system.h [!HAVE_MEMPCPY] (mempcpy): Define. + * configure.in (AC_CHECK_FUNCS): Add mempcpy. + +1997-11-09 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (jm_FUNC_STRFTIME): Use it. + * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Check for localtime_r. + * m4/strftime.m4 (jm_STRFTIME_PREREQS): Check for localtime_r. + (jm_FUNC_GNU_STRFTIME): Use new macro. + (jm_FUNC_STRFTIME): New macro. Likewise. + Reported by Noel Cragg. + +1997-11-08 Jim Meyering <meyering@na-net.ornl.gov> + + * m4/lfs.m4 (AC_LFS): New file/macro. + * m4/Makefile.am (EXTRA_DIST): Add lfs.m4. + * configure.in (AC_LFS): Use it. + (AC_CHECK_FUNCS): Add fseeko. + * src/od.c (fseeko): Define a stub if ! HAVE_FSEEKO. + (skip): Use fseeko if available. Don't use lseek; it causes + the stdio stream to become out of sync with respect to the + underyling file descriptor. + From Paul Eggert. + +1997-10-16 Paul Eggert <eggert@twinsun.com> + + * configure.in (AC_CHECK_FUNCS): Add fseeko. + + * src/od.c (skip): Use fseeko. Don't use lseek; it causes + the stdio stream to become out of sync with respect to the + underyling file descriptor. + +1997-11-06 Jim Meyering <meyering@na-net.ornl.gov> + + * src/sort.c (getmonth): Remove HAVE_ALLOCA #ifdefs. + We always have alloca. + (keycompare): Don't use variable size arrays (it's a gcc-extension). + Rewrite code that increments new lengths when not `ignoring'. + +1997-11-02 Jim Meyering <meyering@na-net.ornl.gov> + + * acconfig.h: Add malloc and realloc. + + * src/wc.c (main): New option, --max-line-length (-L). + (wc, write_counts): Implement it. + From Bruno Haible. + +1997-10-26 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/memcasecmp.c: Convert to upper case before comparing. + This makes join -i work with sort -f. + Reported by Arthur Pool. + +1997-10-25 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/xmalloc.c (xalloc_fail): Renamed from fixup_null_alloc. + (xcalloc): #ifdef-out unused function. + (xrealloc): Remove code to work around deficient versions of realloc. + Now we have an autoconf-enabled replacement version. + (xmalloc): Remove code to work around deficient versions of malloc. + Now we have an autoconf-enabled replacement version. + + * lib/memcmp.c (rpl_memcmp): Rename from memcmp. + + * src/sort.c (NLS_STRNCMP) [!ENABLE_NLS]: s/strcmp/strncmp/. + + * lib/xmalloc.c (xalloc_fail_func): Initialize to 0, not NULL. + + * configure.in (jm_FUNC_MALLOC): Use it. + (jm_FUNC_REALLOC): Use it. + + * lib/Makefile.am (EXTRA_DIST): Add malloc.c. + * lib/malloc.c: New file. + * m4/malloc.m4: New file. + * m4/Makefile.am (EXTRA_DIST): Add malloc.m4. + + * lib/Makefile.am (noinst_HEADERS): Add xalloc.h. + (EXTRA_DIST): Add realloc.c. + (EXTRA_DIST): Add malloc.c. + + * src/system.h: Include xalloc.h. + Remove dcls of xmalloc, xcalloc and xrealloc. + + * lib/xalloc.h: New file. + + * lib/xmalloc.c: Include xalloc.h. + Change VOID to void. + (xalloc_exit_failure): Renamed extern. + (xalloc_msg_memory_exhausted): New extern. + (xalloc_fail_func): New extern. + (fixup_null_alloc): Use new variables. + +1997-10-24 Jim Meyering <meyering@na-net.ornl.gov> + + * src/unexpand.c: Remove old-style xmalloc and xrealloc decls. + (add_tabstop): Cast first arg of xrealloc to char*. + + * src/sort.c: Include xalloc.h. + (xmalloc): Remove function. + (xrealloc): Remove function. + (main): Set xalloc_fail_func to cleanup. + Set xalloc_exit_failure SORT_FAILURE. + + * src/paste.c: Remove old-style xmalloc and xrealloc decls. + (paste_parallel): Cast first arg of xrealloc to char*. + + * src/od.c: Remove old-style xmalloc and xrealloc decls. + (decode_format_string): Cast first arg of xrealloc to char*. + + * src/expand.c: Remove old-style xmalloc and xrealloc decls. + (add_tabstop): Cast first arg of xrealloc to char*. + + * lib/xalloc.h: New file. + + * src/cut.c (ADD_RANGE_PAIR): Cast first arg of xrealloc to char*. + (getstr): Cast xmalloc return value to char*. + + * src/csplit.c: Include xalloc.h. + (xmalloc): Remove function. + (xrealloc): Remove function. + (main): Set xalloc_fail_func to cleanup. + + * src/*.c: Remove old-style xmalloc and xrealloc decls. + * src/system.h: Add prototyped xcalloc, xmalloc and xrealloc decls. + Suggestion from Achim Blumensath. + +1997-10-23 Jim Meyering <meyering@na-net.ornl.gov> + + * Makefile.am (aclocal-files): Also depend on m4/Makefile.am. + + * src/system.h [!HAVE_DECLARATION_FREE]: Declare free. + [!HAVE_DECLARATION_MALLOC]: Declare malloc. + [!HAVE_DECLARATION_REALLOC]: Declare realloc. + [!HAVE_DECLARATION_STPCPY]: Declare stpcpy. + [!HAVE_DECLARATION_STRSTR]: Declare strstr. + * src/cat.c: Remove stpcpy dcl. + * src/csplit.c: Remove malloc and realloc dcls. + * src/sort.c: Remove free, malloc, and realloc dcls. + * src/tac.c: Remove malloc, and realloc dcls. + * src/tr.c: Remove stpcpy dcl. + On some systems, strstr and stpcpy are macros, so declaring them + unconditionally gets syntax errors. + Reported by Mark M. Kettenis. + + * configure.in: Use jm_CHECK_DECLS. + * m4/Makefile.am (EXTRA_DIST): Add decl.m4 and check-decl.m4. + +1997-10-22 Jim Meyering <meyering@na-net.ornl.gov> + + * m4/decl.m4: New file. + * m4/check-decl.m4: New file. New macro, jm_CHECK_DECLS. + +1997-10-16 Paul Eggert <eggert@twinsun.com> + + * src/od.c (LONG_MAX): Define if not defined. + +1997-10-16 Jim Meyering <meyering@na-net.ornl.gov> + + * src/sort.c (look_for_fraction): Patch from Ørn Hansen. + (getmonth): Compare the two month names only to the length of the + string in the month table. Patch from Ørn Hansen. + (NLS_STRNCMP): New macro. + (strncoll_s2_readonly): New function. + (inittables): Don't use temporary `comp' to hide type of + comparator function. + (nls_sort_month_comp): Declare parameters to be void* to match + comparator function type required for qsort. + (getmonth): Use NLS_STRNCMP rather than #ifdef. + Use do-while, rather than while-loop. + +1997-10-14 Jim Meyering <meyering@na-net.ornl.gov> + + * src/sort.c (_NL_ITEM) [!defined]: Define. + From from Ørn E. Hansen. + + * src/sort.c: Use STREQ in place of most uses of strcmp. + (NLS_STRCMP): Define. + (getmonth): Remove ifdef and use NLS_STRCMP instead. + Use HAVE_ALLOCA, not _HAVE_ALLOCA. + (zaptemp): Make parameter `const'. + + * tests/sort-test/Test.pm: Add tests to exercise new fraccompare. + + * src/sort.c (CHARS_IN_ABM): Remove definition + (inittables): Remove assumption that all abbreviated month names have + length 3. + (getmonth): Likewise. + (main): Add #if's for more efficient code when using the GNU C library. + From Ulrich Drepper. + + * src/sort.c (strncoll): Rename parameter to LEN. + (keycompare): Move assignment out of if-expression. + + * lib/xstrdup.c: New file. + * lib/Makefile.am (libtu_a_SOURCES): Add xstrdup.c + + * src/sort.c: Declare xstrdup. + (my_setlocale): New function. + (main): Guard against failure of strdup (use xstrdup) and setlocale. + + * src/system.h (STREQ): Define. + * src/od.c (STREQ): Remove definition. + + * src/sort.c (look_for_fraction): Eliminate arbitrary limit on + number of `groups'. Declare as void, not int. + Patch from Ørn E. Hansen. + (main): When determining whether we're in the C or POSIX locale, + don't rely on the form of the string returned by setlocale. + Suggestion from Ulrich Drepper. + +1997-10-12 Jim Meyering <meyering@na-net.ornl.gov> + + * src/sort.c: Apply big patch from Ørn E. Hansen. + Clean up, indent. + (NLS_MEMCMP): Define. + (keycompare): Use it instead of open-coded #ifdefs. + (compare): Likewise. + (NLS_MAP): Remove unused definitions. + Replace with uses of UCHAR. + (nls_locale_map): Remove dcl of unused file-scope array. + +1997-10-10 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/sort-test/Test.pm: Add a test. + From William Lewis. + +1997-10-07 Jim Meyering <meyering@na-net.ornl.gov> + + * src/*.c: Update bug-reporting address. + * src/cat.c: Indent cpp directives to reflect nesting. + * src/cksum.c: Likewise. + * src/csplit.c: Likewise. + * src/fmt.c: Likewise. + * src/nl.c: Likewise. + * src/paste.c: Likewise. + +1997-09-27 Jim Meyering <meyering@na-net.ornl.gov> + + * m4/memcmp.m4: Integrate test to detect bug in memcmp from the + Next x86 OpenStep C library. Test program from William Lewis. + +1997-09-21 Jim Meyering <meyering@na-net.ornl.gov> + + * src/od.c [struct tspec] (hexl_mode_trailer): Rename from `trailer.' + (dump_hexl_mode_trailer): Rename from dump_string_trailer. + Use fputs and putchar instead of trivial or %-less printfs. + (decode_one_format): Parenthesize each field_width assignment in an + argument list to make the side effect a little more apparent. + (write_block): Use fputs and putchar instead of trivial or %-less + printfs. + (dump_strings): Cast string_min to off_t to avoid long-standing warning. + + * src/od.c: Implement new `z' (hexl-mode) modifier. + [struct tspec] (trailer): New field. + (field_width): Likewise. + (dump_string_trailer): New function. + (decode_one_format): Save each field_width in the tspec. + Patch from John Kodis. + +1997-09-14 Jim Meyering <meyering@na-net.ornl.gov> + + * src/od.c (main) [--traditional]: Don't give diagnostic about there + being more than three arguments if there are *no* arguments specified. + Reported by Jochen Hein. + +1997-09-13 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/sort-test/Test.pm: Add tests 19a and 19b. + +1997-07-21 Jim Meyering <meyering@na-net.ornl.gov> + + * src/tail.c (parse_obsolescent_option): #ifdef-out portability warning. + +1997-07-19 Jim Meyering <meyering@na-net.ornl.gov> + + * src/sort.c (checkfp): Print the `disorder' message. Include both + the number and the contents of the first out-of-order line, in addition + to the file name. Change meaning of return value. + (check): Don't print disorder message here. + Adjust test of checkfp's return value. + Feature suggestion from Karl Heuer. + +1997-07-13 Jim Meyering <meyering@na-net.ornl.gov> + + * doc/Makefile.am (EXTRA_DIST): Remove explicit mention of texinfo.texi. + Now, automake includes it automatically. + + * src/head.c: Include xstrtoul.h. + Remove global variable, unit_size. + (atou): Remove now-unused function. + (parse_unit): Likewise. + (string_to_ull): New function. + (head): Take new parameter, count_lines. Use it instead of unit_size. + Update callers. + (head_file): Likewise. + (main): Use string_to_ull, not atou/parse_unit. + The problem was that overflow wasn't detected, so `head -c 4096m' + was treated just like `head -c 0'. + Reported by Jerome Abela. + + * tests/wc: New directory. + * tests/head: New directory. + * tests/Makefile.am (SUBDIRS): Add head and wc. + * configure.in (AC_OUTPUT): Add tests/head/Makefile and + tests/wc/Makefile. + +1997-07-05 Jim Meyering <meyering@na-net.ornl.gov> + + * src/tail.c (parse_obsolescent_option): If POSIXLY_CORRECT is set, give + a diagnostic and fail when there are two or more non-option arguments. + +1997-07-04 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/tac/mk-script.pl: Redirect output of cmp to /dev/null. + + * configure.in (ALL_LINGUAS): Add Norwegian (no). + + * Makefile.am (aclocal-files): Look in source directory, not build dir. + From Andreas Schwab. + +Sun Jun 15 06:36:41 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/pr.c (init_header) [T_BUF_FMT]: Output the 4-digit year (not the + 2-digit abbreviation) in each page header. Reported by Noah Friedman. + +Sat Jun 14 12:29:12 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/cut.c (cut_fields): Detect when the input is empty and handle + that special case. Before `cut -f1 < /dev/null' would improperly + output a single newline. Reported by Phil Richards. + +Sun Apr 27 15:10:58 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * man/Makefile.am (DISTFILES): Add $(man_MANS). + + * configure.in (ALL_LINGUAS): Add Czech (cs) and Swedish (sv). + +Thu Apr 3 21:14:02 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * m4/Makefile.am (EXTRA_DIST): Update file list. + + * tests/cut-test/Test.pm: Add test from Phil Richards. + +Sat Mar 22 20:29:10 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * missing: New file -- from the automake-1.1m distribution. + +Fri Mar 21 23:56:41 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * Makefile.am (AUTOMAKE_OPTIONS): Require automake-1.1l. + (aclocal.m4): Use aclocal's new -I option. + +Thu Mar 13 21:46:04 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/tr.c (main): Make sure c1 is not -1 before using it as an + array index. Patch from Greg McGary. Although this is truly a + bug, I believe it would not cause tr to misbehave on most systems. + I could not construct a test case with which this bug causes tr + to generate invalid output. + + * tests/pr-test/Test.pm: Add test that -o 0 works. + + * src/pr.c (main): Allow use of 0 (zero) as the margin offset + argument to the -o option. Patch from Gary Anderson. + +Fri Feb 28 22:32:51 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/uniq.c (usage): Fix typo in --help output. From Andreas Schwab. + +Tue Feb 25 20:34:51 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/Makefile.am (noinst_HEADERS): Add obstack.h. + (libtu_a_SOURCES): Add obstack.c. + +Sun Feb 16 08:30:29 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/Makefile.am (SUBDIRS): Add tac. + * tests/tac: New directory. + * configure.in (AC_OUTPUT): Add tests/tac/Makefile. + + * tests/pr-test/{tt-0FF, tt-bl, tta3-0FF, ttb3-0FF, tt-FF, tt-t, + tta3-FF, ttb3-FF}: New files. Renamed (s/T/tt/) to avoid name clashes + on case-independent filesystems. + * tests/pr-test/Test.pm (Tests '7.*'): Reflect file-renaming. + + * src/tail.c (parse_obsolescent_option): Reverse order of args in + diagnostic. Remove `' quotes in diagnostic. + (parse_options): Remove `' quotes in diagnostic. + +Sat Feb 8 22:43:45 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/tail.c (parse_obsolescent_option): Give warning diagnostic for + (but now accept) obsolescent usage with more than one file argument. + +Sun Feb 2 23:06:59 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/join.c: Move alloca-related preprocessor code into system.h. + * src/od.c: Remove alloca-related preprocessor code. + * src/system.h: Add alloca-related preprocessor code. + +Sat Feb 1 07:21:43 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/pr-test/*: Rename files to avoid exceeding 14-character limit. + * tests/pr-test/Test.pm: Reflect renamings. + + * tests/pr-test/mk-script.pl (spec_to_list): Warn about all filenames + that exceed max-length before dying. + + * src/pr.c (init_parameters): For compatibility: use default + separator `TAB' with full length lines. From Roland Huebner. + +Fri Jan 31 19:53:54 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/tac.c: Rename globals buffer and buffer_size to have G_ prefix + to avoid shadowing local variables. + + * lib/long-options.c (parse_long_options): Compare getopt_long return + value against -1, not EOF. Use NULL, not `(int *) 0' as last parameter + in getopt_long call. + + * src/pr.c (add_line_number): Rename from `number' to avoid shadowing + local variables. + + * src/*.c: Compare getopt_long return value against -1, not EOF. + Use NULL, not `(int *) 0' as last parameter in getopt_long call. + (usage): Bracket bug-reporting address with <> and append a period. + +Wed Jan 29 20:54:24 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/tr-test/Test.pm: Do each test twice: get input via REDIR + and PIPE. + + * tests/tail/Test.pm (test_vector): Do each (non-stdin-requiring) + test three times. + + * tests/pr-test/Test.pm: Remove common_option_prefix flag. + (test_vector): Prepend the common option here instead. + + * tests/md5sum-test/Test.pm: Remove input_via_stdin flag. + Do each test twice: get input via REDIR and PIPE. + + * tests/cut-test/Test.pm: Do each test three times. + + * tests/cut-test/mk-script.pl: Allow each test to be run any or all + of three different ways. Program input may be specified via a file + or files listed on the command line, via input redirection (if there's + only one file), or via a pipe. + +Tue Jan 28 20:54:06 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/cut-test/mk-script.pl: Remove `t' prefix on all generated + test file names. + Change suffixes from (.in, .exp, .out, .err) to (.I, .X, .O, .E). + Ensure that no test file (generated or maintainer-supplied) has a + name longer than 14 characters. + +Sun Jan 26 12:49:50 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 1.22. + + * src/tail.c (parse_options): Add quotes to make messages identical. + +Sat Jan 25 00:12:29 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/tail.c (parse_obsolescent_option): Comment. + (parse_options): Remove unnecessary goto and label. + + * tests/sort-test/mk-script.pl: Interpret `input arg is a hash + reference' as meaning that the tested program will read no input. + Most of the tests for the date program use this feature. + Also for date, the generated script now reflects specification + (in Test.pm) of default and per-test environment settings. + + * src/csplit.c: Reflect changes to xstrtol and xstrtoul interfaces. + * src/fold.c: Likewise. + * src/head.c: Likewise. + * src/join.c: Likewise. + * src/nl.c: Likewise. + * src/od.c: Likewise. + * src/pr.c: Likewise. + * src/uniq.c: Likewise. + + * lib/xstrtoul.h (XSTRTOL_H): Undefine it. + + * lib/xstrtol.h [!_STRTOL_ERROR]: Define the type `enum strtol_error' + only if it hasn't already been defined. + (_STRTOL_ERROR): Undefine. + + * lib/xstrtol.c (__xstrtol): Change interpretation of + VALID_SUFFIXES == NULL vs VALID_SUFFIXES == "". Use the former + when any suffix is valid, the later when no suffix is allowed. + +Fri Jan 24 23:36:00 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/long-options.c (parse_long_options): Reset optind to zero + before just returning so that getopt internals get initialized from + the probably-new parameters when/if getopt is called later. + From Ulrich Drepper. + +Thu Jan 23 19:17:03 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/tail.c (parse_obsolescent_option): Recognize and fail for + more malformed obsolescent options. Makes for better diagnostics. + +Wed Jan 22 21:34:50 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/Makefile.am (SUBDIRS): Add tail. + * tests/tail: New directory. + * configure.in (AC_OUTPUT): Add tests/tail/Makefile. + + * src/tail.c (parse_options): New function. + (parse_obsolescent_option): New function. + (main): Use the new functions instead of open-coding them. + This better fixes the bug in handling obsolescent `+Nc' options. + General cleanup. + +Tue Jan 21 22:49:00 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/tail.c (main): Properly handle what the POSIX spec calls + the `obsolescent' usage (e.g., tail +2c). It didn't work. + Reported by Karl Heuer. + +Sun Jan 12 22:13:27 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/tr-test/Test.pm: Rename tests so that the associated files + have names that are distinct even on filesystems on which file + names are case insensitive. + Reported by Fred Fish. + * tests/cut-test/Test.pm: Likewise. + + * tests/tr-test/Makefile.am: Regenerated to reflect renamed tests. + * tests/cut-test/Makefile.am: Likewise. + +Wed Jan 8 16:38:24 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 1.21. + + * lib/getopt.c (_getopt_internal): Use `_', rather than the + (sometimes-)expansion `gettext'. + +Tue Jan 7 22:50:13 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/getopt.c: New (more POSIX compliant) version from GNU libc. + [_]: Define to gettext also if ENABLE_NLS is defined. + This is temporary. + +Thu Jan 2 21:17:50 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * src/pr.c (init_fps): Initialize lines_stored field in three places. + This avoids uninitialized memory reads in close_file. + +Wed Jan 1 17:32:18 1997 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AC_ARG_PROGRAM): Remove explicit use. + It's implicit in AM_INIT_AUTOMAKE. From Wayne Stewart. + +Sun Dec 29 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/pr.c (init_header): Plug a small memory leak by using stack + rather than heap for a 15-byte temporary buffer. + +Sat Dec 28 00:03:23 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/pr.c (TAB_WIDTH): Parenthesize uses of parameters and renamed + from tab_width. + (POS_AFTER_TAB): Renamed from pos_after_tab. Define in terms of + TAB_WIDTH rather than duplicating the expression. + +Fri Dec 27 17:29:02 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/join-test/mk-script.pl: Fix a couple of thinkos and typos. + Now it works with pr's tests, too. + + * tests/pr-test/Makefile.am (explicit): Regenerate list of files, + this time with duplicates removed. + + * src/pr.c (usage): Break long string literal into two separate + printf statements to accomodate default maximum of 2048 characters + for Irix-4.0.5. Reported by Kaveh Ghazi. + + * Makefile.am (aclocal.m4): No longer depend on acinclude.m4. + + * tests/Makefile.am (SUBDIRS): Add pr-test. + + * configure.in: AC_REQUIRE version 2.12 of autoconf. + AC_OUTPUT: Add tests/pr-test/Makefile. + +Sun Dec 22 08:11:27 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * acinclude.m4: Move macros to individual files in new directory, m4/. + See ChangeLog entries in sh-utils for the details. + + * configure.in: Increment version to 1.20a. + + * tests/md5sum-test/Makefile.am: Use same framework as other tests. + * tests/md5sum-test/Test.pm: New file. + +Sat Dec 21 20:32:58 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/Makefile.am (EXTRA_DIST): Add README and Makefile.am.in. + + * tests/Makefile.am.in: New file. + + * tests/sort-test/Makefile.am: Clone the Makefile.am from join-test. + Replace only the definition of $x and the auto-generated lists of + test files. + * tests/cut-test/Makefile.am: Likewise. + * tests/tr-test/Makefile.am: Likewise. + + * tests/join-test/Makefile.am: Add @MAINT@-protected rule for + verifying that Makefile.am is consistent with Test.pm. + +Fri Dec 20 00:08:36 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/join-test/Makefile.am (MAINTAINERCLEANFILES): Use $(in1) + and $(in2), not $(in). + + * tests/join-test/mk-script.pl: New option: --list. + Generate lists of files used/generated. + +Thu Dec 19 23:28:41 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/join-test/mk-script.pl: Rewrite to be more general -- so + it can be used for join, cut, sort, tr, and soon, pr test suites. + * tests/tr-test/mk-script.pl: Symlink through CVS repo to join's + mk-script.pl. + * tests/sort-test/mk-script.pl: Likewise. + * tests/cut-test/mk-script.pl: Likewise. + + * tests/tr-test/Test.pm: Adapted for new mk-script.pl. + * tests/join-test/Test.pm: Likewise. + +Tue Dec 17 16:48:51 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/join-test/Makefile.am (.pl): Make generated file read-only so + I don't accidentally modify it instead of the one with the .pl suffix. + + * acinclude.m4 (jm_SYS_PROC_UPTIME): Require AC_PROG_CC, rather than + now-obsolete AC_C_CROSS. + (jm_FUNC_MKTIME): When redefining, use rpl_ prefix, not gnu_ one + since there's nothing GNU-specific about the replacement. Contrast + with gnu_ prefix added to strftime. + (jm_FUNC_MEMCMP): New macro. + * configure.in: Use jm_FUNC_MEMCMP instead of AM_FUNC_MEMCMP. + * acconfig.h: Add memcmp. + * README: Remove warning about memcmp. The new macro handles it. + +Mon Dec 16 23:03:27 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/Makefile.am (pkgdata_DATA): Remove unnecessary assignment. + From Eric Backus. + (AUTOMAKE_OPTIONS): Likewise. + +Sat Dec 14 14:51:50 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * acinclude.m4 (jm_SYS_PROC_UPTIME): Fix typo in cache variable + name for cross compiling. + Remove definitions of gettext-related macros. The gettext + installation procedure installs corresponding .m4 files so that + aclocal will use them. + +1996-12-12 Paul Eggert <eggert@twinsun.com> + + * system.h (ISDIGIT): Replace with smaller, faster edition + that yields nonzero only on ASCII digits. + (ISDIGIT_LOCALE): New macro, with same meaning that ISDIGIT + used to have. + + * tr.c (is_char_class_member): Use ISDIGIT_LOCALE instead of + ISDIGIT to test for characters in CC_DIGIT class. + + * sort.c (digits): Remove; subsumed by new ISDIGIT. + (inittables): Remove initialization of `digits'. + (fraccompare, numcompare, main): Use ISDIGIT (x) instead of digits[x]. + (fraccompare, numcompare): Avoid casts to unsigned char that are no + longer needed. + + * csplit.c (get_format_width, get_format_prec): Avoid + unnecessary comparison of digit to '\0'. + +Thu Dec 12 23:42:51 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/sort.c (usage): Clarify description of -u option. + From Karl Berry. + +Wed Dec 11 19:32:18 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 1.20. + +Tue Dec 10 00:15:50 1996 Jim Meyering <meyering@na-net.ornl.gov> + + The file name, `build-script.pl' is longer than 14 characters. + Rename it. + * tests/cut-test/mk-script.pl: Rename from build-script.pl. + * tests/cut-test/Makefile.am: Reflect renaming. + * tests/tr-test/mk-script.pl: Rename from build-script.pl. + * tests/tr-test/Makefile.am: Reflect renaming. + * tests/sort-test/mk-script.pl: Rename from build-script.pl. + * tests/sort-test/Makefile.am: Reflect renaming. + * tests/join-test/mk-script.pl: Rename from build-script.pl. + * tests/join-test/Makefile.am: Reflect renaming. + Reported by Karl Heuer. + + * configure.in (VERSION): Bump to 1.19r. + (AC_ISC_POSIX): Remove kludgy macro. + Use this test instead: + (LIBS): Add -lcposix if it contains strerror. + Patch from Karl Heuer. + +Sun Dec 8 07:22:38 1996 Jim Meyering <meyering@na-net.ornl.gov> + + =========== Update for automake-1.1k. + * Makefile.am (AUTOMAKE_OPTIONS): Require 1.1k. + * configure.in (AM_CONFIG_HEADER): Use it. + (AC_OUTPUT): Remove stamp-h timestamping statement. + Now, AM_CONFIG_HEADER does it automatically. + * lib/Makefile.am (noinst_LIBRARIES): Rename to libtu.a as per + new automake requirement. + Rename tu_* variables to libtu_a_*. + +Wed Dec 4 21:03:18 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/pr.c: Apply big patch from Roland Huebner. + + * src/tr.c (main) [!POSIXLY_CORRECT]: Allow the identity mappings: + [:upper:] to [:upper:] and [:lower:] to [:lower:]. + (main) [POSIXLY_CORRECT]: Give a more specific diagnostic for + the invalid identity mappings [:upper:] to [:upper:] and [:lower:] + to [:lower:]. + (class_ok): Update table to reflect that tr now allows these + identity mappings. Suggestion from Risto Kankkunen. + +Thu Nov 28 00:31:18 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AM_GNU_GETTEXT): Renamed from ud_GNU_GETTEXT + for gettext-0.10.25. + +Tue Nov 26 23:05:14 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/sort.c (fraccompare): Add explicit `int' in `register' dcls, + to avoid new warning from gcc. + +Sun Nov 24 21:02:15 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/sort-test/Makefile.am (t): Add names of those 5 tests. + + * tests/sort-test/Test.pm: Add 5 tests to exercize just-fixed code. + + * src/sort.c (set_ordering): Revert 1994-05-04 change to this function + so that blanks are not unconditionally ignored when computing start + and end positions for numeric keys with explicit character offsets. + Reported by Markus Demleitner. + +Sat Nov 23 16:07:08 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * cat.c (usage): Alphabetize option descriptions the way sort -f would. + * fmt.c (usage): Likewise. + * join.c (usage): Likewise. + * md5sum.c (usage): Likewise. + * od.c (usage): Likewise. + * pr.c (usage): Likewise. + * sort.c (usage): Likewise. + * split.c (usage): Likewise. + * wc.c (usage): Likewise. + From Karl Berry. + +Fri Nov 22 20:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/csplit.c (process_regexp): Update CURRENT_LINE only if + the new value would be larger. This avoids the infinite loop + otherwise provoked by situations like this: + printf "\na\n" | csplit - '/a/-1' '{*}' + From Jens Schmidt. + +Tue Nov 19 23:16:57 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AM_SANITY_CHECK_CC): Remove it. Autoconf-2.11 + has this built-in. + +Sat Nov 2 08:50:01 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * doc/Makefile.am (MAKEINFO): Set to makeinfo --no-split. + Otherwise, the generated info files have names longer than + the 14-byte max of some old systems. + Reported by Karl Heuer. + +Fri Nov 1 21:33:16 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/strtol.c: Update from GNU libc. + + * tests/sort-test/Test.pm: Add a test to exercize this fix. + + * src/sort.c [!ENABLE_ASSERTIONS]: Guard NDEBUG definition. + (checkfp): Fix off-by-one error that resulted in writing one byte + beyond the end of a malloc'd buffer. It caused `sort -c' to segfault + on Linux systems having a relatively recent libc. Before, running + the command, perl -e "print 'x' x 30, \"\n\";"|sort -c + would provoke the memory overrun (though not necessarily the failure). + Add an assertion. + Reported by Risto Kankkunen. + +Thu Oct 31 17:48:24 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/sort.c (key_init): New function. + (main): Use key_init in the two places where it was open-coded. + This fixes a UMR of the general_numeric field. + + * src/join.c (decode_field_spec): Always give FIELD_INDEX a value. + This avoids a spurious UMR report from purify. + (prjoin): Add an assertion. + (add_field): Update assertion. + + * src/tr.c (es_free): New function. + (parse_str): Use it to plug a small memory leak. + +Wed Oct 23 22:02:24 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/md5.c: Update from GNU libc. + * lib/md5.h: Update from GNU libc. + +Mon Oct 21 16:48:12 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/tr.c (validate): Remove TAB from diagnostic, for consistency. + +Sun Oct 20 13:44:07 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/Makefile.am (INCLUDES): Add -I../intl. Reported by Eric Backus. + + * Makefile.am (AUTOMAKE_OPTIONS): Set to `gnits' + (EXTRA_DIST): Remove. + + * configure.in: Remove README_ALPHA related code. Automake takes + care of it automatically now when in gnits mode. + + * lib/md5.c (md5_process_bytes): Cast void* pointer to char* before + doing arithmetic with it. + +Sat Oct 19 23:13:54 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/md5.c: Update from GNU libc. + * lib/md5.h: Update from GNU libc. + +Fri Oct 18 00:08:04 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AC_OUTPUT): Add tests/join-test/Makefile. + + * tests/Makefile.am (SUBDIRS): Add join-test. + +Tue Oct 15 23:25:31 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/tr.c (get_next): Rewrite to treat lower/upper mapping as a + special case. + (main): Write separate loops to initialize mapping for lower->upper + and upper->lower conversion. + Reported by Arne Henrik Juul. + +Sun Oct 13 12:52:42 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/xstrtol.c (__xstrtol): Return an error for invalid suffix. + Before, e.g., `split -b 1M' would be silently accepted and treated + like `split -b 1'. Reported by Franc,ois. + + * src/split.c (usage): Remove parameter, REASON. + (main): Update callers to use combination of error (0, 0, ... and + usage (EXIT_FAILURE). + (main): When a string operand cannot be converted to a number of + bytes or lines, include that string in the diagnostic. + +Sat Oct 12 00:05:11 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AC_REPLACE_FUNCS): Add strpbrk and strtol. + + * lib/Makefile.am (EXTRA_DIST): Remove. + +Thu Oct 10 23:41:36 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/md5.c (md5_stream): Apply fix from Ralph Loader + <loader@maths.ox.ac.uk> via Ulrich Drepper. + +Wed Oct 9 07:26:40 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/Makefile.am (tu_DEPENDENCIES): Depend on $(tu_LIBADD). + +Tue Oct 8 21:32:17 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/error.c: Include error.h to align with libit -- + under protest, François :-). + +Sun Oct 6 08:02:28 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * acinclude.m4 (AC_HEADER_SYS_TIME_H, AM_FUNC_MKTIME, + AM_FUNC_ERROR_AT_LINE, AM_FUNC_OBSTACK): Remove definitions. + They're included in automake-1.1f. + + * configure.in (AM_FUNC_ERROR_AT_LINE): Use it instead of + open-coding it. + +Sat Oct 5 12:40:22 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/memcpy.c [HAVE_CONFIG_H]: Include config.h. + From Karl Berry. + +Fri Oct 4 07:20:37 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (GNU_PACKAGE): New variable. + (PACKAGE_VERSION): Remove it. + + * acconfig.h (GNU_PACKAGE): New variable. + (PACKAGE_VERSION): Remove now-unused variable. + + * lib/long-options.c (parse_long_options): Separate package name + and version number to accomodate new --version output requirement. + * lib/long-options.h: Update prototype. + +Thu Oct 3 23:27:31 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/md5sum.c (main): Remove dead code that used to print --version + output. + +Tue Oct 1 06:54:22 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in: Use result of AM_FUNC_STRTOD to set POW_LIBM. + * src/Makefile.am (sort_LDADD): Use any library (-lm) that + gets substituted for @POW_LIBM@. + + * tests/md5sum-test/md5-rfc (md5sum): Use ../../src/md5sum. + +Mon Sep 30 23:35:46 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/md5sum-test/md5-rfc (md5sum): Set to $srcdir/md5sum. + + * acinclude.m4: Update definitions from gettext-0.24. + +Sun Sep 29 20:04:53 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/sort-test/build-script.pl: Die if close fails. + * tests/tr-test/build-script.pl: Likewise. + + * configure.in (AC_OUTPUT): Add tests/cut-test/Makefile. + * tests/Makefile.am (SUBDIRS): Add cut-test. + * tests/cut-test: New directory. + +Fri Sep 27 22:22:09 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (ALL_LINGUAS): Add spanish (es). + +Thu Sep 26 21:02:54 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/md5sum.c (usage): Remove references in --help output to + the now-deprecated --string option. Support for it will be + removed soon. Using this option can provoke a memory access + violation on some systems because of (unavoidable in an efficient + implementation) alignment assumptions made by functions in md5.c. + md5sum.c could leave the option in and accomodate the alignment + restriction, but this option was intended solely for testing, and + the tests are now all file-oriented, so it's not necessary. + + * tests/md5sum-test/md5-rfc: Rewrite to avoid use of --string option. + +Wed Sep 25 21:43:10 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/sort-test/Makefile.am (t): Factor out .in suffix. + Include new test: t16a. + * tests/tr-test/Makefile.am (t): Likewise. + + * src/Makefile.am (EXTRA_DIST): Remove md5-test.rfc. + +Mon Sep 23 10:00:50 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/md5sum-test/Makefile.am (EXTRA_DIST): Distribute $(TESTS). + +Sun Sep 22 09:24:22 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/sort.c (keycompare): Declare translate to be unsigned char *. + Otherwise, sign extension caused misordering when using e.g. -f. + Reported by Erick Branderhorst. + * tests/sort-test/Test.pm: Add Erick's test for that fix. + + * tests/Makefile.am (SUBDIRS): Add md5sum-test. + +Sat Sep 21 13:34:59 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/Makefile.am (check): Remove tests for md5sum. + * tests/md5sum-test: New directory. Put them here instead. + * configure.in (AC_OUTPUT): Add tests/md5sum-test/Makefile. + +Thu Sep 19 08:54:05 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * tests/: Rename from checks. + * Makefile.am (SUBDIRS): Change `checks' to `tests'. + * configure.in (AC_OUTPUT): Likewise. + + * configure.in ($PACKAGE, $VERSION): Don't AC_DEFINE_UNQUOTED these. + AM_INIT_AUTOMAKE now does it (as of automake-1.1e). + +Sun Sep 15 23:08:48 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * Makefile.am (EXTRA_DIST): Remove acinclude.m4. + +Thu Sep 12 17:05:23 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * lib/Makefile.am (EXTRA_DIST): Add getline.c. + (tu_SOURCES): Remove getline.c + From Kaveh Ghazi. + +Sun Sep 8 13:55:18 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * checks/sort-test/build-script.pl: Prefix $in with \$srcdir/ + so make check works with VPATH build. From Uli Drepper. + +Sat Sep 7 12:25:42 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/system.h: Add comments justifying IS* versions of ctype.h macros. + + * src/fmt.c (check_punctuation): Use ISPUNCT instead of ispunct. + (get_line): Use ISSPACE instead of isspace. From Bruno Haible. + +Mon Sep 2 10:34:46 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/*.c (usage): Tell where to report bugs. + +Sun Aug 25 22:50:47 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * checks/sort-test/Makefile.am (EXTRA_DIST): Add $x-tests. + ($x-tests): Guard dependencies with @MAINT@. + * checks/tr-test/Makefile.am: Likewise. + +Sat Aug 24 14:25:41 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/cat.c (cat): Cast first arg to stpcpy to char* to avoid warnings. + +Wed Aug 21 22:28:26 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (ALL_LINGUAS): Add polish (pl). + +Sun Aug 18 09:34:42 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (AC_OUTPUT): Add checks/sort-test/Makefile. + * checks/Makefile.am (SUBDIRS): Add sort-test. + +Sat Aug 17 18:57:17 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * Makefile.am (EXTRA_DIST): Add acinclude.m4. + +Tue Aug 13 21:47:23 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/Makefile.am (EXTRA_DIST): Remove ansi2knr.1 and ansi2knr.c. + Automake includes them automatically. + + * configure.in (AM_INIT_AUTOMAKE): Use it. + (AM_PROG_INSTALL): Remove. AM_INIT_AUTOMAKE does this. + (AC_PROG_MAKE_SET): Likewise. + +Sun Aug 11 20:49:21 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in: Rename a few macros for automake-1.1c. + (AC_REPLACE_GNU_GETOPT): Remove. + (AC_PATH_PROG): Find perl -- needed only for checks if you + change or remove things with e.g. make maintainerclean. + + + * lib/Makefile.am (tu_LIBADD): Remove @REGEXOBJ@. New AM_WITH_REGEX + adds .o files to @LIBOBJ@. + (tu_SOURCES): Add getopt.c and getopt1.c. + (EXTRA_DIST): Remove getopt.c and getopt1.c. + + * acinclude.m4: New file -- derived from aclocal.m4. + * aclocal.m4: This file is now generated by the aclocal program + (which comes with the automake package.) + +Sun Aug 4 10:50:46 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * checks/: New directory. + * checks/Makefile.am: New file. + * configure.in (AC_OUTPUT): Add new directories: checks, + checks/tr-test. + * Makefile.am (SUBDIRS): Likewise. + +Sat Jul 27 17:22:14 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/system.h (bindtextdomain) [!ENABLE_NLS]: Undefine to avoid + redefinition warnings on solaris. + (textdomain) [!ENABLE_NLS]: Likewise. + +Thu Jul 25 23:06:35 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/unexpand.c (unexpand): Move EOF check to follow code that + processes and generates output for pending spaces. Before + `printf ' ' |unexpand -t 1,2' generated no output. + + * src/md5sum.c (md5_check): Remove parameter, BINARY. + Rename local TYPE_FLAG to BINARY, so md5_file uses the binary mode + from the input stream rather than the one from the command line. + (main): Fail with a diagnostic if --binary or --text is specified + when verifying checksums. + Reported by Eli Zaretskii <eliz@is.elta.co.il>. + +Sun Jul 21 11:58:48 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in: Add check for error_at_line so systems with + GNU libc don't compile and link with distributed error.c. + * lib/Makefile.am (tu_SOURCES): Remove error.c. + (EXTRA_DIST): Add error.c. + + * configure.in (AC_REPLACE_FUNCS): Replace getline.c. + Add related check for the getdelim function. + From Ulrich Drepper -- as done in gettext. + +Sat Jul 20 15:59:36 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (PACKAGE_VERSION): Use space instead of hyphen to + separate PACKAGE and VERSION. + + * aclocal.m4 (AM_SANITY_CHECK_CC): New macro. Derived from + macros from Bruno Haible and from Cygnus. + * configure.in (AM_SANITY_CHECK_CC): Use it. + +Wed Jul 17 00:30:28 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * install-sh: Get version with MIT copyright. + +Tue Jul 16 00:09:37 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * aclocal.m4 (fp_C_PROTOTYPES): Improved version from + François Pinard. + Update all other macros to reference $fp_cv_prog_cc_stdc, rather + than $ac_cv_prog_cc_stdc. + + * src/od.c (OFF_T_MAX): Remove definition. + (main): Compare against LONG_MAX rather than OFF_T_MAX. + +Mon Jul 15 23:42:57 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * Many files: Update FSF address. + +Sun Jul 14 16:53:50 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/unexpand.c (unexpand): Fix bug that contributed to endless loop + when invoking `echo ' ' |unexpand -t 1,2': use print_tab_index, not + tab_index in inner flush_pend: while loop. From Keith Owens + <kaos@audio.apana.org.au>. + + * src/unexpand.c [HAVE_LIMITS_H]: Include limits.h for INT_MAX. + [!INT_MAX]: Define it. + (main): Append INT_MAX to command-line-specified tab list to + ensure termination in unexpand's inner loop. + Derived from a patch from Keith Owens. + +Thu Jul 11 22:04:36 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 1.19. + + * configure.in (VERSION): Bump to 1.19. + +Wed Jul 10 22:57:29 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * aclocal.m4 (fp_PROG_CC_STDC): Include sys/stat.h in test program + so that DYNIX/ptx V4.1.3 doesn't use `-Xc -D__EXTENSIONS__' -- with + those options on that system, sys/stat.h gets compile errors. + With help from Marcus Daniels. + + * getopt.c: Update from gettext-0.10.23. + * getopt1.c: Likewise. + * getopt.h: Likewise. + +Tue Jul 9 18:07:23 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/fmt.c (MAXCOST): Use `(unsigned long)1' rather than `(COST)1' + so the left operand of the << isn't signed. + From Kjetil Torgrim Homme. + + * po/Makefile.in.in (install-data): Don't install NLS files when + they're not requested. From Ulrich Drepper. Reported by + Kjetil Torgrim Homme <kjetilho@ifi.uio.no>. + +Fri Jul 5 21:55:58 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * po/Makefile.in.in ($(PACKAGE).pot): Merge from gettext-0.10.23. + * ABOUT-NLS: Likewise. + * intl/*: Likewise. + * aclocal.m4: Likewise. + +Thu Jul 4 07:24:54 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/uniq.c (usage): Remove space before newline in usage message. + + * src/md5sum.c (MIN_DIGEST_LINE_LENGTH): New macro. + [NEWLINE_REPLACEMENT_STRING*]: Remove macros. + (main): Output a leading backslash for a line describing a file + whose name contains a newline. Then translate each NEWLINE byte + in the file name to the string, "\\n", and each backslash to "\\\\". + File names that don't contain NEWLINE aren't translated. + (split_3): Rewrite to handle file names with embedded newlines. + Miles Bader and Jim Blandy suggested this new encoding scheme. + + * src/md5sum.c (md5_file): Replace obsolete comment with a description + of the function. + (md5_check): Don't use "s"-adding trick to form the plural of + `checksum.' That doesn't work well with translation. + Suggestions from Ulrich Drepper. + (split_3): Add missing semicolon so it compiles. From Jim Blandy. + +Wed Jul 3 23:21:09 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/md5sum.c (split_3): Correct test for 35-byte line to accomodate + fact that leading blanks may be stripped. + +Tue Jul 2 21:51:40 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (ALL_LINGUAS): Add dutch (nl). + +Mon Jul 1 23:50:19 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/md5sum.c [NEWLINE_REPLACEMENT_STRING]: Define. + (split_3): Translate NL bytes not to NUL, but to + NEWLINE_REPLACEMENT_STRING. + Suggested by Ulrich Drepper. + (main): Translate back to NL-containing filename. + +Sun Jun 30 22:42:17 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/md5sum.c (split_3): Take an additional parameter, S_LEN. + Adapt caller. + Map translated NEWLINE-containing filename back into the original + NEWLINE-containing name. + (md5_check): Translate NEWLINE bytes to NUL bytes in filename. + +Sat Jun 29 18:59:07 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (PACKAGE_VERSION): Add `GNU ' prefix so it + appears in the output of --version. Reported by RMS. + +Wed Jun 26 21:35:10 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * src/Makefile.am (LDADD): Remove sort-specific hack to link + with -lm. + * aclocal.m4 (AM_FUNC_STRTOD): New macro. + * configure.in (AM_FUNC_STRTOD): Use it. + (AC_REPLACE_FUNCS): Remove strtod. + Suggested by Tom Tromey. + + * po/Makefile.in.in (install-data): Add `else true;' to avoid + letting failing if-condition cause make failure. + From Fred Fish (fnf@ninemoons.com). + +Tue Jun 25 21:55:18 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 1.18a. + +Tue Jun 18 20:43:20 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * aclocal.m4: Update from gettext-0.10.20. + * ABOUT-NLS: Likewise. + * intl/*: Likewise. + +Thu Jun 13 22:31:39 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (VERSION): Bump to 1.18a. + + * po/Makefile.in.in ($(PACKAGE).pot): Reapply change of May 30. + Depend on POTFILES only when using maintainer mode. + + * intl/*: Update from gettext-0.10.18. + +Tue Jun 11 23:32:10 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 1.18. + + * po/Makefile.in.in: Update from gettext-0.10.17. + * intl/*: Likewise. + * ABOUT-NLS: Likewise. + +Mon Jun 10 18:22:29 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * Makefile.am (cvs-dist): Use -c option in cvs tag command. + +Fri Jun 7 22:06:46 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * configure.in (VERSION): Set to 1.18. + + * src/Makefile.am (sort_LDADD): Set this to -lm to get pow when using + the strtod supplied with this package. Otherwise, linking failed on + Solaris-2.4 systems. Reported by Wayne Stewart <wstewa@atl.com>. + +Thu Jun 6 21:57:08 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * po/Makefile.in.in: Update from gettext-0.10.16. + * intl/*: Likewise. + * ABOUT-NLS: Likewise. + * aclocal.m4 (AC_REPLACE_GNU_GETOPT): Move definition to precede + gettext-related ones. + Update from gettext-0.10.16. + +Fri May 31 22:04:51 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 1.17. + + * Makefile.am (EXTRA_DIST): Set to texinfo.tex so that file is + distributed. + +Thu May 30 00:07:48 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * Version 1.16. + + * tail.c (main): Interpret the old-style +VALUE and -VALUE options + like -c VALUE and -c +VALUE (resp) when VALUE has one of the [bkm] + suffix multipliers. This makes the code consistent with --help + output. Reported by Karl Heuer. + + * sort.c (limfield): #ifdef-out a block of code that makes + GNU sort incompatible with Unix sort when a key-end spec refers + to the N'th character in a field that has fewer than N characters. + The POSIX spec doesn't appear to specify behavior for this case. + From Karl Heuer. + + * po/Makefile.in.in (stamp-cat-id): Avoid using temp filename + longer than 14 characters. + (mostlyclean): Likewise. + From Karl Heuer. + + * po/Makefile.in.in ($(PACKAGE).pot): Depend on POTFILES only + when using maintainer mode. Reported by Karl Heuer. + + * po/Makefile.in.in (.po.mo): Reenable dependency and rule. + It is required when using native NLS, e.g. on Solaris. + From Marcus Daniels. + + * od.c (decode_one_format): Use %lu (not %d) printf format + corresponding to unsigned long, SIZE. + + * Version 1.15. + + * intl/Makefile.in (installcheck): New target. + * po/Makefile.in.in (installcheck): New target. + + * od.c (decode_one_format): Take another parameter. + Give a specific diagnostic for invalid format spec here rather + than an overly general one from caller's caller. + (decode_format_string): Update caller. + (main): Don't give diagnostic here when decode_format_string fails. + Remove assertions that could fail on some Crays because they don't + have a two-byte type. + Johan Danielsson (joda@pdc.kth.se) reported the failed assertions. + +Mon May 27 17:43:31 1996 Jim Meyering <meyering@na-net.ornl.gov> + + * cat.c (main): Use STDIN_FILENO and STDOUT_FILENO instead of + less portable fileno (stdin) and fileno (stdout). + * sort.c (main): Use STDIN_FILENO instead of less portable + fileno (stdin). + +Mon May 20 21:50:23 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * Makefile.am (distcheck): Remove target and rule -- automake-0.33 + adds it automatically. + +Sun May 19 13:15:49 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * configure.in (LINGUAS): Add ko. + * Makefile.am (distcheck): Remove @MAINT@ prefix from first command. + +Thu May 16 22:18:41 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * Makefile.am (distcheck): New target. From Gord Matzigkeit. + +Fri May 10 20:46:13 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * po/Makefile.in.in (all-yes): Always depend on CATALOGS. Otherwise + they won't be built and install could fail. From Ulrich Drepper. + (.po.mo): Disable dependency and rule when not in maintainer mode. + + * aclocal.m4 (ud_WITH_NLS): Make DATADIRNAME and CATOBJEXT depend + on whether we're using GNU gettext. From Ulrich Drepper. + +Wed May 8 21:10:43 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * intl/Makefile.in (distdir): Renamed from dist. For compatibility + with automake-0.32. + * po/Makefile.in.in (distdir): Likewise. + + * po/Makefile.in.in (all-yes): Depend on GMOFILES. + Depend on CATALOGS and GMOFILES files only in maintainer mode. + +Tue May 7 22:10:20 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * configure.in: Require autoconf-2.10. + + * aclocal.m4 (jm_MAINTAINER_MODE): New macro. + * configure.in (jm_MAINTAINER_MODE): Use it. + +Sat May 4 20:40:01 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * configure.in (LINGUAS): Add de. + * po/de.po: New file. + + * memcasecmp.c [IN_CTYPE_DOMAIN]: Rename from ISASCII. + * regex.c [IN_CTYPE_DOMAIN]: Likewise. + * system.h [IN_CTYPE_DOMAIN]: Likewise. + +Sun Apr 28 17:10:03 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * fmt.c (copy_rest): Don't copy past end of prefix. Output + trailing spaces if the prefix had any. Before, fmt would + improperly output NUL bytes. The command + perl -e 'print "| S";' |fmt -p' | '|tr '\0' @ + output `|@S'. Reported by François Pinard. + + * sort.c (main): Give a better diagnostic for `sort -0'. + Reported by Karl Berry. + + * configure.in: Make fp_C_PROTOTYPES precede AC_C_INLINE. + Otherwise, some systems lose because the value AC_C_INLINE choses + with plain `cc' is different from that chosen when using the ANSI-mode + C compiler. From Kaveh Ghazi. + +Tue Apr 23 22:05:35 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * aclocal.m4 (AC_REPLACE_GNU_GETOPT): New macro. + * configure.in: Use it. + * lib/Makefile.am (tu_SOURCES): Remove getopt.c and getopt1.c. + (EXTRA_DIST): Add getopt.c and getopt1.c + + * src/*.c, src/*.h: Update Copyright years to include 1996. + +Sun Apr 21 08:04:51 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * getline.c: New version from gettext-0.10.12. + * getline.h: Likewise. + * configure.in (AC_CHECK_FUNCS): Add getdelim. + Suggested by Ulrich Drepper. + + * md5sum.c (md5_check): Remove spurious newline at end of error + format string. + + * od.c (decode_one_format): Use printf's L modifier for long doubles, + not `l'. From Eric Backus. + + * Makefile.am (LDADD): Put @INTLLIBS@ before package library. + + * od.c: Include <values.h>. + [!BITSPERBYTE]: Define. + [OFF_T_MAX]: Use BITSPERBYTE, not 8, and cast the result to off_t. + * configure.in (AC_CHECK_HEADERS): Add values.h. + +Fri Apr 19 23:48:53 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * Makefile.am (cvs-dist): New rule. Based on the one from + Tom Tromey's automake. + +Thu Apr 18 22:13:14 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * tail.c (main): Make code clearer: use new variable `n_files' in + place of `argc - optind'. Use `file' instead of `argv + optind'. + +Sat Apr 13 13:08:29 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * lib/Makefile.am (noinst_HEADERS): Include memcasecmp.h, + not memcasecmp.c. + + * memcasecmp.c: Unprotoize. + [ISASCII]: Define. + [ISUPPER]: Define. + + * join.c (decode_field_spec): Rename local variable `valid' + to invalid (and reverse sense) to avoid conflict with the + macro definition in /usr/include/locale.h on SunOS 4.1.3. + +Tue Apr 9 22:43:57 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * uniq.c: Add new option --ignore-case (-i). + Include memcasecmp.h. + (different): Compare with memcasecmp if ignoring case. + (main): Handle 'i'. + + * join.c (memcasecmp): Remove static definition of function. + Include memcasecmp.h instead. + + * memcasecmp.c: New file. + * memcasecmp.h: New file. + * lib/Makefile.am (tu_SOURCES): Add memcasecmp.c. + (noinst_HEADERS): Add memcasecmp.h. + +Thu Apr 4 17:05:33 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * tr.c: The following commands all failed unnecessarily. + tr -cs '[:upper:]' '[X*]' + tr -dcs '[:lower:]' n-rs-z + tr -ds '[:xdigit:]' [:alnum:]' + tr -dcs '[:alnum:]' [:digit:]' + tr -dc '[:upper:]' + Reported by Ross Ridge (ross@worf.mks.com). + (validate): Add missing conjunct (translating) in test for + `translating and complementing character classes' error. Before, + valid uses of tr could fail. E.g. `tr -dcs '[:cntrl:]' '[:alnum:]''. + (homogeneous_spec_list): New function. + (validate): Use it to relax the old (overly restrictive) restriction + that prohibited use of complemented character classes when translating. + Now, that is allowed as long as the translation maps many to one. + (get_spec_stats): Rename and redefine global has_char_class from + has_upper_or_lower. + +Wed Apr 3 07:08:57 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * aclocal.m4: Update NLS macros from gettext-0.10.11. + + * src/Makefile.am (INCLUDES): Add -I$(srcdir) to get system.h + when srcdir != builddir. From Kaveh Ghazi. + +Wed Mar 27 23:33:36 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * cksum.c (cksum): Use format "%lu %ld" (instead of "%10lu %8ld") + to be POSIX compliant. From Stephen Gildea <gildea@x.org>. + +Sun Mar 24 08:47:40 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * join.c (main): Use EXIT_FAILURE, not 2, as exit code in error call. + * od.c (skip, main): Likewise. + * tr.c (main): Likewise. + + * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c head.c + join.c md5sum.c nl.c od.c paste.c pr.c split.c sum.c tac.c tail.c + tr.c unexpand.c uniq.c wc.c: Exit with status EXIT_SUCCESS or + EXIT_FAILURE, rather than 0 or 1. + +Sat Mar 23 23:14:40 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * system.h [EXIT_FAILURE]: Undefine and define to 1 also if it + is defined to zero. Suggested by Paul Eggert. + + * sort.c [SORT_FAILURE]: New macro. + Be careful to exit with 1 only when -c is used and the + input is not properly sorted. In all other cases, use + SORT_FAILURE as required by POSIX. + (main): Change some `error (1, ...' to use SORT_FAILURE. + Upon successful termination, exit with EXIT_SUCCESS instead of `0'. + Replace all uses of `2' (as exit code) with SORT_FAILURE. + +Thu Mar 21 22:47:50 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * csplit.c: Include assert.h, but disable assertions. + (process_line_count): Replace if-abort with a slightly relaxed + assertion. Before, `echo |csplit - 1 1' would abort. + Reported by Samuli.Karkkainen@hut.fi. + (parse_patterns): Disallow uses like `csplit FILE 0' with zero + line number, `csplit FILE 2 1' with decreasing line numbers, and + warn about uses like `csplit FILE 3 3' that have equal line numbers. + + * sort.c (main): Declare to be of type int, not void. + From Peter Seebach <seebs@taniemarie.solon.com>. + * cat.c cksum.c comm.c csplit.c cut.c expand.c fold.c head.c join.c + nl.c paste.c pr.c split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c + wc.c (main): Likewise. + +Sat Mar 16 16:30:07 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * configure.in (PACKAGE_VERSION): New macro. + * acconfig.h (PACKAGE_VERSION): Add it. + * src/Makefile.am: Remove rules for generating version.c. + Remove references to version.o, version.h, and stamp-v. + * version.c: Remove file. + * version.h: Remove file. + * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c fold.c + head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c split.c + sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c: Don't include + version.h. + (main): Use PACKAGE_VERSION instead of version_string. + +Mon Mar 11 16:07:08 CST 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * sort.c (write_bytes): Renamed from xfwrite. + Remove SIZE parameter. It was always 1. Update all callers. + Rename NELEM parameter to N_BYTES and change its type to size_t. + +Sat Mar 9 13:30:12 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * cat.c cksum.c comm.c csplit.c cut.c expand.c fmt.c + fold.c head.c join.c md5sum.c nl.c od.c paste.c pr.c sort.c + split.c sum.c tac.c tail.c tr.c unexpand.c uniq.c wc.c (main): + Initialize for internationalized message support: call setlocale, + bindtextdomain, and textdomain. + * system.h: Add definitions and includes for NLS. + * Makefile.am (SUBDIRS): Add intl and po. + * src/Makefile.am (datadir): Define. + (localedir): Define. + (DEFS): Add LOCALEDIR definition. + (LDADD): Add @INTLLIBS@. + * aclocal.m4: Add NLS-related macro definitions from + gettext distribution. + * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES, + HAVE_STPCPY): New macros. + Add PACKAGE and VERSION. + * configure.in (PACKAGE): Define with AC_DEFINE_UNQUOTED. + (VERSION): Likewise. + (ALL_LINGUAS): Define. + (AC_CHECK_HEADERS): Add float.h. + (ud_GNU_GETTEXT): Use it. + Link an nls file. + (AC_OUTPUT): Reflect addition of two new directories, intl and po. + Create po/Makefile. + From François Pinard. + + * tr.c (star_digits_closebracket): Declare formal param, IDX, + and local I to be of type size_t (rather than int) to avoid + warnings from gcc -Wall. + +Wed Feb 28 20:32:48 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * src/Makefile.am: Adapt for automake-0.30. + (noinst_HEADERS): Rename from HEADERS. + (INCLUDES): Remove -I.. and -I$(srcdir). automake-0.30 adds these + to DEFS automatically. + * lib/Makefile.am (noinst_HEADERS): Rename from HEADERS. + +Wed Feb 21 18:56:27 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * join.c (xfields) [without -t]: Ignore leading blanks. + From David Dyck (dcd@tc.fluke.COM). + +Sun Feb 18 12:07:27 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * join.c [TOLOWER]: Define. + (usage): Briefly describe new --ignore-case (-i) option. + (memcasecmp): New function. + (main): Set IGNORE_CASE for -i. + (keycmp): Compare with memcasecmp if IGNORE_CASE is set. + Suggestion and an initial patch from Alberto Accomazzi + <alberto@cfa0.harvard.edu>. + +Sat Feb 17 18:54:40 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * sort.c: Add -z option. Change all occurrences of '\n' to `eolchar'. + (usage): Describe it. + (main): Set eolchar to 0 for -z. + From Mark W. Eichin <eichin@cygnus.com>. + +Fri Feb 16 21:44:14 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * join.c (main): Mark two strings for translation. + * md5sum.c (md5_check): Mark a string for translation. + From François Pinard. + +Mon Feb 12 21:12:28 1996 Jim Meyering (meyering@na-net.ornl.gov) + + Update for automake-0.29. + * Makefile.am (CONFIG_HEADER): Don't define. Automake now does it. + * src/Makefile.am: Likewise. + * lib/Makefile.am: Likewise. + * doc/Makefile.am (info_TEXINFOS): Renamed from TEXINFOS. + * man/Makefile.am (man_MANS): Renamed from MANS. + + * fmt.c [TRUE]: Undefine before defining to avoid warning on NeXT. + [FALSE]: Likewise. + From Derek Clegg (dclegg@next.com). + +Sat Feb 3 16:20:40 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * Version 1.14. + +Wed Jan 31 23:26:13 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * tail.c (dump_remainder): Flush stdout when tailing-forever on + multiple files. From Carlos Canau <Carlos.Canau@relay.puug.pt>. + +Fri Jan 5 18:30:28 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * aclocal.m4: For SVR4 systems, use -Xc -D_POSIX_C_SOURCE in CFLAGS, + not just -Xc. From François Pinard. + + * doc/Makefile.am (DIST_OTHER): Don't set to mdate-sh. mdate-sh is + distributed automatically. From Tom Tromey. + +Thu Jan 4 20:32:52 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * nl.c: Include rx.h after limit.h (not before) to avoid warning + about the redeclaration of RE_DUP_MAX in limit.h. rx.h protects + its definition. From Kaveh Ghazi. + + * src/Makefile.am (DIST_OTHER): Include md5-test.rfc so make check + works again. Reported by François Pinard and Kaveh Ghazi. + + * rx.c [SYNTAX]: Rename from SYNTAX_TABLE. + [SYNTAX_TABLE]: Remove extern dcl of re_syntax_table. + (RE_SEARCH_2_FN): Cast string1 and string2 to avoid pointer type + mismatch errors from e.g. SunOS's /bin/cc. + Reported by Kaveh Ghazi. + +Wed Jan 3 23:34:39 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * configure.in (VERSION): Set variable directly rather than from + a separate file. + * Makefile.am (DIST_OTHER): Remove VERSION. + * src/Makefile.am (version.c): Depend on Makefile, not ../VERSION. + (stamp-v): New target; depend on Makefile. + (DISTCLEANFILES): Add stamp-v, version.c. + +Tue Jan 2 00:08:08 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * sort.c (keycompare): Rewrite cases handling ignored characters + so that they really are ignored. Reported by Carl Johnson + <carlj@cjlinux.home.org>. + +Fri Dec 22 21:34:55 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * configure.in: Touch stamp-h only if config.h is remade. + + * csplit.c (extract_regexp) [!WITH_REGEX]: Intialize + syntax_parens field. + +Mon Dec 18 21:42:44 1995 Jim Meyering (meyering@comco.com) + + Use automake to generate Makefile.in files. + * Makefile.am: New file. + * doc/Makefile.am: New file. + * lib/Makefile.am: New file. + * man/Makefile.am: New file. + * src/Makefile.am: New file. + +Thu Dec 14 21:13:22 1995 Jim Meyering (meyering@comco.com) + + * fmt.c (main): Use xstrtol instead of atoi. + + * fold.c (main): Use xstrtol instead of atoi. + (fold_file): Make a couple locals `int', not size_t, and cast + fwrite's third parameter to size_t. + + * nl.c (main): Use xstrtol instead of atoi. + Rename misleading --first-page=N option to --starting-line-number=N. + (usage): Update. + + * uniq.c (main): Use xstrtol instead of atoi. + +Fri Dec 8 20:48:00 1995 Jim Meyering (meyering@comco.com) + + * aclocal.m4 (fp_C_PROTOTYPES): Set ANSI2KNR to ./ansi2knr. + +Thu Dec 7 19:55:03 1995 Jim Meyering (meyering@comco.com) + + * aclocal.m4 (ud_WITH_REGEX): New macro. + * configure.in: Use it. + * rx.c, rx.h: New files. + * lib/Makefile.in (REGEX): Set to @REGEXOBJ@, not regex.o. + (SOURCES, DISTFILES): Add rx.c, rx.h. + * acconfig.h (WITH_REGEX): Add it. + * csplit.c [!WITH_REGEX]: Include rx.h. + * nl.c [!WITH_REGEX]: Likewise. + * tac.c [!WITH_REGEX]: Likewise. + From Ulrich Drepper and François Pinard. + +Tue Dec 5 17:49:53 1995 Jim Meyering (meyering@comco.com) + + * sort.c (main): Diagnose invalid arguments to -k, then fail. + + * sort.c (numcompare): Properly handle all cases in which signs differ. + From Karl Heuer. + + * Makefile.in (mandir): @mandir@ is just $(prefix)/man. + Append `/man1'. Reported by Karl Heuer. + + * sum.c (bsd_sum_file): Remove misleading comment. From Karl Heuer. + + * src/Makefile.in [.c._o]: Don't create $<-tmp. From Kaveh Ghazi. + +Fri Dec 1 01:02:36 1995 Jim Meyering (meyering@comco.com) + + * lib/Makefile.in (default): New target. + + * sort.c (numcompare): Properly order `-' and valid integers; + treat `-' as if it were zero. Reported by Ross Alexander + <r.alexander@auckland.ac.nz>. + + * Makefile.in (DISTFILES): Remove unused mkdep-Makefile. + (.PHONY): Depend on default. + +Wed Nov 29 21:50:53 1995 Jim Meyering (meyering@comco.com) + + * aclocal.m4 (jm_PROG_C_MKDEP): Remove, for now. + (jm_AUTODEPS): Likewise. + (jm_WITH_GNU_MAKE): Likewise. + * configure.in (jm_AUTODEPS): Remove. + + * sort.c (begfield): Replace loop with equivalent if-else. + (limfield): Fix bug that made field specs like -k1.5 return a + pointer into LINE beyond the first field. + Don't try to trim trailing blanks here; it's not + possible because we don't know where the field begins. + Replace loop with equivalent if-else. + (trim_trailing_blanks): New function. + (findlines): Call it. + (keycompare): Likewise. + (main): Don't decrement T2 corresponding to `x' in field + specs like -ku.v,w.x. + +Sun Nov 26 15:50:23 1995 Jim Meyering (meyering@comco.com) + + * csplit.c [!UINT_MAX]: Define. + [!INT_MAX]: Define. + Include xstrtoul.h. + (string_to_number): Remove function. + (check_for_offset): Use xstrtoul instead of string_to_number. + (parse_repeat_count): Likewise. + (parse_patterns): Likewise. + (main): Likewise. + +Wed Nov 22 23:12:47 1995 Jim Meyering (meyering@comco.com) + + * Makefile.in (all et. al.): If make was invoked with -k and a + sub-make fails, fail after the loop rather than exiting right away. + Otherwise, make's -k option could be ineffective. + +Sat Nov 18 12:04:30 1995 Jim Meyering (meyering@comco.com) + + * src/Makefile.in (version.c): Depend on ../VERSION, not Makefile. + + Update for autoconf-2.5: + * src/Makefile.in (libdir): Set to @libdir@. + (bindir): Set to @bindir@. + * doc/Makefile.in (infodir): Set to @infodir@. + * man/Makefile.in (exec_prefix): Remove it. + (mandir): Set to @mandir@. + (bindir): Remove it. + +Thu Nov 16 21:25:45 1995 Jim Meyering (meyering@comco.com) + + * Makefile.in (default): New default target. Depend on `all' to + work around bug in AIX-3.2.5's /bin/make. Reported by Andreas Luik + <luik@isa.de>. + +Wed Nov 15 23:48:31 1995 Jim Meyering (meyering@comco.com) + + * mkdep-Makefile (.deps/empty.P): Depend on BUILT-HEADERS. + + * aclocal.m4 (jm_PROG_C_MKDEP): Rename from jm_PROG_MKDEP. + * src/Makefile.in (C_MKDEP): Rename from MKDEP. + * lib/Makefile.in (C_MKDEP): Likewise. + * mkdep-Makefile (C_MKDEP): Likewise. + Add comments. + + * csplit.c [__P]: Don't define it here. + * pr.c [__P]: Don't define it here. + * fmt.c [__P]: Don't define it here. + * system.h [__P]: Define it here. + + * aclocal.m4 (jm_AUTODEPS): Rename from jm_WITH_AUTODEPS. + Revamp, with suggestions from Franc,ois Pinard. + (jm_WITH_GNU_MAKE): New macro. + (jm_PROG_MKDEP): New macro. + * configure.in (jm_PROG_MKDEP): Use it. + * src/Makefile.in (MKDEP): Set it. + * lib/Makefile.in (MKDEP): Likewise. + * mkdep-Makefile: Use MKDEP, not DEP_CC. + (DEP_CFLAGS): Remove it. + +Tue Nov 14 23:10:54 1995 Jim Meyering (meyering@comco.com) + + * sort.c: Add support for sorting numbers in scientific notation. + Include xstrtod.h. + (struct keyfield): Add field: general_numeric. + (usage): Describe -g option. + (general_numcompare): New function. + (keycompare): Use new comparison function when general_numeric + flag is set. + (set_ordering): Honor `g' flag. + (main): Initialize and use new field. + From Marcus Daniels <marcus@sysc.pdx.edu>. + + * configure.in (AC_REPLACE_FUNCS): Add strtod. + * lib/Makefile.in (SOURCES): Add xstrtod.c. + (OBJECTS): Add xstrtod.o. + (DISTFILES): Add xstrtod.h. + + * csplit.c (cleanup): Don't exit. + (interrupt_handler): Rewrite to reset default signal handler + then repost caught signal. + (xmalloc, xrealloc, read_input, write_to_file, handle_line_error, + process_line_count, process_regexp, create_output_file, + close_output_file): Call cleanup_fatal, not cleanup. + Add const attribute to lots of parameters. + (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit. + Update callers. + + * tac.c (cleanup): Don't exit. + (cleanup_fatal): New function. Call cleanup, then exit. + (sighandler): New function. + (cleanup_fatal): Renamed from cleanup. Call cleanup, then exit. + Update callers. + (tac_stdin): Set up sighandler as signal handler, not `cleanup'. + +Sat Nov 11 15:46:02 1995 Jim Meyering (meyering@comco.com) + + * od.c (skip): Cast fseek's offset argument to `long'. + Erik Bennett <bennett@cvo.oneworld.com> reported that this is + necessary on BSDI systems. And if offset doesn't fit in a long, + then try using lseek instead. + + * sort.c (xmalloc): Declare static. + (xrealloc): Likewise. + + * tac.c (cleanup): Add signal number parameter. + Update callers. + + * cat.c (main): Don't die when dev/ino of input and output are + the same and the file descriptors correspond to stdin and stdout. + This is necessary on at least Digital UNIX (aka OSF1) 3.2C. + Otherwise, running `cat << X > $$' would fail with `cat: -: input + file is output file'. From Jarkko Hietaniemi <jhi@epsilon.hut.fi>. + + * Makefile.in (DISTFILES): Add @README_ALPHA@. + (config.status) Depend on VERSION. + * configure.in: Set README_ALPHA if the version number ends in [a-z]. + +Fri Nov 10 21:13:42 1995 Jim Meyering (meyering@comco.com) + + * fold.c (usage): Clarify meaning of --spaces. From Karl Berry. + + src/Makefile.in (.c._c): Don't redirect directly to $@. + (._c._o, .c._o): Remove temporary src file. + +Tue Nov 7 23:55:24 1995 Jim Meyering (meyering@comco.com) + + * VERSION: New file. + * configure.in (VERSION): New variable. + (PACKAGE): New variable. + + * Makefile.in (DISTFILES): Add VERSION. + (distdir): Use @PACKAGE@-@VERSION@, not distname. + Remove all references to distname. + * src/Makefile.in (version.c): Generate it. + (SOURCES): Remove now-generated version.c. + (distclean): Delete version.c. + * doc/Makefile.in (version.texi): Use @PACKAGE@-@VERSION@, + not version.c + + * */Makefile.in (distdir): Use @PACKAGE@-@VERSION@, not distname. + Remove all references to distname. + + * split.c: New option: --verbose. + (main): Recognize it. + (usage): Document it. + From Marty Leisner <leisner@sdsp.mc.xerox.com>. + +Sun Nov 5 06:59:27 1995 Jim Meyering (meyering@comco.com) + + * src/Makefile.in: Reflect protoization of csplit.c, fmt.c, pr.c, + and unexpand.c. + + * pr.c: Protoize. + (store_columns): Remove spurious 2nd argument in call to read_line. + [__P]: Define. Use it in prototyped forward decls. + + * csplit.c: Move prototypes after struct declarations. + Remove prototypes for xmalloc, xrealloc. + Protect prototypes with __P. + (new_control_record): Cast arg 1 to realloc. + + * fmt.c [__P]: Test PROTOTYPES, not __STDC__. + Protoize. + +Sat Nov 4 23:51:30 1995 Jim Meyering (meyering@comco.com) + + * csplit.c (close_output_file): Set output_stream to NULL so we + don't recurse endlessly between this function and cleanup. + + * unexpand.c: Reorder functions to obviate forward dcls. Remove + forward dcls. Protoize. Add `const' attribute to some parameters. + +Mon Oct 30 23:15:56 1995 Jim Meyering (meyering@comco.com) + + * wc.c: Reorder functions to obviate forward dcls. Remove + forward dcls. Protoize. Add `const' attribute to some parameters. + * uniq.c: Likewise. + * split.c: Likewise. + + * split.c (isdigits, convint): Remove these. + (main): Use xstrtol instead. + +Sun Oct 29 14:04:36 1995 Jim Meyering (meyering@comco.com) + + * paste.c (main): Move function body to end of file. + Remove forward dcls and protoize. + * sum.c (main): Likewise. + * nl.c: Protoize. Reorder functions to obviate forward dcls. + Remove forward dcls. + * tac.c: Likewise. + * src/Makefile.in (OBJECTS): Reflect that all of the above + now use prototypes. + + * sum.c (bsd_sum_file): Give file name parameter const attribute. + (sysv_sum_file): Likewise. + + * tac.c (xwrite): Give output buffer parameter const attribute. + (output): Likewise for both parameters. + (tac): Likewise for file name parameter. + (tac_file): Likewise. + +Sat Oct 28 16:02:39 1995 Jim Meyering (meyering@comco.com) + + * md5sum.c (md5_check): Use the same message format when there is + a single file and it gets a read error or checksum mismatch as when + there are more. Write that warning to standard error, not standard + output. Suggestions from Greg Troxel (gdt@b-sgi.bbn.com). + +Thu Oct 26 00:11:35 1995 Jim Meyering (meyering@comco.com) + + * sort.c (xtmpfopen): New function to set proper permissions on + temporary files. Use it instead of xfopen. Reported by Erik Corry + (erik@kroete2.freinet.de). + +Mon Oct 23 23:17:04 1995 Jim Meyering (meyering@comco.com) + + * aclocal.m4 (jm_WITH_AUTODEPS): New directive. + * configure.in: Use it. + + * lib/Makefile.in (INCLUDE, COMPILE): New variables. + (.c.o): Rewrite to be more like src/Makefile.in. + + * src/Makefile.in (distclean): Remove .deps. + Include @top_srcdir@/mkdep-Makefile. + + * mkdep.Makefile: New file. + * Makefile.in (DISTFILES): Add mkdep-Makefile. + * doc/Makefile.in (mostlyclean): Also remove *.info. + +Thu Oct 19 17:38:28 1995 Jim Meyering (meyering@comco.com) + + * od.c: Indent cpp directives. + + * tr.c (BEGIN_STATE): Use INT_MAX - 1 so as not to interfere + with large repeat counts. + (struct E_string): New struct. + (find_closing_delim): Take E_string arg rather than char* and length. + (find_bracketed_repeat): Likewise. + (star_digits_closebracket): New function. + (append_char_class): No longer give diagnostic. + (append_equiv_class): Likewise. + (build_spec_list): Give them here instead, allowing string1 like + [:*][:upper:] that got errors before. + Take E_string arg rather than char*. + Convert switch stmts into if-then so as to use ES_MATCH. + +Tue Oct 17 22:48:00 1995 Jim Meyering (meyering@comco.com) + + * cat.c: Protoize. Reorder functions to obviate forward dcls. + Remove forward dcls. + * expand.c: Likewise. + * fold.c: Likewise. + * head.c: Likewise. + * od.c: Likewise. + * sort.c: Likewise. + * tail.c: Likewise. + + * src/Makefile.in (OBJECTS): Reflect that all of the above + now use prototypes. + + * head.c: Add `const' attribute to dcls of lots of formals. + + * sort.c: Add `const' attribute to dcls of lots of formals. + Move struct dcls to precede dcls of file-scope variables. + (monthtab, keyhead): Separate variable dcls from type dcls. + +Fri Oct 13 20:38:39 1995 Jim Meyering (meyering@comco.com) + + * join.c (add_field_list): Allow SPACE and TAB as well as `,' as + list item separators, per POSIX spec. + (prjoin): Rewrite loop that iterates over field specs. + Handle case in which file spec is 0. + +Sun Oct 8 22:41:15 1995 Jim Meyering (meyering@comco.com) + + * strpbrk.c: New file. + * lib/Makefile.in (SOURCES): Add strpbrk.c. + Remove bcopy.c. + +Sat Oct 7 22:27:01 1995 Jim Meyering (meyering@comco.com) + + * join.c (add_field): No longer return a value. + (decode_field_spec): New function. + (add_field_list): Rewrite to be more strict. + Before, `,1.2' was accepted as valid. + (main): Use xstrtol instead atoi. + Combine nearly identical -a and -v cases. + Close input files. + +Fri Oct 6 23:10:01 1995 Jim Meyering (meyering@comco.com) + + * join.c (main): Report `too few/many non-option arguments' + then print --help output rather than just the latter. + Properly interpret obsolescent usage like `join -o 2.1 2.1 2.2'. + (usage): Describe POSIX -1, -2 options and deprecate -j* ones + + * join.c (usage): Move to precede all other functions. + + * join.c: Protoize. + +Tue Oct 3 22:44:05 1995 Jim Meyering (meyering@comco.com) + + * csplit.c, sort.c, tac.c: Test SA_INTERRUPT, not _POSIX_VERSION, + to determine whether `sigaction' functions are available. + Reported by Paul Nevai <nevai@ops.mps.ohio-state.edu>. + Fix suggested by Karl Berry. + + * md5sum.c (main): Declare counter, N_STRINGS, to be an integral + type, not `char'. + + * cut.c: Convert many declarations using `int' to use `unsigned int' + to avoid warnings from `gcc -Wall' about comparing signed and + unsigned types. + (set_fields): Use memset (not open coded loop) to initialize array. + +Thu Sep 28 23:16:05 1995 Jim Meyering (meyering@comco.com) + + * Version 1.13. + + * Makefile.in (DISTFILES): Remove README.alpha for major release. + + * od.c (decode_one_format): Remove spurious semicolon. + From John Kodis. + +Tue Sep 26 23:05:01 1995 Jim Meyering (meyering@comco.com) + + * man/Makefile.in (install-data, uninstall): Use sed not basename. + The GNU Coding Standard suggests that only a select set of + relatively standard utilities be used in Makefiles. basename is + not among them. Suggested by Ulrich Drepper. + +Sun Sep 24 08:36:47 1995 Jim Meyering (meyering@comco.com) + + * cksum.c: Protoize. + * cut.c: Protoize. + + * src/Makefile.in (OBJECTS): Reflect that cksum.c and cut.c use + prototypes. + (cksum): Depend on cksum$O. + (cut): Depend on cut$O. + +Sat Sep 23 15:43:46 1995 Jim Meyering (meyering@comco.com) + + * Version 1.12.2. + + * Makefile.in (DISTFILES): Add README.alpha. + + * lib/Makfile.in (GETOPT, MEMCHR, REGEX): New variables. + (OBJECTS): Use them instead of hard-coding object file names. + Suggested by Ulrich Drepper. + + * md5sum.c (md5_check): Distinguish between open/read failure + and checksum mismatch. + +Mon Sep 18 23:15:05 1995 Jim Meyering (meyering@comco.com) + + * md5sum.c: Protoize. + * src/Makefile.in (OBJECTS): Change md5sum.o to md5sum$O. + (join.o, md5sum$O, sort.o) Depend on ../lib/long-options.h. + (md5sum): Depend on md5sum$O. + + * md5sum.c (main, usage): Remove -h, -s, -v short options. + Rename --verbose to --warn, --quiet to --status. + (main): Handle --help and --version using parse_long_options. + (md5_check): Check ferror. + + * sort.c (tempname): Replace `16' with a more readable expansion. + Make sure that counter never exceeds 99999. + (checkfp): Rearrange loop to avoid duplicate test. + Move a couple dcls from function scope into inner block. + +Tue Aug 8 21:49:27 1995 Jim Meyering (meyering@comco.com) + + * md5sum.c (main): Fail if either --verbose or --quiet is specified + when not verifying checksums. + + * md5sum.c (md5_check): Fail if no valid line is found. + Don't use the word `fail' unless there were failures -- + instead, say `all N tests passed.' + + * md5sum.c (main) [handling --string option]: Don't output + nonstandard `b' binary flag. From Greg Troxel (gdt@bbn.com). + * md5-test.rfc: Remove now-inconsistant `b' marker. + (usage): Clarify help message. With suggestions from Greg Troxel. + +Mon Aug 7 23:27:54 1995 Jim Meyering (meyering@comco.com) + + * sort.c (mergefps) [lint]: Initialize SAVEALLOC to avoid spurious + compiler warning. From Ulrich Drepper. + + * pr.c (read_line) [lint]: Initialize CHARS to avoid spurious + compiler warning. From Ulrich Drepper. + + * Makefile.in (DISTFILES): Don't distribute unneeded COPYING.LIB. + From Franc,ois. + +Mon Aug 7 00:02:59 1995 Jim Meyering (meyering@comco.com) + + * system.h (_): Define macro -- as empty for now. + * src/*.c: Annotate localizable strings with _(...). From Franc,ois. + +Sat Aug 5 23:51:25 1995 Jim Meyering (meyering@comco.com) + + * Version 1.12.1. + + * configure.in: Add fp_C_PROTOTYPES. + +Fri Aug 4 23:21:46 1995 Jim Meyering (meyering@comco.com) + + * src/Makefile.in (DISTFILES): Include ansi2knr.c and ansi2knr.1. + Add suffixes, dependencies, and rules to convert ANSI source to K&R + when required. Mark tr.o and comm.o as the only such files (for now). + + * tr.c: Protoize. + * comm.c: Protoize. + + * Makefile.in (DISTFILES): Add aclocal.m4 and acconfig.h. + (configure): Depend on aclocal.m4. + (stamp.h.in): Depend on aclocal.m4 and acconfig.h. + +Sun Jul 30 00:01:58 1995 Jim Meyering (meyering@comco.com) + + * md5sum.c (md5_check): Use getline instead of fgets. + + * lib/Makefile.in (SOURCES): Add getline.c. + (OBJECTS): Add getline.o. + (DISTFILES): Add getline.h. + (getline.o): Depend on getline.h. + + * md5.c [memcpy]: Define to bcopy if needed. + (md5_buffer): Explicitely cast SWAP expressions to unsigned + to avoid warning. + + * lib/Makefile.in (strtoul.o): Depend on strtol.c. + + * sort.c (check): Print `disorder on...' message on standard error, + not stdout. This is a minor concession to POSIX which says + `no output shall be produced...'. + + * sort.c (main): Fix -k so it works. -k 2,3 was being treated + like -k 2. Reported by Marcus Daniels <marcus@sysc.pdx.edu>. + +Wed Jul 26 22:54:48 1995 Jim Meyering (meyering@comco.com) + + * man/Makefile.in (install, uninstall): Strip off `.1', not just `1' + before applying $(transform) to manual name. From Karl Berry. + + * md5sum.c (have_read_stdin): New global variable. + (md5_file, md5_check): Set it. + (main): Use it. + + * md5sum.c [OPENOPTS]: Depend explicitly on BINARY. + (md5_file): Take a new parameter, MD5_RESULT, and no longer + generate output. + (md5_check): Invoke md5_file instead of calling fopen directly. + When giving a diagnostic for a line with invalid format, also report + the line number. + (main): Generate output after a successful md5_file call. + [in many places]: Upon detection of an error, rather than exiting + immediately, issue a diagnostic, note that an error occurred and + exit later. + +Mon Jul 24 21:48:26 1995 Jim Meyering (meyering@comco.com) + + * tail.c (tail_bytes) [from_start]: For regular files, seek + relative to the initial input file pointer position, not + necessarily from the beginning of the file. + [!from_start]: Don't back up past the initial position of the + input file pointer. + (tail_lines): Call file_lines only if FD refers to a regular file + with its file pointer positioned at beginning of file. Otherwise, + call pipe_lines. This is a kludge. Once there's a decent test + suite, fix this properly. + Before, (echo 1; echo 2) > k; sh -c 'read x; tail' < k + would output both lines of the input file even though the first had + already been read. Reported by John Roll (john@panic.harvard.edu). + + * md5sum.c [_LIBC || STDC_HEADERS] (TOLOWER): Define to tolower. + + * csplit.c (main): When too few arguments are given, don't just + issue the usage message; also report why. + +Sat Jul 22 00:16:01 1995 Jim Meyering (meyering@comco.com) + + * md5sum.c (md5_check): New function -- extracted from main. + +Fri Jul 21 01:21:49 1995 Jim Meyering (meyering@comco.com) + + * md5sum.c (md5_file): New function -- extracted from main. + (main): Call the new function instead of doing all that in an + if-stmt. Always use "%s" format rather than raw filename as + format argument in printf-style functions like error. Otherwise, + filenames containing `%' are likely to lose. + Remove all mention of `old format'. + (split_3): No longer parse the `new format.' There is only one + valid format now: the compatible one. + + * lib/Makefile.in (SOURCES): Add md5.c. + (OBJECTS): Add md5.o. + (DISTFILES): Add md5.h. + (md5.o): Depend on md5.h. + + * system.h [!EXIT_FAILURE, !EXIT_SUCCESS]: Define them. + * lib/md5.c (md5_stream): Check for read failure and return + indication of success rather than second argument. + * lib/md5.h (md5_stream): Update prototype. + [__P]: Define macro. + * md5sum.c: Use EXIT_FAILURE and EXIT_SUCCESS. + (main): Report an error if md5_stream fails. Otherwise, running + `md5sum dir-on-mounted-filesystem' always reported the checksum + for an empty file. Now it gets the `is a directory' error. + Greg McGary (gkm@magilla.cichlid.com) reported that the released + version got stuck in an infinite loop with such arguments. + + * lib/md5.c: New file. + * lib/md5.h: New file. + * md5sum.c: Rewritten to use library interface. + From Ulrich Drepper. + +Sun Jul 16 18:42:34 1995 Jim Meyering (meyering@comco.com) + + * configure.in: Add AC_C_INLINE: md5sum.c uses inline keyword. + +Tue Jul 11 21:56:02 1995 Jim Meyering (meyering@comco.com) + + * md5sum.c Add #else block after #ifdef VMS. + (main): Rename local variable. + Detect and report failed fclose calls on stdout and checkfile_stream. + + * tr.c (unqote): Comment out unreachable break stmts. + (append_range): Declare FIRST and LAST parameters to be unsigned int, + not size_t. + (find_closing_delim): Clean up interface, separating boolean success + indicator and index. + (find_bracketed_repeat): Likewise. + (build_spec_list): Adapt to use new interfaces. + Declare CLOSING_DELIM_IDX and CLOSING_BRACKET_IDX to be of + type size_t, not int. + (main): Declare NR and CHARS_READ to be of type long, not int. + + * sort.c (main): Comment out unreachable break stmt. + + * tail.c (tail): Explicitly cast to long the N_UNITS argumennt in + call to tail_lines. Otherwise, NetBSD lost because N_UNITS (of type + off_t, a 64-bit type on NetBSD) wasn't converted to the target type, + long. Reported by Dan Hagerty (hag@gnu.ai.it.edu). + + * comm.c: Reorder functions so main is last, so no forward dcls + are needed. + +Sun Jul 9 11:41:15 1995 Jim Meyering (meyering@comco.com) + + * sort.c (main): When using obsolescent +pos -pos syntax, allow + omission of field spec only when character offset is specified. + Otherwise, -. +. would be accepted. + +Sat Jul 8 13:48:06 1995 Jim Meyering (meyering@comco.com) + + * sort.c (main): Allow field spec, M, to be omitted in +M.N or -M.N + position specification. For compatibility with existing practice + (what vendors?), omitting M is now equivalent to specifying `0' for M, + but only when using the +pos -pos syntax, not with the -k option. + From Rick Sladkey (jrs@world.std.com). + +Thu Jul 6 23:44:20 1995 Jim Meyering (meyering@comco.com) + + * od.c (dump): Correct loop-termination criterion. + Before, running `printf 1234| ./od --width=4 --read-bytes=4' + printed output for 8 bytes -- the last four were garbage. + This happened only when the dump limit, N, was specified (with + --read-bytes=N) and N was a multiple of bytes_per_block + (usually 16, but 4 in this example). From Andreas Schwab. + +Sun Jul 2 22:12:40 1995 Jim Meyering (meyering@comco.com) + + * lib/Makefile.in (check): Depend on libtu.a. + + * md5sum.c (split_3): Rewrite to parse Plumb/Lankester format as well. + (main): Print each sum line in (de facto) standard Plumb/Lankester + format. + New option: --quiet. + Check option no longer takes an argument. + When checking, exit status reflects success. + +Sat Jun 24 16:18:01 1995 Jim Meyering (meyering@comco.com) + + * md5sum.c [__GNUC__]: Don't conditionalize use of "inline". + Autoconf (via config.h) defines it away for compilers that don't + grok it. + + * cat.c, comm.c, join.c, sort.c, uniq.c: Undefine min/max before + defining to avoid redefinition warning on some systems. + + * csplit.c (read_input): Rename paramater MAX to MAX_N_BYTES. + This avoids potential conflict with max macro from some system's + header files when using bad pre-ANSI compilers. + + * uniq.c (usage): Fix typo in text of --help output. + From Steve McConnel <steve@acadcomp.sil.org> + + * md5sum.c [uint32]: When testing for 32-bit arithmetic type, + also check `unsigned long', as a concession to systems with + int's smaller than 32 bits. + + * configure.in (AC_REPLACE_FUNCS): Remove memcmp (again!) since + AC_FUNC_MEMCMP already handles it. This avoids warnings from + ranlib on nextstep systems. From Kaveh Ghazi. + + * csplit.c (interrupt_handler): Declare to have a single integer + parameter. Otherwise, some compilers fail with a type mismatch + error in sa_handler assignment. + + * fmt.c [word]: Redefine. Otherwise, systems (Unicos for one) with + headers that typedef `word' get syntax errors because of the + variable by the same name. + + * join.c [join]: Redefine to avoid conflict with prototype in some + system header file. Also for Unicos. + + * md5sum.c (main): Remove spurious colon in getopt spec string. + From Ken Pizzini <kenp@spry.com>. + +Tue Jun 20 06:59:16 1995 Jim Meyering (meyering@comco.com) + + * md5sum.c (md5_file): Initialize two elements of LEN portably, + rather than with ANSI aggregate initialization. Reported by + Edzer Pebesma <Edzer.Pebesma@rivm.nl>. + +Sun Jun 18 09:15:57 1995 Jim Meyering (meyering@comco.com) + + * Version 1.12. + + * md5sum.c (process_buffer): Copy values from struct into + individual local variables before performing computation on them, + then copy results back into returned struct. Solely for better + optimization by compilers that can't keep struct members in + registers. From Ulrich Drepper. + +Thu Jun 15 22:09:14 1995 Jim Meyering (meyering@comco.com) + + * md5sum.c: Remove unnecessary uses of `defined' in #if* tests. + Don't use #elif. Some older compilers don't grok it. + (split_3): New function to parse out sum, flag, and filename + when reading check file. + (hex_digits): Remove length parameter since string parameter is + now nul-terminated. + (main): Don't allocate separate arrays for filename and sum + when checking. Get pointers into line buffer with split_3 instead + of using sscanf. + (main): Treat `no file args' just like `-' when not checking + or using strings. + (hex_digits): Unprotoize. + + * md5sum.c (main): Don't use a separate loop to convert to lower + case. Suggested by Ulrich Drepper. + (CLOSE): New macro. + (md5_file): Use it. + From Ulrich Drepper. + + * md5sum.c: Don't include values.h. + [__P]: Undefine it. + + * md5sum.c: [UNIX || unix]: Also test __UNIX__, __unix__, + and _POSIX_VERSION. Reported by Arne H. Juul. + +Tue Jun 13 21:20:10 1995 Jim Meyering (meyering@comco.com) + + * tr.c [NDEBUG]: Define it to disable assertions. Some systems + have a broken <assert.h> header. + (is_char_class_member): Set a variable in each branch of switch + stmt and return that value after the switch (rather than returning + directly from every branch). + (unquote): More int->size_t changes. + (build_spec_list): More int->size_t changes. + Be very careful about comparison now that variables are unsigned: + Use i + 2 < len rather than i < len - 2. The latter didn't work + for len < 2. Caught early thanks to a thorough regression test + suite. + +Mon Jun 12 23:07:59 1995 Jim Meyering (meyering@comco.com) + + * sort.c (xfclose): Don't try to flush stdin, only stdout. + Otherwise, at least Ultrix-4.3's fflush would return EOF. + Reported by Jim Blandy (jimb@cyclic.com). + + * tr.c (non_neg_strtol): Don't compare signed and unsigned. + [struct Spec_list] (indefinite_repeat_element): New member. + Use size_t rather than int or unsigned long where reasonable. + (get_spec_status): Make interface cleaner. + (get_s1_spec_status): New function. + (get_s2_spec_status): New function. + (validate): Use new functions instead of get_spec_status. + +Sun Jun 11 00:39:50 1995 Jim Meyering (meyering@comco.com) + + * md5sum.c: New file. From Ulrich Drepper. + * md5-test.rfc: New file. + * Makefile.in (PROGS): Add md5sum. + (check): Run a recursive make in each subdirectory. + * man/Makefile.in (MANFILES): Add md5sum.1. + * src/Makefile.in (SOURCES): Add md5sum.c. + (OBJECTS): Add md5sum.o. + (PROGS): Add md5sum. + (check): Add basic checks for md5sum. + (md5sum): Add dependency and link rule. + (DISTFILES): Add md5-test.rfc. + + * tr.c (look_up_char_class, append_char_class, append_equiv_class): + Use const attribute when appropriate. + +Sun May 28 14:48:58 1995 Jim Meyering (meyering@comco.com) + + * join.c: Overhauled to make -a1 and -a2 options work. + Passed all tests in a fairly thorough test suite. + Reported by Michael Hasselberg (mikelh@zonta.ping.de). + +Sat May 27 00:35:47 1995 Jim Meyering (meyering@comco.com) + + * tail.c (main): Remove dcl of and statements that set now-unused + variable. + + * system.h [!STDC_HEADERS && HAVE_MEMORY_H]: Include memory.h. + Without this, SunOS doesn't get type for memchr. + Reported by Kaveh Ghazi. + +Thu May 25 00:06:50 1995 Jim Meyering (meyering@comco.com) + + * tail.c (tail_lines): Change one more `long' to `off_t'. + Otherwise, tail didn't work on NetBSD. From Arne H. Juul. + + * csplit.c [struct control]: Change type of `repeat' to unsigned + long to avoid conversion warning. + +Sun May 21 07:50:00 1995 Jim Meyering (meyering@comco.com) + + * Makefile.in (.PHONY): TAGS is not a phony target. From Franc,ois. + + * xstrtol.c (__strtol): Remove prototype altogether. + Move inclusion of xstrtol.h back so that it follows system headers. + + * Version 1.11.2. + +Sat May 20 06:44:14 1995 Jim Meyering (meyering@comco.com) + + * join.c (ADD_FIELD): Declare in K&R style, not ANSI. + From Kaveh Ghazi. + + * xstrtol.c: Define NDEBUG for systems with losing assert.h. + (__strtol): Add __unsigned to prototype and use __P. + Move inclusion of xstrtol.h to precede prototype. + From Kaveh Ghazi. + + * memmove.c: Include config.h for definition of const. + From Kaveh Ghazi. + + * All Makefile.in (install-exec, install-exec): New targets. + From Karl Berry. + + * tr.c (look_up_char_class): Take a string length argument -- required + because the argument is a string that is *not* NUL-terminated. + Use strncmp, not strcmp and add string lengths comparison. + (append_char_class): Update caller. Before this change, + tr '[:upper:]' '[:lower:]' read one uninitialized byte. + From Andreas Schwab. + + * split.c (next_file_name): Move dcls of file-scope variables into + this function. Don't rely on arithmetic being two's complement. + + * paste.c [CLOSED, ENDLIST]: Don't cast constants to FILE pointers. + Instead, declare two FILE structs and use their addresses. + + * csplit.c (record_line_starts): Remove set-but-not-used, + file-scope variable. + +Sat May 13 08:57:20 1995 Jim Meyering (meyering@comco.com) + + * all source files (usage): Include one- or two-line synopsis + in --help output. From Karl Berry. + + * lib/Makefile.in [.c.o]: Remove -I. since safe-l?stat.h are no + longer used. + +Wed May 10 22:26:35 1995 Jim Meyering (meyering@comco.com) + + * Version 1.11.1 + +Sun May 7 13:35:49 1995 Jim Meyering (meyering@comco.com) + + * all Makefile.in (maintainer-clean): Renamed from realclean + per GNU Standards. + +Thu May 4 23:15:58 1995 Jim Meyering (meyering@comco.com) + + * sort.c (main): Use stat, not safe_stat. The latter was unnecessary. + Don't include safe-stat.h. + + * lib/Makefile.in (DISTFILES): Remove safe-xstat.hin. + Remove all associated rules. safe-l?stat.h are no longer used. + + * sort.c Don't hard-code /tmp. + [DEFAULT_TMPDIR]: Use this instead. + * tac.c (save_stdin): Likewise. + + * sort.c (set_ordering): Properly parse arguments like `+x.yn'. + Reported by John Salmon (johns@mullet.anu.edu.au). + Patch from Mike Haertel. + +Wed Apr 26 23:48:13 1995 Jim Meyering (meyering@comco.com) + + * sort.c (tempname): AND-off high bits of pid so that its decimal + string representation is no longer than five digits. + From Hans Verkuil (hans@wyst.hobby.nl). + +Thu Apr 20 23:09:33 1995 Jim Meyering (meyering@comco.com) + + * expand.c (add_tabstop): Give correct size when reallocating + tab_list buffer. From Geoff Odhner (geoff@franklin.com). + Reproduce with expand --t=`perl -e "print join (',', (1..300));"`. + +Tue Apr 18 22:57:43 1995 Jim Meyering (meyering@comco.com) + + * configure.in (AC_OUTPUT): Use echo, not date, to avoid creating + unnecessary conflicts for people using version control software + like RCS and CVS. + (AC_ARG_PROGRAM): Use it. + +Thu Apr 13 23:22:57 1995 Jim Meyering (meyering@comco.com) + + * head.c: Remove block of redundant comments describing options. + (usage): Remove reference to -l option. It's not valid. + + * od.c (write_block): Declare index I as unsigned int, not int. + (get_lcm): Likewise. + (dump_strings): Likewise. + (main): Likewise. + (dump): Cast BYTES_PER_BLOCK to off_t in MIN expression. + (dump_strings): Declare bufsize to be of type size_t, not int. + + * split.c (next_file_name): Don't reuse X as an index. + Declare new variable I instead. + +Sat Mar 25 15:07:23 1995 Jim Meyering (meyering@comco.com) + + * csplit.c: Declare as `unsigned int' all variables that were + just `unsigned'. + (make_filename): Change type of arg to unsigned int. + (split_file): Change type of indices to unsigned int. + +Thu Mar 16 22:05:05 1995 Jim Meyering (meyering@comco.com) + + * od.c (main): Detect and fail when argument to -N is too large + to fit in an off_t. + +Sun Mar 12 12:02:39 1995 Jim Meyering (meyering@comco.com) + + * configure.in (AC_REPLACE_FUNCS): Add memcmp.c. + Remove check for sizeof long. + + * linebuffer.h: Undefine __P before defining it. + * long-options.h: Likewise. + * xstrtol.h: Likewise. + + * memcpy.c: New file. + * lib/Makefile.in (SOURCES): Add memcpy.c. + +Fri Mar 10 21:14:11 1995 Jim Meyering (meyering@comco.com) + + * src/*.c: Update Copyright dates. + +Sat Feb 11 07:31:08 1995 Jim Meyering (meyering@comco.com) + + * system.h: Remove index/rindex and bcmp/bcopy/bzero references. + Separate errno declaration from STDC_HEADERS. + + * wc.c (wc): For efficiency, handle separately the cases in which + words need not be counted. Suggested by Karl Heuer. + + * wc.c (wc): Don't overcount the number of bytes when reading + from a regular file on stdin with file pointer not at BOF. + From Karl Heuer <karl@gnu.ai.mit.edu>. Before, the command + `(dd ibs=99k skip=1; wc -c) < /etc/group' made wc wrongly output + the size of the file. Now it outputs `0'. + +Sat Jan 28 07:07:23 1995 Jim Meyering (meyering@comco.com) + + * cat.c (cat): Use memmove rather than bcopy. + * csplit.c (load_buffer): Use memcpy rather than bcopy. + (extract_regexp): Use strrchr, not rindex. + * fmt.c (isopen, isclose, isperiod): Use strchr, not index. + (flush_paragraph): Use memmove instead of bcopy. + * fold.c (fold_file): Use memmove instead of bcopy. + * od.c (decode_format_string): Use memmove instead of bcopy. + [EQUAL_BLOCKS]: Use memcmp, not bcmp. + (parse_old_offset): Use strchr, not index. + (dump): Use memset, not bzero. + * sort.c (checkfp, mergefps): Use memcpy instead of bcopy. + (fillbuf): Use memmove instead of bcopy. + * split.c (main): Use memset, not bzero. + (line_bytes_split): Use memmove instead of bcopy. + * tac.c (tac): Use memmove instead of bcopy. + (output): Use memcpy instead of bcopy. + * tail.c (pipe_lines, pipe_bytes): Use memcpy instead of bcopy. + * tr.c (substr): Use memcpy instead of bcopy. + (card_of_complement, set_initialize): Use memset, not bzero. + + * tr.c (substr): Don't allocate a byte for trailing NUL in result + since the result needn't be NUL-terminated. Don't NUL terminate it. + + * configure.in (AC_REPLACE_FUNCS): Check for memmove and memcpy, + not bcopy. + (AC_CHECK_FUNCS): Add strchr and strrchr. + + * lib/Makefile.in (SOURCES): Add memmove.c and memcpy.c. + * memmove.c: New file. + * memcpy.c: New file. + +Tue Jan 24 22:18:19 1995 Jim Meyering (meyering@comco.com) + + * fmt.c (copy_rest): Replace `||' with `&&'. Before, a paragraph + not followed by a newline would be followed by data copied from + uninitialized storage. Repeat by `printf abc|fmt|od -ac'. + Reported by Franc,ois Pinard. + + * od.c: Rename macros with FP_ prefix. Use FLOAT_ instead. + AIX-2.2.1 declares a typedef, FP_DOUBLE, that conflicted. + Be careful to use off_t instead of explicit `unsigned long'. + Otherwise, systems like 4.4BSD lose on calls to fseek that + expect off_t (which is long long on that system). + (parse_old_offset): Use xstrtoul + (main): Likewise. + + * src/Makefile.in (od.o, tail.o): Depend on ../lib/strtol.h. + +Mon Dec 19 22:13:55 1994 Jim Meyering (meyering@comco.com) + + * tail.c (numerous functions): Give char* filename arguments the + const attribute. + + * lib/Makefile.in (SOURCES): Remove xwrite.c. It was no longer used. + Add xstrtol.c and xstrtoul.c. + (OBJECTS): Likewise for .o files. + (DISTFILES): Add error.h and xstrtol.h and xstrtoul.h. + + * lib/Makefile.in (DISTFILES): Remove safe-xstat.cin. + (distclean): Remove references to safe-l?stat.c. + Remove all related rules and dependencies. + + * src/Makefile.in: $(OBJECTS): Depend on ../lib/error.h. + +Thu Dec 15 23:14:04 1994 Jim Meyering (meyering@comco.com) + + * tail.c (tail_file): Fix call to error with %s in format, but + no corresponding argument. + + * src/*.c: Include "error.h" instead of simply declaring + `void error ();'. + * od.c (main): Use %lu, not %d for unsigned long. + (my_strtoul, uint_fatal_error): Remove functions. Use xstrtoul + and STRTOL_FATAL_ERROR instead. + +Sun Dec 11 17:24:09 1994 Jim Meyering (meyering@comco.com) + + * sort.c (main): Fix interpretation of field offsets when specified + via -k option. They were being interpreted as zero-indexed. POSIX + says they are 1-based indices. From Rik Faith <faith@cs.unc.edu>. + (keycompare): Don't ignore characters at the end of words when + otherwise they would compare equal. From Rik Faith. + + * tail.c (<most functions>): Change the type of n_units/n_lines/n_bytes + to off_t because n_bytes is used as the option to fseek and off_t may + be long long (e.g. on BSD4.4). The only place where a 32-bit limit is + imposed is in the string-to-integer converstion of xstrtol. + (main): Use xstrtol instead of manual string to integer conversion. + + * csplit.c (get_format_width, get_format_prec): Use ISDIGIT instead of + comparisons against '0' and '9'. + + * tr.c [!ULONGMAX]: Define it. + [!LONGMAX]: Define in terms of ULONGMAX instead of as a 32-bit constant. + + * full-write.c: Declare (or not) errno based on definedness or + errno, not STDC_HEADERS. + * safe-read.c: Likewise. + * xwrite.c: Likewise. + +Thu Nov 17 06:37:33 1994 Jim Meyering (meyering@comco.com) + + * tail.c (dump_remainder): Flush standard output just before + sleeping so that `tail -f' will output partial lines sooner. + This applies only when following the end of a single file. + From Leonard N. Zubkoff <lnz@dandelion.com>. + + * tail.c (file_lines, pipe_lines, pipe_bytes, start_bytes, + start_lines, dump_remainder): Use STDOUT_FILENO instead of `1' in + XWRITE calls. + * tac.c (output): Use STDOUT_FILENO instead of `1' in xwrite call. + * system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Define if + not already defined. + +Wed Nov 16 07:01:38 1994 Jim Meyering (meyering@comco.com) + + * tr.c: Include <getopt.h> instead of "getopt.h". + + * sort.c (tempname): Merge two very similar sprintf stmts into one. + + * tail.c: Use BUFSIZ instead of BUFSIZE. + + * cut.c: Declare DELIM to be `int' rather than unsigned char. + + * fmt.c: Use index, not strchr -- per GNU Standards. + Reported by Kaveh Ghazi. + Always include <config.h>. + (main): Include program name in --version output. + +Sun Nov 06 00:17:21 1994 Jim Meyering (meyering@comco.com) + + * Version 1.11. + +Sat Nov 05 15:14:44 1994 Jim Meyering (meyering@comco.com) + + * memcmp.c, srtoul.c: Use up-to-date versions. + Reported by Franc,ois Pinard. + + * src/Makefile.in (DEFS): Remove -Dlint... again. + + * src/Makefile.in (PROGS): Add fmt! + Reported by Andreas Stolcke (stolcke@ICSI.Berkeley.EDU). + +Fri Nov 04 17:26:16 1994 Jim Meyering (meyering@comco.com) + + * Version 1.10. + +Thu Nov 03 23:23:08 1994 Jim Meyering (meyering@comco.com) + + * linebuffer.h: Use __P instead of _P since the latter conflicts + with a definition in some <ctype.h>. From Kaveh Ghazi. + +Wed Nov 02 17:36:34 1994 Jim Meyering (meyering@comco.com) + + * tr.c: Add const attribute where appropriate. + + * tail.c (BUFSIZ): Use definition from <stdio.h>. + +Tue Nov 01 23:54:09 1994 Jim Meyering (meyering@comco.com) + + * tail.c (XWRITE): Allow n_bytes == 0 but call fwrite only if + n_bytes is positive. Turn off assertions. `tail /dev/null' was + getting a failed assertion. Reported by Doug McLaren + (dougmc@comco.com). + + * cut.c (cut_bytes): Print at least a newline for every line of input. + (cut_fields): Print a newline even for lines whose only selected + field is empty. But print nothing when using -s without -f1. + And print nothing for empty input. Reported by + Richard_Sharman@software.mitel.com. + +Tue Nov 01 06:05:23 1994 Jim Meyering (meyering@comco.com) + + * fmt.c: Change #ifdef __STDC__ to #if defined (__STDC__) && __STDC__. + * linebuffer.h: Likewise. + +Mon Oct 31 06:53:32 1994 Jim Meyering (meyering@comco.com) + + * configure.in (AC_REPLACE_FUNCS): Remove memcmp since AC_FUNC_MEMCMP + already handles it. From Kaveh Ghazi. + + * {lib,src}/Makefile.in (DEFS): Don't use -Dlint. Some systems + get failures when it's defined. From Kaveh Ghazi. + + * cat.c (cat): Conditionalize test for errno == ENOSYS. It's not + defined on some Next and Alliant systems. From Kaveh Ghazi. + + * sort.c join.c (main): Include version.h and call parse_long_options + with the proper number of arguments. Reported by Franc,ois Pinard. + +Sun Oct 30 01:30:41 1994 Jim Meyering (meyering@comco.com) + + * (configure.in): Add AC_OFF_T and rearrange by type along the + same lines as autoscan. + + * fmt.c, fmt.1: New files. + Both from Ross Paterson (rap@doc.ic.ac.uk). + + * Makefile.in (PROGS): Add fmt. + * src/Makefile.in (SOURCES, OBJECTS): Add fmt.c and fmt.o respectively. + (fmt): Add a link rule. + * man/Makefile.in (MANFILES): Add fmt.1. + +Sat Oct 08 10:44:30 1994 Jim Meyering (meyering@comco.com) + + * Makefile.in (All of them): Update from the ones in sh-utils. + From now on, rules and definitions that are comon to the fileutils, + textutils, and sh-utils will get ChangeLog entries only in the + sh-utils. + +Tue Oct 04 20:42:46 1994 Jim Meyering (meyering@comco.com) + + * od.c (my_strtoul): Set errno to zero before calling strtoul. + Otherwise, od can fail complaining about a valid integer argument. + From Andreas Schwab. + +Sun Oct 02 17:57:09 1994 Jim Meyering (meyering@comco.com) + + * tr.c (main): Give an error and fail when squeezing repeats + and no non-options are given. Reported by Tony Robinson + (ajr@eng.cam.ac.uk). + + * sort.c (main): Temporarily copy each input file that might be + another name for the output file. When in doubt (e.g. a pipe), + copy. This allows the dangerous (historical -- in cnews) idiom + `cat file | sort -o file' to work properly. Don't rely on this + behavior in new shell scripts. From Paul Eggert (eggert@twinsun.com). + +Mon Sep 26 18:01:47 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * lib/xwrite.c safe-read.c memchr.c linebuffer.c full-write.c: + Remove CONFIG_BROKETS ifdef. + * src/Makefile.in lib/Makefile.in: Don't define it. + +Sat Sep 24 21:26:27 1994 Jim Meyering (meyering@comco.com) + + * full-write.c (full_write): Declare argument LEN to be size_t. + +Mon Sep 12 13:35:27 1994 Jim Meyering (meyering@comco.com) + + * tail.c (tail_file): [For multiple files only]: Report truncation + of monitored file and reset current file size. From Franc,ois Pinard. + +Sat Aug 27 16:57:20 1994 Jim Meyering (meyering@comco.com) + + * system.h [BROKEN_STAT_MACROS]: Remove unnecessary #ifdef's. + From Franc,ois Pinard. + +Tue Jul 26 11:33:53 1994 Jim Meyering (meyering@comco.com) + + * system.h: Remove `|| defined(_POSIX_VERSION)' from test that + decides whether to include <fcntl.h>. From Francois Pinard. + +Wed Jul 13 12:33:34 1994 Jim Meyering (meyering@comco.com) + + * tr.c (substr): Fix off-by-one allocation error. + +Wed Jun 22 01:02:50 1994 Jim Meyering (meyering@comco.com) + + * tac.c (tac_file): Use O_RDONLY instead of zero in call to open. + (tac): Fix typo that had `1' as arg #2 of error after failed read. + Use errno instead. From Michael I Bushnell <mib@gnu.ai.mit.edu>. + +Thu May 26 08:46:32 1994 Jim Meyering (meyering@comco.com) + + * configure.in [INSTALL]: Revert change of March 25. autoconf + has been fixed. + +Mon Apr 11 17:25:43 1994 Jim Meyering (meyering@comco.com) + + * join.c (prline): Remove unused function. Indent. + +Fri May 6 05:44:24 1994 Jim Meyering (meyering@comco.com) + + * tail.c (tail_forever): Don't print headers when asked not to. + From Karsten Thygesen <karthy@kom.auc.dk>. + + * wc.c (wc): Optimize for the case when only bytes are being counted + and the input is not a regular file. From Jeff Moore <jbm@mordor.com>. + +Sun Apr 24 10:54:08 1994 Jim Meyering (meyering@comco.com) + + * configure.in [AC_SIZEOF_TYPE]: Update for autoconf-1.9. + * memchr.c: Test SIZEOF_LONG instead of LONG_64_BITS. + +Mon Apr 11 17:55:52 1994 Jim Meyering (meyering@comco.com) + + * csplit.c (struct control): Add new field, repeat_forever. + Remove now-unneeded definition of INT_MAX. + (process_regexp): Test repeat_forever instead of comparing `repeat' + to INT_MAX. + (split_file): Don't even reference `repeat' count if repeat_forever + is set. + (new_control_record): Initialize repeat_forever field. + (parse_repeat_count): Set it instead of setting repeat count to + INT_MAX. + (process_line_count): Abort for internal error instead of calling + handle_line_error. + + * long-options.c (parse_long_options): Take a new argument indicating + the utility name (e.g. "join", not "gjoin") for version output. + Print both the utility and the package names, e.g. `join - GNU + textutils-1.9.1' instead of just the package name. + + * join.c (main): Call parse_long_options with program name arg. + * sort.c (main): Ditto. + + * All source except sort.c and join.c (main): Change --version output + to include utility name as well as package name and version info. + +Wed Mar 30 08:53:21 1994 Jim Meyering (meyering@comco.com) + + * configure.in: Use AC_SET_MAKE. + * Makefile.in: Edit MAKE assignments into @SET_MAKE@. + +Mon Mar 28 09:55:05 1994 Jim Meyering (meyering@comco.com) + + * tr.c (main): In addition to the --help usage pointer, give an + explicit error message for too many arguments. + +Fri Mar 25 18:11:19 1994 Jim Meyering (meyering@comco.com) + + * configure.in: Use AC_VERBOSE, AC_CHECKING, and AC_WARN instead + of explicit echo commands. + [INSTALL]: When AC_PROG_INSTALL resorts to setting this to + `./install.sh', make it `../install.sh' instead since that + script will be invoked only from subdirectories. + [AC_SIZEOF_TYPE]: Use this instead of deprecated AC_LONG_64_BITS. + + * cat.c (cat): The command `:|cat -s' failed on Irix5 because + ioctl (d, FIONREAD,... now returns ENOSYS for pipes -- under Irix4 + it returned EINVAL. Detect this. + (main) [lint]: Initialize variables to suppress `used before + initialized' warnings. + + * csplit.c: Change long option name from --suffix to --suffix-format. + + * od.c (skip): Correct a comment. + (main): Don't output anything to stdout if the sole input file + doesn't exist. Reported by Bauke Jan Douma <bjd@dds.hacktic.nl>. + + * od.c (dump) [lint]: Initialize a variable to suppress `used before + initialized' warning. + (main) [lint]: Ditto. + * paste.c (paste_parallel) [lint]: Ditto. + +Fri Jan 28 11:02:21 1994 Jim Meyering (meyering@comco.com) + + * configure.in: Don't set LDFLAGS since linking now uses both + LDFLAGS and CFLAGS. + +Wed Jan 18 16:14:00 1994 Jim Meyering (meyering@comco.com) + + * unexpand.c (unexpand): Don't segfault when given a name of a + nonexistent file. + * expand.c (expand): Ditto. + Both from Bauke Jan Douma <bjd@dds.hacktic.nl>. + +Thu Jan 13 17:27:38 1994 Jim Meyering (meyering@comco.com) + + * src/Makefile.in: Change all link commands to use both $(CFLAGS) + and $(LDFLAGS). + + * csplit.c (load_buffer): Rather than incrementing buffer size, + double it each time we fail to find a newline. Otherwise, csplit + would run out of memory when processing files with very long lines. + +Mon Jan 10 01:20:38 1994 Jim Meyering (meyering@comco.com) + + * man/Makefile.in (manprefix): Use binprefix as the default. + +Sat Jan 08 22:22:45 1994 Jim Meyering (meyering@comco.com) + + * cat.c: Use full_write and safe_read instead of write and read resp. + * csplit.c: Ditto. + * head.c: Ditto. + * split.c: Ditto. + * tac.c: Ditto. + + * sum.c: Use safe_read instead of read. + * tr.c: Ditto. + * wc.c: Ditto. + + * tail.c: Replace calls to xwrite with calls to fwrite. + Use fopen/fclose instead of open/close. + (write_header): Use a single call to printf instead of four to xwrite. + Use safe_read instead of read. + * head.c: Ditto. + +Tue Dec 28 15:49:32 1993 Jim Meyering (meyering@comco.com) + + * install.sh: New file. + Makefile.in [DISTFILES]: Add it. + +Wed Dec 22 18:52:44 1993 Jim Meyering (meyering@comco.com) + + * memcmp.c: Use the latest version from the GNU C library. + + * cut.c [ADD_RANGE_PAIR]: New macro. + (set_fields): Collect the list of all selected ranges before + allocating and initializing the boolean lookup table. + (cut_bytes, cut_fields): Complete rewrite. Avoid copying + into buffer whenever possible. Properly handle input without + trailing newline. + (getstr): New function. Copied from getline.c, but with minor changes. + + * sort.c (main): Properly handle -Tdir. + Before, `sort -T/var/tmp' gave `sort: unrecognized option `-v''. + Reported by Kristoffer Rose (kris@diku.dk). + + * cut.c (main): Give separate errors for `-s without -f' + and `-d without -f'. + (main): Now -d '' means `use the NUL byte as the delimiter'. + Before, it got an error. + +Mon Dec 20 23:29:30 1993 Jim Meyering (meyering@comco.com) + + * configure.in [test for 8-bit clean memcmp]: Add a test to detect + losing memcmp from SunOS4.1.x. From Robert H. de Vries + <robert@and.nl>. + +Sat Dec 18 01:12:24 1993 Jim Meyering (meyering@comco.com) + + * configure.in (AC_OUTPUT): Put `touch stamp-config' in second arg + so it goes in config.status. This eliminates unnecessary second run + of configure. + +Thu Dec 02 23:53:03 1993 Jim Meyering (meyering@comco.com) + + * configure.in (AC_HAVE_FUNCS): Add isascii. + * system.h [!defined (isascii) || defined (STDC_HEADERS)]: This failed + on AIX PS/2 1.3 systems because isascii is a function and it is used + in definitions (with the necessary side effect of assigning to a + global variable) of the is* macros. Also test HAVE_ISASCII and + redefine ISASCII(c) instead of isascii. + Reported by Minh Tran-Le (tranle@intellicorp.com). + +Fri Nov 19 22:41:48 1993 Jim Meyering (meyering@comco.com) + + * configure.in: Don't run the test for 8-bit clean memcmp if we + already know we'll be using our replacement. + +Fri Nov 12 00:44:49 1993 Jim Meyering (meyering@comco.com) + + * Version 1.9.1. + + * tac.c (usage): Fix typo in long usage. + * sort.c (usage): Likewise. + From Philippe.Schnoebelen@imag.fr. + + * cut.c [FATAL_ERROR]: New macro. + (main): Call both error and usage (2) through FATAL_ERROR in + many places. Before, only `error (2...' was called. + (invalid_list): Removed. This function is subsumed by FATAL_ERROR. + + * cut.c (cut_fields): Properly handle input lacking a terminating + newline. Before, the command `printf "a\tb" |cut -f 1' generated + no output. + +Tue Nov 09 17:26:25 1993 Jim Meyering (meyering@comco.com) + + od.c (usage): Change --backward-compatible to --traditional in + the long usage message. + +Sun Nov 07 00:50:05 1993 Jim Meyering (meyering@comco.com) + + * Version 1.9. + +Sat Nov 06 22:51:31 1993 Jim Meyering (meyering@comco.com) + + * cut.c (cut_fields): Revert July 27 change. Instead, strip off + trailing delimiter unless given a range of fields like `3-' that + extends to end of line. + (set_fields): Moved local `eol_range_start' to file-scope. + Reported by Arne H. Juul (arnej@solan.unit.no). + +Tue Nov 02 00:53:41 1993 Jim Meyering (meyering@comco.com) + + * fold.c (fold_file): Don't get stuck in an endless loop when + width is smaller than 8 and there are TABs in the input. + +Sat Oct 30 15:31:28 1993 Jim Meyering (meyering@comco.com) + + * join.c: Remove now-unused dcls of show_help and show_version. + +Fri Oct 29 13:58:50 1993 Jim Meyering (meyering@comco.com) + + * csplit.c [INT_MAX]: Make sure it's defined. + [not HAVE_LIMITS_H]: Don't include limits.h. + From Kaveh R. Ghazi (ghazi@noc.rutgers.edu). + +Wed Oct 27 01:13:52 1993 Jim Meyering (meyering@comco.com) + + * Version 1.8.1. + +Mon Oct 25 20:16:33 1993 Jim Meyering (meyering@comco.com) + + * sort.c: Accept but ignore -y0 for compatibility with Solaris 2. + From Chuck Hedrick (hedrick@klinzhai.rutgers.edu). + + * sort.c (main): Handle --help and --version options. + * Makefile.in (sort.o): Depend on long-options.h. + +Sun Oct 24 00:31:02 1993 Jim Meyering (meyering@comco.com) + + * csplit.c, cut.c, expand.c, fold.c, head.c, nl.c, od.c, paste.c, + split.c, tac.c, tail.c, unexpand.c, uniq.c: Use the preferred + `--longopt=arg' syntax in --help message rather than `--longopt arg'. + From Francois Pinard. + + * tail.c: Don't include <signal.h>. It hasn't been necessary + since the Dec 12, 1992 change. + + * join.c (main): Accept `-v 1' again. Adding the --version + long option had broken it, although -v1 still worked. Call + parse_long_options instead of adding "help" and "version" + to join's longopt strct. + * Makefile.in [SOURCES, OBJECTS, DISTFILES]: Add long-options.c + and long-options.h. + * (join): Depend on and link with long-options.o. + * (join.o): Depend on long-options.h. + + * od.c: Change --compatible (-C) to --backward-compatible (-B). + + * csplit.c: Change --abandon-null-files to --elide-empty-files. + +Sat Oct 23 01:00:12 1993 Jim Meyering (meyering@comco.com) + + * tr.c (get_next, string2_extend): Add default: label to switch stmt. + + * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c, + join.c, nl.c, od.c, paste.c, pr.c, split.c, sum.c, tac.c, tail.c, + tr.c, unexpand.c, uniq.c, wc.c (usage): Add long --help. + Exit successfully for --help, non-zero for usage error. + From Francois Pinard. + + * configure.in: Add AC_STAT_MACROS_BROKEN. + * system.h [AC_STAT_MACROS_BROKEN]: Test it. + +Fri Oct 22 23:26:17 1993 Jim Meyering (meyering@comco.com) + + * linebuffer.c, memchr.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include + <config.h> or "config.h". + * cat.c, cksum.c, comm.c, csplit.c, cut.c, expand.c, fold.c, head.c, + join.c, nl.c, od.c, paste.c, pr.c, sort.c, split.c, sum.c, tac.c, + tail.c, tr.c, unexpand.c, uniq.c, version.c, wc.c: Ditto. + + * configure.in: Use AC_CONFIG_HEADER. + * Makefile.in [DIST]: Add config.h.in. + + * Makefile.in: Convert so make may be run from subdirectories. + Add dependencies on config.h. + * src/Makefile.in: Ditto. + * lib/Makefile.in: Ditto. + * man/Makefile.in: Ditto. + +Wed Oct 20 20:05:48 1993 Jim Meyering (meyering@comco.com) + + * memchr.c (memchr): Do the 32-bit assignment only if !LONG_64_BITS. + In the 64-bit assignment, be careful to cast the shift operand to + long. + Abort if sizeof (unsigned long) > 8. + +Tue Oct 19 22:37:58 1993 Jim Meyering (meyering@comco.com) + + * csplit.c: Allow repeat counts to be specified via `{*}'. + New option --suffix=format. Supercedes --digits option. + New option --abandon-null-files. + From Ronald F. Guilmette (rfg@netcom.com). + + * csplit.1: Updated. + From Ronald F. Guilmette. + + * csplit.c: Remove register keyword (replace with `int' in two cases). + + * csplit.c: [MAX]: Macro renamed from max and moved to top of file. + (bytes_to_octal_digits): New static array. + (get_format_flags): Combine '+' and ' ' cases of switch stmt. + Return count if for loop terminates. + (get_format_width): Use `bytes_to_octal_digits' instead of just 11. + (get_format_prec): Make sure is_negative is defined before used. + (get_format_conv_type): Give a different error message if there + is no conversion specifier. + Test ISPRINT (ch) instead of `ch < '~' && ch > ' ''. + (max_out): Use `%%' rather than `%' in format string. + +Sat Oct 16 10:45:17 1993 Jim Meyering (meyering@comco.com) + + * pr.c (main): When argc == 1, don't try to xmalloc (0). + +Tue Oct 12 00:53:26 1993 Jim Meyering (meyering@comco.com) + + * xwrite.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h> + or "config.h". + +Sat Oct 09 23:37:43 1993 Jim Meyering (meyering@comco.com) + + * configure.in: Remove AC_UNISTD_H; add unistd.h to AC_HAVE_HEADERS. + +Thu Sep 9 21:52:10 1993 Jim Meyering (meyering@comco.com) + + * src/*.c: Print version on standard output, not stderr. + + * configure.in: Add AC_LONG_64_BITS. + * memchr.c: Use #ifdef LONG_64_BITS instead of + `if (sizeof(longword) > 4)'. + +Tue Jul 27 22:19:39 1993 Jim Meyering (meyering@comco.com) + + * cat.c (cat): Don't fail just because ioctl (d, FIONREAD,... can't + always handle devices. Ignore errno == EINVAL and errno == ENODEV. + `cat -v /dev/null' was failing on many systems. + + * cut.c (cut_fields): Don't strip off trailing delimiter e.g. + `echo 'a:b:c:' | cut -d: -f3-' should print `c:', not just `c'. + From William Dowling <will@franklin.com>. + +Thu May 27 01:37:51 1993 Jim Meyering (meyering@comco.com) + + * Version 1.8. + + * memchr.c: De-ansify the fixed version from glibc. + It is supposed to work on systems with 64-bit long ints. + +Mon May 24 00:32:43 1993 Jim Meyering (meyering@comco.com) + + * Version 1.7. + +Sat May 22 02:13:12 1993 Jim Meyering (meyering@comco.com) + + * Version 1.6. + +Fri May 21 22:57:53 1993 Jim Meyering (meyering@comco.com) + + * pr.c (cols_ready_to_print): New function. It replaces a global + variable by the same name and computes on the fly the value that + was supposed to be maintained through that variable. This should + put to rest the `pr -2a' bug. + (main): Don't let getopt_long reorder arguments so we can + distinguish between `pr -1 -2' and `pr -12'. Rework handling of + -n and +n options. + + * fold.c: Declare xmalloc. + +Wed May 19 19:12:18 1993 Karl Berry (karl@owl.hq.ileaf.com) + + * sort.c (main): fflush before exit, so a closed stdout doesn't lose. + +Tue May 18 23:49:26 1993 Jim Meyering (meyering@comco.com) + + * mkinstalldirs: New file. + * Makefile.in (installdirs): Use it to create installation directories. + +Fri May 14 23:45:52 1993 Jim Meyering (meyering@comco.com) + + * all source: With --version, print version and exit immediately. + +Thu May 13 01:03:16 1993 Jim Meyering (meyering@comco.com) + + * Makefile.in (installdirs): New rules for creating installation + directories. (install): depend on it. + + * tail.c (main): Remove --compatible since `+1f' may be used + to get the BSD `-0f' behavior portably. + + * fold.c (main): Turn -N arguments, where N is a digit, into -wN. + From Ian Lance Taylor (ian@cygnus.com). + +Mon May 10 22:33:44 1993 Jim Meyering (meyering@comco.com) + + * tail.c (main): New option -C, --compatible to make `tail -0f' + work like `tail +1f' for compatibility with BSD tail. + +Thu May 6 23:28:56 1993 Jim Meyering (meyering@comco.com) + + * pr.c (print_page): Decrement cols_ready_to_print even when + lines_to_print == 0. The command `echo |pr -2ta' *still* didn't + terminate. Add parentheses for clarity. + +Mon May 3 23:57:47 1993 Jim Meyering (meyering@comco.com) + + * Version 1.5. + + * od.c (main): Remove set-but-not-used variable, `usage_error'. + + * split.c (main): Call usage with an argument. + +Sun May 2 16:05:04 1993 Jim Meyering (meyering@comco.com) + + * configure.in: Reverse if-else branches in AC_TEST_PROGRAM test + for 8-bit clean memcmp. + + * cat.c (usage, main): Remove unused argument. + + * csplit.c (remove_line): Remove set-but-not-used variable, `line_got.' + (check_for_offset): Remove unused argument `argnum.' + + * configure.in: Add AC_SIZE_T. + +Sat May 1 09:03:19 1993 Jim Meyering (meyering@comco.com) + + * uniq.c (main): Interpret non-option arguments with a leading `+' + only if we haven't seen `--'. + + * tr.c (main): Change variable name to avoid shadowed dcl. + * wc.c (write_counts): Ditto. + + * sum.1: Make documentation agree with the code. + + * od.c: Depend only on HAVE_LONG_DOUBLE for long double support. + +Fri Apr 30 20:16:03 1993 Jim Meyering (meyering@comco.com) + + * configure.in [AC_HAVE_HEADERS]: Add limits.h. + + * configure.in [CFLAGS, LDFLAGS]: Assign reasonable defaults. + + * od.c (parse_old_offset): Don't use prototype in function + definition. Remove unnecessary conjunct from test for hexadecimal + prefix. + + * od.c: Depend on __GNUC__ || HAVE_LONG_DOUBLE rather than __STDC__ + for long double support; there are compilers (Stardent Vistra svr4) + without long double but still define __STDC__. + +Thu Apr 29 02:01:27 1993 Jim Meyering (meyering@comco.com) + + * src/*.c and man/*.c except for sort: Add --help and --version + options. + + * pr.c: Convert to use getopt_long. + + * lib/memcmp.c: Use version from glibc. + [WORDS_BIGENDIAN]: Test this instead of the using glibc's + __BYTE_ORDER macro. + * configure.in: Use AC_WORDS_BIGENDIAN to set it. + + * od.c (parse_old_offset): Allow `0X' as well as `0x' prefix to + indicate hex. + + * Makefile.in (dist): Depend on Makefile so that changes to + Makefile.in (like adding new files to DISTRIB) are reflected + in the new distribution. + +Fri Apr 23 21:53:47 1993 Jim Meyering (meyering@comco.com) + + * {lib,src}/Makefile.in [.c.o]: Make CPPFLAGS and CFLAGS follow + other options so users can use them to override DEFS. + * src/Makefile.in [.c.o]: Add -I$(srcdir) for version.h. + + * Makefile.in [CFLAGS, LDFLAGS]: Don't set to -g explicitely; + configure's AC_SUBST will set these. + + * Makefile.in [Makefile]: Add dependencies and a rule to remake it. + [targets that cd then run make in subdirectories]: Don't depend + on `cd ..'; use a subshell instead. + + * Makefile.in [info, install-info, dvi, check, installcheck]: + New targets but no rules; comply with standards. + + * configure.in [CFLAGS]: Default to -g -O if CC is gcc and the user + hasn't specified CFLAGS. + [LDFLAGS]: Substitute into Makefile. + +Tue Mar 30 21:36:11 1993 Jim Meyering (meyering@comco.com) + + * od.c: New option --compatible, -C. + (parse_old_offset): New function. + * od.1: Document new option. + +Mon Mar 29 21:27:56 1993 Jim Meyering (meyering@comco.com) + + * cut.c, expand.c, join.c, nl.c: Always call error with errno + (not zero) after failed fclose or non-zero ferror. + +Sun Mar 28 16:59:31 1993 Mike Haertel (mike@cs.uoregon.edu) + + * configure.in: Add check for working memcmp; use GNU's if + the system's doesn't grok the 8th bit. + * memcmp.c: Fix it so it groks the 8th bit. + TODO: We really need to provide a fast memcmp, since most + machines will have a broken memcmp. Probably should get + the one from glibc. + * sort.c (mergefps): Maintain keybeg and keylim when copying + the current line to `saved'. + (numcompare): Skip white space here since -n no longer implies -b. + (getmonth): Skip white space here since -M no longer implies -b. + (compare): Completely overhauled to make the 8th bit work right, + also to properly handle the global reverse option. + (set_ordering): -n no longer implies -b, according to Posix. + For consistency, -M also no longer implies -b. + (main): Correct treatment of -r and global keys. + (findlines): Clear keybeg and keylim if no keys are used. + (sort): Avoid overwriting tempfiles[] array bounds. + +Sun Mar 21 22:29:29 1993 Jim Meyering (meyering@comco.com) + + * pr.c (close_file): Reverse May 13, '92 change, but add the condition + that cols_ready_to_print not be decremented when printing across. + The command `echo |pr -2ta' didn't terminate. + (print_page): Rewrite conditional (that had side effects in second + conjunct) using nested if statements to make it clear that we do + indeed want those semantics. + +Tue Jan 19 13:35:24 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * Version 1.4. + + * system.h: Try BBSIZE if BSIZE isn't defined. + From Tony Robinson <ajr@eng.cam.ac.uk>. + +Sat Dec 12 12:37:00 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * tail.c (tail_forever): Use an array of file descriptors + instead of forking processes. + (dump_remainder): Return number of bytes read. + (tail_file): Fill in the new array. + From Ian Lance Taylor. + +Fri Dec 11 17:18:16 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * system.h: Only define index, bcmp, etc. if not already defined. + +Tue Dec 8 10:31:14 1992 Jim Meyering (meyering@idefix.comco.com) + + * tr.c (is_char_class_member): Remove unreached return after abort. + +Sun Dec 6 22:34:52 1992 Jim Meyering (meyering@idefix.comco.com) + + * csplit, cut.c, expand.c, fold.c, head.c, join.c, od.c, pr.c, + sort.c, split.c, tail.c, tr.c, unexpand.c, uniq.c: Remove inclusion + of <ctype.h> and definitions of is* ctype macros to system.h. + Change a few more uses of is* ctype macros to (protected) upper + case versions. + + * system.h: Add isascii-protected ctype IS* macros. + +Wed Dec 2 12:28:10 1992 Jim Meyering (meyering@idefix.comco.com) + + * all files using getopt.h: Convert static declarations of + struct option to use new macros from getopt.h: no_argument, + required_argument, and optional_argument. + +Tue Dec 01 10:57:24 1992 Jim Meyering (meyering@idefix.comco.com) + + * od.c, pr.c, sort.c: Make uses of ctype.h macros consistent. + + * tr.c (main): Close stdin and stdout and check return status. + +Tue Nov 24 09:26:08 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * system.h, csplit.c: Use HAVE_FCNTL_H and HAVE_STRING_H + instead of USG. + +Tue Nov 24 08:42:30 1992 Jim Meyering (meyering@idefix.comco.com) + + * tr.c: Define new macros ISPRINT, ISALNUM, ISXDIGIT, ... that + use isascii if it is defined. + (is_char_class_member, make_printable_char, make_printable_str, + non_neg_strtol): Use new macros instead of lower case ones + from <ctype.h>. + + * od.c (print_ascii, dump_strings): Use ISDIGIT and ISPRINT + macros like pr.c. Suggested by David J. MacKenzie. + + * od.c (print_ascii, dump_strings): Check for isascii before isprint. + (dump_strings): Free malloc'd buffer before returning. + (skip): Return non-zero if an error occurred, zero otherwise. + Exit only if asked to skip beyond end of combined input. + (check_and_close): New function. + (skip, read_block, read_char): Call check_and_close when done + processing the file associated with in_stream. + (skip, read_block, read_char): Set have_read_stdin. + (main): Close stdin (if it was ever read) and check for errors + just before exiting. + (write_block, dump_strings, dump): Don't test return value from + functions that operate on streams. Rely on later ferror tests. + +Sat Nov 21 12:41:49 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * sort.c (main, usage): Add -T option. + +Thu Nov 19 14:33:40 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * tail.c (tail_forever, sigusr1, kill_kids): New functions to + do -f on multiple files. + (main): Call tail_forever. + From Ian Lance Taylor. + +Tue Nov 10 14:29:11 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * cut.c (cut_fields): Add cast. + + * od.c (decode_one_format): Remove '#' from pre_fmt_string; + many systems don't support it. + Conditionalize long double support on __STDC__, not __GNUC__. + From Ian Lance Taylor. + +Mon Nov 9 00:24:41 1992 Jim Meyering (meyering@idefix.comco.com) + + * sort.c (numcompare, keycompare): Add parentheses suggested + by gcc -Wall. Put braces around individual monthtab initializers. + + * cksum.c: Declare error. Make checksum table `const.' + + * pr.c: Remove comment and dcl of unused variable, `print_a_number'. + + * split.c (main): Add `default: abort();' to enumeration switch. + + * All files: Make all functions and extern variables static. + Make all longopts arrays const as well as static. + Make a couple statically initialized aggregates `const.' + +Sun Nov 8 19:46:59 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * od.c (main): Make old-style format options accumulate. + From Jim Meyering. + +Sat Nov 7 00:26:14 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * tr.c (look_up_char_class): Add cast. + + * nl.c (build_type_arg), csplit.c (extract_regexp), tac.c (main): + Add `const' to variable receiving value from re_compile_pattern. + + * wc.c (wc): If doing only -c, use st_size for regular files. + + * fold.c (fold_file): Was folding 1 column too early. + From Eric Backus <ericb@lsid.hp.com>. + + * memset.c: New file. + +Fri Nov 6 20:14:51 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * cksum.c: New file. + +Tue Oct 13 16:24:06 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * tac.c (tac_stdin): Handle SIGPIPE. + * sort.c (main): Handle SIGTERM. + + * od.c: New file. + + * system.h [USG || STDC_HEADERS]: Define bcmp. + +Sat Oct 3 20:41:24 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * sort.c (main): Handle SIGPIPE. From trq@dionysos.thphys.ox.ac.uk. + +Tue Sep 29 01:10:05 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * paste.c (main): Don't write on a string constant. + +Mon Aug 24 00:02:45 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu) + + * tr.c: Minor cleanup. Replaced some assert(0) with abort(). + +Tue Jul 7 02:14:19 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * cmp.c, cmp.1: Move to diff distribution. + +Fri Jul 3 16:37:59 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * system.h: Change FOO_MISSING to HAVE_FOO. + +Wed May 13 20:05:41 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * pr.c (COLUMN): Add structure member to remember filename. + (main, init_fps, open_file, close_file): Use it. + + (close_file): Don't decrement cols_ready_to_print when closing + a file. From cdl@mpl.UCSD.EDU (Carl Lowenstein). + +Mon May 11 19:17:33 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * cmp.c: --show-chars -> --print-chars. + + * pr.c: Rename some variables. + +Sat May 9 18:39:47 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * system.h: Define DEV_BSIZE if not defined. + +Wed Apr 22 02:15:09 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * system.h, tac.c: SIGTYPE -> RETSIGTYPE. + +Fri Apr 17 10:42:23 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * sort.c (main): Don't stop processing args when we hit "-"; + treat it like a regular filename. + From ian@airs.com (Ian Lance Taylor). + + * pr.c (print_page): Fix off by one line count when ^L is in input. + From Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de). + +Mon Apr 6 20:52:29 1992 Jim Meyering (meyering@churchy.gnu.ai.mit.edu) + + * tr.c (validate): Change error message so it doesn't mention + actual name of --truncate-set1 option. From David MacKenzie. + +Sun Apr 5 14:22:42 1992 Jim Meyering (meyering@hal.gnu.ai.mit.edu) + + * tr.c (string2_extend, validate): Give an error message when + translating without --truncate-set1, with empty string2, and + with non-empty string1. "tr 1 ''" produced a failed assertion. + +Mon Mar 30 02:20:56 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * system.h: Change how ST_BLKSIZE is calculated to allow for + non-POSIX systems that don't define BSIZE in sys/param.h. + +Sat Mar 28 11:18:01 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * sum.c (main, bsd_sum_file): Don't print filename if BSD + algorithm is used and only one file was given. + +Wed Mar 25 11:34:41 1992 Jim Meyering (meyering@wombat.gnu.ai.mit.edu) + + * tr.c (get_spec_stats): Fix assertion to allow ranges like a-a + with starting character equal to ending character. This is + contrary to the POSIX spec, but what is already implemented + in find_closing_delim. + +Mon Mar 16 00:15:11 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * Version 1.3. + + * sort.c (numcompare, checkfp): Add parens to placate gcc2. + + * sort.c (mergefps): For -u, output the first, not last, of + the lines that compare equal. From Mike Haertel. + +Tue Mar 10 10:51:38 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * tr.c: Remove initial capitals and periods from error messages. + +Sun Mar 8 22:03:45 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * sum.c (main): Add -r option for SYSV compat. + +Thu Feb 27 22:26:25 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * sort.c (compare): If -s given, leave lines in their original order. + (main): Recognize -s. + (usage): Document -s. + From Mike Haertel. + +Tue Feb 18 20:29:45 1992 Randall Smith (randy at geech.gnu.ai.mit.edu) + + * sort.c (sort): Check for complete parsing of buffer into + lines before nixing temp files. + +Mon Feb 17 10:35:58 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * sum.c (sysv_sum_file): Use %lu instead of %u to print a + long. Not that it matters for GNU . . . + + * tr.c (unquote, make_printable_str): Use \007 instead of ANSI \a. + (append_normal_char, append_range, append_char_class, + append_repeated_char, append_equiv_class, spec_init): + Initialize `next' field of new `struct List_element'. + From rommel@informatik.tu-muenchen.de (Kai-Uwe Rommel). + +Sat Feb 8 17:16:49 1992 David J. MacKenzie (djm at apple-gunkies.gnu.ai.mit.edu) + + * join.c (get_line): Renamed from getline to avoid GNU libc conflict. + +Sun Feb 2 21:22:01 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * Version 1.2. + + * nl.c: Support multiple files and "-" for stdin. + (main): Check for read and write errors. + (nl_file): New function. + +Wed Jan 29 10:09:10 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * tr.c (main): -t option was called -b in getopt spec. + (validate): Don't warn that set1 is longer than set2. + + * tr.c: Rename --sysv-string2-truncate to --truncate-string1. + +Fri Jan 17 16:29:05 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * nl.c: New program from bin-src. + + * nl.c (main): Use a struct linebuffer for line_buf. + (process_file): Use readline instead of fgets, to preserve NULs. + (check_section): Use memcmp instead of strncmp. + (proc_text): Print line_buf with fwrite instead of printf. + + * nl.c (main): Usage message if too many args given. Check + for error in closing input file. Lengths of section delimiter + strings were 1 too large. Take separator_str into account in + length of print_no_line_fmt. + (build_print_fmt): Allocate space for print_fmt, in case + separator_str is long. + (proc_text): A blank line is one that contains nothing, not + even nonprinting characters. + +Fri Jan 17 01:04:22 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * All programs: Document `--' instead of `+' to introduce + long-named options, in usage messages. + + * sum.c (bsd_sum_file): Renamed from sum_file. + (sysv_sum_file): New function. + (main): Recognize an option to select between the algorithms. + +Sun Jan 5 17:41:18 1992 Jim Meyering (meyering at churchy.gnu.ai.mit.edu) + + * pr.c (close_file, print_page): Fixed bug that had the command + yes |head |pr -t printing "yyyyyyyyyy". + * (print_page): Fixed bug that had pr -3 -a printing two too few + trailer lines per page. + * (main): Added restriction that -a and -m are incompatible. + Although the POSIX spec doesn't explicitly say they shouldn't + be used together, it says -a modifies the -column option and + that -column shouldn't be used with -m. + +Thu Jan 2 15:23:59 1992 David J. MacKenzie (djm at albert.gnu.ai.mit.edu) + + * nl.c: Include regex.h after, not before, sys/types.h. + +Thu Jan 2 12:18:10 1992 Tom Lord (lord at geech.gnu.ai.mit.edu) + + * sort.c (fillbuf) return bytes buffered instead of bytes read. + +Fri Dec 27 22:53:36 1991 Jim Kingdon (kingdon at geech.gnu.ai.mit.edu) + + * sort.c (LINEALLOC): New #define. + (struct lines): New field ``limit''. + (initlines): Set it from new arg ``limit''. + (sort, mergefps, checkfp): Pass new arg to initlines(). + (findlines): Don't realloc past lines->limit. + +Tue Dec 24 01:24:03 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * tac.c, sort.c, csplit.c, system.h: Change POSIX ifdefs to + HAVE_UNISTD_H and _POSIX_VERSION. + + * xwrite.c: Change POSIX ifdef to HAVE_UNISTD_H. + +Sat 14 Dec 1991 11:46:42 Jim Meyering (meyering at wombat) + + * tr.c: Fixed an inaccurate comment on posix_pedantic. + +Thu 12 Dec 1991 21:15:20 Jim Meyering (meyering at hal) + + * tr.c: Changed underscores to hyphens in long option name + "sysv_string2_truncate". + +Wed Dec 11 13:33:34 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * tac.c (main): Set obscure_syntax to tell re_search to + allocate memory for the group registers. + +Fri Dec 6 18:26:27 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * tac.c, sort.c, csplit.c [POSIX]: Use sigaction instead of + signal, which POSIX doesn't have. + * sort.c: Replace inthandler and huphandler with sighandler. + * csplit.c (main): Only handle signals if they were not being + ignored. + + * tr.c: POSIX_ME_HARDER -> POSIXLY_CORRECT. + +Wed Dec 4 00:47:47 1991 Jim Meyering (meyering at wombat) + + * tr.c (unquote): Reformat code so it doesn't go beyond column 80. + * tr.c (squeeze_filter): Comment a little on why it's better + to step through the input by two. + * tr.c (set_initialize): Write a comment describing the function. + * tr.c: Eliminated the variable `portability_warnings' and replaced + references to it by references to `!posix_pedantic'. One of the + uses of portability_warnings had been wrong. + +Tue Dec 3 14:03:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * tr.c: New program. + +Sun Dec 1 15:07:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * linebuffer.[ch] (freebuffer): New function (used by cron). + +Thu Oct 17 22:30:22 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * system.h, configure, Makefile.in: Don't include memory.h if + STDC_HEADERS, removing need for MEMORY_H_MISSING. + +Thu 17 Oct 1991 16:53:07 Jim Meyering (meyering at wombat) + + * pr.c (print_page): REALLY fixed `extra newline at EOF' problem. + Somehow, part of my patch didn't make it last time. + +Sat Oct 12 12:04:47 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu) + + * tail.c (pipe_lines, pipe_bytes): Initialize `first->next'. + + * cmp.c (cmp): Print EOF message to stderr, not stdout, for + POSIX 1003.2.11.2. + + * sort.c (xfwrite): fwrite never returns < 0, so check if + number written is number we asked to write. + (fillbuf, main): fread never returns < 0, so check ferror instead. + From Rainer Orth. + +Tue Oct 8 18:07:08 1991 Jim Meyering (meyering at churchy) + + * pr.c (print_page): Really fixed `extra newline at EOF' problem. + * (store_columns): Fixed bug that caused `pr -b -2' to coredump + on files of certain lengths. + +Fri Oct 4 22:30:25 1991 Jim Meyering (meyering at churchy) + + * pr.c (print_page): Fixed to not add single spurious newline + at EOF when using -t. + +Wed Oct 2 01:02:05 1991 David J. MacKenzie (djm at apple-gunkies) + + * pr.c (print_page): Don't pad the page if -t given. + + * csplit.c (load_buffer), sort.c (mergefps): Use bcopy, not memcpy. + +Thu Sep 26 12:35:00 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu) + + * Version 1.1. + + * configure, system.h: Include memory.h if it works. + + * split.c: Allow `b' unit as well as `k' and `m'. + + * head.c, tail.c: Replace -b +blocks option with specifying + units (b, k, or m) after the number. + (parse_unit): New function. + + * fold.c (main): Check that -w arg is a number. + + * cut.c: +delimiter takes an arg. + +Mon Sep 16 14:52:38 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu) + + * pr.c (close_file): Don't close an already closed file. + +Thu Sep 12 00:14:43 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * memchr.c: New file. + * configure: Check if it's needed. + + * csplit.c, gcsplit.1: New program. + + * pr.c (cleanup): Only free buffers if they were allocated. + + * sort.c [!USG && !STDC_HEADERS]: Declare memchr. + +Wed Sep 11 20:54:16 1991 Jim Meyering (meyering at churchy) + + * pr.c: The following 3 bugs appeared (at least) when printing + a single file with the options `-3 -f'. + * (print_white_space): Single spaces were being replaced + with tabs. + * (print_page): Some lines were getting too much white space + at the beginning because spaces_not_printed wasn't being reset + to 0. + * (read_line): The single space between a truncated column + on its left and the column on its right was omitted. Fixed + so that previous value of input_position is restored before + returning FALSE. + +Sat Sep 7 03:22:18 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * configure: Only remove /etc from PATH when it's not part of + a larger name. + +Wed Sep 4 17:09:24 1991 David J. MacKenzie (djm at apple-gunkies) + + * linebuffer.c (readline): Fix incorrect recalculation of `end'. + + * head.c, tail.c: Replace `mode' variables and bitmasks with + separate variables for each option. + +Mon Sep 2 04:00:37 1991 David J. MacKenzie (djm at apple-gunkies) + + * wc.c: New program. + +Sun Sep 1 01:18:38 1991 David J. MacKenzie (djm at apple-gunkies) + + * fold.c (fold_file): Read in an int, not a char, for EOF + comparison. + + * configure: Check whether st_blksize is missing. + + * tac.c (save_stdin): Put copy of pipe input in TMPDIR if + defined, instead of /tmp. + +Thu Aug 29 14:48:15 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * xwrite.c [POSIX]: unistd.h might require sys/types.h. + +Wed Aug 28 11:57:39 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * paste.c (main): Consider -d "" to be like -d "\0", + for POSIX (if I read it right). + + * sort.c, join.c: New programs. + + * cut.c (set_field): Allow blanks as well as commas to + separate numbers in ranges. + +Sun Aug 25 19:57:40 1991 Jim Meyering (meyering at apple-gunkies) + + * pr.c: Failure to open an input file is no longer a fatal error. + A message is printed for each failed open. When printing + in parallel, each failed open results in one fewer output column. + Added POSIX -r option to suppress the message. + * pr.c: Added variables: failed_opens, ignore_failed_opens. + These changes were based in part on work by David MacKenzie. + +Sat Aug 24 15:27:39 1991 Jim Meyering (meyering at pogo) + + * pr.c: Complain if user gives both -m and -[0-9]+ options. + +Wed Aug 21 22:04:57 1991 David J. MacKenzie (djm at apple-gunkies) + + * Version 1.0. + +Mon Aug 19 00:16:51 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * expand.c: Rename some variables. + (expand): Don't access value off end of array. + * unexpand.c: Rename some variables. + (unexpand): Don't access value off end of array. + Instead of copying tabs verbatim and flushing pending spaces + when one is reached, count them as the proper number of + pending spaces. Instead of changing tabs to single spaces if + the tabstop list is exhausted, print the rest of the line + unchanged (for POSIX). + +Sat Aug 17 01:49:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * cut.c (cut_file), paste.c (paste_parallel, paste_serial): + Clear EOF and error conditions on stdin so it can be reused. + + * expand.c, unexpand.c (parse_tabstops): Allow blanks as well + as commas to separate tabstops, for POSIX. + * expand.c (expand), unexpand.c (unexpand): Don't line-buffer + the output; send it directly to stdout. + * unexpand.c (main): Make -t stupidly imply -a for POSIX. + (unexpand): If a tab stop list was given and we move past its end, + copy the rest of the line verbatim. + + * split.c (convint): New function to allow 'm' and 'k' after + byte counts. + (main): Use it. Change -c option to -b for POSIX. + +Fri Aug 9 02:47:02 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * pr.c: Protect isdigit with isascii, if required. + +Tue Aug 6 21:42:25 1991 David J. MacKenzie (djm at wheat-chex) + + Most of the following is from Paul Eggert: + * cat.c (main): If stdin is read, check close at end. + * cmp.c (main): Check for stdin being closed. + Check for close errors on stdin and stdout. + (cmp): Return a value instead of exiting. + * cut.c (cut_file): New function, from code in main. + Check for read errors. + (main): Check for close errors. + * expand.c, unexpand.c (main): Check for close errors. + (next_file): Go to next file if one can't be opened. + Check for close errors. + * head.c (main), tail.c (main): If stdin was read, check for + close errors. + * head.c (head_file), tail.c (tail_file): Check for close errors. + * paste.c (main, paste_parallel, paste_serial), tac.c (main): + Check for close errors. Close stdin if it was read. + * split.c (main): Check for close errors. + + * configure, Makefile.in's: Support +srcdir option. + Make config.status. Fix up clean targets. + +Wed Jul 31 01:32:59 1991 David J. MacKenzie (djm at hal) + + * linebuffer.h (struct linebuffer): Add a field to indicate + the number of valid chars in the line. + * linebuffer.c (initbuffer, readline): Fill it in. + * uniq.c, comm.c: Use it. + + * pr.c (main): Check stdin and stdout fclose for errors. + (init_parameters): If there's no room for header and footer, + omit them rather than dying (for POSIX). + (init_header): Take a file descriptor as additional arg. + (init_fps): Change callers. Note when stdin is read. + (open_file): For filename "-" use stdin. + (close_file): Don't close stdin. Check close for errors. + (print_char, char_to_clump): Use isprint instead of explicit + comparisons. + + * memcmp.c: New file (needed for comm). + * bcopy.c: New file (needed for fold). + * system.h: Don't define bcopy as memcpy. + * configure: Check for bcopy and memcmp. + + * uniq.c (main): Use "-" instead of NULL to mean stdin or + stdout. + (check_file): Use "-" instead of NULL to mean stdin or stdout. + Check readline return instead of for NUL character to + detect eof. + Check fclose for errors. + (find_field): Use linebuffer length, not NULs, to detect end + of line. + (different): New function, replaces compare. Uses memcmp + instead of strncmp. + (writeline): Use fwrite instead of fputs so NULs are preserved. + + * comm.c (compare_files): Return an error indication. + Don't take a filename of NULL to mean stdin. + Use memcmp instead of strcmp to allow for NULs. + Check fclose for errors. + (writeline): Use fwrite instead of fputs so NULs are preserved. + + * sum.c (sum_file): Take an arg indicating whether to print + the filename, and don't take NULL meaning stdin. Set a flag + when we read stdin. Check fclose return for errors. + (main): If stdin was read, check fclose return for errors. + Use filename of "-" if no args given. + +Thu Jul 25 15:17:10 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * fold.c: Rewritten from scratch for POSIX. + +Wed Jul 24 01:55:41 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * split.c (line_bytes_split): Use xmalloc instead of alloca. + * system.h: Don't declare alloca. + + * tac.c, tail.c: Use SEEK_ instead of L_ for lseek. + * system.h: Define SEEK_ macros if not defined. + + * pr.c: Rename variable `truncate' to avoid library function conflict. + +Tue Jul 23 13:21:48 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * linebuffer.c, linebuffer.h: New files. + * comm.c, uniq.c (initbuffer, readline): Functions + removed (use versions in linebuffer.c). + +Mon Jul 22 13:23:53 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * sum.c (sumfile): Always print 5 digits for second number, too. + Interpret "-" to mean stdin. + +Sat Jul 20 14:24:40 1991 David J. MacKenzie (djm at bleen) + + * uniq.c: Use isblank instead of isspace, to support POSIX.2. + * comm.c, pr.c, uniq.c (concat, fatal, error, + pfatal_with_name, xmalloc, xrealloc): Functions removed. + +Sat Jul 13 02:04:53 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) + + * nl.c: Add long-named options. Doc fixes. + +Sat Jul 6 02:19:09 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) + + * expand.c, unexpand.c [STDC_HEADERS]: Include stdlib.h. + + * xwrite.c [POSIX]: Include unistd.h. + [STDC_HEADERS]: Don't declare errno. + +Sun Jun 30 23:35:16 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) + + * uniq.c: Add long-named options. Remove marginally useful -z + option (zero padded repeat counts). + +Thu Jun 27 16:31:45 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) + + * tail.c (tail_file), tac.c (save_stdin, tac_file), split.c + (cwrite), head.c (head_file), cat.c (main): Check close return + value for delayed error report due to NFS. + +Tue Jun 11 00:12:15 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) + + * cat.c: Replace "uchar" with "unsigned char", to avoid + problems with various systems' typedefs. + +Thu Jun 6 12:54:26 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) + + * cat.c (cat): Interpret ENOTTY return from FIONREAD ioctl to mean + operation is unsupported, for HP-UX 7.0. + +Sun Apr 14 21:49:17 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * sum.c: Always print five digits for first number. + +Fri Mar 15 16:16:54 1991 David J. MacKenzie (djm at geech.ai.mit.edu) + + * cat.c, cmp.c: Don't use fileno(); not needed. + +Thu Jan 10 02:16:55 1991 David J. MacKenzie (djm at albert.ai.mit.edu) + + * tac.c, tail.c: Change _POSIX_SOURCE to POSIX. + +Thu Dec 27 00:06:45 1990 David J. MacKenzie (djm at egypt) + + * cut.c (cut_file_bytes, cut_file_fields): Make inbufp and + outbufp global. + (enlarge_line): Adjust inbufp and outbufp. + +Sun Sep 9 16:54:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * cat.c: Declare free returning void, not int, so it + doesn't bomb on Xenix. + +Mon Sep 3 22:23:57 1990 David J. MacKenzie (djm at coke) + + * tac.c: Print error messages before calling cleanup, not after. + +Tue Aug 28 18:05:24 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * tac.c (cleanup): Return SIGTYPE, not int. + +Tue Aug 7 12:51:18 1990 David J. MacKenzie (djm at apple-gunkies) + + * cut.c (main, usage): Add -b and -n options for POSIX. + (set_fields): Don't allow SPC or TAB as number separators. + + * paste.c (paste_parallel): If open of any file fails, quit + (for POSIX). + +Mon Aug 6 22:14:13 1990 David J. MacKenzie (djm at apple-gunkies) + + * pr.c: Add POSIX -F option (same as -f). + + * uniq.c (check_file): Allow '-' to mean stdin or stdout. + +Mon Aug 6 14:43:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu) + + * head.c, tail.c: Change `chars' to `bytes' globally. + (main, usage): Use POSIX.2 draft 10 option syntax. + +Sun Aug 5 11:51:12 1990 David J. MacKenzie (djm at pogo.ai.mit.edu) + + * cat.c (main): Don't delay error messages, so they appear + where expected. + (main, simple_cat, cat): Make errors in input files nonfatal. + +Sat Aug 4 10:11:30 1990 David J. MacKenzie (djm at pogo.ai.mit.edu) + + * cat.c: Remove -c option added for POSIX draft 9, since POSIX + draft 10 removed it. + + * tac.c (tac_stdin): Use fstat instead of lseek to determine + whether stdin is seekable, because lseek silently fails on + some special files, like tty's. + tail.c (tail_chars, tail_lines): Use fstat instead of lseek; + don't turn off -f for non-regular files (assume the user knows + what he's doing; it might work for fifo's and sockets). + + * paste.c (main): If no files given, use stdin. + Don't let collapse_escapes write on string constant (delim default). + (paste_parallel): Don't close stdin. + + * cut.c (main): Use standard input for filename of "-". + + * comm.c (compare_files): Allow '-' to mean stdin. + +Fri Aug 3 13:38:28 1990 David J. MacKenzie (djm at pogo.ai.mit.edu) + + * cut.c (enlarge_line): Take an arg giving the required amount + of space. Change callers. + (main): Don't allow -t'<TAB>' without -f. + Make `delim' unsigned to fix sign extension problem in comparison. + +Tue Jul 17 12:36:11 EDT 1990 Jay Fenlason (hack@ai.mit.edu) + + * pr.c Deleted excess whitespace from ends of lines. + Modified to work with current version of getopt, which + returns 1 instead of 0 for non-options. + Reversed the meaning of the -f option, to be compatable + with real pr. + +Sun Jul 8 00:39:31 1990 David J. MacKenzie (djm at apple-gunkies) + + * cmp.c (main, usage): Rename -L option to -c and don't have + it imply -l. + (printc): Take an arg to specify number of chars to pad to, + for column alignment. + (cmp): Respect flag_print_chars in default output format. + Align columns for cmp -cl. + +Sat Jul 7 17:23:30 1990 David J. MacKenzie (djm at apple-gunkies) + + * cmp.c: For +show-chars, have getopt return 'L' so + `flag_print_chars' gets set. + +Fri Jun 29 01:04:19 1990 David J. MacKenzie (djm at apple-gunkies) + + * tac.c (main): Initialize fastmap and translate fields of + regex before compiling it. + +Fri Jun 22 00:38:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * tac.c: Change +regexp to +regex for consistency with GNU find. + +Wed Jun 20 01:46:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * cat.c (cat): If FIONREAD is available, only use it if it is + supported by the filesystem that the file is on. + +Sun Jun 3 20:26:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * cat.c (main): Add a variable to control whether the check + for input file == output file is made, because no values of + st_dev and st_ino should be assumed to be available for this + purpose. Only do the check for regular files. + + * tac.c: Use bcopy instead of memcpy. + +Thu May 31 00:55:36 1990 David J. MacKenzie (djm at apple-gunkies) + + * head.c: Use longs instead of ints for file offsets, for 16 + bit machines. + +Tue May 22 00:56:51 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * cmp.c: Change some ints to longs for 16 bit machines. + (bcmp_cnt): Make char-pointer counting slightly simpler. + +Sat May 12 01:16:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * cat.c (main): Allow input file to be output file for devices + (ttys, etc.). Check whether input file is output file when + reading standard input. Print any error messages for standard + input. + + * cmp.c (bcmp_cnt): Handle int comparisons correctly on 16 bit + machines as well as 32 bit ones. + * cmp.c, tail.c: Use longs instead of ints for file offsets. + +Fri May 11 02:11:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * cmp.c: Fix some exit statuses for POSIX. + +Tue May 8 03:41:42 1990 David J. MacKenzie (djm at abyss) + + * tac.c: Use regular expressions as the record boundaries. + Give better error messages. + Reformat code and make it more readable. + (main): Use getopt_long to parse options. + (tac_stdin): Do not make a temporary file if standard input + is a file. + (tac_file): New function. + (tac): Take an open file desc as an arg. + (output): Rewrite to use its own efficient buffering. + (xmalloc, xrealloc, xwrite): New functions. + +Sun Apr 8 20:33:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * head.c, tail.c: Use `error' instead of `fatal_perror' and + `nonfatal_perror'. Remove some unnecessary info from messages. + +Wed Mar 21 09:30:18 1990 David J. MacKenzie (djm at pogo.ai.mit.edu) + + * comm.c (main): Pass the list of files to compare_files as a + char ** instead of a char *. + (compare_files): Make arg a char **. + + * uniq.c: Declare some functions as void. + Change global vars `countmode' and `mode' from ints to enums. + (main): Use getopt to parse options and support POSIX options. + Don't use integer_arg to parse numbers, since `-#' can't be + parsed that way using getopt. + (find_field): Use isspace for finding fields boundaries. + +Tue Mar 20 14:28:25 1990 David J. MacKenzie (djm at pogo.ai.mit.edu) + + * comm.c (main): Call usage if given bad option or wrong + number of args. Exit with 0 status normally. + (usage): New function. + Declare some other functions as void. + +Wed Mar 14 10:48:40 1990 David J. MacKenzie (djm at rice-chex) + + * cmp.c (main, cmp, usage): Replace -q +quick option with -L + +show-chars option to add ASCII representation of bytes to -l format. + +Tue Mar 13 00:50:14 1990 David J. MacKenzie (djm at rice-chex) + + * cmp.c (cmp): Change EOF message for POSIX compatibility. + For -l format, clear bits > FF. + +Mon Mar 5 17:21:00 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * tail.c: Move global `errors' into main instead of having + nonfatal_perror set it. + (tail, tail_chars, tail_file, tail_lines, pipe_chars, pipe_lines): + Return an error status. + (file_lines, start_chars, start_lines): Reverse the meaning of + the return value. + (tail_lines, tail_chars): Account for that reversal. + +Mon Mar 5 00:34:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * head.c: Move global `errors' into main and have the various + functions return an error status instead of setting it in + nonfatal_perror. + +Sat Mar 3 11:27:27 1990 Torbj|rn Granlund (tege at echnaton) + + * cmp.c (cmp): Call function bcmp_cnt for flag == 0 (i.e. no + options specified), to compare the two blocks and count + newlines simultaneously. + * cmp.c New function: bcmp_cnt. + + * cmp.c (main): Test if output is redirected to /dev/null, and + assume `-s' if this is so. + +Tue Feb 20 17:09:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * cat.c: Change `argbad' from a char to a short, so it will + work on machines with unsigned chars. + +Sat Feb 10 02:16:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * cmp.c (cmp): Rename `r' to `first_diff', and `x' to `smaller'. + Remove unneccessary variable `c1'. If -l was given, increase + `char_number' by the number of bytes read, after producing output, + rather than by the offset of the first differing bytes, before + producing output. + Replace if-else-if constructions with case statements for clarity. + (bcmp2): Rename `n' to `nread'. + +Wed Dec 20 01:32:06 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu) + + * nl.c (proc_text): Use re_search instead of re_match. + +Tue Dec 19 01:26:34 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu) + + * nl.c: Indent. Un-nest statements. Use GNU regexp functions + instead of System V ones. Move function declarations together. + (quit): Remove useless function. + (program_name): New variable for error messages. + (main): Use perror in error message. + (xmalloc): New function to replace myalloc. + (myalloc): Function removed. + Global: use program_name and xmalloc. + +Sun Dec 17 00:36:36 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu) + + * uniq.c: Declare some functions. + (main): Initialize infile and outfile. Call usage if given + invalid args. Normally exit with 0 status instead of garbage. + (usage): New function to print usage message and exit. + (check_file): Remove unused variable. + (readline): Compare against EOF, not < 0. + (xmalloc, xrealloc): Return char *, not int. + Ok to return 0 if 0 bytes requested. + (lb1, lb2): Remove unused global vars. + (concat): Remove unused function. + +Sat Dec 16 15:15:50 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu) + + * comm.c: Remove unused global variables lb1, lb2. + (main): Remove unneeded variable. + (compare_files): Remove unused arg. + (readline): un-nest assignment. Test against EOF instead of < 0. + (error): Print to stderr, not stdout. + (xmalloc, xrealloc): Return char * instead of int. + Returning 0 is ok if 0 bytes requested (ANSI C). diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/textutils/NEWS b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/textutils/NEWS new file mode 100644 index 0000000..a172299 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/old/textutils/NEWS @@ -0,0 +1,457 @@ +Changes in release 2.1 +[2.0.22] +* `od -t f8' works once again [bug introduced in textutils-2.0.8] +* various portability fixes, and general clean-up +* various minor, corner-case bug fixes +[2.0.21] +* split accepts new option -a or --suffix-length. +* split no longer generates longer suffixes than requested; instead, it reports + an error when suffixes are exhausted. POSIX requires this behavior. +* The _POSIX2_VERSION environment variable lets you select which version + of POSIX the utilities should conform to. Its default value is system + dependent. Set _POSIX2_VERSION=199209 to cause the utilities to support + obsolete usage like "sort +1". +* The following obsolete usages are no longer supported when conforming + to POSIX 1003.1-2001, which prohibits most digit-string options: + expand -N (instead, use expand -t N) + head -N (instead, use head -c N or head -n N) + fold -N (instead, use fold -w N) + split -N (instead, use split -l N) + tail -N (instead, use tail -c N or tail -n N) + unexpand -N (instead, use unexpand --first-only -t N) + uniq -N (instead, use uniq -f N) + The following obsolete usages (options without arguments) are no + longer supported when conforming to POSIX 1003.1-2001, which + prohibits most options with optional arguments: + od -s (instead, use od --strings) + od -w (instead, use od --width) + pr -S (instead, use pr --sep-string) +[2.0.20] +* tr no longer gets failed a assertion for [==] or [::] +* The following obsolete usages are no longer supported when conforming + to POSIX 1003.1-2001, which prohibits most options with leading "+": + sort +POS1 -POS2 (instead, use sort -k) + tail +N (instead, use tail -c +N or tail -n +N) + uniq +N (instead, use uniq -s N) +* Warnings are issued for obsolete usages on older hosts, + unless POSIXLY_CORRECT is set in the environment. +* sort -m no longer segfaults when given an empty file +* sort -S now accepts 'K' as a synonym for 'k'. +* wc recognizes all locale-defined white-space characters, not just those + in the "C" locale. +[2.0.19] +* portability tweak to make lib/regex.c compile +* split translatable strings only in the middle of sentences +[2.0.18] +* sort could segfault on systems without a working mkstemp function and + with a gettimeofday function that clobbers the static buffer that + localtime uses for it's return value -- introduced in 2.0.17 +[2.0.17] +* csplit no longer gets a failed assertion for this: + printf 'a\n\n'|csplit - '/^$/' 2 +* sort detects physical memory attributes more portably +* tail no longer gets a segfault on Linux's /proc/ksyms +* sum -s produces the proper 16-bit checksum for large files + (this fixes a bug that was introduced in 2.0f) +* uniq is now about 3 times faster than the version from 2.0 on Linux systems; + the code uses lock-avoiding variants of common I/O functions +[2.0.16] +* tail -F no longer segfaults +[2.0.15] +* `head -c N' and `od -N N' now read no more than N bytes of input +* tail accepts new option: -F, equivalent to `--follow=name --retry', + for compatibility with the FreeBSD and NetBSD versions of tail. +* fmt no longer segfaults when using a maximum line width larger than 32767 +* uniq's --all-repeated option has new modes to delimit groups + of duplicate lines: --all-repeated={precede,separate,none(default)} +[2.0.14] +* sort now accepts long options like "--reverse" and "--". +* sort now checks option syntax as POSIX requires, except that (as usual + for GNU) options can follow file names unless POSIXLY_CORRECT is set. + For example, invalid positional combinations like "sort +1 -r -2" are + now rejected as per POSIX. +* The next POSIX standard will require that obsolescent 'sort' + positional options like +1 be treated as file names, not options. + Please use 'sort -k' instead. +[2.0.13] +* pr accepts new -D or --date option, to specify date format. +* The following changes are required by POSIX: + - If POSIXLY_CORRECT is set, dates in pr headers now look something like + 'Dec 4 23:59 2001', with the exact appearance affected by LC_TIME. + - pr -h now affects only the center header string, not the entire header. + - pr no longer truncates headers. +* Spacing in pr headers has been adjusted slightly. +* `fmt --prefix=S' now works when S contains a byte with the high bit set +[2.0.12] +* sort has improved performance when using very little main memory +* sort has improved memory management +* sort is no longer susceptible to certain denial of service attacks +* sort no longer suffers from a race condition whereby an interrupt received + during cleanup could cause it to fail to remove temporary files. + This problem could arise only on hosts without sigaction. +[2.0.11] +* sort accepts new -S SIZE option, to specify main-memory usage. +[2.0.10] +* od is faster and more portable than it was in 2.0.9 +* tail avoids an uninitialized memory reference +[2.0.9] +* od now prints valid addresses for offsets of 2^32 and larger, and allows + the byte offset (-j) and byte count (-N) arguments to be 2^32 and larger. +* tail now works with line and byte counts of 2^32 and larger, on systems + with large file support +* join now works with an 8-bit delimiter +* fix a compilation failure on some Solaris systems with wc.c +[2.0.8] +* od now supports 8-byte integers, assuming they're printable with e.g., %lld +* new program: sha1sum +* wc accepts new -m option: count (potentially multi-byte) characters +* wc's `--chars' option is now equivalent to -m, not --bytes as it used to be +* `cat -n' works properly when processing 2^31 or more lines +[2.0g] +* sort's --help output now warns that it is locale-aware +* tail: fix a buffer underrun error that occurred on an empty pipe, + also thanks to bounded pointers +* pr: fix a bounds violation found by Greg McGary's bounded-pointers-enabled gcc + It could have caused (with low probability) the columns on the last page of + output *not* to be `balanced' when they should have been. +* sort: if the -T tmpdir option is given multiple times, all the given + directories are used; this can improve performance for huge sort/merges. +[2.0f] +* all programs fail when printing --help or --version output to a full device +* cut no longer gets a segfault under some circumstances +* unexpand accepts new option: --first-only +[2.0e] +* `tail -f directory' no longer gets a failed assertion +* sort: big performance improvement when sorting many small files; + from Charles Randall +* configure and portability changes in m4/ and lib/ +[2.0d] +* preliminary sort performance improvements +* tsort now works more like the traditional UNIX tsort. Before it would + exit when it found a loop. Now it continues and outputs all items. +* unexpand no longer infloops on certain sequences of white space +* unified lib/: now that directory and most of the configuration framework + is common between fileutils, textutils, and sh-utils +[2.0c] +* include lib/nanosleep.h. +[2.0b] +* portability tweaks for error.c vs. systems with deficient strerror_r +[2.0a] +* `tail --follow=name' no longer gets a failed assertion for a + dev,inode-reusing race condition +* sort and comm no longer consider newlines to be part of the line, + as this requirement will likely be removed from POSIX.2. + This undoes some changes made for textutils 1.22m and 1.22n. +* tail's (short only) -f option no longer accepts an optional argument, + so e.g., `tail -fn 2 file' works again. +* tail no longer refuses to operate on certain types of files +* fixed bug in tsort's handling of cycles + +Changes in release 2.0 +[1.22q] +* HPUX portability fix: md5sum would dump core due to use of libc's getline +[1.22p] +* portability fixes from Paul Eggert based largely on tar-1.13 reports +* `tail --pid=PID' now works even when PID belongs to some other user +[1.22o] +* tail accepts new option: --pid=PID +[1.22n] +* tail accepts the following new options (some of which were added in 1.22g): + --retry + --follow[={name|descriptor}] + --max-unchanged-stats=N + --max-consecutive-size-changes=N + --sleep-interval=S +* wc uses the POSIX-mandated output format when POSIXLY_CORRECT is set +* To maintain compatibility with sort, comm and join now obey the LC_COLLATE + locale, and comm now considers newlines to be part of the lines. +* use lib/memchr.c only if it's not provided by the system -- this means + that on systems with a fast library memchr function you may notice an + improvement. If you use a system with a buggy or signifcantly slower + memchr, please report it. +[1.22m] +* sort now considers newlines to be part of the line, as required by POSIX.2. + E.g. a line starting with a tab now sorts before an empty line, + since tab precedes newline in the ASCII collating sequence. +* sort handles NUL bytes correctly when configured/compiled with --enable-nls +* fix typos in my version of AC_SEARCH_LIBS. +* fix dates on config files so builders don't need autoconf/automake +[1.22l] +* sort no longer autodetects the locale of numbers and months, + as that conflicts with POSIX.2 +* `join -tC' now works when input contains trailing spaces +* portability tweaks for Irix's cc +[1.22k] +* `sort -n' works with negative numbers when configured/compiled + with --enable-nls +* head accepts byte and line counts of type uintmax_t (so up to 2^64 - 1) +[1.22j] +* tail: fix bug introduced in 1.22i +[1.22i] +* tail now terminates in `yes > k & sleep 1; tail -2c k' +* `tail -f' now ensures that stdout is unbuffered +* fix a bug in cut to allow use of 8-bit delimiters +* pr accepts POSIX compliant options -s and -w, + the new capital letter options -J, -S and _W turn off the + unexpected interferences of the small letter options -s and -w + if used together with the column options. +* pr output has been adapted to other UNIXes in some cases. +[1.22h] +* portability tweaks +* Window/NT/DOS support +[1.22g] +* uniq accepts new option: --all-repeated (-D). +* Windows/DOS portability fixes +* new program: tsort +* tail has several new options +* md5sum can handle file names with embedded backslash characters +* pr accepts long option names (see `pr --help') +* new program: ptx (moved to this package from being its own distribution) +[1.22f] +* cut accepts new --output-delimiter=STR option +* `sort -o no-such-file no-such-file' now fails, as it should +* fix pr bug: pr -td didn't double space +* fix tac bug when using -b, -r, and -s SEPARATOR +* fix sort bug whereby using key-local `d' option would cause following + key specs to be ignored when any two keys (in the `d'-modified test) + compared equal. +[1.22e] +* remove maintainer mode +[1.22d] +* wc accepts new option: --max-line-length (-L) +* sort can sort according to your locale if your C library supports that +[1.22c] +[1.22b] +* od supports a new trailing `z' character in a type specification: + $ od -tx1z . + 0000000 be ef c6 0f fd f9 d7 e0 ec cb f3 c6 00 db e8 00 >................< + 0000020 00 00 d2 00 00 00 00 00 00 00 00 00 00 00 00 00 >................< + 0000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................< + * + 0000600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 35 cc >..............5.< + 0000620 05 63 76 74 2e 6f 00 00 29 ac 08 70 72 6f 6a 65 >.cvt.o..)..proje< + 0000640 63 74 73 00 00 00 18 9a 05 63 76 74 2e 63 00 00 >cts......cvt.c..< + 0000660 18 d9 03 52 43 53 00 00 18 c0 05 78 2e 64 61 74 >...RCS.....x.dat< + +[1.22a] +* sort -c reports both the number and the contents of the first out-of-order + line, in addition to the file name. +* `head -c 4096m' is no longer treated just like `head -c 0' + now it gets a diagnostic about 4096m being too large. +* pr: For compatibility (also more POSIX compliant): Include default + separator `TAB' when merging lines of full length. +* When POSIXLY_CORRECT is not set, tail -N now accepts more than one file + argument, to be consistent with the way head -N works. If POSIXLY_CORRECT + is set, using two or more file arguments with the obsolescent form (-N) + evokes an error. To avoid the warning or failure, use the POSIX -n N option + or the GNU --lines=N option. + +Changes in release 1.22 +[1.21a] +* Fix a bug in tail when invoked with an argument like `+NUMBERc' +* Add test suite for tail + +Changes in release 1.21 +* Using --program-prefix no longer applies the prefix twice + +Changes in release 1.20 +* fix pr: -l now uses total number of lines per page also with -f +* fix pr: use left-hand-side truncation of header string to avoid line + overflow +* fix pr: it now accepts `form feeds set in input files', also with -m + and multiple form feeds at different pages in each file +* pr now accepts: -h "", print a blank line header +* pr: when skipping pages (+FIRST_PAGE option) line counting (-n option) + starts with 1st line of input file (not of 1st page printed) by default +* pr accepts new option: -N, start printing with an optional line number +* pr -t retains `form feeds set in input files' (`don't destroy page layout') +* pr accepts new option: -T, equivalent to -t, but eliminate also form feeds + (`clear file') +* pr accepts the extension: +FIRST_PAGE[:LAST_PAGE] +* pr -w and -s option disentangled (`use a separator' no longer destroys + column alignment) +* pr accepts new option: -j, merge lines of full length +* pr accepts the extension: -s[STRING], use separator string instead of + character only +* pr -b is no longer an independent option, balancing is always used + with -COLUMN (a requirement of unrestricted use of form feeds) +* pr accepts new option: --test, to run the pr tests with a constant + header string +* join passes all of its tests on Alpha OSF 4.0. +* sort no longer improperly ignores blanks in determining starting and ending + positions for keys with explicit character offsets +* fix bug in csplit with regexp and negative offset that led to infinite loop + Changes in test release 1.19q +* fix bug in sort -c that sometimes resulted in a segfault + Changes in test release 1.19p +* md5sum's --string option is being deprecated and is no longer documented. + It is still accepted, but will be removed altogether in 1.22. +* tr '[:lower:]' '[:upper:]' no longer fails when LC_CTYPE is set to + iso_8859_1 on Solaris -- or any other character set with differing + numbers of uppercase and lowercase characters +* split and tail diagnose unrecognized multiplier suffixes, in e.g., + `split --bytes=1M' (should be `-b 1m' or `--bytes=1m') +* fix bug in md5sum's handling of partial reads +* fix bug in treatment by sort -f of bytes with high-bit set +* update configuration system to use automake's aclocal program +* configure performs sanity check on CC and CFLAGS to avoid a misleading + failure that suggested cross-compiling was the cause +* distribute test suites for cut, join, sort, and tr +* unexpand no longer gets in endless loop +* when verifying checksums, md5sum uses the binary mode flag from the + input stream rather than the one from the command line + +Changes in release 1.19 +* md5sum can verify digests of files with names containing newline characters +* update from gettext-0.10.20. + +Changes in release 1.18 +* when building sort, link with -lm on systems that use the replacement strtod +* update from gettext-0.10.17. + +Changes in release 1.17 +* include texinfo.tex in the distribution + +Changes in release 1.16 +* sort is compatible with Unix sort when a key-end spec refers to the N'th + character in a field that has fewer than N characters +* tail with old-style options like -20k and +31m operates on units of bytes, + as the --help usage message says. Before, it used units of lines. + +Changes in release 1.15 +* od gives better diagnostics for invalid format specs +* uses automake-generated Makefile templates +* configure takes a new option: --enable-maintainer-mode +* fix a bug in fmt when prefix has trailing white space +* internationalized diagnostic messages +* fix a couple bugs in tr involving use of -c and/or -d flags -- see ChangeLog +* diagnose some improper or questionable invocations of csplit +* properly handle `echo |csplit - 1 1', rather than aborting +* fix join: without -t it now ignores leading blanks +* sort accepts new option: -z for NUL terminated records +* join accepts new option: --ignore-case, -i +* uniq accepts new option: --ignore-case, -i + +User-visible changes in release 1.14 +* sort -i and sort -d properly order strings containing ignored characters +* nl: rename misleading --first-page=N option to --starting-line-number=N. +* sort diagnoses invalid arguments to -k, then fails +* sort -n properly orders invalid integers with respect to valid integers +* sorting works with character offsets larger than corresponding field width +* sort's -b option and `b' modifier work +* sort -k2,2 works. +* csplit detects integer overflow when converting command line arguments +* sort accepts new option/flag, -g, for sorting numbers in scientific notation +* join accepts POSIX `-o 0' field specifier. +* tr 'a[b*512]' '[a*]' < /dev/null terminates +* tr '[:*3][:digit:]' 'a-m' and tr 'a[=*2][=c=]' 'xyyz' no longer fail +* special characters in tr's string1 and string2 may be escaped with backslash + +User-visible changes in release 1.13 +* md5sum: with --check, distinguish between open/read failure and bad checksum +* md5sum: remove -h, -s, -v short options +* md5sum: rename --verbose to --warn, --quiet to --status +* md5sum --check fails if it finds no properly formatted checksum lines +* sort -c prints `disorder on...' message on standard error, not stdout +* sort -k works as described in the texinfo documentation +* tail works on NetBSD +* md5sum reads and writes (de facto) standard Plumb/Lankester format +* sort accepts -.1 +.2 options for compatibility +* od works properly when dump limit is specified and is a multiple of + bytes_per_block (set by --width, 16 by default). + +User-visible changes in release 1.12 +* sort no longer reports spurious errors on Ultrix systems +* new program: md5sum +* all --help messages have been improved +* join's -a1 and -a2 options work +* tr '[:upper:]' '[:lower:]' no longer reads uninitialized memory +* sort properly handles command line arguments like `+7.2n' +* fmt properly formats paragraphs not terminated by a newline +* tail -f flushes stdout before sleeping so that it will output partial + lines sooner +* sort properly orders fields where one field is a proper prefix of the other +* sort properly interprets field offsets specified via the -k option +* dd, od, and tail work on systems for which off_t is long long (e.g. BSD4.4) +* wc is faster when not counting words +* wc now works even when file pointer isn't at beginning of file +* expand no longer seg faults with very long tab lists + +User-visible changes in release 1.11 +* fmt is built + +User-visible changes in release 1.10 +* skeletal texinfo documentation (mainly just the `invoking' nodes) +* new program: fmt +* tail -f on multiple files reports file truncation +* tail -q has been fixed so it never prints headers +* wc -c is much faster when operating on non-regular files +* unexpand gives a diagnostic (rather than a segfault) when given a name of + a nonexistent file. +* cat, csplit, head, split, sum, tac, tail, tr, and wc no longer fail + gratuitously when continued after a suspended read or write system call. +* cut interprets -d '' to mean `use the NUL byte as the delimiter' rather + than reporting that no delimiter was specified and failing. +* `echo a:b:c: | cut -d: -f3,4' prints `c:'. Before it printed just `c'. +* cut has been rewritten, is markedly faster for large inputs, and passes a + fairly large test suite. +* sort properly handles the argument to the -T option. + +Major changes in release 1.9.1: +* cut no longer ignores the last line of input when that line lacks a + trailing newline character + +Major changes in release 1.9: +* `echo a:b:c: | cut -d: -f3-' prints `c:' and + `echo a:b | cut -d: -f1' prints `a'. +* the command `printf '\t\n' |fold -w n' now terminates. + Before, it wouldn't stop for n less than 8. +* sort accepts and ignores -y[string] options for compatibilty with Solaris. +* cat -v /dev/null works on more systems +* od's --compatible (-C) flag renamed to --traditional (no short option) +* --help and --version exit successfully +* --help gives a one-line description of each option and shows the + correspondence between short and long-named options. +* fix bug in cut. Now `echo 'a:b:c:' | cut -d: -f3-' works. + Before it printed `c' instead of `c:' +* csplit allows repeat counts to be specified via `{*}'. +* csplit accepts a new option, --suffix=format that supercedes the + --digits option. The --digits option will continue to work. +* csplit accepts a new option, --elide-empty-files. +* configure uses config.h, so DEFS won't exceed preprocessor limits of + some compilers on the number of symbols defined via -D. +* work around problem where $(srcdir)/config.h was used instead of + ../config.h -- this happened only when building in a subdirectory + and when config.h remained in $(srcdir) from a previous ./configure. + +Major changes in release 1.8: +* added non-ANSIfied version of memchr.c from GNU libc. + +Major changes in release 1.7: +* none +Major changes in release 1.6: +* with the --version option programs print the version and exit immediately +* pr -2a really terminates +* pr -n produces multi-column output + +Major changes in release 1.5: +* sort is 8-bit clean +* sort's -n and -M options no longer imply -b +* several bugs in sort have been fixed +* all programs accept --help and --version options +* od --compatible accepts pre-POSIX arguments +* pr -2a terminates + +Major changes in release 1.4: +* add od and cksum programs +* move cmp to GNU diff distribution +* tail -f works for multiple files +* pr prints the file name in error messages +* fix some off by 1 errors in pr and fold +* optimize wc -c on regular files +* sort handles `-' argument correctly +* sort supports -T option +* tr ranges like a-a work +* tr x '' fails gracefully +* default sum output format is BSD compatible +* paste -d '' works diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/po/ChangeLog b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/po/ChangeLog new file mode 100644 index 0000000..871d8e5 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/po/ChangeLog @@ -0,0 +1,104 @@ +2004-12-14 Jim Meyering <jim@meyering.net> + + * LINGUAS: Add Bulgarian (bg). + +2004-11-28 Jim Meyering <jim@meyering.net> + + * POTFILES.in: Add lib/openat.c. + +2004-10-11 Jim Meyering <jim@meyering.net> + + * fr.po: Fix two typos reported in http://bugs.debian.org/275924 + +2004-09-22 Jim Meyering <jim@meyering.net> + + * POTFILES.in: Remove lib/xmalloc.c. + Add lib/xalloc-die.c. + +2004-06-26 Jim Meyering <jim@meyering.net> + + * LINGUAS: Add Basque (eu). + +2004-04-16 Jim Meyering <jim@meyering.net> + + * fr.po: Correct typo in the french rendition of date's --help output: + s/%r/%R/. Patch by Nicolas Boulenguez. + +2004-03-02 Jim Meyering <jim@meyering.net> + + * LINGUAS: Add Afrikaans (af) + +2004-01-13 Jim Meyering <jim@meyering.net> + + * POTFILES.in: Replace src/sys2.h with src/system.h. + +2004-01-12 Jim Meyering <jim@meyering.net> + + * Makefile.in.in: Update from gettext-0.13.1. + +2003-11-09 Jim Meyering <jim@meyering.net> + + * POTFILES.in: Add lib/root-dev-ino.h. + +2003-10-17 Jim Meyering <jim@meyering.net> + + * POTFILES.in: Add lib/xfts.c. + +2003-09-22 Jim Meyering <jim@meyering.net> + + * Makevars (XGETTEXT_OPTIONS): Add --from-code=UTF-8 to accommodate the + non-ASCII comment to translators in ptx.c regarding the author's name. + +2003-08-27 Jim Meyering <jim@meyering.net> + + * Makefile.in.in: Update from gettext-0.12.2. + +2003-08-19 Jim Meyering <jim@meyering.net> + + * Makevars (MSGID_BUGS_ADDRESS): Define. + +2003-08-12 Jim Meyering <jim@meyering.net> + + * LINGUAS: Add Irish (ga). + +2003-07-11 Jim Meyering <jim@meyering.net> + + * POTFILES.in: Add src/nohup.c and src/setuidgid.c. + +2003-03-18 Jim Meyering <jim@meyering.net> + + * POTFILES.in: Remove lib/c-stack.c. + +2003-02-16 Jim Meyering <jim@meyering.net> + + * LINGUAS: Add Finnish (fi). + +2003-01-11 Jim Meyering <jim@meyering.net> + + * POTFILES.in: Add src/readlink.c. + +2002-11-21 Jim Meyering <jim@meyering.net> + + * LINGUAS: Add ms (Malay). + +2002-11-14 Jim Meyering <jim@meyering.net> + + * POTFILES.in: Remove lib/long-options.c and lib/same.c. + Although each defines `_', neither actually used it. + +2002-11-09 Jim Meyering <jim@meyering.net> + + * Makevars (EXTRA_LOCALE_CATEGORIES): Add LC_TIME. + Patch by Tim Waugh for Red Hat bug #73669. + +2002-09-25 gettextize <bug-gnu-gettext@gnu.org> + + * Makefile.in.in: Upgrade to gettext-0.11.5. + +2002-09-16 Jim Meyering <jim@meyering.net> + + * LINGUAS: Add be (Belarusian). + +2002-09-02 Jim Meyering <jim@meyering.net> + + * LINGUAS: Add lg (Luganda). diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/tests/README b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/tests/README new file mode 100644 index 0000000..58b11b4 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/tests/README @@ -0,0 +1,3 @@ +A note about Makefile.am.in. +It is used (usually only by the maintainer) to generate some of the +Makefile.am files in these subdirectories. diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/tests/join/TODO b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/tests/join/TODO new file mode 100644 index 0000000..265ea47 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/tests/join/TODO @@ -0,0 +1,2 @@ +rename tr-tests +make sure all test_names are distinct! diff --git a/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/tests/tr/TODO b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/tests/tr/TODO new file mode 100644 index 0000000..e1cffb7 --- /dev/null +++ b/coreutils-5.3.0-bin/contrib/coreutils/5.3.0/coreutils-5.3.0-src/tests/tr/TODO @@ -0,0 +1 @@ +Integrate tests from the files `range-tests' and `failures'. |