head	1.2;
access;
symbols
	RELEASE_7_4_0:1.1
	RELEASE_8_2_0:1.1
	RELEASE_6_EOL:1.1
	RELEASE_8_1_0:1.1
	RELEASE_7_3_0:1.1
	RELEASE_8_0_0:1.1;
locks; strict;
comment	@# @;


1.2
date	2011.09.07.09.30.14;	author bapt;	state dead;
branches;
next	1.1;

1.1
date	2009.07.08.02.35.36;	author pgollucci;	state Exp;
branches;
next	;


desc
@@


1.2
log
@2011-09-01 x11-wm/epiwm: Abandonware
2011-09-01 x11-toolkits/p5-GdkPixbuf: Disappear from CPAN
2011-09-01 x11-toolkits/XawPlus: No more public distfiles
2011-09-01 x11-fonts/gnome-font-sampler: No more public distfiles
2011-09-01 x11/xvattr: No more public distfiles
2011-09-01 www/xitami: No more public distfiles
2011-09-01 www/webredirect: No more public distfiles
2011-09-01 www/webglimpse: No more public distfiles
2011-09-01 www/squishdot: No more public distfiles
2011-09-01 www/py-forgethtml: No more public distfiles
2011-09-01 www/mmosaic: No more public distfiles
2011-09-01 www/ljsm: No more public distfiles
2011-09-01 www/ljpms: No more public distfiles
2011-09-01 www/ashe: No more public distfiles
2011-09-01 textproc/europass-xsl: BROKEN for more than 6 month
2011-09-01 textproc/carthage: No more public distfiles
@
text
@--- ./getfile.orig	1997-11-12 07:38:21.000000000 -0500
+++ ./getfile	2009-07-07 22:30:26.578087395 -0400
@@@@ -22,7 +22,16 @@@@
 require "config.pl";
 #---------------------------------
 
-print "Content-type: text/html\n\n";
+$charset = '';
+$put_header = 0;
+
+sub http_header {
+
+return if ($put_header);
+$put_header = 1;
+
+print "Content-type: text/html$charset\n\n";
+}
 
 $query = $ENV{'QUERY_STRING'};
 
@@@@ -67,11 +76,25 @@@@
 	&err_badindexdir;
 }
 
-# get the url for the file from the config
-open(CFG, "<$indexdir/archive.cfg") || &err_badconfig;
-$input = <CFG>;
-($title,$url,$subindex) = split("\t", $input);
-close(CFG);
+$explicit_only = 0;
+$remote_limit = 0;
+$local_limit = 0;
+$addboxes = 0;
+$numhops = 0;
+$nhhops = 0;
+$traverse_type = 0;
+$url = '';
+$vhost = '';
+$usemaxmem = '';
+$locale = '';
+@@urllist = ();
+
+($title, $url, $traverse_type, $explicit_only, $numhops,
+ $nhhops, $local_limit, $remote_limit, $addboxes, $vhost, $usemaxmem, $locale, $charset, @@urllist) = ReadConfig($indexdir);
+
+$charset = "; charset=$charset" if ($charset ne '');
+
+&http_header;
 
 # print "indexdir = $indexdir<br>file = $file<br>line = $line<br>query=$query<br>\n";
 
@@@@ -149,12 +172,12 @@@@
 	if ($HTML) {
 		$baseurl &&
 			s#<title>#<BASE HREF=\"$baseurl\">$&#i;
-		s|\&lt;([\w\$][-\w.\$]*\@@\w[-\w.]+)&gt;|\<a href="/cgi-bin/artbyid?$1"\>\&lt;$1\&gt;\</a\>|g;
+#                s|\&lt;([\w\$][-\w.\$]*\@@\w[-\w.]+)&gt;|\<a href="/cgi-bin/artbyid?$1"\>\&lt;$1\&gt;\</a\>|g;
 	} else {
 		s|\&|\&amp;|g;
 		s|\<|\&lt;|g;
 		s|\>|\&gt;|g;
-		s|\&lt;([\w\$][-\w.\$]*\@@\w[-\w.]+)&gt;|\<a href="/cgi-bin/artbyid?$1"\>\&lt;$1\&gt;\</a\>|g;
+#                s|\&lt;([\w\$][-\w.\$]*\@@\w[-\w.]+)&gt;|\<a href="/cgi-bin/artbyid?$1"\>\&lt;$1\&gt;\</a\>|g;
 		# s|\bgopher://([^ ><'")(]*[\w\/])\b|\<a href="$&">$&\</a>|g;
 		# s|\bhttp://[-.\w?/+&\%:]+[.\w/]\b|\<a href="$&">$&\</a>|g;
 		# s|\bftp://[-.\w/+]+[.\w/]\b|\<a href="$&"\>$&\</a\>|g;
@@@@ -177,24 +200,28 @@@@
 close(INPUT);
 
 sub err_badconfig {
+	&http_header;
 	print "<TITLE>Error</TITLE>\n";
 	print "<H1>Error with \"$indexdir\"</H1>\n";
 	print "Cannot open configuration file for archive directory.\n";
 	exit;
 }
 sub err_noindexdir {
+	&http_header;
 	print "<TITLE>Error</TITLE>\n";
 	print "<H1>Error with \"$indexdir\"</H1>\n";
 	print "Archive directory does not exist.\n";
 	exit;
 }
 sub err_badindexdir {
+	&http_header;
 	print "<TITLE>Error</TITLE>\n";
 	print "<H1>Error with \"$indexdir\"</H1>\n";
 	print "Directory is not an archive directory.\n";
 	exit;
 }
 sub err_noaccess {
+	&http_header;
 	print "<TITLE>Access denied</TITLE>\n";
 	print "<H1>Access to \"$path\" denied</H1>\n";
 	print "You don't have permission to get file \"$path\"\n";
@@@@ -203,6 +230,7 @@@@
 }
 sub err_file {
 	local ($path) = @@_;
+	&http_header;
 	print "<TITLE>Cannot read file \"$path\"</TITLE>\n";
 	print "<H1>Cannot read file \"$path\": $!</H1>\n";
 	exit;
@


1.1
log
@- patch file shuffle for my sanity
@
text
@@

