aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/make/lst.lib
Commit message (Collapse)AuthorAgeFilesLines
* Move all the remaining list functions into one C-file and removeHartmut Brandt2005-02-0110-970/+0
| | | | | | | | | | double documentation comments. Remove the 3rd clause (from 4) of the BSD license because these files have only the UCB copyright. Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=141115
* Clean up include files and file including. Split nonints.h into piecesHartmut Brandt2005-02-0110-1/+33
| | | | | | | | | | | | | | | | that get included just where they are needed. All headers include the headers that they need to compile (just with an empty .c file). Sort includes alphabetically where apropriate and fix some duplicate commenting for struct Job, struct GNode and struct Shell by removing one version and inlining the comments into the structure declaration (the comments have been somewhat outdated). This patch does not contain functional changes (checked with md5). Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=141104
* Instead of dynamically allocating list heads allocated them staticallyHartmut Brandt2004-12-164-112/+11
| | | | | | | | | | | now that their size is only two pointers. This eliminates a lot of calls to Lst_Init and from there to malloc together with many calls to Lst_Destroy (in places where the list is obviously empty). This also reduces the chance to leave a list uninitilized so we can remove more NULL pointer checks and probably eliminates a couple of memory leaks. Notes: svn path=/head/; revision=138916
* Nobody actually checked the return codes from Lst_Append and Lst_InsertHartmut Brandt2004-12-093-41/+7
| | | | | | | so don't return anything. Notes: svn path=/head/; revision=138629
* Now that circular lists are gone remove stuff for them. SimplifyHartmut Brandt2004-12-081-10/+6
| | | | | | | somewhat so that we can remove a local variable. Notes: svn path=/head/; revision=138581
* No caller checks the return code from Lst_Remove, so don't return one.Hartmut Brandt2004-12-081-29/+11
| | | | | | | Simplify the algorithm now that circular lists are gone. Notes: svn path=/head/; revision=138577
* Don't check the return code from Lst_Remove. There is no wayHartmut Brandt2004-12-081-5/+2
| | | | | | | that the list's first element is not on the list. Notes: svn path=/head/; revision=138567
* Remove return value from Lst_Concat. None of the callers ever checkedHartmut Brandt2004-12-081-35/+19
| | | | | | | it. Remove stuff that was needed for circular lists. Notes: svn path=/head/; revision=138566
* Don't free the second list in Lst_Concat for LST_CONCLINK; free itHartmut Brandt2004-12-081-3/+0
| | | | | | | in the caller instead. Notes: svn path=/head/; revision=138565
* Get rid of the sequential access feature of the lists. This was usedHartmut Brandt2004-12-086-365/+0
| | | | | | | | | | | only in a couple of places and all of them except for one were easily converted to use Lst_First/Lst_Succ. The one place is compatibility mode in job.c where the it was used to advance to the next command on each invocation of JobStart. For this case add a pointer to the node to hold the currently executed command. Notes: svn path=/head/; revision=138564
* Constify the arguments to the list compare function. This temporarilyHartmut Brandt2004-12-081-1/+1
| | | | | | | | | | | requires to make a copy of the filename in ReadMakefile and to duplicate two small functions in suff.c. This hopefully will go away when everything is constified. Submitted by: Max Okumoto <okumoto@ucsd.edu> (partly) Notes: svn path=/head/; revision=138561
* Typedefs of pointers to structs are evil. Make Lst and LstNode typedef ofHartmut Brandt2004-12-0715-37/+37
| | | | | | | | | the structs itself not of pointers to them. This will simplify constification. Checked by: diff on the object files Notes: svn path=/head/; revision=138512
* Make needs no circular lists so remove them from the list code.Hartmut Brandt2004-12-0710-76/+22
| | | | Notes: svn path=/head/; revision=138510
* Remove a double test for the same ptr != NULL and use the officialHartmut Brandt2004-12-011-7/+6
| | | | | | | macro for this; reorder an if. Notes: svn path=/head/; revision=138273
* Stylification: missing spaces, extra space after function names, castsHartmut Brandt2004-11-3012-27/+28
| | | | | | | | | | | and the sizeof operator, missing empty lines, void casts, extra empty lines. Checked by: diff on make *.o lst.lib/*.o Submitted by: Max Okumoto <okumoto@soe.ucsd.edu> (partly) Notes: svn path=/head/; revision=138232
* Change a couple of the primitve list functions to be macros. This changesHartmut Brandt2004-11-3010-740/+0
| | | | | | | | | the semantic of Lst_Datum which formerly returned NULL when the argument node was NULL. There was only one place in the source that relied on this so change that place. Notes: svn path=/head/; revision=138222
* Use typedefs for the types of the functions that are passed as argumentsHartmut Brandt2004-11-296-6/+6
| | | | | | | | | to the list functions for better readability. Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=138192
* Merge the contents of lstInt.h into the public lst.h. This let's us getHartmut Brandt2004-11-2927-350/+170
| | | | | | | | | | rid of a lot of uneccesary casts and temporary variables that have just obfuscated the code. This also let's us implement a couple of the one- liner list functions as macros (the first one is Lst_IsEmpty) and simplify life once we start to throw consts on the code. Notes: svn path=/head/; revision=138185
* Style: prototypes, un-register and remove some empty lines.Hartmut Brandt2004-11-2625-133/+100
| | | | Notes: svn path=/head/; revision=138111
* Use __FBSDID in the lst.lib files, to match to main make(1) files. It isJuli Mallett2002-10-0926-26/+26
| | | | | | | | defined to __RCSID when bootstrapping, by the Makefile, but this change is for consistency Notes: svn path=/head/; revision=104694
* Bit-width fields should be of type 'int'.Juli Mallett2002-07-151-1/+1
| | | | Notes: svn path=/head/; revision=100037
* remove __PWarner Losh2002-03-226-6/+6
| | | | Notes: svn path=/head/; revision=92921
* There's also no point in #typedef'ing void/char pointers. Accordingly,Will Andrews2000-12-0218-32/+32
| | | | | | | | | rip out ClientData/Address pointers and use standard types. Obtained from: OpenBSD Notes: svn path=/head/; revision=69531
* There's no reason to use fancy forms of NULL. Replace all instancesWill Andrews2000-12-0221-87/+83
| | | | | | | | | of NIL, NILLST, NILLGNODE, etc. with NULL. Obtained from: OpenBSD Notes: svn path=/head/; revision=69527
* Use __RCSID()Wilfredo Sanchez2000-07-0926-52/+78
| | | | Notes: svn path=/head/; revision=62831
* $Id$ -> $FreeBSD$Peter Wemm1999-08-2827-27/+27
| | | | Notes: svn path=/head/; revision=50477
* Merge style- and trivial- only changes from OpenBSD (dated 1999/07/29-19:55+1).Tim Vanderhoek1999-08-171-2/+2
| | | | | | | Obtained from: OpenBSD, sometimes indirected from NetBSD; myself Notes: svn path=/head/; revision=49938
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-2227-27/+27
| | | | Notes: svn path=/head/; revision=23006
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-1427-27/+27
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* O' to be bitten by CVS. Cleanup after importSteve Price1996-10-0828-58/+53
| | | | | | | | | of Christos' version of make(1) and add Id's. Set straight by: Bruce Evans and Peter Wemm :) Notes: svn path=/head/; revision=18804
* This commit was generated by cvs2svn to compensate for changes in r18764,Steve Price1996-10-069-8/+66
|\ | | | | | | | | | | | | which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=18765
| * Import Christos Zoulas' version of NetBSD's make onto theSteve Price1996-10-0628-80/+250
| | | | | | | | | | | | | | | | | | vendor branch for reference. Obtained from: Christos Zoulas <christos@netbsd.org> Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=18764
* | This commit was generated by cvs2svn to compensate for changes in r18756,Peter Wemm1996-10-068-8/+8
|\| | | | | | | | | | | | | which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=18757
| * Import the 4.4BSD-Lite2 version of make onto the vendor branchPeter Wemm1996-10-0627-0/+2412
| | | | | | | | "for reference". This doesn't change anything since all files have been touched. Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=18756
* Merge in NetBSD's changes to make(1). Changes include:Steve Price1996-10-062-3/+5
| | | | | | | | | | | | | | | | | | | - Add the .PHONY, .PARALLEL, and .WAIT directives - Added the -B and -m commandline flags - misc. man page cleanups - numerous job-related enhancements - removed unused header file (bit.h) - add util.c for functions not found in other envs. - and a few coordinated whitespace changes Special thanks to Christos Zoulas <christos@netbsd.org> for help in the merge. A 'diff -ur' between Net and FreeBSD now only contains sccsid-related diffs. :) Obtained from: NetBSD, christos@netbsd.org, and me Notes: svn path=/head/; revision=18730
* Remove trailing whitespace.Rodney W. Grimes1995-05-3016-51/+51
| | | | Notes: svn path=/head/; revision=8874
* Bring in a number of changes from NetBSD's make, fixing quite a fewJordan K. Hubbard1995-01-236-17/+24
| | | | | | | | | | | | | | | problems in the process: 1. Quoting should work properly now. In particular, Chet's reported bash make problem has gone away. 2. A lot of memory that just wasn't being free'd after use is now freed. This should cause make to take up a LOT less memory when dealing with archive targets. 3. Give proper credit to Adam de Boor in a number of files. Obtained from: NetBSD (and Adam de Boor) Notes: svn path=/head/; revision=5814
* BSD 4.4 Lite Usr.bin SourcesRodney W. Grimes1994-05-2727-0/+2405
Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=1590