Deleted Added
full compact
print.c (61294) print.c (61296)
1/*
2 * Copyright (c) 1989, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Michael Fischbein.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 25 unchanged lines hidden (view full) ---

34 * SUCH DAMAGE.
35 */
36
37#ifndef lint
38#if 0
39static char sccsid[] = "@(#)print.c 8.4 (Berkeley) 4/17/94";
40#else
41static const char rcsid[] =
1/*
2 * Copyright (c) 1989, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Michael Fischbein.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 25 unchanged lines hidden (view full) ---

34 * SUCH DAMAGE.
35 */
36
37#ifndef lint
38#if 0
39static char sccsid[] = "@(#)print.c 8.4 (Berkeley) 4/17/94";
40#else
41static const char rcsid[] =
42 "$FreeBSD: head/bin/ls/print.c 61294 2000-06-05 20:08:50Z ache $";
42 "$FreeBSD: head/bin/ls/print.c 61296 2000-06-05 20:54:46Z ache $";
43#endif
44#endif /* not lint */
45
46#include <sys/param.h>
47#include <sys/stat.h>
48
49#include <err.h>
50#include <errno.h>
51#include <fts.h>
52#include <grp.h>
53#include <pwd.h>
54#include <stdio.h>
55#include <stdlib.h>
56#include <string.h>
57#include <time.h>
58#include <unistd.h>
59#ifdef COLORLS
60#include <ctype.h>
61#include <termcap.h>
43#endif
44#endif /* not lint */
45
46#include <sys/param.h>
47#include <sys/stat.h>
48
49#include <err.h>
50#include <errno.h>
51#include <fts.h>
52#include <grp.h>
53#include <pwd.h>
54#include <stdio.h>
55#include <stdlib.h>
56#include <string.h>
57#include <time.h>
58#include <unistd.h>
59#ifdef COLORLS
60#include <ctype.h>
61#include <termcap.h>
62#include <term.h> /* for tparm */
63#include <signal.h>
64#endif
65
66#include "ls.h"
67#include "extern.h"
68
69static int printaname __P((FTSENT *, u_long, u_long));
70static void printlink __P((FTSENT *));

--- 295 unchanged lines hidden (view full) ---

366
367void
368printcolor(c)
369 Colors c;
370{
371 char *ansiseq;
372
373 if (colors[c][0] != -1) {
62#include <signal.h>
63#endif
64
65#include "ls.h"
66#include "extern.h"
67
68static int printaname __P((FTSENT *, u_long, u_long));
69static void printlink __P((FTSENT *));

--- 295 unchanged lines hidden (view full) ---

365
366void
367printcolor(c)
368 Colors c;
369{
370 char *ansiseq;
371
372 if (colors[c][0] != -1) {
374 ansiseq = tparm(ansi_fgcol, colors[c][0]);
375 if (ansiseq)
373 ansiseq = tgoto(ansi_fgcol, 0, colors[c][0]);
374 if (ansiseq && *ansiseq != 'O') /* "OOPS" */
376 tputs(ansiseq, 1, putch);
377 }
378
379 if (colors[c][1] != -1) {
375 tputs(ansiseq, 1, putch);
376 }
377
378 if (colors[c][1] != -1) {
380 ansiseq = tparm(ansi_bgcol, colors[c][1]);
381 if (ansiseq)
379 ansiseq = tgoto(ansi_bgcol, 0, colors[c][1]);
380 if (ansiseq && *ansiseq != 'O') /* "OOPS" */
382 tputs(ansiseq, 1, putch);
383 }
384}
385
386void
387endcolor()
388{
389 tputs(ansi_coloff, 1, putch);

--- 111 unchanged lines hidden ---
381 tputs(ansiseq, 1, putch);
382 }
383}
384
385void
386endcolor()
387{
388 tputs(ansi_coloff, 1, putch);

--- 111 unchanged lines hidden ---