home *** CD-ROM | disk | FTP | other *** search
- /*
- * configuration file for scan program
- */
-
-
- /* maximum number of users we can cache */
- #define MAXLID 128
-
- /* maximum number of groups we can cache */
- #define MAXGID 64
-
- /* if RM_BREAKPOINT is defined, it is the maximum number of files that
- * may be deleted at one time before the rm_verify is forced "on".
- */
- #define RM_BREAKPOINT 10
-
- /* defaults editor and file viewer */
- #define DEFAULT_EDITOR "vi"
- #define DEFAULT_PAGER "less"
-
- /*
- * SYSTEM_RCFILE will be processed before the user's .scanrc,
- * allowing site wide defaults
- */
- #define SYSTEM_RCFILE "/usr/local/lib/scan.rc"
-
- /*
- * Define "SIGTYPE" to the type of the value returned by the "signal"
- * system call. On BSD 4.2 systems, it's "void". On BSD 4.3 and SVR3
- * systems, it's "int".
- *
- * Define "VOIDPTR" if your C compiler can handle void pointers. The
- * portable C compiler that comes with many systems cannot. Most modern
- * C compilers can.
- *
- * Define "NEED_TSTP" if your curses library uses "_tstp()" instead of
- * "tstp()". If you need this, you'll find the link fails with an
- * unresolved reference to _tstp.
- *
- * Defining "System5" is the same as defining ALL of the following:
- *
- * Define "SYSVmemcpy" to use memcpy instead of bcopy.
- * Define "SYSVcurses" if your system has System V curses.
- * Define "SYSVdirent" if your system uses the "dirent" directory
- * access (get Doug Gwyn's library if your System V
- * system doesn't support this).
- * Define "SYSVgetcwd" to use getcwd instead of getwd.
- *
- * If you have one of the ever more popular mixture operating systems,
- * just pick the features you need out of the above list.
- *
- * Here's some known values:
- */
-
- /* HP/UX V7 and later */
- #ifdef hpux
- #define SIGTYPE void
- #define System5
- #define VOIDPTR
- #define NEED_TSTP
- #else
-
- /* SGI Irix 3.3 */
- #ifdef sgi
- #define SYSVcurses
- #define SYSVdirent
- #define SYSVmemcpy
- #define SIGTYPE void
- /*
- #define VOIDPTR
- */
- #define NEED_TSTP
- #else
-
- /* Sequent Dynix V3 */
- #ifdef sequent
- #define SIGTYPE int
- #ifndef LINT
- #define VOIDPTR
- #endif
- #else
-
- /* Esix (AT&T Unix) System V Release 3.2 Rev D */
- #ifdef i386
- #define System5
- #define SIGTYPE void
- #define NEEDTIMEH
- #define VOIDPTR
- #else
-
- /*
- * Concurrent RTU 5.0
- */
- #ifdef mc700
- #define SIGTYPE void
- #define NEED_TSTP
- #define System5
- #ifdef _UCB
- DANGER Will Robinson
- scan will not link in the ucb universe on RTU V5
- because the curses include file is broken!
- The _rawmode routine does not exist!
- compile in the ATT universe instead!
- #endif
- #else
-
- /* Alliant Concentrix V5.5 */
- #ifdef alliant
- #define SIGTYPE void
- #else
-
- /* HP/Apollo Domain/OS SR 10.3 */
- #ifdef apollo
- #define SIGTYPE int
- #define VOIDPTR
-
- #endif /* apollo */
- #endif /* alliant */
- #endif /* rtu */
- #endif /* i386 */
- #endif /* sequent */
- #endif /* sgi */
- #endif /* hpux */
-
- #ifdef System5
- #define SYSVcurses
- #define SYSVmemcpy
- #define SYSVdirent
- #define SYSVgetcwd
- #endif /* System5 */
-
- #ifdef VOIDPTR
- typedef void *voidptr;
- #else
- typedef int *voidptr;
- #endif
-
- #ifndef SIGTYPE
- #define SIGTYPE void
- #endif
-
- #include <curses.h>
- #include <sys/types.h>
- #include <sys/wait.h>
- #include <sys/stat.h>
- #ifdef NEEDTIMEH
- #include <time.h>
- #endif
- #include <sys/time.h>
- #include <pwd.h>
- #include <grp.h>
- #include <signal.h>
- #include <ctype.h>
- #include <errno.h>
-
- #ifdef SYSVdirent
- #include "dirent.h"
- #define NAMELEN(x) strlen(x->d_name)
- #define direct dirent
- #else
- #include <sys/dir.h>
- #define NAMELEN(x) x->d_namlen
- #endif /* SYSVdirent */
-
- #ifdef sequent
- #include <sys/universe.h>
- #endif /* sequent */
-
- #include "getch.h"
-
- #ifdef SYSVmemcpy
- #define BCOPY(source,dest,len) memcpy(dest,source,len)
- #else
- #define BCOPY(source,dest,len) bcopy(source,dest,len)
- #endif
-
- #define beep() fprintf (stderr, "\007");
-
- #define PGM_VERSION "Scan V4.0" /* for informational purposes */
- extern int PAGESIZE;
-
- /* maximum length any filename can be */
- #define MAXPATHLEN 1024
- /* maximum number of command line arguments we will handle */
- #define MAXARGS 512
-
- /* how much memory to allocate in each name buffer block */
- #define BUFSIZE 256 * 1024
-
- struct namelist { /* used to cache login id and group information */
- int number;
- char name[9];
- };
-
- /* largest number of files we will handle */
- #define MAXDIRSIZE 512
- struct dblock { /* used to store file information */
- int size, /* filesize in bytes */
- owner, /* index into lidlist */
- group, /* index into gidlist */
- selected, /* flag to indicate selected status */
- type; /* file type */
- time_t ctime; /* time of last modification */
- char perms[13]; /* file permissions */
- char modtime[13]; /* last modification time */
- char *name; /* file name */
- char *link; /* name pointed to, for symbolic links */
- };
-
- #ifndef TRUE
- #define TRUE 1
- #endif
- #ifndef FALSE
- #define FALSE 0
- #endif
- #define ONERROR 2
-
- struct option_entry {
- char *name;
- int *variable;
- char **value_table;
- short default_value;
- };
-
- /* shorthand names for option values */
- #define DOT_FIRST 0
- #define DOT_LAST 1
- #define DOT_HIDE 2
-
- #define DIR_FIRST 0
- #define DIR_LAST 1
- #define DIR_SORT 2
-
- #define WITH_DOT 0
- #define WITH_DIR 1
-
- #define OPT_FALSE 0
- #define OPT_TRUE 1
-
- typedef int Function ();
-
- #define NILL (Function *)0x0
- #define SIZEKEYTAB 512
-
- #define KEY_UNDEF 0
- #define KEY_FUNC 1
- #define KEY_CMD 2
-
- #define OPT_TAGALL 00010000
- #define OPT_TAGCUR 00001000
- #define OPT_VERIFY 00000100
- #define OPT_WAITERR 00000010
- #define OPT_WAIT 00000001
- #define OPT_NONE 00000000
-
- struct funcname_entry {
- char *name;
- int (*kfunc) ();
- };
-
- struct key_entry {
- short type; /* KEY_UNDEF = undefined, KEY_FUNC = built in function, KEY_CMD = command string */
- short options;
- voidptr pntr;
- };
-
- struct keydef_entry {
- char *name;
- int value;
- };
-
- extern int bottom_line(), cd_back(), cd_dot(), cd_dotdot(), cd_file(),
- cd_home(), cd_or_edit(), cd_or_view(), cd_prompt(), cd_root(),
- command_file(), command_tagged(), edit_file(), edit_tagged(),
- execute_file(), exec_file(), exit_pgm(), first_page(), fork_shell(),
- help_screen(), last_page(), middle_line(), next_halfpage(),
- next_line(), next_page(), prev_halfpage(), prev_line(), prev_page(),
- redraw_menu(), rm_file(), rm_tagged(), setup_menu(), tag_all(),
- toggle_tag(), top_line(), untag_all(), view_file(), view_tagged();
-
- /*
- * This software is Copyright (c) 1989, 1990, 1991 by Patrick J. Wolfe.
- *
- * Permission is hereby granted to copy, distribute or otherwise
- * use any part of this package as long as you do not try to make
- * money from it or pretend that you wrote it. This copyright
- * notice must be maintained in any copy made.
- *
- * Use of this software constitutes acceptance for use in an AS IS
- * condition. There are NO warranties with regard to this software.
- * In no event shall the author be liable for any damages whatsoever
- * arising out of or in connection with the use or performance of this
- * software. Any use of this software is at the user's own risk.
- *
- * If you make modifications to this software that you feel
- * increases it usefulness for the rest of the community, please
- * email the changes, enhancements, bug fixes as well as any and
- * all ideas to me. This software is going to be maintained and
- * enhanced as deemed necessary by the community.
- *
- * Patrick J. Wolfe
- * uunet!uiucuxc!kailand!pwolfe
- * pwolfe@kailand.kai.com
- */
-