⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.jrm

📁 一个开放源代码的 AT&T 的 Korn Shell 的复制品, 支持大多数 ksh89 的特性。
💻 JRM
字号:
BUILDING THE PD KSH===================As usual, there are differences between BSD and System Vversions.  Ideally, all you have to do is edit the Makefile inthis directory to set the CONFIG macro to the appropriate value.(Actually, you may wish to change the CONFIG macro in allMakefiles; if you always invoke make(1) from here, CONFIG willbe passed down, but if you invoke make(1) from a subdirectoryyou'll want the appropriate definition in that Makefile.)Of course it's not quite that simple.  You may, however, takesolace in the knowledge that it used to be worse.The Compatibility Libraries---------------------------Eric Gisin wrote this shell using ANSI C and POSIX asportability guidlines.  Realizing that nobody had a POSIXsystem and almost no one had an ANSI C environment, he providedminimal compatibility libraries.There are two libraries, one for POSIX (libposix.a) and one forANSI C (libstdc.a).Libposix.a is pretty simple.  Nothing in it has ever broken onme, so I'd just leave it.  It provides a version of dup2() forSystem V systems.Libstdc.a is a bit hairy.  I recommend looking at the routinesprovided and, and editing the std/stdc Makefile and onlyincluding objects that have routines your system libc.a islacking.  Various of the provided routines are just plainflaky, but only when they're not really needed.  The otherhairy thing he does is craft an ANSI stdio.h from the systemsupplied one and one of his own.  Again, it's better than itused to be, but it's still a hack, and you may have to modifyit by hand.You will also need a POSIX compatible set of directory readingroutines.  System V.3 systems have this in libc.a.  Thestd/posix directory provides a something for BSD systems.  Iuse a slightly modified version of Doug Gwyn's PD version.(The ``slightly modified'' is to work around a bug in Gwyn's version.The POSIX routines are documented as returning failure if the file foropendir(3) is not a directory.  Gwyn attempts to open(2) the file, andthen stats it to see if the file is a directory.  However, if the fileis a special file, and the open(2) doesn't return, you're screwed.  Mychange was to open the file with the O_NDELAY flag, but Gwyn didn'tfeel this was portable (true, but I only do it where it works) andthat stat-ing before the open would be too slow (true).  The upshot isif you use his routines unmodified, don't ever do an "ls -l /dev/*/*".)The Shell Source----------------The source for the shell itself is in the sh directory.  There youwill want to edit config.h to determine the configuration options.  Vimode is in kind of rough shape, but does work.  DIRSTACK routinesaren't implemented yet, so again, why bother.  SWTCH is a bit arcane,but it you use shl(1) and you define EMACS or VI you want to definethis.  JOBS is really only useful on BSD systems.  It might work onsystems that have POSIX job control, but I wouldn't bet on it.SHARPBANG is only useful on systems where the exec() family don'thonour the #!/prog/path convention.This is where the shell gets built so you may wish to changethe OTHERLIBS macro in the Makefile to point to your POSIXdirectory routines, or to use -lc_s, or whatever.Miscellaneous-------------The Makefiles that actually compile things use the macroCCOPTS, so you can change it in individual Makefiles or specifyit on the command line, eg. "make CCOPTS=-O OTHERLIBS=-lc_s".LDOPTS is used in the Makefile where the ksh is actually built.The very first time on a new system, do a "make clobber"Good luck.Documentation-------------The ksh.1 is a man page for the PD ksh, although it lagssomewhat behind the code.  You get what you pay for.The ksh88.1 is a man page for AT&T's ksh88 (the latest version)provided for comparison.History-------Much of the shell was written by Eric Gisin at the Universityof Waterloo, using some pieces of other stuff, notably CharlesForsythe's V7 shell, and some enhancements from the BRL shell.He placed it (in a alpha test state) into the public domainwhile I was at UW.  I snarfed a copy, and got it running on myUNIXpc, and later some machines at work.  I sent Gisin some bugreports, but he seems to have lost interest in the project.This may be because he now does some work for MKS, who produce acommercial version of the ksh for MS-DOS machines, so there maybe a conflict of interest.So I gave up on getting future versions, and adopted it.  I'vemade some enhancements, and quite a few bug fixes, and variouspeople at work have contributed as well.  It remains in thepublic domain, although I imagine the people involved wouldappreciate leaving their names attached (I'm exempt; I haven'tactually included my name anywhere but here).The README in the sh directory is Gisin's, and tells a bit ofthe story from his point of view.  Note that his compilationinstructions don't really apply anymore.John R. MacMillan

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -