From 9d691ba42fd8c2ec1335ebfa074103330e63cb08 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 8 Jul 1996 04:19:36 +0000 Subject: [PATCH] Include termios.h. Guard inclusion of sys/ioctl.h with #ifdef GWINSZ_IN_SYS_IOCTL, rather than HAVE_SYS_IOCTL_H. Modelled after sh-utils' stty.c at suggestion from Chip Bennett . --- src/ls.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/ls.c b/src/ls.c index 2d5ec3500b..0b72a3d2a0 100644 --- a/src/ls.c +++ b/src/ls.c @@ -43,7 +43,8 @@ #include #include -#if HAVE_SYS_IOCTL_H +#include +#ifdef GWINSZ_IN_SYS_IOCTL # include #endif @@ -129,24 +130,6 @@ struct bin_str char *string; /* Pointer to the same */ }; -struct bin_str color_indicator[] = - { - { LEN_STR_PAIR ("\033[") }, /* lc: Left of color sequence */ - { LEN_STR_PAIR ("m") }, /* rc: Right of color sequence */ - { 0, NULL }, /* ec: End color (replaces lc+no+rc) */ - { LEN_STR_PAIR ("0") }, /* no: Normal */ - { LEN_STR_PAIR ("0") }, /* fi: File: default */ - { LEN_STR_PAIR ("32") }, /* di: Directory: green */ - { LEN_STR_PAIR ("36") }, /* ln: Symlink: cyan */ - { LEN_STR_PAIR ("31") }, /* pi: Pipe: red */ - { LEN_STR_PAIR ("33") }, /* so: Socket: yellow/brown */ - { LEN_STR_PAIR ("44;37") }, /* bd: Block device: white on blue */ - { LEN_STR_PAIR ("44;37") }, /* cd: Char device: white on blue */ - { 0, NULL }, /* mi: Missing file: undefined */ - { 0, NULL }, /* or: Orphanned symlink: undefined */ - { LEN_STR_PAIR ("35") } /* ex: Executable: purple */ - }; - #ifndef STDC_HEADERS char *ctime (); time_t time (); @@ -392,6 +375,24 @@ struct col_ext_type struct col_ext_type *next; /* Next in list */ }; +static struct bin_str color_indicator[] = + { + { LEN_STR_PAIR ("\033[") }, /* lc: Left of color sequence */ + { LEN_STR_PAIR ("m") }, /* rc: Right of color sequence */ + { 0, NULL }, /* ec: End color (replaces lc+no+rc) */ + { LEN_STR_PAIR ("0") }, /* no: Normal */ + { LEN_STR_PAIR ("0") }, /* fi: File: default */ + { LEN_STR_PAIR ("32") }, /* di: Directory: green */ + { LEN_STR_PAIR ("36") }, /* ln: Symlink: cyan */ + { LEN_STR_PAIR ("31") }, /* pi: Pipe: red */ + { LEN_STR_PAIR ("33") }, /* so: Socket: yellow/brown */ + { LEN_STR_PAIR ("44;37") }, /* bd: Block device: white on blue */ + { LEN_STR_PAIR ("44;37") }, /* cd: Char device: white on blue */ + { 0, NULL }, /* mi: Missing file: undefined */ + { 0, NULL }, /* or: Orphanned symlink: undefined */ + { LEN_STR_PAIR ("35") } /* ex: Executable: purple */ + }; + /* FIXME: comment */ struct col_ext_type *col_ext_list = NULL; -- 2.47.2