summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/lst.lib
Commit message (Collapse)AuthorAgeFilesLines
* Move all the remaining list functions into one C-file and removeharti2005-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>
* Clean up include files and file including. Split nonints.h into piecesharti2005-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>
* Instead of dynamically allocating list heads allocated them staticallyharti2004-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.
* Nobody actually checked the return codes from Lst_Append and Lst_Insertharti2004-12-093-41/+7
| | | | so don't return anything.
* Now that circular lists are gone remove stuff for them. Simplifyharti2004-12-081-10/+6
| | | | somewhat so that we can remove a local variable.
* No caller checks the return code from Lst_Remove, so don't return one.harti2004-12-081-29/+11
| | | | Simplify the algorithm now that circular lists are gone.
* Don't check the return code from Lst_Remove. There is no wayharti2004-12-081-5/+2
| | | | that the list's first element is not on the list.
* Remove return value from Lst_Concat. None of the callers ever checkedharti2004-12-081-35/+19
| | | | it. Remove stuff that was needed for circular lists.
* Don't free the second list in Lst_Concat for LST_CONCLINK; free itharti2004-12-081-3/+0
| | | | in the caller instead.
* Get rid of the sequential access feature of the lists. This was usedharti2004-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.
* Constify the arguments to the list compare function. This temporarilyharti2004-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)
* Typedefs of pointers to structs are evil. Make Lst and LstNode typedef ofharti2004-12-0715-37/+37
| | | | | | the structs itself not of pointers to them. This will simplify constification. Checked by: diff on the object files
* Make needs no circular lists so remove them from the list code.harti2004-12-0710-76/+22
|
* Remove a double test for the same ptr != NULL and use the officialharti2004-12-011-7/+6
| | | | macro for this; reorder an if.
* Stylification: missing spaces, extra space after function names, castsharti2004-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)
* Change a couple of the primitve list functions to be macros. This changesharti2004-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.
* Use typedefs for the types of the functions that are passed as argumentsharti2004-11-296-6/+6
| | | | | | to the list functions for better readability. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Merge the contents of lstInt.h into the public lst.h. This let's us getharti2004-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.
* Style: prototypes, un-register and remove some empty lines.harti2004-11-2625-133/+100
|
* Use __FBSDID in the lst.lib files, to match to main make(1) files. It isjmallett2002-10-0926-26/+26
| | | | | defined to __RCSID when bootstrapping, by the Makefile, but this change is for consistency
* Bit-width fields should be of type 'int'.jmallett2002-07-151-1/+1
|
* remove __Pimp2002-03-226-6/+6
|
* There's also no point in #typedef'ing void/char pointers. Accordingly,will2000-12-0218-32/+32
| | | | | | rip out ClientData/Address pointers and use standard types. Obtained from: OpenBSD
* There's no reason to use fancy forms of NULL. Replace all instanceswill2000-12-0221-87/+83
| | | | | | of NIL, NILLST, NILLGNODE, etc. with NULL. Obtained from: OpenBSD
* Use __RCSID()wsanchez2000-07-0926-52/+78
|
* $Id$ -> $FreeBSD$peter1999-08-2827-27/+27
|
* Merge style- and trivial- only changes from OpenBSD (dated 1999/07/29-19:55+1).hoek1999-08-171-2/+2
| | | | Obtained from: OpenBSD, sometimes indirected from NetBSD; myself
* Revert $FreeBSD$ to $Id$peter1997-02-2227-27/+27
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-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.
* O' to be bitten by CVS. Cleanup after importsteve1996-10-0828-58/+53
| | | | | | of Christos' version of make(1) and add Id's. Set straight by: Bruce Evans and Peter Wemm :)
* This commit was generated by cvs2svn to compensate for changes in r18764,steve1996-10-069-8/+66
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Import Christos Zoulas' version of NetBSD's make onto thesteve1996-10-0628-80/+250
| | | | | | | | | | | | vendor branch for reference. Obtained from: Christos Zoulas <christos@netbsd.org>
* | This commit was generated by cvs2svn to compensate for changes in r18756,peter1996-10-068-8/+8
|\ \ | |/ | | | | which included commits to RCS files with non-trunk default branches.
| * Import the 4.4BSD-Lite2 version of make onto the vendor branchpeter1996-10-0627-44/+51
| | | | | | | | | | "for reference". This doesn't change anything since all files have been touched.
* | Merge in NetBSD's changes to make(1). Changes include:steve1996-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
* | Remove trailing whitespace.rgrimes1995-05-3016-51/+51
| |
* | Bring in a number of changes from NetBSD's make, fixing quite a fewjkh1995-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)
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-2727-0/+2405
OpenPOWER on IntegriCloud