File:  [Coherent Logic Development] / freem / contrib / %RDEL.m
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jan 19 02:04:04 2025 UTC (6 months, 1 week ago) by snw
Branches: MAIN, CoherentLogicDevelopment
CVS tags: v0-63-1-rc1, v0-63-0-rc1, v0-63-0, v0-62-3, v0-62-2, v0-62-1, v0-62-0, start, HEAD
FreeM

    1: %RDEL	; A.Trocha ; Routine Delete 01/29/1999 03:41/GMT+1
    2: 	; $Source: /home/cvsroot/freem/contrib/%RDEL.m,v $
    3: 	; $Revision: 1.1.1.1 $ $Date: 2025/01/19 02:04:04 $
    4: 	;
    5: 	N path,rtn,exec
    6: 	;
    7: 	W !!,?20,"FreeM - Routine Delete Utility"
    8: 	W !,?25,$ZD,"  ",$ZT
    9: query	W !!,"Routine selector: "
   10: 	R rtn
   11: 	I rtn="?" D help G query
   12: 	I rtn="^D" W ! D ^%RD G query
   13: 	I rtn="" G end
   14: 	S rtn=$TR(rtn,"^")
   15: 	D rexist^%ED(rtn)
   16: 	I ^%UTILITY($J,"%ED")=0 W !!,?10,"routine does not exist.",*7 G query
   17: 	W !!,"Delete Selected Routine? <N> " R x
   18: 	I $TR(x,"y","Y")'="Y" W !!,"No routines deleted." G end
   19: 	;
   20: 	;--- delete routine <rtn>
   21: 	S path=$S($E(rtn)="%":$V(8),1:$V(4))
   22: 	I $L(path)>0&($E(path,$L(path))'="/") S path=path_"/"
   23: 	I path="" S path="./"
   24: 	S exec="!rm "_path_rtn_$V(98)
   25: 	X exec
   26: 	W !!,"Routine deleted.",*7
   27: 	G query
   28: end	W !!
   29: 	Q
   30: 	;
   31: help	;
   32: 	W !!,"enter the routine name to delete or"
   33: 	W !,"enter '^D' to display all routine names"
   34: 	Q

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>