summaryrefslogtreecommitdiffstats
path: root/text-utils/rev.c
Commit message (Collapse)AuthorAgeFilesLines
* rev: mark signo unused in sig_handlerSami Kerola2011-06-011-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* rev: option parsing bug fixed & long options addedSami Kerola2011-04-061-5/+19
| | | | | | | | | | | | | The former getopts segment gave impression unknown options will cause the program to exit with error and help is available with -h. Neither work quite as designed, all unknown options made the program to exit with success; and none of the options where known. The fix also has support for long options, and new --version switch. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* rev: memory leak fixSami Kerola2011-04-061-2/+2
| | | | | | | | Moving the malloc out of loop will make leak to disappear, and the command might run few jiffie quicker when there are 1+N arguments. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* rev: use xrealloc from xalloc.hSami Kerola2011-04-061-9/+1Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: provide alternatives for err, errx, warn and warnxFabian Groffen2011-02-141-1/+1
| | | | | | | | Solaris lacks err, errx, warn and warnx. This also means the err.h header doesn't exist. Removed err.h include from all files, and included err.h from c.h instead if it exists, otherwise alternatives are provided. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* rev: use xalloc for memory allocationDavidlohr Bueso2010-11-011-3/+2Star
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* use _exit() instead of exit() in sighandlersMarek Polacek2010-10-291-1/+1
| | | | Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
* rev: coding style, various fixesDavidlohr Bueso2010-08-201-85/+110
| | | | | | | | | | | | | | * Change indentation to 8 characters and coding style, for better reading the code. * Add some memory allocation error handling. * Fix memory leaks. In cases when Ctrl-C is used to exit the program, 'p' cannot be freed, so made it a global var, to share between main() and sig_handler(). Signal handing is necessary to fix some leaks, so added a very basic, non invasive, mechanism. Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* rev: use warn() in errs.hLi Zefan2007-10-251-21/+8Star
| | | | | | | | The function warn() in rev.c is actually duplicate code, so here we remove it. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* Imported from util-linux-2.11o tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.11b tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.10m tarball.Karel Zak2006-12-071-22/+5Star
|
* Imported from util-linux-2.10f tarball.Karel Zak2006-12-071-15/+21
|
* Imported from util-linux-2.9v tarball.Karel Zak2006-12-071-2/+10
|
* Imported from util-linux-2.8 tarball.Karel Zak2006-12-071-70/+72
|
* Imported from util-linux-2.7.1 tarball.Karel Zak2006-12-071-4/+4
|
* Imported from util-linux-2.5 tarball.Karel Zak2006-12-071-2/+2
|
* Imported from util-linux-2.2 tarball.Karel Zak2006-12-071-0/+159