home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume40 / cwish / part04 < prev    next >
Encoding:
Text File  |  1993-11-01  |  60.2 KB  |  1,964 lines

  1. Newsgroups: comp.sources.misc
  2. From: hm@hcshh.hcs.de (Hellmuth Michaelis)
  3. Subject: v40i071:  cwish - Window Shell / Filemanager v2.00, Part04/05
  4. Message-ID: <1993Nov1.220749.9571@sparky.sterling.com>
  5. X-Md4-Signature: 79203d915a3bf15fd8bf59e283783f24
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Mon, 1 Nov 1993 22:07:49 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: hm@hcshh.hcs.de (Hellmuth Michaelis)
  12. Posting-number: Volume 40, Issue 71
  13. Archive-name: cwish/part04
  14. Environment: UNIX, ANSI-C, SYSV-CURSES
  15. Supersedes: cwish: Volume 39, Issue 97-100
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then feed it
  19. # into a shell via "sh file" or similar.  To overwrite existing files,
  20. # type "sh file -c".
  21. # Contents:  Makefile.386bsd Makefile.aix Makefile.hpux Makefile.linux
  22. #   Makefile.sunos Makefile.ultrix cursor.c dot-cwishrc help.c
  23. #   movement.c rcinit.c
  24. # Wrapped by kent@sparky on Fri Oct 29 14:39:11 1993
  25. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
  26. echo If this archive is complete, you will see the following message:
  27. echo '          "shar: End of archive 4 (of 5)."'
  28. if test -f 'Makefile.386bsd' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'Makefile.386bsd'\"
  30. else
  31.   echo shar: Extracting \"'Makefile.386bsd'\" \(4994 characters\)
  32.   sed "s/^X//" >'Makefile.386bsd' <<'END_OF_FILE'
  33. X#---------------------------------------------------------------------------
  34. X#
  35. X#                  cwish - windowing user friendly shell
  36. X#                  -------------------------------------
  37. X#
  38. X#               Copyright (c) 1988-1993 Hellmuth Michaelis
  39. X#
  40. X#                  Eggerstedtstr. 28
  41. X#                  22765 Hamburg
  42. X#                  Germany
  43. X#
  44. X#                  Tel:    +49 / 40 / 384298    (private)
  45. X#                  Tel:    +49 / 40 / 55903-170 (at work)
  46. X#                  e-mail: hm@hcshh.hcs.de
  47. X#
  48. X#                          --------oOo--------
  49. X#
  50. X#   This program is free software; you can redistribute it and/or modify
  51. X#   it under the terms of the GNU General Public License as published by
  52. X#   the Free Software Foundation; either version 2 of the License, or
  53. X#   (at your option) any later version.
  54. X#
  55. X#   This program is distributed in the hope that it will be useful,
  56. X#   but WITHOUT ANY WARRANTY; without even the implied warranty of
  57. X#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  58. X#   GNU General Public License for more details.
  59. X#
  60. X#   You should have received a copy of the GNU General Public License
  61. X#   along with this program; if not, write to the Free Software
  62. X#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  63. X#
  64. X#---------------------------------------------------------------------------
  65. X#
  66. X#    Last edit-date: [Fri Oct 29 13:13:19 1993]
  67. X#
  68. X#    Flags:
  69. X#
  70. X#    CURSESBUG    workaround for a bug in curses to re-enable
  71. X#            sending of special keys after system(), commandline.c
  72. X#
  73. X#    NOSTATFS    statfs(2) call to identify CDROM filesystem not known
  74. X#            see files.c
  75. X#
  76. X#    USE_NCURSES    use the sysv-curses lookalike ncurses instead of
  77. X#            the local curses, try this if you only have i.e.
  78. X#            BSD curses available on your machine. see cwish.h
  79. X#            and the README file for ncurses availability
  80. X#
  81. X#    DATE_US        to get US date format (mm/dd/yy) in attribute window,
  82. X#            if not defined, german format (dd.mm.yy) is used
  83. X#
  84. X#    REREAD_AFTER_EDIT
  85. X#            reread the current directory after returning from
  86. X#            a fkey-1 initiated editor session, if not defined
  87. X#            the directory is NOT reread and reflects the state
  88. X#            prior to calling the editor
  89. X#
  90. X#---------------------------------------------------------------------------
  91. X
  92. XCC=        gcc2
  93. XNAME=        cwish
  94. XDEST=        /usr/local/bin
  95. XMANDIR=        /usr/local/man
  96. XMANBSD=        cat1
  97. XMANHPUX=    man1
  98. XPRINTPROG=    cprps
  99. XDEFINES=    -DCURSESBUG -DUSE_NCURSES -DREREAD_AFTER_EDIT
  100. X
  101. X#-- 386BSD debugging -------------------------------------------------------
  102. XCFLAGS=    -O2 -Wall -g -pipe $(DEFINES) -I/usr/local/include
  103. XLFLAGS=    -lncurses
  104. X
  105. X#-- 386BSD curses debugging ------------------------------------------------
  106. X#CFLAGS=    -O2 -Wall -g -pipe $(DEFINES) -I/usr/local/include
  107. X#LFLAGS=    -ldncurses
  108. X
  109. X#-- 386BSD production ------------------------------------------------------
  110. X#CFLAGS=    -O2 -Wall -pipe $(DEFINES) -I/usr/local/include
  111. X#LFLAGS=    -s -lncurses
  112. X
  113. X
  114. XCFILES=        cwish.c files.c movement.c commandline.c rcinit.c \
  115. X        fkeys.c paging.c cursor.c header.c history.c help.c \
  116. X        usrgrp.c showtime.c config.c chdir.c complete.c\
  117. X        usage.c 
  118. X
  119. XOFILES=        cwish.o files.o movement.o commandline.o rcinit.o \
  120. X        fkeys.o paging.o cursor.o header.o history.o help.o \
  121. X        usrgrp.o showtime.o config.o chdir.o complete.o\
  122. X        usage.o 
  123. X
  124. XHFILES=        config.h control.h cwish.h rcinit.h patchlevel.h
  125. X
  126. XMISCFILES=    COPYING MANIFEST README \
  127. X        Makefile.386bsd Makefile.hpux Makefile.ultrix Makefile.sunos \
  128. X        Makefile.aix Makefile.linux \
  129. X        dot-cwishrc 
  130. X
  131. XMANFILE=    cwish.1
  132. X
  133. XBAKFILES=    $(CFILES) $(HFILES) $(MISCFILES) $(MANFILE)
  134. X
  135. X$(NAME):    $(OFILES)
  136. X            $(CC) $(OFILES) $(LFLAGS) -o $(NAME)
  137. X            
  138. Xupdate.h:    Makefile $(CFILES) $(HFILES)
  139. X    @/bin/sh -c "[ -f update.h ] || (echo 0 > update.h)"
  140. X    @/bin/sh -c "expr `cat update.h` + 1 > update1.h && mv update1.h update.h"
  141. X    @echo ""
  142. X    @echo "        compilation number updated to `cat update.h`"
  143. X    @echo ""
  144. X
  145. X$(OFILES):    cwish.h
  146. Xcwish.o:        control.h
  147. Xusage.o:    update.h patchlevel.h
  148. Xrcinit.o:    rcinit.h
  149. Xconfig.o:    config.h
  150. X
  151. Xinstall:    $(NAME)
  152. X        cp $(NAME) $(DEST)
  153. X        strip $(DEST)/$(NAME)
  154. X        chmod og-rw,a+x,u+rwx $(DEST)/$(NAME)
  155. X        chown root $(DEST)/$(NAME)
  156. X        chgrp bin $(DEST)/$(NAME)
  157. X        @if [ -f /hp-ux ];\
  158. X         then echo "installing HPUX man-page";make man-hpux;\
  159. X        elif [ -f /386bsd -o /netbsd ];\
  160. X         then echo "installing 386BSD man-page";make man-386bsd;fi
  161. X        
  162. Xclean:        
  163. X        rm -f *.o cwish trace core* lint.out
  164. X
  165. Xveryclean:
  166. X        rm -f *.o cwish trace core* update.h lint.out
  167. X
  168. Xman-hpux:
  169. X        cp $(MANFILE) $(MANDIR)/$(MANHPUX)
  170. X
  171. Xman-386bsd:
  172. X        nroff -mandoc $(MANFILE) >$(MANDIR)/$(MANBSD)/$(NAME).0
  173. X
  174. Xprint:
  175. X        $(PRINTPROG) cwish.h rcinit.h config.h $(CFILES)
  176. X
  177. Xlint:
  178. X        lint -s -Aa -D_HPUX_SOURCE $(DEFINES) $(CFILES) | tee lint.out
  179. X
  180. Xbackup:
  181. X        @echo ""
  182. X        @if [ -d BACKUP ];then rm -rf BACKUP-OLD;\
  183. X            echo "moving BACKUP to BACKUP-OLD ...";\
  184. X            mkdir BACKUP-OLD;\
  185. X            mv BACKUP/* BACKUP-OLD;fi
  186. X        @rm -rf BACKUP
  187. X        @mkdir BACKUP
  188. X        @echo "copying files to BACKUP ..."
  189. X        @cp $(BAKFILES) BACKUP
  190. X        @echo ""
  191. X
  192. X#-------------------------- E O F ---------------------------------------------
  193. END_OF_FILE
  194.   if test 4994 -ne `wc -c <'Makefile.386bsd'`; then
  195.     echo shar: \"'Makefile.386bsd'\" unpacked with wrong size!
  196.   fi
  197.   # end of 'Makefile.386bsd'
  198. fi
  199. if test -f 'Makefile.aix' -a "${1}" != "-c" ; then 
  200.   echo shar: Will not clobber existing file \"'Makefile.aix'\"
  201. else
  202.   echo shar: Extracting \"'Makefile.aix'\" \(4730 characters\)
  203.   sed "s/^X//" >'Makefile.aix' <<'END_OF_FILE'
  204. X#---------------------------------------------------------------------------
  205. X#
  206. X#                  cwish - windowing user friendly shell
  207. X#                  -------------------------------------
  208. X#
  209. X#               Copyright (c) 1988-1993 Hellmuth Michaelis
  210. X#
  211. X#                  Eggerstedtstr. 28
  212. X#                  22765 Hamburg
  213. X#                  Germany
  214. X#
  215. X#                  Tel:    +49 / 40 / 384298    (private)
  216. X#                  Tel:    +49 / 40 / 55903-170 (at work)
  217. X#                  e-mail: hm@hcshh.hcs.de
  218. X#
  219. X#                          --------oOo--------
  220. X#
  221. X#   This program is free software; you can redistribute it and/or modify
  222. X#   it under the terms of the GNU General Public License as published by
  223. X#   the Free Software Foundation; either version 2 of the License, or
  224. X#   (at your option) any later version.
  225. X#
  226. X#   This program is distributed in the hope that it will be useful,
  227. X#   but WITHOUT ANY WARRANTY; without even the implied warranty of
  228. X#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  229. X#   GNU General Public License for more details.
  230. X#
  231. X#   You should have received a copy of the GNU General Public License
  232. X#   along with this program; if not, write to the Free Software
  233. X#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  234. X#
  235. X#---------------------------------------------------------------------------
  236. X#
  237. X#    Last edit-date: [Tue Oct 19 09:20:11 1993]
  238. X#
  239. X#    Flags:
  240. X#
  241. X#    CURSESBUG    workaround for a bug in curses to re-enable
  242. X#            sending of special keys after system(), commandline.c
  243. X#
  244. X#    NOSTATFS    statfs(2) call to identify CDROM filesystem not known
  245. X#            see files.c
  246. X#
  247. X#    USE_NCURSES    use the sysv-curses lookalike ncurses instead of
  248. X#            the local curses, try this if you only have i.e.
  249. X#            BSD curses available on your machine. see cwish.h
  250. X#            and the README file for ncurses availability
  251. X#
  252. X#    DATE_US        to get US date format (mm/dd/yy) in attribute window,
  253. X#            if not defined, german format (dd.mm.yy) is used
  254. X#
  255. X#    REREAD_AFTER_EDIT
  256. X#            reread the current directory after returning from
  257. X#            a fkey-1 initiated editor session, if not defined
  258. X#            the directory is NOT reread and reflects the state
  259. X#            prior to calling the editor
  260. X#
  261. X#---------------------------------------------------------------------------
  262. X#
  263. X#    AIX Makefile from Nathan D. Lane, nathan@seldon.foundation.tricon.com
  264. X#
  265. X#---------------------------------------------------------------------------
  266. X
  267. XCC=        bsdcc    
  268. XNAME=        cwish
  269. XDEST=        /usr/local/bin
  270. XMANDIR=        /usr/local/man
  271. XMANBSD=        cat1
  272. XMANHPUX=    man1
  273. XPRINTPROG=    cprps
  274. X
  275. X#-- debugging -------------------------------------------------------
  276. XCFLAGS=    -O2 -g
  277. XLFLAGS=    -lcurses
  278. X
  279. XCFILES=        cwish.c files.c movement.c commandline.c rcinit.c \
  280. X        fkeys.c paging.c cursor.c header.c history.c help.c \
  281. X        usrgrp.c showtime.c config.c chdir.c complete.c\
  282. X        usage.c 
  283. X
  284. XOFILES=        cwish.o files.o movement.o commandline.o rcinit.o \
  285. X        fkeys.o paging.o cursor.o header.o history.o help.o \
  286. X        usrgrp.o showtime.o config.o chdir.o complete.o\
  287. X        usage.o 
  288. X
  289. XHFILES=        config.h control.h cwish.h rcinit.h patchlevel.h
  290. X
  291. XMISCFILES=    COPYING MANIFEST README \
  292. X        Makefile.386bsd Makefile.hpux Makefile.ultrix Makefile.sunos \
  293. X        Makefile.aix Makefile.linux \
  294. X        dot-cwishrc 
  295. X
  296. XMANFILE=    cwish.1
  297. X
  298. XBAKFILES=    $(CFILES) $(HFILES) $(MISCFILES) $(MANFILE)
  299. X
  300. X$(NAME):    $(OFILES)
  301. X            $(CC) $(OFILES) $(LFLAGS) -o $(NAME)
  302. X            
  303. Xupdate.h:    Makefile $(CFILES) $(HFILES)
  304. X    @/bin/sh -c "[ -f update.h ] || (echo 0 > update.h)"
  305. X    @/bin/sh -c "expr `cat update.h` + 1 > update1.h && mv update1.h update.h"
  306. X    @echo ""
  307. X    @echo "        compilation number updated to `cat update.h`"
  308. X    @echo ""
  309. X
  310. X$(OFILES):    cwish.h
  311. Xcwish.o:        control.h
  312. Xusage.o:    update.h patchlevel.h
  313. Xrcinit.o:    rcinit.h
  314. Xconfig.o:    config.h
  315. X
  316. Xinstall:    $(NAME)
  317. X        cp $(NAME) $(DEST)
  318. X        strip $(DEST)/$(NAME)
  319. X        chmod og-rw,a+x,u+rwx $(DEST)/$(NAME)
  320. X        chown root $(DEST)/$(NAME)
  321. X        chgrp bin $(DEST)/$(NAME)
  322. X        @if [ -f /hp-ux ];\
  323. X         then echo "installing HPUX man-page";make man-hpux;\
  324. X        elif [ -f /386bsd -o /netbsd ];\
  325. X         then echo "installing 386BSD man-page";make man-386bsd;fi
  326. X        
  327. Xclean:        
  328. X        rm -f *.o cwish trace core* lint.out
  329. X
  330. Xveryclean:
  331. X        rm -f *.o cwish trace core* update.h lint.out
  332. X
  333. Xman-hpux:
  334. X        cp $(MANFILE) $(MANDIR)/$(MANHPUX)
  335. X
  336. Xman-386bsd:
  337. X        nroff -mandoc $(MANFILE) >$(MANDIR)/$(MANBSD)/$(NAME).0
  338. X
  339. Xprint:
  340. X        $(PRINTPROG) cwish.h rcinit.h config.h $(CFILES)
  341. X
  342. Xlint:
  343. X        lint -s -Aa -D_HPUX_SOURCE -DCURSESBUG $(CFILES) | tee lint.out
  344. X
  345. Xbackup:
  346. X        @echo ""
  347. X        @if [ -d BACKUP ];then rm -rf BACKUP-OLD;\
  348. X            echo "moving BACKUP to BACKUP-OLD ...";\
  349. X            mkdir BACKUP-OLD;\
  350. X            mv BACKUP/* BACKUP-OLD;fi
  351. X        @rm -rf BACKUP
  352. X        @mkdir BACKUP
  353. X        @echo "copying files to BACKUP ..."
  354. X        @cp $(BAKFILES) BACKUP
  355. X        @echo ""
  356. X
  357. X#-------------------------- E O F ---------------------------------------------
  358. END_OF_FILE
  359.   if test 4730 -ne `wc -c <'Makefile.aix'`; then
  360.     echo shar: \"'Makefile.aix'\" unpacked with wrong size!
  361.   fi
  362.   # end of 'Makefile.aix'
  363. fi
  364. if test -f 'Makefile.hpux' -a "${1}" != "-c" ; then 
  365.   echo shar: Will not clobber existing file \"'Makefile.hpux'\"
  366. else
  367.   echo shar: Extracting \"'Makefile.hpux'\" \(5069 characters\)
  368.   sed "s/^X//" >'Makefile.hpux' <<'END_OF_FILE'
  369. X#---------------------------------------------------------------------------
  370. X#
  371. X#                  cwish - windowing user friendly shell
  372. X#                  -------------------------------------
  373. X#
  374. X#               Copyright (c) 1988-1993 Hellmuth Michaelis
  375. X#
  376. X#                  Eggerstedtstr. 28
  377. X#                  22765 Hamburg
  378. X#                  Germany
  379. X#
  380. X#                  Tel:    +49 / 40 / 384298    (private)
  381. X#                  Tel:    +49 / 40 / 55903-170 (at work)
  382. X#                  e-mail: hm@hcshh.hcs.de
  383. X#
  384. X#                          --------oOo--------
  385. X#
  386. X#   This program is free software; you can redistribute it and/or modify
  387. X#   it under the terms of the GNU General Public License as published by
  388. X#   the Free Software Foundation; either version 2 of the License, or
  389. X#   (at your option) any later version.
  390. X#
  391. X#   This program is distributed in the hope that it will be useful,
  392. X#   but WITHOUT ANY WARRANTY; without even the implied warranty of
  393. X#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  394. X#   GNU General Public License for more details.
  395. X#
  396. X#   You should have received a copy of the GNU General Public License
  397. X#   along with this program; if not, write to the Free Software
  398. X#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  399. X#
  400. X#---------------------------------------------------------------------------
  401. X#
  402. X#    Last edit-date: [Tue Oct 19 09:20:11 1993]
  403. X#
  404. X#    Flags:
  405. X#
  406. X#    CURSESBUG    workaround for a bug in curses to re-enable
  407. X#            sending of special keys after system(), commandline.c
  408. X#
  409. X#    NOSTATFS    statfs(2) call to identify CDROM filesystem not known
  410. X#            see files.c
  411. X#
  412. X#    USE_NCURSES    use the sysv-curses lookalike ncurses instead of
  413. X#            the local curses, try this if you only have i.e.
  414. X#            BSD curses available on your machine. see cwish.h
  415. X#            and the README file for ncurses availability
  416. X#
  417. X#    DATE_US        to get US date format (mm/dd/yy) in attribute window,
  418. X#            if not defined, german format (dd.mm.yy) is used
  419. X#
  420. X#    REREAD_AFTER_EDIT
  421. X#            reread the current directory after returning from
  422. X#            a fkey-1 initiated editor session, if not defined
  423. X#            the directory is NOT reread and reflects the state
  424. X#            prior to calling the editor
  425. X#
  426. X#---------------------------------------------------------------------------
  427. X
  428. XCC=        cc
  429. XNAME=        cwish
  430. XDEST=        /usr/local/bin
  431. XMANDIR=        /usr/local/man
  432. XMANBSD=        cat1
  433. XMANHPUX=    man1
  434. XPRINTPROG=    cprps
  435. X
  436. X#-- HPUX debugging (using HP's ANSI C-Compiler) -----------------------------
  437. X#CFLAGS=    -g -z -Wc,-w1 -Aa +ESlit -D_HPUX_SOURCE -DCURSESBUG
  438. X#LFLAGS=    -lcurses
  439. X
  440. X#-- HPUX production (using HP's ANSI C-Compiler) ----------------------------
  441. XCFLAGS=    -O -z -Wc,-w1 -Aa +ESlit -D_HPUX_SOURCE -DCURSESBUG
  442. XLFLAGS=    -lcurses
  443. X
  444. X#-- HPUX debugging (using GCC 2.2.2 or GCC 2.3.3) --------------------------
  445. X#CFLAGS=    -Wall -g -D_HPUX_SOURCE -DCURSESBUG -pipe
  446. X#LFLAGS=    -lcurses
  447. X
  448. X#-- HPUX production (using GCC 2.2.2 or GCC 2.3.3) -------------------------
  449. X#CFLAGS=    -O2 -D_HPUX_SOURCE -DCURSESBUG -pipe
  450. X#LFLAGS=    -lcurses
  451. X
  452. X
  453. XCFILES=        cwish.c files.c movement.c commandline.c rcinit.c \
  454. X        fkeys.c paging.c cursor.c header.c history.c help.c \
  455. X        usrgrp.c showtime.c config.c chdir.c complete.c\
  456. X        usage.c 
  457. X
  458. XOFILES=        cwish.o files.o movement.o commandline.o rcinit.o \
  459. X        fkeys.o paging.o cursor.o header.o history.o help.o \
  460. X        usrgrp.o showtime.o config.o chdir.o complete.o\
  461. X        usage.o 
  462. X
  463. XHFILES=        config.h control.h cwish.h rcinit.h patchlevel.h
  464. X
  465. XMISCFILES=    COPYING MANIFEST README \
  466. X        Makefile.386bsd Makefile.hpux Makefile.ultrix Makefile.sunos \
  467. X        Makefile.aix Makefile.linux \
  468. X        dot-cwishrc 
  469. X
  470. XMANFILE=    cwish.1
  471. X
  472. XBAKFILES=    $(CFILES) $(HFILES) $(MISCFILES) $(MANFILE)
  473. X
  474. X$(NAME):    $(OFILES)
  475. X            $(CC) $(OFILES) $(LFLAGS) -o $(NAME)
  476. X            
  477. Xupdate.h:    Makefile $(CFILES) $(HFILES)
  478. X    @/bin/sh -c "[ -f update.h ] || (echo 0 > update.h)"
  479. X    @/bin/sh -c "expr `cat update.h` + 1 > update1.h && mv update1.h update.h"
  480. X    @echo ""
  481. X    @echo "        compilation number updated to `cat update.h`"
  482. X    @echo ""
  483. X
  484. X$(OFILES):    cwish.h
  485. Xcwish.o:        control.h
  486. Xusage.o:    update.h patchlevel.h
  487. Xrcinit.o:    rcinit.h
  488. Xconfig.o:    config.h
  489. X
  490. Xinstall:    $(NAME)
  491. X        cp $(NAME) $(DEST)
  492. X        strip $(DEST)/$(NAME)
  493. X        chmod og-rw,a+x,u+rwx $(DEST)/$(NAME)
  494. X        chown root $(DEST)/$(NAME)
  495. X        chgrp bin $(DEST)/$(NAME)
  496. X        @if [ -f /hp-ux ];\
  497. X         then echo "installing HPUX man-page";make man-hpux;\
  498. X        elif [ -f /386bsd -o /netbsd ];\
  499. X         then echo "installing 386BSD man-page";make man-386bsd;fi
  500. X
  501. Xclean:        
  502. X        rm -f *.o cwish trace core* lint.out
  503. X
  504. Xveryclean:
  505. X        rm -f *.o cwish trace core* update.h lint.out
  506. X
  507. Xman-hpux:
  508. X        cp $(MANFILE) $(MANDIR)/$(MANHPUX)
  509. X
  510. Xman-386bsd:
  511. X        nroff -mandoc $(MANFILE) >$(MANDIR)/$(MANBSD)/$(NAME).0
  512. X
  513. Xprint:
  514. X        $(PRINTPROG) cwish.h rcinit.h config.h $(CFILES)
  515. X
  516. Xlint:
  517. X        lint -s -Aa -D_HPUX_SOURCE -DCURSESBUG $(CFILES) | tee lint.out
  518. X
  519. Xbackup:
  520. X        @echo ""
  521. X        @if [ -d BACKUP ];then rm -rf BACKUP-OLD;\
  522. X            echo "moving BACKUP to BACKUP-OLD ...";\
  523. X            mkdir BACKUP-OLD;\
  524. X            mv BACKUP/* BACKUP-OLD;fi
  525. X        @rm -rf BACKUP
  526. X        @mkdir BACKUP
  527. X        @echo "copying files to BACKUP ..."
  528. X        @cp $(BAKFILES) BACKUP
  529. X        @echo ""
  530. X
  531. X#-------------------------- E O F ---------------------------------------------
  532. END_OF_FILE
  533.   if test 5069 -ne `wc -c <'Makefile.hpux'`; then
  534.     echo shar: \"'Makefile.hpux'\" unpacked with wrong size!
  535.   fi
  536.   # end of 'Makefile.hpux'
  537. fi
  538. if test -f 'Makefile.linux' -a "${1}" != "-c" ; then 
  539.   echo shar: Will not clobber existing file \"'Makefile.linux'\"
  540. else
  541.   echo shar: Extracting \"'Makefile.linux'\" \(5139 characters\)
  542.   sed "s/^X//" >'Makefile.linux' <<'END_OF_FILE'
  543. X#---------------------------------------------------------------------------
  544. X#
  545. X#                  cwish - windowing user friendly shell
  546. X#                  -------------------------------------
  547. X#
  548. X#               Copyright (c) 1988-1993 Hellmuth Michaelis
  549. X#
  550. X#                  Eggerstedtstr. 28
  551. X#                  22765 Hamburg
  552. X#                  Germany
  553. X#
  554. X#                  Tel:    +49 / 40 / 384298    (private)
  555. X#                  Tel:    +49 / 40 / 55903-170 (at work)
  556. X#                  e-mail: hm@hcshh.hcs.de
  557. X#
  558. X#                          --------oOo--------
  559. X#
  560. X#   This program is free software; you can redistribute it and/or modify
  561. X#   it under the terms of the GNU General Public License as published by
  562. X#   the Free Software Foundation; either version 2 of the License, or
  563. X#   (at your option) any later version.
  564. X#
  565. X#   This program is distributed in the hope that it will be useful,
  566. X#   but WITHOUT ANY WARRANTY; without even the implied warranty of
  567. X#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  568. X#   GNU General Public License for more details.
  569. X#
  570. X#   You should have received a copy of the GNU General Public License
  571. X#   along with this program; if not, write to the Free Software
  572. X#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  573. X#
  574. X#---------------------------------------------------------------------------
  575. X#
  576. X#    Last edit-date: [Wed Oct 20 15:58:11 1993]
  577. X#
  578. X#    Flags:
  579. X#
  580. X#    CURSESBUG    workaround for a bug in curses to re-enable
  581. X#            sending of special keys after system(), commandline.c
  582. X#
  583. X#    NOSTATFS    statfs(2) call to identify CDROM filesystem not known
  584. X#            see files.c
  585. X#
  586. X#    USE_NCURSES    use the sysv-curses lookalike ncurses instead of
  587. X#            the local curses, try this if you only have i.e.
  588. X#            BSD curses available on your machine. see cwish.h
  589. X#            and the README file for ncurses availability
  590. X#
  591. X#    DATE_US        to get US date format (mm/dd/yy) in attribute window,
  592. X#            if not defined, german format (dd.mm.yy) is used
  593. X#
  594. X#    REREAD_AFTER_EDIT
  595. X#            reread the current directory after returning from
  596. X#            a fkey-1 initiated editor session, if not defined
  597. X#            the directory is NOT reread and reflects the state
  598. X#            prior to calling the editor
  599. X#
  600. X#---------------------------------------------------------------------------
  601. X#
  602. X#    Linux 0.99.pl9-1, thanks to Jim Graham and Nils Gerloff
  603. X#
  604. X#---------------------------------------------------------------------------
  605. X
  606. XCC=        cc
  607. XNAME=        cwish
  608. XDEST=        /usr/local/bin
  609. XMANDIR=        /usr/local/man
  610. XMANBSD=        cat1
  611. XMANHPUX=    man1
  612. XPRINTPROG=    cprps
  613. XDEFINES=    -DCURSESBUG -DUSE_NCURSES -DREREAD_AFTER_EDIT -DNOSTATFS
  614. X
  615. X#-- Linux debugging -------------------------------------------------------
  616. XCFLAGS=    -O2 -Wall -g -pipe $(DEFINES) -I/usr/local/include
  617. XLFLAGS=    -lncurses
  618. X
  619. X#-- Linux curses debugging ------------------------------------------------
  620. X#CFLAGS=    -O2 -Wall -g -pipe $(DEFINES) -I/usr/local/include
  621. X#LFLAGS=    -ldncurses
  622. X
  623. X#-- Linux production ------------------------------------------------------
  624. X#CFLAGS=    -O2 -Wall -pipe $(DEFINES) -I/usr/local/include
  625. X#LFLAGS=    -s -lncurses
  626. X
  627. X
  628. XCFILES=        cwish.c files.c movement.c commandline.c rcinit.c \
  629. X        fkeys.c paging.c cursor.c header.c history.c help.c \
  630. X        usrgrp.c showtime.c config.c chdir.c complete.c\
  631. X        usage.c 
  632. X
  633. XOFILES=        cwish.o files.o movement.o commandline.o rcinit.o \
  634. X        fkeys.o paging.o cursor.o header.o history.o help.o \
  635. X        usrgrp.o showtime.o config.o chdir.o complete.o\
  636. X        usage.o 
  637. X
  638. XHFILES=        config.h control.h cwish.h rcinit.h patchlevel.h
  639. X
  640. XMISCFILES=    COPYING MANIFEST README \
  641. X        Makefile.386bsd Makefile.hpux Makefile.ultrix Makefile.sunos \
  642. X        Makefile.aix Makefile.linux \
  643. X        dot-cwishrc 
  644. X
  645. XMANFILE=    cwish.1
  646. X
  647. XBAKFILES=    $(CFILES) $(HFILES) $(MISCFILES) $(MANFILE)
  648. X
  649. X$(NAME):    $(OFILES)
  650. X            $(CC) $(OFILES) $(LFLAGS) -o $(NAME)
  651. X            
  652. Xupdate.h:    Makefile $(CFILES) $(HFILES)
  653. X    @/bin/sh -c "[ -f update.h ] || (echo 0 > update.h)"
  654. X    @/bin/sh -c "expr `cat update.h` + 1 > update1.h && mv update1.h update.h"
  655. X    @echo ""
  656. X    @echo "        compilation number updated to `cat update.h`"
  657. X    @echo ""
  658. X
  659. X$(OFILES):    cwish.h
  660. Xcwish.o:        control.h
  661. Xusage.o:    update.h patchlevel.h
  662. Xrcinit.o:    rcinit.h
  663. Xconfig.o:    config.h
  664. X
  665. Xinstall:    $(NAME)
  666. X        cp $(NAME) $(DEST)
  667. X        strip $(DEST)/$(NAME)
  668. X        chmod og-rw,a+x,u+rwx $(DEST)/$(NAME)
  669. X        chown root $(DEST)/$(NAME)
  670. X        chgrp bin $(DEST)/$(NAME)
  671. X        @if [ -f /hp-ux ];\
  672. X         then echo "installing HPUX man-page";make man-hpux;\
  673. X        elif [ -f /386bsd -o /netbsd ];\
  674. X         then echo "installing 386BSD man-page";make man-386bsd;fi
  675. X        
  676. Xclean:        
  677. X        rm -f *.o cwish trace core* lint.out
  678. X
  679. Xveryclean:
  680. X        rm -f *.o cwish trace core* update.h lint.out
  681. X
  682. Xman-hpux:
  683. X        cp $(MANFILE) $(MANDIR)/$(MANHPUX)
  684. X
  685. Xman-386bsd:
  686. X        nroff -mandoc $(MANFILE) >$(MANDIR)/$(MANBSD)/$(NAME).0
  687. X
  688. Xprint:
  689. X        $(PRINTPROG) cwish.h rcinit.h config.h $(CFILES)
  690. X
  691. Xlint:
  692. X        lint -s -Aa -D_HPUX_SOURCE $(DEFINES) $(CFILES) | tee lint.out
  693. X
  694. Xbackup:
  695. X        @echo ""
  696. X        @if [ -d BACKUP ];then rm -rf BACKUP-OLD;\
  697. X            echo "moving BACKUP to BACKUP-OLD ...";\
  698. X            mkdir BACKUP-OLD;\
  699. X            mv BACKUP/* BACKUP-OLD;fi
  700. X        @rm -rf BACKUP
  701. X        @mkdir BACKUP
  702. X        @echo "copying files to BACKUP ..."
  703. X        @cp $(BAKFILES) BACKUP
  704. X        @echo ""
  705. X
  706. X#-------------------------- E O F ---------------------------------------------
  707. END_OF_FILE
  708.   if test 5139 -ne `wc -c <'Makefile.linux'`; then
  709.     echo shar: \"'Makefile.linux'\" unpacked with wrong size!
  710.   fi
  711.   # end of 'Makefile.linux'
  712. fi
  713. if test -f 'Makefile.sunos' -a "${1}" != "-c" ; then 
  714.   echo shar: Will not clobber existing file \"'Makefile.sunos'\"
  715. else
  716.   echo shar: Extracting \"'Makefile.sunos'\" \(4770 characters\)
  717.   sed "s/^X//" >'Makefile.sunos' <<'END_OF_FILE'
  718. X#---------------------------------------------------------------------------
  719. X#
  720. X#                  cwish - windowing user friendly shell
  721. X#                  -------------------------------------
  722. X#
  723. X#               Copyright (c) 1988-1993 Hellmuth Michaelis
  724. X#
  725. X#                  Eggerstedtstr. 28
  726. X#                  22765 Hamburg
  727. X#                  Germany
  728. X#
  729. X#                  Tel:    +49 / 40 / 384298    (private)
  730. X#                  Tel:    +49 / 40 / 55903-170 (at work)
  731. X#                  e-mail: hm@hcshh.hcs.de
  732. X#
  733. X#                          --------oOo--------
  734. X#
  735. X#   This program is free software; you can redistribute it and/or modify
  736. X#   it under the terms of the GNU General Public License as published by
  737. X#   the Free Software Foundation; either version 2 of the License, or
  738. X#   (at your option) any later version.
  739. X#
  740. X#   This program is distributed in the hope that it will be useful,
  741. X#   but WITHOUT ANY WARRANTY; without even the implied warranty of
  742. X#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  743. X#   GNU General Public License for more details.
  744. X#
  745. X#   You should have received a copy of the GNU General Public License
  746. X#   along with this program; if not, write to the Free Software
  747. X#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  748. X#
  749. X#---------------------------------------------------------------------------
  750. X#
  751. X#    Last edit-date: [Tue Oct 19 09:20:11 1993]
  752. X#
  753. X#    Flags:
  754. X#
  755. X#    CURSESBUG    workaround for a bug in curses to re-enable
  756. X#            sending of special keys after system(), commandline.c
  757. X#
  758. X#    NOSTATFS    statfs(2) call to identify CDROM filesystem not known
  759. X#            see files.c
  760. X#
  761. X#    USE_NCURSES    use the sysv-curses lookalike ncurses instead of
  762. X#            the local curses, try this if you only have i.e.
  763. X#            BSD curses available on your machine. see cwish.h
  764. X#            and the README file for ncurses availability
  765. X#
  766. X#    DATE_US        to get US date format (mm/dd/yy) in attribute window,
  767. X#            if not defined, german format (dd.mm.yy) is used
  768. X#
  769. X#    REREAD_AFTER_EDIT
  770. X#            reread the current directory after returning from
  771. X#            a fkey-1 initiated editor session, if not defined
  772. X#            the directory is NOT reread and reflects the state
  773. X#            prior to calling the editor
  774. X#
  775. X#---------------------------------------------------------------------------
  776. X#
  777. X#    SunOS 4.1.3 support from Thomas E. Dickey, dickey@software.org
  778. X#
  779. X#---------------------------------------------------------------------------
  780. X
  781. XCC=        gcc
  782. XNAME=        cwish
  783. XDEST=        /usr/local/bin
  784. XMANDIR=        /usr/local/man
  785. XMANBSD=        cat1
  786. XMANHPUX=    man1
  787. XPRINTPROG=    cprps
  788. X
  789. XINCLUDES=-I/usr/5include
  790. XLIBDIR=/usr/5lib
  791. XCPP_OPTS=$(INCLUDES) $(DEFINES) -DNOSTATFS
  792. XLFLAGS=-L$(LIBDIR) -lcurses
  793. X
  794. X.c.o: ; $(CC) $(CFLAGS) $(CPP_OPTS) -c $<
  795. X
  796. XCFILES=        cwish.c files.c movement.c commandline.c rcinit.c \
  797. X        fkeys.c paging.c cursor.c header.c history.c help.c \
  798. X        usrgrp.c showtime.c config.c chdir.c complete.c\
  799. X        usage.c 
  800. X
  801. XOFILES=        cwish.o files.o movement.o commandline.o rcinit.o \
  802. X        fkeys.o paging.o cursor.o header.o history.o help.o \
  803. X        usrgrp.o showtime.o config.o chdir.o complete.o\
  804. X        usage.o 
  805. X
  806. XHFILES=        config.h control.h cwish.h rcinit.h patchlevel.h
  807. X
  808. XMISCFILES=    COPYING MANIFEST README \
  809. X        Makefile.386bsd Makefile.hpux Makefile.ultrix Makefile.sunos \
  810. X        Makefile.aix Makefile.linux \
  811. X        dot-cwishrc 
  812. X
  813. XMANFILE=    cwish.1
  814. X
  815. XBAKFILES=    $(CFILES) $(HFILES) $(MISCFILES) $(MANFILE)
  816. X
  817. X$(NAME):    $(OFILES)
  818. X            $(CC) $(OFILES) $(LFLAGS) -o $(NAME)
  819. X            
  820. Xupdate.h:    Makefile $(CFILES) $(HFILES)
  821. X    @/bin/sh -c "[ -f update.h ] || (echo 0 > update.h)"
  822. X    @/bin/sh -c "expr `cat update.h` + 1 > update1.h && mv update1.h update.h"
  823. X    @echo ""
  824. X    @echo "        compilation number updated to `cat update.h`"
  825. X    @echo ""
  826. X
  827. X$(OFILES):    cwish.h
  828. Xcwish.o:        control.h
  829. Xusage.o:    update.h patchlevel.h
  830. Xrcinit.o:    rcinit.h
  831. Xconfig.o:    config.h
  832. X
  833. Xinstall:    $(NAME)
  834. X        cp $(NAME) $(DEST)
  835. X        strip $(DEST)/$(NAME)
  836. X        chmod og-rw,a+x,u+rwx $(DEST)/$(NAME)
  837. X        chown root $(DEST)/$(NAME)
  838. X        chgrp bin $(DEST)/$(NAME)
  839. X        @if [ -f /hp-ux ];\
  840. X         then echo "installing HPUX man-page";make man-hpux;\
  841. X        elif [ -f /386bsd -o /netbsd ];\
  842. X         then echo "installing 386BSD man-page";make man-386bsd;fi
  843. X
  844. Xclean:        
  845. X        rm -f *.o cwish trace core* lint.out
  846. X
  847. Xveryclean:
  848. X        rm -f *.o cwish trace core* update.h lint.out
  849. X
  850. Xman-hpux:
  851. X        cp $(MANFILE) $(MANDIR)/$(MANHPUX)
  852. X
  853. Xman-386bsd:
  854. X        nroff -mandoc $(MANFILE) >$(MANDIR)/$(MANBSD)/$(NAME).0
  855. X
  856. Xprint:
  857. X        $(PRINTPROG) cwish.h rcinit.h config.h $(CFILES)
  858. X
  859. Xlint:
  860. X        lint -s -Aa -D_HPUX_SOURCE -DCURSESBUG $(CFILES) | tee lint.out
  861. X
  862. Xbackup:
  863. X        @echo ""
  864. X        @if [ -d BACKUP ];then rm -rf BACKUP-OLD;\
  865. X            echo "moving BACKUP to BACKUP-OLD ...";\
  866. X            mkdir BACKUP-OLD;\
  867. X            mv BACKUP/* BACKUP-OLD;fi
  868. X        @rm -rf BACKUP
  869. X        @mkdir BACKUP
  870. X        @echo "copying files to BACKUP ..."
  871. X        @cp $(BAKFILES) BACKUP
  872. X        @echo ""
  873. X
  874. X#-------------------------- E O F ---------------------------------------------
  875. X
  876. END_OF_FILE
  877.   if test 4770 -ne `wc -c <'Makefile.sunos'`; then
  878.     echo shar: \"'Makefile.sunos'\" unpacked with wrong size!
  879.   fi
  880.   # end of 'Makefile.sunos'
  881. fi
  882. if test -f 'Makefile.ultrix' -a "${1}" != "-c" ; then 
  883.   echo shar: Will not clobber existing file \"'Makefile.ultrix'\"
  884. else
  885.   echo shar: Extracting \"'Makefile.ultrix'\" \(4833 characters\)
  886.   sed "s/^X//" >'Makefile.ultrix' <<'END_OF_FILE'
  887. X#---------------------------------------------------------------------------
  888. X#
  889. X#                  cwish - windowing user friendly shell
  890. X#                  -------------------------------------
  891. X#
  892. X#               Copyright (c) 1988-1993 Hellmuth Michaelis
  893. X#
  894. X#                  Eggerstedtstr. 28
  895. X#                  22765 Hamburg
  896. X#                  Germany
  897. X#
  898. X#                  Tel:    +49 / 40 / 384298    (private)
  899. X#                  Tel:    +49 / 40 / 55903-170 (at work)
  900. X#                  e-mail: hm@hcshh.hcs.de
  901. X#
  902. X#                          --------oOo--------
  903. X#
  904. X#   This program is free software; you can redistribute it and/or modify
  905. X#   it under the terms of the GNU General Public License as published by
  906. X#   the Free Software Foundation; either version 2 of the License, or
  907. X#   (at your option) any later version.
  908. X#
  909. X#   This program is distributed in the hope that it will be useful,
  910. X#   but WITHOUT ANY WARRANTY; without even the implied warranty of
  911. X#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  912. X#   GNU General Public License for more details.
  913. X#
  914. X#   You should have received a copy of the GNU General Public License
  915. X#   along with this program; if not, write to the Free Software
  916. X#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  917. X#
  918. X#---------------------------------------------------------------------------
  919. X#
  920. X#    Last edit-date: [Tue Oct 19 09:20:06 1993]
  921. X#
  922. X#    Flags:
  923. X#
  924. X#    CURSESBUG    workaround for a bug in curses to re-enable
  925. X#            sending of special keys after system(), commandline.c
  926. X#
  927. X#    NOSTATFS    statfs(2) call to identify CDROM filesystem not known
  928. X#            see files.c
  929. X#
  930. X#    USE_NCURSES    use the sysv-curses lookalike ncurses instead of
  931. X#            the local curses, try this if you only have i.e.
  932. X#            BSD curses available on your machine. see cwish.h
  933. X#            and the README file for ncurses availability
  934. X#
  935. X#    DATE_US        to get US date format (mm/dd/yy) in attribute window,
  936. X#            if not defined, german format (dd.mm.yy) is used
  937. X#
  938. X#    REREAD_AFTER_EDIT
  939. X#            reread the current directory after returning from
  940. X#            a fkey-1 initiated editor session, if not defined
  941. X#            the directory is NOT reread and reflects the state
  942. X#            prior to calling the editor
  943. X#
  944. X#---------------------------------------------------------------------------
  945. X#
  946. X#     Ultrix support from Gertjan van Oosten, gvoosten@isosa1.estec.esa.nl
  947. X#
  948. X#---------------------------------------------------------------------------
  949. X
  950. XCC=        c89
  951. XNAME=        cwish
  952. XDEST=        /usr/local/bin
  953. XMANDIR=        /usr/local/man
  954. XMANBSD=        cat1
  955. XMANHPUX=    man1
  956. XPRINTPROG=    cprps
  957. X
  958. X#-- ULTRIX debugging (using DEC's ANSI C-Compiler) -------------------------
  959. X#CFLAGS=-g
  960. X#LFLAGS=-lcursesX
  961. X
  962. X#-- ULTRIX production (using DEC's ANSI C-Compiler) -------------------------
  963. XCFLAGS=-O
  964. XLFLAGS=-lcursesX
  965. X
  966. X
  967. XCFILES=        cwish.c files.c movement.c commandline.c rcinit.c \
  968. X        fkeys.c paging.c cursor.c header.c history.c help.c \
  969. X        usrgrp.c showtime.c config.c chdir.c complete.c\
  970. X        usage.c 
  971. X
  972. XOFILES=        cwish.o files.o movement.o commandline.o rcinit.o \
  973. X        fkeys.o paging.o cursor.o header.o history.o help.o \
  974. X        usrgrp.o showtime.o config.o chdir.o complete.o\
  975. X        usage.o 
  976. X
  977. XHFILES=        config.h control.h cwish.h rcinit.h patchlevel.h
  978. X
  979. XMISCFILES=    COPYING MANIFEST README \
  980. X        Makefile.386bsd Makefile.hpux Makefile.ultrix Makefile.sunos \
  981. X        Makefile.aix Makefile.linux \
  982. X        dot-cwishrc 
  983. X
  984. XMANFILE=    cwish.1
  985. X
  986. XBAKFILES=    $(CFILES) $(HFILES) $(MISCFILES) $(MANFILE)
  987. X
  988. X$(NAME):    $(OFILES)
  989. X            $(CC) $(OFILES) $(LFLAGS) -o $(NAME)
  990. X            
  991. Xupdate.h:    Makefile $(CFILES) $(HFILES)
  992. X    @/bin/sh -c "[ -f update.h ] || (echo 0 > update.h)"
  993. X    @/bin/sh -c "expr `cat update.h` + 1 > update1.h && mv update1.h update.h"
  994. X    @echo ""
  995. X    @echo "        compilation number updated to `cat update.h`"
  996. X    @echo ""
  997. X
  998. X$(OFILES):    cwish.h
  999. Xcwish.o:        control.h
  1000. Xusage.o:    update.h patchlevel.h
  1001. Xrcinit.o:    rcinit.h
  1002. Xconfig.o:    config.h
  1003. X
  1004. Xinstall:    $(NAME)
  1005. X        cp $(NAME) $(DEST)
  1006. X        strip $(DEST)/$(NAME)
  1007. X        chmod og-rw,a+x,u+rwx $(DEST)/$(NAME)
  1008. X        chown root $(DEST)/$(NAME)
  1009. X        chgrp bin $(DEST)/$(NAME)
  1010. X        @if [ -f /hp-ux ];\
  1011. X         then echo "installing HPUX man-page";make man-hpux;\
  1012. X        elif [ -f /386bsd -o /netbsd ];\
  1013. X         then echo "installing 386BSD man-page";make man-386bsd;fi
  1014. X
  1015. Xclean:        
  1016. X        rm -f *.o cwish trace core* lint.out
  1017. X
  1018. Xveryclean:
  1019. X        rm -f *.o cwish trace core* update.h lint.out
  1020. X
  1021. Xman-hpux:
  1022. X        cp $(MANFILE) $(MANDIR)/$(MANHPUX)
  1023. X
  1024. Xman-386bsd:
  1025. X        nroff -mandoc $(MANFILE) >$(MANDIR)/$(MANBSD)/$(NAME).0
  1026. X
  1027. Xprint:
  1028. X        $(PRINTPROG) cwish.h rcinit.h config.h $(CFILES)
  1029. X
  1030. Xlint:
  1031. X        lint -s -Aa -D_HPUX_SOURCE -DCURSESBUG $(CFILES) | tee lint.out
  1032. X
  1033. Xbackup:
  1034. X        @echo ""
  1035. X        @if [ -d BACKUP ];then rm -rf BACKUP-OLD;\
  1036. X            echo "moving BACKUP to BACKUP-OLD ...";\
  1037. X            mkdir BACKUP-OLD;\
  1038. X            mv BACKUP/* BACKUP-OLD;fi
  1039. X        @rm -rf BACKUP
  1040. X        @mkdir BACKUP
  1041. X        @echo "copying files to BACKUP ..."
  1042. X        @cp $(BAKFILES) BACKUP
  1043. X        @echo ""
  1044. X
  1045. X#-------------------------- E O F ---------------------------------------------
  1046. END_OF_FILE
  1047.   if test 4833 -ne `wc -c <'Makefile.ultrix'`; then
  1048.     echo shar: \"'Makefile.ultrix'\" unpacked with wrong size!
  1049.   fi
  1050.   # end of 'Makefile.ultrix'
  1051. fi
  1052. if test -f 'cursor.c' -a "${1}" != "-c" ; then 
  1053.   echo shar: Will not clobber existing file \"'cursor.c'\"
  1054. else
  1055.   echo shar: Extracting \"'cursor.c'\" \(6042 characters\)
  1056.   sed "s/^X//" >'cursor.c' <<'END_OF_FILE'
  1057. X/*---------------------------------------------------------------------------*
  1058. X *
  1059. X *                  cwish - windowing user friendly shell
  1060. X *                  -------------------------------------
  1061. X *
  1062. X *              (c) Copyright Hellmuth Michaelis 1989 - 1993
  1063. X *
  1064. X *                  Eggerstedtstr. 28
  1065. X *                  22765 Hamburg
  1066. X *                  Germany
  1067. X *
  1068. X *                  Tel:    +49 / 40 / 384298    (private)
  1069. X *                  Tel:    +49 / 40 / 55903-170 (at work)
  1070. X *                  e-mail: hm@hcshh.hcs.de
  1071. X *
  1072. X *           All rights are reserved except as explicitly granted
  1073. X *                  by written permission of the author.
  1074. X *
  1075. X *             See the file COPYING, distributed with cwish, for
  1076. X *                  restriction and warranty information
  1077. X *
  1078. X *---------------------------------------------------------------------------*
  1079. X *
  1080. X *    Last Edit-Date: [Wed Oct 20 11:30:36 1993]
  1081. X *
  1082. X *    -hm    conversion to multiple curses windows
  1083. X *    -hm    marked/tagged file sizes
  1084. X *
  1085. X *----------------------------------------------------------------------------*/
  1086. X
  1087. X#include "cwish.h"
  1088. X
  1089. X/*---------------------------------------------------------------------------*
  1090. X *    make current file name inverse, fill file attributes
  1091. X *---------------------------------------------------------------------------*/
  1092. Xvoid cur_inv(struct onefile *current)
  1093. X{
  1094. X    wmove(file_w,current->orow,current->ocol);
  1095. X
  1096. X    if(current->tag)
  1097. X        wattrset(file_w, A_UNDERLINE);
  1098. X    else
  1099. X        wattron(file_w, A_REVERSE);
  1100. X
  1101. X    waddstr(file_w, &(current->onam[1]));
  1102. X    wattrset(file_w, A_NORMAL);
  1103. X    attribs(0);
  1104. X}
  1105. X
  1106. X/*---------------------------------------------------------------------------*
  1107. X *    make current file name blink
  1108. X *---------------------------------------------------------------------------*/
  1109. Xvoid cur_blink(struct onefile *current)
  1110. X{
  1111. X    wmove(file_w,current->orow,current->ocol);
  1112. X    wattrset(file_w, A_BLINK | A_REVERSE);
  1113. X    waddstr(file_w, &(current->onam[1]));
  1114. X    wattrset(file_w, A_NORMAL);
  1115. X}
  1116. X
  1117. X/*---------------------------------------------------------------------------*
  1118. X *    make current filename normal again
  1119. X *---------------------------------------------------------------------------*/
  1120. Xvoid cur_norm(struct onefile *current)
  1121. X{
  1122. X    wmove(file_w, current->orow, current->ocol);
  1123. X
  1124. X    if(current->tag)
  1125. X        wattrset(file_w, A_REVERSE);
  1126. X    else
  1127. X        wattrset(file_w, A_NORMAL);
  1128. X
  1129. X    waddstr(file_w, &(current->onam[1]));
  1130. X    wattrset(file_w, A_REVERSE);
  1131. X
  1132. X}
  1133. X
  1134. X/*---------------------------------------------------------------------------*
  1135. X *    tag current filename and print as tagged
  1136. X *---------------------------------------------------------------------------*/
  1137. Xvoid tag_current(struct onefile *current)
  1138. X{
  1139. X    wmove(file_w, current->orow, current->ocol);
  1140. X
  1141. X    if(current->tag)        /* current filename already tagged ? */
  1142. X    {
  1143. X        wattron(file_w, A_REVERSE);
  1144. X        waddstr(file_w, &(current->onam[1]));
  1145. X        wattroff(file_w, A_REVERSE);
  1146. X        current->tag = 0;    /* was tagged, now untag */
  1147. X        tagsize -= current->osiz;
  1148. X
  1149. X        if(tagsize == 0)
  1150. X        {
  1151. X            wmove(fst_w, 0, COLS-ENTRYSW-ENTRYCW); /* move to entries string */
  1152. X            wclrtoeol(fst_w);
  1153. X            wattron(fst_w, A_UNDERLINE);    /* underline on */
  1154. X        
  1155. X            if(opt_wildon)    /* wildcarding enabled */
  1156. X            {
  1157. X                waddstr(fst_w, "Matches:");    /* description */
  1158. X            }
  1159. X            else            /* normal operation */
  1160. X            {
  1161. X                waddstr(fst_w, "Entries:");    /* description */
  1162. X            }
  1163. X        
  1164. X            wmove(fst_w, 0, COLS-ENTRYCW);    /* move to entries string */
  1165. X            wattroff(fst_w, A_UNDERLINE);    /* underline off */
  1166. X            waddstr(fst_w, counter);    /* print current count */
  1167. X            return;                /* exit routine ! */
  1168. X        }
  1169. X    }
  1170. X    else
  1171. X    {
  1172. X        wattron(file_w, A_UNDERLINE);
  1173. X        waddstr(file_w, &(current->onam[1]));
  1174. X        wattroff(file_w, A_UNDERLINE);
  1175. X        current->tag = 1;    /* was not tagged, now tag */
  1176. X        if(tagsize == 0)
  1177. X        {
  1178. X            wattron(fst_w, A_UNDERLINE);    /* underline on */
  1179. X            wmove(fst_w, 0, COLS-ENTRYSW-ENTRYCW); /* move to entries string */
  1180. X            waddstr(fst_w, "Byte:");    /* description */
  1181. X            wattroff(fst_w, A_UNDERLINE);    /* underline on */        
  1182. X        }
  1183. X        tagsize += current->osiz;
  1184. X    }
  1185. X    wmove(fst_w, 0, COLS-ENTRYCW-4);/* move to entries string */
  1186. X    wprintw(fst_w, "%8d", tagsize);    /* print size */
  1187. X}
  1188. X
  1189. X/*---------------------------------------------------------------------------*
  1190. X *    if filename tagged, print as tagged, else print normal
  1191. X *---------------------------------------------------------------------------*/
  1192. Xvoid is_tagged(struct onefile *current)
  1193. X{
  1194. X    wmove(file_w, current->orow, current->ocol);
  1195. X    
  1196. X    if(current->tag)        /* current filename tagged ? */
  1197. X    {
  1198. X        wattron(file_w, A_REVERSE);
  1199. X        waddstr(file_w, &(current->onam[1]));
  1200. X        wattroff(file_w, A_REVERSE);
  1201. X    }
  1202. X    else
  1203. X    {
  1204. X        waddstr(file_w, &(current->onam[1]));
  1205. X    }
  1206. X}
  1207. X
  1208. X/*---------------------------------------------------------------------------*
  1209. X *    untag ALL tagged filenames
  1210. X *---------------------------------------------------------------------------*/
  1211. Xvoid untag_all(void)
  1212. X{
  1213. X    struct onefile *cur_ptr;
  1214. X
  1215. X    int thispage = ((cur_file->page) & PAGE_MSK);
  1216. X    
  1217. X    cur_ptr = first;    /* first file in dir */
  1218. X
  1219. X    tagsize = 0;        /* reset size */
  1220. X
  1221. X    wmove(fst_w, 0, COLS-ENTRYSW-ENTRYCW); /* move to entries string */
  1222. X    wclrtoeol(fst_w);
  1223. X    wattron(fst_w, A_UNDERLINE);    /* underline on */
  1224. X
  1225. X    if(opt_wildon)    /* wildcarding enabled */
  1226. X    {
  1227. X        waddstr(fst_w, "Matches:");    /* description */
  1228. X    }
  1229. X    else            /* normal operation */
  1230. X    {
  1231. X        waddstr(fst_w, "Entries:");    /* description */
  1232. X    }
  1233. X
  1234. X    wmove(fst_w, 0, COLS-ENTRYCW);    /* move to entries string */
  1235. X    wattroff(fst_w, A_UNDERLINE);    /* underline off */
  1236. X    waddstr(fst_w, counter);    /* print current count */
  1237. X    
  1238. X    while(cur_ptr != NULL)
  1239. X    {
  1240. X        if(cur_ptr->tag)
  1241. X        {
  1242. X            if((cur_ptr->page == thispage) || (cur_ptr->page == (thispage | FIRST)))
  1243. X            {
  1244. X                wmove(file_w, cur_ptr->orow,((cur_ptr->ocol)-1));
  1245. X                wattroff(file_w,A_REVERSE);
  1246. X                waddch(file_w,SPACE);
  1247. X                wattroff(file_w,A_REVERSE);
  1248. X                waddstr(file_w,&(cur_ptr->onam[1]));
  1249. X                wattroff(file_w,A_REVERSE);
  1250. X                waddch(file_w,SPACE);
  1251. X                wattroff(file_w,A_REVERSE);
  1252. X            }
  1253. X        }
  1254. X        cur_ptr->tag = 0;        
  1255. X        cur_ptr = cur_ptr->next;
  1256. X    }
  1257. X    cur_inv(cur_file);    /* just for shure ... */
  1258. X}
  1259. X
  1260. X/*---------------------------------- EOF -------------------------------------*/ 
  1261. END_OF_FILE
  1262.   if test 6042 -ne `wc -c <'cursor.c'`; then
  1263.     echo shar: \"'cursor.c'\" unpacked with wrong size!
  1264.   fi
  1265.   # end of 'cursor.c'
  1266. fi
  1267. if test -f 'dot-cwishrc' -a "${1}" != "-c" ; then 
  1268.   echo shar: Will not clobber existing file \"'dot-cwishrc'\"
  1269. else
  1270.   echo shar: Extracting \"'dot-cwishrc'\" \(1772 characters\)
  1271.   sed "s/^X//" >'dot-cwishrc' <<'END_OF_FILE'
  1272. X#-------------------------------------------------------------------------------
  1273. X#
  1274. X#    .cwishrc - "cwish" runtime initialization file ($HOME - directory)
  1275. X#
  1276. X#    last edit-date: [Sun Oct 17 18:05:31 1993]
  1277. X#
  1278. X#-------------------------------------------------------------------------------
  1279. Xattributes=on            # enable the display of file attributes in a 
  1280. X                # separate window at the bottom of the screen
  1281. X
  1282. Xpreserve=on            # when moving the directory tree up, place the
  1283. X                # current file at the directory we came from
  1284. X
  1285. Xfkeys=on            # enable the display of function key labels in
  1286. X                # a separate window at the bootom of the screen
  1287. X
  1288. Xlinks=on            # enable detection of links for display in the
  1289. X                # attribute window (slows reading down)
  1290. X
  1291. Xpoint=off            # do not show "." directory in file window
  1292. X
  1293. Xreturn=on            # wait for return on external command
  1294. X
  1295. Xshell=/bin/ksh            # shell to be used for executing commands
  1296. X
  1297. Xpager=/usr/local/bin/less    # pager to be used for display data
  1298. X
  1299. Xeditor=/usr/local/bin/emacs    # editor to be used for editing data
  1300. X
  1301. X# delimiter=~            # delimiter to be used to delimit the windows
  1302. X                # horizontally, normally got from terminfo
  1303. X
  1304. Xwildenable=off            # enable filename wildcard matching, directories
  1305. X                # are displayed as usual
  1306. X
  1307. Xwildcard=*            # wildcard specification string, see also
  1308. X                # wildenable above (slows reading down if enabled)
  1309. X
  1310. Xcdrom=off            # cdrom special filename processing enable (some
  1311. X                # systems place a ';' in the filename i.e HPUX)
  1312. X
  1313. Xcdnoprog=on            # display all executables on cdrom in files sect
  1314. X                # (some systems tag data files as executables)
  1315. X
  1316. Xdotnames=on            # display filenames starting with a "."
  1317. X
  1318. Xtagmove=on            # move to next filename after tagging the
  1319. X                # current one
  1320. X
  1321. X#-------------------------------------------------------------------------------
  1322. END_OF_FILE
  1323.   if test 1772 -ne `wc -c <'dot-cwishrc'`; then
  1324.     echo shar: \"'dot-cwishrc'\" unpacked with wrong size!
  1325.   fi
  1326.   # end of 'dot-cwishrc'
  1327. fi
  1328. if test -f 'help.c' -a "${1}" != "-c" ; then 
  1329.   echo shar: Will not clobber existing file \"'help.c'\"
  1330. else
  1331.   echo shar: Extracting \"'help.c'\" \(5069 characters\)
  1332.   sed "s/^X//" >'help.c' <<'END_OF_FILE'
  1333. X/*---------------------------------------------------------------------------*
  1334. X *
  1335. X *                  cwish - windowing user friendly shell
  1336. X *                  -------------------------------------
  1337. X *
  1338. X *               Copyright (c) 1988-1993 Hellmuth Michaelis
  1339. X *
  1340. X *                  Eggerstedtstr. 28
  1341. X *                  22765 Hamburg
  1342. X *                  Germany
  1343. X *
  1344. X *                  Tel:    +49 / 40 / 384298    (private)
  1345. X *                  Tel:    +49 / 40 / 55903-170 (at work)
  1346. X *                  e-mail: hm@hcshh.hcs.de
  1347. X *
  1348. X *                          --------oOo--------
  1349. X *
  1350. X *   This program is free software; you can redistribute it and/or modify
  1351. X *   it under the terms of the GNU General Public License as published by
  1352. X *   the Free Software Foundation; either version 2 of the License, or
  1353. X *   (at your option) any later version.
  1354. X *
  1355. X *   This program is distributed in the hope that it will be useful,
  1356. X *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  1357. X *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1358. X *   GNU General Public License for more details.
  1359. X *
  1360. X *   You should have received a copy of the GNU General Public License
  1361. X *   along with this program; if not, write to the Free Software
  1362. X *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1363. X *
  1364. X *---------------------------------------------------------------------------*
  1365. X *
  1366. X *    Last Edit-Date: [Wed Oct 20 16:49:33 1993]
  1367. X *
  1368. X *    -hm    fkey labels for help screen
  1369. X *    -hm    update help screen
  1370. X *
  1371. X *----------------------------------------------------------------------------*/
  1372. X#include "cwish.h"
  1373. X
  1374. X#define    MAXHELPL    20
  1375. X
  1376. X
  1377. X/*---------------------------------------------------------------------------*
  1378. X *    help function keys
  1379. X *---------------------------------------------------------------------------*/
  1380. X    
  1381. Xstatic struct fk_tab help_keys[] = {
  1382. X    {"                ", "         "},
  1383. X    {"                ", "         "},
  1384. X    {"                ", "         "},
  1385. X    {"                ", "         "},
  1386. X    {"                ", "         "},
  1387. X    {"                ", "         "},
  1388. X    {"                ", "         "},
  1389. X    {"                ", "         "}
  1390. X};
  1391. X
  1392. Xstatic char *helpstr[MAXHELPL] = {
  1393. X"   ----------------------- Command Window Commands: -------------------------",
  1394. X"",
  1395. X"   Backspace - Delete left Character    Delete    - Delete Cursor Character",
  1396. X"   Control-F - Character forward        Control-B - Character backward",
  1397. X"   Control-A - Begin of Line            Control-E - End of Line",
  1398. X"   Control-N - Next Line                Control-P - Previous Line",
  1399. X"   Control-K - Kill Line from Cursor    Control-Y - Yank back killed Line",
  1400. X"   Control-D - Exit back to System      \"%\" is the marked files wildcard char",
  1401. X"",
  1402. X"   ------------------------- File Window Commands: --------------------------",
  1403. X"",
  1404. X"   Cursor up, Cursor down, Cursor right, Cursor left - Select a file",
  1405. X"   Page Up   - Previous file page       Page Down - Next file page",
  1406. X"   F1        - Edit current file        F2        - Echo name to commandline",
  1407. X"   F3        - Display this help        F4        - Enter configuration menu",
  1408. X"   F5        - Mark the current file    F6        - Unmark all marked files",
  1409. X"   F7        - Alternate attribute line F8        - Close current directory",
  1410. X"",
  1411. X"   Alternate Invocation of F1...F8 by pressing ESCAPE and then '1'...'8'",
  1412. X"   Alternate Invocation of Page up/down by pressing ESCAPE and then 'N' or 'P'",
  1413. X};
  1414. X
  1415. Xchar *contin = {"Press any Key to continue ..."};
  1416. X
  1417. X/*---------------------------------------------------------------------------*
  1418. X *    help page
  1419. X *---------------------------------------------------------------------------*/
  1420. Xvoid help(void)
  1421. X{
  1422. X    int i;
  1423. X    
  1424. X    suspend_time();        /* stop updating time */
  1425. X
  1426. X    cur_fktab = &help_keys;    /* help screen fkey label table */
  1427. X    init_flabels();
  1428. X    
  1429. X    wmove(stdscr, 0, 0);    /* first line */
  1430. X    wclear(stdscr);        /* clear window */
  1431. X    touchwin(stdscr);
  1432. X    wnoutrefresh(stdscr);
  1433. X
  1434. X    move(0, 0);        /* first line */
  1435. X    attron(A_REVERSE);    /* highlight on */
  1436. X    addstr(headerline);    /* program/copyright header */
  1437. X    attroff(A_REVERSE);    /* highlight off */
  1438. X
  1439. X    for(i = 0; i < MAXHELPL; i++)
  1440. X        mvaddstr(2+i, 0, helpstr[i]);    /* print help screen */
  1441. X    
  1442. X    move(LINES-1, 0);            /* last line */
  1443. X
  1444. X    attron(A_REVERSE);            /* highlight on */
  1445. X    addstr(contin);
  1446. X    attroff(A_REVERSE);            /* highlight on */        
  1447. X    move(LINES-1, strlen(contin));        /* last line */    
  1448. X    refresh();                /* show it */
  1449. X
  1450. X    getch();        /* get any char from user */
  1451. X
  1452. X    wmove(stdscr, 0, 0);    /* first line */
  1453. X    wclear(stdscr);        /* clear window */
  1454. X    touchwin(stdscr);
  1455. X    wnoutrefresh(stdscr);
  1456. X
  1457. X    touchwin(cmnd_w);
  1458. X    touchwin(fst_w);
  1459. X    touchwin(file_w);
  1460. X    if(opt_attrib)
  1461. X        touchwin(attr_w);
  1462. X    if(opt_labels)
  1463. X        touchwin(flbl_w);
  1464. X    
  1465. X    resume_time();        /* restart updating time */
  1466. X
  1467. X    header();        /* new header */
  1468. X    dis_hist();        /* display current commandline */
  1469. X    fresh_files();        /* refresh files */
  1470. X    attribs(1);        /* new attributes */
  1471. X    update_all();        /* update complete screen */
  1472. X
  1473. X    cur_fktab = &sys_keys;    /* system fkey label table */
  1474. X    init_flabels();
  1475. X}
  1476. X
  1477. X/*----------------------- E O F -------------------------------------------*/
  1478. END_OF_FILE
  1479.   if test 5069 -ne `wc -c <'help.c'`; then
  1480.     echo shar: \"'help.c'\" unpacked with wrong size!
  1481.   fi
  1482.   # end of 'help.c'
  1483. fi
  1484. if test -f 'movement.c' -a "${1}" != "-c" ; then 
  1485.   echo shar: Will not clobber existing file \"'movement.c'\"
  1486. else
  1487.   echo shar: Extracting \"'movement.c'\" \(6363 characters\)
  1488.   sed "s/^X//" >'movement.c' <<'END_OF_FILE'
  1489. X/*---------------------------------------------------------------------------*
  1490. X *
  1491. X *                  cwish - windowing user friendly shell
  1492. X *                  -------------------------------------
  1493. X *
  1494. X *               Copyright (c) 1988-1993 Hellmuth Michaelis
  1495. X *
  1496. X *                  Eggerstedtstr. 28
  1497. X *                  22765 Hamburg
  1498. X *                  Germany
  1499. X *
  1500. X *                  Tel:    +49 / 40 / 384298    (private)
  1501. X *                  Tel:    +49 / 40 / 55903-170 (at work)
  1502. X *                  e-mail: hm@hcshh.hcs.de
  1503. X *
  1504. X *                          --------oOo--------
  1505. X *
  1506. X *   This program is free software; you can redistribute it and/or modify
  1507. X *   it under the terms of the GNU General Public License as published by
  1508. X *   the Free Software Foundation; either version 2 of the License, or
  1509. X *   (at your option) any later version.
  1510. X *
  1511. X *   This program is distributed in the hope that it will be useful,
  1512. X *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  1513. X *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1514. X *   GNU General Public License for more details.
  1515. X *
  1516. X *   You should have received a copy of the GNU General Public License
  1517. X *   along with this program; if not, write to the Free Software
  1518. X *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1519. X *
  1520. X *---------------------------------------------------------------------------*
  1521. X *
  1522. X *    Last Edit-Date: [Sun Oct 17 18:17:41 1993]
  1523. X *
  1524. X *    -hm    conversion to curses
  1525. X *    -hm    rewrite to not look at filetype anymore
  1526. X *    -hm    consistent up/down and left/right moves
  1527. X *
  1528. X *----------------------------------------------------------------------------*/
  1529. X
  1530. X#include "cwish.h"
  1531. X
  1532. Xstatic int iscurpag(void);
  1533. X
  1534. X/*---------------------------------------------------------------------------*
  1535. X *    return true if filename is on current displayed page
  1536. X *---------------------------------------------------------------------------*/
  1537. Xstatic int iscurpag(void)
  1538. X{
  1539. X    return(((cur_file->page) & PAGE_MSK) == cur_page );
  1540. X}
  1541. X
  1542. X/*---------------------------------------------------------------------------*
  1543. X *    move current file to first file on page
  1544. X *---------------------------------------------------------------------------*/
  1545. Xint firstfile(void)
  1546. X{
  1547. X    cur_file = scr_beg;
  1548. X
  1549. X    for(;;)
  1550. X    {
  1551. X        if(iscurpag())
  1552. X            return(GOOD);
  1553. X        else if(cur_file->next == NULL)
  1554. X            return(BAD);
  1555. X        else
  1556. X            cur_file = cur_file->next;
  1557. X    }
  1558. X}
  1559. X
  1560. X/*---------------------------------------------------------------------------*
  1561. X *    move current file to last file on page
  1562. X *---------------------------------------------------------------------------*/
  1563. Xint lastfile(void)
  1564. X{
  1565. X    cur_file = scr_beg;    /* start of screen */
  1566. X    
  1567. X    for(;;)
  1568. X    {
  1569. X        if(cur_file->next == NULL)
  1570. X            break;
  1571. X        if((cur_file->next->page) == ((cur_page + 1) | FIRST))
  1572. X            break;
  1573. X        cur_file = cur_file->next;
  1574. X    }
  1575. X    for(;;)
  1576. X    {
  1577. X        if(iscurpag())
  1578. X            return(GOOD);
  1579. X        else if(cur_file->prev == NULL)
  1580. X            return(BAD);
  1581. X        else
  1582. X            cur_file = cur_file->prev;
  1583. X    }
  1584. X}
  1585. X
  1586. X/*---------------------------------------------------------------------------*
  1587. X *    move current file to next file on page
  1588. X *---------------------------------------------------------------------------*/
  1589. Xint nextfile(void)
  1590. X{
  1591. X    for(;;)
  1592. X    {
  1593. X        if(cur_file->next == NULL)
  1594. X            return(BAD);
  1595. X        cur_file = cur_file->next;
  1596. X        if(iscurpag())
  1597. X            return(GOOD);
  1598. X    }
  1599. X}
  1600. X        
  1601. X/*---------------------------------------------------------------------------*
  1602. X *    move current file to previous file on page
  1603. X *---------------------------------------------------------------------------*/
  1604. Xint prevfile(void)
  1605. X{
  1606. X    for(;;)
  1607. X    {
  1608. X        if(cur_file->prev == NULL)
  1609. X            return(BAD);
  1610. X        cur_file = cur_file->prev;
  1611. X        if(iscurpag())
  1612. X            return(GOOD);
  1613. X    }
  1614. X}
  1615. X
  1616. X/*---------------------------------------------------------------------------*
  1617. X *    move highlighted file to first file on page
  1618. X *---------------------------------------------------------------------------*/
  1619. Xvoid move_home(void)
  1620. X{
  1621. X    cur_norm(cur_file);
  1622. X    firstfile();
  1623. X    cur_inv(cur_file);
  1624. X}
  1625. X
  1626. X/*---------------------------------------------------------------------------*
  1627. X *    move highlighted file to last file on page
  1628. X *---------------------------------------------------------------------------*/
  1629. Xvoid move_hmdn(void)
  1630. X{
  1631. X    cur_norm(cur_file);
  1632. X    lastfile();
  1633. X    cur_inv(cur_file);
  1634. X}
  1635. X
  1636. X/*---------------------------------------------------------------------------*
  1637. X *    move highlighted file one pos right, wrapping on end
  1638. X *---------------------------------------------------------------------------*/
  1639. Xvoid move_right(void)
  1640. X{
  1641. X    cur_norm(cur_file);
  1642. X    if(nextfile() == BAD)
  1643. X        firstfile();
  1644. X    cur_inv(cur_file);
  1645. X}
  1646. X
  1647. X/*---------------------------------------------------------------------------*
  1648. X *    move highlighted file one pos left, wrapping on begin
  1649. X *---------------------------------------------------------------------------*/
  1650. Xvoid move_left(void)
  1651. X{
  1652. X    cur_norm(cur_file);
  1653. X    if(prevfile() == BAD)
  1654. X        lastfile();
  1655. X    cur_inv(cur_file);
  1656. X}
  1657. X
  1658. X/*---------------------------------------------------------------------------*
  1659. X *    move highlighted file one pos up, wrapping on top
  1660. X *---------------------------------------------------------------------------*/
  1661. Xvoid move_up(void)
  1662. X{
  1663. X    struct onefile *save_cur;
  1664. X    int upcol;
  1665. X    
  1666. X    save_cur = cur_file;    /* fail safe */
  1667. X    
  1668. X    upcol = cur_file->ocol;    /* current column */
  1669. X    
  1670. X    if(first != NULL)
  1671. X    {
  1672. X        cur_norm(cur_file);
  1673. X
  1674. X        while(prevfile() != BAD)
  1675. X        {
  1676. X            if(cur_file->ocol == upcol)
  1677. X                goto upfound;
  1678. X        }
  1679. X        if(lastfile() != BAD)
  1680. X        {
  1681. X            do
  1682. X            {
  1683. X                if(cur_file->ocol == upcol)
  1684. X                    goto upfound;
  1685. X            }
  1686. X            while(prevfile() != BAD);
  1687. X        }
  1688. X    }
  1689. X    cur_file = save_cur;    /* not found, no change ! */
  1690. X
  1691. Xupfound:
  1692. X    cur_inv(cur_file);
  1693. X}
  1694. X
  1695. X/*---------------------------------------------------------------------------*
  1696. X *    move highlighted file one pos down, wrapping on bottom
  1697. X *---------------------------------------------------------------------------*/
  1698. Xvoid move_down(void)
  1699. X{
  1700. X    struct onefile *save_cur;
  1701. X    int downcol;
  1702. X    
  1703. X    save_cur = cur_file;    /* fail safe */
  1704. X    
  1705. X    downcol = cur_file->ocol;    /* current column */
  1706. X    
  1707. X    if(first != NULL)
  1708. X    {
  1709. X        cur_norm(cur_file);
  1710. X
  1711. X        while(nextfile() != BAD)
  1712. X        {
  1713. X            if(cur_file->ocol == downcol)
  1714. X                goto downfound;
  1715. X        }
  1716. X        if(firstfile() != BAD)
  1717. X        {
  1718. X            do
  1719. X            {
  1720. X                if(cur_file->ocol == downcol)
  1721. X                    goto downfound;
  1722. X            }
  1723. X            while(nextfile() != BAD);
  1724. X        }
  1725. X    }
  1726. X    cur_file = save_cur;    /* not found, no change ! */
  1727. X    
  1728. Xdownfound:
  1729. X    cur_inv(cur_file);
  1730. X}
  1731. X
  1732. X/*---------------------------------- EOF -------------------------------------*/
  1733. X
  1734. END_OF_FILE
  1735.   if test 6363 -ne `wc -c <'movement.c'`; then
  1736.     echo shar: \"'movement.c'\" unpacked with wrong size!
  1737.   fi
  1738.   # end of 'movement.c'
  1739. fi
  1740. if test -f 'rcinit.c' -a "${1}" != "-c" ; then 
  1741.   echo shar: Will not clobber existing file \"'rcinit.c'\"
  1742. else
  1743.   echo shar: Extracting \"'rcinit.c'\" \(5268 characters\)
  1744.   sed "s/^X//" >'rcinit.c' <<'END_OF_FILE'
  1745. X/*---------------------------------------------------------------------------*
  1746. X *
  1747. X *                  cwish - windowing user friendly shell
  1748. X *                  -------------------------------------
  1749. X *
  1750. X *               Copyright (c) 1988-1993 Hellmuth Michaelis
  1751. X *
  1752. X *                  Eggerstedtstr. 28
  1753. X *                  22765 Hamburg
  1754. X *                  Germany
  1755. X *
  1756. X *                  Tel:    +49 / 40 / 384298    (private)
  1757. X *                  Tel:    +49 / 40 / 55903-170 (at work)
  1758. X *                  e-mail: hm@hcshh.hcs.de
  1759. X *
  1760. X *                          --------oOo--------
  1761. X *
  1762. X *   This program is free software; you can redistribute it and/or modify
  1763. X *   it under the terms of the GNU General Public License as published by
  1764. X *   the Free Software Foundation; either version 2 of the License, or
  1765. X *   (at your option) any later version.
  1766. X *
  1767. X *   This program is distributed in the hope that it will be useful,
  1768. X *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  1769. X *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1770. X *   GNU General Public License for more details.
  1771. X *
  1772. X *   You should have received a copy of the GNU General Public License
  1773. X *   along with this program; if not, write to the Free Software
  1774. X *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1775. X *
  1776. X *---------------------------------------------------------------------------*
  1777. X *
  1778. X *    Last Edit-Date: [Sun Oct 17 18:17:42 1993]
  1779. X *
  1780. X *    -hm    init file ".wishrc"
  1781. X *    -hm    wildcards
  1782. X *    -hm    move after tag
  1783. X *
  1784. X *----------------------------------------------------------------------------*/
  1785. X
  1786. X#include "cwish.h"        /* everything we want */
  1787. X#include "control.h"        /* control-characters */
  1788. X#include "rcinit.h"        /* .cwishrc definitions */
  1789. X
  1790. Xstatic void onoff(char *string, int *var);
  1791. Xstatic void optchar(char *string, unsigned char *var);
  1792. Xstatic void optstr(char *string, char dest[]);
  1793. X
  1794. X/*---------------------------------------------------------------------------*
  1795. X *    get user configuration from file "$HOME/.cwishrc"
  1796. X *---------------------------------------------------------------------------*/
  1797. Xvoid readrc(void)
  1798. X{
  1799. X    char buffer[MAXPATHLEN+1];    /* gp buffer */
  1800. X    FILE *fp;
  1801. X    
  1802. X    sprintf(buffer, "%s/%s", envhome, CWISHRC);
  1803. X
  1804. X    if((fp = fopen(buffer, "r")) == NULL)
  1805. X        return;
  1806. X
  1807. X    while((fgets(buffer, MAXPATHLEN, fp)) != NULL)
  1808. X    {
  1809. X
  1810. X/* comments */
  1811. X        if(buffer[0] == '#' || buffer[0] == ' ' || buffer[0] == '\t')
  1812. X        {
  1813. X            continue;
  1814. X        }
  1815. X/* booleans */
  1816. X        else if(!strncmp(buffer, RC_ATTR, strlen(RC_ATTR)))
  1817. X        {
  1818. X            onoff(buffer, &opt_attrib);
  1819. X        }
  1820. X        else if(!strncmp(buffer, RC_PRESERVE, strlen(RC_PRESERVE)))
  1821. X        {
  1822. X            onoff(buffer, &opt_preserve);
  1823. X        }
  1824. X        else if(!strncmp(buffer, RC_FKEYS, strlen(RC_FKEYS)))
  1825. X        {
  1826. X            onoff(buffer, &opt_labels);
  1827. X        }
  1828. X        else if(!strncmp(buffer, RC_LINKS, strlen(RC_LINKS)))
  1829. X        {
  1830. X            onoff(buffer, &opt_links);
  1831. X        }
  1832. X        else if(!strncmp(buffer, RC_POINT, strlen(RC_POINT)))
  1833. X        {
  1834. X            onoff(buffer, &opt_point);
  1835. X        }
  1836. X        else if(!strncmp(buffer, RC_RETURN, strlen(RC_RETURN)))
  1837. X        {
  1838. X            onoff(buffer, &opt_return);
  1839. X        }
  1840. X        else if(!strncmp(buffer, RC_WILDON, strlen(RC_WILDON)))
  1841. X        {
  1842. X            onoff(buffer, &opt_wildon);
  1843. X        }
  1844. X        else if(!strncmp(buffer, RC_CDROM, strlen(RC_CDROM)))
  1845. X        {
  1846. X            onoff(buffer, &opt_cdrom);
  1847. X        }
  1848. X        else if(!strncmp(buffer, RC_CDNOPROG, strlen(RC_CDNOPROG)))
  1849. X        {
  1850. X            onoff(buffer, &opt_cdnoprog);
  1851. X        }
  1852. X        else if(!strncmp(buffer, RC_DOTNAMES, strlen(RC_DOTNAMES)))
  1853. X        {
  1854. X            onoff(buffer, &opt_dotnames);
  1855. X        }
  1856. X        else if(!strncmp(buffer, RC_TAGMOVE, strlen(RC_TAGMOVE)))
  1857. X        {
  1858. X            onoff(buffer, &opt_tagmove);
  1859. X        }
  1860. X/* strings */
  1861. X        else if(!strncmp(buffer, RC_PAGER, strlen(RC_PAGER)))
  1862. X        {
  1863. X            optstr(buffer, opt_more);            
  1864. X        }
  1865. X        else if(!strncmp(buffer, RC_EDITOR, strlen(RC_EDITOR)))
  1866. X        {
  1867. X            optstr(buffer, opt_edit);
  1868. X        }
  1869. X        else if(!strncmp(buffer, RC_WILDCARD, strlen(RC_WILDCARD)))
  1870. X        {
  1871. X            optstr(buffer, opt_wild);
  1872. X        }
  1873. X/* characters */
  1874. X        else if(!strncmp(buffer, RC_DELIMITER, strlen(RC_DELIMITER)))
  1875. X        {
  1876. X            optchar(buffer, &opt_delimiter);
  1877. X        }
  1878. X    }
  1879. X}
  1880. X
  1881. X/*---------------------------------------------------------------------------*
  1882. X *    process on/off strings
  1883. X *---------------------------------------------------------------------------*/
  1884. Xstatic void onoff(char *string, int *var)
  1885. X{
  1886. X    char *ptr;
  1887. X    
  1888. X    if((ptr = (char *)index(string, '=')) == NULL)
  1889. X        return;
  1890. X        
  1891. X    ptr++;
  1892. X
  1893. X    if(!strncmp(ptr, RC_ON, strlen(RC_ON)))
  1894. X    {
  1895. X        *var = 1;
  1896. X    }
  1897. X    else if(!strncmp(ptr, RC_OFF, strlen(RC_OFF)))
  1898. X    {
  1899. X        *var = 0;
  1900. X    }
  1901. X}
  1902. X
  1903. X/*---------------------------------------------------------------------------*
  1904. X *    process chars
  1905. X *---------------------------------------------------------------------------*/
  1906. Xstatic void optchar(char *string, unsigned char *var)
  1907. X{
  1908. X    unsigned char *ptr;
  1909. X    
  1910. X    if((ptr = (unsigned char *)index(string, '=')) == NULL)
  1911. X        return;
  1912. X        
  1913. X    ptr++;
  1914. X
  1915. X    if(isprint(*ptr))
  1916. X        *var = *ptr;        
  1917. X}
  1918. X
  1919. X/*---------------------------------------------------------------------------*
  1920. X *    process strings
  1921. X *---------------------------------------------------------------------------*/
  1922. Xstatic void optstr(char *string, char dest[])
  1923. X{
  1924. X    char *ptr, *bptr;
  1925. X    
  1926. X    if((ptr = (char *)index(string, '=')) == NULL)
  1927. X        return;
  1928. X        
  1929. X    ptr++;
  1930. X
  1931. X    bptr = dest;
  1932. X    
  1933. X    while(*ptr && (*ptr != '#') && (isprint(*ptr)) && (!isspace(*ptr)))
  1934. X        *bptr++ = *ptr++;
  1935. X
  1936. X    *bptr = '\0';
  1937. X}
  1938. X
  1939. X/*--------------------------------- EOF ------------------------------------*/
  1940. END_OF_FILE
  1941.   if test 5268 -ne `wc -c <'rcinit.c'`; then
  1942.     echo shar: \"'rcinit.c'\" unpacked with wrong size!
  1943.   fi
  1944.   # end of 'rcinit.c'
  1945. fi
  1946. echo shar: End of archive 4 \(of 5\).
  1947. cp /dev/null ark4isdone
  1948. MISSING=""
  1949. for I in 1 2 3 4 5 ; do
  1950.     if test ! -f ark${I}isdone ; then
  1951.     MISSING="${MISSING} ${I}"
  1952.     fi
  1953. done
  1954. if test "${MISSING}" = "" ; then
  1955.     echo You have unpacked all 5 archives.
  1956.     rm -f ark[1-9]isdone
  1957. else
  1958.     echo You still must unpack the following archives:
  1959.     echo "        " ${MISSING}
  1960. fi
  1961. exit 0
  1962. exit 0 # Just in case...
  1963.