Annotation of freem/contrib/%RDEL.m, revision 1.1.1.1

1.1       snw         1: %RDEL  ; A.Trocha ; Routine Delete 01/29/1999 03:41/GMT+1
                      2:        ; $Source: /cvsroot-fuse/gump/FreeM/mlib/%RDEL.m,v $
                      3:        ; $Revision: 1.3 $ $Date: 2000/02/18 15:13:42 $
                      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>