Commit Graph

10331 Commits

Author SHA1 Message Date
uebayasi a6533b8fed Comment out CFLAGS+=-g. 2009-02-13 16:02:05 +00:00
lukem 998789a8d9 this code isn't -Wsign-compare friendly -- drop the WARNS to 3. 2009-02-13 01:27:43 +00:00
christos 71735a83f7 add missing , 2009-02-11 19:22:22 +00:00
christos 26114345a6 don't print warnings about can't find termcap entry. 2009-02-11 19:10:08 +00:00
wiz b58ce07c49 Fix typo in usage. 2009-02-11 06:42:31 +00:00
christos cc146168bb forgot to commit this. 2009-02-11 03:04:52 +00:00
christos bb0dd61478 Add RFC 2045 MIME Quoted-Printable support. 2009-02-10 23:06:31 +00:00
plunky aead030e15 if HCI commands fail (CommandComplete status != 0) then indicate
ENODEV "Operation Not Supported by Device" rather than random errno.
2009-02-09 12:44:32 +00:00
sjg 55d9c66506 Update expected results to match recent changes! 2009-02-03 23:11:12 +00:00
mrg e53a76c628 rework the main loop and handlers:
- open() and close() the file in the main loop
- pass the fd down into the handlers
- use _rtld_error() in ELFNAME(ldd)

this fixes PR#40543 and also makes error messages look better.
2009-02-03 03:01:02 +00:00
dsl efe788379e Rename all the members of 'enum Token' to TOK_FOO.
Makes it rather more obvious wherethey belong - especially since
two of them were 'True' and 'False' (and not 1 and 0 either).
2009-01-30 23:07:17 +00:00
dsl 9c773fc1c6 Treat .ifdef ${foo} as .if defined(${foo}) not .if "${foo}" != "".
(and similarly for the other .ifxxx).
Do comparison against "" or 0 for .if "foo" and .if <numeric> directly
instead of faking up the operator string.
Rename error: to done: and use it for more exit paths.
Elucidate and correct some comments.

Fixes problems with makefiles that do:
.for var in var_1 var_2
.ifdef ${var}
...
which used to check whether var_1 was defined - because the .ifdef saw the
literal var_1, not a variable expansion due to the way .for loop variables
were substituted.
2009-01-30 22:35:10 +00:00
dholland 7f999162b5 Fix flagrantly wrong printf formats in compat strftime. 2009-01-29 09:03:04 +00:00
enami ca3f8e6df1 Avoid infinite loop. 2009-01-29 07:48:39 +00:00
dsl 530cac2556 Allow for () in the argument to .ifdef et al.
Save/restore current values of global data across expression evaluation
to give ${foo:? ...} a change of working inside another .if.
2009-01-28 21:38:12 +00:00
wiz c63e1c5ce5 Bump date for previous. 2009-01-28 09:11:16 +00:00
lukem afa4cb0e7f Rework how reading keys functions so that key lookups from hash databases
works again.  (I accidentally broke that in rev 1.15)
Fixes problem noted by Masao Uebayashi.
2009-01-28 05:48:49 +00:00
lukem 1a5f8e0d09 update documentation to reflect reality:
* read mode supports -D for btree
* all modes support -U
2009-01-28 05:31:18 +00:00
christos f6ce57fa5b fix typo. 2009-01-27 16:53:42 +00:00
christos 49d8963a92 we have memcpy and port.h needs it. 2009-01-27 16:22:58 +00:00
lukem 1742612d3c sign-compare fix for amd64 2009-01-25 14:07:18 +00:00
lukem d4bbf23d28 sign-compare fixes 2009-01-25 14:06:00 +00:00
dsl b294f6c2a3 Fix sense of MAKE_NATICE test. 2009-01-24 23:19:50 +00:00
dsl 4802ea584f Add #ifndef MAKE_NATIVE around __RCSID 2009-01-24 23:07:48 +00:00
skrll 51241d8bac Mention -c. Hi Matt. 2009-01-24 15:00:55 +00:00
dsl 97347d2cbb Fixes to includes of make_malloc.h to that it actually builds when
USE_EMALLOC is undefined.
Fixes earlier fixes :-)
2009-01-24 14:43:28 +00:00
cegger 9fde1a673e buildfixes for OSX:
- include <sys/types> for size_t
- progname is undeclared
- include <string.h> for string functions like strlen()
- include <errno.h> for errno
2009-01-24 13:06:16 +00:00
wiz 6942778bea Sort sections. Fix typo (last line). 2009-01-24 13:02:33 +00:00
cegger e6227c556c buildfix: remove RCSID. It conflicts with the definition in the .c files. 2009-01-24 12:59:51 +00:00
dsl 4fb693c12c Move the bmake_malloc() functions into their own .c and .h files.
Include instead of make.h in a few places.
2009-01-24 11:59:39 +00:00
dsl 5d04927c08 Correct the definition of the :? modifier - in particular the modifier
applies to the variable name, not its value!
Remove the set of examples that were recently added that failed to
explain why some worked and some didn't.
Add a not to the compatability section about the change in .for loop
substitution post 5.0.
Add a BUGS section.
XXX the BUGS section needs more entries :-)
2009-01-24 11:56:41 +00:00
dsl a1e84ff783 Don't cast 'time_t' to 'void *' and back it will lose precision. 2009-01-24 10:59:09 +00:00
dsl 86df0d691f Sprinkle some const.
In particular for Lst_Find() and Lst_FindFrom().
Remove some unneeded casts and some now-undeeded UNCONST().
2009-01-23 21:58:27 +00:00
dsl 0cbb4ab551 Change 'ClientData' to 'void *' so that relevant parameters can
be made 'const void *'.
2009-01-23 21:26:30 +00:00
dsl d6c81d7cf1 There is no point in saving the last character of a NUL-terminated
string in order to overwrite with a NUL, then restore the original value!
Remove and simplify the CondDoFoo() functions.
2009-01-23 20:22:50 +00:00
christos e350c8475d Don't hard-code AMD_SUPPORT. 2009-01-21 13:13:26 +00:00
tron 31faff7381 Include "bsd.own.mk" to get the definition of "NETBSDSRCDIR" via
"/etc/mk.conf". This fixes manual use of "make cleandir".
2009-01-20 22:49:29 +00:00
drochner d767912be3 Change major()/minor() to return 32-bit types again, called
devmajor_t/devminor_t, as proposed on tech-kern.
This avoids 64-bit arithmetics and 64-bit printf formats in parts
of the kernel where it is not really useful, and helps clarity.
2009-01-20 18:20:47 +00:00
jmmv 0cdcf7cea6 Remove ATF 0.5 from dist/atf and all of the reachover Makefiles used to
build it.  0.6 is going to be imported in external/bsd/atf, with all the
necessary Makefiles in that same hierarchy.
2009-01-19 07:08:14 +00:00
apb 53ee7761e4 Integer values, no matter what their width, are cast to int64_t or
uint64_t for printing.  Because of this, parse.c:rewrite() should use
PRI[diouxX]64 as the printf format; the previous revision which used
"lld" and friends was a temporary measure.  We assume that PRId64 ends
with 'd', PRIx64 ends with 'x', etc.

In display.c:display(), change some u_intNN_t types to C99 standard
uintNN_t types, and consistently cast to [u]int64_t when printing
integer values (even in two cases where it's not really necessary but it
makes the code look more consistent).
2009-01-18 21:34:32 +00:00
dsl 60ec4ca26f Revert previous - cause grief with .ifdef (foo)
Instead return False for exists(), defined(), make() etc when the
argument has length zero.
2009-01-18 17:30:19 +00:00
dsl bae3fcc0c3 Only terminate a conditional function argument on ')' if we expect the
argument to be exclosed in (...).
'.if exists()' is parsed as '.ifdef exists()' and the ')' must not be
left over at the end.
I have no idea why any of my recent changes have affected this.
But pkgsrc/mk/compiler/gcc.mk (line 488) does .if exists(${FCPATH})
even though FCPATH is only set when the file exists.
2009-01-18 12:50:15 +00:00
lukem c493aef500 fix -Wsign-compare issues 2009-01-18 07:11:45 +00:00
lukem 7e973711c3 fix -Wsign-compare issues. minor knf 2009-01-18 07:08:30 +00:00
lukem af17a5d8f3 fix -Wsign-compare issues 2009-01-18 07:05:53 +00:00
lukem a09351730c fix -Wsign-compare issues 2009-01-18 01:34:30 +00:00
lukem ab93b4bc61 fix -Wsign-compare issues 2009-01-18 01:31:12 +00:00
lukem c172e3b989 fix -Wsign-compare issues 2009-01-18 01:29:57 +00:00
lukem 0449f26fed fix -Wsign-compare issues 2009-01-18 01:02:41 +00:00
lukem aadf5fe187 Fix -Wsign-compare issues:
* Provide our own TOKEOF enum, rather than using stdio's EOF (which is signed)
* Use tokid_t instead of int where appropriate
2009-01-18 01:02:31 +00:00
lukem fb103c5334 fix -Wsign-compare issues 2009-01-18 00:37:53 +00:00
hans ec644bbf21 Use ll instead of non-standard q as length modifier in format strings.
Makes this work on Solaris. OK by apb.
2009-01-17 23:24:30 +00:00
wiz 714b5c355f Improve description in NAME section:
"serial terminal emulator"

From nick@openbsd via jmc@openbsd.
2009-01-17 20:59:01 +00:00
dsl 18e81da746 __predict_false() isn't defined if we aren't netbsd, stub out. 2009-01-17 13:55:42 +00:00
dsl 462d090d0f Change 'Buffer' so that it is the actual struct, not a pointer to it.
Saves having to malloc/free a fixed size structure.
Buf_Init() now takes ptr to Buffer to initialiase.
Change Buf_Destroy() to return ptr to string when not freed.
Remove large number of casts to (Byte) and (Byte *) - 'Byte' is 'char' here.
Buf_AddByte[s] guarantees that the data is 0 termininated, so never add '\0'.
Keep 'count' not 'left' and 'inPtr', code is simplier with only one update.
Fix fallou, no functional change.
2009-01-17 13:29:37 +00:00
dsl d020c6ab24 Allocate string vector in chunks, instead of calling realloc()
every time something is added.
2009-01-16 21:15:34 +00:00
dsl 74a68f7259 Debug print improvements. 2009-01-16 21:14:30 +00:00
dsl cd6806d831 Send output of Error() to debug_file (unless stderr/stdout). 2009-01-16 21:13:13 +00:00
dsl e9eac4d91e Parse_Error() really doesn't need to cruft up a dummy structure for curFile.
It only needs the 'fname' and 'lineno' fields - so just use NULL/0 when
curFile is NULL.
2009-01-16 20:50:24 +00:00
christos 52f56a8c21 Support amd unmounts, from Anon-Ymous. Not turned on yet because we need
to patch amd for this to work.
2009-01-16 17:31:22 +00:00
hira 796ac4ad75 Fix off-by-one. 2009-01-16 13:30:07 +00:00
uebayasi 547b81ca4c Better whitespace in ioconf.c output. 2009-01-16 09:43:41 +00:00
lukem c402ba6fb6 appease -Wsign-compare 2009-01-15 03:18:30 +00:00
dsl ac3b504aef Contrary to my previous thoughts, .for loop variable values do contain
variable references - eg ${.TARGET} since that can't be expanded earlier.
Also the variable gets re-expanded before modifiers are applied.
All this means that we do need to let :U expand variables and must not
just escape $.
2009-01-14 22:54:10 +00:00
christos a127d189ed style fixes and pass WARNS=4 and lint from Anon Ymous 2009-01-14 15:47:23 +00:00
dsl be588a30bc When substituting .for control variables (as ${:U...}) escape '$' and '\'
as well as ':' and '}' or ')'.
The parameters have just been expanded (and will be expanded again) later
so don't need expanding as part of the :U process.
Seems to fix pkgsrc breakage at line 34 of bsd.pkginstall.mk doing:
.for i in ${PKG_USERS}
_PKG_VARS.pkginstall+=  PKG_UID.${u} PKG_GECOS.${u} PKG_HOME.${u} PKG_SHELL.${u}
.endfor
when PKG_USERS = ${AVAHI_USER}:${AVAHI_GROUP}::Avahi\ user:/nonexistent
(set at line 41 of the ahavi Makefile)
I really dont think the above has the desired effect!
2009-01-13 18:30:00 +00:00
dsl 54d6432069 Sprinkle a const. (arg of Main_ParseArgLine()) 2009-01-13 18:22:34 +00:00
dholland dbfa1570e7 Fix blatantly wrong exposition of .WAIT example.
PR bin/40372 from Gao Ya'nan.
2009-01-12 09:28:10 +00:00
dsl 40aa52653a Instead of stashing the body of every iteration of a .for loop, pass
Parse_SetInput() the name of a function to get the loop data blocks.
This should only be a change to the program logic.
2009-01-11 15:50:06 +00:00
christos 2567980901 another bsd.own.mk missing 2009-01-11 05:01:34 +00:00
christos da0b5ebdeb need bsd.own.mk for $NETBSDSRCDIR 2009-01-11 03:50:50 +00:00
christos 379d921ced resolve conflict. 2009-01-11 03:05:41 +00:00
christos 50728e7823 merge christos-time_t 2009-01-11 02:57:17 +00:00
mrg 0d6aaaf295 pull across the struct netbsd32_exec definition and use that in all
cases, since we never did 64 bit a.out.  now ldd on 32 bit a.out
at least tries to work, but fails (on sparc or sparc64, no idea yet
for x86) the same way that all dynamic a.out binaries fail.
2009-01-11 00:06:55 +00:00
dsl b19182e92b When substituting .for control variables any } or ) that matches the
${ or $( must be \ escaped.
Should fix some pkgsrc issues - eg 'clean' in print/gv.
2009-01-10 16:59:02 +00:00
dsl aba4927178 Allow the user to save an unsigned int (eg the length or flags) with
each string.
2009-01-10 16:55:39 +00:00
dsl a4f183d445 Fix PR bin/1443 properly!
Ignore '=' and ' ' inside {} and () when looking for an assignment operator.
Also require the operator be immediately after any whitespace.
XXX mismatched (){} in variable modifiers will not DTRT.
2009-01-08 21:12:09 +00:00
mrg 32ae7959e8 make sure we set LIBISPRIVATE.
fixes build issues reported by moof.
2009-01-07 07:52:28 +00:00
mrg 9b688fed42 - rework this a bunch to make it work inside /rescue/ldd.
- fix alpha build.
2009-01-07 00:39:23 +00:00
mrg 648c936726 - get rid of building an a.out-happy ldd (but keep supporting a.out
binaries for the ELF version.)

- convert a.out, elf32 and elf64 support into convience libraries and
  link them right ones in.  if elf_ldd() fails on 64 bit platforms,
  try elf32_ldd() before aout_ldd().


now ldd on 64 bit platforms works for 32 bit binaries, aka PR#40199,
and it seems that all the issues from README are gone too.
2009-01-06 03:59:56 +00:00
tnozaki 2af58f1cce 1. reworking PR lib/40317:
libnbcompat already contains empty fparseln.lo
so previous fix doesn't work correctly.
i've just added broken fparseln check to configure script.

2. reworking cross build breakage under FreeBSD/MacOS X.
FreeBSD/MacOS X still have public /usr/include/runetype.h
derived from 4.4BSD-Lite.  so i renamed out private header from
src/lib/libc/locale/runetype.h to src/lib/libc/locale/runetype_local.h
to solve this problems.

3. fix build breakage when CITRUS=no was set.
2009-01-05 06:11:43 +00:00
dogcow b5d75fbc4d move nbtool_config.h include to the top. 2009-01-05 02:55:34 +00:00
dsl 2aeb32481a Count () and {} when looking to the '=' that terminates the variable being
assigned to.
Should fix:  A.${B:S/=//} = c
2009-01-04 20:17:36 +00:00
wiz f2ba098cec Describe better what it does. Inspired by the confusion caused by
FreeBSD problem report 69861.

From jmc@openbsd.

Bump date.
2009-01-04 17:26:24 +00:00
wiz 0ca945fa16 Sockets: Do not mention printing flags, because they are not printed.
From Stephan A. Rickauer via jmc@openbsd.

Bump date.
2009-01-04 17:19:39 +00:00
wiz 1ee045f360 Fix first part of PR 38987 by Robert Elz:
.Dq needs punctuation quoted to mark it up.

I leave 2) and 3) of that PR open for someone else...
2009-01-04 12:13:56 +00:00
tnozaki b17a9cee2a add some *.c specific CPPFLAGS. 2009-01-02 22:16:14 +00:00
tnozaki f5fad0d005 1. fixes PR lib/40317, don't use libc's fparseln(3).
it is non-portable function, toolchain should link it yourself.

2. fixes crossbuild breakage reported by Chiristoph Egger on current-user,
FreeBSD and MacOS X still make Rune* as public API in their ctype.h.
so added namespace protection NB* by including src/lib/libc/locale/rune.h
instead of src/lib/libc/locale/runetype.h.
2009-01-02 22:08:19 +00:00
njoly dc163d1a0e Add minimal SI_LWP support. 2009-01-02 13:57:23 +00:00
lukem 0a0b8d1a16 Clean up the usage display to match reality.
Allow 'sum' to take '-a algorithm', so that its usage matches 'cksum'.
Per discussion with Igor Sobrado resulting from PR 39658.
2009-01-02 09:42:51 +00:00
wiz 82b050bfbe Document new -t flag, bump date. 2009-01-02 00:37:40 +00:00
tnozaki 52ed7b035f Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format.
ok'ed by core and releng.
(thanks for agc@, snj@ and i'm sorry for long time patience).

[libc]
- localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by
  new locale-db implementation using citrus_db backend,
  see src/lib/libc/citrus/citrus_lc_*.[ch].
- add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation
  internally, because they're locale-aware function.
- add some stubs for multi-locale issue, see {current,global}_locale.c.
- remove some obsolete file, setrunelocale.c, ___runetype_mb.c.
- remove __savectype() from ctypeio.[ch].

[tools]
- mklocale(1): add new option ``-t'' that generates new style
  LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format.
- chrtbl(1): added ctypeio.[ch] for __savectype().

[locale-db]
- added en_US.US-ASCII locale.
- removed some shareable locale definition file:
    en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8
    zh_CN.eucCN -> zh_CN.GB18030
    and more...see src/share/locale/*/Makefile.
- remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS.
- change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP*
  for X11's locale.alias file alignments.
- fix regression test, wrong wcs?width(3), NAN/INF usage.

i tested release-build following arch:
  i386, amd64, hpc{mips,arm,sh}, sparc64, vax.

citrus_lc_*.[ch] also can read old-plain-text style locale-db.
so that backward compatibility is keeped, but lc*.[ch] can't read
new citrus_db'ed locale-db and localeio.c never check sanity,
so forward compatibility is broken ;-<

old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.
2009-01-02 00:20:18 +00:00
christos 6469dc948c revert previous. it was meant for the branch. 2008-12-29 21:30:51 +00:00
christos 4266eb20ef fixes for version 2. 2008-12-29 16:05:01 +00:00
dsl aee1343f51 In the :M code, 'pattern' is always malloced memory - so unconditionally
free.
2008-12-29 10:18:38 +00:00
dsl 1fc20cc6eb Count both () and {} when looking for the end of a :M pattern.
In particular inside .if empty(...) it was only counting ().
In reality this needs further changes.
This may well fix recent pkgsrc breakage.
2008-12-29 10:12:30 +00:00
christos c20a3600e6 64 bit time_t 2008-12-29 01:53:35 +00:00
christos e12ce13bc6 cast for tdev. 2008-12-29 01:48:19 +00:00
christos b0b728dd70 handle 64 bit time_t/dev_t 2008-12-29 01:40:59 +00:00
christos 0b379a7b85 64 bit time_t 2008-12-29 01:35:09 +00:00
christos 72b21d3647 fix for 64 bit time_t 2008-12-29 01:33:03 +00:00
christos 99db46311e fix time_t printf format. 2008-12-29 01:26:46 +00:00
christos 7d9f37ceba fix time format. 2008-12-29 01:25:04 +00:00
christos 4fe86cf5b0 64 bit dev_t 2008-12-29 00:59:08 +00:00
christos 8663e57614 fix dev_t format 2008-12-29 00:53:43 +00:00
christos 8225aca082 fix 64 bit time_t 2008-12-29 00:51:29 +00:00
christos e00e628d41 handle 64 bit time_t 2008-12-29 00:50:06 +00:00
christos 0e48247bcf back out previous, and do it the better way. 2008-12-28 18:38:27 +00:00
christos 3ff2f379f6 In the "tool" case, pretend we don't have futimes because there is no visible
prototype for futimes without _NETBSD_SOURCE being defined. When we will do
a __RENAME() in futimes this will not work. XXX: This is a hack, better ideas
welcome.
2008-12-28 18:34:58 +00:00
christos 644d31b987 if mtime == 0, make it 1 because the code expects 0 time to mean that the
file does not exist
2008-12-28 18:32:54 +00:00
christos 266b18d880 prepare for time_t 64 2008-12-28 18:31:51 +00:00
christos 0001b92828 rename nv_int -> nv_num and make it long long, so that dev_t will fit when
we change it.
2008-12-28 01:23:46 +00:00
dsl e4be9d4f2c Treat '\\' as a possible terminator for a loop control variable.
(Typically an escaped \: of a nested modifier.)
2008-12-23 21:56:38 +00:00
dsl 14bf83b326 Note that an unrecognised word in a .if is the same as in .ifdef and that
such a word has to be white-space separated.
From PR bin/30967 bin/37222 and maybe others!
2008-12-21 21:05:27 +00:00
dsl f2de2e5cbd Add some notes about recursive expansion and expansion of variable names.
Note that any of "${}()" in variable names will be griefsome!
Remove the example of using ::= to apply a modifier to a .for loop
variable as that is no longer necessary.
Remember to change the date :-)
2008-12-21 19:32:16 +00:00
dsl 6cb006c860 Only escape ':' in the outer level of .for variable substitution.
XXX: like elsewhere this code just counts {( against })
2008-12-21 19:19:55 +00:00
wiz 0a01a9c7ed Fix PR 40214 from Arto Huusko -- field delimiter is not always <TAB>.
Wording from OpenBSD, forwarded by jmc@openbsd.
2008-12-21 18:13:07 +00:00
dsl c2cc9b5595 Change the way .for variables are substituted.
Instead of doing a full substitution giving plain text, just replace the
variable part with something that will expand to the required text - leaving
any modifiers for the later evaluation of the input line.
This stops .for being used as an 'eval' (previously you could generate .if etc)
and also means it is still a variable expansion - which some other parts need
to work in the expected fashion.
2008-12-21 18:06:53 +00:00
martin 9cd0cde30f bump version due to recent rootfs changes 2008-12-21 11:39:56 +00:00
dsl d003f8f69b Don't allow $) $} $: or $$ as variable expansions, they confuse other
parts of make that try to scan through variable expansions.
  (given the make syntax that is all rather doomed anyway!)
Move the check for $\0 to a place where it will be detected - otherwise
  the parser will run off the input buffer!
2008-12-21 10:44:10 +00:00
christos f97bdef169 PR/11228: Ben Harris: Unexpand -t should take tab list. Based on patch
supplied by Roy Marples.
2008-12-21 02:33:13 +00:00
dsl 899813caea Add functions for processing extendable arrays of pointers to strings.
Use for the .for variables and substution items - changing the latter from
make's all conquering lst.lib functions.
Being able to index everything makes the code simpler.
No functional changes intended.
2008-12-20 22:41:53 +00:00
dsl e06fc1c61f A lot of code assumes that the pointer returned by Buf_GetAll() is malloced.
Replace Buf_Discard() with Buf_Empty() since the former might leave the
'outPtr != buffer' and the only caller wanted all the data discared.
Remove 'outPtr' now that it always equals 'buffer'.
The assumption about Buf_GetAll()is now guaranteed by design.
2008-12-20 18:08:24 +00:00
dsl 0533dfcd70 Remove the definitions of NIL (now unused) and NULL (defined elsewhere). 2008-12-20 17:42:01 +00:00
dsl b1e9c7dca0 Set the .for loop control variables in reverse order to avoid faffing. 2008-12-20 17:38:37 +00:00
dsl 03a9360df5 Do not allow Var_Set() or Var_Append() to set the empty variable (which will
now forever remain undefined).
Rework/simplify code to avoid UNCONST().
2008-12-20 17:14:04 +00:00
dsl b7b48965cc Change some "^I *^I" to "^I^I" and align the comment block about
variable modifiers.
2008-12-20 16:03:59 +00:00
dsl 81b38761ef Delete very splurious 'free(buf)' that xtos added.
Fixes PR bin/40233
2008-12-20 09:42:02 +00:00
christos 6caebc4e79 PR/32154: Roland Illig: brk_string fails to report errors in unquoted strings. 2008-12-19 22:04:36 +00:00
christos cd056136e4 if brk_string fail, so do we. 2008-12-19 22:03:41 +00:00
christos 1a59b518a0 if brk_string failed, use the shell. 2008-12-19 22:01:19 +00:00
christos 0bf1037e4e PR/34138: Roland Illig: In the non-expand case, fix brk_string not to eat
quotes.
2008-12-19 21:34:14 +00:00
christos 9faa233ea6 add a little more debugging. 2008-12-19 21:33:10 +00:00
pgoyette 9c68331911 Store config(1)'s root filesystem type as a text string rather than
embedding the address of its xxx_mountroot() in swapnetbsd.c.  This
permits booting of kernels with hard-wired filesystem type even if the
filesystem is in a loadable module (ie, not linked into the kernel
image).

Discussed on current-users.  Tested on amd64 and i386 with both hard-
wired and '?' filesystem times, and on both modular and monolithic
kernels.

Thanks to pooka@ for code review and suggestions.

Addresses my PR kern/40167
2008-12-19 17:11:57 +00:00
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
dholland 8b10ce7005 KNF, formatting, and whitespace cleanup. No functional change intended. 2008-11-16 04:13:45 +00:00
dholland 2286fbccd9 Sprinkle static and const. Use NULL and '\0', not 0, where appropriate.
Fix typo in comment.
2008-11-16 03:52:24 +00:00
dholland 69a42408ff Use <stdbool.h> and <err.h>. 2008-11-16 03:23:12 +00:00
dholland c1f404eaad Ansify and de-__P(). 2008-11-16 03:13:39 +00:00
christos d5e5a2c9eb PR/39912: Jukka Salmi: Logger eats the first word because of incorrect
syslogp invocation.
2008-11-13 15:51:07 +00:00
apb 39e209a580 intFile.fd should be initialised to -1, not 0. 2008-11-12 15:56:57 +00:00
christos f7d6936d24 avoid using c99 struct named initializers because this is a host tool and
needs to be compiled by a host compiler which might not be c99 compliant.
2008-11-12 15:45:32 +00:00
ad 0efea177e3 Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
2008-11-12 12:35:50 +00:00
mrg 9c8df5ee67 - retire MKXORG from public use
- introduce X11FLAVOUR to choose src/x11 vs src/external/mit/xorg
  for the X11 to build if MKX11=yes is set.  it takes the values
  of either Xorg or XFree86.
- default to Xorg on alpha, i386, macppc, shark, sparc and sparc64
- remove MKXORG_WITH_XSRC_XSERVER, unused and never useful
2008-11-09 23:02:28 +00:00
christos 079a9a0235 Make -R accept numeric arguments so one can say -R '\0' to be used in
pipelines like find . -print0 | sort -R '\0'. From Anon Ymous
2008-11-08 17:11:56 +00:00
wiz a6a4761c6a Drop trailing space. 2008-11-07 16:49:45 +00:00
reed a798b8c1a1 Be consistent: document the birthtime field of struct stat for
the "B" field specifier.
2008-11-07 15:33:31 +00:00
ginsbach ab35d36c9e Change for standards compliance:
- Store an empty string in the catalog when the message text is empty an
  a <blank> (space or tab) field separator is present.

Standards:  The Open Group Base Specifications Issue 6
            IEEE Std 1003.1, 2004 Edition
2008-11-04 03:14:46 +00:00
wiz b325f1d9d7 Sort options, add RETURN VALUES section. 2008-11-01 14:03:12 +00:00
christos 3f3059c920 fix compilation issue 2008-10-31 20:53:46 +00:00
christos 79988dffe4 Don't use putenv() because it is not portable. 2008-10-31 17:42:14 +00:00