aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
...
* Make the three versions of fork() more uniform.Hartmut Brandt2005-05-101-63/+63
| | | | | | | | Patch: 7.201 (idea taken, but done differently) Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146058
* Move the defines for TMPPAT and KQUEUE from the public job.h into job.cHartmut Brandt2005-05-102-12/+12
| | | | | | | | | | since they are used only there. Patch: 7.200 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146057
* Merge compat.c into job.c. There is a lot in common between theseHartmut Brandt2005-05-106-820/+709
| | | | | | | | | | files and we are going to factor this out. Patch: 7.199 (slightly changed) Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146056
* Add option -l, to make output line buffered.Gleb Smirnoff2005-05-102-5/+11
| | | | | | | | | PR: bin/78692 Submitted by: Eugene Grosbein MFC after: 2 weeks Notes: svn path=/head/; revision=146055
* Move Cmd_Exec() from main.c to job.c and fix its prototype. ThisHartmut Brandt2005-05-105-110/+114
| | | | | | | | | | results in a warning that will go away soon. Patch: 7.198 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146054
* Var_SubstOnly() is only used to subsitute a variable from the globalHartmut Brandt2005-05-103-4/+4
| | | | | | | | | | | context (and only in one place to substitute the .for variable). Therefor there is no need to pass the context as a parameter. Patch: 7.197 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146048
* Move the declaration of VAR_CMD and VAR_GLOBAL from globals.h to var.hHartmut Brandt2005-05-102-6/+6
| | | | | | | | Patch: 7.196 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146047
* Clean up comments. No code changes.Hartmut Brandt2005-05-101-194/+128
| | | | | | | | Patch: 7.195 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146046
* Merge var_modify.c into var.c and move types and function declarationsHartmut Brandt2005-05-104-691/+602
| | | | | | | | | | that are now used only in var.c from var.h to var.c Patches: 7.193,7.194 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146045
* Move some debugging code from targ.c to var.c where it actually belongs.Hartmut Brandt2005-05-103-10/+14
| | | | | | | | Patch: 7.192 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146039
* Make make a little bit more POSIXish with regard to option parsing:Hartmut Brandt2005-05-103-12/+64
| | | | | | | | | | | | | | | | | | take everything after -- as either a macro assignment or a target. Note that make still reorders arguments before --: anything starting with a dash is considered an option, anything which contains an equal sign is considered a macro assignment and everything else a target. This still is not POSIX with regard to the options, but it will probably not change because it has been make's behaviour for ages. Add a new function Var_Match() that correctly skips a macro call by just doing the same as Var_Subst() but without producing output. This will help making the parser more robust. Patches: 7.190,7.191 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146038
* Split Var_Subst() into two functions: Var_SubstOnly() which substitutesHartmut Brandt2005-05-099-163/+174
| | | | | | | | | | | | | only one variable and Var_Subst() which substitutes all. Split out the test whether a variable should not be expanded into match_var(). Make access to the input string consistently using str[]. Remove two unused functions: Var_GetTail() and Var_GetHead(). Patches: 7.184-7.189 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=146027
* Clarify some error messages.Tim Kientzle2005-05-084-8/+8
| | | | Notes: svn path=/head/; revision=145997
* Introduce a new pseudo-target .EXPORTVAR which allows to put aHartmut Brandt2005-05-065-94/+119
| | | | | | | | | | | | | | | | | | | | | make macro into the environment of programs executed by make. This has approximately the same function as gmake's export directive. The form of a pseudo target was deliberately choosen to minimize work for POSIX compatibility (Makefiles are not allowed to use any targets starting with a dot and consisting only of uppercase letters except those specified in the standard when they want POSIX compatible behaviour, so such a Makefile can never contain .EXPORTVAR.) Change the handling of macros coming from the environment: instead of asking the environment for each variable we could not find otherwise put all the environment variables in a special variable environment just at start up. This has been tested on the ports cluster by kris. Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=145971
* Make smbfs capable to use 16bit char set in filenames.Takanori Watanabe2005-05-041-2/+2
| | | | | | | PR:78110 Notes: svn path=/head/; revision=145872
* Enabke mkuzip(1) on amd64.Maxim Sobolev2005-05-021-0/+1
| | | | | | | Submitted by: Matteo Riondato <rionda@gufi.org> Notes: svn path=/head/; revision=145809
* Make WARNS=6 clean, which should make it compiling on amd64.Maxim Sobolev2005-05-022-4/+4
| | | | | | | Submitted by: Matteo Riondato <rionda@gufi.org> Notes: svn path=/head/; revision=145808
* Make brandelf(1)'s -t "ABI format" case insensitive, as the ABI valueBrian Feldman2005-05-021-1/+1
| | | | | | | | | | | | given is looked up in a table and no longer stored literally in the header. Submitted by: Divacky Roman <xdivac02@stud.fit.vutbr.cz PR: 80499 MFC After: 1 month Notes: svn path=/head/; revision=145807
* Include systat.h for cmdtab, to make gcc4 happy.Xin LI2005-05-021-0/+1
| | | | Notes: svn path=/head/; revision=145800
* Consistently use signed char so gcc4 won't complainXin LI2005-05-021-1/+1
| | | | Notes: svn path=/head/; revision=145798
* Rename the directive_hash.[ch] files to hash_tables.[ch] nowHartmut Brandt2005-04-294-11/+10
| | | | | | | | | | that there are more than one hash table in them. There is no history to preserve here, so go without a repo-copy. Asked for by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=145683
* Implement a pseudo-target .WARN that allows toggeling the warning flagsHartmut Brandt2005-04-296-32/+109
| | | | | | | | for the current make. This does not override flags specified on the command line and these settings are not passed to sub-makes. Notes: svn path=/head/; revision=145679
* Add flag to choose whether to use getgrouplist(3) or getgroups(2)Robert Drehmel2005-04-291-6/+11
| | | | | | | | | | | | to the id_print() function. Use getgrouplist(3) for the case when an user was specified, and getgroups(2) when no user was given. That reverts to the expected behaviour and makes it easy to implement an option later to force using getgrouplist(3). Notes: svn path=/head/; revision=145672
* Fix spelling error.Robert Drehmel2005-04-291-1/+1
| | | | Notes: svn path=/head/; revision=145671
* We need to pass NGROUPS + 1 to getgrouplist(3) to displayRobert Drehmel2005-04-281-1/+1
| | | | | | | | | NGROUPS groups. getgrouplist(3) may put a duplicate group id into the passed array (it sets [0] and [1] to the value of the gid argument), but id_print() sorts them out. Notes: svn path=/head/; revision=145629
* - Merge two functions for printing `id' output.Robert Drehmel2005-04-281-57/+33
| | | | | | | | | | | | | | | Showing the ids of both an user given by an argument to `id', and the current user, is now handled in a single function. Displaying the current user's ids was inaccurate because getgroups(2) had been used. getgroups(2) returns the current kernel state of a user's groups, which may not always be correct if /etc/group was recently changed. - Fix a few style bugs. PR: bin/78085 Notes: svn path=/head/; revision=145628
* Introduce a flag to enable extended warnings (-x) and make them offHartmut Brandt2005-04-284-8/+31
| | | | | | | | by default. This should fix the problem of getting lots of errors when building with an up-to-date make and old *.mk files. Notes: svn path=/head/; revision=145627
* - Set negative row or column argument values to zero.Robert Drehmel2005-04-281-3/+5
| | | | | | | | | | | | Negative values would produce undefined behaviour including a possible segmentation fault. - Explicitly initialize the global row and column variables to zero. PR: bin/80348 Notes: svn path=/head/; revision=145617
* Use a minimal perfect hash for the special sources/targets too. AddHartmut Brandt2005-04-284-49/+114
| | | | | | | the corresponding magic to create the hash function to the Makefile. Notes: svn path=/head/; revision=145616
* Fix the $$FreeBSD$$ that should be written verbatim to directive_hash.cHartmut Brandt2005-04-282-2/+2
| | | | | | | so that it doesn't get replaced with the Makefile's revision. Notes: svn path=/head/; revision=145614
* Move the hash function for directives into its own file and addHartmut Brandt2005-04-284-67/+160
| | | | | | | | | | | | a Makefile target to re-created this file. Note, that there is no explicite dependency to automatically re-create the file, because this is needed only when the directive table changes and it requires the (yet to come) devel/mph port. Submitted by: Max Okumoto <okumoto@ucsd.edu> (first version) Notes: svn path=/head/; revision=145612
* bsdtar now uses the "tree" package instead of "fts" for walkingTim Kientzle2005-04-247-1518/+743
| | | | | | | directory heirarchies. Notes: svn path=/head/; revision=145471
* Correct autoconf/automake invocation to work with devel/gnu-auto* fromTim Kientzle2005-04-231-2/+2
| | | | | | | | | ports. Thanks to: Dag-Erling Sm?rgrav (des@) Notes: svn path=/head/; revision=145458
* Minor fix to the configure logic to properly detect ACL support.Tim Kientzle2005-04-231-2/+1
| | | | Notes: svn path=/head/; revision=145457
* Overhaul getdate.y. In particular, remove minutes-based logicTim Kientzle2005-04-231-686/+574
| | | | | | | | | | | | | | | | (combine with existing seconds-based), treat '-' as punctuation rather than a negative number indicator (eliminates several special cases), use a single list of special words instead of several separate lists, use table-driven abbreviation logic (eliminate duplicate word entries and special-case abbreviation and plural handling). The result is shorter, simpler (judging from comments, earlier maintainers didn't understand the special handling for "negative years"), handles more cases (e.g., "tu" is now a recognized abbreviation for "tuesday", "3rd" is now equivalent to "third") and it has 2 fewer shift/reduce conflicts. Notes: svn path=/head/; revision=145456
* Point users to tcsh(1) for information about shell globbing patterns,Murray Stokely2005-04-191-1/+2
| | | | | | | | | rather than 'XXXX'. MFC after: 1 week Notes: svn path=/head/; revision=145284
* MFS revision 1.139.2.4 (add edwin) because I accidentally committed toColin Percival2005-04-181-0/+1
| | | | | | | | | RELENG_5 instead of HEAD. Pointy hat to: The large pile of hats over in the corner. Notes: svn path=/head/; revision=145215
* A very minor tweak to the handling of leading '/' characters.Tim Kientzle2005-04-171-1/+6
| | | | Notes: svn path=/head/; revision=145207
* A number of fixes to the autoconf-generated build system. InTim Kientzle2005-04-175-30/+120
| | | | | | | | | | | particular, acl support is no longer enabled on FreeBSD 4, acl support should be correctly enabled on Linux, dirent.d_namlen should be correctly detected on platforms that support it. Thanks to: Greg Lewis, Juergen Lock, and Jaakko Heinonen Notes: svn path=/head/; revision=145206
* Configure script needs to test for dirent.d_namlen.Tim Kientzle2005-04-171-1/+1
| | | | | | | Thanks to: Juergen Lock Notes: svn path=/head/; revision=145204
* Update "make distfile" to use newest automake/autoconf from ports.Tim Kientzle2005-04-171-2/+2
| | | | | | | Thanks to: Juergen Lock Notes: svn path=/head/; revision=145203
* Support path-rewriting options (including --strip-components) for bothTim Kientzle2005-04-176-90/+115
| | | | | | | | | extraction and creation. While I'm here, fix a bug reported by Garrett Wollman: when stripping the leading '/' from the path "/", don't produce an entry with an empty name; produce "." instead. Notes: svn path=/head/; revision=145199
* Reduce the width of the THR column to 4 characters, to avoid wrap-aroundGiorgos Keramidas2005-04-161-5/+5
| | | | | | | | | | | of lines in SMP machines (which are wider), until we have a better way of handling window sizes & columns in top. Caught by: ache, Andre Guibert de Bruet <andy@siliconlandmark.com> Point hat: keramida Notes: svn path=/head/; revision=145155
* Update the bugs section, null characters in the format string are now handled.Stefan Farfeleder2005-04-141-6/+4
| | | | Notes: svn path=/head/; revision=145084
* Handle null characters in the format string. A \0 in the argument passed to %bStefan Farfeleder2005-04-141-7/+13
| | | | | | | still results in trucation but this is be much harder to fix. Notes: svn path=/head/; revision=145078
* No reason to write \a and \v as octal escape sequences.Stefan Farfeleder2005-04-141-2/+2
| | | | Notes: svn path=/head/; revision=145074
* - Add a THR column to the process listing, that shows the number ofGiorgos Keramidas2005-04-141-12/+57
| | | | | | | | | | | | threads a process has. The THR column is disabled and disappears when 'H' is hit, because then every thread gets its own output line. - Allow sorting processes by "threads". Approved by: davidxu Inspired by: Jiawei Ye <leafy7382@gmail.com> Notes: svn path=/head/; revision=145073
* Printf(1) is WARNS 6 clean.Stefan Farfeleder2005-04-141-0/+1
| | | | Notes: svn path=/head/; revision=145063
* - Move parts of the long main() function into a new function doformat().Stefan Farfeleder2005-04-141-153/+160
| | | | | | | - Rewrite the loop in main() to be more understandable. Notes: svn path=/head/; revision=145061
* Assign 0.0 to the variable passed to getfloating() if the argument is missing.Stefan Farfeleder2005-04-131-1/+3
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=145027