| #!/usr/local/bin/perl5 | |
| 'di'; | |
| 'ig00'; | |
| # | |
| # $Header$ | |
| # | |
| # $Log$ | |
| # untads -- Extract user-readable text from TADS source files | |
| # for spell-checking or proofreading | |
| # by Matthew Amster-Burton, mamster@u.washington.edu | |
| # Last revision: 0.2, 11/4/96 | |
| # placed in the public domain | |
| # usage: | |
| # untads file.t > output.txt | |
| # OR untads file.t | spell | |
| $/ = 0777; | |
| while( <> ) { # Actually slurping whole file | |
| s#/\*.*\*/##gs; # Kill C comments | |
| s#//.*\n#\n#g; # Kill C++ comments | |
| s/<<.*?>>//g; # Kill variable includes | |
| s/%\w+%//g; # Kill format strings | |
| s/\\'/##apostrophe##/g; | |
| s/\\./ /g; # Kill escape sequences (and apostrophes...) | |
| s/\n[\t ]+/\n/g; # Kill line indents | |
| while( /'([^']*)'|"([^"]*)"/go ) { # q// or qq// | |
| $tmp = $1 . $2; | |
| $tmp =~ s/##apostrophe##/'/; | |
| print "$tmp\n"; | |
| } | |
| } | |
| ############################################################### | |
| # These next few lines are legal in both Perl and nroff. | |
| .00; # finish .ig | |
| 'di \" finish diversion--previous line must be blank | |
| .nr nl 0-1 \" fake up transition to first page again | |
| .nr % 0 \" start at page 1 | |
| '; __END__ ##### From here on it's a standard manual page ##### | |
| .TH UNTADS 1 "November 29, 1995" | |
| .AT 3 | |
| .SH NAME | |
| untads \- whatever | |
| .SH SYNOPSIS | |
| .B untads [options] [files] | |
| .SH DESCRIPTION | |
| .I untads | |
| extracts user-visible text from a TADS code (.t) file. | |
| .SH ENVIRONMENT | |
| No environment variables are used. | |
| .SH FILES | |
| None. | |
| .SH AUTHOR | |
| Matthew Amster | |
| .SH "SEE ALSO" | |
| .SH DIAGNOSTICS | |
| .SH BUGS | |
| Takes a bunch o' memory. | |
Xet Storage Details
- Size:
- 1.66 kB
- Xet hash:
- 32a0ad7c4dbd2b2f9c42ebc4d44fdf9937459c0c3df5887af5ff2aac3e5df71a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.