Commit Graph

14 Commits

Author SHA1 Message Date
Assar Westerlund
ee579ffbea make sure we do not write out non-printable characters in file names
and symbolic links (by default)

PR:		bin/19354
Reviewed by:	silence on -current
2000-07-04 23:09:23 +00:00
Josef Karthauser
141d77b8cb Switch over to using the new fflagstostr and strtofflags library calls. 2000-06-17 14:19:33 +00:00
Andrey A. Chernov
fd4e4d608f Move colorquit() prototype to extern.h
Add "extern" to variables declarations in extern.h to not make them
commons into each compiled file.
2000-06-06 07:14:01 +00:00
Andrey A. Chernov
38782c258d Make signal handler safe - don't use stdio (pointed by bde)
Staticize some color functions
Add yet one tolower() call which is forgotten after check
Don't check for OOPS - not really needed
2000-06-06 06:52:03 +00:00
Josef Karthauser
5a890e22bf Don't look up the ANSI sequences each time a colour is changed,
this is extremely inefficient, instead write them all down at the
beginning.

The correct sequence to switch colours off is to first use 'op' if
it exists, otherwise use 'oc'.  If neither of these exist then we
shouldn't be doing colour with this terminal.

Reviewed by:	ache
2000-06-05 03:51:29 +00:00
Josef Karthauser
74985094ef * Re-implement colour support using termcap's AF and AB capabilities
to manage the ANSI colour sequences.  Colour support is disabled
  unless the TERM environment variable references a valid termcap.

* Allow optional compilation of the colour support in the Makefile,
  defaulting to yes.  This allows us to switch it off for fixit
  floppies and other mediums where space is an issue and the extra
  bloat of statically linking with ncurses isn't acceptable.

* Display a warning if colour is requested with '-G' but support
  for it isn't compiled in.
2000-06-05 02:14:01 +00:00
Josef Karthauser
3885812c8c Add colour support to /bin/ls (at a cost of 1056 bytes on my system).
It is not switched on by default and must be enabled with the -G
flag.  When using ls -G the output behaviour is modified with ANSI
colour sequences wrapped around filenames to help distinguish file
types.  (Colours can be redefined in the LSCOLORS environment
variable as described in the manual page.)

Colour support is silently disabled (if switched on) if stdout
isn't a tty.

Based on:	asami's colorls port.
PR:		bin/18900 && ports/18616.
2000-06-02 14:53:42 +00:00
Peter Wemm
2a4562393f $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
Dag-Erling Smørgrav
7ea3064820 Added -b option to display unprintables in octal.
PR: 1315
1998-04-21 22:02:01 +00:00
Steve Price
d46c1a60d3 Remove #if(n)def BSD_4_4_LITE cruft and sccsid -> rcsid. 1997-08-07 15:33:50 +00:00
Peter Wemm
b97fa2ef50 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
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.
1997-01-14 07:20:47 +00:00
David Greenman
89730b290a Added $Id$ 1994-09-24 02:59:15 +00:00
Rodney W. Grimes
4b88c807ea BSD 4.4 Lite bin Sources 1994-05-26 06:18:55 +00:00