aboutsummaryrefslogtreecommitdiff
path: root/bin/sh/output.h
Commit message (Collapse)AuthorAgeFilesLines
* sh: Send normal output from bind builtin to stdoutJilles Tjoelker2019-02-191-0/+2
| | | | | | | | PR: 233343 Submitted by: Yuichiro NAITO (original version) Notes: svn path=/head/; revision=344306
* 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
* sh: Simplify output buffering.Jilles Tjoelker2017-05-161-2/+2
| | | | | | | | | | Similarly to how STPUTC was changed, change struct output to store the pointer just past the end of the available space instead of the size of the available space, so after writing a character it is only necessary to increment a pointer and not to decrement a counter. Notes: svn path=/head/; revision=318385
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* sh: Detect and flag write errors on stdout in builtins.Jilles Tjoelker2012-12-121-0/+2
| | | | | | | | | | If there is a write error on stdout, a message will be printed (to stderr) and the exit status will be changed to 2 if it would have been 0 or 1. PR: bin/158206 Notes: svn path=/head/; revision=244162
* sh: Code size optimizations to buffered output.Jilles Tjoelker2010-11-201-1/+2
| | | | | | | | | This is mainly less use of the outc macro. No functional change is intended, but code size is about 2K less on i386. Notes: svn path=/head/; revision=215567
* sh: Add binary buffered output for use by the printf builtin.Jilles Tjoelker2010-11-141-0/+2
| | | | Notes: svn path=/head/; revision=215303
* sh: Fix some bugs with backquoted builtins:Jilles Tjoelker2010-01-011-4/+5
| | | | | | | | | | | | | | | - correctly handle error output in $(builtin 2>&1), clarify out1/out2 vs output/errout in the code - treat all builtins as regular builtins so errors do not abort the shell and variable assignments do not persist - respect the caller's INTOFF Some bugs still exist: - expansion errors may still abort the shell - some side effects of expansions and builtins persist Notes: svn path=/head/; revision=201366
* Remove declaration of function that no longer exists.Jilles Tjoelker2009-12-261-1/+0
| | | | Notes: svn path=/head/; revision=201020
* sh: Constify various strings.Jilles Tjoelker2009-12-241-1/+1
| | | | | | | | Most of this is adding const keywords, but setvar() in var.c had to be changed somewhat more. Notes: svn path=/head/; revision=200956
* sh: Some changes to stderr flushing:Jilles Tjoelker2009-11-211-1/+1
| | | | | | | | | | | | * increase buffer size from 100 to 256 bytes * remove implied flush from out2str(), in particular this avoids unnecessary flushing in the middle of a -x tracing line * rename dprintf() to out2fmt_flush(), make it flush out2 and use this function in various places where flushing is desired after an error message Notes: svn path=/head/; revision=199629
* Remove clause 3 from the UCB licenses.Mark Murray2004-04-061-4/+0
| | | | | | | OK'ed by: imp, core Notes: svn path=/head/; revision=127958
* Missing prototypes from previous commit.Tim J. Robbins2002-06-041-0/+3
| | | | Notes: svn path=/head/; revision=97817
* Remove now-obsolete __STDC__ ifdefs, remove redundant NULL definition andWarner Losh2002-02-181-4/+0
| | | | | | | include stdlib.h for NULL. Notes: svn path=/head/; revision=90832
* o __P has been reovedWarner Losh2002-02-021-15/+14
| | | | | | | | | | | | | | | | | | | | | o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. o Change int foo() { ... to int foo(void) { ... Notes: svn path=/head/; revision=90111
* -Wnon-const-format sweep: make format strings const char *'s, addKris Kennaway2001-04-171-5/+5
| | | | | | | | | __printflike()/__printf0like() to function prototypes, as appropriate. Reviewed by: bde, -audit Notes: svn path=/head/; revision=75577
* $Id$ -> $FreeBSD$Peter Wemm1999-08-271-1/+1
| | | | Notes: svn path=/head/; revision=50471
* Nuke register keyword usage and #if -> #ifdef.Steve Price1997-04-281-2/+2
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=25222
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22988
* 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
* Merge in NetBSD mods and -Wall cleaning.Steve Price1996-12-141-2/+2
| | | | | | | Obtained from: NetBSD, me Notes: svn path=/head/; revision=20425
* Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is aPeter Wemm1996-09-011-34/+23
| | | | | | | | | | | | | | | | | merge of parallel duplicate work by Steve Price and myself. :-] There are some changes to the build that are my fault... mkinit.c was trying (poorly) to duplicate some of the work that make(1) is designed to do. The Makefile hackery is my fault too, the depend list was incomplete because of some explicit OBJS+= entries, so mkdep wasn't picking up their source file #includes. This closes a pile of /bin/sh PR's, but not all of them.. Submitted by: Steve Price <steve@bonsai.hiwaay.net>, peter Notes: svn path=/head/; revision=17987
* Added $Id$David Greenman1994-09-241-0/+1
| | | | Notes: svn path=/head/; revision=3044
* BSD 4.4 Lite bin SourcesRodney W. Grimes1994-05-261-0/+94
Notes: svn path=/head/; revision=1556