Subversion Repositories SvarDOS

Rev

Rev 1650 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1650 Rev 1656
Line 6... Line 6...
6
IF %1==/? GOTO HELPONHELP
6
IF %1==/? GOTO HELPONHELP
7
 
7
 
8
REM :: UPCASE PARAM #1
8
REM :: UPCASE PARAM #1
9
SET OLDPATH=%PATH%
9
SET OLDPATH=%PATH%
10
PATH %1
10
PATH %1
11
SET COMMAND=%PATH%
11
SET CMD=%PATH%
12
PATH %OLDPATH%
12
PATH %OLDPATH%
13
SET OLDPATH=
13
SET OLDPATH=
14
 
14
 
15
REM :: SPECIAL CASE
15
REM :: SPECIAL CASE
16
IF %COMMAND%==HELP GOTO HELPONHELP
16
IF %CMD%==HELP GOTO HELPONHELP
17
 
17
 
18
REM :: ANY SVARCOM INTERNAL COMMAND?
18
REM :: ANY SVARCOM INTERNAL COMMAND?
19
REM :: ALL UNDERSTAND THE /? SYNTAX
19
REM :: ALL UNDERSTAND THE /? SYNTAX
20
IF %COMMAND%==BREAK    GOTO RUNCOMMANDHELP
20
IF %CMD%==BREAK    GOTO CMDHLP
21
IF %COMMAND%==CALL     GOTO RUNCOMMANDHELP
21
IF %CMD%==CALL     GOTO CMDHLP
22
IF %COMMAND%==CD       GOTO RUNCOMMANDHELP
22
IF %CMD%==CD       GOTO CMDHLP
23
IF %COMMAND%==CHDIR    GOTO RUNCOMMANDHELP
23
IF %CMD%==CHDIR    GOTO CMDHLP
24
IF %COMMAND%==CHCP     GOTO RUNCOMMANDHELP
24
IF %CMD%==CHCP     GOTO CMDHLP
25
IF %COMMAND%==CLS      GOTO RUNCOMMANDHELP
25
IF %CMD%==CLS      GOTO CMDHLP
26
IF %COMMAND%==COPY     GOTO RUNCOMMANDHELP
26
IF %CMD%==COPY     GOTO CMDHLP
27
IF %COMMAND%==DATE     GOTO RUNCOMMANDHELP
27
IF %CMD%==DATE     GOTO CMDHLP
28
IF %COMMAND%==DEL      GOTO RUNCOMMANDHELP
28
IF %CMD%==DEL      GOTO CMDHLP
29
IF %COMMAND%==ERASE    GOTO RUNCOMMANDHELP
29
IF %CMD%==ERASE    GOTO CMDHLP
30
IF %COMMAND%==DIR      GOTO RUNCOMMANDHELP
30
IF %CMD%==DIR      GOTO CMDHLP
31
IF %COMMAND%==ECHO     GOTO RUNCOMMANDHELP
31
IF %CMD%==ECHO     GOTO CMDHLP
32
IF %COMMAND%==EXIT     GOTO RUNCOMMANDHELP
32
IF %CMD%==EXIT     GOTO CMDHLP
33
IF %COMMAND%==FOR      GOTO RUNCOMMANDHELP
33
IF %CMD%==FOR      GOTO CMDHLP
34
IF %COMMAND%==GOTO     GOTO RUNCOMMANDHELP
34
IF %CMD%==GOTO     GOTO CMDHLP
35
IF %COMMAND%==IF       GOTO RUNCOMMANDHELP
35
IF %CMD%==IF       GOTO CMDHLP
36
IF %COMMAND%==LN       GOTO RUNCOMMANDHELP
36
IF %CMD%==LN       GOTO CMDHLP
37
IF %COMMAND%==MD       GOTO RUNCOMMANDHELP
37
IF %CMD%==MD       GOTO CMDHLP
38
IF %COMMAND%==MKDIR    GOTO RUNCOMMANDHELP
38
IF %CMD%==MKDIR    GOTO CMDHLP
39
IF %COMMAND%==PATH     GOTO RUNCOMMANDHELP
39
IF %CMD%==PATH     GOTO CMDHLP
40
IF %COMMAND%==PAUSE    GOTO RUNCOMMANDHELP
40
IF %CMD%==PAUSE    GOTO CMDHLP
41
IF %COMMAND%==PROMPT   GOTO RUNCOMMANDHELP
41
IF %CMD%==PROMPT   GOTO CMDHLP
42
IF %COMMAND%==RD       GOTO RUNCOMMANDHELP
42
IF %CMD%==RD       GOTO CMDHLP
43
IF %COMMAND%==RMDIR    GOTO RUNCOMMANDHELP
43
IF %CMD%==RMDIR    GOTO CMDHLP
44
IF %COMMAND%==REM      GOTO RUNCOMMANDHELP
44
IF %CMD%==REM      GOTO CMDHLP
45
IF %COMMAND%==REN      GOTO RUNCOMMANDHELP
45
IF %CMD%==REN      GOTO CMDHLP
46
IF %COMMAND%==RENAME   GOTO RUNCOMMANDHELP
46
IF %CMD%==RENAME   GOTO CMDHLP
47
IF %COMMAND%==SET      GOTO RUNCOMMANDHELP
47
IF %CMD%==SET      GOTO CMDHLP
48
IF %COMMAND%==SHIFT    GOTO RUNCOMMANDHELP
48
IF %CMD%==SHIFT    GOTO CMDHLP
49
IF %COMMAND%==TIME     GOTO RUNCOMMANDHELP
49
IF %CMD%==TIME     GOTO CMDHLP
50
IF %COMMAND%==TRUENAME GOTO RUNCOMMANDHELP
50
IF %CMD%==TRUENAME GOTO CMDHLP
51
IF %COMMAND%==TYPE     GOTO RUNCOMMANDHELP
51
IF %CMD%==TYPE     GOTO CMDHLP
52
IF %COMMAND%==VER      GOTO RUNCOMMANDHELP
52
IF %CMD%==VER      GOTO CMDHLP
53
IF %COMMAND%==VERIFY   GOTO RUNCOMMANDHELP
53
IF %CMD%==VERIFY   GOTO CMDHLP
54
IF %COMMAND%==VOL      GOTO RUNCOMMANDHELP
54
IF %CMD%==VOL      GOTO CMDHLP
55
 
55
 
56
REM :: LOOKUP HELP FILE FOR ANY EXTERNAL COMMANDS
56
REM :: LOOKUP HELP FILE FOR ANY EXTERNAL COMMANDS
57
IF EXIST %DOSDIR%\HELP\EN\%COMMAND%.AMB SET AMBFILE=EN\%COMMAND%
57
IF EXIST %DOSDIR%\HELP\EN\%CMD%.AMB SET AMBFILE=EN\%CMD%
58
IF EXIST %DOSDIR%\HELP\%LANG%\%COMMAND%.AMB SET AMBFILE=%LANG%\%COMMAND%
58
IF EXIST %DOSDIR%\HELP\%LANG%\%CMD%.AMB SET AMBFILE=%LANG%\%CMD%
59
REM :: PARAM #2 BECOMES PARAM #1 TO SPECIFY CHAPTER NAME
59
REM :: PARAM #2 BECOMES PARAM #1 TO SPECIFY CHAPTER NAME
60
IF NOT "%AMBFILE%"=="" SHIFT
60
IF NOT "%AMBFILE%"=="" SHIFT
61
IF NOT "%AMBFILE%"=="" GOTO RUNAMB
61
IF NOT "%AMBFILE%"=="" GOTO RUNAMB
62
 
62
 
63
REM :: EXTERNAL (CORE) COMMAND PRESENT?
63
REM :: EXTERNAL (CORE) COMMAND PRESENT?
64
IF EXIST %DOSDIR%\%COMMAND%.COM GOTO RUNCOMMANDHELP
64
IF EXIST %DOSDIR%\%CMD%.COM GOTO CMDHLP
65
IF EXIST %DOSDIR%\%COMMAND%.EXE GOTO RUNCOMMANDHELP
65
IF EXIST %DOSDIR%\%CMD%.EXE GOTO CMDHLP
66
IF EXIST %DOSDIR%\BIN\%COMMAND%.COM GOTO RUNCOMMANDHELP
66
IF EXIST %DOSDIR%\BIN\%CMD%.COM GOTO CMDHLP
67
IF EXIST %DOSDIR%\BIN\%COMMAND%.EXE GOTO RUNCOMMANDHELP
67
IF EXIST %DOSDIR%\BIN\%CMD%.EXE GOTO CMDHLP
68
 
68
 
69
:USERGUIDE
69
:USERGUIDE
70
REM :: LOOKUP HELP FILE FOR SVARDOS USER GUIDE
70
REM :: LOOKUP HELP FILE FOR SVARDOS USER GUIDE
71
REM :: PARAM #1 SPECIFIES CHAPTER NAME
71
REM :: PARAM #1 SPECIFIES CHAPTER NAME
72
IF EXIST %DOSDIR%\HELP\HELP-EN.AMB SET AMBFILE=HELP-EN
72
IF EXIST %DOSDIR%\HELP\HELP-EN.AMB SET AMBFILE=HELP-EN
Line 78... Line 78...
78
 
78
 
79
:HELPONHELP
79
:HELPONHELP
80
ECHO HELP [COMMAND] [CHAPTER]
80
ECHO HELP [COMMAND] [CHAPTER]
81
GOTO DONE
81
GOTO DONE
82
 
82
 
83
:RUNCOMMANDHELP
83
:CMDHLP
84
%COMMAND% /?
84
%CMD% /?
85
GOTO DONE
85
GOTO DONE
86
 
86
 
87
:RUNAMB
87
:RUNAMB
88
AMB %DOSDIR%\HELP\%AMBFILE%.AMB %1
88
AMB %DOSDIR%\HELP\%AMBFILE%.AMB %1
89
 
89
 
90
:DONE
90
:DONE
91
SET COMMAND=
91
SET CMD=
92
SET AMBFILE=
92
SET AMBFILE=