home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: OtherApp
/
OtherApp.zip
/
FSHL125.LZH
/
WHATS.NEW
< prev
Wrap
Text File
|
1992-04-03
|
14KB
|
296 lines
FSHL Version 1.25
Oberon Software
518 Blue Earth Street
Mankato, MN 56001
April 3, 1992
-------------------------------------------------------------
Copyright 1990-92, Oberon Software, Mankato, MN - All Rights Reserved
-------------------------------------------------------------
Installing FSHL in the PROTSHELL statement:
**** OS/2 1.3 and OS/2 2.0 betas thru 6.149 ****
Place FSHL.EXE and it's parameters where CMD.EXE would usually go in
the PROTSHELL statement itself. Set COMSPEC to FSHL.EXE and remember
to set CMD_EXE to the path for the real CMD.EXE. Example:
PROTSHELL=C:\OS2\PMSHELL.EXE C:\OS2\OS2.INI C:\OS2\OS2SYS.INI D:\PBIN\FSHL.EXE -FD:\USR\FSHL.CFG -KD:\CMD\FSTART
SET COMSPEC=D:\PBIN\FSHL.EXE
SET CMD_EXE=C:\OS2\CMD.EXE
**** OS/2 2.0 since beta release 6.167 and GA ****
Instead of setting the command processor in the PROTSHELL statement
itself, OS/2 now uses a group of environment variables to specify the
PROTSHELL parameters. The important one is OS2_SHELL for our
purposes; it will specify FSHL and its parameters. In the example
below, I've only included the 'interesting' SET commands (at least as
far as FSHL is concerned).
PROTSHELL=C:\OS2\PMSHELL.EXE
SET OS2_SHELL=D:\PBIN\FSHL.EXE -FD:\USR\FSHL.CFG -KD:\CMD\FSTART
SET COMSPEC=D:\PBIN\FSHL.EXE
SET CMD_EXE=C:\OS2\CMD.EXE
----------------------------------------------------------------------
New FSHL internal commands:
ctrlsearch ctrlsearch [on|off]
Sets or queries the default method for searching
the history buffer for a partial match. The
default in ON, meaning that to search for a
partial command line, you must use the Control
key with either the up or down arrow to initiate
the search and the regular arrow keys will cycle
through each entry in the history buffer. When
this mode is set OFF then the control key is NOT
required to search for partial command lines. The
only way to search the entire buffer is to clear
the command line before using the up or down
arrows. In this case, you must also be aware that the
cursor will remain at the beginning of the command
as each is displayed instead of at the end.
If the parameter is omitted, the current state of this
setting will be reported. Note that 'fshlinfo'
has been enhanced to also report this state.
You can set this mode OFF on the FSHL command line
with the switch: "-u".
fshlinsert fshlinsert [on|off]
Sets or queries the default insert/overstrike
mode for the command line editor. If the
parameter is 'ON', FSHL will default to insert
mode on the command line, if it is 'OFF' it
will default to overstrike mode. If the
parameter is omitted, the current state of this
setting will be reported. Note that 'fshlinfo'
has been enhanced to also report this state.
You can set this mode ON on the FSHL command line
with the switch: "-i".
installdll installdll dllname [token list]
Allows the installation of a DLL (user or third
party written) which may contain actions to be
executed for the listed tokens. Thereafter
any of the tokens in the token list will act
in a similar fashion to a normal 'alias' except
that the DLL routine will be called.
If the "token list' is omitted, the DLL will
be removed from memory.
This DLL MUST have the following entry point:
USHORT APIENTRY PROCESS(PCHAR, PCHAR);
The two parameters will be the token which
initiated this call to the DLL and its command
line parameters respectively. The return
value from the function will placed into the
ERRORLEVEL.
The DLL may optionally have one or both of the
following two entry points:
USHORT APIENTRY INIT(VOID);
USHORT APIENTRY CLEANUP(VOID);
INIT will be called immediately after loading
the DLL to allow it to allocated resources or
perform whatever action it feels it must. If
INIT returns nonzero, the DLL will immediately
be unloaded and an error message printed.
CLEANUP is called when the DLL is unloaded
under normal conditions. This will allow the
DLL to free any allocated resources and/or
perform any other actions it deems necessary
at this point.
See the supplied source code for TestDLL for
a very contrived example.
Note that the token lists for the installed DLLs
are checked first before any other FSHL alias,
FSHL internal, or OS/2 internal command. After
FSHL aliases are expanded, the list is rechecked.
Also note that installed DLLs are inherited by
child invocations of FSHL but not vice versa.
If a child uninstalls an inherited DLL, it will
still be installed for the parent. This behavior
is analogous to the say SET environment variables
behave with respect to parent and child processes.
pfalias pfalias[!] [1-48] [definition]
pfalias! Allows the setting of macros to the various PF
function keys (1-12 are the normal keys, 13-24 are
the shifted function keys, 25-36 are Ctrl+PF keys,
and 37-48 are Alt+PF Keys). If the "pfalias!" form
is used, a carriage return is appended to the key
definition. If the "definition" parameter is
omitted, the key definition is cleared. If no
parameters are given, a list of existing definitions
is printed to screen. These function key settings
are global to all invocations of FSHL in a given
session (just like command historys work). When
a PF key is typed at the command line the
associated string in 'typed' at the cursor just as
is the user had typed it.
prty prty idle|normal|timecrit|foreground command [args]
Allows execution of "command" at the specified
priority level. Whatever priority FSHL itself is
running at is restored after execution of the
command.
restorehistory restorehistory filename
Reads a file, created previously by the FSHL
"savehistory" command and replaces the entire
history buffer with the saved buffer.
savehistory savehistory filename
Saves the current history buffer to a file for
later use with the FSHL "restorehistory" command.
window window min|max|restore|size|move|tasklist
Only works if FSHL is executing in VIO windowed
session. Min, max, restore, size, and move perform
the equivalent of selecting that item from the
window's System menu. Tasklist brings the system
Task List to the foreground as if Ctrl+ESCAPE were
keyed at the keyboard. Note that "window min" and
"window tasklist" WILL indeed work in a full screen
session. In both cases, it will cause the PM
Desktop and the Tasklist to surface.
----------------------------------------------------------------------
New feature: File Name Completion
At any FSHL prompt, if you press Alt-> (Alt-"Greater-Than" or, if you
prefer, Alt-"period") FSHL will look at the "word" just under the
cursor (or just to the left if the cursor is over white space) and
expand it into a list of matching file names. If matches are found,
the string is replaced immediately with the first match. Subsequent
presses of Alt-> will progress through the list. Alt-< will move
backwards through the list. Either way, the list will "wrap". That
is, when the end is reached the display will start over from the
other end.
Notes on pattern matching:
If you press Alt-> or Alt-< with the cursor over the string "foo",
FSHL will first try to find a file which exactly matches "foo". If
the file exists, nothing apparent will happen; you are done. If a
SUBDIRECTORY named "foo" exists, however, a backslash will be
appending to "foo", making it "foo\" and you will then be able to
cycle through all the file names in that subdirectory. If neither of
these two events occured, then FSHL will transform the string into
"foo*" and try one more time and you will be able to cycle through
your file names like "foolishness" and "food preparation in the
90's". If there are still no matches at this point, FSHL will emit a
short beep to inform you of that fact.
If the string contains any *'s or ?'s, then only that string will be
matched (i.e., it will not test it as a possible subdirectory). If
the string ends with a backslash (i.e., "foo\") then FSHL will not
try to treat it like a possible file name and will instead match
"foo\*".
----------------------------------------------------------------------
New Pseudo Environment variable: _DATEYMD_
Returns the current date packed into YYYMMDD format. For instance,
while "echo %_DATE_%" would print something like "Mon Mar 16, 1992",
"echo %_DATEYMD_%" would print 19920316.
----------------------------------------------------------------------
Programming APIs:
There are now two methods for you to programmatically extend and/or
access FSHL features. One method is the 'InstallDLL' interface
(see above under 'installdll' for information regarding programming
add-on DLLs and also see the source for TestDLL for a simple
example). The second is via the supplied FSHLCALL.DLL module. This
module contains two entry points which you may access from your
program:
USHORT FindFshl(void);
Returns the version number of the parent FSHL process or
zero if you are not running as a child of FSHL.
USHORT CallFshl(PSZ pszCmd, PUSHORT pusRetCode);
'pszCmd' is a pointer to a buffer containing any arbitrary
command line. It will be submitted to the invocation of
FSHL which is your most immediate predicessor which will
treat it in all respects as though it were typed at the
command line. This is to say, alias expansion and expansion
of environment variables will take place as normal.
'pusRetCode' will be set to the return code (i.e., the
ERRORLEVEL) from the command after its successful completion.
The return value is zero on success, 0xffff on failure (if,
for instance FSHL is not an ancestor of the current
process).
A header file, FSHLCALL.H and an import library, FSHLCALL.LIB, are
also supplied for your use. It is recommended, however, that you
dynamically load FSHLCALL.DLL via DosLoadModule() rather than link
with the import library so that your program may continue to function
properly should it find itself in the situation where FSHL is not a
parent process.
THE DIFFERENCE BETWEEN THE TWO APIS:
1) Use the "InstallDLL" interface to create new built-in FSHL
commands or to enhance old ones.
2) Use the CALLFSHL interface if your program needs to change
something in the parent FSHL's environment such as the current
working directory, disk drive, setting of an environment variable,
etc.
3) The CALLFSHL interface could also be used as an alternative to
"shelling out" to an operating system command from your program to
avoid starting another process.
----------------------------------------------------------------------
Other comments:
Note that there are two new switches for the FSHL invocation command
line:
-i Sets default insert/overstrike mode to 'Insert'
-u Sets default "CtrlSearch" method to 'off'
Previously the state of the following toggles was not preserved into
child invocations of FSHL:
Delimiter Set
CtrlSearch
FshlInsert
This situation has been corrected.
----------------------------------------------------------------------
DOS and Windows programs:
Under OS/2 2.0 you may now execute any DOS or Windows app directly
from the FSHL command line. Executing a batch file (.BAT) or a
Windows executable will behave exactly as CMD.EXE does (i.e., the
current session is hidden for the duration of the batch file or
Windows session and is restored upon completion. Any other DOS app
(.EXE or .COM file) executed from the FSHL command line will spawn an
independant session wherein that program is run and you may switch
back to the original FSHL session if you wish without disrupting the
DOS app.