summaryrefslogtreecommitdiff
path: root/usr.bin/make/buf.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove inlining of functions that are used mostly in different object files.Roman Divacky2009-01-201-3/+3
| | | | | | | | | | | This gets rid of gnu89 style inlining. Also silence gcc by assigning two variables NULL. This lets use to remove NO_WERROR. Approved by: kib (mentor) Approved by: harti Notes: svn path=/head/; revision=187475
* Move the Boolean and ReturnStatus stuff from sprite.h to util.h andHartmut Brandt2005-05-131-1/+0
| | | | | | | | | get rid of sprite.h. Obtained from: DragonFlyBSD Notes: svn path=/head/; revision=146177
* Move the MAX macro to a util.h so it becomes usable in other modules.Hartmut Brandt2005-03-311-4/+0
| | | | | | | Suggested by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=144386
* Two new functions: Buf_Data() returns a reference to the data inHartmut Brandt2005-03-221-0/+23
| | | | | | | | | | | | the buffer and Buf_AppendBuf() appends a copy of one buffer to another buffer. Patch: 7.146,7.147 Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=143957
* Create a new function Buf_Peel that returns the string from insideHartmut Brandt2005-03-081-0/+19
| | | | | | | a Buffer and frees the Buffer. Notes: svn path=/head/; revision=143287
* Introduce Buf_StripNewLines() and use it where appropriate.Hartmut Brandt2005-02-071-0/+30
| | | | | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=141454
* Invent a Buf_AppendRange function that appends a non-NUL-terminated stringHartmut Brandt2005-02-071-0/+9
| | | | | | | | | | given by a pointer to the start of the string and a pointer one behind the end. Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=141437
* Invent a Buf_Append function to append a NUL-terminated stringHartmut Brandt2005-02-071-0/+10
| | | | | | | | | and use it thoughout the code. Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=141436
* Rewrite of the buf code:Hartmut Brandt2005-02-041-155/+87
| | | | | | | | | | | | | - convert Buf_AddByte from a macro to a function - move #define's into the header file - remove unused field in struct Buffer - remove size fields - they can be easily computed - inline Buf_OvAddByte Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=141290
* None of the users of Buf_Discard used it to get rid of only a part ofHartmut Brandt2005-02-041-25/+10
| | | | | | | | | | the buffer. So replace Buf_Discard by Buf_Clear which just gets rid of the entire contents. Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=141275
* Remove a couple of unused buffer functions.Hartmut Brandt2005-02-021-154/+0
| | | | | | | Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=141138
* Convert several typedefs from beeing pointers to structs to be the structsHartmut Brandt2005-02-021-13/+13
| | | | | | | | | | itself. This will ease constification (think of what 'const Ptr foo' means if Ptr is a pointer to a struct). Submitted by: Max Okumoto <okumoto@ucsd.edu> Notes: svn path=/head/; revision=141133
* Clean up include files and file including. Split nonints.h into piecesHartmut Brandt2005-02-011-3/+6
| | | | | | | | | | | | | | | | 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
* Remove an extra space.Hartmut Brandt2004-12-031-1/+1
| | | | | | | Submitted by: ru Notes: svn path=/head/; revision=138347
* Put macro arguments in paranthesis.Hartmut Brandt2004-12-031-1/+1
| | | | | | | Submitted by: johan Notes: svn path=/head/; revision=138342
* Make sizes to be of type size_t and correct function arguments thatHartmut Brandt2004-12-031-16/+16
| | | | | | | should be Byte (as the numerous casts to Byte in the function calls show). Notes: svn path=/head/; revision=138341
* Style: fix indentation, protect macro with do { } while (0).Hartmut Brandt2004-12-031-127/+126
| | | | | | | Checked with: diff on object file. Notes: svn path=/head/; revision=138337
* Style: remove a lot of unnecessary casts, add some and spell the nullHartmut Brandt2004-12-011-14/+15
| | | | | | | | | pointer constant as NULL. Checked by: diff -r on the object files before and after Notes: svn path=/head/; revision=138264
* Stylification: missing spaces, extra space after function names, castsHartmut Brandt2004-11-301-39/+40
| | | | | | | | | | | 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
* Convert make(1) to use ANSI style function declarations. VariableJuli Mallett2002-10-091-37/+13
| | | | | | | | | | | | | | documentation already adequatedly existed in the description in most cases. Where it did not, it was added. If no documentation existed beforehand, then none was added. Some unused dummies for use in the traversal functions were marked as __unused during the conversion. Occasionally, local style fixes were applied to lines already being modified or influenced. Now make(1) should always build with WARNS=3. Notes: svn path=/head/; revision=104696
* #define<space> -> #define<tab>Juli Mallett2002-09-171-5/+5
| | | | Notes: svn path=/head/; revision=103503
* Avoid classy use of a variable one time with a constant value.Juli Mallett2002-06-131-2/+1
| | | | Notes: svn path=/head/; revision=98164
* Fix copyrights, and undo SCS ID damage.David E. O'Brien2002-04-131-1/+2
| | | | Notes: svn path=/head/; revision=94589
* Update SCM ID method.David E. O'Brien2002-04-131-3/+1
| | | | Notes: svn path=/head/; revision=94587
* De'register.David E. O'Brien2002-04-131-9/+9
| | | | Notes: svn path=/head/; revision=94584
* Use __RCSID()Wilfredo Sanchez2000-07-091-6/+4
| | | | Notes: svn path=/head/; revision=62833
* Unduplicate IDs from comments, do $Id -> $FreeBSD$ (submitted-by: bde)Tim Vanderhoek1999-09-111-3/+1
| | | | Notes: svn path=/head/; revision=51150
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | 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-3/+8
| | | | | | | Obtained from: OpenBSD, sometimes indirected from NetBSD; myself Notes: svn path=/head/; revision=49938
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=23006
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | 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-081-0/+2
| | | | | | | | | of Christos' version of make(1) and add Id's. Set straight by: Bruce Evans and Peter Wemm :) Notes: svn path=/head/; revision=18804
* Merge in NetBSD's changes to make(1). Changes include:Steve Price1996-10-061-1/+1
| | | | | | | | | | | | | | | | | | | - 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
* Fix for PR# 1095, make's continuation line handling buggySteve Price1996-09-221-0/+25
| | | | | | | | | | when used with .elif. Additional fixes include: - fix continuation line handling when using .for - plug up a memory leak Notes: svn path=/head/; revision=18456
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-4/+4
| | | | Notes: svn path=/head/; revision=8874
* Bring in a number of changes from NetBSD's make, fixing quite a fewJordan K. Hubbard1995-01-231-4/+4
| | | | | | | | | | | | | | | 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-271-0/+436
Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=1590