History log of /netbsd/bin/cat/cat.c (Results 1 – 25 of 58)
Revision Date Author Comments
# ffa87d85 19-May-2023 rillig <rillig@NetBSD.org>

cat: fix misleading indentation

Found by indent, but not by GCC 10.

No binary change.


# 9e378fb2 16-Jun-2016 sevan <sevan@NetBSD.org>

When invoked with -se, print a '$' on blank lines
Obtained from OpenBSD r1.13 of src/bin/cat/cat.c

Closes PR bin/51250
Reviewed by Christos@


# e427a7d7 16-Jun-2016 sevan <sevan@NetBSD.org>

Revert previous change made by me in r1.55


# e8eb5de8 25-Jul-2015 sevan <sevan@NetBSD.org>

Drop the case '?' which is defined after case 'default'.
case 'default' statement introduced in the last commit to cat.c in the CSRG archive.
Obtained from OpenBSD bin/cat/cat.c r1.3.


# 95add08d 08-Dec-2013 spz <spz@NetBSD.org>

more complete fix for Coverity issue 976653


# 742120ee 03-Dec-2013 spz <spz@NetBSD.org>

Coverity complaint fixes:
bin/cat/cat.c 976654 Argument cannot be negative
(missing check for fileno result, stdout)
bin/cat/cat.c 976653 Improper use of negative value

Coverity complaint fixes:
bin/cat/cat.c 976654 Argument cannot be negative
(missing check for fileno result, stdout)
bin/cat/cat.c 976653 Improper use of negative value
(missing check for fileno result, stdin)

show more ...


# eff7bc46 19-Nov-2012 christos <christos@NetBSD.org>

only allocate if it would not fit in our buffer.


# d76cc6c2 19-Nov-2012 christos <christos@NetBSD.org>

fix bogus warning for zero-sized files.


# eb5f0b0a 10-Nov-2012 wiz <wiz@NetBSD.org>

Sync usage with man page.


# 3c770eeb 10-Nov-2012 christos <christos@NetBSD.org>

Add an option to read with a different buffer size, and document the
buffer size we use. This allows us to cat -B 10000000 /proc/<pid>/maps
for example which cannot handle seeking.


# c0a8d0f9 17-Mar-2012 christos <christos@NetBSD.org>

fix signed blksize_t lossage.


# 2fe2731d 20-Jul-2008 lukem <lukem@NetBSD.org>

Remove the \n and tabs from the __COPYRIGHT() strings.


# 555693c1 13-Jan-2007 cbiere <cbiere@NetBSD.org>

- Applied patch from PR bin/35408 by Andreas Wiese.
- Use EXIT_FAILURE instead of 1.
- Use return instead of exit() at the end of main().
- Use sizeof() instead of BUFSIZ.


# 93bbf810 08-Oct-2006 elad <elad@NetBSD.org>

PR/32759: Ulrich Heilmann: Output of cat -s -n is wrong

Applied patch from David A. Holland, thanks!


# cde6642b 26-Feb-2006 christos <christos@NetBSD.org>

PR/32931: Johan Veenhuizen: cat(1) does not clear the EOF indicator for
stdin in cooked mode.


# 4f80cb63 04-Jan-2004 jschauma <jschauma@NetBSD.org>

Remove unused code left over from temporary printescaped functionality.
Noted by Jeff Ito in PR bin/23966.


# 171d6532 27-Oct-2003 lukem <lukem@NetBSD.org>

Overhaul how `build.sh tools' are used:

* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/com

Overhaul how `build.sh tools' are used:

* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h

* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).

show more ...


# 6a75fbb6 14-Sep-2003 jschauma <jschauma@NetBSD.org>

Following private discussion with kleink@ and hubertf@ and public discussion
on tech-userlevel@, back out printescaped() functionality.
kleink: ``We sell rope.''


# 9267b095 27-Aug-2003 uwe <uwe@NetBSD.org>

Include "config.h" if building as a host program.
Need this to get SIZE_MAX defintion from compat_defs.h on FreeBSD.


# aeaabe9f 25-Aug-2003 kleink <kleink@NetBSD.org>

This is a host tool, so for the time being change SIZE_T_MAX to the
more portable SIZE_MAX; partially addresses PR toolchain/22504 from
Christian Limpach.


# e1e03218 13-Aug-2003 itojun <itojun@NetBSD.org>

use bounded string op


# b5b29542 07-Aug-2003 agc <agc@NetBSD.org>

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22249, verified by myself.


# 458ed234 04-Aug-2003 jschauma <jschauma@NetBSD.org>

As discusses a little while back on tech-userlevel:

If stdout is a tty, use vis(3) to print any filenames to prevent garbage
from being printed if the filename contains control- or other non-printab

As discusses a little while back on tech-userlevel:

If stdout is a tty, use vis(3) to print any filenames to prevent garbage
from being printed if the filename contains control- or other non-printable
characters.

While here, sprinkle some EXIT_FAILURE and NOTREACHED where appropriate.

show more ...


# 42321e36 13-Sep-2002 thorpej <thorpej@NetBSD.org>

Don't use MAX(); not all systems have it, and this is a host tool.


# 4a9e799f 11-Jun-2002 bjh21 <bjh21@NetBSD.org>

Rather than (ab)using the standard error message for EFTYPE, print our own
message when "cat -f" is used on a non-regular file. This is necessary to
make cat(1) portable to systems that don't have E

Rather than (ab)using the standard error message for EFTYPE, print our own
message when "cat -f" is used on a non-regular file. This is necessary to
make cat(1) portable to systems that don't have EFTYPE (like Linux).

show more ...


123