aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/m4/main.c
Commit message (Collapse)AuthorAgeFilesLines
* Import from OpenBSD: -E flagBaptiste Daroussin2019-09-091-2/+10
| | | | | | | | | | | | | Add -E flag (make warnings fatal), following the behavior of GNU m4 1.4.9+ Help and direction millert@ espie@ anton@ deraadt@ ok espie@ Obtained from: OpenBSD Notes: svn path=/head/; revision=352065
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* Synchronize m4(1) with OpenBSDBaptiste Daroussin2015-11-211-12/+6
| | | | Notes: svn path=/head/; revision=291128
* Synchronize with OpenBSDBaptiste Daroussin2015-05-181-2/+5
| | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=283089
* Sync with OpenBSDBaptiste Daroussin2014-07-271-5/+6
| | | | | | | | | | | This brings: - check for integer overflows in custom allocs - fix potential integer overflows in memory allocation - annotate regexp error messages with source string - better error handling in mkstemp/unlink/fdopen logic Notes: svn path=/head/; revision=269162
* Reduce diff with upstream.Jung-uk Kim2013-05-031-1/+1
| | | | Notes: svn path=/head/; revision=250226
* More -Wmissing-variable-declarations fixes.Ed Schouten2012-10-201-1/+1
| | | | | | | | | | | | | In addition to adding missing `static' keywords: - bin/dd: Pull in `extern.h' to guarantee consistency with source file. - libexec/rpc.rusersd: Move shared globals into an extern.h. - libexec/talkd: Move `debug' and `hostname' into extern.h. - usr.bin/cksum: Put counters in extern.h, as they are used by ckdist/mtree. - usr.bin/m4: Move `end_result' into extern.h. - usr.sbin/services_mkdb: Move shared globals into an extern.h. Notes: svn path=/head/; revision=241777
* Improve m4 compatibility with GNU m4 extension ** (exponent)Baptiste Daroussin2012-04-151-1/+3
| | | | | | | | Submitted by: Marc Espie (espie@OpenBSD.org) Approved by: des@ (mentor) Notes: svn path=/head/; revision=234310
* Synchronize with laster version of m4 from OpenBSD and NetBSDBaptiste Daroussin2011-11-281-219/+192
| | | | | | | | | | | This bring better compatibility with gnum4 Reviewed by: cognet Approved by: cognet Obtained from: OpenBSD, NetBSD Notes: svn path=/head/; revision=228063
* Mark global functions and/or variables in m4(1) static where possible.Ed Schouten2011-11-061-1/+1
| | | | | | | This allows compilers and static analyzers to more thorough analysis. Notes: svn path=/head/; revision=227241
* Fix build of m4 with WARNS=6.Ed Schouten2011-10-161-0/+2
| | | | | | | Change the parser; rename `exp' to `exponent' not to collide with exp(3). Notes: svn path=/head/; revision=226422
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-111-4/+0
| | | | | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson Notes: svn path=/head/; revision=216370
* Store a pointer to "null" in struct ndblock's defn member instead of aTim J. Robbins2004-08-161-2/+2
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=133858
* Respect locale settings from the environment.Tim J. Robbins2004-07-121-0/+3
| | | | Notes: svn path=/head/; revision=132004
* Die on -D=foo, when parsing options - we can't let someone define (nil).Juli Mallett2002-09-041-0/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=102917
* Kill extraneous whitespace.Juli Mallett2002-07-151-16/+16
| | | | Notes: svn path=/head/; revision=100014
* Add a default case to the getopt(3) switch, remove a blank line nearby.Juli Mallett2002-07-141-1/+1
| | | | Notes: svn path=/head/; revision=99941
* Functions declared as <type> <identifier>(<nil>) should be declared asJuli Mallett2002-07-141-3/+3
| | | | | | | <type> <identifier>(<void-type>) in ANSI C. Notes: svn path=/head/; revision=99939
* Remove prototype for main().Juli Mallett2002-07-141-2/+0
| | | | Notes: svn path=/head/; revision=99938
* Cast sp to uintptr_t when doing a compare of it to STACKMAX which is a size_t.Juli Mallett2002-06-201-2/+2
| | | | | | | This messes up some indentation in mdef.h for some macros. Notes: svn path=/head/; revision=98490
* If a file operand cannot be processed, go on to process any remaining filesTim J. Robbins2002-05-261-3/+8
| | | | | | | but exit non-zero. Notes: svn path=/head/; revision=97296
* Revert vendor identifiers, and #if 0 what is #if 0/#else for OpenBSD.Juli Mallett2002-05-031-4/+16
| | | | | | | | | Add __FBSDID() properly. Requested by: bde, mike Notes: svn path=/head/; revision=95982
* Remove redundant declarations of getopt(3) externals (since <unistd.h> doesJuli Mallett2002-05-021-3/+0
| | | | | | | | take care of them), and add __FreeBSD__ to the defined() checks for the _PATH_DIVNAME. Notes: svn path=/head/; revision=95918
* Merge local changes again, against ANSIfied m4(1).Juli Mallett2002-05-011-24/+11
| | | | Notes: svn path=/head/; revision=95887
* Crank WARNS.Juli Mallett2002-04-201-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=95095
* Bring OpenBSD m4(1) off of the OPENBSD vendor branch, and add the -s option,Juli Mallett2002-04-191-183/+395
| | | | | | | | | | $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 Notes: svn path=/head/; revision=95060
* This adds support for -s to the m4(1) utility, which causes #line directivesJuli Mallett2002-04-171-2/+27
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=94957
* Remove the local basename in favor of the libc version.David E. O'Brien2001-07-241-2/+7
| | | | | | | Remove xmalloc and xstrdup and do the error checking at the place of use. Notes: svn path=/head/; revision=80289
* Clean up temporary file(s) and directory when m4 exits without fallingGregory Neil Shapiro2001-04-161-7/+2
| | | | | | | | | through main() (e.g., signals or calls to errx()). PR: conf/25715 Notes: svn path=/head/; revision=75551
* The secure temporary directory is always created, so always remove it.John Hay2001-02-281-5/+1
| | | | Notes: svn path=/head/; revision=73240
* Create temporary files in a secure directory, instead of using multipleKris Kennaway2000-11-221-1/+4
| | | | | | | | | | filenames based on a single invocation of mktemp() in /tmp, which is easily predictable after the first one. Audited by: markm Notes: svn path=/head/; revision=69030
* getopt and friends are declared in <unistd.h>Warner Losh2000-09-041-4/+0
| | | | | | | getopt returns -1 not EOF. Notes: svn path=/head/; revision=65428
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Use err(3) instead of local redefinition. Remove progname.Philippe Charnier1997-07-231-12/+13
| | | | Notes: svn path=/head/; revision=27625
* compare return value from getopt against -1 rather than EOF, per the finalWarner Losh1997-03-291-1/+1
| | | | | | | posix standard on the topic. Notes: svn path=/head/; revision=24360
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-4/+4
| | | | Notes: svn path=/head/; revision=8874
* Make m4 more 8bit clean.Andrey A. Chernov1994-12-181-10/+10
| | | | | | | | | Don't use is*(EOF) This fix core dump when LANG setted to 8bit wide charset and ENABLE_STARTUP_LOCALE Notes: svn path=/head/; revision=5165
* BSD 4.4 Lite Usr.bin SourcesRodney W. Grimes1994-05-271-0/+425
Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=1590