File:  [CSRG BSD Unix] / 43BSD / contrib / icon / man / man2 / snapshot.2
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:55 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

.so tmac.ilib
.TH SNAPSHOT 2 "The University of Arizona \- 4/9/83"
.SH NAME
snapshot \- snapshot of state of string scanning
.SH DESCRIPTION
The procedure \*Msnapshot()\fR writes a snapshot of the state of string
scanning, showing the value of \*M&subject\fR and \*M&pos\fR. For
example,
.DS
"((a+b)\-delta)/(c*d))" ? (tab(bal('+\-/*')) & snapshot())
.DE
produces
.DS
.CS
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|                                   |
| &subject = "((a+b)\-delta)/(c*d))" |
|                          |        |
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
.CE
.DE
Note that the bar showing the \*M&pos\fR is positioned under the
\*M&pos\fRth character (actual positions are between characters).
If \*M&pos\fR is at the end of \*M&subject\fR, the bar is positioned
under the quotation mark delimiting the subject. For example,
.DS
"abcdefgh" ? (tab(0) & snapshot())
.DE
produces
.DS
.CS
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|                       |
| &subject = "abcdefgh" |
|                     | |
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
.CE
.DE
Escape sequences are handled properly. For example,
.DS
"abc\etdef\enghi" ? (tab(upto('\en')) & snapshot())
.DE
produces
.DS
.CS
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|                            |
| &subject = "abc\etdef\enghi" |
|                     |      |
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
.CE
.DE
.SH AUTHOR
Ralph E. Griswold

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.