PERFORCE change 12329 for review

[email protected] (Chris Nandor) Wed, 3 Oct 2001 17:08:23 -0400
Newsgroups perl.perl5.changes.mac
Message-ID <p05100301b7e12e6846e2@[10.0.1.177]>
Change 12329 by pudge@pudge-mobile on 2001/10/03 19:14:59

	Fix up Ballon Help and Help menu docs (first pass);
	remove balloon rez file, and autogenerate with
	Balloon2Rez instead.

Affected files ...

... //depot/maint-5.6/macperl/macos/macperl/MPBalloons.ball#2 edit
... //depot/maint-5.6/macperl/macos/macperl/MPBalloons.r#2 delete
... //depot/maint-5.6/macperl/macos/macperl/MacPerl.podhelp#2 edit
... //depot/maint-5.6/macperl/macos/macperl/macscripts/Balloon2Rez#1 add

Differences ...

==== //depot/maint-5.6/macperl/macos/macperl/MPBalloons.ball#2 (text) ====
Index: perl/macos/macperl/MPBalloons.ball
--- perl/macos/macperl/MPBalloons.ball.~1~	Wed Oct  3 13:30:06 2001
+++ perl/macos/macperl/MPBalloons.ball	Wed Oct  3 13:30:06 2001
@@ -148,11 +148,17 @@
 	7.1	Selects all text in the active window.
 	7.2	Selects all text in the active window. Not available because this operation is non-functional.
 
-	9.1	Jump to File (and Line) given by current selection.
-	9.2	Jump to File (and Line) given by current selection. Select a file name and/or line number to enable this item.
+	9.1	Find text in current editor window.
+	9.2	Find text in current editor window.Not available because there is no open current window.
+
+	10.1	Find text again.
+	10.2	Find text again. Not available because there is no open current window.
+
+	11.1	Jump to File (and Line) given by current selection.
+	11.2	Jump to File (and Line) given by current selection. Select a file name and/or line number to enable this item.
 
-	11.1	Set the font and size of the document.
-	13.1	Edit MacPerl Preferences.
+	13.1	Set the font and size of the document.
+	15.1	Edit MacPerl Preferences.
 END-MENU
 
 MENU 131	Window
@@ -177,6 +183,9 @@
 
 	7.1	Turns on the Perl debugger.
 	7.3	Turns off the Perl debugger.
+
+	8.1	Turns on taint checks.
+	8.3	Turns off taint checks.
 END-MENU
 
 END

==== //depot/maint-5.6/macperl/macos/macperl/MacPerl.podhelp#2 (text) ====
Index: perl/macos/macperl/MacPerl.podhelp
--- perl/macos/macperl/MacPerl.podhelp.~1~	Wed Oct  3 13:30:06 2001
+++ perl/macos/macperl/MacPerl.podhelp	Wed Oct  3 13:30:06 2001
@@ -1,9 +1,9 @@
 @menu
-pod:pod/perl.pod		MacPerl Overview
-pod:pod/perltoc.pod		Table of contents
-pod:pod/macperl.pod		Macintosh specific features	
-pod:pod/macperlbook.pod	MacPerl book information
-@sub Macintosh Toolbox Modules
+pod:pod/perl.pod			MacPerl Overview
+pod:pod/perltoc.pod			Table of contents
+pod:pod/macperl.pod			Macintosh specific features	
+pod:pod/macperlbook.pod			MacPerl book information
+@sub				Macintosh Toolbox Modules
 pod:lib/Mac/Toolbox.pod			Overview
 @sep
 pod:lib/Mac/Types.pm			MacOS Types
@@ -25,17 +25,17 @@
 pod:lib/Mac/Gestalt.pm			Gestalt Manager
 pod:lib/Mac/AppleEvents.pm		AppleEvents
 pod:lib/Mac/Processes.pm		Process Manager
-pod:lib/Mac/OSA.pm				Open Scripting Architecture
+pod:lib/Mac/OSA.pm			Open Scripting Architecture
 pod:lib/Mac/Components.pm		QuickTime Components
 pod:lib/Mac/Speech.pm			Speech Synthesis Manager
 pod:lib/Mac/SpeechRecognition.pm	Speech Recognition Manager
 @sep
-pod:lib/Mac/InternetConfig.pm	Internet Config 
+pod:lib/Mac/InternetConfig.pm		Internet Config 
 @sep
 pod:pod/macperlcat.pod			Chris' AppleEvents Tutorial
 @end
-@sub Perl FAQ
-pod:pod/perlfaq.pod				Overview
+@sub				Perl FAQ
+pod:pod/perlfaq.pod			Overview
 @sep
 pod:pod/perlfaq1.pod			General Questions About Perl
 pod:pod/perlfaq2.pod			Obtaining and Learning about Perl
@@ -48,49 +48,50 @@
 pod:pod/perlfaq9.pod			Networking
 @end
 @sep
-pod:pod/perldata.pod	Data structures
-pod:pod/perlsyn.pod		Syntax
-pod:pod/perlop.pod		Operators and precedence
-pod:pod/perlre.pod		Regular expressions
-pod:pod/perlfunc.pod	Builtin functions
-pod:pod/perlvar.pod		Predefined variables
+pod:pod/perldata.pod		Data structures
+pod:pod/perlsyn.pod			Syntax
+pod:pod/perlop.pod			Operators and precedence
+pod:pod/perlre.pod			Regular expressions
+pod:pod/perlfunc.pod			Builtin functions
+pod:pod/perlvar.pod			Predefined variables
 @sep
-@sub Advanced Topics
-pod:pod/perlsub.pod		Subroutines
-pod:pod/perlmod.pod		Modules
-pod:pod/perlmodlib.pod	Creating new Modules
-pod:pod/perlref.pod		References
-pod:pod/perldsc.pod		Data structures intro
-pod:pod/perllol.pod		Lists of lists
-pod:pod/perlobj.pod		Objects
-pod:pod/perltie.pod		Tied Objects
-pod:pod/perlbot.pod		OO tricks and examples
-pod:pod/perltoot.pod	OO tutorial
-pod:pod/perlform.pod	Formats
-pod:pod/perlipc.pod		Interprocess communication
-@sub Interfacing to C
+@sub				Advanced Topics
+pod:pod/perlsub.pod			Subroutines
+pod:pod/perlmod.pod			Modules
+pod:pod/perlmodlib.pod			Creating new Modules
+pod:pod/perlref.pod			References
+pod:pod/perldsc.pod			Data structures intro
+pod:pod/perllol.pod			Lists of lists
+pod:pod/perlobj.pod			Objects
+pod:pod/perltie.pod			Tied Objects
+pod:pod/perlbot.pod			OO tricks and examples
+pod:pod/perltoot.pod			OO tutorial
+pod:pod/perlform.pod			Formats
+pod:pod/perlipc.pod			Interprocess communication
+@sub				Interfacing to C
 pod:pod/perlxs.pod			XS API
-pod:pod/perlxstut.pod		XS tutorial
-pod:pod/perlguts.pod		Internal functions
-pod:pod/perlapio.pod		Internal I/O Interface
-pod:pod/perlcall.pod		Calling from C
-pod:pod/perlembed.pod		Embedding Perl
+pod:pod/perlxstut.pod			XS tutorial
+pod:pod/perlguts.pod			Internal functions
+pod:pod/perlapio.pod			Internal I/O Interface
+pod:pod/perlcall.pod			Calling from C
+pod:pod/perlembed.pod			Embedding Perl
 @end
 @end
-@sub Troubleshooting
-pod:pod/perldebug.pod	Debugging
-pod:pod/perldiag.pod	Diagnostic messages
-pod:pod/perltrap.pod	Traps for the unwary
+@sub				Troubleshooting
+pod:pod/perldebug.pod			Debugging
+pod:pod/perldiag.pod			Diagnostic messages
+pod:pod/perltrap.pod			Traps for the unwary
 @end
-@sub Various
-pod:pod/perlstyle.pod	Style guide
-pod:pod/perlpod.pod		Documentation format
-pod:pod/perlbook.pod	Book information
-pod:pod/perldelta.pod	News for Perl 5.004
+@sub				Various
+pod:pod/perlstyle.pod			Style guide
+pod:pod/perlpod.pod			Documentation format
+pod:pod/perlbook.pod			Book information
+pod:pod/perldelta.pod			News for Perl 5.004
 @end
 @sep
-http://www.iis.ee.ethz.ch/~neeri/macintosh/perl.html	MacPerl Homepage
-http://www.ptf.com/macperl/								The MacPerl Pages (PTF)
+http://www.macperl.org/			MacPerl Homepage
+http://dev.macperl.org/			MacPerl Development
+http://www.ptf.com/macperl/		The MacPerl Pages (PTF)
 @end
 
 @index :pod:perlop.pod
@@ -203,7 +204,7 @@
 @alias	-k  -X
 @alias	-T  -X
 @alias	-B  -X
-@alias	-M	-X
+@alias	-M  -X
 @alias	-A  -X
 @alias	-C  -X
 @end
@@ -213,11 +214,11 @@
 @rename	sub	NAME
 @end
 @index	:pod:perlsyn.pod
-@alias	if			Compound statements
+@alias	if		Compound statements
 @alias	unless		Compound statements
 @alias	while		Compound statements
-@alias	do			Compound statements
-@alias	for			Compound statements
+@alias	do		Compound statements
+@alias	for		Compound statements
 @alias	foreach		Compound statements
 @alias	next		Compound statements
 @alias	last		Compound statements

==== //depot/maint-5.6/macperl/macos/macperl/macscripts/Balloon2Rez#1 (text) ====
Index: perl/macos/macperl/macscripts/Balloon2Rez
--- perl/macos/macperl/macscripts/Balloon2Rez.~1~	Wed Oct  3 13:30:06 2001
+++ perl/macos/macperl/macscripts/Balloon2Rez	Wed Oct  3 13:30:06 2001
@@ -0,0 +1,131 @@
+Perl -Sx "{0}" {"Parameters"}
+Exit 0
+
+#!perl
+#
+# Balloon2Rez - High level language for creating dialog and menu balloon descriptions
+#
+# Written by              Peter Lewis        <[email protected]>
+# Some modifications by   Matthias Neeracher <[email protected]>
+#
+# 04Dec94 MN removed hardcoded constants, allow some spacing flexibility
+#
+
+$balloons_strh_id = 26724;
+
+$in_name  = $ARGV[0];
+$in_name  =~ /^(.*)\.ball\w*$/i || die "Input needs suffix .ball*";
+$out_name = "$1.r";
+
+open(STDIN,"$in_name") || die "Failed to open input \"$in_name\"";
+open(STDOUT,">$out_name") || die "Failed to open output \"$out_name\"";
+
+print <<INCLUDES;
+#include "Types.r"
+#include "BalloonTypes.r"
+
+INCLUDES
+
+@strings=();
+
+while (<>) {
+	chop;
+	next if /^$/;
+	last if /^END$/;
+	die "Bad line '$_'" unless /(DIALOG|MENU)\s+(\d+)\s*(.*)/;
+	$dialog = $1 eq "DIALOG"; $id = $2; $name=$3;
+	@items=();
+	@menus=();
+	$menuitem=0;
+	while (<>) {
+		chop;
+		next if /^\s*$/;
+		if ($dialog) {
+			last if /^END-DIALOG$/;
+			die "Quote in line '$_'" if /"/;
+			die "Bad dialog line '$_'" unless /^\s*(\d+)\.(\d+)\s+(.*)/;
+			($item,$kind,$text) = ($1-1,$2,$3);
+		} else {
+			last if /^END-MENU$/;
+			die "Quote in line '$_'" if /"/;
+			die "Bad menu line '$_'" unless /^\s*(\d+)\.(\d)\s+(.*)/;
+			($item,$kind,$text) = ($1,$2,$3);
+		}
+		$base=$item*4;
+		$item=$base+$kind-1;
+		$index = &find_string($text);
+		$items[$item] = $index;
+		$items[$base+0] = 0 unless $items[$base+0];
+		$items[$base+1] = 0 unless $items[$base+1];
+		$items[$base+2] = 0 unless $items[$base+2];
+		$items[$base+3] = 0 unless $items[$base+3];
+	}
+   if ($dialog) {
+   	print <<"HEADER";
+resource 'hdlg' ($id,"$name") {
+\t2,0,0,0,0,
+\tHMSkipItem { },
+\t{
+HEADER
+	} else {
+      print <<"HEADER";
+resource 'hmnu' ($id,"$name") {
+\t2,0,0,0,
+\tHMSkipItem { },
+\t{
+HEADER
+	}
+	for $item (1..@items/4) {
+		$base = ($item-1)*4;
+		if ($items[$base+0] || $items[$base+1] ||
+			 $items[$base+2] || $items[$base+3]) {
+			print "\t\tHMStringResItem { /* ", 
+				($dialog ? $item : ($item ? $item-1 : "title")),
+				" */\n";
+			if ($dialog) {
+				print <<"ITEM";
+\t\t\t{0,0},
+\t\t\t{0,0,0,0},
+ITEM
+			}
+			for $k (0..3) {
+				$index = $items[$base+$k];
+				if ($index) {
+					print "\t\t\t$balloons_strh_id,$index,\n";
+				} else {
+					print "\t\t\t0,0,\n";
+				}
+			}
+			print "\t\t},\n";
+		} else {
+			print "\t\tHMSkipItem { }, /* $item */\n";
+		}
+	}
+	print <<"TRAILER";
+\t}
+};
+
+TRAILER
+}
+
+print "resource 'STR#' ($balloons_strh_id,\"Balloon Help Strings\") {\n";
+print "\t{\n";
+for $index (1..@strings) {
+	print "\t\t/* $index */\n";
+	print "\t\t\"$strings[$index-1]\",\n";
+}
+print "\t}\n";
+print "};\n\n";
+
+exit;
+
+sub find_string {
+	local($s) = @_;
+	local($i);
+	for $i (1..@strings) {
+		return $i if $s eq $strings[$i-1];
+	}
+	$i = @strings;
+	$strings[$i] = $s;
+	return $i+1;
+}
End of Patch.