v16i093: lc - Categorize and List Files In Columns, Patch2
Kent Landfield
kent at sparky.imd.sterling.com
Mon Feb 4 15:52:06 AEST 1991
Submitted-by: kent at sparky.imd.sterling.com (Kent Landfield)
Posting-number: Volume 16, Issue 93
Archive-name: lc/patch2
Patch-To: lc: Volume 14, Issue 82-83
This is the second patch to lc. This patch contains modifications so
that lc will compile on Apollo systems.
-Kent+
-------
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix at uunet.uu.net if you want that tool.
# If this archive is complete, you will see the following message at the end:
# "End of shell archive."
# Contents: lc.patch2
# Wrapped by kent at sparky on Sun Feb 3 22:47:20 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'lc.patch2' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'lc.patch2'\"
else
echo shar: Extracting \"'lc.patch2'\" \(7138 characters\)
sed "s/^X//" >'lc.patch2' <<'END_OF_FILE'
Xdiff -c ../lc.old/README ./README
X*** ../lc.old/README Sun Feb 3 22:20:06 1991
X--- ./README Sun Feb 3 22:25:46 1991
X***************
X*** 1,7 ****
X
X LC
X
X! "@(#)README 1.4 1/8/91 Kent Landfield"
X
X This directory contains the source to lc. lc is much like the ls
X command except it separates the types of files into groups and then
X--- 1,7 ----
X
X LC
X
X! "@(#)README 1.5 2/3/91 Kent Landfield"
X
X This directory contains the source to lc. lc is much like the ls
X command except it separates the types of files into groups and then
X***************
X*** 113,118 ****
X--- 113,127 ----
X INTERNET: kent at sparky.IMD.Sterling.COM or UUCP: uunet!sparky!kent
X
X so that I can continue to improve the functionality and portability of lc.
X+
X+ Just a note for historical interest: David Tanguay of Software Development
X+ Group, University of Waterloo informs me that LC stands for "list catalog".
X+ GCOS TSS on the Honeywell used the term "catalog", meaning (roughly) the
X+ same thing as a Unix directory. The GCOS file system maintenance program
X+ was called ACCE (short for access), a Swiss Army knife type program, and
X+ one of its sub-functions was LC, which gave the usual baroque display.
X+ A separate LC program was written to give the more commonly wanted structure
X+ info, and CLIS (for catalog listing) to give a more "ls -l" type of display.
X
X -Kent+
X
Xdiff -c ../lc.old/lc.c ./lc.c
X*** ../lc.old/lc.c Sun Feb 3 22:20:07 1991
X--- ./lc.c Sun Feb 3 22:25:53 1991
X***************
X*** 1,7 ****
X /*
X ** This software is
X **
X! ** Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 by Kent Landfield.
X **
X ** Permission is hereby granted to copy, distribute or otherwise
X ** use any part of this package as long as you do not try to make
X--- 1,8 ----
X /*
X ** This software is
X **
X! ** Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990,
X! ** 1991 by Kent Landfield.
X **
X ** Permission is hereby granted to copy, distribute or otherwise
X ** use any part of this package as long as you do not try to make
X***************
X*** 54,60 ****
X ** on your system ? Options -s, -L or -l won't be available..)
X **
X ** History:
X! ** Initially designed on an IBM-XT running Coherent in 1984.
X ** Ported to XENIX on an IBM-AT in 1984.
X ** Ported to System V on AT&T 3Bs in 1985.
X ** Ported to DEC Vax 11/750 running System V in 1986.
X--- 55,62 ----
X ** on your system ? Options -s, -L or -l won't be available..)
X **
X ** History:
X! ** This implementation initially designed on an
X! ** IBM-XT running Coherent in 1984.
X ** Ported to XENIX on an IBM-AT in 1984.
X ** Ported to System V on AT&T 3Bs in 1985.
X ** Ported to DEC Vax 11/750 running System V in 1986.
X***************
X*** 70,80 ****
X ** Tested with AmigaDOS 1.3 on an Amiga 1000 in 1989.
X ** Tested with SunOS 4.0.3 on a Sparkstation 1 in 1989.
X ** Tested with AIX 3.+ on a Risc System/6000 in 1990.
X! ** Ivan Fris added the ability to combine "only" options.
X **
X */
X #ifndef lint
X! static char *sccsid = "@(#)lc.c 1.25 1/2/91 Kent Landfield";
X #endif
X
X #include <stdio.h>
X--- 72,83 ----
X ** Tested with AmigaDOS 1.3 on an Amiga 1000 in 1989.
X ** Tested with SunOS 4.0.3 on a Sparkstation 1 in 1989.
X ** Tested with AIX 3.+ on a Risc System/6000 in 1990.
X! ** Ivan Fris added the ability to combine "only" options in 1990.
X! ** Mike Peterson ported it to the Apollo Domain/OS SR10.2 in 1990.
X **
X */
X #ifndef lint
X! static char *sccsid = "@(#)lc.c 1.26 2/3/91 Kent Landfield";
X #endif
X
X #include <stdio.h>
X***************
X*** 152,159 ****
X #ifdef S_IFBLK
X # define BLOCK_ONLY 1<<4
X #endif
X! #ifdef S_IFIFO
X # define FIFO_ONLY 1<<5
X #endif
X #ifdef S_IFLNK
X # define LNK_ONLY 1<<6
X--- 155,164 ----
X #ifdef S_IFBLK
X # define BLOCK_ONLY 1<<4
X #endif
X! #ifndef apollo
X! # ifdef S_IFIFO
X # define FIFO_ONLY 1<<5
X+ # endif
X #endif
X #ifdef S_IFLNK
X # define LNK_ONLY 1<<6
X***************
X*** 194,202 ****
X--- 199,209 ----
X struct list Dirs = { 0, 0, (char **) NULL, 0 };
X struct list Fls = { 0, 0, (char **) NULL, 0 };
X
X+ #ifndef apollo
X #ifdef S_IFIFO
X struct list Fifos = { 0, 0, (char **) NULL, 0 };
X #endif
X+ #endif
X
X #ifdef S_IFLNK
X struct list Lnks = { 0, 0, (char **) NULL, 0 };
X***************
X*** 225,233 ****
X--- 232,242 ----
X struct list Dirs = { 0, 0, (char **) NULL };
X struct list Fls = { 0, 0, (char **) NULL };
X
X+ #ifndef apollo
X #ifdef S_IFIFO
X struct list Fifos = { 0, 0, (char **) NULL };
X #endif
X+ #endif
X
X #ifdef S_IFLNK
X struct list Lnks = { 0, 0, (char **) NULL };
X***************
X*** 602,610 ****
X flag = pr_info("Shared Data Files: ", &Sds, flag, Sort_wanted);
X #endif
X
X! #ifdef S_IFIFO
X if (Fifos.num > 0 && (Only == 0 || Only & FIFO_ONLY))
X flag = pr_info("Fifo Files: ", &Fifos, flag, Sort_wanted);
X #endif
X
X #ifdef S_IFCHR
X--- 611,621 ----
X flag = pr_info("Shared Data Files: ", &Sds, flag, Sort_wanted);
X #endif
X
X! #ifndef apollo
X! # ifdef S_IFIFO
X if (Fifos.num > 0 && (Only == 0 || Only & FIFO_ONLY))
X flag = pr_info("Fifo Files: ", &Fifos, flag, Sort_wanted);
X+ # endif
X #endif
X
X #ifdef S_IFCHR
X***************
X*** 795,800 ****
X--- 806,812 ----
X break;
X #endif
X
X+ #ifndef apollo
X #ifdef S_IFIFO
X case S_IFIFO:
X if (!Allfiles && sav_str[0] == '.')
X***************
X*** 806,811 ****
X--- 818,824 ----
X #endif
X break;
X #endif
X+ #endif
X
X #ifdef S_IFLNK
X case S_IFLNK:
X***************
X*** 890,895 ****
X--- 903,909 ----
X break;
X #endif
X
X+ #ifndef apollo
X #ifdef S_IFIFO
X case S_IFIFO:
X add_to_list(&Fifos, sav_str);
X***************
X*** 899,904 ****
X--- 913,919 ----
X #endif
X break;
X #endif
X+ #endif
X
X #ifdef S_IFSOCK
X case S_IFSOCK :
X***************
X*** 1007,1016 ****
X Sort_wanted = FALSE;
X break;
X
X! #ifdef S_IFIFO
X case 'F':
X Only |= FIFO_ONLY;
X break;
X #endif
X
X case '1':
X--- 1022,1033 ----
X Sort_wanted = FALSE;
X break;
X
X! #ifndef apollo
X! # ifdef S_IFIFO
X case 'F':
X Only |= FIFO_ONLY;
X break;
X+ # endif
X #endif
X
X case '1':
X***************
X*** 1407,1412 ****
X--- 1424,1430 ----
X break;
X #endif
X
X+ #ifndef apollo
X #ifdef S_IFIFO
X case S_IFIFO:
X if (Display_single)
X***************
X*** 1413,1418 ****
X--- 1431,1437 ----
X (void) printf("%s: fifo file\n", buf);
X break;
X #endif
X+ #endif
X
X #ifdef S_IFSOCK
X case S_IFSOCK:
X***************
X*** 1468,1477 ****
X--- 1487,1498 ----
X Dirs.maxlen = Fls.maxlen = 0;
X #endif
X
X+ #ifndef apollo
X #ifdef S_IFIFO
X Fifos.num = 0;
X #ifdef LENS
X Fifos.maxlen = 0;
X+ #endif
X #endif
X #endif
X
END_OF_FILE
if test 7138 -ne `wc -c <'lc.patch2'`; then
echo shar: \"'lc.patch2'\" unpacked with wrong size!
fi
# end of 'lc.patch2'
fi
echo shar: End of shell archive.
exit 0
exit 0 # Just in case...
--
Kent Landfield INTERNET: kent at sparky.IMD.Sterling.COM
Sterling Software, IMD UUCP: uunet!sparky!kent
Phone: (402) 291-8300 FAX: (402) 291-4362
Please send comp.sources.misc-related mail to kent at uunet.uu.net.
More information about the Comp.sources.misc
mailing list