summary refs log tree commit diff
path: root/src/input.c (follow)
Commit message (Collapse)AuthorAge
* Copyright/licence updates and remove all traces of sys/cdefs.hHerbert Xu2005-10-29
| | | | | | | | | | | This change updates the BSD licence to the three-clause version since NetBSD has already done so. This makes dash GPL-compatible. It also adds Christos Zoulas (NetBSD ash maintainer) to the COPYING file. I've added "copyright by Herbert Xu" to most files. Finally all CVS IDs and inclusion of sys/cdefs.h have been removed. The latter is needed for support of klibc.
* [INPUT] Size optimisations in preadbuffer()Herbert Xu2005-10-26
| | | | | | | Added unlikely markers. Reduced switch coverage. Removed p since we now erase NULs as soon as we see them. Use more to store parselleft.
* [INPUT] Fix NUL skipping in preadbufferHerbert Xu2005-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On Sun, Sep 25, 2005 at 07:50:54PM +0000, Gerrit Pape wrote: > On Sat, Sep 03, 2005 at 02:56:00PM +0200, Martin Dickopp wrote: > > When analysing the bug I came to the following conclusion: The loop > > beginning at input.c:302 overwrites a single input line with itself, > > skipping NUL characters. Therefore, after the loop the line buffer > > has less characters than originally read if and only if the input line > > contains NUL characters. > > yes. Thanks a lot for the details and patch. > > > The pointer that is used to read from the buffer, 'parsenextc' (cf. > > input.h:66), is also used as the beginning of the next line in > > input.c:296. This fails if the buffer contains less characters > > than originally read into it due to NUL characters. > > > > The proposed patch (attached) keeps track of the number of skipped > > characters and advances 'parsenextc' accordingly before processing > > the next input line. > > Hi Herbert, please see > http://bugs.debian.org/317516 Instead of moving the characters in the loop, we will do memmove every time we see a NUL character. This hurts if there are a lot of NUL characters, but should be a win in normal situations.
* Generalise setinputfile for use in read_profile/readcmdfile.herbert2005-09-26
|
* Renamed error to sh_error.herbert2005-09-26
|
* Initial import.Herbert Xu2005-09-26