annotate src/fftw-3.3.8/doc/FAQ/m-post.pl @ 82:d0c2a83c1364

Add FFTW 3.3.8 source, and a Linux build
author Chris Cannam
date Tue, 19 Nov 2019 14:52:55 +0000
parents
children
rev   line source
Chris@82 1 ## POST output
Chris@82 2 # Copyright (C) 1993-1995 Ian Jackson.
Chris@82 3
Chris@82 4 # This file is free software; you can redistribute it and/or modify
Chris@82 5 # it under the terms of the GNU General Public License as published by
Chris@82 6 # the Free Software Foundation; either version 2, or (at your option)
Chris@82 7 # any later version.
Chris@82 8
Chris@82 9 # It is distributed in the hope that it will be useful,
Chris@82 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@82 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@82 12 # GNU General Public License for more details.
Chris@82 13
Chris@82 14 # You should have received a copy of the GNU General Public License
Chris@82 15 # along with GNU Emacs; see the file COPYING. If not, write to
Chris@82 16 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Chris@82 17 # Boston, MA 02111-1307, USA.
Chris@82 18
Chris@82 19 # (Note: I do not consider works produced using these BFNN processing
Chris@82 20 # tools to be derivative works of the tools, so they are NOT covered
Chris@82 21 # by the GPL. However, I would appreciate it if you credited me if
Chris@82 22 # appropriate in any documents you format using BFNN.)
Chris@82 23
Chris@82 24 sub post_init {
Chris@82 25 open(POST,">$prefix.post");
Chris@82 26 }
Chris@82 27
Chris@82 28 sub post_startmajorheading {
Chris@82 29 print POST '='x79,"\n\n";
Chris@82 30 $post_status= 'h';
Chris@82 31 &post_text($_[0] ? "Section $_[0]. " : '');
Chris@82 32 }
Chris@82 33
Chris@82 34 sub post_startminorheading {
Chris@82 35 print POST '-'x77,"\n\n";
Chris@82 36 $post_status= 'h';
Chris@82 37 }
Chris@82 38
Chris@82 39 sub post_italic { &post_text('*'); }
Chris@82 40 sub post_enditalic { $post_para .= '*'; }
Chris@82 41
Chris@82 42 sub post_email { &post_text('<'); } sub post_endemail { &post_text('>'); }
Chris@82 43
Chris@82 44 sub post_ftpon { } sub post_endftpon { }
Chris@82 45 sub post_ftpin { } sub post_endftpin { }
Chris@82 46 sub post_docref { } sub post_enddocref { }
Chris@82 47 sub post_courier { } sub post_endcourier { }
Chris@82 48 sub post_newsgroup { } sub post_endnewsgroup { }
Chris@82 49 sub post_ftpsilent { $post_ignore++; }
Chris@82 50 sub post_endftpsilent { $post_ignore--; }
Chris@82 51
Chris@82 52 sub post_text {
Chris@82 53 return if $post_ignore;
Chris@82 54 if ($post_status eq '') {
Chris@82 55 $post_status= 'p';
Chris@82 56 }
Chris@82 57 $post_para .= $_[0];
Chris@82 58 }
Chris@82 59
Chris@82 60 sub post_tab {
Chris@82 61 local ($n) = $_[0]-length($post_para);
Chris@82 62 $post_para .= ' 'x$n if $n>0;
Chris@82 63 }
Chris@82 64
Chris@82 65 sub post_newline {
Chris@82 66 return unless $post_status eq 'p';
Chris@82 67 &post_writepara;
Chris@82 68 }
Chris@82 69
Chris@82 70 sub post_writepara {
Chris@82 71 local ($thisline, $thisword, $rest);
Chris@82 72 for (;;) {
Chris@82 73 last unless $post_para =~ m/\S/;
Chris@82 74 $thisline= $post_indentstring;
Chris@82 75 for (;;) {
Chris@82 76 last unless $post_para =~ m/^(\s*\S+)/;
Chris@82 77 unless (length($1) + length($thisline) < 75 ||
Chris@82 78 length($thisline) == length($post_indentstring)) {
Chris@82 79 last;
Chris@82 80 }
Chris@82 81 $thisline .= $1;
Chris@82 82 $post_para= $';
Chris@82 83 }
Chris@82 84 $post_para =~ s/^\s*//;
Chris@82 85 print POST $thisline,"\n";
Chris@82 86 $post_indentstring= $post_nextindent;
Chris@82 87 last unless length($post_para);
Chris@82 88 }
Chris@82 89 $post_status= ''; $post_para= '';
Chris@82 90 }
Chris@82 91
Chris@82 92 sub post_endpara {
Chris@82 93 return unless $post_status eq 'p';
Chris@82 94 &post_writepara;
Chris@82 95 print POST "\n";
Chris@82 96 }
Chris@82 97
Chris@82 98 sub post_endheading {
Chris@82 99 $post_para =~ s/\s*$//;
Chris@82 100 print POST "$post_para\n\n";
Chris@82 101 $post_status= '';
Chris@82 102 $post_para= '';
Chris@82 103 }
Chris@82 104
Chris@82 105 sub post_endmajorheading { &post_endheading(@_); }
Chris@82 106 sub post_endminorheading { &post_endheading(@_); }
Chris@82 107
Chris@82 108 sub post_startverbatim {
Chris@82 109 $post_vstatus= $post_status;
Chris@82 110 &post_writepara;
Chris@82 111 }
Chris@82 112
Chris@82 113 sub post_verbatim {
Chris@82 114 print POST $_[0],"\n";
Chris@82 115 }
Chris@82 116
Chris@82 117 sub post_endverbatim {
Chris@82 118 $post_status= $post_vstatus;
Chris@82 119 }
Chris@82 120
Chris@82 121 sub post_finish {
Chris@82 122 close(POST);
Chris@82 123 }
Chris@82 124
Chris@82 125 sub post_startindex { $post_status= ''; }
Chris@82 126 sub post_endindex { $post_status= 'p'; }
Chris@82 127
Chris@82 128 sub post_endindexitem {
Chris@82 129 printf POST " %-11s %-.66s\n",$post_left,$post_para;
Chris@82 130 $post_status= 'p';
Chris@82 131 $post_para= '';
Chris@82 132 }
Chris@82 133
Chris@82 134 sub post_startindexitem {
Chris@82 135 $post_left= $_[1];
Chris@82 136 }
Chris@82 137
Chris@82 138 sub post_startindexmainitem {
Chris@82 139 $post_left= $_[1];
Chris@82 140 print POST "\n" if $post_status eq 'p';
Chris@82 141 }
Chris@82 142
Chris@82 143 sub post_startindent {
Chris@82 144 $post_istatus= $post_status;
Chris@82 145 &post_writepara;
Chris@82 146 $post_indentstring= " $post_indentstring";
Chris@82 147 $post_nextindent= " $post_nextindent";
Chris@82 148 }
Chris@82 149
Chris@82 150 sub post_endindent {
Chris@82 151 $post_indentstring =~ s/^ //;
Chris@82 152 $post_nextindent =~ s/^ //;
Chris@82 153 $post_status= $post_istatus;
Chris@82 154 }
Chris@82 155
Chris@82 156 sub post_startpackedlist { $post_plc=0; }
Chris@82 157 sub post_endpackedlist { &post_newline if !$post_plc; }
Chris@82 158 sub post_packeditem {
Chris@82 159 &post_newline if !$post_plc;
Chris@82 160 &post_tab($post_plc*40+5);
Chris@82 161 $post_plc= !$post_plc;
Chris@82 162 }
Chris@82 163
Chris@82 164 sub post_startlist {
Chris@82 165 &post_endpara;
Chris@82 166 $post_indentstring= " $post_indentstring";
Chris@82 167 $post_nextindent= " $post_nextindent";
Chris@82 168 }
Chris@82 169
Chris@82 170 sub post_endlist {
Chris@82 171 &post_endpara;
Chris@82 172 $post_indentstring =~ s/^ //;
Chris@82 173 $post_nextindent =~ s/^ //;
Chris@82 174 }
Chris@82 175
Chris@82 176 sub post_item {
Chris@82 177 &post_newline;
Chris@82 178 $post_indentstring =~ s/ $/* /;
Chris@82 179 }
Chris@82 180
Chris@82 181 sub post_pageref {
Chris@82 182 &post_text("Q$_[1] \`");
Chris@82 183 }
Chris@82 184
Chris@82 185 sub post_endpageref {
Chris@82 186 &post_text("'");
Chris@82 187 }
Chris@82 188
Chris@82 189 1;