home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
epm603a.zip
/
EPMSMP.ZIP
/
RESOLVE.E
< prev
next >
Wrap
Text File
|
1995-02-15
|
872b
|
34 lines
; Tells you what a command will resolve to.
; By Larry Margolis
const
built_in_cmds = "DOS S SAVE Q QUIT F FILE E EDIT N NAME MA MARGINS VER TABS L C XCOM"
defmain
'resolve' arg(1)
defc resolve =
parse arg cmd .
if isadefc(cmd) then
compile if EVERSION >= '6.02'
cmd = cmd '(defined in' wheredefc(cmd)')'
compile endif
sayerror 'Macro-defined command: 'cmd
return
endif
w = wordpos(upcase(cmd), built_in_cmds)
if w then
if length(cmd)<=2 & abbrev(word(built_in_cmds, w+1), upcase(cmd)) then
cmd = cmd '( =' word(built_in_cmds, w+1)')'
endif
sayerror 'Built-in command: 'cmd
return
endif
findfile external_cmd, cmd, 'PATH', 'P'
if rc then
sayerror 'Unknown command: 'cmd
else
sayerror 'External command: 'external_cmd
endif