Commit Graph

10047 Commits

Author SHA1 Message Date
dholland ee1b2317fb fix typo in comment 2008-12-13 18:11:53 +00:00
dsl 8a143811b9 Use NULL instead of -1 cast to the relavant type (usually via NIL).
This was a suggestion from christos - so blame him if there is a deep
reason for using -1 :-)
2008-12-13 15:19:29 +00:00
dsl 40e0ab7a8f Do not let the variable name "" be set from the command line (-D "")
or from ::= modifiers (${::=foo}).
2008-12-13 14:26:10 +00:00
seanb 914c0c04ad - Malformed multicast option not being checked
for correctly.  Could fault client.
- 'mc' (master client) field not being examined
  properly.  Actually looking at addr field so
  proably always working out to non 0 (master).
2008-12-11 18:40:02 +00:00
wiz 3ec1800aa0 Add RCS Id. Sort sections. Sort option descriptions. Use .Aq. Fix Dd argument. 2008-12-11 12:39:41 +00:00
roy aa75124521 Add the tabs utility, conforming to IEEE Std 1003.1 (``POSIX.1'').
Fixes PR bin/11227

No objection on tech-userland, ok: martin
2008-12-11 11:14:36 +00:00
joerg 7d8b9145a5 Ignore restrict in the contexts where const and volatile is allowed.
No validation for the use (e.g. that it is used on a pointer), but
enough to not stop valid C99 programs.
2008-12-10 16:12:39 +00:00
lukem 0fa62d4185 Fix dependencies for vi.info 2008-12-09 23:49:42 +00:00
wiz be47919875 Spelling fixes. 2008-12-08 11:32:18 +00:00
christos c78e2d1227 PR/1880: Jim Barnard: Don't parse backslash escaped characters inside single
quoted strings.
2008-12-07 19:21:00 +00:00
christos c6f8f3a3b2 PR/1880: Jim Barnard: Pass backslash escaped characters unintepreted inside
single quoted strings. Document new behavior, and its relationship with POSIX.
2008-12-07 19:17:09 +00:00
christos c6121a89c8 explain compatibility mode better. 2008-12-07 16:10:34 +00:00
christos 6694d6b5ac add debug flag for cwd. 2008-12-07 04:50:15 +00:00
christos ba7207e4b2 WARNS=4 2008-12-05 22:51:42 +00:00
lukem 95d5ba4ee0 correct a comment 2008-12-05 05:28:12 +00:00
dsl f8be892cab Correct some comments. 2008-12-01 21:05:21 +00:00
christos 132080e4f9 fix off-by-one allocation. functional change intended... 2008-12-01 19:35:55 +00:00
wiz 2c1752b597 Really comment out uucp(1) crossref. 2008-12-01 06:52:59 +00:00
dholland 1f595bc8ca Update SEE ALSO per PR 40071: compress -> gzip, add missing tar, comment
out uucp because uucp was removed from base. (Though maybe it should be
left in anyway - it belongs as a crossreference for historical reasons.)

It doesn't seem to me that every tool used in an example must
necessarily appear in SEE ALSO, but it doesn't particularly hurt.
2008-11-30 23:22:46 +00:00
dsl 1e7b0ea1a2 Simplify somewhat the code that parses .for lines.
Use malloc to allocate space for teh strings (instead of a buf structure)
to make it mossible to not leak the associated memory (leak not fixed!).
No functional change intended.
2008-11-30 22:37:55 +00:00
dholland 6a8d114c5f Modernize and expand example. Bump date. 2008-11-29 22:42:53 +00:00
dholland 2ef1dd5f7a Sync usage message with man page. PR 40063. 2008-11-29 22:36:57 +00:00
dholland 75cd00a06a Clarify man page with respect to input and output files, and sync usage
message. Prompted by PR 40063 about the usage message.
2008-11-29 22:36:13 +00:00
dsl 6cb9ef7eef Split For_Eval() into two functions.
For_Eval() is now only called for the first line of a .for.
For_Accum() is called for the subsequent lines.
Stops any problems with forLevel being left invalid after an error.
Use a return value of -1 from For_Eval() to mean 'skip input line' to stop
a .for line with a syntax error being reparsed by make.
2008-11-29 17:50:11 +00:00
dsl 34a8d95d66 Before deciding to use the default function in a .if, check whether the
token that follows the argument might be '==' or '!='.
If so then treat as a string comparison instead.
Fixes bin/15233 and bin/30967 provided some whitespace is present.
".if A==A" remains a check for defined(A==A) since make places no
restrictions on the names of variables!
2008-11-29 14:42:21 +00:00
dsl b8ee15c2f2 Common up parsing .if defined() make() exists() target() commands() and empty()
Add a check for the '(' following the function name, if absent then treat
as if the function name is unknown - usually leading to a syntax error.
No other functional changes intended.
2008-11-29 14:12:48 +00:00
reed b9585ffded May have multiple files on command line.
Fixed PR #40058.
2008-11-28 20:30:05 +00:00
dholland 76eef63f94 Add missing fflush() in one of three places that print stuff repeatedly
every so often. PR 32836 from Takuro KUBOTA.
2008-11-28 05:58:22 +00:00
wiz b410c46dc5 I think ':' is called "colon", not "column" :) 2008-11-26 19:08:05 +00:00
ginsbach bfd03efd21 new sentence, new line 2008-11-26 15:03:47 +00:00
christos 53200e2e77 PR/40026: Aleksej Saushev: make(1) doesn't document VPATH, document it. 2008-11-25 20:34:19 +00:00
dsl 19426b3536 Do a string compare if the rh argument doesn't completely convert to a number
(instead of silently ignoring the chars that failed to convert).
Use strtoul() instead of homebrew copy.
Only use strtod() if strtoul() fails because the value is too large or
contains '.', 'e' or 'E'.
Do a compare for strings that start '-' or '+' as well as digits.
2008-11-23 10:52:58 +00:00
dholland 1b3d4050d6 Two robustness fixes:
(1) make ridiculously small filename buffer larger;
   (2) don't accidentally try to generate files with names containing '/'.
2008-11-23 09:13:20 +00:00
dsl 83146d79d6 Fix conversion of hex numerics in comparisons.
Broken by a fix from christos 14 years ago.
2008-11-22 23:42:16 +00:00
dsl 1d48e86ec4 Move two great chunks of code out of a switch statement and into
separate functions.
No functional change.
2008-11-22 18:47:47 +00:00
dsl 8ea16b81f0 If there is a syntax error in a .if expression then ignore the entire
conditional block (ie down to the matching .endif) instead of passing
the input line back to the normal parsing code.
Do the same if the maximum .if nesting (64 levels) is breached.
2008-11-22 18:05:13 +00:00
dsl feafbbe6e5 Convert ADDWORD() to do { ... } while (0) 2008-11-22 17:34:56 +00:00
dsl 66da2b26ce Convert Buf_AddByte(0 to a more normal do { ... } while (0) form. 2008-11-22 17:33:57 +00:00
ginsbach 66acf4d33d Add newgrp(1) to SEE ALSO cross-reference list. 2008-11-19 17:56:53 +00:00
wiz cc64f2edab Use Nm instead of Xr to itself, remove reference to uucp(1), fix casing
of Kerberos.
2008-11-18 15:52:57 +00:00
reed 3e3e695194 Reference login.conf. 2008-11-18 13:02:51 +00:00
dholland 3c6470e287 WARNS=4 2008-11-16 07:06:37 +00:00
dholland 590d8d204a One leftover trailing whitespace, caused by a merge botch at my end. 2008-11-16 05:41:39 +00:00
dholland cd4574a9b3 Further cleanup. Merge a bit of duplicate code. Don't roll private copies
of str(l)cpy or rename; check said rename for failure. Set WARNS=4.
2008-11-16 05:30:24 +00:00
dholland 0f92d2c5da Avoid running off the end of the name buffer when extracting a filename
from the program text.
2008-11-16 05:20:11 +00:00
dholland 671fb7b07e Clean up argument handling.
- Use getopt instead of rolling one's own.
 - Don't copy the -e arguments unnecessarily, and specifically, don't
   copy them into a small static buffer and zoom off the end.
 - Don't zoom off the end of the array of -e option files, either.
2008-11-16 05:11:35 +00:00
dholland 7327b827a5 C has a neat feature called a 'struct'. Use one, instead of
FORTRAN-style parallel arrays.
2008-11-16 04:51:27 +00:00
dholland d790f1327a Index arrays according to customary C idioms, instead of a weird mix of
C and FORTRAN thinking.
2008-11-16 04:39:34 +00:00
dholland ccc5f71f77 Avoid using side-effecting macros. 2008-11-16 04:27:31 +00:00
dholland d07cca5113 Scratch variables shouldn't be global. 2008-11-16 04:21:24 +00:00