Contents
1 Introduction
1.1 Copyright & source-code license
1.2 Obtaining scsh
1.3 Building scsh
1.4 Caveats
1.5 Naming conventions
1.6 Lexical issues
1.6.1 Extended symbol syntax
1.6.2 Extended string syntax
1.6.3 Block comments and executable interpreter-triggers
1.6.4 Here-strings
1.6.4.1 Character-delimited here-strings
1.6.4.2 Line-delimited here-strings
1.6.5 Dot
1.7 Record types and the define-record form
1.8 A word about Unix standards
2 Process notation
2.1 Extended process forms and I/O redirections
2.1.1 Port and file descriptor sync
2.2 Process forms
2.3 Using extended process forms in Scheme
2.3.1 Procedures and special forms
2.3.2 Interfacing process output to Scheme
2.4 More complex process operations
2.4.1 Pids and ports together
2.4.2 Multiple stream capture
2.5 Conditional process sequencing forms
2.6 Process filters
3 System Calls
3.1 Errors
3.1.1 Interactive mode and error handling
3.2 I/O
3.2.1 Standard R5RS I/O procedures
3.2.2 Port manipulation and standard ports
3.2.3 String ports
3.2.4 Revealed ports and file descriptors
3.2.5 Port-mapping machinery
3.2.6 Unix I/O
3.2.7 Buffered I/O
3.2.8 File locking
3.3 File system
3.4 Processes
3.4.1 Process objects and process reaping
3.4.1.1 Issues with process reaping
3.4.2 Process waiting
3.4.3 Analysing process status codes
3.5 Process state
3.6 User and group database access
3.7 Accessing command-line arguments
3.8 System parameters
3.9 Signal system
3.9.0.1 Interrupt handlers
3.10 Time
3.10.1 Terminology
3.10.2 Basic data types
3.10.3 Time zones
3.10.4 Procedures
3.11 Environment variables
3.11.1 Path lists and colon lists
3.11.2 $USER, $HOME, and $PATH
3.12 Terminal device control
3.12.1 Portability across OS variants
3.12.2 Miscellaneous procedures
3.12.3 The tty-info record type
3.12.3.1 The control-characters string
3.12.3.2 The flag fields
3.12.3.3 The speed fields
3.12.3.4 The min and time fields
3.12.4 Using tty-info records
3.12.5 Other terminal-device procedures
3.12.6 Control terminals, sessions, and terminal process groups
3.12.7 Pseudo-terminals
4 Networking
4.1 High-level interface
4.2 Sockets
4.3 Socket addresses
4.4 Socket primitives
4.5 Performing input and output on sockets
4.6 Socket options
4.7 Database-information entries
5 Strings and characters
5.1 Manipulating file names
5.1.1 Terminology
5.1.2 Procedures
5.2 Other string manipulation facilities
5.3 ASCII encoding
5.4 Character predicates
5.5 Deprecated character-set procedures
6 Pattern-matching strings with regular expressions
6.1 Summary SRE syntax
6.2 Examples
6.3 A short tutorial
Constant strings
Simple character sets
Wild card
Sequences
Choices
Repetition
Character classes
Case sensitivity
Dynamic regexps
String and line units
Posix string notation
Deleted submatches
6.3.1 Embedding regexps within Scheme programs
6.3.1.1 Static and dynamic regexps
6.4 Regexp functions
6.4.1 Obsolete, deprecated procedures
6.4.2 Standard procedures and syntax
6.5 The regexp ADT
6.6 Syntax-hacking tools
8 Awk, record I/O, and field parsing
8.1 Record I/O and field parsing
8.1.1 Reading records
8.1.2 Parsing fields
8.1.3 Field readers
8.1.4 Forward-progress guarantees and empty-string matches
8.1.5 Reader limitations
8.2 Awk
8.2.1 Examples
8.3 Backwards compatibility
9 Concurrent system programming
9.1 Threads
9.2 Locks
9.3 Placeholders
9.4 The event interface to interrupts
9.5 Interaction between threads and process state
10 Miscellaneous routines
10.1 Integer bitwise ops
10.2 Password encryption
10.3 Dot-Locking
10.4 Syslog facility
10.5 MD5 interface
10.6 Configuration variables
11 Running scsh
11.1 Scsh command-line switches
11.1.1 Scripts and programs
11.1.2 Inserting interpreter triggers into scsh programs
11.1.3 Module system
11.1.3.1 Module warning
11.1.4 Library directories search facility
11.1.5 Switches
11.1.6 The meta argument
11.1.6.1 Secondary argument syntax
11.1.7 Examples
11.1.8 Process exit values
11.2 The scsh virtual machine
11.2.1 VM arguments
11.2.1.1 VM options
11.2.1.2 End options
11.2.2 Stripped image
11.2.3 Inserting interpreter triggers into heap images
11.2.4 Inserting a double-level trigger into Scheme programs
11.3 Compiling scsh programs
11.4 Standard file locations