home *** CD-ROM | disk | FTP | other *** search
- This is a very quick readme for my port of ksh to mint.
-
- Changes for V04.0a
-
- 1) fixed a problem introduced in V4, causing the pattern matching
- routines in the variable substitution ( ie ${name%%.c} etc. ) not to
- work correctly.
-
- 2) the same pattern routines now work on a copy of the variable, rather
- than on the original. ( this was an old feature of this version of the
- shell )
-
- Changes for V04.0
-
- 1) relink without symbol table, removes 15K from executable.
-
- 2) a few more changes to the wait code in job.c, a program that
- immediately went into a pause ( eg. sleep ) was missed. I should have
- just settled down and rewritten the job control code, neither init nor
- bash seem to have the same problems with really fast exits, bummer.
-
- 3) time ... now correctly returns the elapsed time of a process. This
- was a bug in times.c in the mint lib.
-
- 4) the old getopts function didn't work ( at all, as far as I can tell
- ). I've replaced this with code from the mint library, since both
- routines derive from work by Doug Gwin. This getopts routine correctly
- works in parsing it's parameters. ( But see bugs file . ) However it does
- enforce the System V syntax, ie. options may not be grouped :-(
-
- 5) the tilde character '~', is now correctly interpreted in the SHELL
- environment variable. This used not to be the case. However, if a
- different program needs to find the shell, it may not understand ~ as
- meaning $HOME, so it is probably best to give an explicit path.
-
- 6) The history file mechanism is begining to take shape. $HISTFILE now
- specifies the history save file. $HISTSIZE is not implemnted, yet. This
- file is opened and closed at every command, now on my system using the
- ICD disk cache I get such a negligable performance degradation that this
- seems quite reasonable. Let me know if it causes too many problems. The
- impetus for this level of file access is mgr, with multiple shells
- running I needed to close the file between writes, otherwise only the
- last shell run could access the history file.
-
- 7) Fixed a memory allocation bug in the typeset command, one of mine I'm
- afraid.
-
- 8) This version no longer changes the / to \ in most of the environment,
- now only the PATH is changed. The command line still has all /s replaced
- with \ unless the unixpath option is set, or the unixpath command used.
-
- 9) Slight change to the version number format in KSH_VERSION, this now
- matches my release numbers.
-
- Changes for V03
-
- in no particular order;
-
- 1) $PPID is now set to equal the process id of the parent process.
-
- 2) if the parent process id == 0 ( ie. if ksh has been run as init.prg ),
- ksh runs as though it was a login shell, executing ~/profile.ksh.
-
- 3) on exit, the login shell will look for the LOGOUT variable, and if set
- will try to execute the the file named. This means that,
-
- LOGOUT='~/logout.ksh'
- has the same effect as
- trap ". ~/logout.ksh; exit" EXIT
-
- 4) the ulimit command now works as expected, ulimit can be used to set up
- the child process limit's in a similar way to limit.ttp.
-
- options are
- ulimit [-dmt] [limit]
- where
- -d : set the limit on the maximum Malloc'd memory for a process
- -m : set the total maximum memory allowed for a process
- -t : set the mamximum amount of CPU time allowed for a process
-
- 5) shell scripts now work. Any file with a .ksh extension is assumed to be
- a shell script and if executed will be run in a spawned sub-shell. This
- does need the SHELL environment variable to be correctly set, eg to the
- name of the current shell ( use / rather than \ in the name ). Whilst I
- have spotted a few bombs when testing this, these have always been the
- result of bugs in the shell script, on all of the correct shell scripts
- I've tried, this has worked fine.
-
- 6) CDPATH is now implemented. This gives a search path for the cd command,
- first the current directory is searched for the subdirectory, if this
- fails, then every directory in the CDPATH environment variable is also
- searched for this subdirectory. CDPATH is a semi-colon separated list.
- to use just type;
- CDPATH="d:/usr;e:/mint"
- etc.
-
- 7) the cursor key's now scroll through the history list, and along the
- current line. Insert runs a complete command, and clr/home runs a list
- command, rather like gulam ( but not quite as smart yet ). Undo does a
- kill-line.
-
- 8) unixpath can now be used as a prefix to a command. This command will be
- executed without the normal unix_to_dos command line conversions. this is
- useful for programms such as zoo or sed that like to see /'s on their
- command line rather than \'s.
-
- 9) OK, there was still a bug spotting the termination of processes. If
- there were any stopped jobs my tests for a running process failed and
- ksh went into a wait/sleep loop. This is now fixed - for the last time I
- hope :-).
-
- 10) I've added the extra ksh variable formatting commands to typeset,
- ie.
-
- -l Lowercase variable
- -u Uppercase variable
- eg.
- 81 $ typeset -u name
- 82 $ name="Guy Gascoigne"
- 83 $ echo $name
- GUY GASCOIGNE
-
- -L Left justify var.
- -R right justify var.
- -Z right justify and pad with leading zeros.
-
- if one of these options is followed by a number, the number is
- interpreted as a field width. The next example left-justifies the value
- of the variable last in a field of 10 characters:
-
- 84 $ typeset -L10 last
- 85 $ last="Gascoigne-Piggford"
- 86 $ echo $last
- Gascoigne-
-
- Changes for V02
-
- 1) maketemp fails to create tempory files, was hardcoded to /tmp. Now
- changed to use TEMP environment variable. Change to io.c.
-
- 2) now exits if not run from within MiNT. Whilst it never crashed when
- Mint wasn't running, it never ran properly, the screen handling lacked
- line feeds, and no external commands worked correctly. It would be nice to
- get this version to be fully TOS compatable, this will involve more
- changes to the MiNT library. change to main.c
-
- 3) added $MINT_VERSION which equals the version number of the currently
- running mint. Set to be readonly. change to main.c
-
- 4) Some general tidying up of the search code in exec.c. The bit that
- checks for the file extensions ( .prg, .ttp, .tos, .app, .ksh ) was really
- messy. Added an extension check to partially completed path names, before
- this, /bin/ls would only try /bin/ls and not attemp to add any extensions,
- this has now been changed, and command without an extension, will get
- tested for with all the extensions before retuning false.
-
- 5) The important one. The termination of child processes is now always
- noticed by the shell. No more pipes hanging, no more really fast programs
- hanging on their return. Thank you ersmith for pointing me in the right
- direction :-).
-
- Known bugs.
-
- 1) most shell scripts work fine if they are called by typing
- ksh script.ksh
-
- if you just type script.ksh, it will crash, whilst I have a feeling that I
- know what is wrong, I havn't proved it yet :-).
-
- A few added features, for this MiNT Version.
-
- 1) ksh only accepts unix style pathnames, but it automatically converts
- every / in a programs command line to a \. Now this is just right for most
- progs, however there had to be an exception. Zoo sometimes wants / or //
- on it's parameter line. To get around this, I've added an extra set
- option. set -o unixpath will pass the unix style commandline through to
- the sub program. set +o unixpath reset this. Whilst this is a bit of a
- frig, it does the job, and can always be changed later.
-
- 2) shell scripts are denoted by the extension .ksh.
-
- 3) file name extensions do not need to be typed for program execution. ksh
- now hunts through all the possible executable file name extensions to find
- the program. As far as I know this is fine.
-
- 4) On startup ksh will only look for profile.ksh ( in the Home directory )
- if passed the -L flag, for login, other wise only the file pointed to by
- $ENV will be executed.
-
- 5) I've changed the seperator character within the PATH variable from ':'
- to ';' to avoid clashes with drive labels.
-
- eg. use
- export PATH="/bin;/etc"
- instead of
- export PATH="/bin:/etc"
-
-
- Please report any bug to ggascoigne@cix
-
- Guy Gascoigne - Piggford
-