mirror of
https://github.com/GnoConsortium/gno.git
synced 2024-12-22 14:30:29 +00:00
d534981038
Set_Variable, Export, etc.) to new ones (ReadVariableGS, SetGS, ExportGS, etc.) in many places; there are still a few more to change. This change removed the 256-character limit on strings retrieved by these routines, such as the value of environment variables. (PR # 9). At startup do not set $TERM to gnocon if it is already set. Removed the df command (from builtin.asm). Defined macro incad to increment a 4-byte address, checking for overflow; replaced instances of "inc ptr" with "incad ptr". Changed column offset table to use a 1-word rather than 1-byte entry. This resolves PR#14 (hash wouldn't print beyond first 256 filenames). Fixed defect in unalias (alias.asm) where the double quote portion of the scanner would look for a terminating single quote. This resolves PR#69. Changed default order for copying files in $PATH dirs into executable list, so earlier paths files are found first. Added environment variable flag $OLDPATHMODE to make gsh behave in the old (backwards order) way when necessary. Discard duplicate filenames when hashing. Fix PR#73: directory in $PATH with escaped space (\ ) is not searched.
344 lines
18 KiB
Plaintext
344 lines
18 KiB
Plaintext
GSH 2.0 UPDATES
|
|
^^^^^^^^^^^^^^^
|
|
|
|
Jul 19 98 [dmt] Changed edit.asm to use ReadIndexedGS, InitWildcardGS,
|
|
NextWildcardGS, instead of their obsolete counterparts.
|
|
|
|
Jul 18 98 [dmt] Changed Set_Variable, Export, UnsetVariable in cmd.asm,
|
|
shellvar.asm, jobs.asm, and term.asm to use new shell interface
|
|
(SetGS, ExportGS, UnsetVariableGS).
|
|
In InitTerm (term.asm), do not set TERM to gnocon if it is
|
|
already set.
|
|
|
|
Jul 17 98 [dmt] Changed final Read_Variable call (in edit.asm) to use
|
|
getenv instead. Changed ReadVariableGS calls in hash.asm
|
|
and builtin.asm to also use getenv.
|
|
|
|
Jul 16 98 [dmt] Changed Read_Variable calls in history.asm and prompt.asm
|
|
to use getenv instead.
|
|
|
|
Jul 15 98 [dmt] Changed getenv (shellutil.asm) to use ReadVariableGS
|
|
instead of Read_Variable to get value. getenv's input parameter
|
|
is now a pointer to a GS/OS string (not a C-string), and it
|
|
returns a pointer to a GS/OS result buffer with a terminating
|
|
null byte added. This interface change affected calls to
|
|
getenv in orca.asm and term.asm.
|
|
|
|
Jul 14 98 [dmt] Changed expandvars (expand.asm) to use ReadVariableGS
|
|
to get the value of an environment variable, allowing values
|
|
over 256 characters in length.
|
|
|
|
Jul 13 98 [dmt] Rewrote shellvar.asm to use newer shell calls to access
|
|
environment variables, so that they can be > 256 characters.
|
|
Combined set and setenv into the same routine, with different
|
|
entry points.
|
|
|
|
Jul 12 98 [dmt] In rehash command (hash.asm), read the PATH environment
|
|
variable with ReadVariableGS instead of Read_Variable, allowing
|
|
detection of true length and total length > 256 (PR # 9).
|
|
|
|
Jul 9 98 [dmt] Removed the df command (from builtin.asm).
|
|
Defined macro incad to increment a 4-byte address, checking
|
|
for overflow; replaced instances of "inc ptr" with "incad ptr".
|
|
|
|
Jul 8 98 [dmt] Changed column offset table to use a 1-word rather
|
|
than 1-byte entry. This resolves PR#14 (hash wouldn't
|
|
print beyond first 256 filenames).
|
|
|
|
Jul 7 98 [dmt] Fixed defect in unalias (alias.asm) where the double
|
|
quote portion of the scanner would look for a terminating
|
|
single quote. This resolves PR#69.
|
|
|
|
Jul 5 98 [dmt] Changed default order for copying files in $PATH dirs
|
|
into executable list, so earlier paths files are found first.
|
|
Added environment variable flag $OLDPATHMODE to make gsh
|
|
behave in the old (backwards order) way when necessary.
|
|
Discard duplicate filenames when hashing.
|
|
Fix PR#73: directory in $PATH with escaped space (\ ) is
|
|
not searched. Needed to remove the "\" before sending
|
|
pathname to ExpandPathGS.
|
|
|
|
Jun 29 98 [dmt] Changes up to this point checked-in to master archive.
|
|
|
|
Jun 28 98 [dmt] Added InitVar routine to shellvar.asm to read values
|
|
of all environment variables tracked in vardata.
|
|
|
|
Jun 25 98 [dmt] Added 2.0 versions of shell calls to gsh.mac (e.g.
|
|
ErrorGS, ReadVariableGS). Replaced old calls with new ones
|
|
for the following: ERROR to ErrorGS in builtin.asm, cmd.asm
|
|
dir.asm, shellvar.asm; Push[Pop]Variables to Push[Pop]VariabesGS
|
|
in invoke.asm, shellvar.asm, shell.asm; ReadVariable to
|
|
ReadVariableGS in builtin.asm and dir.asm.
|
|
|
|
Jun 23 98 [dmt] Made clear built-in a non-forked command.
|
|
|
|
Jun 21 98 [dmt] Added loop to execute(), in cmd.asm, to extract a single
|
|
command from the input line before sending it to command(). It
|
|
removes leading blanks and tabs and terminates the string at
|
|
the first ";" or "#". After command() has finished, execute()
|
|
loops again if the previous command was terminated with a ";".
|
|
This change fixed both problems in bug report #12:
|
|
a) All commands separated by ";" were evaluated before any
|
|
were executed, so the following wouldn't work:
|
|
set t_num=1 ; echo "Test number $t_num"
|
|
b) Odd things randomly happened when tab was the first
|
|
character of multiple consecutive lines.
|
|
|
|
Jun 20 98 [dmt] Changed pointer arithmetic from dec or inc to adc or sbc
|
|
to allow for boundary condition in shell.asm.
|
|
In ShellExec (cmd.asm), save status from call to execute and
|
|
pass back to caller in Accumulator.
|
|
Modify table of builtins so that source is unforked; this
|
|
fixes bug reports #7 and #8: prefix does not work from a
|
|
sourced file.
|
|
|
|
Jun 18 98 [dmt] In cmd.asm, modified system() to check for null pointer,
|
|
since that is documented in the ORCA/C manual as legal.
|
|
|
|
Jun 15 98 [dmt] Fixed bug report #3: when wildcards were expanded, if
|
|
nothing was found gsh printed "No match." and terminated, even
|
|
if there were more arguments to parse. Now gsh prints a message
|
|
"No match: <pattern> ignored" to stderr for each <pattern> that
|
|
does not match any filename. These changes were in expand.asm.
|
|
Changed mutual exclusion in cmd.asm and shellvar.asm to use
|
|
lock/unlock/key macros. That should be all of 'em.
|
|
|
|
Jun 14 98 [dmt] Fixed bug report #47: when ~ is parsed and next character
|
|
is a delimiter ("/" or ":") and first character of $HOME does
|
|
not match that delimiter, replace the delimiters in $HOME to
|
|
match the user's value. Changed three "ora addr" to "ora addr+2"
|
|
(alias.asm: ora ptr; edit.asm and history.asm: ora cdcap).
|
|
Changed mutual exclusion in expand.asm to use lock/unlock macros.
|
|
|
|
Jun 13 98 [dmt] Wrote script to test built-in commands; found many that
|
|
returned status=227. Updated exit, setdebug, ps, hash, commands,
|
|
history, dirs, pushd, popd, jobs, fg, bg, and stop to return
|
|
status of 0 (modified "return" to add "2:#0").
|
|
|
|
Jun 12 98 [dmt] Squeezed about 80 bytes out of orca.o (edit built-in),
|
|
mainly by removing "invalid path name" error msg, since I
|
|
couldn't force ExpandPath to report the error and the editor
|
|
handles it fine. Also tightened "whileloop" by using Y-reg
|
|
to index off of two pointers. Added lots of comments.
|
|
|
|
Jun 10 98 [dmt] The boolean shell environment variables (echo, pushdsilent,
|
|
etc.) would not work if they were set using UPPER CASE names.
|
|
Added routine cmpdcstr in shellutil.asm to downshift characters
|
|
while comparing two c strings, then called it from updatevars
|
|
in shellvar.asm to compare env variable names.
|
|
|
|
Jun 9 98 [dmt] Modified echo command (in builtin.asm) so it doesn't append
|
|
a blank to the end of everything it prints. Added comments to code.
|
|
|
|
Jun 8 98 [dmt] Added breakpoint option to setdebug (in builtin.asm) to
|
|
allow turning on conditional brk instructions for debugging.
|
|
Made "check4debug" a global word that reflects the current debug
|
|
state, and added "breakpoint" macro (in gsh.mac) to generate code.
|
|
Changed "2.0.4" to "2.0.6" within gnostr (in shell.asm).
|
|
|
|
Jun 6 98 [dmt] All the macros were extracted, compared, and collated in
|
|
alphabetical order into the file gsh.mac. Six macros used by
|
|
other macros had to be moved to the end of the file.
|
|
|
|
Added direct-page/stack data segment (size 2K) to main.asm.
|
|
It is initialized to be filled with "?" characters, so that
|
|
it can be examined to see how much space is being used.
|
|
|
|
Jun 5 98 [dmt] Determined that the current sources have only two
|
|
differences from the gsh distributed with GNO/2.0.4:
|
|
In main.asm between (argloop and cmd3) the code
|
|
ph4 #1024
|
|
jsl ~NEW
|
|
formerly was
|
|
pea 1024
|
|
jsl ~NEW
|
|
|
|
In jobs.asm (after dokill) the error check after
|
|
kill (pid,signum)
|
|
was not present.
|
|
|
|
Jun 1 98 [dmt] Changed to execvp to _execve in invoke.asm. gsh works!
|
|
|
|
24 Apr 98 [gdr] Fitted gsh sources into into GNO builds. While gsh
|
|
assembles and links (abeit using the v2.0.4 termcap library),
|
|
it does not currently run -- it just crashes. The changes
|
|
that were made includes:
|
|
- 'keep' lines were eliminated
|
|
- the 'mcopy' now takes the macro from the /obj/gno/bin/gsh
|
|
directory. This is in anticipation of having the macro
|
|
files generated from a single source file; there is a large
|
|
amount of duplication. For the moment, the makefile merely
|
|
copies the old macro files from the "M" directory to the
|
|
/obj/gno/bin/gsh directory.
|
|
- start each file with a dummy routine so that the source
|
|
code winds up in the *.o rather than the *.root file.
|
|
- added the 'setcom 60' directive; there were many source
|
|
lines that were otherwise getting truncated.
|
|
|
|
18 Nov 97 - [gdr] initial checkin into v2.0.6 repository. No changes
|
|
were made to the sources.
|
|
|
|
GSH 1.1 UPDATES
|
|
^^^^^^^^^^^^^^^
|
|
|
|
(unknown) - Removed two references to $E0C000 in shell.asm (signal
|
|
handlers). Bad Timmy!
|
|
2/25/92 d01 - fixed a problem with the command-line aborting after certain
|
|
built-ins are run.
|
|
4/03/92 d02 - .ttya and .ttyb are displayed as 'ta' and 'tb' respectively in
|
|
'ps'.
|
|
- "USER" field has been renamed to "MMID" in 'ps'.
|
|
d03 - removed all the extra newlines around 'There are stopped jobs'
|
|
message.
|
|
- 'exit' in a shell script aborts the script, instead of quitting
|
|
gsh itself.
|
|
- when getting a 'There are stopped jobs' message, a second
|
|
attempt to exit the shell will result in all jobs being killed
|
|
and the shell will exit. No commands may appear between the
|
|
two attempts to exit. This is basically just like csh behaviour.
|
|
d04 - motd pathname has been changed to '31:etc:motd' where 31 is the
|
|
location of GNO, not the user directory. eventually motd will
|
|
be removed from gsh and will be handled by login or something
|
|
similar.
|
|
4/07/92 d05 - ^D and TAB expansion now properly works on */ boot prefix.
|
|
4/13/92 d06 - started work on new string vector library.
|
|
- started new builtin - 'hash' to display all hashed files.
|
|
Extremely preliminary.
|
|
4/14/92 d07 - 'hash' now uses string vectors to build the hash list for
|
|
displaying
|
|
- fixed a problem if no files were hashed.
|
|
- sv_alloc now makes sure there is an extra null at the end
|
|
of the allocated string vector.
|
|
4/20/92 d08 - 'which' puts the filename after the path for commands in
|
|
the current directory.
|
|
d09 - wrote a string vector function for printing the string
|
|
vectors in columns like 'ls'. 'hash' now calls this.
|
|
4/21/92 d10 - wrote routine for sorting string vectors...'hash' now sorts the
|
|
list...
|
|
4/23/92 d11 - full directory stack support!! pushd, popd, and dirs!!
|
|
d12 - 'ps' displays 'nu' for the .null driver under TT field.
|
|
4/25/92 d13 - Added '-l' option to 'kill'.
|
|
6/22/92 d14 - Began writing custom stdio for the shell using GS/OS output.
|
|
6/23/92 - minor optimization to alias hashing.
|
|
- finished stdout and stderr for gsh.
|
|
d15 - history file is no longer deleted on gsh start-up
|
|
- fixed '~' printer used in 'dirs'. /usr2/ was displayed as
|
|
~2 if $home was /usr. Looked real dumb :) and was incorrect.
|
|
- optimizations to job control
|
|
d16 - echo flushes the stdio when finished.
|
|
6/24/92 - fixed bug in system() call vector..make should work better
|
|
now :)
|
|
- added a newline after 'pwd'.
|
|
- wrote 'edit' built-in.
|
|
6/26/92 d17 - began work on stdin for gsh. Uses GS/OS, ioctl(), etc...
|
|
- began rewriting editor. Now uses key translation tables and
|
|
command jump tables.
|
|
- editor now accepts multiple character commands.
|
|
6/27/92 - further work on editor
|
|
- started work on termcap support in gsh. most command-line
|
|
editing uses termcap now.
|
|
6/28/92 - continued work on editor and termcap
|
|
- 'clear' and 'echo' builtins now use termcap.
|
|
- prompt now uses termcap.
|
|
- hacked up a quick 'tset' builtin.
|
|
- wrote keybinding function, termcap arrow keys now bound!
|
|
- beta test release sent out
|
|
6/29/92 d18 - if alias 'precmd' is defined, it is executed before drawing
|
|
each prompt.
|
|
- if $pushdsilent is set, then directory stack not displayed
|
|
after 'pushd' and 'popd'.
|
|
- termcap optimizations for history mechanism in editor.
|
|
- termcap optimizations for kill-line and kill-end-of-line.
|
|
- fixed bug in overwrite mode of editor...required too many
|
|
returns to end line -> rts's weren't being pulled off the
|
|
stack :)
|
|
6/30/92 - fixed a bug in the 'which' command when displaying files in cwd.
|
|
- the cursor is now left on when running applications.
|
|
- added '-c' option to gsh command-line
|
|
- wrote 'source' built-in
|
|
7/04/92 - fixed two bugs in prompt display code.
|
|
7/17/92 - fixed puts to not choke on NULL strings.
|
|
7/21/92 - Temporarily added Push/PopVariables to the code
|
|
- ospeed is now set so that padding can be done by termcap.
|
|
This fixed the dropped characters on my Xerox terminal when
|
|
doing screen clears.
|
|
- fixed a bug in 'tset'. Was doing a jsr instead of jsl. oops.
|
|
- set term can be in gshrc w/o manually doing a tset now.
|
|
- 'ps' now scans job list to find names of 'forked' processes.
|
|
- 'ps' nows displays tty numbers, since the ttyname is set
|
|
in 31/etc/ttys and not necessarily second-guessed by gsh.
|
|
7/25/92 - fixed cursor off problems.
|
|
8/26/92 d19 - larger number of builtins can be redirected or piped.
|
|
- Open-Apple is now mapped to meta (ESC).
|
|
- The editor tells gnocon to translate arrows into VT100 codes.
|
|
- fixed editor bug clearing entire line.
|
|
- wrote 'bindkey' built-in.
|
|
8/27/92 d20 - faster built-in searching.
|
|
- wrote 'setenv' builtin.
|
|
8/28/92 - termcap optimizations to word completion
|
|
- word completion now matches variables if word starts with '$'.
|
|
8/29/92 - only executuables are expanded if the word is a command. All
|
|
files are expanded for arguments.
|
|
8/30/92 - words to complete no longer need to be separated with spaces,
|
|
';','|', and '&' are now also recognized.
|
|
9/01/92 - 'cd' no longer reports bad pathname syntax if $home not set.
|
|
- 'pid' parsing now does syntax checking :)
|
|
- kill won't allow killing process 0
|
|
- changed 'jobs' invocation from method 0 to method 1.
|
|
- word completion will not occur if the word contains an '=',
|
|
single quote or double quote.
|
|
9/03/92 - fixed memory trashing problem in 'source'
|
|
9/04/92 - 'ps' only displays processes with the users uid. Be sure to
|
|
use login, or you'll be the kernel's uid and get to see all
|
|
of the kernel's processes as your own.
|
|
9/10/92 - forgot to 'clc' when alias not found in 'alias foo'.
|
|
9/20/92 - fixed open-apple mapping
|
|
- changed keyboard mapping
|
|
- tab expands directories as the command
|
|
- set problem with '-f' fixed
|
|
9/21/92 - fixed 'cd' with no arguments.
|
|
- fixed 'set foo' and 'setenv foo'.
|
|
- fixed bug again in 'cd'.
|
|
- 'set' and 'setenv' list exported variable names in upper case
|
|
- fixed a probelm in puts when passed a null pointer.
|
|
- fixed pointer bug in '~' compactor
|
|
- wrote 256 byte buffer pool
|
|
9/22/92 - fixed parsing bug when parsing two or more command-lines
|
|
simultaneously.
|
|
- wrote 1024 byte buffer pool.
|
|
- word completion now matches built-ins
|
|
- wordmatching ignores matches if the suffix is contained in
|
|
the $fignore variable.
|
|
10/31/92 d21 - fixed bug in piping mechanism.
|
|
11/04/92 - fixed hashing problems.
|
|
11/17/92 - new builtin 'commands' lists all built-in commands. Try aliasing
|
|
help to this for beginning users.
|
|
01/17/93 b01 - fixed prefix not printing correctly if zero length prefix.
|
|
- word completion will expand to proper case.
|
|
01/20/93 b02 - removed motd printing from gsh
|
|
02/08/93 - fixed job control setting of terminal when background job
|
|
completes.
|
|
02/09/93 - ^C & ^Z printing removed from the shell. The kernel will do
|
|
this now.
|
|
02/17/93 b03 - gshrc is now read as '@:gshrc'
|
|
03/02/93 - 'set' automatically detects changing $term and auto-peforms a
|
|
tset. manually typing 'tset' is no longer required though it is
|
|
still included.
|
|
- prompts can now contain \n,\r,\t,\b.
|
|
03/10/93 - updated automatic variable setting code. works faster now.
|
|
- optimized low-level string routines
|
|
03/25/93 - fixed NULL commands aborting entire command-lines.
|
|
04/04/93 - history commands can now be greater than 256 characters, though
|
|
when being read, they are clipped to 1024.
|
|
- the history file location has been moved to '@:history'
|
|
- if $ignoreeof is set, then EOF (^D) will not quit the shell.
|
|
- %U and %u will start and end underlining in prompts.
|
|
04/22/93 b04 - 'df' displays device numbers
|
|
- gsh now takes commands as command-line input. ie.,
|
|
'gsh echo hello, world' will start gsh then gsh will run echo.
|
|
- fixed a nasty shell script bug that basically rendered it
|
|
useless.
|
|
- fixed memory trashing in shell scripts.
|
|
- fixed memory trashing in histories.
|
|
04/26/94 b05 - which no longers displays the command-name first.
|