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 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> |
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) { |
373 ansiseq = tgoto(ansi_fgcol, 0, colors[c][0]); 374 if (ansiseq && *ansiseq != 'O') /* "OOPS" */ |
375 tputs(ansiseq, 1, putch); 376 } 377 378 if (colors[c][1] != -1) { |
379 ansiseq = tgoto(ansi_bgcol, 0, colors[c][1]); 380 if (ansiseq && *ansiseq != 'O') /* "OOPS" */ |
381 tputs(ansiseq, 1, putch); 382 } 383} 384 385void 386endcolor() 387{ 388 tputs(ansi_coloff, 1, putch); --- 111 unchanged lines hidden --- |