From 48379537388eaad79261b3a4d9d7d3eabda8ff1f Mon Sep 17 00:00:00 2001 From: Michael Keyes Date: Fri, 22 Apr 2022 14:37:46 +0100 Subject: [PATCH] Getting ready for release of new version... --- INSTALL.BAT | 68 -- README.md | 45 +- SED16BIN/FILE_ID.DIZ | 5 - SED16BIN/README.16X | 21 - SED16BIN/SED.COM | Bin 25178 -> 0 bytes SED16BIN/SED.LST | 662 ------------- SED16BIN/SED32BIT.EXE | Bin 54272 -> 0 bytes build.bat | 16 - tplstsr3.asm | 2147 ----------------------------------------- 9 files changed, 18 insertions(+), 2946 deletions(-) delete mode 100755 INSTALL.BAT delete mode 100644 SED16BIN/FILE_ID.DIZ delete mode 100644 SED16BIN/README.16X delete mode 100755 SED16BIN/SED.COM delete mode 100644 SED16BIN/SED.LST delete mode 100755 SED16BIN/SED32BIT.EXE delete mode 100644 build.bat delete mode 100644 tplstsr3.asm diff --git a/INSTALL.BAT b/INSTALL.BAT deleted file mode 100755 index f64c580..0000000 --- a/INSTALL.BAT +++ /dev/null @@ -1,68 +0,0 @@ -@echo off - -echo Welcome to PluM's TPLS TSR installer! -echo The TSR itself is MIT-licensed, with source available on GitHub: -echo https://github.com/PluMGMK/rayman-tpls-tsr -echo This installer uses SED16, by Howard Helman and Walter Briscoe, of which -echo the full binary distribution is included in the SED16BIN folder. -echo I make no claim to copyright on this latter piece of software. Source code: -echo http://pement.org/sed/sed16src.zip - -if not exist TPLSWRAP.EXE goto WRONGDIR -if not exist TPLSTSR3.EXE goto WRONGDIR -if not exist SED16BIN\SED.COM goto WRONGDIR - -if not exist C:\RAYMAN.BAT goto NORAYMAN - -find /I "tplswrap.exe" C:\RAYMAN.BAT > NUL -if not errorlevel 1 goto UPGRADE - -find /I "rayman.exe" C:\RAYMAN.BAT > NUL -if errorlevel 1 goto NORAYMAN - -rem Create a little batch file that sends us to the right directory -rem and saves our cwd for copying files... -sed16bin\sed "/rayman.exe/d" C:\RAYMAN.BAT > C:\TPLSTMP.BAT - -move C:\RAYMAN.BAT C:\RAYMAN.BAK -sed16bin\sed "s/rayman.exe/tplswrap.exe/" C:\RAYMAN.BAK > C:\RAYMAN.BAT - -goto COMMONINST - -:UPGRADE -echo TPLS already seems to be installed. Performing an upgrade... -type C:\RAYMAN.BAT | find /I /V "tplswrap.exe" > C:\TPLSTMP.BAT - -:COMMONINST -rem Now C:\TPLSTMP.BAT contains every line from C:\RAYMAN.BAT except the one -rem that actually launches Rayman - in other words, enough to get us to Rayman's -rem directory! -cd | sed16bin\sed -e "s/^/set olddir=/" -e "s/\\$//" >> C:\TPLSTMP.BAT -rem Now we've completed it, so it includes a final line "set olddir="! - -C: -call C:\TPLSTMP.BAT -rem Now our env is correct, so we can clean up... -del C:\TPLSTMP.BAT - -copy %olddir%\TPLSWRAP.EXE . -copy %olddir%\TPLSTSR3.EXE . - -echo TPLS installed! You can run C:\RAYMAN.BAT now! -goto END - -:NORAYMAN -echo Rayman does not appear to be installed on this machine (at least not by -echo Ubi Soft's official installer). -echo If you know where RAYMAN.EXE is located, you can manually copy TPLSTSR3.EXE -echo and TPLSWRAP.EXE to that directory, and in future run TPLSWRAP.EXE instead -echo of RAYMAN.EXE. -echo If using Dosbox, you may need to update the "autoexec" section of your conf -echo file to make this change. -goto END - -:WRONGDIR -echo Please run this file from the directory in which it came (which should also -echo contain TPLSWRAP.EXE, TPLSTSR3.EXE and the directory SED16BIN). - -:END diff --git a/README.md b/README.md index d61c3e8..2752016 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ However, it also means that unlike the other implementations, a custom CD image |Includes extra MIDI tracks from PS1 | Yes | Yes | No | |Can be used with custom Dosbox builds | No (unless you search for pointers and [compile TPLS yourself](https://github.com/Snaggly/Rayman1Dos-TPLS/blob/master/OffsetList.h)) | No (unless you apply the [patch](https://raymanpc.com/forum/viewtopic.php?f=89&t=28341) and compile Dosbox yourself) | Yes, no recompilation needed! | |Can be used on Windows 3.x / 9x | No | No | Yes | -|Can be used on pure DOS | No | No | Yes, with a DPMI host| +|Can be used on pure DOS | No | No | Yes | |Rayman versions supported | All versions mentioned [here](https://github.com/RayCarrot/RayCarrot.RCP.Metro/blob/2e5ace35ba8d064dc7a592d9700aa311853b6deb/RayCarrot.RCP.Metro/Utilities/Games/Rayman%201/TPLS/TPLSRaymanVersion.cs) | All versions mentioned [here](https://github.com/RayCarrot/RayCarrot.RCP.Metro/blob/2e5ace35ba8d064dc7a592d9700aa311853b6deb/RayCarrot.RCP.Metro/Utilities/Games/Rayman%201/TPLS/TPLSRaymanVersion.cs) | v1.12 US and EU, v1.20 German and IT-SP-DU, v1.21 US – if you need another version added, please get in touch!| ## Installation and usage @@ -29,44 +29,35 @@ However, it also means that unlike the other implementations, a custom CD image * Make sure your Rayman version is supported (see above table) – if not, please let me know and I'll see what I can do! * Download and extract a release from the [releases page](https://github.com/PluMGMK/rayman-tpls-tsr/releases). * Change the `IMGMOUNT` command in the `autoexec` section of your config file to mount the `tplstsr3.cue` file, rather than the game's original CD image. -* Replace the invocation of `RAYMAN.EXE` in the `autoexec` section with `TPLSWRAP.EXE`. -* Copy `TPLSTSR3.EXE` and `TPLSWRAP.EXE` from the release into the same folder as your `RAYMAN.EXE`. -* You will probably also need a DPMI host – download [CWSDPMI](http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip) and extract `CWSDPMI.EXE` into the same folder as the other two files. +* Before the invocation of `RAYMAN.EXE` in the `autoexec` section, add `D:\TPLSTSR4.EXE` (where `D` is your CD drive letter). * Run Dosbox with your new config file and enjoy TPLS! ### If on native DOS or Windows 3.x / 9x (having used Ubi Soft's installer to install _Rayman_) * Make sure your Rayman version is supported (see above table) – if not, please let me know and I'll see what I can do! * Download and extract a release from the [releases page](https://github.com/PluMGMK/rayman-tpls-tsr/releases). -* Use the `tplstsr3.cue` (or `tplstsr3.toc`) and `tplstsr3.bin` files to burn a CD-R – it should be possible to do this with `cdrdao` on Linux, or perhaps [ImgBurn](https://www.imgburn.com/) on Windows. -* Insert the new CD into your PC running DOS or Windows, and run `INSTALL.BAT`. -* If you're running pure DOS (no Windows 3.x / 9x or OS/2), and don't have a DPMI host (or don't know what that is), you will again probably need to download [CWSDPMI](http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip) and extract `CWSDPMI.EXE` into the same folder as `RAYMAN.EXE`. +* Use the `tplstsr4.cue` (or `tplstsr4.toc`) and `tplstsr4.bin` files to burn a CD-R – it should be possible to do this with `cdrdao` on Linux, or perhaps [ImgBurn](https://www.imgburn.com/) on Windows. +* Insert the new CD into your PC running DOS or Windows. +* Before running Rayman, run `D:\TPLSTSR4.EXE` (where `D` is your CD drive letter). * Run `C:\RAYMAN.BAT` and enjoy TPLS! ## Compilation -Linking the TSR requires DOS, so I've included a `BUILD.BAT` script that can do the whole job on DOS itself. +`TPLSTSR4` (unlike the previous version) is a plain old `MZ` executable, so you can assemble it with MASM, JWASM, UASM, etc. -Prerequisites: -* A DOS build of JWasm. You can get this from [here](https://www.japheth.de/Download/JWasm/JWasm211bd.zip) (from [japheth.de](https://www.japheth.de/JWasm.html)). -* The `DLINK` command for the DOS32 DOS Extender by Adam Seychell. This is hard to come by, but I got it from [here](https://hornet.org/cgi-bin/scene-search.cgi?search=AM). - * Look for "/code/pmode/dos32b35.zip" on that page. +``` +uasm -mz TPLSTSR4.ASM +``` -## Why DOS32? +It will warn about no stack being defined, but it should still produce a working `TPLSTSR4.EXE` in DOS `MZ` format. -One might wonder why I'm using an obscure DOS extender whose author has disappeared, and which is so hard to find. -Well, the reason is that it's the only __documented__ and __working__ way I could find to make a Protected-Mode TSR. +## How does it work? -In fact, this is why the source file is called `TPLSTSR3.ASM` – my _third_ attempt to make this settled on DOS32. The previous two attempts had been: +Unlike the old version (using the DOS32 extender), this is a normal Real Mode TSR. +However, it still manages to inject 32-bit Protected Mode code into Rayman. +It does this by attaching a payload to whichever `HMIDRV.386` sound driver Rayman is using (this is why it won't work if Rayman's sound isn't configured), and saving it into a temporary file. +Rayman is then directed to open this temporary file instead of the original file when looking for its sound driver. -1. Create a standard Real-Mode TSR hooking `int 2Fh` directly. -2. Use the well-documented [DPMI Resident Service interface](http://www.delorie.com/djgpp/doc/dpmi/ch4.8.html) to create a Protected-Mode TSR, hooking `int 31h AX=0300h`. - -The first attempt was quickly abandoned, since I realized there would be no good way to switch back to Protected Mode and find Rayman's data in memory. - -The second attempt showed more promise, until I realized that despite the extensive _documentation_, nobody has actually _implemented_ this lovely Resident Service interface! Yes, really! -At least, I haven't been able to find any implementations, and I found a forum post somewhere, where someone else in my situation wondered if these functions were just theoretical… - -So, I went with DOS32, since it has a documented and working TSR function, `int 31h AX=EE30h`. -In fact, with the experience gained writing this thing, I've come to realize that a normal DPMI client with plain old `int 21h AH=31h` -would probably work just as well, but we are where we are… +When Rayman loads the sound driver, it initially transfers control to the payload, which is able to communicate with the TSR's Real Mode stub. +The payload first sets up code and data segments for the actual sound driver, and then it sets up the hooks and overrides needed for TPLS itself. +It then transfers control to the real sound driver, which is able to operate normally. diff --git a/SED16BIN/FILE_ID.DIZ b/SED16BIN/FILE_ID.DIZ deleted file mode 100644 index fd1f5aa..0000000 --- a/SED16BIN/FILE_ID.DIZ +++ /dev/null @@ -1,5 +0,0 @@ -sed16bin.zip - HHsed, ver 1.6 binaries -16-bit and 32-bit versions of GNU sed, as -issued by Howard Helman & Walter Briscoe. -Fixes all the bugs in SED15, and supports -$1..$9 as word tokens like awk. diff --git a/SED16BIN/README.16X b/SED16BIN/README.16X deleted file mode 100644 index 0b38491..0000000 --- a/SED16BIN/README.16X +++ /dev/null @@ -1,21 +0,0 @@ -SED v1.6 31 Mar 2001 - -Included is the bare minimum for sed16 (executables, manual, and this file). - -For full details on its history and development, full source code, -etc., get sed16.zip. - -This would be public domain, except people keep *stealing* from the -public domain, copyrighting it as their own, and restricting the rest -of us from using it again. With that filthy, gods-cursed problem in -mind, I'll copyright this sucker for the original author, DK, h**2, -and me just to keep the wicked in line. - -You, Dear Reader, may do *anything* you wish with it except steal it. - -Copyright (c) 1991-2001 Eric S. Raymond, David P. Kirschbaum, Howard L. Helman, -Walter F. Briscoe -All Rights Reserved - -Walter Briscoe -walter@ponle.demon.co.uk diff --git a/SED16BIN/SED.COM b/SED16BIN/SED.COM deleted file mode 100755 index c26c60cb0438d15039288f17a5fe2514d4962f27..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25178 zcmc(HeSDME+5bs$=T4fw0;LFO3GYHFAjJYL)QU9~rzN6IiImhf6vUO5rAg~cY12i4 z^cMFxH-(?`nSHv=>D(Te_%rA;MY^?)&5h!w=r;8M#XH=H<*hAk$^H9Y=T6ds`usk> zzkW%Z+~@5&*SXI1cCK?y9zQ%kn2~JQzwq6u(tJIWGUu@;KI%A7`ndR7X)yDZ(%}5R zmdY8r-xusFmAa*42h^6~bH6!JdCRP&Mqi)*U4Q?F!IXWa2XySc6M;^1;KV>M^VQPF zKgv2K6|5|4Rhhot^cK?xDbfA(S(~&X;f6-6)gaVe_BJOg7B#65rB$@cA1(Q*-~b zRL%W0{(n^}&%VwsFJAg)Ij{VzR$0xsaG#pdhyQ{5cx$-LnJZFXkJpNRBG~%&Cdld2b0zG!_SEUc6kMlqAru%PFy_Th$bdAQgO*-kl zK&Pn4`5$<#(npyl(SH-`GN~MGuW6QAp`W7sVU}8kuQxmQ7rvoq?@sMJkjY-(R;mr{ zlo~QHyPTmiyh^3hjxwoPNK}1>Fw=zw@3V*YIP7Ke+PuK;#l(YNL--Uc3w>B-mv6Y% z=?wpi1qzOqGOw}yXsKcdnO~54yG5^qv2L*epGrmhv#yTkT)dJm!6E;XIRV7vkU!Ns zmFz&lHW%~GYAX_VOUK%FJnXQ`Z%lDYna{bpOiXKO5B&tWGp0D5fr7nm=1uGt@x>&s zpcn#O$$!l%3(BfjgEUjpU*2nnJZvp0Cna+@<(jLm|vCBD`PA7j@ zzrxvC;BoA9HyGsVgl>@@rA&{b+r*-SGlVCqfdY&Nqfb?-5z$5d&19#u<54#!%0Q&T zwZ0S73!F{|0UHEK2-+f2lfK(F$XH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U;d%Y@>i_s+h4@`d{FVT{?zz*>=FgZhgD1x6^@33Zm!yw3j#D#?WAs0{E9($iz*d=Ovz(ErEH$V;={ G^M3&Lfrr=t diff --git a/SED16BIN/SED.LST b/SED16BIN/SED.LST deleted file mode 100644 index 14e3e1d..0000000 --- a/SED16BIN/SED.LST +++ /dev/null @@ -1,662 +0,0 @@ - - - - SED(1) USER DOCUMENTATION SED(1) - - - NAME - sed - the stream editor - - SYNOPSIS - sed [-d] [-e script] [-f sfilename] [-g] [-I] [-n] [filename ] - - DESCRIPTION - sed reads each filename line by line, edits each line according to a script - of commands as specified by the -e and -f arguments and then copies the - edited line to the standard output. - - OPTIONS - The -d option causes debug messages to be written to stdout. The -e option - supplies a single edit command from the next argument; if there are several - of these they are executed in the order in which they appear. If there is - just one -e option and no -f's, the -e flag may be omitted. An -f option - causes commands to be taken from the file sfilename; if there are several - of these they are executed in the order in which they appear; -e and -f - commands may be mixed. The script or sfilename can be adjacent to the -e or - -f or can be the next argument on the command line. The -g option causes - sed to act as though every substitute command in the following script has - a g suffix. The -I option causes letter comparisons to ignore case. e.g., - with -I set, I and i match one another, otherwise they do not. The -n - option suppresses the default output. - - SCRIPTS - A script consists of one or more sed commands of the following form: - [address[,address]] function [arguments] - Normally sed cyclically copies a line of input into a current text buffer, - then applies in sequence all commands whose addresses select that line and - then copies the buffer to standard output and clears the buffer. The -n - option suppresses normal output so that only commands which do output (e.g. - p) cause any writing to occur. Also, some commands (n, N) do their own - line reads, and some others (o, d, D) cause all commands following in the - script to be skipped (the D command also suppresses the clearing of the - current text buffer that would normally occur before the next cycle). - There is also a second buffer (called the 'hold space' that can be copied - or appended to or from or swapped with the current text buffer. - - ADDRESSES - An address is: a decimal number (which matches that numbered line where - line numbers start at 1 and run cumulatively across files), or a '$' (which - matches the last line of input), or a '/regular expression/' (which matches - any line satisfying the expression. The following rules govern the address - matching: - - * A command line with no addresses selects every input line. - - * A command line with one address selects every input line that matches - that address. - - * A command line with two addresses selects the inclusive range from the - first input line that matches the first address up to and including - the next input that matches the second. (If the second address is a - - - - WFB Documentation 2001 March 31 1 - - - - - - SED(1) USER DOCUMENTATION SED(1) - - - number less than or equal to the line number first selected, only one - line is selected.) Once the second address is matched sed starts - looking for the first one again; thus, any number of these ranges will - be matched. - - * The second address may be in the form of '+number'. This means that - the command will stay selected for number lines after the first - address is satisfied. - - * \?regular expression? where ? is any character other than \ is - identical to /regular expression/. - - * The negation operator '!' preceding a function makes that function - apply to every line not selected by the address(es). - - FUNCTIONS - In the following list of functions, the maximum number of addresses - permitted for each function is indicated in parentheses. An argument - denoted 'text' consists of one or more lines, with all but the last ending - with '\' to hide the newline. A command with this type argument must be the - last on any command line or -e argument. Otherwise multiple commands may - appear on a line separated by ';' characters. A command may have a - trailing comment indicated by a '#' character. Comment lines begin with a - '#'. Backslashes in text are treated as described in 'escape sequences - below; they may be used to protect initial whitespace against the - stripping that is done on every line of the script. An argument denoted - 'label', 'rfile' or 'wfile' (which specify labels or file names) is not - processed for 'escape sequences'. Therefore a ';' or '#' terminates the - label or file name. This simplifies entering DOS style paths. Each 'wfile' - is created before processing begins. There can be at most 10 distinct - 'wfile' arguments. - - (1) a text Append the 'text' on output before reading the next input - line. - - (2) b [label] Branch to the ':' command with the given 'label'. If no - 'label' is given, branch to the end of the script. - - (2) c text Change lines by deleting the current text buffer and at the - end of the address range, place 'text' on the output. - Start the next input cycle. - - (2) d Delete the current text buffer. Start the next input cycle. - - (2) D Delete the first line of the current text buffer (all - characters up to the first newline). Start the next input - cycle. - - (2) g Replace the contents of the current text buffer with the - contents of the hold space. - - (2) G Append the contents of the hold space to the current text - buffer. - - - - - WFB Documentation 2001 March 31 2 - - - - - - SED(1) USER DOCUMENTATION SED(1) - - - (2) h Copy the current text buffer into the hold space. - - (2) H Append a copy of the current text buffer to the hold space. - - (1) i text Insert the 'text' on the standard output. - - (2) l [w[file]] List current text buffer on standard output or to a file if - the -w option follows. Non ASCII printable characters are - expanded as shown in the 'escape sequence' section below. - - (2) n Copy the current text buffer to standard output. Read the - next line of input into it. The current line number - changes. - - (2) N Append the next line of input to the current text buffer, - inserting an embedded newline between the two. The current - line number changes. - - (2) p Copy the current text buffer to the standard output. - - (2) P Copy the first line of the current text buffer (all - characters up to the first newline) to standard output. - - (1) q Quit. Perform any pending outputs (a or r commands) and - terminate sed. - - (1) r rfile Read the contents of 'rfile'. Place them on the output - before reading the next input line. - - (2) s /regular expression/replacement/flags - Substitute the 'replacement' for instances of the 'regular - expression' in the current text buffer. Any character - except '\' may be used instead of '/'. An empty regular - expression is substituted by the last regular expression - used. (This is evaluated at run-time.) In the replacement - expression' and in the 'replacement' \1 - \9 are used to - indicate the nth subexpression indicated by a '\(...\)' - expression in the 'regular expression'. In the replacement - text an & may be used to indicate the entire matched - expression and the following modifying prefixes may be - applied to & and \1 - \9. - - \l (\u) - convert the next character to lowercase - (uppercase) if uppercase (lowercase). - - \L (\U) - convert uppercase (lowercase) characters to - lowercase (uppercase) until /e or /E or the - end of the replacement string is encountered. - - In the replacement, $0 means the original line, $i (i=1..9) - means word i. If there are less than i words then $i is an - empty string. Words have the same meaning as in \< and \>. - - If the replacement text consists only of the trigraph - '\\~', a copy of the replacement from the previous s - - - WFB Documentation 2001 March 31 3 - - - - - - SED(1) USER DOCUMENTATION SED(1) - - - command is used as the replacement for this command. Note, - an earlier version of sed used '%' for this purpose. '~' - would be preferred as it is used for this in the ex editor. - However, that breaks Greg Ubben's masterly dc.sed and it - would not be reasonable to do so. '\~' is used for this in - ex when the magic option is not set. The extra '\' is - needed to fight through slash doubling. - - 'Flags' are any of the following options, with the following - provisos: if present w must be the last one; only the last - of either p or P is used; and only the last 'n' is used. - - g - Global. Substitute for all nonoverlapping instances - of the 'RE' rather than just the first one. - - I - (Yes, it is a capital). Use case insensitive matching - when comparing letters in the regular expression with - letters in the current text buffer. - - n - Where n can be 1 through 2048. Perform only the nth - replacement. If g is also set or the -g option is - selected, this option means that the nth and all - succeeding substitutions are performed. - - p - Print the current text buffer if a replacement is made. - - P - Print the first line of the current text buffer if a - replacement is made. - w[wfile] - Append the current text buffer to the file - argument as in a w command if a replacement is made. - Standard output is used if no file argument is given. - - (2) t [label] Branch to the ':' command with the given 'label' if any s - commands made any substitutions since the most recent read - of an input line or execution of a t or T. If no 'label' - is given, branch to the end of the script. - - (2) T [label] Branch to the ':' command with the given 'label' if no s - commands have succeeded since the last input line or t or T - command. Branch to the end of the script if no 'label' is - given. - - (2) w [wfile] Write the current text buffer to 'wfile'. If no 'wfile' is - given standard output is used. - - (2) W [wfile] Write the first line of the current text buffer to 'wfile'. - If no 'wfile' is given standard output is used. - - (2) x Exchange the contents of the current text buffer and hold - space. - - (2) y /string1/string2/ - Translate. Replace each occurrence of a character in - string1 with the corresponding character in string2. The - '/' may be any character not in 'string1' or 'string2'. - The lengths of the two strings must be equal. - - WFB Documentation 2001 March 31 4 - - - - - - SED(1) USER DOCUMENTATION SED(1) - - - (2) ! function All-but. Apply the function (or group, if function is '{') - only to lines not selected by the address(es). - - (0) : label This command defines a label for b T and t commands. - - (1) = Write a line containing the current line number to the - standard output. - - (2) { Execute the following commands through a matching '}' only - when the current line matches the address or address range - given. - - (0) } The { command marks the end of a grouping started by a '{'. - - (0) An empty command is ignored. - - ESCAPE SEQUENCES - The following escape sequences are used to represent unprintable characters - in 'text', 'regular expressions' and 'replacement' text. It is ignored in - 'labels' and 'file's. If the character following the '\ 'is not list below - the '\' causes the character to be quoted during script input. The l - command also uses this convention. - - \a - bell (ASCII 07) - \b - backspace (ASCII 08) - \e - escape (ASCII 27) - \f - formfeed (ASCII 12) - \n - newline (ASCII 10) - \r - return (ASCII 13) - \t - tab (ASCII 09) - \v - verticaltab(ASCII 11) - \xhh - the ASCII character corresponding to 2 hex digits hh. - \\ - the backslash itself. - - REGULAR EXPRESSIONS ('REs') - Regular expressions can be built up from the following "single-character" - 'RE's: - - c Any ordinary character not listed below. An ordinary character - matches itself. - - \ Backslash. When followed by a special character the 'RE' matches - the "quoted character" as listed in 'Escape Sequences' above. A - backslash followed by one of <,>,(,),{,} or 0...9 represents an - 'operator' in a regular expression, as described below. - - . Dot. Matches any single character except the NEWLINE at the end - of a line. - - ^ Caret. As the leftmost character in an 'RE' this constrains the - pattern to be an anchored match. That is it must match anchored - at the first character in the line. In any other position the ^ - is an ordinary character. - - - - - WFB Documentation 2001 March 31 5 - - - - - - SED(1) USER DOCUMENTATION SED(1) - - - $ The dollar sign as the rightmost character in an 'RE' matches the - NEWLINE at the end of the line. At any other position the $ is an - ordinary character. - - ^RE$ This requires the 'RE' to match the entire buffer. - - [c...] A nonempty string of characters enclosed by square brackets - matches any single character in the string except the NEWLINE at - the end of the string. If the first character of the string is a - caret (^), then the 'RE' matches any character not in the string - except the NEWLINE at the end of the string. A '-' sign may be - used to express ranges of characters. For example the range '[0- - 9]' is equivalent to the string '[0123456789]'. The '-' is - treated as an ordinary character if it occurs in the string at a - position that can not be part of a range. This construct is - called 'set definition'. - - \{m\} - \{m,\} - \{m,n\\} When any of these constructs follow an ordinary character, a dot, - a 'set definition' or the '\n' construct. This construct matches - the previous construct for a range of occurrences. At least m - occurrences will be matched and at most n. "\{m,\}" matches at - least m occurrences and "\{m}" matches exactly m. m and n are - numbers between 0 and 255 inclusive and m must not exceed n. - - * When this follows an ordinary character, a dot, a 'set - definition' or the '\n' construct, this 'RE' matches 0 or more - occurrences of that construct. This pattern is called a - 'closure'. - - + This pattern is similar to the star above but matches one or more - occurrences of the previous construct. - - \< The sequence \< in an 'RE' requires that the scan position in the - line must be immediately following a character that can not be - part of a "word" and immediately preceding a character that can - be part of a "word". In this context a "word" is any sequence of - upper and lowercase letters, a numeral [0-9] or the underscore - character (_). - - \> The sequence \> in an 'RE' requires that the scan position in the - line must be immediately following a character that can be part - of a "word" and immediately preceding a character that can not be - part of a "word". - - \(...\) An 'RE' enclosed between the character sequences \( and \) - matches whatever the unadorned 'RE' matches, but saves the string - matched by the enclosed RE in a numbered substring register. - There can be up to nine such substrings in an 'RE', and the - parenthesis operators can be nested. - - \n Match the contents on the nth substring register. When nested - substrings are present, 'n' is determined by counting the - occurrences of \( starting from the left. - - - WFB Documentation 2001 March 31 6 - - - - - - SED(1) USER DOCUMENTATION SED(1) - - - // The empty 'RE' (//) is equivalent to the last 'RE' encountered in - the input processing. - - ERROR MESSAGES - The following error messages may appear during the sed compilation phase. - All cause sed to terminate: - - sed: backslash ends script -- The last compiled line ended "\" - - sed: bad expression 'hh' -- The escape sequence of "\x" did was not - followed by two hex digits - - sed: bad RE code 'x' -- A mistake was noted in the storage of a regular - expression by the sed program itself - - sed: bad value for match count on s command 'command' -- A maximum value of - 2048 is allowed for 'n' on an s command. - - sed: can only fit 'size' byte line -- An internal buffer is not big enough - to hold a command in your program. - - sed: cannot create 'file' -- The listed output file could not be opened - - sed: cannot open 'file' -- The 'file' on an -f argument or a data file - could not be opened - - sed: command "command" has trailing garbage -- Command was not terminated - properly - - sed: duplicate label 'label' -- The indicated 'label' appeared on more than - one ':' command - - sed: error processing: 'argument' -- The 'argument' is incorrect either a - file name was missing or the g or n options had trailing garbage - - sed: garbled address 'command' -- Improper 'regular expression' in an - address, line number in an address or + used in first address - - sed: garbled command 'command' -- Error in the construction of the 'regular - expression' or 'replacement' in an s command, an ill-formed y command - or a 'null' character was found - - sed: garbled range 'command' -- A [...'x'-'y'...] construct was found - where y