Annotation of loncom/interface/lonprintout.pm, revision 1.55
1.1 www 1: # The LearningOnline Network
2: # Printout
3: #
1.55 ! sakharuk 4: # $Id: lonprintout.pm,v 1.54 2002/09/05 15:51:07 sakharuk Exp $
1.11 albertel 5: #
6: # Copyright Michigan State University Board of Trustees
7: #
8: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
9: #
10: # LON-CAPA is free software; you can redistribute it and/or modify
11: # it under the terms of the GNU General Public License as published by
12: # the Free Software Foundation; either version 2 of the License, or
13: # (at your option) any later version.
14: #
15: # LON-CAPA is distributed in the hope that it will be useful,
16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18: # GNU General Public License for more details.
19: #
20: # You should have received a copy of the GNU General Public License
21: # along with LON-CAPA; if not, write to the Free Software
22: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23: #
24: # /home/httpd/html/adm/gpl.txt
25: #
26: # http://www.lon-capa.org/
27: #
1.1 www 28: # (Internal Server Error Handler
29: #
30: # (Login Screen
31: # 5/21/99,5/22,5/25,5/26,5/31,6/2,6/10,7/12,7/14,
32: # 1/14/00,5/29,5/30,6/1,6/29,7/1,11/9 Gerd Kortemeyer)
33: #
34: # 3/1/1 Gerd Kortemeyer)
35: #
36: # 3/1 Gerd Kortemeyer
37: #
1.3 sakharuk 38: # 9/17 Alex Sakharuk
39: #
1.1 www 40: package Apache::lonprintout;
41:
42: use strict;
1.10 albertel 43: use Apache::Constants qw(:common :http);
1.2 sakharuk 44: use Apache::lonxml;
45: use Apache::lonnet;
1.54 sakharuk 46: use Apache::loncommon;
1.13 sakharuk 47: use Apache::inputtags;
1.54 sakharuk 48: use Apache::loncoursedata;
49: use Apache::grades;
1.13 sakharuk 50: use Apache::edit;
1.5 sakharuk 51: use Apache::File();
1.34 sakharuk 52: use POSIX qw(strftime);
1.3 sakharuk 53:
54:
55: sub headerform {
1.1 www 56: my $r = shift;
1.3 sakharuk 57: $r->print(<<ENDHEADER);
58: <html>
59: <head>
60: <title>LON-CAPA output for printing</title>
61: </head>
62: <body bgcolor="FFFFFF">
63: <form method="post" enctype="multipart/form-data" action="/adm/printout" name="printform">
1.38 www 64: <tt>$ENV{'form.postdata'}</tt><p>
1.16 sakharuk 65: <h1>What do you want to print? Make a choice.</h1><br />
1.3 sakharuk 66: ENDHEADER
67: }
68:
1.1 www 69:
1.3 sakharuk 70: sub menu_for_output {
71: my $r = shift;
1.28 sakharuk 72: $r->print(<<ENDMENUOUT1);
1.3 sakharuk 73: <input type="hidden" name="phase" value="two">
1.10 albertel 74: <input type="hidden" name="url" value="$ENV{'form.postdata'}">
1.25 sakharuk 75: <input type="radio" name="choice" value="Standard LaTeX output for current document" checked> Current document
1.16 sakharuk 76: (you will print what you see on the screen)<br />
1.39 sakharuk 77: ENDMENUOUT1
1.48 sakharuk 78: if ((not $ENV{'request.role'}=~m/^au\./) and (not $ENV{'request.role'}=~m/^ca\./)) {
1.52 sakharuk 79: $r->print(<<ENDMENUOUT2);
1.19 sakharuk 80: <input type="radio" name="choice" value="Standard LaTeX output for the primary sequence"> All problems from the primary sequence<br />
1.20 sakharuk 81: <input type="radio" name="choice" value="Standard LaTeX output for whole primary sequence"> The whole primary sequence (problems plus all html and xml files)<br />
1.19 sakharuk 82: <input type="radio" name="choice" value="Standard LaTeX output for the top level sequence"> All problems from the top level sequence<br />
1.28 sakharuk 83: <br />
84: ENDMENUOUT2
1.44 sakharuk 85: }
1.52 sakharuk 86: if ($ENV{'request.role'}=~m/^cc\./ or $ENV{'request.role'}=~m/^in\./ or $ENV{'request.role'}=~m/^ta\./) {
87: $r->print(<<ENDMENUOUT6);
1.55 ! sakharuk 88: <input type="radio" name="choice" value="All class print"> Print assignment (all problems from the primary sequence) for group of students<br /><br />
1.52 sakharuk 89: ENDMENUOUT6
90: }
1.39 sakharuk 91: my $subdirtoprint = &Apache::lonnet::filelocation("",$ENV{'form.url'});
92: $subdirtoprint =~ s/\/[^\/]+$//;
93: if (&Apache::lonnet::allowed('bre',$subdirtoprint) eq 'F') {
94: $r->print(<<ENDMENUOUT4);
95: <input type="radio" name="choice" value="Subdirectory print"> All problems from current subdirectory (where this particular problem is)<br />
96: ENDMENUOUT4
97: }
98: $r->print(<<ENDMENUOUT5);
1.16 sakharuk 99: <br /><hr /><br />
100: <h1>And what page format do you prefer?</h1>
1.36 sakharuk 101: <table>
102: <tr>
103: <td>
104: <input type="radio" name="layout" value="CBI"> Landscape <br />
105: <input type="radio" name="layout" value="CAPA" checked> Portrait <br />
106: </td>
107: <td> </td>
108: <td rawspan="2">
1.44 sakharuk 109: Number of columns: <select name="numberofcolumns">
110: <option selected> 1 </option>
111: <option> 2 </option>
112: <option> 3 </option>
113: <option> 4 </option>
114: <option> 5 </option>
115: <option> 6 </option>
116: <option> 7 </option>
117: <option> 8 </option>
118: <option> 9 </option>
119: </select>
1.36 sakharuk 120: </td>
121: </tr>
122: </table>
123: </br>
1.16 sakharuk 124: <input type="submit" value="Submit your choice">
1.52 sakharuk 125: ENDMENUOUT5
126: }
127:
128:
129: sub additional_class_menu {
130: my $r = shift;
131: $r->print(<<ENDMENUOUT1);
132: <input type="hidden" name="url" value="$ENV{'form.url'}">
133: <input type="hidden" name="choice" value="$ENV{'form.choice'}">
134: <input type="hidden" name="layout" value="$ENV{'form.layout'}">
135: <input type="hidden" name="numberofcolumns" value="$ENV{'form.numberofcolumns'}">
136: <h1>Mark students which assignments you want to print</h1>
137: ENDMENUOUT1
138: my $c = $r->connection;
139: my %cache;
1.54 sakharuk 140: my $courseID = $ENV{'request.course.id'};
141: my $classlist = &Apache::loncoursedata::DownloadClasslist($courseID,$cache{'ClasslistTimestamp'},$c);
142: &Apache::loncoursedata::ProcessClasslist(\%cache,$classlist,$courseID,$c);
143: my @all_students = split(':::',$cache{'NamesOfStudents'});
144: my @active_students = ();
145: foreach my $student (@all_students) {
146: if ($cache{$student.':Status'} eq 'Active') {
147: push @active_students,$student;
148: }
1.52 sakharuk 149: }
1.54 sakharuk 150: my $what_to_print = '<table border="1">';
151: my $i = 0;
152: foreach my $student (@active_students) {
153: $what_to_print .= '<tr><td><input type="checkbox" name="whomtoprint'.$i.'" value="'.$student.'">'.$cache{$student.':fullname'}.'</td></tr>';
154: # $what_to_print .= '<tr><td><input type="checkbox" name="whomtoprint'.$i.'" value="'.$cache{$student.':fullname'}.'">'.$cache{$student.':fullname'}.'</td></tr>';
155: $i++;
1.52 sakharuk 156: }
1.54 sakharuk 157: $what_to_print .= '</table>';
1.52 sakharuk 158: $r->print(<<ENDMENUOUT2);
1.54 sakharuk 159: $what_to_print <br />
160: <input type="hidden" name="numberofstudents" value="$i">
1.52 sakharuk 161: <input type="hidden" name="phase" value="three">
162: <input type="submit" value="Submit">
163: ENDMENUOUT2
164: }
165:
166:
167: sub additional_print_menu {
168: my $r = shift;
1.54 sakharuk 169: my $what_to_print = '';
170: for (my $i=0; $i<$ENV{'form.numberofstudents'};$i++) {
171: $what_to_print .= '<input type="hidden" name="whomtoprint'.$i.'" value="'.$ENV{'form.whomtoprint'.$i}.'">';
172: }
1.52 sakharuk 173: $r->print(<<ENDMENUOUT);
1.54 sakharuk 174: $what_to_print
1.52 sakharuk 175: <input type="hidden" name="url" value="$ENV{'form.url'}">
176: <input type="hidden" name="choice" value="$ENV{'form.choice'}">
177: <input type="hidden" name="layout" value="$ENV{'form.layout'}">
1.54 sakharuk 178: <input type="hidden" name="numberofstudents" value="$ENV{'form.numberofstudents'}">
1.52 sakharuk 179: <input type="hidden" name="numberofcolumns" value="$ENV{'form.numberofcolumns'}">
180: Enter width of the page: <input type="text" name="width" width="10" value="9cm"> <br />
181: <input type="hidden" name="phase" value="four">
182: <input type="submit" value="Submit">
1.3 sakharuk 183: </form>
184: </body>
185: </html>
1.52 sakharuk 186: ENDMENUOUT
1.3 sakharuk 187: }
1.2 sakharuk 188:
189:
1.3 sakharuk 190: sub output_data {
191: my $r = shift;
192: $r->print(<<ENDPART);
193: <html>
194: <head>
195: <title>LON-CAPA output for printing</title>
196: </head>
197: <body bgcolor="FFFFFF">
198: <hr>
199: ENDPART
1.2 sakharuk 200:
1.3 sakharuk 201: my $choice = $ENV{'form.choice'};
1.16 sakharuk 202: my $layout = $ENV{'form.layout'};
1.36 sakharuk 203: my $numberofcolumns = $ENV{'form.numberofcolumns'};
1.16 sakharuk 204: my $laystyle = 'book';
1.2 sakharuk 205: my $result = '';
1.34 sakharuk 206: my $number_of_columns = 1;
1.36 sakharuk 207:
1.3 sakharuk 208: if ($choice eq 'Standard LaTeX output for current document') {
1.36 sakharuk 209: #-- single document - problem, page, html, xml
1.14 albertel 210: my %moreenv;
211: $moreenv{'form.grade_target'}='tex';
1.48 sakharuk 212: if ($ENV{'request.role'}=~m/^au\./ or $ENV{'request.role'}=~m/^ca\./) {
213: $ENV{'form.url'}=~s/http:\/\/[^\/]+//;
214: }
1.14 albertel 215: $moreenv{'request.filename'}=$ENV{'form.url'};
216: &Apache::lonnet::appenv(%moreenv);
217: my $texversion=&Apache::lonnet::ssi($ENV{'form.url'});
218: &Apache::lonnet::delenv('form.grade_target');
219: $result .= $texversion;
1.29 sakharuk 220: $result = &additional_cleanup($result);
1.40 sakharuk 221: if ($ENV{'form.url'}=~m/\.page\s*$/) {
222: ($result,$number_of_columns) = &page_cleanup($result);
223: }
224: } elsif ($choice eq 'Standard LaTeX output for the primary sequence' or
225: $choice eq 'Standard LaTeX output for whole primary sequence') {
1.36 sakharuk 226: #-- minimal sequence to which the current document belongs
227: #-- where is the primary sequence containing file?
1.18 sakharuk 228: my $symbolic = &Apache::lonnet::symbread($ENV{'form.url'});
229: $_ = $symbolic;
230: m/([^_]+)_/;
231: my $primary_sequence = '/res/'.$1;
1.36 sakharuk 232: #-- open and analyses the primary sequence
1.18 sakharuk 233: my $sequence_file=&Apache::lonnet::filelocation("",$primary_sequence);
234: my $sequencefilecontents=&Apache::lonnet::getfile($sequence_file);
235: my @master_seq = &content_map($sequencefilecontents);
1.36 sakharuk 236: #-- produce an output string
1.18 sakharuk 237: for (my $i=0;$i<=$#master_seq;$i++) {
238: $_ = $master_seq[$i];
239: m/\"(.*)\"/;
240: $_ = $1;
1.36 sakharuk 241: my $urlp = $1;
1.20 sakharuk 242: if ($choice eq 'Standard LaTeX output for the primary sequence') {
1.36 sakharuk 243: if ($urlp =~ m/\.(problem|exam|quiz|assess|survey|form|library)/) {
1.20 sakharuk 244: my %moreenv;
245: $moreenv{'form.grade_target'}='tex';
246: &Apache::lonnet::appenv(%moreenv);
247: my $texversion=&Apache::lonnet::ssi($urlp);
248: &Apache::lonnet::delenv('form.grade_target');
249: $result .= $texversion;
250: }
1.53 albertel 251: } elsif ($urlp =~ /\S+/) {
1.36 sakharuk 252: my %moreenv;
1.18 sakharuk 253: $moreenv{'form.grade_target'}='tex';
254: &Apache::lonnet::appenv(%moreenv);
255: my $texversion=&Apache::lonnet::ssi($urlp);
256: &Apache::lonnet::delenv('form.grade_target');
1.20 sakharuk 257: $result .= $texversion;
1.16 sakharuk 258: }
1.28 sakharuk 259: }
260: $result = &additional_cleanup($result);
1.13 sakharuk 261: } elsif ($choice eq 'Standard LaTeX output for the top level sequence') {
1.47 sakharuk 262: # where is the main sequence of the course?
1.13 sakharuk 263: my $main_seq = '/res/'.$ENV{'request.course.uri'};
264: my $file=&Apache::lonnet::filelocation("",$main_seq);
265: my $filecontents=&Apache::lonnet::getfile($file);
266: my @file_seq = &content_map($filecontents);
1.48 sakharuk 267: for (my $iu=0;$iu<=$#file_seq;$iu++) {
268: $file_seq[$iu]=~s/^"//;
269: $file_seq[$iu]=~s/"$//;
1.49 sakharuk 270: if ($file_seq[$iu]=~m/\S+/) {
271: $file_seq[$iu]=&Apache::lonnet::filelocation("",$file_seq[$iu]);
272: } else {
273: $file_seq[$iu]= 'REMOVE IT PLEASE';
274: }
1.48 sakharuk 275: }
276: my $i=0;
1.49 sakharuk 277: my $limit = $#file_seq;
278: while ($i<=$limit) {
1.48 sakharuk 279: unless ($file_seq[$i]=~m/\.(problem|page)/) {
280: if ($file_seq[$i]=~m/\.sequence/) {
281: my $filecontents=&Apache::lonnet::getfile($file_seq[$i]);
282: my @newfile_seq = &content_map($filecontents);
1.49 sakharuk 283: for (my $iu=0;$iu<=$#newfile_seq;$iu++) {
284: $newfile_seq[$iu]=~s/^"//;
285: $newfile_seq[$iu]=~s/"$//;
286: if ($newfile_seq[$iu]=~m/\S+/) {
287: $newfile_seq[$iu]=&Apache::lonnet::filelocation("",$newfile_seq[$iu]);
288: } else {
289: $newfile_seq[$iu]= 'REMOVE IT PLEASE';
290: }
291: }
292: splice @file_seq,$i,1,@newfile_seq;
293: $i=0;
294: $limit = $#file_seq;
1.48 sakharuk 295: } else {
1.49 sakharuk 296: splice @file_seq,$i,1,'REMOVE IT PLEASE';
1.48 sakharuk 297: }
298: }
299: $i++;
300: }
301: for (my $iu=0;$iu<=$#file_seq;$iu++) {
1.49 sakharuk 302: if ($file_seq[$iu]=~m/REMOVE IT PLEASE/) {
303: splice @file_seq,$iu,1;
304: }
305: }
306: if ($file_seq[-1]=~m/REMOVE IT PLEASE/) {
307: pop @file_seq;
1.48 sakharuk 308: }
1.52 sakharuk 309: #-- produce an output string
1.49 sakharuk 310: for (my $i=0;$i<=$#file_seq;$i++) {
311: my $urlp = $file_seq[$i];
312: $urlp=~s/\/home\/httpd\/html//;
313: if ($urlp=~m/\.(problem|exam|quiz|assess|survey|form|library)/) {
314: my %moreenv;
315: $moreenv{'form.grade_target'}='tex';
316: &Apache::lonnet::appenv(%moreenv);
317: my $texversion=&Apache::lonnet::ssi($urlp);
318: &Apache::lonnet::delenv('form.grade_target');
319: $result .= $texversion;
320: }
321: }
322: $result = &additional_cleanup($result);
1.52 sakharuk 323: } elsif ($choice eq 'All class print') {
1.54 sakharuk 324: #-- prints assignments for whole class or for selected students
325: my (@students,@st_output) = ((),());
326: for (my $i=0; $i<$ENV{'form.numberofstudents'};$i++) {
327: if ($ENV{'form.whomtoprint'.$i}=~/:/) {
328: push @students,$ENV{'form.whomtoprint'.$i};
329: }
330: }
331: #where is the primary sequence containing current resource (the same for all students)?
332: my $symbolic = &Apache::lonnet::symbread($ENV{'form.url'});
333: $symbolic =~ m/([^_]+)_/;
334: my $primary_sequence = '/res/'.$1;
335: #opens and analyses the primary sequence file, produces the array of resources
336: my $sequence_file=&Apache::lonnet::filelocation("",$primary_sequence);
337: my $sequencefilecontents=&Apache::lonnet::getfile($sequence_file);
338: my @master_seq = &content_map($sequencefilecontents);
339: #loop over students
340: foreach my $person (@students) {
341: my $current_output = '';
342: my ($username,$userdomain) = split /:/,$person;
343: my $fullname = &Apache::grades::get_fullname($username,$userdomain);
344: #goes through all resources, checks if they are available for current student, and produces output
345: foreach my $curres (@master_seq) {
346: $curres =~ s/^"//;
347: $curres =~ s/"$//;
348: if ($curres=~/\w+/) {
349: my $symb = &Apache::lonnet::symbread($curres);
350: my ($map,$id,$res_url) = split(/___/,$symb);
351: if (&Apache::lonnet::allowed('bre',$res_url)) {
352: my $rendered = &Apache::loncommon::get_student_view($symb,$username,$userdomain,
353: $ENV{'request.course.id'},'tex');
354: $current_output .= $rendered;
355: }
356: }
357: }
358: $current_output =~ s/\\begin{document}/\\begin{document}\\noindent\\parbox{\\minipagewidth}{\\noindent\\fbox{\\textbf{$fullname}}\\hskip 1\.4in } \\vskip 5 mm /;
359: $result .= $current_output;
360: }
361:
362: $result = &additional_cleanup($result);
363:
364:
365:
1.52 sakharuk 366:
367:
368:
1.31 sakharuk 369: } elsif ($choice eq 'Subdirectory print') {
370: my $subdirtoprint = &Apache::lonnet::filelocation("",$ENV{'form.url'});
371: $subdirtoprint =~ s/\/[^\/]+$//;
372: my @list_of_files = ();
1.48 sakharuk 373: if ($ENV{'request.role'}=~m/^au\./ or $ENV{'request.role'}=~m/^ca\./) {
1.45 sakharuk 374: $subdirtoprint =~ s/^[^~]*~(\w+)\//\/home\/$1\/public_html\//;
375: } else {
376: $subdirtoprint =~ s/.*(\/res\/)/$1/;
377: }
1.46 sakharuk 378: my @content_directory = ();
1.48 sakharuk 379: if ($ENV{'request.role'}=~m/^au\./ or $ENV{'request.role'}=~m/^ca\./) {
1.46 sakharuk 380: @content_directory = &Apache::lonnet::dirlist($subdirtoprint,$ENV{'user.domain'}, $ENV{'user.name'},'');
1.45 sakharuk 381: } else {
1.46 sakharuk 382: @content_directory = &Apache::lonnet::dirlist($subdirtoprint);
383: }
384: for (my $iy=0;$iy<=$#content_directory;$iy++) {
385: my @tempo_array = split(/&/,$content_directory[$iy]);
386: if ($tempo_array[0] =~ m/^[^\.]+\.(problem|exam|quiz|assess|survey|form|library)$/) {
387: push(@list_of_files,$tempo_array[0]);
1.28 sakharuk 388: }
1.13 sakharuk 389: }
1.45 sakharuk 390: $subdirtoprint =~ s/\/$//;
1.31 sakharuk 391: for (my $i=0;$i<=$#list_of_files;$i++) {
1.45 sakharuk 392: my $urlp = $subdirtoprint.'/'.$list_of_files[$i];
1.31 sakharuk 393: my %moreenv;
394: $moreenv{'form.grade_target'}='tex';
395: &Apache::lonnet::appenv(%moreenv);
1.48 sakharuk 396: if ($ENV{'request.role'}=~m/^au\./ or $ENV{'request.role'}=~m/^ca\./) {
397: $urlp =~ s/\/home\/([^\/]*)\/public_html/\/~$1/;
398: }
1.31 sakharuk 399: my $texversion=&Apache::lonnet::ssi($urlp);
400: &Apache::lonnet::delenv('form.grade_target');
401: $texversion =~ s/(\\begin{document})/$1 {\\tiny\\begin{verbatim}$urlp\\end{verbatim}}/;
402: $result .= $texversion;
403: }
404: $result = &additional_cleanup($result);
405:
1.51 sakharuk 406:
1.7 sakharuk 407: }
1.16 sakharuk 408: #-- corrections for the different page formats
1.36 sakharuk 409: if ($layout eq 'CBI' and $numberofcolumns eq '1') {
410: } elsif ($layout eq 'CBI' and $numberofcolumns eq '2') {
1.16 sakharuk 411: $result =~ s/\\begin{document}/\\setlength{\\oddsidemargin}{-40pt}\\setlength{\\evensidemargin}{-60pt}\\setlength{\\topmargin}{200pt}\\setlength{\\textwidth}{4\.4in}\\setlength{\\textheight}{6\.8in}\\setlength{\\parindent}{20pt}\\setlength{\\marginparwidth}{90pt}\\setlength{\\textfloatsep}{8pt plus 2\.0pt minus 4\.0pt} \\begin{document}/;
412: $laystyle = 'album';
413: } elsif ($layout eq 'CAPA') {
414: my $courseidinfo = $ENV{'request.role'};
415: $_ = $courseidinfo;
416: m/.*\/(.*)/;
417: $courseidinfo = $ENV{'course.physnet_'.$1.'.description'};
1.34 sakharuk 418: # $result =~ s/\\documentclass\[letterpaper\]{article}/\\documentclass\[twocolumn\]{article}/;
419: $result =~ s/\\documentclass\[letterpaper\]{article}/\\documentclass{article}/;
420: $result =~ s/\\begin{document}/\\textheight 25\.9cm\\oddsidemargin = -0\.57in\\evensidemargin = -0\.57in\\textwidth= 9cm\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\begin{document}\\voffset=-1\.8cm\\setcounter{page}{1}\\parbox{\\minipagewidth}{\\noindent\\fbox{\\textbf{$ENV{'environment.firstname'} $ENV{'environment.lastname'}}}\\hskip 1\.4in $courseidinfo} \\vskip 5 mm /;
1.27 sakharuk 421: $result =~ s/\\includegraphics{/\\includegraphics\[width=9\.0 cm\]{/g;
1.37 sakharuk 422: # $result =~ s/\\includegraphics{/\\includegraphics\[width=\\textwidth\]{/g;
423: # $result =~ s/(\\end{document})/\\newline\\noindent\\makebox\[9.0cm\]\[b\]{\\hrulefill}\\newline\\noindent\\tiny Dept\. of Physics and Astronomy, MSU\\makebox\[1.5cm\]\[b\]{\\hfill}LON-CAPA\\copyright MSU GNU\/GPL $1/;
1.50 albertel 424: $result =~ s/(\\end{document})/\\newline\\noindent\\makebox\[\\textwidth\/$number_of_columns\]\[b\]{\\hrulefill}\\newline\\noindent\\tiny \\makebox\[1.5cm\]\[b\]{\\hfill}LON-CAPA\\copyright Michigan State University Board of Trustees $1/;
1.37 sakharuk 425: # $result =~ s/(\\end{longtable}\s*)(\\newline\\noindent\\makebox\[9\.0cm\]\[b\]{\\hrulefill})/$2$1/g;
426: $result =~ s/(\\end{longtable}\s*)(\\newline\\noindent\\makebox\[\\textwidth\/$number_of_columns\]\[b\]{\\hrulefill})/$2$1/g;
1.34 sakharuk 427: $result =~ s/(\\end{longtable}\s*)\\newline/$1/g;
1.37 sakharuk 428: $result =~ s/\$number_of_columns/$number_of_columns/g;
1.16 sakharuk 429: }
1.52 sakharuk 430: #changes page's parameters for the one column output
431: if ($ENV{'form.numberofcolumns'} == 1) {
432: $result =~ s/\\textwidth= 9cm/\\textwidth= $ENV{'form.width'}/;
433: }
1.23 sakharuk 434: #-- LaTeX corrections
435: my $first_comment = index($result,'<!--',0);
436: while ($first_comment != -1) {
437: my $end_comment = index($result,'-->',$first_comment);
438: substr($result,$first_comment,$end_comment-$first_comment+3) = '';
439: $first_comment = index($result,'<!--',$first_comment);
440: }
1.17 sakharuk 441: $result =~ s/^\s+$//gm; #remove empty lines
1.20 sakharuk 442: $result =~ s/(\s)+/$1/g; #removes more than one empty space
1.23 sakharuk 443: $result =~ s/\\\\\s*\\vskip/\\vskip/gm;
1.24 sakharuk 444: $result =~ s/\\\\\s*\\noindent\s*(\\\\)+/\\\\\\noindent /g;
1.23 sakharuk 445: $result =~ s/{\\par }\s*\\\\/\\\\/gm;
1.24 sakharuk 446: $result =~ s/\\\\\s+\[/ \[/g;
447: $result =~ s/θ/\$\\theta\$/g; #converts theta from html into tex
1.41 sakharuk 448: $result =~ s/\b__+\b/\\makebox\[1 cm\]\[b\]{\\hrulefill}/g;
1.37 sakharuk 449: #conversion of html characters to LaTeX equivalents
450: if ($result =~ m/&(\w+|#\d+);/) {
451: $result = &character_chart($result);
452: }
1.42 sakharuk 453: $result =~ s/(\\end{tabular})\s*\\vskip 0 mm/$1/g;
454: $result =~ s/(\\begin{enumerate})\s*\\noindent/$1/g;
1.7 sakharuk 455: #-- writing .tex file in prtspool
1.16 sakharuk 456: my $temp_file;
1.33 sakharuk 457: my $filename = "/home/httpd/prtspool/$ENV{'user.name'}_$ENV{'user.domain'}_printout_".time."_".rand(10000000).".tex";
1.16 sakharuk 458: unless ($temp_file = Apache::File->new('>'.$filename)) {
459: $r->log_error("Couldn't open $filename for output $!");
460: return SERVER_ERROR;
461: }
462: print $temp_file $result;
1.3 sakharuk 463: $r->print(<<FINALEND);
1.51 sakharuk 464: <meta http-equiv="Refresh" content="0; url=/cgi-bin/printout.pl?$filename&$laystyle&$numberofcolumns">
1.3 sakharuk 465: </body>
466: </html>
467: FINALEND
468: }
1.2 sakharuk 469:
1.37 sakharuk 470: sub character_chart {
471: my $result = shift;
1.41 sakharuk 472: $result =~ s/�?0?7;//g;
1.40 sakharuk 473: $result =~ s/�?0?9;//g;
474: $result =~ s/�?10;//g;
475: $result =~ s/�?13;//g;
476: $result =~ s/�?32;/ /g;
477: $result =~ s/�?33;/!/g;
478: $result =~ s/�?34;/"/g;
1.39 sakharuk 479: $result =~ s/"/"/g;
1.40 sakharuk 480: $result =~ s/�?35;/\\#/g;
481: # $result =~ s/�?36;/\\\$/g;
482: $result =~ s/�?37;/\\%/g;
483: $result =~ s/�?38;/\\&/g;
1.37 sakharuk 484: $result =~ s/&/\\&/g;
1.40 sakharuk 485: $result =~ s/�?39;/'/g;
486: $result =~ s/�?40;/(/g;
487: $result =~ s/�?41;/)/g;
488: $result =~ s/�?42;/\*/g;
489: $result =~ s/�?43;/\+/g;
490: $result =~ s/�?44;/,/g;
491: $result =~ s/�?45;/-/g;
492: $result =~ s/�?46;/\./g;
493: $result =~ s/�?47;/\//g;
494: $result =~ s/�?48;/0/g;
495: $result =~ s/�?49;/1/g;
496: $result =~ s/�?50;/2/g;
497: $result =~ s/�?51;/3/g;
498: $result =~ s/�?52;/4/g;
499: $result =~ s/�?53;/5/g;
500: $result =~ s/�?54;/6/g;
501: $result =~ s/�?55;/7/g;
502: $result =~ s/�?56;/8/g;
503: $result =~ s/�?57;/9/g;
504: $result =~ s/�?58;/:/g;
505: $result =~ s/�?59;/;/g;
506: $result =~ s/�?60;/\$<\$/g;
1.37 sakharuk 507: $result =~ s/</\$<\$/g;
1.40 sakharuk 508: $result =~ s/�?61;/\$=\$/g;
509: $result =~ s/�?62;/\$>\$/g;
1.37 sakharuk 510: $result =~ s/>/\$>\$/g;
1.40 sakharuk 511: $result =~ s/�?63;/?/g;
512: # $result =~ s/�?64;//g;
513: $result =~ s/�?65;/A/g;
514: $result =~ s/�?66;/B/g;
515: $result =~ s/�?67;/C/g;
516: $result =~ s/�?68;/D/g;
517: $result =~ s/�?69;/E/g;
518: $result =~ s/�?70;/F/g;
519: $result =~ s/�?71;/G/g;
520: $result =~ s/�?72;/H/g;
521: $result =~ s/�?73;/I/g;
522: $result =~ s/�?74;/J/g;
523: $result =~ s/�?75;/K/g;
524: $result =~ s/�?76;/L/g;
525: $result =~ s/�?77;/M/g;
526: $result =~ s/�?78;/N/g;
527: $result =~ s/�?79;/O/g;
528: $result =~ s/�?80;/P/g;
529: $result =~ s/�?81;/Q/g;
530: $result =~ s/�?82;/R/g;
531: $result =~ s/�?83;/S/g;
532: $result =~ s/�?84;/T/g;
533: $result =~ s/�?85;/U/g;
534: $result =~ s/�?86;/V/g;
535: $result =~ s/�?87;/W/g;
536: $result =~ s/�?88;/X/g;
537: $result =~ s/�?89;/Y/g;
538: $result =~ s/�?90;/Z/g;
539: $result =~ s/�?91;/[/g;
540: $result =~ s/�?92;/\\/g;
541: $result =~ s/�?93;/]/g;
542: # $result =~ s/�?94;//g;
543: # $result =~ s/�?95;//g;
544: $result =~ s/�?96;/`/g;
545: $result =~ s/�?97;/a/g;
546: $result =~ s/�?98;/b/g;
547: $result =~ s/�?99;/c/g;
1.37 sakharuk 548: $result =~ s/d/d/g;
549: $result =~ s/e/e/g;
550: $result =~ s/f/f/g;
551: $result =~ s/g/g/g;
552: $result =~ s/h/h/g;
553: $result =~ s/i/i/g;
554: $result =~ s/j/j/g;
555: $result =~ s/k/k/g;
556: $result =~ s/l/l/g;
557: $result =~ s/m/m/g;
558: $result =~ s/n/n/g;
559: $result =~ s/o/o/g;
560: $result =~ s/p/p/g;
561: $result =~ s/q/q/g;
562: $result =~ s/r/r/g;
563: $result =~ s/s/s/g;
564: $result =~ s/t/t/g;
565: $result =~ s/u/u/g;
566: $result =~ s/v/v/g;
567: $result =~ s/w/w/g;
568: $result =~ s/x/x/g;
569: $result =~ s/y/y/g;
570: $result =~ s/z/z/g;
571: $result =~ s/{/\\{/g;
572: $result =~ s/|/\|/g;
573: $result =~ s/}/\\}/g;
574: $result =~ s/~/\~/g;
575: $result =~ s/‚/,/g;
576: # $result =~ s/ƒ//g;
577: $result =~ s/„/''/g;
578: $result =~ s/…/\$\\ldots\$/g;
579: $result =~ s/†/\$\\dagger\$/g;
580: $result =~ s/‡/\$\\ddagger\$/g;
581: # $result =~ s/ˆ//g;
582: # $result =~ s/‰//g;
583: # $result =~ s/Š//g;
584: $result =~ s/‹/\$<\$/g;
585: # $result =~ s/Œ//g;
586: $result =~ s/‘/`/g;
587: $result =~ s/’/'/g;
588: $result =~ s/“/``/g;
589: $result =~ s/”/''/g;
590: $result =~ s/•/\$\\bullet\$/g;
591: # $result =~ s/–//g;
592: # $result =~ s/—//g;
593: $result =~ s/˜/~/g;
594: # $result =~ s/™//g;
595: # $result =~ s/š//g;
596: $result =~ s/›/\$>\$/g;
597: $result =~ s/œ/\\{\\oe\\}/g;
598: $result =~ s/Ÿ/\\"\\{Y\\}/g;
599: $result =~ s/ //g;
600: $result =~ s/ //g;
601: $result =~ s/¡/!`/g;
602: $result =~ s/¡/!`/g; #`
603: # $result =~ s/¢//g;
604: # $result =~ s/¢//g;
605: $result =~ s/£/\\pounds/g;
606: $result =~ s/£/\\pounds/g;
607: # $result =~ s/¤//g;
608: # $result =~ s/¤//g;
609: # $result =~ s/¥//g;
610: # $result =~ s/¥//g;
611: # $result =~ s/¦//g;
612: # $result =~ s/¦//g;
613: # $result =~ s/§//g;
614: # $result =~ s/§//g;
615: # $result =~ s/¨//g;
616: # $result =~ s/¨//g;
617: $result =~ s/©/\\copyright/g;
618: $result =~ s/©/\\copyright/g;
619: # $result =~ s/ª//g;
620: # $result =~ s/ª//g;
621: # $result =~ s/«//g;
622: # $result =~ s/«//g;
623: $result =~ s/¬/\$\\neg\$/g;
624: $result =~ s/¬/\$\\neg\$/g;
625: # $result =~ s/­//g;
626: # $result =~ s/­//g;
627: # $result =~ s/®//g;
628: # $result =~ s/®//g;
629: # $result =~ s/¯//g;
630: # $result =~ s/¯//g;
1.42 sakharuk 631: $result =~ s/°/\$^{\\circ}\$/g;
632: $result =~ s/°/\$^{\\circ}\$/g;
1.37 sakharuk 633: $result =~ s/±/\$\\pm\$/g;
634: $result =~ s/±/\$\\pm\$/g;
635: $result =~ s/²/\$^2\$/g;
636: $result =~ s/²/\$^2\$/g;
637: $result =~ s/³/\$^3\$/g;
638: $result =~ s/³/\$^3\$/g;
639: # $result =~ s/´//g;
640: # $result =~ s/´//g;
641: $result =~ s/µ/\$\\mu\$/g;
642: $result =~ s/µ/\$\\mu\$/g;
643: $result =~ s/¶/\\P/g;
644: $result =~ s/¶/\\P/g;
645: $result =~ s/·/\$\\cdot\$/g;
646: $result =~ s/·/\$\\cdot\$/g;
647: # $result =~ s/¸//g;
648: # $result =~ s/¸//g;
649: $result =~ s/¹/\$^1\$/g;
650: $result =~ s/¹/\$^1\$/g;
651: # $result =~ s/º//g;
652: # $result =~ s/º//g;
653: # $result =~ s/»//g;
654: # $result =~ s/»//g;
655: # $result =~ s/¼//g;
656: # $result =~ s/¼//g;
657: # $result =~ s/½//g;
658: # $result =~ s/½//g;
659: # $result =~ s/¾//g;
660: # $result =~ s/¾//g;
661: $result =~ s/¿/?`/g;
662: $result =~ s/¿/?`/g;
663: $result =~ s/À/\\`{A}/g;
664: $result =~ s/À/\\`{A}/g;
665: $result =~ s/Á/\\'{A}/g;
666: $result =~ s/Á/\\'{A}/g;
667: $result =~ s/Â/\\^{A}/g;
668: $result =~ s/Â/\\^{A}/g;
669: $result =~ s/Ã/\\~{A}/g;
670: $result =~ s/Ã/\\~{A}/g;
671: $result =~ s/Ä/\\"{A}/g;
672: $result =~ s/Ä/\\"{A}/g;
673: $result =~ s/Å/{\\AA}/g;
674: $result =~ s/Å/{\\AA}/g;
675: $result =~ s/Æ/{\\AE}/g;
676: $result =~ s/Æ/{\\AE}/g;
677: # $result =~ s/Ç//g;
678: # $result =~ s/Ç//g;
679: $result =~ s/È/\\`{E}/g;
680: $result =~ s/È/\\`{E}/g;
681: $result =~ s/É/\\'{E}/g;
682: $result =~ s/É/\\'{E}/g;
683: $result =~ s/Ê/\\^{E}/g;
684: $result =~ s/Ê/\\^{E}/g;
685: $result =~ s/Ë/\\`{E}/g;
686: $result =~ s/Ë/\\`{E}/g;
687: $result =~ s/Ì/\\`{I}/g;
688: $result =~ s/Ì/\\`{I}/g;
689: $result =~ s/Í/\\'{I}/g;
690: $result =~ s/Í/\\'{I}/g;
691: $result =~ s/Î/\\^{I}/g;
692: $result =~ s/Î/\\^{I}/g;
693: $result =~ s/Ï/\\"{I}/g;
694: $result =~ s/Ï/\\"{I}/g;
695: # $result =~ s/Ð//g;
696: # $result =~ s/Ð//g;
697: $result =~ s/Ñ/\\~{N}/g;
698: $result =~ s/Ñ/\\~{N}/g;
699: $result =~ s/Ò/\\`{O}/g;
700: $result =~ s/Ò/\\`{O}/g;
701: $result =~ s/Ó/\\'{O}/g;
702: $result =~ s/Ó/\\'{O}/g;
703: $result =~ s/Ô/\\^{O}/g;
704: $result =~ s/Ô/\\^{O}/g;
705: $result =~ s/Õ/\\~{O}/g;
706: $result =~ s/Õ/\\~{O}/g;
707: $result =~ s/Ö/\\"{O}/g;
708: $result =~ s/Ö/\\"{O}/g;
709: $result =~ s/×/\$\\times\$/g;
710: $result =~ s/×/\$\\times\$/g;
711: $result =~ s/Ø/{\\O}/g;
712: $result =~ s/Ø/{\\O}/g;
713: $result =~ s/Ù/\\`{U}/g;
714: $result =~ s/Ù/\\`{U}/g;
715: $result =~ s/Ú/\\'{U}/g;
716: $result =~ s/Ú/\\'{U}/g;
717: $result =~ s/Û/\\^{U}/g;
718: $result =~ s/Û/\\^{U}/g;
719: $result =~ s/Ü/\\"{U}/g;
720: $result =~ s/Ü/\\"{U}/g;
721: $result =~ s/Ý/\\'{Y}/g;
722: $result =~ s/Ý/\\'{Y}/g;
723: # $result =~ s/Þ//g;
724: # $result =~ s/Þ//g;
725: # $result =~ s/ß//g;
726: # $result =~ s/ß//g;
727: $result =~ s/à/\\`{a}/g;
728: $result =~ s/à/\\`{a}/g;
729: $result =~ s/á/\\'{a}/g;
730: $result =~ s/á/\\'{a}/g;
731: $result =~ s/â/\\^{a}/g;
732: $result =~ s/â/\\^{a}/g;
733: $result =~ s/ã/\\~{a}/g;
734: $result =~ s/ã/\\~{a}/g;
735: $result =~ s/ä/\\"{a}/g;
736: $result =~ s/ä/\\"{a}/g;
737: $result =~ s/å/{\\aa}/g;
738: $result =~ s/å/{\\aa}/g;
739: $result =~ s/æ/{\\ae}/g;
740: $result =~ s/æ/{\\ae}/g;
741: # $result =~ s/ç//g;
742: # $result =~ s/ç//g;
743: $result =~ s/è/\\`{e}/g;
744: $result =~ s/è/\\`{e}/g;
745: $result =~ s/é/\\'{e}/g;
746: $result =~ s/é/\\'{e}/g;
747: $result =~ s/ê/\\^{e}/g;
748: $result =~ s/ê/\\^{e}/g;
749: $result =~ s/ë/\\"{e}/g;
750: $result =~ s/ë/\\"{e}/g;
751: $result =~ s/ì/\\`{i}/g;
752: $result =~ s/ì/\\`{i}/g;
753: $result =~ s/í/\\'{i}/g;
754: $result =~ s/í/\\'{i}/g;
755: $result =~ s/î/\\^{i}/g;
756: $result =~ s/î/\\^{i}/g;
757: $result =~ s/ï/\\"{i}/g;
758: $result =~ s/ï/\\"{i}/g;
759: # $result =~ s/ð//g;
760: # $result =~ s/ð//g;
761: $result =~ s/ñ/\\~{n}/g;
762: $result =~ s/ñ/\\~{n}/g;
763: $result =~ s/ò/\\`{o}/g;
764: $result =~ s/ò/\\`{o}/g;
765: $result =~ s/ó/\\'{o}/g;
766: $result =~ s/ó/\\'{o}/g;
767: $result =~ s/ô/\\^{o}/g;
768: $result =~ s/ô/\\^{o}/g;
769: $result =~ s/õ/\\~{o}/g;
770: $result =~ s/õ/\\~{o}/g;
771: $result =~ s/ö/\\"{o}/g;
772: $result =~ s/ö/\\"{o}/g;
773: $result =~ s/÷/\$\\div\$/g;
774: $result =~ s/÷/\$\\div\$/g;
775: $result =~ s/ø/{\\o}/g;
776: $result =~ s/ø/{\\o}/g;
777: $result =~ s/ù/\\`{u}/g;
778: $result =~ s/ù/\\`{u}/g;
779: $result =~ s/ú/\\'{u}/g;
780: $result =~ s/ú/\\'{u}/g;
781: $result =~ s/û/\\^{u}/g;
782: $result =~ s/û/\\^{u}/g;
783: $result =~ s/ü/\\"{u}/g;
784: $result =~ s/ü/\\"{u}/g;
785: $result =~ s/ý/\\'{y}/g;
786: $result =~ s/ý/\\'{y}/g;
787: # $result =~ s/þ//g;
788: # $result =~ s/þ//g;
789: $result =~ s/ÿ/\\"{y}/g;
790: $result =~ s/ÿ/\\"{y}/g;
791: return $result;
792: }
1.41 sakharuk 793:
794:
795: #'"`
1.37 sakharuk 796:
1.28 sakharuk 797: sub additional_cleanup {
798: my $result = shift;
799: my $first_app = index($result,'\documentclass',0);
800: $first_app = index($result,'\documentclass',$first_app+5);
801: while ($first_app != -1) {
802: my $second_app = index($result,'begin{document}',$first_app);
803: $first_app = rindex($result,'\end{document}',$first_app);
804: substr($result,$first_app,$second_app-$first_app+15) = '\vskip 3 mm';
805: $first_app = index($result,'\documentclass',$first_app+5);
806: }
807: return $result;
808: }
1.33 sakharuk 809: sub page_cleanup {
810: my $result = shift;
811: $_ = $result;
812: m/\\end{document}(\d*)$/;
1.34 sakharuk 813: my $number_of_columns = $1;
1.33 sakharuk 814: my $insert = '{';
1.34 sakharuk 815: for (my $id=1;$id<=$number_of_columns;$id++) { $insert .='l'; }
1.33 sakharuk 816: $insert .= '}';
1.34 sakharuk 817: $result =~ s/(\\begin{longtable})INSERTTHEHEADOFLONGTABLE/$1$insert/g;
818: $result =~ s/&\s*REMOVETHEHEADOFLONGTABLE\\\\/\\\\/g;
819: $result =~ s/(\\vskip\s*\d+\s*mm)/}\\\\\\parbox{\\minipagewidth}{/g;
1.35 sakharuk 820: $result =~ s/\\parbox{\\minipagewidth}{}\s*\\\\\s*(\\parbox{\\minipagewidth})/$1/g;
1.37 sakharuk 821: $result =~ s/\\parbox{\\minipagewidth}{\s*\\\\\\\\/\\parbox{\\minipagewidth}{/g;
1.34 sakharuk 822: return $result,$number_of_columns;
1.33 sakharuk 823: }
1.6 sakharuk 824:
1.3 sakharuk 825: sub content_map {
1.7 sakharuk 826: #-- find a list of files to print
1.3 sakharuk 827: my $map_string = shift;
1.5 sakharuk 828: my @number_seq = ();
1.7 sakharuk 829: my @file_seq = ();
1.5 sakharuk 830: my $startlink = index($map_string,'<link',0);
1.7 sakharuk 831: my $endlink = index($map_string,'</link>',$startlink);
832: my $chunk = substr($map_string,$startlink,$endlink-$startlink+7);
833: $_ = $chunk;
834: m/from=\"(\d+)\"/;
835: push @number_seq,$1;
1.5 sakharuk 836: while ($startlink != -1) {
1.7 sakharuk 837: $endlink = index($map_string,'</link>',$startlink);
838: $chunk = substr($map_string,$startlink,$endlink-$startlink+7);
1.5 sakharuk 839: substr($map_string,$startlink,$endlink-$startlink+7) = '';
840: $_ = $chunk;
841: m/to=\"(\d+)\"/;
842: push @number_seq,$1;
1.44 sakharuk 843: $startlink = index($map_string,'from="'.$1.'"',0);
1.18 sakharuk 844: $startlink = rindex($map_string,'<link ',$startlink);
1.5 sakharuk 845: }
1.45 sakharuk 846: my $stalink = index($map_string,' to="'.$number_seq[0].'"',0);
1.7 sakharuk 847: while ($stalink != -1) {
848: $startlink = rindex($map_string,'<link ',$stalink);
849: $endlink = index($map_string,'</link>',$startlink);
850: $chunk = substr($map_string,$startlink,$endlink-$startlink+7);
851: substr($map_string,$startlink,$endlink-$startlink+7) = '';
852: $_ = $chunk;
853: m/from=\"(\d+)\"/;
854: unshift @number_seq,$1;
855: $stalink = index($map_string,' to="'.$number_seq[0].'"',0);
856: }
857: for (my $i=0;$i<=$#number_seq;$i++) {
858: $stalink = index($map_string,' id="'.$number_seq[$i].'"',0);
1.13 sakharuk 859: {
860: my $ahed1 = index($map_string,'src="',$stalink);
861: my $ahed2 = index($map_string,'</resource>',$stalink);
862: if ($ahed1 != -1) {
863: if ($ahed1 < $ahed2) {
864: $startlink = $ahed1;
865: } else {
866: $startlink = rindex($map_string,'src="',$stalink);
867: }
868: } else {
869: $startlink = rindex($map_string,'src="',$stalink);
870: }
871:
872: }
1.7 sakharuk 873: $startlink = index($map_string,'"',$startlink);
874: $endlink = index($map_string,'"',$startlink+1);
875: $chunk = substr($map_string,$startlink,$endlink-$startlink+1);
876: push @file_seq,$chunk;
877: }
878: return @file_seq;
879: }
1.5 sakharuk 880:
1.3 sakharuk 881:
882:
883: sub handler {
884:
885: my $r = shift;
886: $r->content_type('text/html');
887: $r->send_http_header;
888:
889: #-- start form
890: &headerform($r);
891: #-- menu for output
1.16 sakharuk 892: unless ($ENV{'form.phase'}) {
1.3 sakharuk 893: &menu_for_output($r);
894: }
1.52 sakharuk 895: #-- additional menu for class printing
896: if ($ENV{'form.phase'} eq 'two') {
897: if($ENV{'form.choice'} eq 'All class print') {
898: &additional_class_menu($r);
899: } else {
900: $ENV{'form.phase'} = 'three';
901: }
902: }
903: #-- additional menu for page layout (one column case)
904: if ($ENV{'form.phase'} eq 'three') {
905: if($ENV{'form.numberofcolumns'} == 1) {
906: &additional_print_menu($r);
907: } else {
908: $ENV{'form.phase'} = 'four';
909: }
910: }
1.3 sakharuk 911: #-- core part
1.52 sakharuk 912: if ($ENV{'form.phase'} eq 'four') {
1.3 sakharuk 913: &output_data($r);
914: }
1.2 sakharuk 915: return OK;
916:
1.1 www 917: }
918:
919: 1;
920: __END__
1.6 sakharuk 921:
922:
1.13 sakharuk 923:
924:
925: #### Test block
1.6 sakharuk 926: # my $ere;
927: # foreach $ere (%ENV) {
1.13 sakharuk 928: # $result .= ' SS '.$ere.' => '.$ENV{$ere}.' FF '."\n\n";
1.6 sakharuk 929: # }
1.13 sakharuk 930: ####
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>