home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-11-01 | 60.2 KB | 1,964 lines |
- Newsgroups: comp.sources.misc
- From: hm@hcshh.hcs.de (Hellmuth Michaelis)
- Subject: v40i071: cwish - Window Shell / Filemanager v2.00, Part04/05
- Message-ID: <1993Nov1.220749.9571@sparky.sterling.com>
- X-Md4-Signature: 79203d915a3bf15fd8bf59e283783f24
- Sender: kent@sparky.sterling.com (Kent Landfield)
- Organization: Sterling Software
- Date: Mon, 1 Nov 1993 22:07:49 GMT
- Approved: kent@sparky.sterling.com
-
- Submitted-by: hm@hcshh.hcs.de (Hellmuth Michaelis)
- Posting-number: Volume 40, Issue 71
- Archive-name: cwish/part04
- Environment: UNIX, ANSI-C, SYSV-CURSES
- Supersedes: cwish: Volume 39, Issue 97-100
-
- #! /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".
- # Contents: Makefile.386bsd Makefile.aix Makefile.hpux Makefile.linux
- # Makefile.sunos Makefile.ultrix cursor.c dot-cwishrc help.c
- # movement.c rcinit.c
- # Wrapped by kent@sparky on Fri Oct 29 14:39:11 1993
- PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 4 (of 5)."'
- if test -f 'Makefile.386bsd' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile.386bsd'\"
- else
- echo shar: Extracting \"'Makefile.386bsd'\" \(4994 characters\)
- sed "s/^X//" >'Makefile.386bsd' <<'END_OF_FILE'
- X#---------------------------------------------------------------------------
- X#
- X# cwish - windowing user friendly shell
- X# -------------------------------------
- X#
- X# Copyright (c) 1988-1993 Hellmuth Michaelis
- X#
- X# Eggerstedtstr. 28
- X# 22765 Hamburg
- X# Germany
- X#
- X# Tel: +49 / 40 / 384298 (private)
- X# Tel: +49 / 40 / 55903-170 (at work)
- X# e-mail: hm@hcshh.hcs.de
- X#
- X# --------oOo--------
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X#---------------------------------------------------------------------------
- X#
- X# Last edit-date: [Fri Oct 29 13:13:19 1993]
- X#
- X# Flags:
- X#
- X# CURSESBUG workaround for a bug in curses to re-enable
- X# sending of special keys after system(), commandline.c
- X#
- X# NOSTATFS statfs(2) call to identify CDROM filesystem not known
- X# see files.c
- X#
- X# USE_NCURSES use the sysv-curses lookalike ncurses instead of
- X# the local curses, try this if you only have i.e.
- X# BSD curses available on your machine. see cwish.h
- X# and the README file for ncurses availability
- X#
- X# DATE_US to get US date format (mm/dd/yy) in attribute window,
- X# if not defined, german format (dd.mm.yy) is used
- X#
- X# REREAD_AFTER_EDIT
- X# reread the current directory after returning from
- X# a fkey-1 initiated editor session, if not defined
- X# the directory is NOT reread and reflects the state
- X# prior to calling the editor
- X#
- X#---------------------------------------------------------------------------
- X
- XCC= gcc2
- XNAME= cwish
- XDEST= /usr/local/bin
- XMANDIR= /usr/local/man
- XMANBSD= cat1
- XMANHPUX= man1
- XPRINTPROG= cprps
- XDEFINES= -DCURSESBUG -DUSE_NCURSES -DREREAD_AFTER_EDIT
- X
- X#-- 386BSD debugging -------------------------------------------------------
- XCFLAGS= -O2 -Wall -g -pipe $(DEFINES) -I/usr/local/include
- XLFLAGS= -lncurses
- X
- X#-- 386BSD curses debugging ------------------------------------------------
- X#CFLAGS= -O2 -Wall -g -pipe $(DEFINES) -I/usr/local/include
- X#LFLAGS= -ldncurses
- X
- X#-- 386BSD production ------------------------------------------------------
- X#CFLAGS= -O2 -Wall -pipe $(DEFINES) -I/usr/local/include
- X#LFLAGS= -s -lncurses
- X
- X
- XCFILES= cwish.c files.c movement.c commandline.c rcinit.c \
- X fkeys.c paging.c cursor.c header.c history.c help.c \
- X usrgrp.c showtime.c config.c chdir.c complete.c\
- X usage.c
- X
- XOFILES= cwish.o files.o movement.o commandline.o rcinit.o \
- X fkeys.o paging.o cursor.o header.o history.o help.o \
- X usrgrp.o showtime.o config.o chdir.o complete.o\
- X usage.o
- X
- XHFILES= config.h control.h cwish.h rcinit.h patchlevel.h
- X
- XMISCFILES= COPYING MANIFEST README \
- X Makefile.386bsd Makefile.hpux Makefile.ultrix Makefile.sunos \
- X Makefile.aix Makefile.linux \
- X dot-cwishrc
- X
- XMANFILE= cwish.1
- X
- XBAKFILES= $(CFILES) $(HFILES) $(MISCFILES) $(MANFILE)
- X
- X$(NAME): $(OFILES)
- X $(CC) $(OFILES) $(LFLAGS) -o $(NAME)
- X
- Xupdate.h: Makefile $(CFILES) $(HFILES)
- X @/bin/sh -c "[ -f update.h ] || (echo 0 > update.h)"
- X @/bin/sh -c "expr `cat update.h` + 1 > update1.h && mv update1.h update.h"
- X @echo ""
- X @echo " compilation number updated to `cat update.h`"
- X @echo ""
- X
- X$(OFILES): cwish.h
- Xcwish.o: control.h
- Xusage.o: update.h patchlevel.h
- Xrcinit.o: rcinit.h
- Xconfig.o: config.h
- X
- Xinstall: $(NAME)
- X cp $(NAME) $(DEST)
- X strip $(DEST)/$(NAME)
- X chmod og-rw,a+x,u+rwx $(DEST)/$(NAME)
- X chown root $(DEST)/$(NAME)
- X chgrp bin $(DEST)/$(NAME)
- X @if [ -f /hp-ux ];\
- X then echo "installing HPUX man-page";make man-hpux;\
- X elif [ -f /386bsd -o /netbsd ];\
- X then echo "installing 386BSD man-page";make man-386bsd;fi
- X
- Xclean:
- X rm -f *.o cwish trace core* lint.out
- X
- Xveryclean:
- X rm -f *.o cwish trace core* update.h lint.out
- X
- Xman-hpux:
- X cp $(MANFILE) $(MANDIR)/$(MANHPUX)
- X
- Xman-386bsd:
- X nroff -mandoc $(MANFILE) >$(MANDIR)/$(MANBSD)/$(NAME).0
- X
- Xprint:
- X $(PRINTPROG) cwish.h rcinit.h config.h $(CFILES)
- X
- Xlint:
- X lint -s -Aa -D_HPUX_SOURCE $(DEFINES) $(CFILES) | tee lint.out
- X
- Xbackup:
- X @echo ""
- X @if [ -d BACKUP ];then rm -rf BACKUP-OLD;\
- X echo "moving BACKUP to BACKUP-OLD ...";\
- X mkdir BACKUP-OLD;\
- X mv BACKUP/* BACKUP-OLD;fi
- X @rm -rf BACKUP
- X @mkdir BACKUP
- X @echo "copying files to BACKUP ..."
- X @cp $(BAKFILES) BACKUP
- X @echo ""
- X
- X#-------------------------- E O F ---------------------------------------------
- END_OF_FILE
- if test 4994 -ne `wc -c <'Makefile.386bsd'`; then
- echo shar: \"'Makefile.386bsd'\" unpacked with wrong size!
- fi
- # end of 'Makefile.386bsd'
- fi
- if test -f 'Makefile.aix' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile.aix'\"
- else
- echo shar: Extracting \"'Makefile.aix'\" \(4730 characters\)
- sed "s/^X//" >'Makefile.aix' <<'END_OF_FILE'
- X#---------------------------------------------------------------------------
- X#
- X# cwish - windowing user friendly shell
- X# -------------------------------------
- X#
- X# Copyright (c) 1988-1993 Hellmuth Michaelis
- X#
- X# Eggerstedtstr. 28
- X# 22765 Hamburg
- X# Germany
- X#
- X# Tel: +49 / 40 / 384298 (private)
- X# Tel: +49 / 40 / 55903-170 (at work)
- X# e-mail: hm@hcshh.hcs.de
- X#
- X# --------oOo--------
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X#---------------------------------------------------------------------------
- X#
- X# Last edit-date: [Tue Oct 19 09:20:11 1993]
- X#
- X# Flags:
- X#
- X# CURSESBUG workaround for a bug in curses to re-enable
- X# sending of special keys after system(), commandline.c
- X#
- X# NOSTATFS statfs(2) call to identify CDROM filesystem not known
- X# see files.c
- X#
- X# USE_NCURSES use the sysv-curses lookalike ncurses instead of
- X# the local curses, try this if you only have i.e.
- X# BSD curses available on your machine. see cwish.h
- X# and the README file for ncurses availability
- X#
- X# DATE_US to get US date format (mm/dd/yy) in attribute window,
- X# if not defined, german format (dd.mm.yy) is used
- X#
- X# REREAD_AFTER_EDIT
- X# reread the current directory after returning from
- X# a fkey-1 initiated editor session, if not defined
- X# the directory is NOT reread and reflects the state
- X# prior to calling the editor
- X#
- X#---------------------------------------------------------------------------
- X#
- X# AIX Makefile from Nathan D. Lane, nathan@seldon.foundation.tricon.com
- X#
- X#---------------------------------------------------------------------------
- X
- XCC= bsdcc
- XNAME= cwish
- XDEST= /usr/local/bin
- XMANDIR= /usr/local/man
- XMANBSD= cat1
- XMANHPUX= man1
- XPRINTPROG= cprps
- X
- X#-- debugging -------------------------------------------------------
- XCFLAGS= -O2 -g
- XLFLAGS= -lcurses
- X
- XCFILES= cwish.c files.c movement.c commandline.c rcinit.c \
- X fkeys.c paging.c cursor.c header.c history.c help.c \
- X usrgrp.c showtime.c config.c chdir.c complete.c\
- X usage.c
- X
- XOFILES= cwish.o files.o movement.o commandline.o rcinit.o \
- X fkeys.o paging.o cursor.o header.o history.o help.o \
- X usrgrp.o showtime.o config.o chdir.o complete.o\
- X usage.o
- X
- XHFILES= config.h control.h cwish.h rcinit.h patchlevel.h
- X
- XMISCFILES= COPYING MANIFEST README \
- X Makefile.386bsd Makefile.hpux Makefile.ultrix Makefile.sunos \
- X Makefile.aix Makefile.linux \
- X dot-cwishrc
- X
- XMANFILE= cwish.1
- X
- XBAKFILES= $(CFILES) $(HFILES) $(MISCFILES) $(MANFILE)
- X
- X$(NAME): $(OFILES)
- X $(CC) $(OFILES) $(LFLAGS) -o $(NAME)
- X
- Xupdate.h: Makefile $(CFILES) $(HFILES)
- X @/bin/sh -c "[ -f update.h ] || (echo 0 > update.h)"
- X @/bin/sh -c "expr `cat update.h` + 1 > update1.h && mv update1.h update.h"
- X @echo ""
- X @echo " compilation number updated to `cat update.h`"
- X @echo ""
- X
- X$(OFILES): cwish.h
- Xcwish.o: control.h
- Xusage.o: update.h patchlevel.h
- Xrcinit.o: rcinit.h
- Xconfig.o: config.h
- X
- Xinstall: $(NAME)
- X cp $(NAME) $(DEST)
- X strip $(DEST)/$(NAME)
- X chmod og-rw,a+x,u+rwx $(DEST)/$(NAME)
- X chown root $(DEST)/$(NAME)
- X chgrp bin $(DEST)/$(NAME)
- X @if [ -f /hp-ux ];\
- X then echo "installing HPUX man-page";make man-hpux;\
- X elif [ -f /386bsd -o /netbsd ];\
- X then echo "installing 386BSD man-page";make man-386bsd;fi
- X
- Xclean:
- X rm -f *.o cwish trace core* lint.out
- X
- Xveryclean:
- X rm -f *.o cwish trace core* update.h lint.out
- X
- Xman-hpux:
- X cp $(MANFILE) $(MANDIR)/$(MANHPUX)
- X
- Xman-386bsd:
- X nroff -mandoc $(MANFILE) >$(MANDIR)/$(MANBSD)/$(NAME).0
- X
- Xprint:
- X $(PRINTPROG) cwish.h rcinit.h config.h $(CFILES)
- X
- Xlint:
- X lint -s -Aa -D_HPUX_SOURCE -DCURSESBUG $(CFILES) | tee lint.out
- X
- Xbackup:
- X @echo ""
- X @if [ -d BACKUP ];then rm -rf BACKUP-OLD;\
- X echo "moving BACKUP to BACKUP-OLD ...";\
- X mkdir BACKUP-OLD;\
- X mv BACKUP/* BACKUP-OLD;fi
- X @rm -rf BACKUP
- X @mkdir BACKUP
- X @echo "copying files to BACKUP ..."
- X @cp $(BAKFILES) BACKUP
- X @echo ""
- X
- X#-------------------------- E O F ---------------------------------------------
- END_OF_FILE
- if test 4730 -ne `wc -c <'Makefile.aix'`; then
- echo shar: \"'Makefile.aix'\" unpacked with wrong size!
- fi
- # end of 'Makefile.aix'
- fi
- if test -f 'Makefile.hpux' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile.hpux'\"
- else
- echo shar: Extracting \"'Makefile.hpux'\" \(5069 characters\)
- sed "s/^X//" >'Makefile.hpux' <<'END_OF_FILE'
- X#---------------------------------------------------------------------------
- X#
- X# cwish - windowing user friendly shell
- X# -------------------------------------
- X#
- X# Copyright (c) 1988-1993 Hellmuth Michaelis
- X#
- X# Eggerstedtstr. 28
- X# 22765 Hamburg
- X# Germany
- X#
- X# Tel: +49 / 40 / 384298 (private)
- X# Tel: +49 / 40 / 55903-170 (at work)
- X# e-mail: hm@hcshh.hcs.de
- X#
- X# --------oOo--------
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X#---------------------------------------------------------------------------
- X#
- X# Last edit-date: [Tue Oct 19 09:20:11 1993]
- X#
- X# Flags:
- X#
- X# CURSESBUG workaround for a bug in curses to re-enable
- X# sending of special keys after system(), commandline.c
- X#
- X# NOSTATFS statfs(2) call to identify CDROM filesystem not known
- X# see files.c
- X#
- X# USE_NCURSES use the sysv-curses lookalike ncurses instead of
- X# the local curses, try this if you only have i.e.
- X# BSD curses available on your machine. see cwish.h
- X# and the README file for ncurses availability
- X#
- X# DATE_US to get US date format (mm/dd/yy) in attribute window,
- X# if not defined, german format (dd.mm.yy) is used
- X#
- X# REREAD_AFTER_EDIT
- X# reread the current directory after returning from
- X# a fkey-1 initiated editor session, if not defined
- X# the directory is NOT reread and reflects the state
- X# prior to calling the editor
- X#
- X#---------------------------------------------------------------------------
- X
- XCC= cc
- XNAME= cwish
- XDEST= /usr/local/bin
- XMANDIR= /usr/local/man
- XMANBSD= cat1
- XMANHPUX= man1
- XPRINTPROG= cprps
- X
- X#-- HPUX debugging (using HP's ANSI C-Compiler) -----------------------------
- X#CFLAGS= -g -z -Wc,-w1 -Aa +ESlit -D_HPUX_SOURCE -DCURSESBUG
- X#LFLAGS= -lcurses
- X
- X#-- HPUX production (using HP's ANSI C-Compiler) ----------------------------
- XCFLAGS= -O -z -Wc,-w1 -Aa +ESlit -D_HPUX_SOURCE -DCURSESBUG
- XLFLAGS= -lcurses
- X
- X#-- HPUX debugging (using GCC 2.2.2 or GCC 2.3.3) --------------------------
- X#CFLAGS= -Wall -g -D_HPUX_SOURCE -DCURSESBUG -pipe
- X#LFLAGS= -lcurses
- X
- X#-- HPUX production (using GCC 2.2.2 or GCC 2.3.3) -------------------------
- X#CFLAGS= -O2 -D_HPUX_SOURCE -DCURSESBUG -pipe
- X#LFLAGS= -lcurses
- X
- X
- XCFILES= cwish.c files.c movement.c commandline.c rcinit.c \
- X fkeys.c paging.c cursor.c header.c history.c help.c \
- X usrgrp.c showtime.c config.c chdir.c complete.c\
- X usage.c
- X
- XOFILES= cwish.o files.o movement.o commandline.o rcinit.o \
- X fkeys.o paging.o cursor.o header.o history.o help.o \
- X usrgrp.o showtime.o config.o chdir.o complete.o\
- X usage.o
- X
- XHFILES= config.h control.h cwish.h rcinit.h patchlevel.h
- X
- XMISCFILES= COPYING MANIFEST README \
- X Makefile.386bsd Makefile.hpux Makefile.ultrix Makefile.sunos \
- X Makefile.aix Makefile.linux \
- X dot-cwishrc
- X
- XMANFILE= cwish.1
- X
- XBAKFILES= $(CFILES) $(HFILES) $(MISCFILES) $(MANFILE)
- X
- X$(NAME): $(OFILES)
- X $(CC) $(OFILES) $(LFLAGS) -o $(NAME)
- X
- Xupdate.h: Makefile $(CFILES) $(HFILES)
- X @/bin/sh -c "[ -f update.h ] || (echo 0 > update.h)"
- X @/bin/sh -c "expr `cat update.h` + 1 > update1.h && mv update1.h update.h"
- X @echo ""
- X @echo " compilation number updated to `cat update.h`"
- X @echo ""
- X
- X$(OFILES): cwish.h
- Xcwish.o: control.h
- Xusage.o: update.h patchlevel.h
- Xrcinit.o: rcinit.h
- Xconfig.o: config.h
- X
- Xinstall: $(NAME)
- X cp $(NAME) $(DEST)
- X strip $(DEST)/$(NAME)
- X chmod og-rw,a+x,u+rwx $(DEST)/$(NAME)
- X chown root $(DEST)/$(NAME)
- X chgrp bin $(DEST)/$(NAME)
- X @if [ -f /hp-ux ];\
- X then echo "installing HPUX man-page";make man-hpux;\
- X elif [ -f /386bsd -o /netbsd ];\
- X then echo "installing 386BSD man-page";make man-386bsd;fi
- X
- Xclean:
- X rm -f *.o cwish trace core* lint.out
- X
- Xveryclean:
- X rm -f *.o cwish trace core* update.h lint.out
- X
- Xman-hpux:
- X cp $(MANFILE) $(MANDIR)/$(MANHPUX)
- X
- Xman-386bsd:
- X nroff -mandoc $(MANFILE) >$(MANDIR)/$(MANBSD)/$(NAME).0
- X
- Xprint:
- X $(PRINTPROG) cwish.h rcinit.h config.h $(CFILES)
- X
- Xlint:
- X lint -s -Aa -D_HPUX_SOURCE -DCURSESBUG $(CFILES) | tee lint.out
- X
- Xbackup:
- X @echo ""
- X @if [ -d BACKUP ];then rm -rf BACKUP-OLD;\
- X echo "moving BACKUP to BACKUP-OLD ...";\
- X mkdir BACKUP-OLD;\
- X mv BACKUP/* BACKUP-OLD;fi
- X @rm -rf BACKUP
- X @mkdir BACKUP
- X @echo "copying files to BACKUP ..."
- X @cp $(BAKFILES) BACKUP
- X @echo ""
- X
- X#-------------------------- E O F ---------------------------------------------
- END_OF_FILE
- if test 5069 -ne `wc -c <'Makefile.hpux'`; then
- echo shar: \"'Makefile.hpux'\" unpacked with wrong size!
- fi
- # end of 'Makefile.hpux'
- fi
- if test -f 'Makefile.linux' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile.linux'\"
- else
- echo shar: Extracting \"'Makefile.linux'\" \(5139 characters\)
- sed "s/^X//" >'Makefile.linux' <<'END_OF_FILE'
- X#---------------------------------------------------------------------------
- X#
- X# cwish - windowing user friendly shell
- X# -------------------------------------
- X#
- X# Copyright (c) 1988-1993 Hellmuth Michaelis
- X#
- X# Eggerstedtstr. 28
- X# 22765 Hamburg
- X# Germany
- X#
- X# Tel: +49 / 40 / 384298 (private)
- X# Tel: +49 / 40 / 55903-170 (at work)
- X# e-mail: hm@hcshh.hcs.de
- X#
- X# --------oOo--------
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X#---------------------------------------------------------------------------
- X#
- X# Last edit-date: [Wed Oct 20 15:58:11 1993]
- X#
- X# Flags:
- X#
- X# CURSESBUG workaround for a bug in curses to re-enable
- X# sending of special keys after system(), commandline.c
- X#
- X# NOSTATFS statfs(2) call to identify CDROM filesystem not known
- X# see files.c
- X#
- X# USE_NCURSES use the sysv-curses lookalike ncurses instead of
- X# the local curses, try this if you only have i.e.
- X# BSD curses available on your machine. see cwish.h
- X# and the README file for ncurses availability
- X#
- X# DATE_US to get US date format (mm/dd/yy) in attribute window,
- X# if not defined, german format (dd.mm.yy) is used
- X#
- X# REREAD_AFTER_EDIT
- X# reread the current directory after returning from
- X# a fkey-1 initiated editor session, if not defined
- X# the directory is NOT reread and reflects the state
- X# prior to calling the editor
- X#
- X#---------------------------------------------------------------------------
- X#
- X# Linux 0.99.pl9-1, thanks to Jim Graham and Nils Gerloff
- X#
- X#---------------------------------------------------------------------------
- X
- XCC= cc
- XNAME= cwish
- XDEST= /usr/local/bin
- XMANDIR= /usr/local/man
- XMANBSD= cat1
- XMANHPUX= man1
- XPRINTPROG= cprps
- XDEFINES= -DCURSESBUG -DUSE_NCURSES -DREREAD_AFTER_EDIT -DNOSTATFS
- X
- X#-- Linux debugging -------------------------------------------------------
- XCFLAGS= -O2 -Wall -g -pipe $(DEFINES) -I/usr/local/include
- XLFLAGS= -lncurses
- X
- X#-- Linux curses debugging ------------------------------------------------
- X#CFLAGS= -O2 -Wall -g -pipe $(DEFINES) -I/usr/local/include
- X#LFLAGS= -ldncurses
- X
- X#-- Linux production ------------------------------------------------------
- X#CFLAGS= -O2 -Wall -pipe $(DEFINES) -I/usr/local/include
- X#LFLAGS= -s -lncurses
- X
- X
- XCFILES= cwish.c files.c movement.c commandline.c rcinit.c \
- X fkeys.c paging.c cursor.c header.c history.c help.c \
- X usrgrp.c showtime.c config.c chdir.c complete.c\
- X usage.c
- X
- XOFILES= cwish.o files.o movement.o commandline.o rcinit.o \
- X fkeys.o paging.o cursor.o header.o history.o help.o \
- X usrgrp.o showtime.o config.o chdir.o complete.o\
- X usage.o
- X
- XHFILES= config.h control.h cwish.h rcinit.h patchlevel.h
- X
- XMISCFILES= COPYING MANIFEST README \
- X Makefile.386bsd Makefile.hpux Makefile.ultrix Makefile.sunos \
- X Makefile.aix Makefile.linux \
- X dot-cwishrc
- X
- XMANFILE= cwish.1
- X
- XBAKFILES= $(CFILES) $(HFILES) $(MISCFILES) $(MANFILE)
- X
- X$(NAME): $(OFILES)
- X $(CC) $(OFILES) $(LFLAGS) -o $(NAME)
- X
- Xupdate.h: Makefile $(CFILES) $(HFILES)
- X @/bin/sh -c "[ -f update.h ] || (echo 0 > update.h)"
- X @/bin/sh -c "expr `cat update.h` + 1 > update1.h && mv update1.h update.h"
- X @echo ""
- X @echo " compilation number updated to `cat update.h`"
- X @echo ""
- X
- X$(OFILES): cwish.h
- Xcwish.o: control.h
- Xusage.o: update.h patchlevel.h
- Xrcinit.o: rcinit.h
- Xconfig.o: config.h
- X
- Xinstall: $(NAME)
- X cp $(NAME) $(DEST)
- X strip $(DEST)/$(NAME)
- X chmod og-rw,a+x,u+rwx $(DEST)/$(NAME)
- X chown root $(DEST)/$(NAME)
- X chgrp bin $(DEST)/$(NAME)
- X @if [ -f /hp-ux ];\
- X then echo "installing HPUX man-page";make man-hpux;\
- X elif [ -f /386bsd -o /netbsd ];\
- X then echo "installing 386BSD man-page";make man-386bsd;fi
- X
- Xclean:
- X rm -f *.o cwish trace core* lint.out
- X
- Xveryclean:
- X rm -f *.o cwish trace core* update.h lint.out
- X
- Xman-hpux:
- X cp $(MANFILE) $(MANDIR)/$(MANHPUX)
- X
- Xman-386bsd:
- X nroff -mandoc $(MANFILE) >$(MANDIR)/$(MANBSD)/$(NAME).0
- X
- Xprint:
- X $(PRINTPROG) cwish.h rcinit.h config.h $(CFILES)
- X
- Xlint:
- X lint -s -Aa -D_HPUX_SOURCE $(DEFINES) $(CFILES) | tee lint.out
- X
- Xbackup:
- X @echo ""
- X @if [ -d BACKUP ];then rm -rf BACKUP-OLD;\
- X echo "moving BACKUP to BACKUP-OLD ...";\
- X mkdir BACKUP-OLD;\
- X mv BACKUP/* BACKUP-OLD;fi
- X @rm -rf BACKUP
- X @mkdir BACKUP
- X @echo "copying files to BACKUP ..."
- X @cp $(BAKFILES) BACKUP
- X @echo ""
- X
- X#-------------------------- E O F ---------------------------------------------
- END_OF_FILE
- if test 5139 -ne `wc -c <'Makefile.linux'`; then
- echo shar: \"'Makefile.linux'\" unpacked with wrong size!
- fi
- # end of 'Makefile.linux'
- fi
- if test -f 'Makefile.sunos' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile.sunos'\"
- else
- echo shar: Extracting \"'Makefile.sunos'\" \(4770 characters\)
- sed "s/^X//" >'Makefile.sunos' <<'END_OF_FILE'
- X#---------------------------------------------------------------------------
- X#
- X# cwish - windowing user friendly shell
- X# -------------------------------------
- X#
- X# Copyright (c) 1988-1993 Hellmuth Michaelis
- X#
- X# Eggerstedtstr. 28
- X# 22765 Hamburg
- X# Germany
- X#
- X# Tel: +49 / 40 / 384298 (private)
- X# Tel: +49 / 40 / 55903-170 (at work)
- X# e-mail: hm@hcshh.hcs.de
- X#
- X# --------oOo--------
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X#---------------------------------------------------------------------------
- X#
- X# Last edit-date: [Tue Oct 19 09:20:11 1993]
- X#
- X# Flags:
- X#
- X# CURSESBUG workaround for a bug in curses to re-enable
- X# sending of special keys after system(), commandline.c
- X#
- X# NOSTATFS statfs(2) call to identify CDROM filesystem not known
- X# see files.c
- X#
- X# USE_NCURSES use the sysv-curses lookalike ncurses instead of
- X# the local curses, try this if you only have i.e.
- X# BSD curses available on your machine. see cwish.h
- X# and the README file for ncurses availability
- X#
- X# DATE_US to get US date format (mm/dd/yy) in attribute window,
- X# if not defined, german format (dd.mm.yy) is used
- X#
- X# REREAD_AFTER_EDIT
- X# reread the current directory after returning from
- X# a fkey-1 initiated editor session, if not defined
- X# the directory is NOT reread and reflects the state
- X# prior to calling the editor
- X#
- X#---------------------------------------------------------------------------
- X#
- X# SunOS 4.1.3 support from Thomas E. Dickey, dickey@software.org
- X#
- X#---------------------------------------------------------------------------
- X
- XCC= gcc
- XNAME= cwish
- XDEST= /usr/local/bin
- XMANDIR= /usr/local/man
- XMANBSD= cat1
- XMANHPUX= man1
- XPRINTPROG= cprps
- X
- XINCLUDES=-I/usr/5include
- XLIBDIR=/usr/5lib
- XCPP_OPTS=$(INCLUDES) $(DEFINES) -DNOSTATFS
- XLFLAGS=-L$(LIBDIR) -lcurses
- X
- X.c.o: ; $(CC) $(CFLAGS) $(CPP_OPTS) -c $<
- X
- XCFILES= cwish.c files.c movement.c commandline.c rcinit.c \
- X fkeys.c paging.c cursor.c header.c history.c help.c \
- X usrgrp.c showtime.c config.c chdir.c complete.c\
- X usage.c
- X
- XOFILES= cwish.o files.o movement.o commandline.o rcinit.o \
- X fkeys.o paging.o cursor.o header.o history.o help.o \
- X usrgrp.o showtime.o config.o chdir.o complete.o\
- X usage.o
- X
- XHFILES= config.h control.h cwish.h rcinit.h patchlevel.h
- X
- XMISCFILES= COPYING MANIFEST README \
- X Makefile.386bsd Makefile.hpux Makefile.ultrix Makefile.sunos \
- X Makefile.aix Makefile.linux \
- X dot-cwishrc
- X
- XMANFILE= cwish.1
- X
- XBAKFILES= $(CFILES) $(HFILES) $(MISCFILES) $(MANFILE)
- X
- X$(NAME): $(OFILES)
- X $(CC) $(OFILES) $(LFLAGS) -o $(NAME)
- X
- Xupdate.h: Makefile $(CFILES) $(HFILES)
- X @/bin/sh -c "[ -f update.h ] || (echo 0 > update.h)"
- X @/bin/sh -c "expr `cat update.h` + 1 > update1.h && mv update1.h update.h"
- X @echo ""
- X @echo " compilation number updated to `cat update.h`"
- X @echo ""
- X
- X$(OFILES): cwish.h
- Xcwish.o: control.h
- Xusage.o: update.h patchlevel.h
- Xrcinit.o: rcinit.h
- Xconfig.o: config.h
- X
- Xinstall: $(NAME)
- X cp $(NAME) $(DEST)
- X strip $(DEST)/$(NAME)
- X chmod og-rw,a+x,u+rwx $(DEST)/$(NAME)
- X chown root $(DEST)/$(NAME)
- X chgrp bin $(DEST)/$(NAME)
- X @if [ -f /hp-ux ];\
- X then echo "installing HPUX man-page";make man-hpux;\
- X elif [ -f /386bsd -o /netbsd ];\
- X then echo "installing 386BSD man-page";make man-386bsd;fi
- X
- Xclean:
- X rm -f *.o cwish trace core* lint.out
- X
- Xveryclean:
- X rm -f *.o cwish trace core* update.h lint.out
- X
- Xman-hpux:
- X cp $(MANFILE) $(MANDIR)/$(MANHPUX)
- X
- Xman-386bsd:
- X nroff -mandoc $(MANFILE) >$(MANDIR)/$(MANBSD)/$(NAME).0
- X
- Xprint:
- X $(PRINTPROG) cwish.h rcinit.h config.h $(CFILES)
- X
- Xlint:
- X lint -s -Aa -D_HPUX_SOURCE -DCURSESBUG $(CFILES) | tee lint.out
- X
- Xbackup:
- X @echo ""
- X @if [ -d BACKUP ];then rm -rf BACKUP-OLD;\
- X echo "moving BACKUP to BACKUP-OLD ...";\
- X mkdir BACKUP-OLD;\
- X mv BACKUP/* BACKUP-OLD;fi
- X @rm -rf BACKUP
- X @mkdir BACKUP
- X @echo "copying files to BACKUP ..."
- X @cp $(BAKFILES) BACKUP
- X @echo ""
- X
- X#-------------------------- E O F ---------------------------------------------
- X
- END_OF_FILE
- if test 4770 -ne `wc -c <'Makefile.sunos'`; then
- echo shar: \"'Makefile.sunos'\" unpacked with wrong size!
- fi
- # end of 'Makefile.sunos'
- fi
- if test -f 'Makefile.ultrix' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile.ultrix'\"
- else
- echo shar: Extracting \"'Makefile.ultrix'\" \(4833 characters\)
- sed "s/^X//" >'Makefile.ultrix' <<'END_OF_FILE'
- X#---------------------------------------------------------------------------
- X#
- X# cwish - windowing user friendly shell
- X# -------------------------------------
- X#
- X# Copyright (c) 1988-1993 Hellmuth Michaelis
- X#
- X# Eggerstedtstr. 28
- X# 22765 Hamburg
- X# Germany
- X#
- X# Tel: +49 / 40 / 384298 (private)
- X# Tel: +49 / 40 / 55903-170 (at work)
- X# e-mail: hm@hcshh.hcs.de
- X#
- X# --------oOo--------
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 2 of the License, or
- X# (at your option) any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- X#---------------------------------------------------------------------------
- X#
- X# Last edit-date: [Tue Oct 19 09:20:06 1993]
- X#
- X# Flags:
- X#
- X# CURSESBUG workaround for a bug in curses to re-enable
- X# sending of special keys after system(), commandline.c
- X#
- X# NOSTATFS statfs(2) call to identify CDROM filesystem not known
- X# see files.c
- X#
- X# USE_NCURSES use the sysv-curses lookalike ncurses instead of
- X# the local curses, try this if you only have i.e.
- X# BSD curses available on your machine. see cwish.h
- X# and the README file for ncurses availability
- X#
- X# DATE_US to get US date format (mm/dd/yy) in attribute window,
- X# if not defined, german format (dd.mm.yy) is used
- X#
- X# REREAD_AFTER_EDIT
- X# reread the current directory after returning from
- X# a fkey-1 initiated editor session, if not defined
- X# the directory is NOT reread and reflects the state
- X# prior to calling the editor
- X#
- X#---------------------------------------------------------------------------
- X#
- X# Ultrix support from Gertjan van Oosten, gvoosten@isosa1.estec.esa.nl
- X#
- X#---------------------------------------------------------------------------
- X
- XCC= c89
- XNAME= cwish
- XDEST= /usr/local/bin
- XMANDIR= /usr/local/man
- XMANBSD= cat1
- XMANHPUX= man1
- XPRINTPROG= cprps
- X
- X#-- ULTRIX debugging (using DEC's ANSI C-Compiler) -------------------------
- X#CFLAGS=-g
- X#LFLAGS=-lcursesX
- X
- X#-- ULTRIX production (using DEC's ANSI C-Compiler) -------------------------
- XCFLAGS=-O
- XLFLAGS=-lcursesX
- X
- X
- XCFILES= cwish.c files.c movement.c commandline.c rcinit.c \
- X fkeys.c paging.c cursor.c header.c history.c help.c \
- X usrgrp.c showtime.c config.c chdir.c complete.c\
- X usage.c
- X
- XOFILES= cwish.o files.o movement.o commandline.o rcinit.o \
- X fkeys.o paging.o cursor.o header.o history.o help.o \
- X usrgrp.o showtime.o config.o chdir.o complete.o\
- X usage.o
- X
- XHFILES= config.h control.h cwish.h rcinit.h patchlevel.h
- X
- XMISCFILES= COPYING MANIFEST README \
- X Makefile.386bsd Makefile.hpux Makefile.ultrix Makefile.sunos \
- X Makefile.aix Makefile.linux \
- X dot-cwishrc
- X
- XMANFILE= cwish.1
- X
- XBAKFILES= $(CFILES) $(HFILES) $(MISCFILES) $(MANFILE)
- X
- X$(NAME): $(OFILES)
- X $(CC) $(OFILES) $(LFLAGS) -o $(NAME)
- X
- Xupdate.h: Makefile $(CFILES) $(HFILES)
- X @/bin/sh -c "[ -f update.h ] || (echo 0 > update.h)"
- X @/bin/sh -c "expr `cat update.h` + 1 > update1.h && mv update1.h update.h"
- X @echo ""
- X @echo " compilation number updated to `cat update.h`"
- X @echo ""
- X
- X$(OFILES): cwish.h
- Xcwish.o: control.h
- Xusage.o: update.h patchlevel.h
- Xrcinit.o: rcinit.h
- Xconfig.o: config.h
- X
- Xinstall: $(NAME)
- X cp $(NAME) $(DEST)
- X strip $(DEST)/$(NAME)
- X chmod og-rw,a+x,u+rwx $(DEST)/$(NAME)
- X chown root $(DEST)/$(NAME)
- X chgrp bin $(DEST)/$(NAME)
- X @if [ -f /hp-ux ];\
- X then echo "installing HPUX man-page";make man-hpux;\
- X elif [ -f /386bsd -o /netbsd ];\
- X then echo "installing 386BSD man-page";make man-386bsd;fi
- X
- Xclean:
- X rm -f *.o cwish trace core* lint.out
- X
- Xveryclean:
- X rm -f *.o cwish trace core* update.h lint.out
- X
- Xman-hpux:
- X cp $(MANFILE) $(MANDIR)/$(MANHPUX)
- X
- Xman-386bsd:
- X nroff -mandoc $(MANFILE) >$(MANDIR)/$(MANBSD)/$(NAME).0
- X
- Xprint:
- X $(PRINTPROG) cwish.h rcinit.h config.h $(CFILES)
- X
- Xlint:
- X lint -s -Aa -D_HPUX_SOURCE -DCURSESBUG $(CFILES) | tee lint.out
- X
- Xbackup:
- X @echo ""
- X @if [ -d BACKUP ];then rm -rf BACKUP-OLD;\
- X echo "moving BACKUP to BACKUP-OLD ...";\
- X mkdir BACKUP-OLD;\
- X mv BACKUP/* BACKUP-OLD;fi
- X @rm -rf BACKUP
- X @mkdir BACKUP
- X @echo "copying files to BACKUP ..."
- X @cp $(BAKFILES) BACKUP
- X @echo ""
- X
- X#-------------------------- E O F ---------------------------------------------
- END_OF_FILE
- if test 4833 -ne `wc -c <'Makefile.ultrix'`; then
- echo shar: \"'Makefile.ultrix'\" unpacked with wrong size!
- fi
- # end of 'Makefile.ultrix'
- fi
- if test -f 'cursor.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'cursor.c'\"
- else
- echo shar: Extracting \"'cursor.c'\" \(6042 characters\)
- sed "s/^X//" >'cursor.c' <<'END_OF_FILE'
- X/*---------------------------------------------------------------------------*
- X *
- X * cwish - windowing user friendly shell
- X * -------------------------------------
- X *
- X * (c) Copyright Hellmuth Michaelis 1989 - 1993
- X *
- X * Eggerstedtstr. 28
- X * 22765 Hamburg
- X * Germany
- X *
- X * Tel: +49 / 40 / 384298 (private)
- X * Tel: +49 / 40 / 55903-170 (at work)
- X * e-mail: hm@hcshh.hcs.de
- X *
- X * All rights are reserved except as explicitly granted
- X * by written permission of the author.
- X *
- X * See the file COPYING, distributed with cwish, for
- X * restriction and warranty information
- X *
- X *---------------------------------------------------------------------------*
- X *
- X * Last Edit-Date: [Wed Oct 20 11:30:36 1993]
- X *
- X * -hm conversion to multiple curses windows
- X * -hm marked/tagged file sizes
- X *
- X *----------------------------------------------------------------------------*/
- X
- X#include "cwish.h"
- X
- X/*---------------------------------------------------------------------------*
- X * make current file name inverse, fill file attributes
- X *---------------------------------------------------------------------------*/
- Xvoid cur_inv(struct onefile *current)
- X{
- X wmove(file_w,current->orow,current->ocol);
- X
- X if(current->tag)
- X wattrset(file_w, A_UNDERLINE);
- X else
- X wattron(file_w, A_REVERSE);
- X
- X waddstr(file_w, &(current->onam[1]));
- X wattrset(file_w, A_NORMAL);
- X attribs(0);
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * make current file name blink
- X *---------------------------------------------------------------------------*/
- Xvoid cur_blink(struct onefile *current)
- X{
- X wmove(file_w,current->orow,current->ocol);
- X wattrset(file_w, A_BLINK | A_REVERSE);
- X waddstr(file_w, &(current->onam[1]));
- X wattrset(file_w, A_NORMAL);
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * make current filename normal again
- X *---------------------------------------------------------------------------*/
- Xvoid cur_norm(struct onefile *current)
- X{
- X wmove(file_w, current->orow, current->ocol);
- X
- X if(current->tag)
- X wattrset(file_w, A_REVERSE);
- X else
- X wattrset(file_w, A_NORMAL);
- X
- X waddstr(file_w, &(current->onam[1]));
- X wattrset(file_w, A_REVERSE);
- X
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * tag current filename and print as tagged
- X *---------------------------------------------------------------------------*/
- Xvoid tag_current(struct onefile *current)
- X{
- X wmove(file_w, current->orow, current->ocol);
- X
- X if(current->tag) /* current filename already tagged ? */
- X {
- X wattron(file_w, A_REVERSE);
- X waddstr(file_w, &(current->onam[1]));
- X wattroff(file_w, A_REVERSE);
- X current->tag = 0; /* was tagged, now untag */
- X tagsize -= current->osiz;
- X
- X if(tagsize == 0)
- X {
- X wmove(fst_w, 0, COLS-ENTRYSW-ENTRYCW); /* move to entries string */
- X wclrtoeol(fst_w);
- X wattron(fst_w, A_UNDERLINE); /* underline on */
- X
- X if(opt_wildon) /* wildcarding enabled */
- X {
- X waddstr(fst_w, "Matches:"); /* description */
- X }
- X else /* normal operation */
- X {
- X waddstr(fst_w, "Entries:"); /* description */
- X }
- X
- X wmove(fst_w, 0, COLS-ENTRYCW); /* move to entries string */
- X wattroff(fst_w, A_UNDERLINE); /* underline off */
- X waddstr(fst_w, counter); /* print current count */
- X return; /* exit routine ! */
- X }
- X }
- X else
- X {
- X wattron(file_w, A_UNDERLINE);
- X waddstr(file_w, &(current->onam[1]));
- X wattroff(file_w, A_UNDERLINE);
- X current->tag = 1; /* was not tagged, now tag */
- X if(tagsize == 0)
- X {
- X wattron(fst_w, A_UNDERLINE); /* underline on */
- X wmove(fst_w, 0, COLS-ENTRYSW-ENTRYCW); /* move to entries string */
- X waddstr(fst_w, "Byte:"); /* description */
- X wattroff(fst_w, A_UNDERLINE); /* underline on */
- X }
- X tagsize += current->osiz;
- X }
- X wmove(fst_w, 0, COLS-ENTRYCW-4);/* move to entries string */
- X wprintw(fst_w, "%8d", tagsize); /* print size */
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * if filename tagged, print as tagged, else print normal
- X *---------------------------------------------------------------------------*/
- Xvoid is_tagged(struct onefile *current)
- X{
- X wmove(file_w, current->orow, current->ocol);
- X
- X if(current->tag) /* current filename tagged ? */
- X {
- X wattron(file_w, A_REVERSE);
- X waddstr(file_w, &(current->onam[1]));
- X wattroff(file_w, A_REVERSE);
- X }
- X else
- X {
- X waddstr(file_w, &(current->onam[1]));
- X }
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * untag ALL tagged filenames
- X *---------------------------------------------------------------------------*/
- Xvoid untag_all(void)
- X{
- X struct onefile *cur_ptr;
- X
- X int thispage = ((cur_file->page) & PAGE_MSK);
- X
- X cur_ptr = first; /* first file in dir */
- X
- X tagsize = 0; /* reset size */
- X
- X wmove(fst_w, 0, COLS-ENTRYSW-ENTRYCW); /* move to entries string */
- X wclrtoeol(fst_w);
- X wattron(fst_w, A_UNDERLINE); /* underline on */
- X
- X if(opt_wildon) /* wildcarding enabled */
- X {
- X waddstr(fst_w, "Matches:"); /* description */
- X }
- X else /* normal operation */
- X {
- X waddstr(fst_w, "Entries:"); /* description */
- X }
- X
- X wmove(fst_w, 0, COLS-ENTRYCW); /* move to entries string */
- X wattroff(fst_w, A_UNDERLINE); /* underline off */
- X waddstr(fst_w, counter); /* print current count */
- X
- X while(cur_ptr != NULL)
- X {
- X if(cur_ptr->tag)
- X {
- X if((cur_ptr->page == thispage) || (cur_ptr->page == (thispage | FIRST)))
- X {
- X wmove(file_w, cur_ptr->orow,((cur_ptr->ocol)-1));
- X wattroff(file_w,A_REVERSE);
- X waddch(file_w,SPACE);
- X wattroff(file_w,A_REVERSE);
- X waddstr(file_w,&(cur_ptr->onam[1]));
- X wattroff(file_w,A_REVERSE);
- X waddch(file_w,SPACE);
- X wattroff(file_w,A_REVERSE);
- X }
- X }
- X cur_ptr->tag = 0;
- X cur_ptr = cur_ptr->next;
- X }
- X cur_inv(cur_file); /* just for shure ... */
- X}
- X
- X/*---------------------------------- EOF -------------------------------------*/
- END_OF_FILE
- if test 6042 -ne `wc -c <'cursor.c'`; then
- echo shar: \"'cursor.c'\" unpacked with wrong size!
- fi
- # end of 'cursor.c'
- fi
- if test -f 'dot-cwishrc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'dot-cwishrc'\"
- else
- echo shar: Extracting \"'dot-cwishrc'\" \(1772 characters\)
- sed "s/^X//" >'dot-cwishrc' <<'END_OF_FILE'
- X#-------------------------------------------------------------------------------
- X#
- X# .cwishrc - "cwish" runtime initialization file ($HOME - directory)
- X#
- X# last edit-date: [Sun Oct 17 18:05:31 1993]
- X#
- X#-------------------------------------------------------------------------------
- Xattributes=on # enable the display of file attributes in a
- X # separate window at the bottom of the screen
- X
- Xpreserve=on # when moving the directory tree up, place the
- X # current file at the directory we came from
- X
- Xfkeys=on # enable the display of function key labels in
- X # a separate window at the bootom of the screen
- X
- Xlinks=on # enable detection of links for display in the
- X # attribute window (slows reading down)
- X
- Xpoint=off # do not show "." directory in file window
- X
- Xreturn=on # wait for return on external command
- X
- Xshell=/bin/ksh # shell to be used for executing commands
- X
- Xpager=/usr/local/bin/less # pager to be used for display data
- X
- Xeditor=/usr/local/bin/emacs # editor to be used for editing data
- X
- X# delimiter=~ # delimiter to be used to delimit the windows
- X # horizontally, normally got from terminfo
- X
- Xwildenable=off # enable filename wildcard matching, directories
- X # are displayed as usual
- X
- Xwildcard=* # wildcard specification string, see also
- X # wildenable above (slows reading down if enabled)
- X
- Xcdrom=off # cdrom special filename processing enable (some
- X # systems place a ';' in the filename i.e HPUX)
- X
- Xcdnoprog=on # display all executables on cdrom in files sect
- X # (some systems tag data files as executables)
- X
- Xdotnames=on # display filenames starting with a "."
- X
- Xtagmove=on # move to next filename after tagging the
- X # current one
- X
- X#-------------------------------------------------------------------------------
- END_OF_FILE
- if test 1772 -ne `wc -c <'dot-cwishrc'`; then
- echo shar: \"'dot-cwishrc'\" unpacked with wrong size!
- fi
- # end of 'dot-cwishrc'
- fi
- if test -f 'help.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'help.c'\"
- else
- echo shar: Extracting \"'help.c'\" \(5069 characters\)
- sed "s/^X//" >'help.c' <<'END_OF_FILE'
- X/*---------------------------------------------------------------------------*
- X *
- X * cwish - windowing user friendly shell
- X * -------------------------------------
- X *
- X * Copyright (c) 1988-1993 Hellmuth Michaelis
- X *
- X * Eggerstedtstr. 28
- X * 22765 Hamburg
- X * Germany
- X *
- X * Tel: +49 / 40 / 384298 (private)
- X * Tel: +49 / 40 / 55903-170 (at work)
- X * e-mail: hm@hcshh.hcs.de
- X *
- X * --------oOo--------
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X *---------------------------------------------------------------------------*
- X *
- X * Last Edit-Date: [Wed Oct 20 16:49:33 1993]
- X *
- X * -hm fkey labels for help screen
- X * -hm update help screen
- X *
- X *----------------------------------------------------------------------------*/
- X
- X#include "cwish.h"
- X
- X#define MAXHELPL 20
- X
- X
- X/*---------------------------------------------------------------------------*
- X * help function keys
- X *---------------------------------------------------------------------------*/
- X
- Xstatic struct fk_tab help_keys[] = {
- X {" ", " "},
- X {" ", " "},
- X {" ", " "},
- X {" ", " "},
- X {" ", " "},
- X {" ", " "},
- X {" ", " "},
- X {" ", " "}
- X};
- X
- Xstatic char *helpstr[MAXHELPL] = {
- X" ----------------------- Command Window Commands: -------------------------",
- X"",
- X" Backspace - Delete left Character Delete - Delete Cursor Character",
- X" Control-F - Character forward Control-B - Character backward",
- X" Control-A - Begin of Line Control-E - End of Line",
- X" Control-N - Next Line Control-P - Previous Line",
- X" Control-K - Kill Line from Cursor Control-Y - Yank back killed Line",
- X" Control-D - Exit back to System \"%\" is the marked files wildcard char",
- X"",
- X" ------------------------- File Window Commands: --------------------------",
- X"",
- X" Cursor up, Cursor down, Cursor right, Cursor left - Select a file",
- X" Page Up - Previous file page Page Down - Next file page",
- X" F1 - Edit current file F2 - Echo name to commandline",
- X" F3 - Display this help F4 - Enter configuration menu",
- X" F5 - Mark the current file F6 - Unmark all marked files",
- X" F7 - Alternate attribute line F8 - Close current directory",
- X"",
- X" Alternate Invocation of F1...F8 by pressing ESCAPE and then '1'...'8'",
- X" Alternate Invocation of Page up/down by pressing ESCAPE and then 'N' or 'P'",
- X};
- X
- Xchar *contin = {"Press any Key to continue ..."};
- X
- X/*---------------------------------------------------------------------------*
- X * help page
- X *---------------------------------------------------------------------------*/
- Xvoid help(void)
- X{
- X int i;
- X
- X suspend_time(); /* stop updating time */
- X
- X cur_fktab = &help_keys; /* help screen fkey label table */
- X init_flabels();
- X
- X wmove(stdscr, 0, 0); /* first line */
- X wclear(stdscr); /* clear window */
- X touchwin(stdscr);
- X wnoutrefresh(stdscr);
- X
- X move(0, 0); /* first line */
- X attron(A_REVERSE); /* highlight on */
- X addstr(headerline); /* program/copyright header */
- X attroff(A_REVERSE); /* highlight off */
- X
- X for(i = 0; i < MAXHELPL; i++)
- X mvaddstr(2+i, 0, helpstr[i]); /* print help screen */
- X
- X move(LINES-1, 0); /* last line */
- X
- X attron(A_REVERSE); /* highlight on */
- X addstr(contin);
- X attroff(A_REVERSE); /* highlight on */
- X move(LINES-1, strlen(contin)); /* last line */
- X refresh(); /* show it */
- X
- X getch(); /* get any char from user */
- X
- X wmove(stdscr, 0, 0); /* first line */
- X wclear(stdscr); /* clear window */
- X touchwin(stdscr);
- X wnoutrefresh(stdscr);
- X
- X touchwin(cmnd_w);
- X touchwin(fst_w);
- X touchwin(file_w);
- X if(opt_attrib)
- X touchwin(attr_w);
- X if(opt_labels)
- X touchwin(flbl_w);
- X
- X resume_time(); /* restart updating time */
- X
- X header(); /* new header */
- X dis_hist(); /* display current commandline */
- X fresh_files(); /* refresh files */
- X attribs(1); /* new attributes */
- X update_all(); /* update complete screen */
- X
- X cur_fktab = &sys_keys; /* system fkey label table */
- X init_flabels();
- X}
- X
- X/*----------------------- E O F -------------------------------------------*/
- END_OF_FILE
- if test 5069 -ne `wc -c <'help.c'`; then
- echo shar: \"'help.c'\" unpacked with wrong size!
- fi
- # end of 'help.c'
- fi
- if test -f 'movement.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'movement.c'\"
- else
- echo shar: Extracting \"'movement.c'\" \(6363 characters\)
- sed "s/^X//" >'movement.c' <<'END_OF_FILE'
- X/*---------------------------------------------------------------------------*
- X *
- X * cwish - windowing user friendly shell
- X * -------------------------------------
- X *
- X * Copyright (c) 1988-1993 Hellmuth Michaelis
- X *
- X * Eggerstedtstr. 28
- X * 22765 Hamburg
- X * Germany
- X *
- X * Tel: +49 / 40 / 384298 (private)
- X * Tel: +49 / 40 / 55903-170 (at work)
- X * e-mail: hm@hcshh.hcs.de
- X *
- X * --------oOo--------
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X *---------------------------------------------------------------------------*
- X *
- X * Last Edit-Date: [Sun Oct 17 18:17:41 1993]
- X *
- X * -hm conversion to curses
- X * -hm rewrite to not look at filetype anymore
- X * -hm consistent up/down and left/right moves
- X *
- X *----------------------------------------------------------------------------*/
- X
- X#include "cwish.h"
- X
- Xstatic int iscurpag(void);
- X
- X/*---------------------------------------------------------------------------*
- X * return true if filename is on current displayed page
- X *---------------------------------------------------------------------------*/
- Xstatic int iscurpag(void)
- X{
- X return(((cur_file->page) & PAGE_MSK) == cur_page );
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * move current file to first file on page
- X *---------------------------------------------------------------------------*/
- Xint firstfile(void)
- X{
- X cur_file = scr_beg;
- X
- X for(;;)
- X {
- X if(iscurpag())
- X return(GOOD);
- X else if(cur_file->next == NULL)
- X return(BAD);
- X else
- X cur_file = cur_file->next;
- X }
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * move current file to last file on page
- X *---------------------------------------------------------------------------*/
- Xint lastfile(void)
- X{
- X cur_file = scr_beg; /* start of screen */
- X
- X for(;;)
- X {
- X if(cur_file->next == NULL)
- X break;
- X if((cur_file->next->page) == ((cur_page + 1) | FIRST))
- X break;
- X cur_file = cur_file->next;
- X }
- X for(;;)
- X {
- X if(iscurpag())
- X return(GOOD);
- X else if(cur_file->prev == NULL)
- X return(BAD);
- X else
- X cur_file = cur_file->prev;
- X }
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * move current file to next file on page
- X *---------------------------------------------------------------------------*/
- Xint nextfile(void)
- X{
- X for(;;)
- X {
- X if(cur_file->next == NULL)
- X return(BAD);
- X cur_file = cur_file->next;
- X if(iscurpag())
- X return(GOOD);
- X }
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * move current file to previous file on page
- X *---------------------------------------------------------------------------*/
- Xint prevfile(void)
- X{
- X for(;;)
- X {
- X if(cur_file->prev == NULL)
- X return(BAD);
- X cur_file = cur_file->prev;
- X if(iscurpag())
- X return(GOOD);
- X }
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * move highlighted file to first file on page
- X *---------------------------------------------------------------------------*/
- Xvoid move_home(void)
- X{
- X cur_norm(cur_file);
- X firstfile();
- X cur_inv(cur_file);
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * move highlighted file to last file on page
- X *---------------------------------------------------------------------------*/
- Xvoid move_hmdn(void)
- X{
- X cur_norm(cur_file);
- X lastfile();
- X cur_inv(cur_file);
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * move highlighted file one pos right, wrapping on end
- X *---------------------------------------------------------------------------*/
- Xvoid move_right(void)
- X{
- X cur_norm(cur_file);
- X if(nextfile() == BAD)
- X firstfile();
- X cur_inv(cur_file);
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * move highlighted file one pos left, wrapping on begin
- X *---------------------------------------------------------------------------*/
- Xvoid move_left(void)
- X{
- X cur_norm(cur_file);
- X if(prevfile() == BAD)
- X lastfile();
- X cur_inv(cur_file);
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * move highlighted file one pos up, wrapping on top
- X *---------------------------------------------------------------------------*/
- Xvoid move_up(void)
- X{
- X struct onefile *save_cur;
- X int upcol;
- X
- X save_cur = cur_file; /* fail safe */
- X
- X upcol = cur_file->ocol; /* current column */
- X
- X if(first != NULL)
- X {
- X cur_norm(cur_file);
- X
- X while(prevfile() != BAD)
- X {
- X if(cur_file->ocol == upcol)
- X goto upfound;
- X }
- X if(lastfile() != BAD)
- X {
- X do
- X {
- X if(cur_file->ocol == upcol)
- X goto upfound;
- X }
- X while(prevfile() != BAD);
- X }
- X }
- X cur_file = save_cur; /* not found, no change ! */
- X
- Xupfound:
- X cur_inv(cur_file);
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * move highlighted file one pos down, wrapping on bottom
- X *---------------------------------------------------------------------------*/
- Xvoid move_down(void)
- X{
- X struct onefile *save_cur;
- X int downcol;
- X
- X save_cur = cur_file; /* fail safe */
- X
- X downcol = cur_file->ocol; /* current column */
- X
- X if(first != NULL)
- X {
- X cur_norm(cur_file);
- X
- X while(nextfile() != BAD)
- X {
- X if(cur_file->ocol == downcol)
- X goto downfound;
- X }
- X if(firstfile() != BAD)
- X {
- X do
- X {
- X if(cur_file->ocol == downcol)
- X goto downfound;
- X }
- X while(nextfile() != BAD);
- X }
- X }
- X cur_file = save_cur; /* not found, no change ! */
- X
- Xdownfound:
- X cur_inv(cur_file);
- X}
- X
- X/*---------------------------------- EOF -------------------------------------*/
- X
- END_OF_FILE
- if test 6363 -ne `wc -c <'movement.c'`; then
- echo shar: \"'movement.c'\" unpacked with wrong size!
- fi
- # end of 'movement.c'
- fi
- if test -f 'rcinit.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'rcinit.c'\"
- else
- echo shar: Extracting \"'rcinit.c'\" \(5268 characters\)
- sed "s/^X//" >'rcinit.c' <<'END_OF_FILE'
- X/*---------------------------------------------------------------------------*
- X *
- X * cwish - windowing user friendly shell
- X * -------------------------------------
- X *
- X * Copyright (c) 1988-1993 Hellmuth Michaelis
- X *
- X * Eggerstedtstr. 28
- X * 22765 Hamburg
- X * Germany
- X *
- X * Tel: +49 / 40 / 384298 (private)
- X * Tel: +49 / 40 / 55903-170 (at work)
- X * e-mail: hm@hcshh.hcs.de
- X *
- X * --------oOo--------
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 2 of the License, or
- X * (at your option) any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X *
- X *---------------------------------------------------------------------------*
- X *
- X * Last Edit-Date: [Sun Oct 17 18:17:42 1993]
- X *
- X * -hm init file ".wishrc"
- X * -hm wildcards
- X * -hm move after tag
- X *
- X *----------------------------------------------------------------------------*/
- X
- X#include "cwish.h" /* everything we want */
- X#include "control.h" /* control-characters */
- X#include "rcinit.h" /* .cwishrc definitions */
- X
- Xstatic void onoff(char *string, int *var);
- Xstatic void optchar(char *string, unsigned char *var);
- Xstatic void optstr(char *string, char dest[]);
- X
- X/*---------------------------------------------------------------------------*
- X * get user configuration from file "$HOME/.cwishrc"
- X *---------------------------------------------------------------------------*/
- Xvoid readrc(void)
- X{
- X char buffer[MAXPATHLEN+1]; /* gp buffer */
- X FILE *fp;
- X
- X sprintf(buffer, "%s/%s", envhome, CWISHRC);
- X
- X if((fp = fopen(buffer, "r")) == NULL)
- X return;
- X
- X while((fgets(buffer, MAXPATHLEN, fp)) != NULL)
- X {
- X
- X/* comments */
- X if(buffer[0] == '#' || buffer[0] == ' ' || buffer[0] == '\t')
- X {
- X continue;
- X }
- X/* booleans */
- X else if(!strncmp(buffer, RC_ATTR, strlen(RC_ATTR)))
- X {
- X onoff(buffer, &opt_attrib);
- X }
- X else if(!strncmp(buffer, RC_PRESERVE, strlen(RC_PRESERVE)))
- X {
- X onoff(buffer, &opt_preserve);
- X }
- X else if(!strncmp(buffer, RC_FKEYS, strlen(RC_FKEYS)))
- X {
- X onoff(buffer, &opt_labels);
- X }
- X else if(!strncmp(buffer, RC_LINKS, strlen(RC_LINKS)))
- X {
- X onoff(buffer, &opt_links);
- X }
- X else if(!strncmp(buffer, RC_POINT, strlen(RC_POINT)))
- X {
- X onoff(buffer, &opt_point);
- X }
- X else if(!strncmp(buffer, RC_RETURN, strlen(RC_RETURN)))
- X {
- X onoff(buffer, &opt_return);
- X }
- X else if(!strncmp(buffer, RC_WILDON, strlen(RC_WILDON)))
- X {
- X onoff(buffer, &opt_wildon);
- X }
- X else if(!strncmp(buffer, RC_CDROM, strlen(RC_CDROM)))
- X {
- X onoff(buffer, &opt_cdrom);
- X }
- X else if(!strncmp(buffer, RC_CDNOPROG, strlen(RC_CDNOPROG)))
- X {
- X onoff(buffer, &opt_cdnoprog);
- X }
- X else if(!strncmp(buffer, RC_DOTNAMES, strlen(RC_DOTNAMES)))
- X {
- X onoff(buffer, &opt_dotnames);
- X }
- X else if(!strncmp(buffer, RC_TAGMOVE, strlen(RC_TAGMOVE)))
- X {
- X onoff(buffer, &opt_tagmove);
- X }
- X/* strings */
- X else if(!strncmp(buffer, RC_PAGER, strlen(RC_PAGER)))
- X {
- X optstr(buffer, opt_more);
- X }
- X else if(!strncmp(buffer, RC_EDITOR, strlen(RC_EDITOR)))
- X {
- X optstr(buffer, opt_edit);
- X }
- X else if(!strncmp(buffer, RC_WILDCARD, strlen(RC_WILDCARD)))
- X {
- X optstr(buffer, opt_wild);
- X }
- X/* characters */
- X else if(!strncmp(buffer, RC_DELIMITER, strlen(RC_DELIMITER)))
- X {
- X optchar(buffer, &opt_delimiter);
- X }
- X }
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * process on/off strings
- X *---------------------------------------------------------------------------*/
- Xstatic void onoff(char *string, int *var)
- X{
- X char *ptr;
- X
- X if((ptr = (char *)index(string, '=')) == NULL)
- X return;
- X
- X ptr++;
- X
- X if(!strncmp(ptr, RC_ON, strlen(RC_ON)))
- X {
- X *var = 1;
- X }
- X else if(!strncmp(ptr, RC_OFF, strlen(RC_OFF)))
- X {
- X *var = 0;
- X }
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * process chars
- X *---------------------------------------------------------------------------*/
- Xstatic void optchar(char *string, unsigned char *var)
- X{
- X unsigned char *ptr;
- X
- X if((ptr = (unsigned char *)index(string, '=')) == NULL)
- X return;
- X
- X ptr++;
- X
- X if(isprint(*ptr))
- X *var = *ptr;
- X}
- X
- X/*---------------------------------------------------------------------------*
- X * process strings
- X *---------------------------------------------------------------------------*/
- Xstatic void optstr(char *string, char dest[])
- X{
- X char *ptr, *bptr;
- X
- X if((ptr = (char *)index(string, '=')) == NULL)
- X return;
- X
- X ptr++;
- X
- X bptr = dest;
- X
- X while(*ptr && (*ptr != '#') && (isprint(*ptr)) && (!isspace(*ptr)))
- X *bptr++ = *ptr++;
- X
- X *bptr = '\0';
- X}
- X
- X/*--------------------------------- EOF ------------------------------------*/
- END_OF_FILE
- if test 5268 -ne `wc -c <'rcinit.c'`; then
- echo shar: \"'rcinit.c'\" unpacked with wrong size!
- fi
- # end of 'rcinit.c'
- fi
- echo shar: End of archive 4 \(of 5\).
- cp /dev/null ark4isdone
- MISSING=""
- for I in 1 2 3 4 5 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 5 archives.
- rm -f ark[1-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
-