summaryrefslogtreecommitdiffstats
path: root/usr.bin/m4/eval.c
Commit message (Collapse)AuthorAgeFilesLines
* Store a pointer to "null" in struct ndblock's defn member instead of atjr2004-08-161-3/+3
| | | | | | | | duplicate allocated on the heap; the address defn points to is significant, and is checked against the address of "null" in certain conditionals. PR: 59883 MFC after: 1 week
* Flush streams before calling system() so that the output appears in thetjr2003-05-011-1/+3
| | | | | right place in the output stream when redirected to a file (when full buffering is enabled). Noticed by schweikh on freebsd-standards.
* Kill extraneous whitespace.jmallett2002-07-151-12/+12
|
* Revert vendor identifiers, and #if 0 what is #if 0/#else for OpenBSD.jmallett2002-05-031-2/+10
| | | | | | Add __FBSDID() properly. Requested by: bde, mike
* Merge local changes again, against ANSIfied m4(1).jmallett2002-05-011-68/+24
|
* Crank WARNS.jmallett2002-04-201-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Cast sizeof() to (int), as it's being compared against an int, not a size_t. If i is changed to a size_t, it means the logic must be slightly changed later in the flow, where --i is checked to be >= 0. I am not sure I want to make a logic change to account for clearing up a warning, when an aesthetic one will keep from modifying the logic. Other harmless casts, that I think I've made in the right directions. Make gpbc() an inline function, rather than an obfuscated macro, make its scratch space local, rather than global. The previous macro used a dirty hack (logical AND in place of a conditional) which would lead GCC to throw a fit (rightly so) as the logical check, as well as the incrementation of a variable, were not used for anything. const'ify a few places where gcc3 yells. xstrdup() some global consts in places where we xstrdup() when not using consts, but tried to assign them to non-consts before. Don't use execv(2) if we don't have the kind of arguments it wants. Reviewed by: asmodai obrien tjr Submitted by: tjr (a gcc3 build log)
* Bring OpenBSD m4(1) off of the OPENBSD vendor branch, and add the -s option,jmallett2002-04-191-192/+464
| | | | | | | $FreeBSD$ identifiers, and fix initialisation to stderr to happen in a function as stderr is not the same in CURRENT as in OpenBSD. Reviewed by: obrien
* This adds support for -s to the m4(1) utility, which causes #line directivesjmallett2002-04-171-0/+6
| | | | | | | | | | to be emitted as per the C preprocessor. It updates the manual page in regards to standards accordingly. PR: standards/36075 Submitted by: tjr Reviewed by: mike MFC after: 1 week
* Remove the local basename in favor of the libc version.obrien2001-07-241-3/+8
| | | | Remove xmalloc and xstrdup and do the error checking at the place of use.
* Make sure the len() builtin always returns an answer. Previously,gshapiro2001-05-291-2/+1
| | | | | | | len(`') didn't return an answer. Now it returns 0. PR: bin/12942 MFC after: 5 days
* String operations could silently truncate long strings, leaving the outputgshapiro2001-05-181-8/+8
| | | | | | | | | | | corrupted. Mark's patch fixes this be removing the MAXTOK limitation on substring operations and allowing the putback buffer size to be the limiting factor. If the putback buffer size if reached, m4 gives an error instead of silently truncating the string. PR: bin/26619 Submitted by: Mark Peek <mark-ml@whistle.com> MFC after: 5 days
* Fix format string warnings.kris2000-11-271-1/+1
| | | | | Submitted by: nra Obtained from: NetBSD
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Make the builtin unix macro work as it should (well like Solaris's,steve1998-09-071-1/+5
| | | | GNU's, and OSF1's).
* divnum is no longer silently restricted to the range 0..9. (cf: 4098)jlemon1997-08-181-3/+7
| | | | | | | | changequote(,) is now a synonym for changequote(). (cf: 803) buffer size for translit() enlarged to handle a full string PR: 803, 4098
* Use err(3) instead of local redefinition. Remove progname.charnier1997-07-231-11/+15
|
* Make the $@ macro behave as described in the man page.joerg1997-04-131-0/+10
| | | | | | This patch has been submitted by Andreas Burmester (i think) on the German Usenet long ago. Andreas told me that our m4 has quite more subtle bugs, so we might consider using NGU m4 instead.
* Remove trailing whitespace.rgrimes1995-05-301-5/+5
|
* 1) kill temp diver upon exitache1995-04-161-0/+1
| | | | | 2) add logical ops, fix ! precedence, implement unary +, fix exp Obtained from: NetBSD
* Fix syscmd() output out of syncache1995-03-111-1/+4
| | | | Submitted by: smp@clem.systemsix.com
* Make m4 more 8bit clean.ache1994-12-181-3/+3
| | | | | | Don't use is*(EOF) This fix core dump when LANG setted to 8bit wide charset and ENABLE_STARTUP_LOCALE
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+789
OpenPOWER on IntegriCloud