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
@--- ./confarc.orig	1998-07-27 13:30:54.000000000 -0400
+++ ./confarc	2009-07-07 22:30:26.569085972 -0400
@@@@ -75,6 +75,8 @@@@
         elsif (/^-l/)           { $nu_list  = &get_option("-list");    }
 	elsif (/^-T/)		{ $nu_title = &get_option("-Title"); }
 	elsif (/^-b/)		{ $nu_addboxes = 1; }
+	elsif (/^-L/)           { $nu_locale = &get_option("-Locale"); }
+	elsif (/^-C/)           { $nu_charset = &get_option("-Charset"); }
         elsif (/^-[\?hH]/)      { &usage; }
         else                    { &usage("unknown argument: $_");  }
 }
@@@@ -142,6 +144,8 @@@@
 $addboxes = 0;
 $usemaxmem = 0;
 $vhost = "";
+$locale = '';
+$charset = '';
 @@urllist = ();
 
 # pre-set localscope
@@@@ -219,7 +223,7 @@@@
    	print "\nFound archive.  Reading in previous settings for update.\n";
 
    	($title, $urlpath, $traverse_type, $explicit_only, $numhops,
-    	   $nhhops, $local_limit, $remote_limit, $addboxes, $vhost, $usemaxmem, @@urllist) = ReadConfig($indexdir);
+	   $nhhops, $local_limit, $remote_limit, $addboxes, $vhost, $usemaxmem, $locale, $charset, @@urllist) = ReadConfig($indexdir);
 }
 
 # If we had a virtual host on the command line, revert to that.
@@@@ -423,6 +427,35 @@@@
 	}
 }
 
+if ($nu_locale) {
+    $locale = $nu_locale;
+} else {
+    if ($locale eq '') {
+	$locale = $ENV{LANG} if defined($ENV{LANG});
+	$locale = $ENV{LC_ALL} if defined($ENV{LC_ALL});
+	$locale = $ENV{LC_CTYPE} if defined($ENV{LC_CTYPE});
+    }
+    if (! $nu_quiet) {
+	$oldlocale=$locale;
+
+	$locale = &prompt("System locale (press return to leave it as is or * to cancel old one)\n",$oldlocale);
+	$locale = '' if ($locale eq "*");
+    }
+}
+
+if ($nu_charset) {
+    $charset = $nu_charset;
+} else {
+    if ($charset eq '') {
+	$charset = $ENV{MM_CHARSET} if defined($ENV{MM_CHARSET});
+    }
+    if (! $nu_quiet) {
+	$oldcharset=$charset;
+
+	$charset = &prompt("Charset for CGI (press return to leave it as is or * to cancel old one)\n",$oldcharset);
+	$charset = '' if ($charset eq "*");
+    }
+}
 
 # generate the comment
 if ($found_archive) {
@@@@ -452,6 +485,8 @@@@
 # vhost Hostname	= name of virtual host to use for this index
 # usemaxmem 0		= 0 to NOT use maximum available memory
 #			= 1 to use maximum memory to speed up indexing
+# locale LOCALE         = system locale or empty
+# charset CHARSET       = character set for CGI output or empty
 # urllist Url1,Url2,..	= List of starting URL's or Directories to index
 #	";
 }
@@@@ -473,7 +508,7 @@@@
 # save the configuration
 if(&SaveConfig($indexdir, $topcomment,
 		$title,$url,$traverse_type,$explicit_only,$numhops,$nhhops,
-		$local_limit, $remote_limit, $addboxes, $vhost, $usemaxmem, @@urllist) == 0){
+		$local_limit, $remote_limit, $addboxes, $vhost, $usemaxmem, $locale, $charset, @@urllist) == 0){
 	print "Error saving configuration to file!\n";
 	exit 3;
 }
@@@@ -483,7 +518,7 @@@@
 &copy_files($indexdir);
 
 # construct the cron file
-if (system("$MAKECRON $indexdir $usemaxmem") < 0) {
+if (system("$MAKECRON $indexdir $usemaxmem $locale") < 0) {
 	print "ERROR: Unable to create cronfile $mycronfile\n";
 	exit 6;
 }
@@@@ -617,8 +652,10 @@@@
 	if ($ttype == 2) {  # Subdirectory-based index
 		print "\n\nNow you will need to enter the full path to the directory(s)\n";
 		print "to be indexed.  It must be accessible from the web.\n";
+		print "Alternatively you can enter the URL(s) of the directories you would\n";
+		print "like to index.\n";
 	
-		$entry = &prompt("Directory Path: ", $indexdir);
+		$entry = &prompt("Directory Path or URL: ", $indexdir);
 
 	} else {	  # Traversal-based index
 
@


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

