summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2023-08-02 00:40:04 +0100
committerColin Watson <cjwatson@debian.org>2023-08-02 00:40:04 +0100
commita37cf289ab455e83661aaa83196cb58cd0082665 (patch)
tree741af518b44d266f0c55635c86309fe45aaadcd6
parent96891a072b0cf527942af6a0f401e3a8571a6b19 (diff)
Use modern Perl package separators
Bug-Debian: https://bugs.debian.org/1042846 Forwarded: no Last-Update: 2023-08-02 Patch-Name: 008_modern_package_separators.diff
-rwxr-xr-xbin/mif2rtf2
-rwxr-xr-xbin/sdf26
-rwxr-xr-xbin/sdfget2
-rw-r--r--doc/guru/ex_filt.sdf8
-rw-r--r--doc/ref/sfindfil.html4
-rw-r--r--doc/ref/sfindfil.sdf10
-rw-r--r--perllib/sdf/app.pl2
-rw-r--r--perllib/sdf/calc.pl4
-rwxr-xr-xperllib/sdf/filters.pl182
-rw-r--r--perllib/sdf/home/stdlib/bugtrack.sdm2
-rw-r--r--perllib/sdf/home/stdlib/delphi.sdm58
-rw-r--r--perllib/sdf/home/stdlib/mif.sdn4
-rw-r--r--perllib/sdf/home/stdlib/misc.sdm6
-rw-r--r--perllib/sdf/home/stdlib/usecases.sdm2
-rw-r--r--perllib/sdf/macros.pl334
-rw-r--r--perllib/sdf/misc.pl4
-rw-r--r--perllib/sdf/name.pl2
-rwxr-xr-xperllib/sdf/parse.pl194
-rw-r--r--perllib/sdf/podmacs.pl4
-rw-r--r--perllib/sdf/post_mf6.pl2
-rw-r--r--perllib/sdf/subs.pl142
-rw-r--r--perllib/sdf/tohtml.pl180
-rwxr-xr-xperllib/sdf/tolatex.pl40
-rwxr-xr-xperllib/sdf/tomif.pl160
-rwxr-xr-xperllib/sdf/topod.pl22
-rwxr-xr-xperllib/sdf/tosgml.pl22
-rwxr-xr-xperllib/sdf/totxt.pl20
-rw-r--r--perllib/sdf/values.pl18
-rw-r--r--t/macro/inherit.sdf2
29 files changed, 729 insertions, 729 deletions
diff --git a/bin/mif2rtf b/bin/mif2rtf
index ba45e9e..895ea7e 100755
--- a/bin/mif2rtf
+++ b/bin/mif2rtf
@@ -3032,7 +3032,7 @@ sub panic {
local($i,$_);
local($p,$f,$l,$s,$h,$a,@a,@sub);
for ($i = 1; ($p,$f,$l,$s,$h,$w) = caller($i); $i++) {
- @a = @DB'args;
+ @a = @DB::args;
for (@a) {
if (/^StB\000/ && length($_) == length($_main{'_main'})) {
$_ = sprintf("%s",$_);
diff --git a/bin/sdf b/bin/sdf
index 0504b34..93c833a 100755
--- a/bin/sdf
+++ b/bin/sdf
@@ -604,17 +604,17 @@ sub argPostProcess {
# Ensure the necessary variables are exported to the 'user' package
# Note: If post-processing is the only thing requested, the output
# extension is taken from the input filename
- $SDF_USER'short = (&NameSplit($ARGV))[1];
- $SDF_USER'long = &NameJoin($out_dir, $SDF_USER'short, '');
- $SDF_USER'out_ext = $out_ext eq '' ? (&NameSplit($ARGV))[2] : $out_ext;
- $SDF_USER'width = $SDF_USER'var{'OPT_WIDTH'};
- $SDF_USER'title = $SDF_USER'var{'DOC_TITLE'};
- $SDF_USER'title =~ s/['\\]/\\$&/g;
- $SDF_USER'project = $SDF_USER'var{'DOC_PROJECT'};
- $SDF_USER'project =~ s/['\\]/\\$&/g;
- $SDF_USER'product = $SDF_USER'var{'DOC_PRODUCT'};
- $SDF_USER'product =~ s/['\\]/\\$&/g;
- $SDF_USER'section = $SDF_USER'var{'DOC_SECTION'} || 1;
+ $SDF_USER::short = (&NameSplit($ARGV))[1];
+ $SDF_USER::long = &NameJoin($out_dir, $SDF_USER::short, '');
+ $SDF_USER::out_ext = $out_ext eq '' ? (&NameSplit($ARGV))[2] : $out_ext;
+ $SDF_USER::width = $SDF_USER::var{'OPT_WIDTH'};
+ $SDF_USER::title = $SDF_USER::var{'DOC_TITLE'};
+ $SDF_USER::title =~ s/['\\]/\\$&/g;
+ $SDF_USER::project = $SDF_USER::var{'DOC_PROJECT'};
+ $SDF_USER::project =~ s/['\\]/\\$&/g;
+ $SDF_USER::product = $SDF_USER::var{'DOC_PRODUCT'};
+ $SDF_USER::product =~ s/['\\]/\\$&/g;
+ $SDF_USER::section = $SDF_USER::var{'DOC_SECTION'} || 1;
# Do the post processing
for $action (@post_process) {
@@ -625,9 +625,9 @@ sub argPostProcess {
next if $verbose && $action =~ /clean/;
&AppMsg("object", "'$action' post processing...") if $verbose >= 0;
package SDF_USER;
- eval $'post_processing{$'action};
+ eval $::post_processing{$::action};
if ($@) {
- &'AppMsg('abort', "error in '$action' post processing: $@");
+ &::AppMsg('abort', "error in '$action' post processing: $@");
}
}
}
diff --git a/bin/sdfget b/bin/sdfget
index d6737d4..2df457e 100755
--- a/bin/sdfget
+++ b/bin/sdfget
@@ -267,7 +267,7 @@ sub argProcess {
# Get the file extension
my $filename = $ARGV eq '-' ? $formatting_filename : $ARGV;
- my $ext = (&'NameSplit($filename))[2];
+ my $ext = (&::NameSplit($filename))[2];
# Use the current file extension to guess the rule, if necessary
my $rule = $get_rule;
diff --git a/doc/guru/ex_filt.sdf b/doc/guru/ex_filt.sdf
index f2f5c55..fb1d03b 100644
--- a/doc/guru/ex_filt.sdf
+++ b/doc/guru/ex_filt.sdf
@@ -110,7 +110,7 @@ sub define_Filter {
local($family, $export, $name);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_define_FilterModel) if $validate;
@@ -118,9 +118,9 @@ sub define_Filter {
$family = $param{'family'};
$family .= '_' if $family ne '';
$export = $param{'export'};
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
$name = $family . $values{'Name'};
push(@text, "!define $name $values{'Value'}");
push(@text, "!export $name") if $export;
@@ -141,4 +141,4 @@ it looks for a file called {{filter_name}}.sdp and dynamically
loads the filter from that file if it can. This feature is useful
for complex filters which are rarely used.
-See the {{FILE:stdlib/module.sdp}} file for an example. \ No newline at end of file
+See the {{FILE:stdlib/module.sdp}} file for an example.
diff --git a/doc/ref/sfindfil.html b/doc/ref/sfindfil.html
index 92582df..51511ff 100644
--- a/doc/ref/sfindfil.html
+++ b/doc/ref/sfindfil.html
@@ -44,12 +44,12 @@
<B>my</B> @dirs = (<TT>'.'</TT>);
<B>my</B> $dir = $var{'DOC_DIR'};
<B>push</B>(@dirs, $dir) <B>if</B> $dir <B>ne</B> cwd();
- <B>push</B>(@dirs, @include_path, <TT>&quot;$'sdf_lib/stdlib&quot;</TT>, $'sdf_lib);
+ <B>push</B>(@dirs, @include_path, <TT>&quot;$::sdf_lib/stdlib&quot;</TT>, $::sdf_lib);
<I># Do the search</I>
<B>if</B> ($image) {
<B>my</B> $context = $var{'OPT_TARGET'};
- <B>my</B> @exts = @{$'SDF_IMAGE_EXTS{$context} || $'SDF_IMAGE_EXTS{'ps'}};
+ <B>my</B> @exts = @{$::SDF_IMAGE_EXTS{$context} || $::SDF_IMAGE_EXTS{'ps'}};
<B>return</B> &amp;'NameFindOrGenerate($filename, \@dirs, \@exts, $context);
}
<B>else</B> {
diff --git a/doc/ref/sfindfil.sdf b/doc/ref/sfindfil.sdf
index 750e1ae..a9f46a3 100644
--- a/doc/ref/sfindfil.sdf
+++ b/doc/ref/sfindfil.sdf
@@ -44,16 +44,16 @@ sub FindFile {
my @dirs = ('.');
my $dir = $var{'DOC_DIR'};
push(@dirs, $dir) if $dir ne cwd();
- push(@dirs, @include_path, "$'sdf_lib/stdlib", $'sdf_lib);
+ push(@dirs, @include_path, "$::sdf_lib/stdlib", $::sdf_lib);
# Do the search
if ($image) {
my $context = $var{'OPT_TARGET'};
- my @exts = @{$'SDF_IMAGE_EXTS{$context} || $'SDF_IMAGE_EXTS{'ps'}};
- return &'NameFindOrGenerate($filename, \@dirs, \@exts, $context);
+ my @exts = @{$::SDF_IMAGE_EXTS{$context} || $::SDF_IMAGE_EXTS{'ps'}};
+ return &::NameFindOrGenerate($filename, \@dirs, \@exts, $context);
}
else {
- return &'NameFind($filename, @dirs);
+ return &::NameFind($filename, @dirs);
}
}
!endblock
@@ -69,7 +69,7 @@ sub FindFile {
local($fullname);
# Search using our SCM
- $fullname = &'SearchSCM($filename, $image);
+ $fullname = &::SearchSCM($filename, $image);
# Return result
return $fullname;
diff --git a/perllib/sdf/app.pl b/perllib/sdf/app.pl
index 9a6aac9..0bd62fc 100644
--- a/perllib/sdf/app.pl
+++ b/perllib/sdf/app.pl
@@ -1707,7 +1707,7 @@ sub AppShowCallTree {
local($i,$p,$f,$l,$s,$h,$a,@a,@sub);
for ($i = 1; ($p,$f,$l,$s,$h,$w) = caller($i); $i++) {
- @a = @DB'args;
+ @a = @DB::args;
for (@a) {
if (/^StB\000/ && length($_) == length($_main{'_main'})) {
$_ = sprintf("%s",$_);
diff --git a/perllib/sdf/calc.pl b/perllib/sdf/calc.pl
index d9e18a8..581f0bc 100644
--- a/perllib/sdf/calc.pl
+++ b/perllib/sdf/calc.pl
@@ -426,7 +426,7 @@ sub _calc_expand_range {
if ($_calc_ops{"$op"}) {
$result .= $_calc_ops{"$op"}
} else {
- &'AppMsg('error', "unknown operator '$op'");
+ &::AppMsg('error', "unknown operator '$op'");
#print STDERR "calc_expand_range:Unknown operator $op\n";
$result .= ",";
}
@@ -656,7 +656,7 @@ sub _calc_var_name {
if ($_calc_cur_recurse > $_calc_max_recurse) {
if ("$_calc_last_warning" ne "$_calc_cur_warning") {
- &'AppMsg('warning', "CALC recursion limit reached '$_calc_cur_warning'");
+ &::AppMsg('warning', "CALC recursion limit reached '$_calc_cur_warning'");
$_calc_last_warning="$_calc_cur_warning";
}
$ret="CALCERROR";
diff --git a/perllib/sdf/filters.pl b/perllib/sdf/filters.pl
index 3a4366c..00749bf 100755
--- a/perllib/sdf/filters.pl
+++ b/perllib/sdf/filters.pl
@@ -224,7 +224,7 @@ sub InitFilters {
%jump = ();
%jump_label = ();
- $validate = $'verbose;
+ $validate = $::verbose;
%sdf_attrs = ();
@sdf_attr_stk = ();
@@ -301,8 +301,8 @@ sub _FilterValidate {
# It would be better not to parse this each time, but
# as it only happens during validate mode, its not worth
# caching the results just yet
- @parsed_model = &'TableParse(@model);
- &'TableValidate(*data, *parsed_model);
+ @parsed_model = &::TableParse(@model);
+ &::TableValidate(*data, *parsed_model);
}
#
@@ -760,35 +760,35 @@ sub table_Filter {
$param{'style'} = $style;
# Activate event processing
- &ReportEvents('table') if @'sdf_report_names;
+ &ReportEvents('table') if @::sdf_report_names;
&ExecEventsStyleMask(*evcode_table, *evmask_table);
- &ReportEvents('table', 'Post') if @'sdf_report_names;
+ &ReportEvents('table', 'Post') if @::sdf_report_names;
# Parse the text into a table
if (defined $param{'parseline'}) {
unshift(@text, $param{'parseline'});
delete $param{'parseline'};
}
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
# Filter and sort the table, if requested
if ($param{'where'} ne '') {
- @tbl = &'TableFilter(*tbl, $param{'where'}, *var);
+ @tbl = &::TableFilter(*tbl, $param{'where'}, *var);
delete $param{'where'};
}
if ($param{'sort'} ne '') {
@sort_by = $param{'sort'} == 1 ? () : split(/,/, $param{'sort'});
- @tbl = &'TableSort(*tbl, @sort_by);
+ @tbl = &::TableSort(*tbl, @sort_by);
delete $param{'sort'};
}
if ($param{'delete'} ne '') {
@delete = split(/,/, $param{'delete'});
- @tbl = &'TableDeleteFields(*tbl, @delete);
+ @tbl = &::TableDeleteFields(*tbl, @delete);
delete $param{'delete'};
}
if ($param{'select'} ne '') {
@select = split(/,/, $param{'select'});
- @tbl = &'TableSelectFields(*tbl, @select);
+ @tbl = &::TableSelectFields(*tbl, @select);
delete $param{'select'};
}
@@ -867,7 +867,7 @@ sub table_Filter {
# Check the column count in the format is ok
# (Note: TableFieldsCheck checks for duplicate columns)
$tbl_header = shift @tbl;
- @flds = &'TableFieldsCheck($tbl_header);
+ @flds = &::TableFieldsCheck($tbl_header);
$tbl_cols = scalar(@flds);
# Calculate the row number of the first body row
@@ -888,7 +888,7 @@ sub table_Filter {
$cell =~ s/_(_*)/$& eq '_' ? ' ' : $1/eg if $nice_hdgs;
$default_heading{$fld} = $cell;
}
- unshift(@tbl, &'TableRecJoin(*flds, %default_heading));
+ unshift(@tbl, &::TableRecJoin(*flds, %default_heading));
$body_start = 1;
}
@@ -944,14 +944,14 @@ sub table_Filter {
%cover = ();
$actual_cols = $tbl_cols;
$actual_cols *= $wrap if $wrap;
- @sdf = ("!table $actual_cols;" . &'SdfAttrJoin(*param));
+ @sdf = ("!table $actual_cols;" . &::SdfAttrJoin(*param));
for $rec (@tbl) {
if ($rec =~ /^!/) {
push(@sdf, $rec);
next;
}
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
cell:
for ($col = 0; $col <= $#flds; $col++) {
$fld = $flds[$col];
@@ -994,7 +994,7 @@ sub table_Filter {
# If this cell is covered by the span of another,
# check that it is blank
if ($hidden && $cell ne '') {
- &'AppMsg("warning", "ignoring hidden cell ($row,$col)='$cell'");
+ &::AppMsg("warning", "ignoring hidden cell ($row,$col)='$cell'");
}
# Get the custom cell attributes, if any.
@@ -1002,11 +1002,11 @@ sub table_Filter {
# although the top line may contain other cell attributes
%cell = ();
if (substr($cell, 0, 1) eq "\n") {
- ($cell, %cell) = &'SdfParseCell(substr($cell, 1));
+ ($cell, %cell) = &::SdfParseCell(substr($cell, 1));
$cell{'sdf'} = 1;
}
else {
- ($cell, %cell) = &'SdfParseCell($cell);
+ ($cell, %cell) = &::SdfParseCell($cell);
}
# Enable spreadsheet-like access/calculations
@@ -1038,7 +1038,7 @@ sub table_Filter {
if ($oncell) {
eval $oncell;
if ($@) {
- &'AppMsg("error", "oncell processing failed: $@");
+ &::AppMsg("error", "oncell processing failed: $@");
}
}
@@ -1070,7 +1070,7 @@ sub table_Filter {
# Add the cell
delete $cell{'tag'};
- push(@sdf, "!cell " . &'SdfAttrJoin(*cell), split("\n", $cell));
+ push(@sdf, "!cell " . &::SdfAttrJoin(*cell), split("\n", $cell));
}
# We only increment the row number for non-macro rows
@@ -1180,17 +1180,17 @@ sub topics_Filter {
local($file);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_topics_FilterModel) if $validate;
# Get the list of fields
- @flds = &'TableFields(shift @tbl);
+ @flds = &::TableFields(shift @tbl);
# If this is topics data, store it
if ($param{'data'}) {
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
$file = $values{'Topic'};
$topic_label{$file} = $values{'Label'};
$topic_level{$file} = $values{'Level'};
@@ -1206,12 +1206,12 @@ sub topics_Filter {
if ($var{'HTML_SUBTOPICS_MODE'}) {
push(@text, $param{'intro'}) if $param{'intro'} ne '';
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
$topic = $values{'Topic'};
$file = $topic;
# this next line is needed once topics mode supports files
# outside the current directory
- #$file = &'NameAbsolute(&FindFile("$topic.sdf"));
+ #$file = &::NameAbsolute(&FindFile("$topic.sdf"));
$label = $values{'Label'} ? $values{'Label'} : $topic_label{$file};
$label = $topic if $label eq '';
#push(@text, "L1[jump='$topic.html'] $label");
@@ -1224,7 +1224,7 @@ sub topics_Filter {
# Otherwise, include the topics as subsections
else {
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
$topic = $values{'Topic'};
push(@text, "!include '$topic.sdf'");
}
@@ -1249,16 +1249,16 @@ sub jumps_Filter {
local($jump);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_jumps_FilterModel) if $validate;
# Get the list of fields
- @flds = &'TableFields(shift @tbl);
+ @flds = &::TableFields(shift @tbl);
# Store the data
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
$jump = $values{'Jump'};
$jump{$jump} = $values{'Physical'};
}
@@ -1356,7 +1356,7 @@ sub box_Filter {
delete $param{'fill'};
}
if (%param) {
- $params .= '; ' . &'SdfAttrJoin(*param);
+ $params .= '; ' . &::SdfAttrJoin(*param);
}
@text = ("!block table; $params", 'Dummy', '<<', @text, '>>', '!endblock');
}
@@ -1383,7 +1383,7 @@ sub namevalues_Filter {
local($width);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
&_FilterValidate(*tbl, *_namevalues_FilterModel) if $validate;
# Decide on the format
@@ -1410,9 +1410,9 @@ sub namevalues_Filter {
}
else {
@text = ();
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
push(@text, "NV[label='$values{'Name'}\\t']$values{'Value'}");
}
}
@@ -1435,7 +1435,7 @@ sub define_Filter {
local($family, $export, $name);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_define_FilterModel) if $validate;
@@ -1443,9 +1443,9 @@ sub define_Filter {
$family = $param{'family'};
$family .= '_' if $family ne '';
$export = $param{'export'};
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
$name = $family . $values{'Name'};
push(@text, "!define $name $values{'Value'}");
push(@text, "!export $name") if $export;
@@ -1469,7 +1469,7 @@ sub default_Filter {
local($family, $export, $name);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_default_FilterModel) if $validate;
@@ -1477,9 +1477,9 @@ sub default_Filter {
$family = $param{'family'};
$family .= '_' if $family ne '';
$export = $param{'export'};
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
$name = $family . $values{'Name'};
push(@text, "!default $name $values{'Value'}");
push(@text, "!export $name") if $export && !$export{$name};
@@ -1494,7 +1494,7 @@ sub script_Filter {
# execute the code
eval join("\n", @text);
if ($@) {
- &'AppMsg("error", "script failed: $@");
+ &::AppMsg("error", "script failed: $@");
}
@text = ();
}
@@ -1563,7 +1563,7 @@ sub end_Filter {
local(*text, %param) = @_;
# We prepend a blank line so that multiple end sections remain separate.
- unshift(@'sdf_end, '', @text);
+ unshift(@::sdf_end, '', @text);
@text = ();
}
@@ -1662,7 +1662,7 @@ sub hlp_header_Filter {
local($item, @items,$thetext);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_hlp_header_FilterModel) if $validate;
@@ -1670,9 +1670,9 @@ sub hlp_header_Filter {
return unless $var{'OPT_TARGET'} eq 'hlp';
# Process the data
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
$thetext=$values{'Text'};
if ($values{'Kind'} eq 'jump') {
$item = "{{N[jump='#jump_${topic}_$thetext';size='8 pt'] $thetext}}";
@@ -1731,14 +1731,14 @@ sub docstyles_Filter {
local($to);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_docstyles_FilterModel) if $validate;
# Process the data
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
# Update the declaration, if necessary
$name = $values{'Name'};
@@ -1774,16 +1774,16 @@ sub variables_Filter {
local($family, @fullname);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_variables_FilterModel) if $validate;
# Process the data
@family = split(/,/, $param{'family'});
$export = $param{'export'};
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
# Update the declaration
$name = $values{'Name'};
@@ -1827,14 +1827,14 @@ sub parastyles_Filter {
local($to);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_parastyles_FilterModel) if $validate;
# Process the data
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
# Update the declaration, if necessary
$name = $values{'Name'};
@@ -1874,15 +1874,15 @@ sub paraattrs_Filter {
local($to, $map, $attrs);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_paraattrs_FilterModel) if $validate;
# Process the data
$family = $param{'family'} ne '' ? "$param{'family'}." : '';
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
# Update the declaration, if necessary
$name = $family . $values{'Name'};
@@ -1921,14 +1921,14 @@ sub phrasestyles_Filter {
local($proxy);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_phrasestyles_FilterModel) if $validate;
# Process the data
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
# Update the declaration, if necessary
$name = $values{'Name'};
@@ -1945,7 +1945,7 @@ sub phrasestyles_Filter {
$to = $phrasestyles_to{$proxy};
}
else {
- &'AppMsg("warning", "unknown phrase style $proxy '$proxy");
+ &::AppMsg("warning", "unknown phrase style $proxy '$proxy");
$to = $proxy;
}
}
@@ -1979,16 +1979,16 @@ sub phraseattrs_Filter {
local($to, $map, $attrs);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_phraseattrs_FilterModel) if $validate;
# Process the data
$family = $param{'family'} ne '' ? "$param{'family'}." : '';
$para = $param{'para'};
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
# Update the declaration, if necessary
$name = $family . $values{'Name'};
@@ -2032,14 +2032,14 @@ sub tablestyles_Filter {
local($to);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_tablestyles_FilterModel) if $validate;
# Process the data
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
# Update the declaration, if necessary
$name = $values{'Name'};
@@ -2077,15 +2077,15 @@ sub tableparams_Filter {
local($to, $map, $params);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_tableparams_FilterModel) if $validate;
# Process the data
$family = $param{'family'} ne '' ? "$param{'family'}." : '';
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
# Update the declaration, if necessary
$name = $family . $values{'Name'};
@@ -2130,15 +2130,15 @@ sub rowparams_Filter {
local($to, $map, $params);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_rowparams_FilterModel) if $validate;
# Process the data
$family = $param{'family'} ne '' ? "$param{'family'}." : '';
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
# Update the declaration, if necessary
$name = $family . $values{'Name'};
@@ -2183,15 +2183,15 @@ sub cellparams_Filter {
local($to, $map, $params);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_cellparams_FilterModel) if $validate;
# Process the data
$family = $param{'family'} ne '' ? "$param{'family'}." : '';
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
# Update the declaration, if necessary
$name = $family . $values{'Name'};
@@ -2231,19 +2231,19 @@ sub targetobjects_Filter {
local(%attrs);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_targetobjects_FilterModel) if $validate;
# Process the data
$type = $param{'type'};
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
- %attrs = &'SdfAttrSplit($values{'Attributes'});
+ %values = &::TableRecSplit(*flds, $rec);
+ %attrs = &::SdfAttrSplit($values{'Attributes'});
$attrs{'Name'} = $values{'Name'};
$attrs{'Parent'} = $values{'Parent'};
- push(@text, &'SdfJoin("__object", $type, %attrs));
+ push(@text, &::SdfJoin("__object", $type, %attrs));
}
}
@@ -2261,14 +2261,14 @@ sub datestrings_Filter {
local($strings);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_datestrings_FilterModel) if $validate;
# Process the data
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
$strings = [ split(/\s+/, eval $values{'Values'}) ];
$main::misc_date_strings{$values{'Symbol'}} = $strings;
}
@@ -2287,15 +2287,15 @@ sub meta_Filter {
local(@tbl, @flds, $rec, %values);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_meta_FilterModel) if $validate;
# Process the data
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
- push(@text, &'SdfJoin("__object", "meta", %values));
+ %values = &::TableRecSplit(*flds, $rec);
+ push(@text, &::SdfJoin("__object", "meta", %values));
}
}
@@ -2313,17 +2313,17 @@ sub links_Filter {
local(@tbl, @flds, $rec, %values);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
&_FilterValidate(*tbl, *_links_FilterModel) if $validate;
# Process the data
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
$values{'Type'} = 'text/css' if $values{'Type'} eq '';
$values{'Relationship'} = 'stylesheet' if $values{'Relationship'} eq '';
- push(@text, &'SdfJoin("__object", "link", %values));
+ push(@text, &::SdfJoin("__object", "link", %values));
}
}
@@ -2336,7 +2336,7 @@ sub stylesheet_Filter {
local(*text, %param) = @_;
# Process the data
- @text = (&'SdfJoin("__stylesheet", join("\n", @text), %param));
+ @text = (&::SdfJoin("__stylesheet", join("\n", @text), %param));
}
# package return value
diff --git a/perllib/sdf/home/stdlib/bugtrack.sdm b/perllib/sdf/home/stdlib/bugtrack.sdm
index 17c3885..ffeed25 100644
--- a/perllib/sdf/home/stdlib/bugtrack.sdm
+++ b/perllib/sdf/home/stdlib/bugtrack.sdm
@@ -56,7 +56,7 @@ sub bug_title_Macro {
$title = $db_title;
}
elsif ($title ne $db_title) {
- &'AppMsg("warning", "bug title does not match database value");
+ &::AppMsg("warning", "bug title does not match database value");
}
# Build result
diff --git a/perllib/sdf/home/stdlib/delphi.sdm b/perllib/sdf/home/stdlib/delphi.sdm
index 0d07c5d..73d3898 100644
--- a/perllib/sdf/home/stdlib/delphi.sdm
+++ b/perllib/sdf/home/stdlib/delphi.sdm
@@ -193,7 +193,7 @@ sub _DelphiGenerateHyperText {
if ($text =~ /\./) {
($group, $text) = split(/\./, $text, 2);
unless (defined($_delphi_groups{$group})) {
- &'AppMsg("warning", "unknown delphi group '$group'");
+ &::AppMsg("warning", "unknown delphi group '$group'");
}
$prefix = $_delphi_groups{$group};
}
@@ -222,7 +222,7 @@ sub _DelphiGenerateHyperText {
# delphi_groups - table of logical group names and matching jump prefixes
@_delphi_groups_FilterParams = ();
-@_delphi_groups_FilterModel = &'TableParse(
+@_delphi_groups_FilterModel = &::TableParse(
'Field Category Rule',
'Name key',
'Prefix optional',
@@ -232,21 +232,21 @@ sub delphi_groups_Filter {
local(@tbl, @flds, $rec, %values);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
- &'TableValidate(*tbl, *_delphi_groups_FilterModel);
+ &::TableValidate(*tbl, *_delphi_groups_FilterModel);
# Process the data
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
$_delphi_groups{$values{'Name'}} = $values{'Prefix'};
}
}
# delphi_properties - table of properties for a Delphi class
@_delphi_properties_FilterParams = ();
-@_delphi_properties_FilterModel = &'TableParse(
+@_delphi_properties_FilterModel = &::TableParse(
'Field Category Rule',
'Name key',
'Key optional <yes>',
@@ -259,15 +259,15 @@ sub delphi_properties_Filter {
local($row,$line,$pos);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
- &'TableValidate(*tbl, *_delphi_properties_FilterModel);
+ &::TableValidate(*tbl, *_delphi_properties_FilterModel);
# Sort the data
- @tbl = &'TableSort(*tbl, 'Name');
+ @tbl = &::TableSort(*tbl, 'Name');
# Get the line and row counts
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
$line_count=scalar(@tbl);
$row_count=int(($line_count+2)/3);
#print STDERR "LINE_COUNT $line_count ROW_COUNT $row_count\n";
@@ -310,7 +310,7 @@ sub delphi_properties_Filter {
$rec=$tbl[$pos];
#print STDERR "TBL[$line,$row,$pos]=$rec\n";
}
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
# divide into a three column table ...
if ($values{'RO'}) {
@@ -366,7 +366,7 @@ sub delphi_events_Filter {
}
# generic processing for methods & events
-@_delphi_keytable_FilterModel = &'TableParse(
+@_delphi_keytable_FilterModel = &::TableParse(
'Field Category Rule',
'Name key',
'Key optional <yes>'
@@ -393,15 +393,15 @@ sub _delphi_keytable {
}
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
- &'TableValidate(*tbl, *_delphi_keytable_FilterModel);
+ &::TableValidate(*tbl, *_delphi_keytable_FilterModel);
# Sort the data
- @tbl = &'TableSort(*tbl, 'Name');
+ @tbl = &::TableSort(*tbl, 'Name');
# Get the line and row counts
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
$line_count=scalar(@tbl);
$row_count=int(($line_count+2)/3);
#print STDERR "LINE_COUNT $line_count ROW_COUNT $row_count\n";
@@ -444,7 +444,7 @@ sub _delphi_keytable {
$rec=$tbl[$pos];
#print STDERR "TBL[$line,$row,$pos]=$rec\n";
}
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
# method/event doesn't have the RO field but does still
# use the same table formatting ... cute huh!
@@ -484,7 +484,7 @@ sub _delphi_keytable {
# delphi_see_also - a table of related entities
@_delphi_see_also_FilterParams = ();
-@_delphi_see_also_FilterModel = &'TableParse(
+@_delphi_see_also_FilterModel = &::TableParse(
'Field Category Rule',
'Name key',
'Category optional <component|object|exception|type|property|method|event|function|procedure>'
@@ -496,14 +496,14 @@ sub delphi_see_also_Filter {
local($item, @items, $style);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
- &'TableValidate(*tbl, *_delphi_see_also_FilterModel);
+ &::TableValidate(*tbl, *_delphi_see_also_FilterModel);
# Process the data
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
if ($values{'Category'}) {
$style = $delphi_l2s{$values{'Category'}};
$style =~ tr/a-z/A-Z/;
@@ -581,7 +581,7 @@ sub delphi_variables_Filter {
}
# generic processing for components, objects, types and routines
-@_delphi_list_FilterModel = &'TableParse(
+@_delphi_list_FilterModel = &::TableParse(
'Field Category Rule',
'Name key',
'Style optional',
@@ -593,17 +593,17 @@ sub _delphi_list {
local($item_style, $item, @items);
# Parse and validate the data
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
- &'TableValidate(*tbl, *_delphi_list_FilterModel);
+ &::TableValidate(*tbl, *_delphi_list_FilterModel);
# Sort the data
- @tbl = &'TableSort(*tbl, 'Name');
+ @tbl = &::TableSort(*tbl, 'Name');
# Process the data
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
for $rec (@tbl) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
$item_style = $values{'Style'} ne '' ? $values{'Style'} : $style;
$item = "{{$item_style: $values{'Name'}}}";
push(@items, $item);
diff --git a/perllib/sdf/home/stdlib/mif.sdn b/perllib/sdf/home/stdlib/mif.sdn
index 0bbbbc6..76f6b8b 100644
--- a/perllib/sdf/home/stdlib/mif.sdn
+++ b/perllib/sdf/home/stdlib/mif.sdn
@@ -303,7 +303,7 @@ section value='section\x11 <$paranumonly\>, \xd2 <$paratext\>\xd3 , on p
# Handle book mode
!if MIF_BOOK_MODE
# Start the front part
- !output &'MifNewComponent('front')
+ !output &::MifNewComponent('front')
# End the last component
!block end
@@ -313,7 +313,7 @@ section value='section\x11 <$paranumonly\>, \xd2 <$paratext\>\xd3 , on p
# Start a new component, when requested
!on paragraph '';; \
- &'MifNewComponent($attr{'component'}) if $attr{'component'}
+ &::MifNewComponent($attr{'component'}) if $attr{'component'}
# Make each level 1 heading a component, unless it is already one
!on paragraph '[HAP]1';; \
diff --git a/perllib/sdf/home/stdlib/misc.sdm b/perllib/sdf/home/stdlib/misc.sdm
index c42c25e..2de4af8 100644
--- a/perllib/sdf/home/stdlib/misc.sdm
+++ b/perllib/sdf/home/stdlib/misc.sdm
@@ -69,7 +69,7 @@ sub squish_Macro {
} elsif ($state eq 'off') {
push(@text,'!off paragraph __squish_filter');
} else {
- &'AppMsg("error", "squish \"$state\" not yet implemented");
+ &::AppMsg("error", "squish \"$state\" not yet implemented");
return ();
}
@@ -95,7 +95,7 @@ sub keep_Macro {
} elsif ($state eq 'off') {
push(@text,'!off paragraph __keep_filter');
} else {
- &'AppMsg("error", "keep \"$state\" not yet implemented");
+ &::AppMsg("error", "keep \"$state\" not yet implemented");
return ();
}
return (@text);
@@ -118,7 +118,7 @@ sub hyphen_Macro {
} elsif ($state eq 'on') {
push(@text,'!off paragraph __hyphen_filter');
} else {
- &'AppMsg("error", "hyphen \"$state\" not yet implemented");
+ &::AppMsg("error", "hyphen \"$state\" not yet implemented");
return ();
}
return (@text);
diff --git a/perllib/sdf/home/stdlib/usecases.sdm b/perllib/sdf/home/stdlib/usecases.sdm
index dd4e7fe..955dbbe 100644
--- a/perllib/sdf/home/stdlib/usecases.sdm
+++ b/perllib/sdf/home/stdlib/usecases.sdm
@@ -76,7 +76,7 @@ sub uc_title_Macro {
$title = $db_title;
}
elsif ($title ne $db_title) {
- &'AppMsg("warning", "usecase title does not match database value");
+ &::AppMsg("warning", "usecase title does not match database value");
}
# Build result
diff --git a/perllib/sdf/macros.pl b/perllib/sdf/macros.pl
index 644f441..e2fedf0 100644
--- a/perllib/sdf/macros.pl
+++ b/perllib/sdf/macros.pl
@@ -181,7 +181,7 @@ sub InitMacros {
%readonly = ();
%restricted = ();
- for $name (keys %'sdf_target) {
+ for $name (keys %::sdf_target) {
$name =~ tr/a-z/A-Z/;
$restricted{$name} = 1;
}
@@ -217,10 +217,10 @@ sub _PageHF {
%mac_parts = %parts;
}
else {
- %mac_parts = &'SdfAttrSplit($page_hf{$comp_page});
+ %mac_parts = &::SdfAttrSplit($page_hf{$comp_page});
@mac_parts{keys %parts} = values %parts;
}
- $page_hf{$comp_page} = &'SdfAttrJoin(*mac_parts);
+ $page_hf{$comp_page} = &::SdfAttrJoin(*mac_parts);
# Get the part ordering information
$first = 1;
@@ -297,9 +297,9 @@ sub _ClassHandler {
local($view);
local($make_vars, $var_name);
- @tbl = &'TableParse(@text);
+ @tbl = &::TableParse(@text);
@text = ();
- &'TableValidate(*tbl, *rules);
+ &::TableValidate(*tbl, *rules);
# Get the class details
$name_style = $_class{$class,'name_style'};
@@ -344,14 +344,14 @@ sub _ClassHandler {
}
# Process the data
- (@flds) = &'TableFields(shift @tbl);
+ (@flds) = &::TableFields(shift @tbl);
$root = $param{'root'};
for $rec (@tbl) {
if ($rec =~ /^!/) {
push(@text, $rec);
next;
}
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
# Get the fields of interest
$name = $values{$name_fld};
@@ -379,7 +379,7 @@ sub _ClassHandler {
# For display tables, build the output
if ($process eq 'display') {
if ($long_fld && $long eq '' && $jump eq '') {
- &'AppMsg("warning", "unknown object '$name' in class '$class'");
+ &::AppMsg("warning", "unknown object '$name' in class '$class'");
}
@out_values = ();
for ($i = 0; $i <= $#out_fields; $i++) {
@@ -477,7 +477,7 @@ sub _ObjectNameEP {
# Validate the object
if (! $obj_name{$class,$text}) {
- &'AppMsg("warning", "unknown object '$text' in class '$class' (name EP)");
+ &::AppMsg("warning", "unknown object '$text' in class '$class' (name EP)");
}
# Generate the hypertext, if any
@@ -493,7 +493,7 @@ sub _ObjectNameEP {
$text = $obj_name{$class,$text,$long_fld};
}
else {
- &'AppMsg("warning", "unable to expand object '$text' in class '$class'");
+ &::AppMsg("warning", "unable to expand object '$text' in class '$class'");
}
}
@@ -514,7 +514,7 @@ sub _ObjectLongEP {
# Validate the object
if (! $obj_long{$class,$text}) {
- &'AppMsg("warning", "unknown object '$text' in class '$class' (long EP)");
+ &::AppMsg("warning", "unknown object '$text' in class '$class' (long EP)");
}
# Generate the hypertext, if any
@@ -530,7 +530,7 @@ sub _ObjectLongEP {
$text = $obj_long{$class,$text,$name_fld};
}
else {
- &'AppMsg("warning", "unable to shrink object '$text' in class '$class'");
+ &::AppMsg("warning", "unable to shrink object '$text' in class '$class'");
}
}
@@ -553,13 +553,13 @@ sub _ObjectLongEP {
sub block_Macro {
local(%arg) = @_;
local(@text);
-#print STDERR "sb1 file: $'ARGV, lineno: $'app_lineno<\n";
+#print STDERR "sb1 file: $::ARGV, lineno: $::app_lineno<\n";
# Update the parser state
- $'sdf_block_start = $'app_lineno;
- $'sdf_block_type = 'block';
- @'sdf_block_text = ();
- %'sdf_block_arg = %arg;
+ $::sdf_block_start = $::app_lineno;
+ $::sdf_block_type = 'block';
+ @::sdf_block_text = ();
+ %::sdf_block_arg = %arg;
# Return result
return ();
@@ -572,27 +572,27 @@ sub endblock_Macro {
local(@text);
# Check the state
- if ($'sdf_block_type ne 'block') {
- &'AppMsg("error", "endblock macro not expected");
+ if ($::sdf_block_type ne 'block') {
+ &::AppMsg("error", "endblock macro not expected");
return ();
}
# Update the parser state
- $'sdf_block_type = '';
+ $::sdf_block_type = '';
# Filter the text
- &ExecFilter($'sdf_block_arg{'filter'}, *'sdf_block_text,
- $'sdf_block_arg{'params'}, $'sdf_block_start, $'ARGV, 'filter on ');
+ &ExecFilter($::sdf_block_arg{'filter'}, *::sdf_block_text,
+ $::sdf_block_arg{'params'}, $::sdf_block_start, $::ARGV, 'filter on ');
# Mark the text as a section, if necessary
- if (@'sdf_block_text) {
- unshift(@'sdf_block_text,
- "!_bos_ $'sdf_block_start;block on ");
- push(@'sdf_block_text, "!_eos_ $'app_lineno;$'app_context");
+ if (@::sdf_block_text) {
+ unshift(@::sdf_block_text,
+ "!_bos_ $::sdf_block_start;block on ");
+ push(@::sdf_block_text, "!_eos_ $::app_lineno;$::app_context");
}
# Return result
- return @'sdf_block_text;
+ return @::sdf_block_text;
}
# include - include another file
@@ -612,13 +612,13 @@ sub include_Macro {
$filename = $arg{'filename'};
$fullname = &FindFile($filename);
if ($fullname eq '') {
- &'AppMsg("warning", "unable to find '$filename'");
+ &::AppMsg("warning", "unable to find '$filename'");
return ();
}
# Get the text
unless (&FileFetch(*text, $fullname)) {
- &'AppMsg("warning", "unable to read '$fullname'");
+ &::AppMsg("warning", "unable to read '$fullname'");
return ();
}
@@ -648,7 +648,7 @@ sub use_Macro {
# Get the file location
$fullname = &FindModule($filename);
if ($fullname eq '') {
- &'AppMsg("warning", "unable to find '$filename'");
+ &::AppMsg("warning", "unable to find '$filename'");
return ();
}
@@ -657,7 +657,7 @@ sub use_Macro {
# Get the text
unless (&FileFetch(*text, $fullname)) {
- &'AppMsg("warning", "unable to read '$fullname'");
+ &::AppMsg("warning", "unable to read '$fullname'");
return ();
}
@@ -686,12 +686,12 @@ sub inherit_Macro {
$library = $arg{'library'};
$dos_library = $library;
$dos_library =~ s#/#\\#g;
- $module = (&'NameSplit($library))[1];
+ $module = (&::NameSplit($library))[1];
if (-f "$module.sdm") {
# Module is in the current directory
$library = '.';
}
- elsif (&'NameIsAbsolute($library)) {
+ elsif (&::NameIsAbsolute($library)) {
push(@include_path, $library);
push(@module_path, $library);
$var{'HLP_OPTIONS_ROOT'} .= ", $dos_library";
@@ -704,7 +704,7 @@ sub inherit_Macro {
$var{'HLP_OPTIONS_ROOT'} .= ", $var{'SDF_DOSHOME'}\\$dos_library";
}
else {
- &'AppMsg("warning", "unable to find library '$library'");
+ &::AppMsg("warning", "unable to find library '$library'");
return ();
}
}
@@ -731,7 +731,7 @@ sub execute_Macro {
# Get the text
$cmd = $arg{'cmd'};
unless (&FileFetch(*text, "$cmd|")) {
- &'AppMsg("error", "failed to execute '$cmd'");
+ &::AppMsg("error", "failed to execute '$cmd'");
return ();
}
@@ -757,11 +757,11 @@ sub import_Macro {
# Process the filename and attributes
$filename = $arg{'filename'};
- %params = &'SdfAttrSplit($arg{'params'});
+ %params = &::SdfAttrSplit($arg{'params'});
&ProcessImageAttrs(*filename, *params);
# Return result
- return (&'SdfJoin('__import', $filename, %params));
+ return (&::SdfJoin('__import', $filename, %params));
}
# jumps - create jump lines
@@ -1004,7 +1004,7 @@ sub define_Macro {
## If the variable looks like an enum, output an error
#if ($name =~ /^[A-Z][a-z]+$/) {
- # &'AppMsg("error", "'variable '$name' looks like an enumerated value");
+ # &::AppMsg("error", "'variable '$name' looks like an enumerated value");
# return ();
#}
@@ -1012,7 +1012,7 @@ sub define_Macro {
if ($name =~ /^([A-Z]+)_/ && $restricted{$1} &&
!$variables_name{$name}) {
$status = (defined($var{$name}) || $readonly{$1}) ? 'read-only' : 'unknown';
- &'AppMsg("warning", "'$1' variable '$name' is $status - ignoring definition");
+ &::AppMsg("warning", "'$1' variable '$name' is $status - ignoring definition");
return ();
}
@@ -1020,8 +1020,8 @@ sub define_Macro {
if ($variables_name{$name}) {
$type = $variables_type{$name};
$rule = $variables_rule{$name};
- unless (&'MiscCheckRule($value, $rule, $type)) {
- &'AppMsg("warning", "bad value '$value' for variable '$name'");
+ unless (&::MiscCheckRule($value, $rule, $type)) {
+ &::AppMsg("warning", "bad value '$value' for variable '$name'");
}
}
@@ -1030,7 +1030,7 @@ sub define_Macro {
# Export the variable, if necessary
if ($export{$name}) {
- @text = (&'SdfJoin('__object', 'Variable',
+ @text = (&::SdfJoin('__object', 'Variable',
'Name', $name,
'value', $value));
}
@@ -1086,7 +1086,7 @@ sub init_Macro {
local(%vars, $name, $value);
# Convert the name-value pairs to define macros
- %vars = &'SdfAttrSplit($arg{'vars'});
+ %vars = &::SdfAttrSplit($arg{'vars'});
for $name (sort keys %vars) {
$value = $vars{$name};
$value =~ s/'/\\'/g;
@@ -1113,7 +1113,7 @@ sub export_Macro {
# If already defined, export it immediately
if (defined $var{$name}) {
- @text = (&'SdfJoin('__object', 'Variable',
+ @text = (&::SdfJoin('__object', 'Variable',
'Name', $name,
'value', $var{$name}));
}
@@ -1134,10 +1134,10 @@ sub macro_Macro {
local(@text);
# Update the parser state
- $'sdf_block_start = $'app_lineno;
- $'sdf_block_type = 'macro';
- @'sdf_block_text = ();
- %'sdf_block_arg = %arg;
+ $::sdf_block_start = $::app_lineno;
+ $::sdf_block_type = 'macro';
+ @::sdf_block_text = ();
+ %::sdf_block_arg = %arg;
# Return result
return ();
@@ -1150,16 +1150,16 @@ sub endmacro_Macro {
local(@text);
# Check the state
- if ($'sdf_block_type ne 'macro') {
- &'AppMsg("error", "endmacro macro not expected");
+ if ($::sdf_block_type ne 'macro') {
+ &::AppMsg("error", "endmacro macro not expected");
return ();
}
# Update the parser state
- $'sdf_block_type = '';
+ $::sdf_block_type = '';
# Save the definition
- $macro{$'sdf_block_arg{'name'}} = join("\n", @'sdf_block_text);
+ $macro{$::sdf_block_arg{'name'}} = join("\n", @::sdf_block_text);
# Return result
return ();
@@ -1202,7 +1202,7 @@ sub class_Macro {
# Build the filter
$code = <<end_of_code;
\@_${name}_FilterParams = \@_CLASS_PARAMS;
- \@_${name}_FilterModel = &'TableParse(\@rules);
+ \@_${name}_FilterModel = &::TableParse(\@rules);
sub ${name}_Filter {
local(*text, %param) = \@_;
@@ -1213,7 +1213,7 @@ end_of_code
# Create the filter
eval $code;
if ($@) {
- &'AppMsg("error", "filter creation failed: $@");
+ &::AppMsg("error", "filter creation failed: $@");
}
# Declare the object styles
@@ -1299,7 +1299,7 @@ sub script_Macro {
# execute the code
eval $arg{'code'};
if ($@) {
- &'AppMsg("error", "script failed: $@");
+ &::AppMsg("error", "script failed: $@");
}
# Return result
@@ -1342,7 +1342,7 @@ sub div_Macro {
# to do ...
# Return result
- return (&'SdfJoin("__div", $arg{'name'}, ()));
+ return (&::SdfJoin("__div", $arg{'name'}, ()));
}
# enddiv - end a macro definition
@@ -1352,13 +1352,13 @@ sub enddiv_Macro {
local(@text);
## Check the state
- #if ($'sdf_block_type ne 'macro') {
- # &'AppMsg("warning", "enddiv macro not expected");
+ #if ($::sdf_block_type ne 'macro') {
+ # &::AppMsg("warning", "enddiv macro not expected");
# return ();
#}
# Return result
- return (&'SdfJoin("__enddiv", "", ()));
+ return (&::SdfJoin("__enddiv", "", ()));
}
@@ -1376,19 +1376,19 @@ sub if_Macro {
# If we are nested inside a section of an if macro which is not
# to be included, we exclude all sections of this macro.
- push(@'sdf_if_start, $'app_lineno);
- if (@'sdf_if_now && ! $'sdf_if_now[$#main'sdf_if_now]) {
- push(@'sdf_if_now, 0);
- push(@'sdf_if_yet, 1);
- push(@'sdf_if_else, 0);
+ push(@::sdf_if_start, $::app_lineno);
+ if (@::sdf_if_now && ! $::sdf_if_now[$#main::sdf_if_now]) {
+ push(@::sdf_if_now, 0);
+ push(@::sdf_if_yet, 1);
+ push(@::sdf_if_else, 0);
}
# Otherwise, evaluate the expression and process accordingly.
else {
$expr_value = $arg{'value'};
- push(@'sdf_if_now, $expr_value);
- push(@'sdf_if_yet, $expr_value);
- push(@'sdf_if_else, 0);
+ push(@::sdf_if_now, $expr_value);
+ push(@::sdf_if_yet, $expr_value);
+ push(@::sdf_if_else, 0);
}
# Return result
@@ -1407,28 +1407,28 @@ sub elsif_Macro {
local($expr_value);
# elsif not permitted outside an if macro
- unless (@'sdf_if_now) {
- &'AppMsg("error", "!elsif not expected");
+ unless (@::sdf_if_now) {
+ &::AppMsg("error", "!elsif not expected");
return ();
}
# Get the current nesting level
- $level = $#main'sdf_if_yet;
+ $level = $#main::sdf_if_yet;
# elsif after an else is not permitted
- if ($'sdf_if_else[$level]) {
- &'AppMsg("error", "!elsif found after else macro");
+ if ($::sdf_if_else[$level]) {
+ &::AppMsg("error", "!elsif found after else macro");
return ();
}
# Only evaluate the expression if we haven't included a section yet
- if (! $'sdf_if_yet[$level]) {
+ if (! $::sdf_if_yet[$level]) {
$expr_value = $arg{'value'};
- $'sdf_if_now[$level] = $expr_value;
- $'sdf_if_yet[$level] = $expr_value;
+ $::sdf_if_now[$level] = $expr_value;
+ $::sdf_if_yet[$level] = $expr_value;
}
else {
- $'sdf_if_now[$level] = 0;
+ $::sdf_if_now[$level] = 0;
}
# Return result
@@ -1452,25 +1452,25 @@ sub else_Macro {
local($level);
# else not permitted outside an if macro
- unless (@'sdf_if_now) {
- &'AppMsg("error", "!else not expected");
+ unless (@::sdf_if_now) {
+ &::AppMsg("error", "!else not expected");
return ();
}
# Get the current nesting level
- $level = $#main'sdf_if_yet;
+ $level = $#main::sdf_if_yet;
# record that we have encountered the else
# (this is needed for checking that an elsif does not follow it)
- $'sdf_if_else[$level] = 1;
+ $::sdf_if_else[$level] = 1;
# Only include this section if we haven't included a section yet
- if (! $'sdf_if_yet[$level]) {
- $'sdf_if_now[$level] = 1;
- $'sdf_if_yet[$level] = 1;
+ if (! $::sdf_if_yet[$level]) {
+ $::sdf_if_now[$level] = 1;
+ $::sdf_if_yet[$level] = 1;
}
else {
- $'sdf_if_now[$level] = 0;
+ $::sdf_if_now[$level] = 0;
}
# Return result
@@ -1484,15 +1484,15 @@ sub endif_Macro {
local(@text);
# endif not permitted outside an if macro
- unless (@'sdf_if_now) {
- &'AppMsg("error", "!endif not expected");
+ unless (@::sdf_if_now) {
+ &::AppMsg("error", "!endif not expected");
return ();
}
- pop(@'sdf_if_start);
- pop(@'sdf_if_now);
- pop(@'sdf_if_yet);
- pop(@'sdf_if_else);
+ pop(@::sdf_if_start);
+ pop(@::sdf_if_now);
+ pop(@::sdf_if_yet);
+ pop(@::sdf_if_else);
# Return result
return ();
@@ -1542,8 +1542,8 @@ sub table_Macro {
local($col, $unspecified);
# Update the state
- push(@'sdf_tbl_state, 1);
- push(@'sdf_tbl_start, $'app_lineno);
+ push(@::sdf_tbl_state, 1);
+ push(@::sdf_tbl_start, $::app_lineno);
# Validate and clean the parameters
%param = &SdfTableParams('table', $arg{'params'}, *tableparams_name,
@@ -1598,7 +1598,7 @@ sub table_Macro {
delete $param{'narrow'};
# Build the result
- @text = (&'SdfJoin("__table", $arg{'columns'}, %param));
+ @text = (&::SdfJoin("__table", $arg{'columns'}, %param));
# Return result
return @text;
@@ -1616,8 +1616,8 @@ sub row_Macro {
local(%param);
# Check the state
- unless (@'sdf_tbl_state) {
- &'AppMsg("error", "!row not expected");
+ unless (@::sdf_tbl_state) {
+ &::AppMsg("error", "!row not expected");
return ();
}
@@ -1629,7 +1629,7 @@ sub row_Macro {
*rowparams_type, *rowparams_rule);
# Build the result
- @text = (&'SdfJoin("__row", $arg{'type'}, %param));
+ @text = (&::SdfJoin("__row", $arg{'type'}, %param));
# Return result
return @text;
@@ -1646,8 +1646,8 @@ sub cell_Macro {
local(%param);
# Check the state
- unless (@'sdf_tbl_state) {
- &'AppMsg("error", "!cell not expected");
+ unless (@::sdf_tbl_state) {
+ &::AppMsg("error", "!cell not expected");
return ();
}
@@ -1659,7 +1659,7 @@ sub cell_Macro {
*cellparams_type, *cellparams_rule);
# Build the result
- @text = (&'SdfJoin("__cell", '', %param));
+ @text = (&::SdfJoin("__cell", '', %param));
# Return result
return @text;
@@ -1672,17 +1672,17 @@ sub endtable_Macro {
local(@text);
# Check the state
- unless (@'sdf_tbl_state) {
- &'AppMsg("error", "!endtable not expected");
+ unless (@::sdf_tbl_state) {
+ &::AppMsg("error", "!endtable not expected");
return ();
}
# Update the state
- pop(@'sdf_tbl_state);
- pop(@'sdf_tbl_start);
+ pop(@::sdf_tbl_state);
+ pop(@::sdf_tbl_start);
# Build the result
- @text = (&'SdfJoin("__endtable", ''));
+ @text = (&::SdfJoin("__endtable", ''));
# Return result
return @text;
@@ -1704,7 +1704,7 @@ sub build_header_Macro {
# Get the arguments
@pages = split(/,/, $arg{'pages'});
- %parts = &'SdfAttrSplit($arg{'parts'});
+ %parts = &::SdfAttrSplit($arg{'parts'});
# Return result
return &_PageHF('HEADER', 1, $arg{'component'}, *pages, *parts);
@@ -1724,7 +1724,7 @@ sub build_footer_Macro {
# Get the arguments
@pages = split(/,/, $arg{'pages'});
- %parts = &'SdfAttrSplit($arg{'parts'});
+ %parts = &::SdfAttrSplit($arg{'parts'});
# Return result
return &_PageHF('FOOTER', 1, $arg{'component'}, *pages, *parts);
@@ -1744,7 +1744,7 @@ sub edit_header_Macro {
# Get the arguments
@pages = split(/,/, $arg{'pages'});
- %parts = &'SdfAttrSplit($arg{'parts'});
+ %parts = &::SdfAttrSplit($arg{'parts'});
# Return result
return &_PageHF('HEADER', 0, $arg{'component'}, *pages, *parts);
@@ -1764,7 +1764,7 @@ sub edit_footer_Macro {
# Get the arguments
@pages = split(/,/, $arg{'pages'});
- %parts = &'SdfAttrSplit($arg{'parts'});
+ %parts = &::SdfAttrSplit($arg{'parts'});
# Return result
return &_PageHF('FOOTER', 0, $arg{'component'}, *pages, *parts);
@@ -1807,7 +1807,7 @@ sub getusage_Macro {
# Execute the command
my $command = $arg{'command'};
unless (&FileFetch(*text, "sdfcli $command|")) {
- &'AppMsg("warning", "unable to execute sdfcli on '$command'");
+ &::AppMsg("warning", "unable to execute sdfcli on '$command'");
return ();
}
@@ -1927,7 +1927,7 @@ sub off_Macro {
# Check the event exists
if ($num == -1) {
- &'AppMsg("warning", "unknown event '$id'");
+ &::AppMsg("warning", "unknown event '$id'");
}
# Return result
@@ -1978,7 +1978,7 @@ sub message_Macro {
# Output the message
$type = "\L$arg{'type'}";
- &'AppMsg($type, $arg{'text'});
+ &::AppMsg($type, $arg{'text'});
# Return result
return ();
@@ -1996,19 +1996,19 @@ sub line_Macro {
local(@text);
# Update the message variables
- $'app_lineno = $arg{'lineno'};
- $'app_context = $arg{'context'};
- $'app_context .= " " unless $'app_context =~ / $/;
+ $::app_lineno = $arg{'lineno'};
+ $::app_context = $arg{'context'};
+ $::app_context .= " " unless $::app_context =~ / $/;
if ($arg{'filename'} ne '') {
- $'ARGV = $arg{'filename'};
- $var{'FILE_PATH'} = &'NameAbsolute($'ARGV);
+ $::ARGV = $arg{'filename'};
+ $var{'FILE_PATH'} = &::NameAbsolute($::ARGV);
@var{'FILE_DIR', 'FILE_BASE', 'FILE_EXT', 'FILE_SHORT'} =
- &'NameSplit($var{'FILE_PATH'});
+ &::NameSplit($var{'FILE_PATH'});
# Update the file and document modified times. Note that
# we use a constant (1e9 = 09-Sep-2001) during regression
# testing to minimise file differences.
- $var{'FILE_MODIFIED'} = $var{'SDF_TEST'} ? 1e9 : (stat($'ARGV))[9];
+ $var{'FILE_MODIFIED'} = $var{'SDF_TEST'} ? 1e9 : (stat($::ARGV))[9];
$var{'DOC_MODIFIED'} = $var{'FILE_MODIFIED'} if
$var{'DOC_MODIFIED'} < $var{'FILE_MODIFIED'};
@@ -2058,12 +2058,12 @@ sub macro_interface_Macro {
);
# Update the usage
- ($format, @rules) = &'TableParse(@arg_list);
- @flds = &'TableFields($format);
+ ($format, @rules) = &::TableParse(@arg_list);
+ @flds = &::TableFields($format);
$sep = '';
$sep_reqd = $arg{'sep_reqd'};
for $rec (@rules) {
- %values = &'TableRecSplit(*flds, $rec);
+ %values = &::TableRecSplit(*flds, $rec);
$arg = $values{'Name'};
if ($sep_reqd eq $arg) {
$arg = "$sep [$arg]";
@@ -2170,7 +2170,7 @@ sub class_interface_Macro {
"The object attributes are:",
"",
"!block table",
- &'TableFormat(*fields),
+ &::TableFormat(*fields),
"!endblock"
);
}
@@ -2196,8 +2196,8 @@ sub _bof__Macro {
local($new_file);
# Push the state stack
- push(@_file_info, join("\000", $'ARGV, $'app_lineno, $'app_context,
- scalar(@'sdf_if_now), scalar(@'sdf_tbl_state)));
+ push(@_file_info, join("\000", $::ARGV, $::app_lineno, $::app_context,
+ scalar(@::sdf_if_now), scalar(@::sdf_tbl_state)));
# Update the message state
$new_file = $arg{'filename'};
@@ -2223,42 +2223,42 @@ sub _eof__Macro {
split(/\000/, pop(@_file_info));
# Adjust the line number & set the context for messages
- $'app_lineno--;
- $'app_context = "EOF at ";
+ $::app_lineno--;
+ $::app_context = "EOF at ";
# Check not in a block or macro
- if ($'sdf_block_type ne '') {
- $start = $'sdf_block_start;
- &'AppMsg("error", "!end$'sdf_block_type missing for !$'sdf_block_type on line $start");
+ if ($::sdf_block_type ne '') {
+ $start = $::sdf_block_start;
+ &::AppMsg("error", "!end$::sdf_block_type missing for !$::sdf_block_type on line $start");
# restore the state to something safe
- $'sdf_block_type = '';
+ $::sdf_block_type = '';
}
# Check if nesting level is ok
- $missing = scalar(@'sdf_if_now) - $if_level;
+ $missing = scalar(@::sdf_if_now) - $if_level;
if ($missing != 0) {
- $start = $'sdf_if_start[$#main'sdf_if_start];
- &'AppMsg("error", "!endif missing for !if on line $start");
+ $start = $::sdf_if_start[$#main::sdf_if_start];
+ &::AppMsg("error", "!endif missing for !if on line $start");
# pop unexpected ones so that things resync
$last_index = $if_level - 1;
- $#main'sdf_if_start = $last_index;
- $#main'sdf_if_now = $last_index;
- $#main'sdf_if_yet = $last_index;
- $#main'sdf_if_else = $last_index;
+ $#main::sdf_if_start = $last_index;
+ $#main::sdf_if_now = $last_index;
+ $#main::sdf_if_yet = $last_index;
+ $#main::sdf_if_else = $last_index;
}
# Check table nesting level is ok
- $missing = scalar(@'sdf_tbl_state) - $tbl_level;
+ $missing = scalar(@::sdf_tbl_state) - $tbl_level;
if ($missing != 0) {
- $start = $'sdf_tbl_start[$#main'sdf_tbl_start];
- &'AppMsg("error", "!endtable missing for !table on line $start");
+ $start = $::sdf_tbl_start[$#main::sdf_tbl_start];
+ &::AppMsg("error", "!endtable missing for !table on line $start");
# pop unexpected ones so that things resync
$last_index = $tbl_level - 1;
- $#main'sdf_tbl_start = $last_index;
- $#main'sdf_tbl_state = $last_index;
+ $#main::sdf_tbl_start = $last_index;
+ $#main::sdf_tbl_state = $last_index;
}
# Restore the message state
@@ -2274,10 +2274,10 @@ sub _bos__Macro {
local($args) = @_;
# Update the line number and context
- ($'app_lineno, $'app_context) = split(/\;/, $args, 2);
+ ($::app_lineno, $::app_context) = split(/\;/, $args, 2);
# Update the section counter
- $'sdf_sections++;
+ $::sdf_sections++;
}
# _eos_ - end of section
@@ -2286,10 +2286,10 @@ sub _eos__Macro {
local($args) = @_;
# Update the line number and context
- ($'app_lineno, $'app_context) = split(/\;/, $args, 2);
+ ($::app_lineno, $::app_context) = split(/\;/, $args, 2);
# Update the section counter
- $'sdf_sections--;
+ $::sdf_sections--;
}
# _bor_ - beginning of report processing
@@ -2307,18 +2307,18 @@ sub _bor__Macro {
# Update the state
$name = $arg{'name'};
- push(@'sdf_report_names, $name);
+ push(@::sdf_report_names, $name);
# Load the report
- $rpt_file = &FindModule(&'NameJoin('', $name, 'sdr'));
+ $rpt_file = &FindModule(&::NameJoin('', $name, 'sdr'));
if ($rpt_file) {
unless (require $rpt_file) {
- &'AppMsg("error", "unable to load report '$rpt_file'");
+ &::AppMsg("error", "unable to load report '$rpt_file'");
return ();
}
}
else {
- &'AppMsg("error", "unable to find report '$name'");
+ &::AppMsg("error", "unable to find report '$name'");
return ();
}
@@ -2341,7 +2341,7 @@ sub _eor__Macro {
local($end_fn);
# Update the state
- $name = pop(@'sdf_report_names);
+ $name = pop(@::sdf_report_names);
# End the report
$end_fn = $name . "_ReportEnd";
@@ -2349,7 +2349,7 @@ sub _eor__Macro {
@text = &$end_fn();
}
else {
- &'AppMsg("warning", "unable to find report end routine '$end_fn'");
+ &::AppMsg("warning", "unable to find report end routine '$end_fn'");
}
# Return result
@@ -2453,7 +2453,7 @@ sub _init_page_size__Macro {
# local(@text);
local($page_size, $page_width, $page_height);
- $page_size = $'sdf_pagesize{$var{'OPT_PAGE_SIZE'}};
+ $page_size = $::sdf_pagesize{$var{'OPT_PAGE_SIZE'}};
if ($page_size ne '') {
($page_width, $page_height) = split(/\000/, $page_size, 2);
}
@@ -2461,8 +2461,8 @@ sub _init_page_size__Macro {
# Custom size
($page_width, $page_height) = split(/x/, $var{'OPT_PAGE_SIZE'}, 2);
}
- $page_width = &'SdfPoints($page_width);
- $page_height = &'SdfPoints($page_height);
+ $page_width = &::SdfPoints($page_width);
+ $page_height = &::SdfPoints($page_height);
$var{'DOC_PAGE_WIDTH'} = $page_width;
$var{'DOC_PAGE_HEIGHT'} = $page_height;
@@ -2479,25 +2479,25 @@ sub _calc_layout_vars__Macro {
local($full_width, $text_width, $columns, $col_width);
# Calculate the height information
- $h_top = &'SdfVarPoints("OPT_MARGIN_TOP");
- $h_height = &'SdfPageInfo("RIGHT", "HEADER_HEIGHT", "pt");
- $f_height = &'SdfPageInfo("RIGHT", "FOOTER_HEIGHT", "pt");
+ $h_top = &::SdfVarPoints("OPT_MARGIN_TOP");
+ $h_height = &::SdfPageInfo("RIGHT", "HEADER_HEIGHT", "pt");
+ $f_height = &::SdfPageInfo("RIGHT", "FOOTER_HEIGHT", "pt");
$f_top = $var{'DOC_PAGE_HEIGHT'} - $f_height -
- &'SdfVarPoints("OPT_MARGIN_BOTTOM");
+ &::SdfVarPoints("OPT_MARGIN_BOTTOM");
$m_top = $h_top + $h_height +
- &'SdfPageInfo("RIGHT", "HEADER_GAP", "pt");
+ &::SdfPageInfo("RIGHT", "HEADER_GAP", "pt");
$m_height = $f_top - $m_top -
- &'SdfPageInfo("RIGHT", "FOOTER_GAP", "pt");
+ &::SdfPageInfo("RIGHT", "FOOTER_GAP", "pt");
# Initialise the number of columns
$var{'OPT_COLUMNS'} = 1 if $var{'OPT_COLUMNS'} < 1;
$columns = $var{'OPT_COLUMNS'};
# Calculate the width information
- $full_width = $var{'DOC_PAGE_WIDTH'} - &'SdfVarPoints("OPT_MARGIN_OUTER") -
- &'SdfVarPoints("OPT_MARGIN_INNER");
- $text_width = $full_width - &'SdfVarPoints("OPT_SIDEHEAD_WIDTH") -
- &'SdfVarPoints("OPT_SIDEHEAD_GAP");
+ $full_width = $var{'DOC_PAGE_WIDTH'} - &::SdfVarPoints("OPT_MARGIN_OUTER") -
+ &::SdfVarPoints("OPT_MARGIN_INNER");
+ $text_width = $full_width - &::SdfVarPoints("OPT_SIDEHEAD_WIDTH") -
+ &::SdfVarPoints("OPT_SIDEHEAD_GAP");
$col_width = ($text_width - ($columns - 1) * $var{"OPT_COLUMN_GAP"}) /
$columns;
@@ -2521,10 +2521,10 @@ sub _load_tuning__Macro {
# Tell the output driver when we start
$name = $var{'OPT_TUNING'};
- @text = (&'SdfJoin("__tuning", $name));
+ @text = (&::SdfJoin("__tuning", $name));
# Add the driver-specific stuff, if any
- $target_module = &FindModule(&'NameJoin('', $var{'OPT_DRIVER'}, 'sdn'));
+ $target_module = &FindModule(&::NameJoin('', $var{'OPT_DRIVER'}, 'sdn'));
if ($target_module) {
push(@text, "!include '$target_module'");
}
diff --git a/perllib/sdf/misc.pl b/perllib/sdf/misc.pl
index 6840c25..bc10841 100644
--- a/perllib/sdf/misc.pl
+++ b/perllib/sdf/misc.pl
@@ -206,7 +206,7 @@ sub MiscDateFormat {
# Get the quantities
($second, $minute, $hour, $day, $_month, $syear, $_wday) =
- localtime($main'time);
+ localtime($main::time);
$day0 = sprintf("%02d", $day);
$month = $main::misc_date_strings{"month"}[$_month];
$smonth = $main::misc_date_strings{"smonth"}[$_month];
@@ -226,7 +226,7 @@ sub MiscDateFormat {
$second0 = sprintf("%02d", $second);
# format the date-time
- $main'result = eval '"' . $main'fmt . '"';
+ $main::result = eval '"' . $main::fmt . '"';
package main;
if ($msg_type && $@) {
&AppMsg($msg_type, "bad datetime format '$fmt'");
diff --git a/perllib/sdf/name.pl b/perllib/sdf/name.pl
index fa38259..1546220 100644
--- a/perllib/sdf/name.pl
+++ b/perllib/sdf/name.pl
@@ -356,7 +356,7 @@ sub NameFindInDirectory {
local($full);
# If the base already has an extension, don't use the extension list
- my $ext = (&'NameSplit($base))[2];
+ my $ext = (&::NameSplit($base))[2];
my @exts = $ext ne '' ? ($ext) : @$ext_list_ref;
$base = &NameSubExt($base, '') if $ext ne '';
diff --git a/perllib/sdf/parse.pl b/perllib/sdf/parse.pl
index 05287ff..60dd102 100755
--- a/perllib/sdf/parse.pl
+++ b/perllib/sdf/parse.pl
@@ -240,16 +240,16 @@ $_sdf_init_line = '';
@_sdf_appendix_counters = ();
# Package SDF_USER contains data exported to the user world
-%SDF_USER'var = ();
-$SDF_USER'style = '';
-$SDF_USER'text = '';
-$SDF_USER'append = '';
-%SDF_USER'attr = ();
-$SDF_USER'level = 0;
-$SDF_USER'prev_style = '';
-$SDF_USER'prev_text = '';
-%SDF_USER'prev_attr = ();
-%SDF_USER'previous_text_for_style = ();
+%SDF_USER::var = ();
+$SDF_USER::style = '';
+$SDF_USER::text = '';
+$SDF_USER::append = '';
+%SDF_USER::attr = ();
+$SDF_USER::level = 0;
+$SDF_USER::prev_style = '';
+$SDF_USER::prev_text = '';
+%SDF_USER::prev_attr = ();
+%SDF_USER::previous_text_for_style = ();
##### Routines #####
@@ -272,7 +272,7 @@ sub SdfLoadDrivers {
local($fmt);
# Validate the table
- &TableValidate(*table, *_SDF_DRIVER_RULES) if $'verbose;
+ &TableValidate(*table, *_SDF_DRIVER_RULES) if $::verbose;
# Load the drivers
@flds = &TableFields(shift(@table));
@@ -297,7 +297,7 @@ sub SdfLoadPageSizes {
local($size);
# Validate the table
- &TableValidate(*table, *_SDF_PAGESIZE_RULES) if $'verbose;
+ &TableValidate(*table, *_SDF_PAGESIZE_RULES) if $::verbose;
# Load the page sizes
@flds = &TableFields(shift(@table));
@@ -471,10 +471,10 @@ sub SdfInit {
&InitSubs;
# Initialise the user variables
- %var = %'var;
- @include_path = @'sdf_include_path;
- @library_path = @'sdf_library_path;
- @module_path = @'sdf_library_path;
+ %var = %::var;
+ @include_path = @::sdf_include_path;
+ @library_path = @::sdf_library_path;
+ @module_path = @::sdf_library_path;
# Initialise global variables within this package
package main;
@@ -499,7 +499,7 @@ sub SdfInit {
@sdf_report_names = ();
@_sdf_heading_counters = ();
@_sdf_appendix_counters = ();
- %SDF_USER'previous_text_for_style = ();
+ %SDF_USER::previous_text_for_style = ();
}
#
@@ -560,7 +560,7 @@ $igc_cnt++;
# Detect block ends
if ($macro eq "end$sdf_block_type" && --$_sdf_block_cnt == 0) {
- unshift(@sdf, &SDF_USER'ExecMacro($macro, $parameters, 'error'));
+ unshift(@sdf, &SDF_USER::ExecMacro($macro, $parameters, 'error'));
if (@sdf_end) {
push(@sdf, @sdf_end);
@sdf_end = ();
@@ -570,7 +570,7 @@ $igc_cnt++;
# Make sure end-of-file processing is not missed
elsif ($macro eq '_eof_') {
- unshift(@sdf, &SDF_USER'ExecMacro($macro, $parameters, 'error'));
+ unshift(@sdf, &SDF_USER::ExecMacro($macro, $parameters, 'error'));
next record;
}
@@ -597,7 +597,7 @@ $igc_cnt++;
# Process the macro - if this macro starts a block, set the
# nested count and starting character accordingly
- unshift(@sdf, &SDF_USER'ExecMacro($macro, $parameters, 'warning'));
+ unshift(@sdf, &SDF_USER::ExecMacro($macro, $parameters, 'warning'));
if (@sdf_end) {
push(@sdf, @sdf_end);
@sdf_end = ();
@@ -625,7 +625,7 @@ $igc_cnt++;
# Convert level 0 headings to the build_title macro
if ($style =~ /^[HAP]0$/) {
- $SDF_USER'var{'DOC_NAME'} = $text;
+ $SDF_USER::var{'DOC_NAME'} = $text;
unshift(@sdf, "!build_title");
$_sdf_next_lineno--;
next;
@@ -640,7 +640,7 @@ $igc_cnt++;
return ($text, $style, %attr);
}
-print "lines: $igc_cnt\n" if $SDF_USER'var{'igc'};
+print "lines: $igc_cnt\n" if $SDF_USER::var{'igc'};
# If we reach here, the buffer is empty
return ();
}
@@ -763,35 +763,35 @@ sub _SdfFetchPara {
package SDF_USER;
local($style, $text, %attr, @_prepend, @_append);
- $'attr{'orig_style'} = $'style;
- $style = $'style;
- $text = $'text;
- %attr = %'attr;
+ $::attr{'orig_style'} = $::style;
+ $style = $::style;
+ $text = $::text;
+ %attr = %::attr;
@_prepend = ();
@_append = ();
- &ReportEvents('paragraph') if @'sdf_report_names;
+ &ReportEvents('paragraph') if @::sdf_report_names;
&ExecEventsStyleMask(*evcode_paragraph, *evmask_paragraph);
- &ReportEvents('paragraph', 'Post') if @'sdf_report_names;
- $'style = $style;
- $'text = $text;
- %'attr = %attr;
+ &ReportEvents('paragraph', 'Post') if @::sdf_report_names;
+ $::style = $style;
+ $::text = $text;
+ %::attr = %attr;
$level = $1 if $style =~ /^[HAP](\d)$/;
$prev_style = $style;
$prev_text = $text;
%prev_attr = %attr;
$previous_text_for_style{$style} = $text unless $attr{'continued'};
- unshift(@'rest,
- "!_bos_ $'app_lineno;text appended to ",
+ unshift(@::rest,
+ "!_bos_ $::app_lineno;text appended to ",
@_append,
- "!_eos_ $'app_lineno;$'app_context") if @_append;
+ "!_eos_ $::app_lineno;$::app_context") if @_append;
if (@_prepend) {
#printf STDERR "prepending \n\t%s<\n", join("<\n\t", @_prepend);
$attr{'noevents'} = 1;
- unshift(@'rest,
- "!_bos_ $'app_lineno;text prepended to ",
+ unshift(@::rest,
+ "!_bos_ $::app_lineno;text prepended to ",
@_prepend,
- &'SdfJoin($style, $text, %attr),
- "!_eos_ $'app_lineno;$'app_context");
+ &::SdfJoin($style, $text, %attr),
+ "!_eos_ $::app_lineno;$::app_context");
return ();
}
}
@@ -804,7 +804,7 @@ sub _SdfFetchPara {
&SdfAttrClean(*attr) if %attr;
# Check the style is legal
- unless (defined($SDF_USER'parastyles_name{$style})) {
+ unless (defined($SDF_USER::parastyles_name{$style})) {
&AppMsg("warning", "unknown paragraph style '$style'");
}
@@ -918,8 +918,8 @@ sub _SdfParsePara {
# Trim leading space except for examples and internal directives
# For examples, convert tabs to spaces
- if ($SDF_USER'parastyles_category{$style} eq 'example') {
- $tab_size = $SDF_USER'var{'DEFAULT_TAB_SIZE'};
+ if ($SDF_USER::parastyles_category{$style} eq 'example') {
+ $tab_size = $SDF_USER::var{'DEFAULT_TAB_SIZE'};
1 while $text =~ s/\t+/' ' x (length($&) * $tab_size - length($`) % $tab_size)/e;
}
elsif ($style !~ /^__/) {
@@ -1132,10 +1132,10 @@ sub _SdfTextToSections {
while (@nested) {
$tag = substr($section[$nested[$#nested] + 1], 0, 1);
if ($tag eq $_SDF_VERBOSE_TAG) {
- &'AppMsg("warning", "{{ phrase not terminated");
+ &::AppMsg("warning", "{{ phrase not terminated");
}
else {
- &'AppMsg("warning", "'$tag' phrase not terminated");
+ &::AppMsg("warning", "'$tag' phrase not terminated");
}
&_SdfAddPhrase('', *text, *section, *nested, *append);
}
@@ -1313,7 +1313,7 @@ sub _SdfPhraseProcess {
$style = 1 if $style eq '';
# Trim leading space except for examples
- if ($SDF_USER'phrasestyles_category{$style} ne 'example') {
+ if ($SDF_USER::phrasestyles_category{$style} ne 'example') {
$text =~ s/^\s+//;
}
@@ -1321,7 +1321,7 @@ sub _SdfPhraseProcess {
%attr = &SdfAttrSplit($attrs);
# Handle special styles
- if ($SDF_USER'phrasestyles_category{$style} eq 'special') {
+ if ($SDF_USER::phrasestyles_category{$style} eq 'special') {
$fn = "SDF_USER'${style}_Special";
if (defined &$fn) {
&$fn(*style, *text, *attr);
@@ -1334,17 +1334,17 @@ sub _SdfPhraseProcess {
# Activate event processing
package SDF_USER;
- $style = $'style;
- $text = $'text;
+ $style = $::style;
+ $text = $::text;
$append = '';
- %attr = %'attr;
- &ReportEvents('phrase') if @'sdf_report_names;
+ %attr = %::attr;
+ &ReportEvents('phrase') if @::sdf_report_names;
&ExecEventsStyleMask(*evcode_phrase, *evmask_phrase);
- &ReportEvents('phrase', 'Post') if @'sdf_report_names;
- $'style = $style;
- $'text = $text;
- $'append = $append;
- %'attr = %attr;
+ &ReportEvents('phrase', 'Post') if @::sdf_report_names;
+ $::style = $style;
+ $::text = $text;
+ $::append = $append;
+ %::attr = %attr;
undef $style;
undef $text;
undef %attr;
@@ -1367,7 +1367,7 @@ sub _SdfPhraseProcess {
# Check the style is legal
if ($style !~ /^__/) {
- unless (defined($SDF_USER'phrasestyles_name{$style})) {
+ unless (defined($SDF_USER::phrasestyles_name{$style})) {
&AppMsg("warning", "unknown phrase style '$style'");
}
}
@@ -1420,7 +1420,7 @@ sub SdfVarPoints {
local($name) = @_;
# local($pts);
- return &SdfPoints($SDF_USER'var{$name});
+ return &SdfPoints($SDF_USER::var{$name});
}
#
@@ -1433,25 +1433,25 @@ sub SdfPageInfo {
local($part, $newpage);
if ($category eq 'macro') {
- if (defined $SDF_USER'macro{"PAGE_${page}_$attr"}) {
- $info = $SDF_USER'macro{"PAGE_${page}_$attr"};
+ if (defined $SDF_USER::macro{"PAGE_${page}_$attr"}) {
+ $info = $SDF_USER::macro{"PAGE_${page}_$attr"};
}
elsif ($page =~ /_/) {
($part, $newpage) = ($`, $');
$newpage = 'RIGHT' if $newpage eq 'FIRST' && $part ne 'FRONT';
#printf STDERR "$page -> $newpage ($attr)\n";
- $info = $SDF_USER'macro{"PAGE_${newpage}_$attr"};
+ $info = $SDF_USER::macro{"PAGE_${newpage}_$attr"};
}
}
else {
- if (defined $SDF_USER'var{"PAGE_${page}_$attr"}) {
- $info = $SDF_USER'var{"PAGE_${page}_$attr"};
+ if (defined $SDF_USER::var{"PAGE_${page}_$attr"}) {
+ $info = $SDF_USER::var{"PAGE_${page}_$attr"};
}
elsif ($page =~ /_/) {
($part, $newpage) = ($`, $');
$newpage = 'RIGHT' if $newpage eq 'FIRST' && $part ne 'FRONT';
#printf STDERR "$page -> $newpage ($attr)\n";
- $info = $SDF_USER'var{"PAGE_${newpage}_$attr"};
+ $info = $SDF_USER::var{"PAGE_${newpage}_$attr"};
}
if ($category eq 'pt') {
$info = &SdfPoints($info);
@@ -1484,7 +1484,7 @@ sub _SdfEvaluate {
local($expr, $msg_type, $enum) = @_;
local($result);
local($format);
- local($action, $SDF_USER'_);
+ local($action, $SDF_USER::_);
# Get the format, if any
$format = $1 if $expr =~ s/^(\w+)://;
@@ -1504,18 +1504,18 @@ sub _SdfEvaluate {
# Variables
elsif ($expr =~ /^\w+$/) {
- if (!defined($SDF_USER'var{$expr})) {
+ if (!defined($SDF_USER::var{$expr})) {
if ($msg_type) {
&AppMsg($msg_type, "variable '$expr' not defined");
}
$result = '';
}
else {
- $result = $SDF_USER'var{$expr};
+ $result = $SDF_USER::var{$expr};
}
}
elsif ($expr =~ /^\!\s*(\w+)$/) {
- $result = $SDF_USER'var{$1} ? 0 : 1;
+ $result = $SDF_USER::var{$1} ? 0 : 1;
}
elsif ($expr =~ /^$/) {
$result = '';
@@ -1523,13 +1523,13 @@ sub _SdfEvaluate {
# Handle implicit calls to Calc
elsif ($expr =~ /^[=+]\s*(.+)$/) {
- $result = &SDF_USER'Calc($1);
+ $result = &SDF_USER::Calc($1);
}
else {
# evaluate the expression in "user-land"
package SDF_USER;
- $main'result = eval $main'expr;
+ $main::result = eval $main::expr;
package main;
if ($@) {
&AppMsg("warning", "evaluation of '$expr' failed: $@");
@@ -1539,14 +1539,14 @@ sub _SdfEvaluate {
# Apply the format, if any
if ($format ne '') {
- $action = $SDF_USER'var{"FORMAT_$format"};
+ $action = $SDF_USER::var{"FORMAT_$format"};
if ($action eq '') {
&AppMsg("warning", "unknown format '$format'");
}
else {
package SDF_USER;
- $_ = $main'result;
- $main'result = eval $main'action;
+ $_ = $main::result;
+ $main::result = eval $main::action;
package main;
if ($@) {
&AppMsg("warning", "format '$format' failed: $@");
@@ -1706,11 +1706,11 @@ sub SdfAttrClean {
local($name);
# Keep all attributes for raw format
- $driver = $SDF_USER'var{'OPT_DRIVER'};
+ $driver = $SDF_USER::var{'OPT_DRIVER'};
return if $driver eq 'raw';
# Delete attributes in 'families' other than the current driver or target
- $target = $SDF_USER'var{'OPT_TARGET'};
+ $target = $SDF_USER::var{'OPT_TARGET'};
for $name (keys %attr) {
delete $attr{$name} if $name =~ /^(\w+)\./ && $1 ne $driver &&
$1 ne $target;
@@ -1782,11 +1782,11 @@ sub _SdfAttrValueMap {
# Build the action
$name = substr($map, 1);
- $action = ($map =~ /^\%/) ? "\$$name\{\$'value\}" : "&$name(\$'value)";
+ $action = ($map =~ /^\%/) ? "\$$name\{\$::value\}" : "&$name(\$::value)";
# Get the new value
package SDF_USER;
- $'newvalue = eval $'action;
+ $::newvalue = eval $::action;
package main;
&AppMsg("warning", "attribute mapping via '$map' failed: $@ (action: $action)") if $@;
$value = $newvalue if defined $newvalue;
@@ -1804,18 +1804,18 @@ sub _SdfAttrCheck {
# check the attribute is known & get the type and rule, if any
if ($kind eq 'paragraph') {
- unless ($SDF_USER'paraattrs_name{$name}) {
+ unless ($SDF_USER::paraattrs_name{$name}) {
&AppMsg("warning", "unknown paragraph attribute '$name'");
}
- $type = $SDF_USER'paraattrs_type{$name};
- $rule = $SDF_USER'paraattrs_rule{$name};
+ $type = $SDF_USER::paraattrs_type{$name};
+ $rule = $SDF_USER::paraattrs_rule{$name};
}
else {
- unless ($SDF_USER'phraseattrs_name{$name}) {
+ unless ($SDF_USER::phraseattrs_name{$name}) {
&AppMsg("warning", "unknown phrase attribute '$name'");
}
- $type = $SDF_USER'phraseattrs_type{$name};
- $rule = $SDF_USER'phraseattrs_rule{$name};
+ $type = $SDF_USER::phraseattrs_type{$name};
+ $rule = $SDF_USER::phraseattrs_rule{$name};
}
@@ -1842,7 +1842,7 @@ sub SdfSizeGraphic {
local($upi1, $upi2, $scale);
# Get the file extension
- $ext = (&'NameSplit($file))[2];
+ $ext = (&::NameSplit($file))[2];
# Open the file
open(SDF_GRAPHIC, $file) || return (0,0);
@@ -2036,11 +2036,11 @@ sub SdfSystem {
local($cmd) = @_;
local($exit_code);
- &'AppMsg("object", "executing '$cmd'\n") if $'verbose >= 1;
+ &::AppMsg("object", "executing '$cmd'\n") if $::verbose >= 1;
$exit_code = system($cmd);
if ($exit_code) {
$exit_code = $exit_code / 256;
- &'AppMsg("warning", "'$action' exit code was $exit_code from '$cmd'");
+ &::AppMsg("warning", "'$action' exit code was $exit_code from '$cmd'");
}
return $exit_code;
}
@@ -2054,7 +2054,7 @@ sub SdfQuietSystem {
# Save the output in a temporary file
my $tmp_file = "/tmp/sdf$$";
$cmd .= " > $tmp_file";
- $cmd .= " 2>&1" if $'NAME_OS eq 'unix';
+ $cmd .= " 2>&1" if $::NAME_OS eq 'unix';
# Execute the command
$exit_code = &SdfSystem($cmd);
@@ -2062,7 +2062,7 @@ sub SdfQuietSystem {
# If verbose mode is on, or something went wrong, show the output
if ($verbose || $exit_code) {
unless (open(TMPFILE, $tmp_file)) {
- &'AppMsg("app_warning", "unable to open tmp file '$tmp_file'");
+ &::AppMsg("app_warning", "unable to open tmp file '$tmp_file'");
}
else {
print <TMPFILE>;
@@ -2083,7 +2083,7 @@ sub SdfBatch {
# Check the file exists
$file = "$long.$out_ext";
unless (-f $file) {
- &'AppMsg("error", "cannot execute sdfbatch on nonexistent file '$file'");
+ &::AppMsg("error", "cannot execute sdfbatch on nonexistent file '$file'");
return;
}
@@ -2102,7 +2102,7 @@ sub SdfHtmldoc {
# Check the input file exists
unless (-f $infile) {
- &'AppMsg("error", "cannot execute htmldoc on nonexistent file '$infile'");
+ &::AppMsg("error", "cannot execute htmldoc on nonexistent file '$infile'");
return;
}
@@ -2140,9 +2140,9 @@ sub SdfDelete {
# local();
if (-f $file) {
- &'AppMsg("object", "deleting '$file'") if $'verbose >= 1;
+ &::AppMsg("object", "deleting '$file'") if $::verbose >= 1;
unless (unlink($file)) {
- &'AppMsg("object", "delete of '$file' failed: $!");
+ &::AppMsg("object", "delete of '$file' failed: $!");
}
}
}
@@ -2156,22 +2156,22 @@ sub SdfBookClean {
local(@cannot);
# Leave things alone if verbose mode is on or there is nothing to do
- return if $'verbose;
- return unless @'sdf_book_files;
+ return if $::verbose;
+ return unless @::sdf_book_files;
# If an extension is given, use that set of
# files, rather than the known ones.
- @files = @'sdf_book_files;
+ @files = @::sdf_book_files;
if ($ext ne '') {
for $_ (@files) {
- $_ = &'NameSubExt($_, $ext);
+ $_ = &::NameSubExt($_, $ext);
}
}
# Delete the files
@cannot = grep(!unlink($_), @files);
#if (@cannot) {
- # &'AppMsg("object", "unable to delete '@cannot'");
+ # &::AppMsg("object", "unable to delete '@cannot'");
#}
}
@@ -2184,10 +2184,10 @@ sub SdfRenamePS {
local($cmd);
# Do nothing unless FrameMaker 5 is being used
- return unless $'sdf_fmext eq 'fm5';
+ return unless $::sdf_fmext eq 'fm5';
# Wait until the print driver has finished
- &'AppMsg("object", "waiting for the print driver\n");
+ &::AppMsg("object", "waiting for the print driver\n");
until (-f "$xx.$out_ext.ps") {
sleep(1);
print STDERR ".";
diff --git a/perllib/sdf/podmacs.pl b/perllib/sdf/podmacs.pl
index 71c75f4..86de163 100644
--- a/perllib/sdf/podmacs.pl
+++ b/perllib/sdf/podmacs.pl
@@ -238,7 +238,7 @@ sub cut_Macro {
local(@text);
# Update the parser state
- $'sdf_cutting = 1;
+ $::sdf_cutting = 1;
# Return result
return ();
@@ -298,4 +298,4 @@ sub end_Macro {
}
# package return value
-1; \ No newline at end of file
+1;
diff --git a/perllib/sdf/post_mf6.pl b/perllib/sdf/post_mf6.pl
index c3a3342..e287e9a 100644
--- a/perllib/sdf/post_mf6.pl
+++ b/perllib/sdf/post_mf6.pl
@@ -165,7 +165,7 @@ sub Get_Client_Dets {
local( @client_array, $client_dir, $client_list, $found_sw);
# Get the client code
- $CLIENT = $SDF_USER'var{'MIMS_CLIENT_CODE'};
+ $CLIENT = $SDF_USER::var{'MIMS_CLIENT_CODE'};
if ( $CLIENT eq '') {
&AppExit('fatal', "MIMS_CLIENT_CODE variable must be specified");
}
diff --git a/perllib/sdf/subs.pl b/perllib/sdf/subs.pl
index 2d155e6..2b26ece 100644
--- a/perllib/sdf/subs.pl
+++ b/perllib/sdf/subs.pl
@@ -28,7 +28,7 @@ $VERSION{''.__FILE__} = '$Revision$';
# Make sure we can call the Value function from the main package
-sub Value {&SDF_USER'Value;}
+sub Value {&SDF_USER::Value;}
# Switch to the user package
package SDF_USER;
@@ -119,7 +119,7 @@ sub FormatTime {
$fmt = $var{$fmt} if $var{$fmt} ne '';
$time = $var{$time} if $var{$time} ne '';
- return $time ? &'MiscDateFormat($fmt, $time) : '';
+ return $time ? &::MiscDateFormat($fmt, $time) : '';
}
#
@@ -193,25 +193,25 @@ sub FindFile {
my @dirs = ('.');
my $dir = $var{'DOC_DIR'};
push(@dirs, $dir) if $dir ne cwd();
- push(@dirs, @include_path, $'sdf_lib);
+ push(@dirs, @include_path, $::sdf_lib);
# Do the search
if ($image) {
my $context = $var{'OPT_TARGET'};
- my @exts = @{$'SDF_IMAGE_EXTS{$context} || $'SDF_IMAGE_EXTS{'ps'}};
- &'AppTrace("user", 5, "searching for image '$filename' in directories (" .
+ my @exts = @{$::SDF_IMAGE_EXTS{$context} || $::SDF_IMAGE_EXTS{'ps'}};
+ &::AppTrace("user", 5, "searching for image '$filename' in directories (" .
join(",", @dirs) . ") with $context extensions (" .
join(",", @exts) . ")");
- $fullname = &'NameFindOrGenerate($filename, \@dirs, \@exts, $context);
+ $fullname = &::NameFindOrGenerate($filename, \@dirs, \@exts, $context);
}
else {
- &'AppTrace("user", 5, "searching for file '$filename' in directories (" .
+ &::AppTrace("user", 5, "searching for file '$filename' in directories (" .
join(",", @dirs) . ")");
- $fullname = &'NameFind($filename, @dirs);
+ $fullname = &::NameFind($filename, @dirs);
}
# Return results
- &'AppTrace("user", 2, "file '$filename' -> '$fullname'") if
+ &::AppTrace("user", 2, "file '$filename' -> '$fullname'") if
$fullname ne '';
return $fullname;
}
@@ -231,15 +231,15 @@ sub FindModule {
my @dirs = ('.');
my $dir = $var{'DOC_DIR'};
push(@dirs, $dir) if $dir ne cwd();
- push(@dirs, @module_path, $'sdf_lib, "$'sdf_lib/stdlib");
+ push(@dirs, @module_path, $::sdf_lib, "$::sdf_lib/stdlib");
# Do the search
- &'AppTrace("user", 4, "searching for module '$filename' in directories (" .
+ &::AppTrace("user", 4, "searching for module '$filename' in directories (" .
join(",", @dirs) . ")");
- $fullname = &'NameFind($filename, @dirs);
+ $fullname = &::NameFind($filename, @dirs);
# Return results
- &'AppTrace("user", 2, "module '$filename' -> '$fullname'") if
+ &::AppTrace("user", 2, "module '$filename' -> '$fullname'") if
$fullname ne '';
return $fullname;
}
@@ -260,14 +260,14 @@ sub FindLibrary {
my @dirs = ('.');
my $dir = $var{'DOC_DIR'};
push(@dirs, $dir) if $dir ne cwd();
- push(@dirs, @library_path, $'sdf_lib);
+ push(@dirs, @library_path, $::sdf_lib);
# Do the search
- &'AppTrace("user", 3, "searching for library '$lib' in directories (" .
+ &::AppTrace("user", 3, "searching for library '$lib' in directories (" .
join(",", @dirs) . ")");
$fullname = '';
for $dir (@dirs) {
- $lib_path = $dir eq $'NAME_DIR_SEP ? "$dir$lib" : "$dir$'NAME_DIR_SEP$lib";
+ $lib_path = $dir eq $::NAME_DIR_SEP ? "$dir$lib" : "$dir$::NAME_DIR_SEP$lib";
if (-d $lib_path) {
$fullname = $lib_path;
last;
@@ -275,7 +275,7 @@ sub FindLibrary {
}
# Return results
- &'AppTrace("user", 2, "library '$lib' -> '$fullname'") if
+ &::AppTrace("user", 2, "library '$lib' -> '$fullname'") if
$fullname ne '';
return $fullname;
}
@@ -300,12 +300,12 @@ sub ExecMacro {
local($macro_fn);
# Set the context for messages
- $'app_context = 'macro on ' unless $'sdf_sections;
+ $::app_context = 'macro on ' unless $::sdf_sections;
# Activate event processing
- &ReportEvents('macro') if @'sdf_report_names;
+ &ReportEvents('macro') if @::sdf_report_names;
&ExecEventsNameMask(*evcode_macro, *evmask_macro) if @evcode_macro;
- &ReportEvents('macro', 'Post') if @'sdf_report_names;
+ &ReportEvents('macro', 'Post') if @::sdf_report_names;
# Macros implemented in Perl have a subroutine which can be called
$macro_fn = $name . "_Macro";
@@ -319,27 +319,27 @@ sub ExecMacro {
# increment within the generated output.
return () unless @text;
return @text if $name =~ /^_/ || $text[0] =~ /^\!_bof/;
- return ("!_bos_ $'app_lineno;macro on ", @text,
- "!_eos_ $'app_lineno;$'app_context");
+ return ("!_bos_ $::app_lineno;macro on ", @text,
+ "!_eos_ $::app_lineno;$::app_context");
}
# For macros implemented in SDF, the macro is stored in %macro
elsif (defined($macro{$name})) {
# Validate the arguments
- &'AppMsg("warning", "ignoring arguments for macro '$name'") if $args ne '';
+ &::AppMsg("warning", "ignoring arguments for macro '$name'") if $args ne '';
# Return the data
- return ("!_bos_ $'app_lineno;macro on ", split("\n", $macro{$name}),
- "!_eos_ $'app_lineno;$'app_context");
+ return ("!_bos_ $::app_lineno;macro on ", split("\n", $macro{$name}),
+ "!_eos_ $::app_lineno;$::app_context");
}
# If we reach here, macro is unknown
if ($missing eq 'error') {
- &'AppMsg("error", "unknown macro '$name'");
+ &::AppMsg("error", "unknown macro '$name'");
}
elsif ($missing eq 'warning') {
- &'AppMsg("warning", "unknown macro '$name'");
+ &::AppMsg("warning", "unknown macro '$name'");
}
return ();
}
@@ -361,17 +361,17 @@ sub ExecFilter {
return if $name eq '';
# Setup the message parameters, if necessary
- $orig_lineno = $'app_lineno;
- $orig_filename = $'ARGV;
- $orig_context = $'app_context;
- $'app_lineno = $lineno if defined $lineno;
- $'ARGV = $filename if defined $filename;
- $'app_context = $context if defined $context;
+ $orig_lineno = $::app_lineno;
+ $orig_filename = $::ARGV;
+ $orig_context = $::app_context;
+ $::app_lineno = $lineno if defined $lineno;
+ $::ARGV = $filename if defined $filename;
+ $::app_context = $context if defined $context;
# Activate event processing
- &ReportEvents('filter') if @'sdf_report_names;
+ &ReportEvents('filter') if @::sdf_report_names;
&ExecEventsNameMask(*evcode_filter, *evmask_filter) if @evcode_filter;
- &ReportEvents('filter', 'Post') if @'sdf_report_names;
+ &ReportEvents('filter', 'Post') if @::sdf_report_names;
# If necessary, load the plug-in, if any
$filter_fn = $name . "_Filter";
@@ -380,10 +380,10 @@ sub ExecFilter {
# do nothing
}
else {
- $plug_in = &FindModule(&'NameJoin('', $name, 'sdp'));
+ $plug_in = &FindModule(&::NameJoin('', $name, 'sdp'));
if ($plug_in) {
unless (require $plug_in) {
- &'AppMsg("warning", "unable to load plug-in '$plug_in'");
+ &::AppMsg("warning", "unable to load plug-in '$plug_in'");
}
}
}
@@ -398,13 +398,13 @@ sub ExecFilter {
&example_Filter(*text, &SdfFilterParams('example', $params));
}
else {
- &'AppMsg("error", "unknown filter '$name'");
+ &::AppMsg("error", "unknown filter '$name'");
}
# Restore the message parameters
- $'app_lineno = $orig_lineno;
- $'ARGV = $orig_filename;
- $'app_context = $orig_context;
+ $::app_lineno = $orig_lineno;
+ $::ARGV = $orig_filename;
+ $::app_context = $orig_context;
}
#
@@ -427,7 +427,7 @@ sub SdfMacroArgs {
else {
# Compile the arguments
$index = $#_sdf_macro_args_data + 1;
- ($format, @rules) = &'TableParse(eval "\@_${macro}_MacroArgs");
+ ($format, @rules) = &::TableParse(eval "\@_${macro}_MacroArgs");
push(@_sdf_macro_args_data, @rules);
$last = $#_sdf_macro_args_data;
$_sdf_macro_args_info{$macro} = join(':', $index, $last);
@@ -440,7 +440,7 @@ sub SdfMacroArgs {
# If there is nothing left, use the default, if any
if ($args eq '') {
- &'AppMsg("error", "argument '$name' missing for macro '$macro'")
+ &::AppMsg("error", "argument '$name' missing for macro '$macro'")
if $default eq '';
$value = $default eq '_NULL_' ? '' : $default;
}
@@ -450,8 +450,8 @@ sub SdfMacroArgs {
($value, $args) = &_SdfMacroNextArg($args, $type);
# Validate the rule, if any
- &'AppMsg("warning", "bad value '$value' for argument '$name' for macro '$macro'")
- if ($value ne '' && !&'MiscCheckRule($value, $rule, $type));
+ &::AppMsg("warning", "bad value '$value' for argument '$name' for macro '$macro'")
+ if ($value ne '' && !&::MiscCheckRule($value, $rule, $type));
}
# Save the value
@@ -484,7 +484,7 @@ sub _SdfMacroNextArg {
# If we reach here, we need to evaluate the argument
($arg, $rest) = split(/\s*\;/, $args, 2);
- $arg = &'_SdfEvaluate($arg, $type eq 'condition' ? '' : 'warning');
+ $arg = &::_SdfEvaluate($arg, $type eq 'condition' ? '' : 'warning');
return ($arg, $rest);
}
@@ -504,7 +504,7 @@ sub SdfFilterParams {
local($unknown, %unknown);
# Get the parameters
- %param = &'SdfAttrSplit($params);
+ %param = &::SdfAttrSplit($params);
# Get the parameter table
@param_table = eval "\@_${filter}_FilterParams";
@@ -520,7 +520,7 @@ sub SdfFilterParams {
else {
# Compile the parameters
$index = $#_sdf_filter_params_data + 1;
- ($format, @rules) = &'TableParse(@param_table);
+ ($format, @rules) = &::TableParse(@param_table);
push(@_sdf_filter_params_data, @rules);
$last = $#_sdf_filter_params_data;
$_sdf_filter_params_info{$filter} = join(':', $index, $last);
@@ -536,15 +536,15 @@ sub SdfFilterParams {
delete $unknown{$name};
# Validate the rule, if any
- if ($value ne '' && !&'MiscCheckRule($value, $rule, $type)) {
- &'AppMsg("warning", "bad value '$value' for '$name' for filter '$filter'");
+ if ($value ne '' && !&::MiscCheckRule($value, $rule, $type)) {
+ &::AppMsg("warning", "bad value '$value' for '$name' for filter '$filter'");
}
}
# Check for unknown parameters
$unknown = join(',', sort keys %unknown);
if ($unknown ne '') {
- &'AppMsg("warning", "unknown parameter(s) '$unknown' for filter '$filter'");
+ &::AppMsg("warning", "unknown parameter(s) '$unknown' for filter '$filter'");
}
# Return result
@@ -563,10 +563,10 @@ sub SdfTableParams {
local($name, $value, $type, $rule);
# Get the parameters
- %param = &'SdfAttrSplit($params);
+ %param = &::SdfAttrSplit($params);
# Remove parameters which only apply to other targets
- &'SdfAttrClean(*param);
+ &::SdfAttrClean(*param);
# Check the parameters are legal
for $name (sort keys %param) {
@@ -577,14 +577,14 @@ sub SdfTableParams {
# Check the parameter is known
unless ($names{$name}) {
- &'AppMsg("warning", "unknown $macro parameter '$name'");
+ &::AppMsg("warning", "unknown $macro parameter '$name'");
delete $param{$name};
next;
}
# Validate the rule, if any
- if ($value ne '' && !&'MiscCheckRule($value, $rule, $type)) {
- &'AppMsg("warning", "bad value '$value' for $macro parameter '$name'");
+ if ($value ne '' && !&::MiscCheckRule($value, $rule, $type)) {
+ &::AppMsg("warning", "bad value '$value' for $macro parameter '$name'");
}
}
@@ -602,7 +602,7 @@ sub ReportEvents {
local($rpt);
local($fn);
- for $rpt (@'sdf_report_names) {
+ for $rpt (@::sdf_report_names) {
$fn = "${rpt}_ReportEvent${post}";
&$fn($tag) if defined &$fn;
}
@@ -633,7 +633,7 @@ sub ExecEventsStyleMask {
# execute the action
eval $action;
- &'AppMsg("warning", "execution of '$action' failed: $@") if $@;
+ &::AppMsg("warning", "execution of '$action' failed: $@") if $@;
}
}
@@ -661,7 +661,7 @@ sub ExecEventsNameMask {
# execute the action
eval $action;
- &'AppMsg("warning", "execution of '$action' failed: $@") if $@;
+ &::AppMsg("warning", "execution of '$action' failed: $@") if $@;
}
}
#
@@ -703,13 +703,13 @@ sub CommandMacro {
$filename = $arg{'filename'};
$fullname = &FindFile($filename);
if ($fullname eq '') {
- &'AppMsg("warning", "unable to find '$filename'");
+ &::AppMsg("warning", "unable to find '$filename'");
return ();
}
# Execute the command
unless (&FileFetch(*text, "$cmd $fullname|")) {
- &'AppMsg("warning", "unable to execute command '$cmd' on '$fullname'");
+ &::AppMsg("warning", "unable to execute command '$cmd' on '$fullname'");
return ();
}
@@ -734,7 +734,7 @@ sub CommandFilter {
# When the above assumption is no good, we need to do something like ..
#unless (open(TMPFILE, ">$tmp_file")) {
- # &'AppMsg("warning", "unable to open tmp file '$tmp_file' in filter '$filter'");
+ # &::AppMsg("warning", "unable to open tmp file '$tmp_file' in filter '$filter'");
#}
#for my $line (@text) {
# print TMPFILE "$line\n";
@@ -743,7 +743,7 @@ sub CommandFilter {
# Execute the command
@text = ();
unless (&FileFetch(*text, "$cmd < $tmp_file |")) {
- &'AppMsg("warning", "unable to execute command '$cmd' in filter '$filter'");
+ &::AppMsg("warning", "unable to execute command '$cmd' in filter '$filter'");
}
}
@@ -800,7 +800,7 @@ sub CheckParaObject {
# Convert the paragraph to an object
$obj = $attr{'obj'};
delete $attr{'obj'};
- $text = '{{' . &'SdfJoin($obj, $text) . '}}';
+ $text = '{{' . &::SdfJoin($obj, $text) . '}}';
}
#
@@ -833,11 +833,11 @@ sub BuildSectJump {
if ($doc ne '') {
delete $attr{'doc'};
unless ($obj_long{'references',$doc}) {
- &'AppMsg('warning', "unknown document '$doc'");
+ &::AppMsg('warning', "unknown document '$doc'");
}
else {
#if ($var{'HTML_TOPICS_MODE'} || $var{'HTML_SUBTOPICS_MODE'}) {
- # &'AppMsg('warning', "cross-document section jumps not yet supported in topics mode");
+ # &::AppMsg('warning', "cross-document section jumps not yet supported in topics mode");
#}
$attr{'jump'} = $obj_long{'references',$doc,'Jump'} . "#$id";
}
@@ -921,13 +921,13 @@ sub Value {
$result .= $param{"suffix_$attr"};
}
else {
- &'AppMsg("warning", "load of view '$view' failed: $@");
+ &::AppMsg("warning", "load of view '$view' failed: $@");
}
}
# Check the attribute is known and return
unless ($known) {
- &'AppMsg("warning", "undefined attribute '$attr' for object '$name' in class '$class'");
+ &::AppMsg("warning", "undefined attribute '$attr' for object '$name' in class '$class'");
return '';
}
#print STDERR "attr: $attr, view: $view, result: $result.\n" if $view;
@@ -961,7 +961,7 @@ sub LoadView {
if (open(CONV_SET, $name)) {
my $nv_text = join("\n", <CONV_SET>);
close(CONV_SET);
- %params = &main'AppSectionValues($nv_text);
+ %params = &main::AppSectionValues($nv_text);
#print STDERR "nv_text: $nv_text<\n";
#for $igc (sort keys %params) {
#print STDERR "$igc: $params{$igc}.\n";
@@ -1121,13 +1121,13 @@ sub ProcessImageAttrs {
# Check the figure exists
if ($fullname eq '') {
- &'AppMsg("warning", "unable to find image '$filename'");
+ &::AppMsg("warning", "unable to find image '$filename'");
$fullname = $filename;
}
$attr{'fullname'} = $fullname;
# Update the filename
- $filename = (&'NameSplit($fullname))[3];
+ $filename = (&::NameSplit($fullname))[3];
# Prepend the base location, if necessary
$base = $attr{'base'};
diff --git a/perllib/sdf/tohtml.pl b/perllib/sdf/tohtml.pl
index 42e1c83..0da2a07 100644
--- a/perllib/sdf/tohtml.pl
+++ b/perllib/sdf/tohtml.pl
@@ -191,7 +191,7 @@ sub HtmlFormat {
@_html_title_div = ();
# If we're building topics, save the data for a second pass later
- if ($SDF_USER'var{'HTML_TOPICS_MODE'}) {
+ if ($SDF_USER::var{'HTML_TOPICS_MODE'}) {
@data2 = @data;
# Get the current message cursor - we skip the second pass
@@ -221,28 +221,28 @@ sub HtmlFormat {
if ($msg_counts{'error'} || $msg_counts{'abort'} || $msg_counts{'fatal'} ) {
# do nothing
}
- elsif ($SDF_USER'var{'HTML_TOPICS_MODE'}) {
+ elsif ($SDF_USER::var{'HTML_TOPICS_MODE'}) {
- $main = $SDF_USER'var{'DOC_BASE'};
+ $main = $SDF_USER::var{'DOC_BASE'};
@topics_table = ();
@jumps_table = ();
&_HtmlBuildTopicsData($main, *topics_table, *jumps_table);
# Save the topics and jump data, so users can (eventually) rebuild
# just a single topic.
- if ($SDF_USER'var{'HTML_SDJ'}) {
+ if ($SDF_USER::var{'HTML_SDJ'}) {
&_HtmlSaveTopicsData($main, *topics_table, *jumps_table);
}
# Initialise things ready for the next pass
%var2 = %convert_var; # get the original set of variables
- $var2{'HTML_MAIN_TITLE'} = $SDF_USER'var{'DOC_TITLE'};
- $var2{'HTML_URL_CONTENTS'} = $SDF_USER'var{'DOC_BASE'} . ".html";
+ $var2{'HTML_MAIN_TITLE'} = $SDF_USER::var{'DOC_TITLE'};
+ $var2{'HTML_URL_CONTENTS'} = $SDF_USER::var{'DOC_BASE'} . ".html";
$var2{'HTML_TOPICS_MODE'} = 0;
$var2{'HTML_SUBTOPICS_MODE'} = 1;
&SdfInit(*var2);
- &SDF_USER'topics_Filter(*topics_table, 'data', 1);
- &SDF_USER'jumps_Filter(*jumps_table, 'data', 1);
+ &SDF_USER::topics_Filter(*topics_table, 'data', 1);
+ &SDF_USER::jumps_Filter(*jumps_table, 'data', 1);
# Build the sub-topics
@contents2 = ();
@@ -271,26 +271,26 @@ sub _HtmlBuildTopicsData {
local($jump, $physical);
# Ensure that the main topic is first and that it has the highest level
- #if ($SDF_USER'topics[0] eq $main) {
- # $SDF_USER'levels[0] = 0;
+ #if ($SDF_USER::topics[0] eq $main) {
+ # $SDF_USER::levels[0] = 0;
#}
#else {
- # unshift(@SDF_USER'topics, pop(@SDF_USER'topics));
- # pop(@SDF_USER'levels);
- # unshift(@SDF_USER'levels, 0);
+ # unshift(@SDF_USER::topics, pop(@SDF_USER::topics));
+ # pop(@SDF_USER::levels);
+ # unshift(@SDF_USER::levels, 0);
#}
- unshift(@SDF_USER'topics, $main);
- unshift(@SDF_USER'levels, 0);
+ unshift(@SDF_USER::topics, $main);
+ unshift(@SDF_USER::levels, 0);
# Build the topics table
@topics_table = ("Topic|Label|Level|Next|Prev|Up");
- $prev = $SDF_USER'topics[$#SDF_USER'topics];
+ $prev = $SDF_USER::topics[$#SDF_USER::topics];
%last_at = ();
- for ($i = 0; $i <= $#SDF_USER'topics; $i++) {
- $topic = $SDF_USER'topics[$i];
- $level = $SDF_USER'levels[$i];
- $label = $SDF_USER'topic_label{$topic};
- $next = $i < $#SDF_USER'topics ? $SDF_USER'topics[$i + 1] : $SDF_USER'topics[0];
+ for ($i = 0; $i <= $#SDF_USER::topics; $i++) {
+ $topic = $SDF_USER::topics[$i];
+ $level = $SDF_USER::levels[$i];
+ $label = $SDF_USER::topic_label{$topic};
+ $next = $i < $#SDF_USER::topics ? $SDF_USER::topics[$i + 1] : $SDF_USER::topics[0];
$up = $last_at{$level - 1};
push(@topics_table, "$topic|$label|$level|$next|$prev|$up");
@@ -301,8 +301,8 @@ sub _HtmlBuildTopicsData {
# Build the jumps table
@jumps_table = ("Jump|Physical");
- for $jump (sort keys %SDF_USER'jump) {
- $physical = $SDF_USER'jump{$jump};
+ for $jump (sort keys %SDF_USER::jump) {
+ $physical = $SDF_USER::jump{$jump};
push(@jumps_table, "$jump|$physical");
}
}
@@ -423,7 +423,7 @@ sub _HtmlParaAdd {
local($note_attrs);
# Get the example flag
- $is_example = $SDF_USER'parastyles_category{$para_tag} eq 'example';
+ $is_example = $SDF_USER::parastyles_category{$para_tag} eq 'example';
# Enumerated lists are the same as list paragraphs at the previous level,
# except that we bold the text
@@ -433,13 +433,13 @@ sub _HtmlParaAdd {
}
# Get the target format name
- $para_fmt = $SDF_USER'parastyles_to{$para_tag};
+ $para_fmt = $SDF_USER::parastyles_to{$para_tag};
$para_fmt = $is_example ? 'PRE' : 'P' if $para_fmt eq '';
# Map the attributes
- &SdfAttrMap(*para_attrs, 'html', *SDF_USER'paraattrs_to,
- *SDF_USER'paraattrs_map, *SDF_USER'paraattrs_attrs,
- $SDF_USER'parastyles_attrs{$para_tag});
+ &SdfAttrMap(*para_attrs, 'html', *SDF_USER::paraattrs_to,
+ *SDF_USER::paraattrs_map, *SDF_USER::paraattrs_attrs,
+ $SDF_USER::parastyles_attrs{$para_tag});
# Build the Table of Contents as we go
$toc_jump = '';
@@ -447,22 +447,22 @@ sub _HtmlParaAdd {
$hdg_level = $2;
my $orig_para_text = $para_text;
$para_text = &SdfHeadingPrefix($1, $2) . $para_text;
- if ($SDF_USER'var{'HTML_SUBTOPICS_MODE'}) {
+ if ($SDF_USER::var{'HTML_SUBTOPICS_MODE'}) {
$para_fmt = "H" . substr($para_attrs{'orig_style'}, 1);
}
else {
$para_fmt = "H" . $hdg_level;
}
- if ($hdg_level <= $SDF_USER'var{'DOC_TOC'} && !$para_attrs{'notoc'}) {
+ if ($hdg_level <= $SDF_USER::var{'DOC_TOC'} && !$para_attrs{'notoc'}) {
# Build a plain list in SDF. If we're building topics and we're
# building the contents, make sure the jumps go to the right spot.
- if ($SDF_USER'var{'HTML_TOPICS_MODE'}) {
- #$toc_jump = &NameJoin('', $SDF_USER'var{'FILE_BASE'}, "html");
- #if ($SDF_USER'topic_label{$SDF_USER'var{'FILE_BASE'}} ne $para_text) {
+ if ($SDF_USER::var{'HTML_TOPICS_MODE'}) {
+ #$toc_jump = &NameJoin('', $SDF_USER::var{'FILE_BASE'}, "html");
+ #if ($SDF_USER::topic_label{$SDF_USER::var{'FILE_BASE'}} ne $para_text) {
# $toc_jump .= "#" . $para_attrs{'id'};
#}
- $toc_jump = $_html_jump_id{$SDF_USER'var{'FILE_BASE'},$orig_para_text};
+ $toc_jump = $_html_jump_id{$SDF_USER::var{'FILE_BASE'},$orig_para_text};
}
else {
$toc_jump = "#" . $para_attrs{'id'};
@@ -606,7 +606,7 @@ sub _HtmlParaText {
# Expand out link phrases
if ($char_tag eq 'L') {
- ($text, $url) = &SDF_USER'ExpandLink($text);
+ ($text, $url) = &SDF_USER::ExpandLink($text);
$sect_attrs{'jump'} = $url;
}
@@ -631,14 +631,14 @@ sub _HtmlParaText {
$added_anchors = &_HtmlAddAnchors(*text, *sect_attrs);
# Process formatting attributes
- &SdfAttrMap(*sect_attrs, 'html', *SDF_USER'phraseattrs_to,
- *SDF_USER'phraseattrs_map, *SDF_USER'phraseattrs_attrs,
- $SDF_USER'phrasestyles_attrs{$char_tag});
+ &SdfAttrMap(*sect_attrs, 'html', *SDF_USER::phraseattrs_to,
+ *SDF_USER::phraseattrs_map, *SDF_USER::phraseattrs_attrs,
+ $SDF_USER::phrasestyles_attrs{$char_tag});
$char_attrs = &_HtmlAttr(*sect_attrs);
#print STDERR "char_attrs is $char_attrs<\n";
# Map the font
- $char_font = $SDF_USER'phrasestyles_to{$char_tag};
+ $char_font = $SDF_USER::phrasestyles_to{$char_tag};
$char_font = $char_tag if $char_font eq '' && !$added_anchors;
# If attributes are specified for an SDF font, use a SPAN
@@ -693,21 +693,21 @@ sub _HtmlFinalise {
# Build the BODY opening stuff
$body = "BODY";
- $body .= sprintf(' BACKGROUND="%s"', $SDF_USER'var{"HTML_BG_IMAGE"}) if
- defined($SDF_USER'var{"HTML_BG_IMAGE"});
- $body .= sprintf(' BGPROPERTIES="FIXED"') if $SDF_USER'var{"HTML_BG_FIXED"};
- $body .= sprintf(' BGCOLOR="%s"', $SDF_USER'var{"HTML_BG_COLOR"}) if
- defined($SDF_USER'var{"HTML_BG_COLOR"});
- $body .= sprintf(' TEXT="%s"', $SDF_USER'var{"HTML_TEXT_COLOR"}) if
- defined($SDF_USER'var{"HTML_TEXT_COLOR"});
- $body .= sprintf(' LINK="%s"', $SDF_USER'var{"HTML_LINK_COLOR"}) if
- defined($SDF_USER'var{"HTML_LINK_COLOR"});
- $body .= sprintf(' VLINK="%s"', $SDF_USER'var{"HTML_VLINK_COLOR"}) if
- defined($SDF_USER'var{"HTML_VLINK_COLOR"});
+ $body .= sprintf(' BACKGROUND="%s"', $SDF_USER::var{"HTML_BG_IMAGE"}) if
+ defined($SDF_USER::var{"HTML_BG_IMAGE"});
+ $body .= sprintf(' BGPROPERTIES="FIXED"') if $SDF_USER::var{"HTML_BG_FIXED"};
+ $body .= sprintf(' BGCOLOR="%s"', $SDF_USER::var{"HTML_BG_COLOR"}) if
+ defined($SDF_USER::var{"HTML_BG_COLOR"});
+ $body .= sprintf(' TEXT="%s"', $SDF_USER::var{"HTML_TEXT_COLOR"}) if
+ defined($SDF_USER::var{"HTML_TEXT_COLOR"});
+ $body .= sprintf(' LINK="%s"', $SDF_USER::var{"HTML_LINK_COLOR"}) if
+ defined($SDF_USER::var{"HTML_LINK_COLOR"});
+ $body .= sprintf(' VLINK="%s"', $SDF_USER::var{"HTML_VLINK_COLOR"}) if
+ defined($SDF_USER::var{"HTML_VLINK_COLOR"});
# Convert the title, if any, to HTML
- $title = $SDF_USER'var{'HTML_TITLE'};
- $title = $SDF_USER'var{'DOC_TITLE'} if !defined($title);
+ $title = $SDF_USER::var{'HTML_TITLE'};
+ $title = $SDF_USER::var{'DOC_TITLE'} if !defined($title);
if ($title) {
@sdf_title = ("TITLE:$title");
@title = &_HtmlFormatSection(*sdf_title, *dummy);
@@ -718,13 +718,13 @@ sub _HtmlFinalise {
# Prepend some useful things to the stylesheet, if applicable
if ($_html_class_count{'changed'}) {
- my $changed_color = $SDF_USER'var{'HTML_CHANGED_COLOR'};
+ my $changed_color = $SDF_USER::var{'HTML_CHANGED_COLOR'};
unshift(@_html_stylesheet,
".changed {background-color: $changed_color}");
}
# Build the HEAD element (and append BODY opening)
- $version = $SDF_USER'var{'SDF_VERSION'};
+ $version = $SDF_USER::var{'SDF_VERSION'};
@head = (
'<!doctype html public "-//W30//DTD W3 HTML 2.0//EN">',
'',
@@ -752,7 +752,7 @@ sub _HtmlFinalise {
# Build the body contents, unless we're generating an input file for
# the HTMLDOC package
- unless ($SDF_USER'var{'HTMLDOC'}) {
+ unless ($SDF_USER::var{'HTMLDOC'}) {
&_HtmlFinaliseBodyContents(*body, *contents);
}
@@ -782,14 +782,14 @@ sub _HtmlFinaliseBodyContents {
# Finish formatting the table of contents
# Note: we use a filter so that experts can override things!
- &SDF_USER'toc_html_Filter(*contents);
+ &SDF_USER::toc_html_Filter(*contents);
# Now convert it to HTML
@html_contents = &_HtmlFormatSection(*contents, *dummy, 'contents');
# If this is a MAIN document, make the body the contents
# (i.e. ditch the contents). Otherwise, prepend it.
- if ($SDF_USER'var{'HTML_TOPICS_MODE'}) {
+ if ($SDF_USER::var{'HTML_TOPICS_MODE'}) {
@body = @html_contents;
}
else {
@@ -798,36 +798,36 @@ sub _HtmlFinaliseBodyContents {
}
# If this is not a topic, prepend the title division, if any
- unless ($SDF_USER'var{'HTML_SUBTOPICS_MODE'}) {
+ unless ($SDF_USER::var{'HTML_SUBTOPICS_MODE'}) {
unshift(@body, @_html_title_div);
}
# Convert the header, if any, to HTML
$macro = 'HTML_HEADER';
- if ($SDF_USER'var{'HTML_SUBTOPICS_MODE'} &&
- $SDF_USER'macro{'HTML_TOPIC_HEADER'}) {
+ if ($SDF_USER::var{'HTML_SUBTOPICS_MODE'} &&
+ $SDF_USER::macro{'HTML_TOPIC_HEADER'}) {
$macro = 'HTML_TOPIC_HEADER';
}
- if ($SDF_USER'macro{$macro} ne '') {
+ if ($SDF_USER::macro{$macro} ne '') {
@header = ("!$macro");
unshift(@body, &_HtmlFormatSection(*header, *dummy, 'header'));
}
# Convert the footer, if any, to HTML
$macro = 'HTML_FOOTER';
- if ($SDF_USER'var{'HTML_SUBTOPICS_MODE'} &&
- $SDF_USER'macro{'HTML_TOPIC_FOOTER'}) {
+ if ($SDF_USER::var{'HTML_SUBTOPICS_MODE'} &&
+ $SDF_USER::macro{'HTML_TOPIC_FOOTER'}) {
$macro = 'HTML_TOPIC_FOOTER';
}
- if ($SDF_USER'macro{$macro} ne '') {
+ if ($SDF_USER::macro{$macro} ne '') {
@footer = ("!$macro");
push(@body, &_HtmlFormatSection(*footer, *dummy, 'footer'));
}
# Add the pre-header and post-footer, if any
- my $pre_header = $SDF_USER'var{'HTML_PRE_HEADER'};
+ my $pre_header = $SDF_USER::var{'HTML_PRE_HEADER'};
unshift(@body, $pre_header) if $pre_header ne '';
- my $post_footer = $SDF_USER'var{'HTML_POST_FOOTER'};
+ my $post_footer = $SDF_USER::var{'HTML_POST_FOOTER'};
push(@body, $post_footer) if $post_footer ne '';
}
@@ -981,7 +981,7 @@ sub _HtmlAddAnchors {
# requested, change the jump value accordingly. Also,
# we make sure than any special characters are escaped.
$value = $attr{'jump'};
- $user_ext = $SDF_USER'var{'HTML_EXT'};
+ $user_ext = $SDF_USER::var{'HTML_EXT'};
if ($user_ext) {
$value =~ s/\.html/.$user_ext/;
}
@@ -1358,7 +1358,7 @@ sub _HtmlHandlerOutput {
# Update the current topic name (without the extension)
$this_topic = $_html_topic_file[$#_html_topic_file];
$this_topic =~ s/\.html$//;
- $SDF_USER'var{'HTML_TOPIC'} = $this_topic;
+ $SDF_USER::var{'HTML_TOPIC'} = $this_topic;
#print STDERR "HTML_TOPIC: $this_topic.\n";
}
@@ -1545,39 +1545,39 @@ sub HtmlTopicsModeHeading {
# section jumps work as expected
if ($var{'HTML_TOPICS_MODE'}) {
if (! $topic_label{$file_base} && $file_base ne $var{'DOC_BASE'}) {
- $'_html_topic = $file_base;
+ $::_html_topic = $file_base;
push(@levels, $level);
- push(@topics, $'_html_topic);
- $topic_label{$'_html_topic} = $text;
- $topic_level{$'_html_topic} = $level;
- $jump = $'_html_topic . ".html";
- $'_html_topic_start{$file_base,$text} = $'_html_topic;
+ push(@topics, $::_html_topic);
+ $topic_label{$::_html_topic} = $text;
+ $topic_level{$::_html_topic} = $level;
+ $jump = $::_html_topic . ".html";
+ $::_html_topic_start{$file_base,$text} = $::_html_topic;
}
elsif ($level <= $var{'OPT_SPLIT_LEVEL'}) {
- if ($'_html_topic_start{$file_base,$text}) {
- &'AppMsg("warning", "file base '$file_base' & topic heading '$text' combination is not unique'");
+ if ($::_html_topic_start{$file_base,$text}) {
+ &::AppMsg("warning", "file base '$file_base' & topic heading '$text' combination is not unique'");
return;
}
- $'_html_topic = &HtmlTopicName($var{'DOC_BASE'});
+ $::_html_topic = &HtmlTopicName($var{'DOC_BASE'});
push(@levels, $level);
- push(@topics, $'_html_topic);
- $topic_label{$'_html_topic} = $text;
- $topic_level{$'_html_topic} = $level;
- $jump = $'_html_topic . ".html";
- $'_html_topic_start{$file_base,$text} = $'_html_topic;
+ push(@topics, $::_html_topic);
+ $topic_label{$::_html_topic} = $text;
+ $topic_level{$::_html_topic} = $level;
+ $jump = $::_html_topic . ".html";
+ $::_html_topic_start{$file_base,$text} = $::_html_topic;
}
else {
if ($attr{'id'} ne '') {
- $jump = $'_html_topic . ".html#" . $attr{"id"};
+ $jump = $::_html_topic . ".html#" . $attr{"id"};
}
else {
- $jump = $'_html_topic . ".html#" . &TextToId($text);
+ $jump = $::_html_topic . ".html#" . &TextToId($text);
}
}
# Save the jump for this file/text combination.
# This is used for TOC generation.
- $'_html_jump_id{$file_base,$text} = $jump;
+ $::_html_jump_id{$file_base,$text} = $jump;
# Save the place to jump to for this text.
# The jump table is used to resolve SECT jumps (in topics mode).
@@ -1600,13 +1600,13 @@ sub HtmlTopicsModeHeading {
# * prepend the necessary output directives
# * make it the title
# * prevent a line above it by setting the notoc attribute.
- $topic_base = $'_html_topic_start{$file_base,$text};
+ $topic_base = $::_html_topic_start{$file_base,$text};
if ($topic_base) {
$topic_file = "$topic_base.html";
@prepend = ();
$new_level = $topic_level{$topic_base};
- $close_count = $'_html_topic_level - $new_level + 1;
- $'_html_topic_level = $new_level;
+ $close_count = $::_html_topic_level - $new_level + 1;
+ $::_html_topic_level = $new_level;
for ($i = 0; $i < $close_count; $i++) {
push(@prepend, "!output '-'");
}
@@ -1629,11 +1629,11 @@ sub HtmlTopicName {
local($base) = @_;
local($tname);
- $'_html_topic_cntr++;
+ $::_html_topic_cntr++;
$tname = $var{'HTML_TOPIC_PATTERN'};
$tname = '$b_$n' if $tname eq '';
$tname =~ s/\$b/$base/g;
- $tname =~ s/\$n/$'_html_topic_cntr/;
+ $tname =~ s/\$n/$::_html_topic_cntr/;
return $tname;
}
diff --git a/perllib/sdf/tolatex.pl b/perllib/sdf/tolatex.pl
index 49d190d..7fbcfa1 100755
--- a/perllib/sdf/tolatex.pl
+++ b/perllib/sdf/tolatex.pl
@@ -169,7 +169,7 @@ $_LATEX_INCELL = 3;
##### Variables #####
# Right margin position
-$_latex_margin = $SDF_USER'var{'LATEX_MARGIN'} || $_LATEX_DEFAULT_MARGIN;
+$_latex_margin = $SDF_USER::var{'LATEX_MARGIN'} || $_LATEX_DEFAULT_MARGIN;
# Counters for ordered lists - index is the level
@_latex_list_num = 0;
@@ -216,7 +216,7 @@ sub LatexFormat {
local(@contents);
# Initialise defaults
- $_latex_margin = $SDF_USER'var{'LATEX_MARGIN'} || $_LATEX_DEFAULT_MARGIN;
+ $_latex_margin = $SDF_USER::var{'LATEX_MARGIN'} || $_LATEX_DEFAULT_MARGIN;
# Format the paragraphs
@contents = ();
@@ -291,7 +291,7 @@ sub _LatexParaAdd {
local($label);
# Set the example flag
- $in_example = $SDF_USER'parastyles_category{$para_tag} eq 'example';
+ $in_example = $SDF_USER::parastyles_category{$para_tag} eq 'example';
if ($in_example) {
if ($_latex_in_example eq 0) {
@@ -312,13 +312,13 @@ sub _LatexParaAdd {
}
# Get the target format name
- $para_fmt = $SDF_USER'parastyles_to{$para_tag};
+ $para_fmt = $SDF_USER::parastyles_to{$para_tag};
$para_fmt = $para_tag if $para_fmt eq '';
# Map the attributes
- &SdfAttrMap(*para_attrs, 'latex', *SDF_USER'paraattrs_to,
- *SDF_USER'paraattrs_map, *SDF_USER'paraattrs_attrs,
- $SDF_USER'parastyles_attrs{$para_tag});
+ &SdfAttrMap(*para_attrs, 'latex', *SDF_USER::paraattrs_to,
+ *SDF_USER::paraattrs_map, *SDF_USER::paraattrs_attrs,
+ $SDF_USER::parastyles_attrs{$para_tag});
# Build the Table of Contents as we go
@@ -410,17 +410,17 @@ sub _LatexParaText {
if ($char_tag eq 'L') {
- ($text, $url) = &SDF_USER'ExpandLink($text);
+ ($text, $url) = &SDF_USER::ExpandLink($text);
$sect_attrs{'jump'} = $url;
}
if ($char_tag ne 'E'
- && $SDF_USER'phrasestyles_to{$char_tag} ne 'SDF_VERBATIM') {
+ && $SDF_USER::phrasestyles_to{$char_tag} ne 'SDF_VERBATIM') {
# Escape any special characters
$text = &_LatexEscape($text);
}
- if ( $SDF_USER'phrasestyles_to{$char_tag} eq 'SDF_VERBATIM') {
+ if ( $SDF_USER::phrasestyles_to{$char_tag} eq 'SDF_VERBATIM') {
_LatexCheckVerbatim($text);
$text = $_latex_verbatim_open . $text;
}
@@ -432,13 +432,13 @@ sub _LatexParaText {
# Process formatting attributes
- &SdfAttrMap(*sect_attrs, 'latex', *SDF_USER'phraseattrs_to,
- *SDF_USER'phraseattrs_map, *SDF_USER'phraseattrs_attrs,
- $SDF_USER'phrasestyles_attrs{$char_tag});
+ &SdfAttrMap(*sect_attrs, 'latex', *SDF_USER::phraseattrs_to,
+ *SDF_USER::phraseattrs_map, *SDF_USER::phraseattrs_attrs,
+ $SDF_USER::phrasestyles_attrs{$char_tag});
# Map the font
- $char_font = $SDF_USER'phrasestyles_to{$char_tag};
+ $char_font = $SDF_USER::phrasestyles_to{$char_tag};
# Add the text for this phrase
@@ -513,8 +513,8 @@ sub _LatexElement {
$close_list .= "\\end\{$_LATEX_LISTTYPES[$_LATEX_LISTLEVEL]\}\n";
$_LATEX_LISTLEVEL--;
}
- $latex = $close_list . "\n" . "$SDF_USER'parastyles_to{$tag}\{$text\}\n";
-# . ($char x length("$SDF_USER'parastyles_to{$tag}\{$text\}\n")) . "\n";
+ $latex = $close_list . "\n" . "$SDF_USER::parastyles_to{$tag}\{$text\}\n";
+# . ($char x length("$SDF_USER::parastyles_to{$tag}\{$text\}\n")) . "\n";
}
@@ -994,12 +994,12 @@ sub _LatexFinalise {
local($rec, @html_contents, $toc_posn);
# Convert the title
- $title = $SDF_USER'var{'DOC_NAME'};
- $author = $SDF_USER'var{'DOC_AUTHOR'};
- $date = $SDF_USER'var{'DOC_DATE'};
+ $title = $SDF_USER::var{'DOC_NAME'};
+ $author = $SDF_USER::var{'DOC_AUTHOR'};
+ $date = $SDF_USER::var{'DOC_DATE'};
# Build the HEAD element (and append BODY opening)
- $version = $SDF_USER'var{'SDF_VERSION'};
+ $version = $SDF_USER::var{'SDF_VERSION'};
@head = (
'%%% This file was generated using SDF $version by',
'%%% Ian Clatworthy (ianc@mincom.com) and the 2latex_ driver',
diff --git a/perllib/sdf/tomif.pl b/perllib/sdf/tomif.pl
index 7f4495d..0dba010 100755
--- a/perllib/sdf/tomif.pl
+++ b/perllib/sdf/tomif.pl
@@ -584,7 +584,7 @@ sub MifFormat {
$_mif_component_cursor = 0;
# Initialise things for building a book, if necessary
- if ($SDF_USER'var{'MIF_BOOK_MODE'}) {
+ if ($SDF_USER::var{'MIF_BOOK_MODE'}) {
@_mif_component_tbl = ('Part|Type');
}
@@ -606,9 +606,9 @@ sub MifFormat {
if ($msg_counts{'error'} || $msg_counts{'abort'} || $msg_counts{'fatal'} ) {
# do nothing
}
- elsif ($SDF_USER'var{'MIF_BOOK_MODE'}) {
+ elsif ($SDF_USER::var{'MIF_BOOK_MODE'}) {
@_mif_component_tbl = &TableParse(@_mif_component_tbl);
- @result = &_MifBookBuild(*_mif_component_tbl, $SDF_USER'var{'DOC_BASE'});
+ @result = &_MifBookBuild(*_mif_component_tbl, $SDF_USER::var{'DOC_BASE'});
}
else {
@result = &_MifFinalise(*result);
@@ -732,16 +732,16 @@ sub _MifParaAdd {
local($index, $index_code);
# Get the example flag
- $is_example = $SDF_USER'parastyles_category{$para_tag} eq 'example';
+ $is_example = $SDF_USER::parastyles_category{$para_tag} eq 'example';
# After headings, use a FIRST tag instead of a normal tag
if ($prev_tag =~ /^[HAP]\d$/ && $para_tag eq 'N' &&
- $SDF_USER'parastyles_to{'FIRST'} ne '') {
+ $SDF_USER::parastyles_to{'FIRST'} ne '') {
$para_tag = 'FIRST';
}
# Get the Frame format name
- $para_fmt = $SDF_USER'parastyles_to{$para_tag};
+ $para_fmt = $SDF_USER::parastyles_to{$para_tag};
$para_fmt = $para_tag if $para_fmt eq '';
$para_fmt .= 'NoTOC' if $para_attrs{'notoc'};
$_mif_parastyle_used{$para_fmt}++;
@@ -772,9 +772,9 @@ sub _MifParaAdd {
}
# Get the format overrides
- &SdfAttrMap(*para_attrs, 'mif', *SDF_USER'paraattrs_to,
- *SDF_USER'paraattrs_map, *SDF_USER'paraattrs_attrs,
- $SDF_USER'parastyles_attrs{$para_tag});
+ &SdfAttrMap(*para_attrs, 'mif', *SDF_USER::paraattrs_to,
+ *SDF_USER::paraattrs_map, *SDF_USER::paraattrs_attrs,
+ $SDF_USER::parastyles_attrs{$para_tag});
$para_override = &_MifParaSdfAttr(*para_attrs, " ");
# Build the paragraph header
@@ -821,10 +821,10 @@ sub _MifParaAdd {
# If this paragraph is in a generated list, add a cross reference,
# unless we're in book mode
- unless ($SDF_USER'var{'MIF_BOOK_MODE'}) {
+ unless ($SDF_USER::var{'MIF_BOOK_MODE'}) {
if ($para_tag =~ /^[HAP](\d)$/) {
$hdg_level = $1;
- if ($hdg_level <= $SDF_USER'var{'DOC_TOC'} &&
+ if ($hdg_level <= $SDF_USER::var{'DOC_TOC'} &&
!$para_attrs{'notoc'}) {
&_MifAddListXref(*para, $para_fmt, *_mif_toc_list, 'TOC');
}
@@ -1238,7 +1238,7 @@ sub _MifParasToText {
&_MifBuildAttrInfo();
# Decide on the styles to output
- @styles = $SDF_USER'var{'MIF_ALL_STYLES'} ? sort keys %paras :
+ @styles = $SDF_USER::var{'MIF_ALL_STYLES'} ? sort keys %paras :
sort keys %_mif_parastyle_used;
# Build the result
@@ -1371,7 +1371,7 @@ sub _MifTblsToText {
local($name, %attr);
# Decide on the styles to output
- @styles = $SDF_USER'var{'MIF_ALL_STYLES'} ? sort keys %tbls :
+ @styles = $SDF_USER::var{'MIF_ALL_STYLES'} ? sort keys %tbls :
sort keys %_mif_tblstyle_used;
# Build the result
@@ -1405,7 +1405,7 @@ sub _MifTblFormat {
# Add the attributes
for $id (sort keys %attr) {
- $type = $SDF_USER'tableparams_type{"mif.$id"};
+ $type = $SDF_USER::tableparams_type{"mif.$id"};
$value = &_MifAttrFromText($attr{$id}, $type);
push(@text, " <Tbl$id $value>");
}
@@ -1471,7 +1471,7 @@ sub _MifCtrlsToText {
# Get the matching variable name and type
$var_name = "MIF_" . &MiscMixedToUpper(substr($name, 1));
- $type = $SDF_USER'variables_type{$var_name};
+ $type = $SDF_USER::variables_type{$var_name};
# format the value
$value = &_MifAttrFromText($ctrls{$name}, $type);
@@ -1630,10 +1630,10 @@ sub _MifParaSdfAttr {
# get the attribute value & type
$value = $attrs{$attr};
- $type = $SDF_USER'paraattrs_type{$attr};
+ $type = $SDF_USER::paraattrs_type{$attr};
# Get the Frame prefix
- $fm_prefix = $SDF_USER'phraseattrs_name{$attr} ? 'F' : 'Pgf';
+ $fm_prefix = $SDF_USER::phraseattrs_name{$attr} ? 'F' : 'Pgf';
# Check it's a Frame attribute
next unless $attr =~ s/^mif\.//;
@@ -1676,7 +1676,7 @@ sub _MifBuildAttrInfo {
return if @_mif_paraattr_name;
# Add the attribute information
- for $name (sort keys %SDF_USER'paraattrs_type) {
+ for $name (sort keys %SDF_USER::paraattrs_type) {
next unless $name =~ /^mif\./;
# Skip attributes we don't weant to output
@@ -1699,7 +1699,7 @@ sub _MifBuildAttrInfo {
# Store the information
push(@_mif_paraattr_name, $short_name);
push(@_mif_paraattr_full, $new_name);
- push(@_mif_paraattr_type, $SDF_USER'paraattrs_type{$name});
+ push(@_mif_paraattr_type, $SDF_USER::paraattrs_type{$name});
}
}
@@ -1778,7 +1778,7 @@ sub _MifFontFormat {
$short_name =~ s/^mif\.//;
# get the attribute type and value
- $type = $SDF_USER'phraseattrs_type{"mif.$short_name"};
+ $type = $SDF_USER::phraseattrs_type{"mif.$short_name"};
$value = $attr{$attr};
# For MIF font definitions, an empty value implies "as-is"
@@ -1816,7 +1816,7 @@ sub _MifCharFont {
for $attr (sort keys %attr) {
# get the attribute type and value
- $type = $SDF_USER'phraseattrs_type{$attr};
+ $type = $SDF_USER::phraseattrs_type{$attr};
$value = $attr{$attr};
# Check it's a Frame attribute and map it to a MIF name
@@ -1857,7 +1857,7 @@ sub _MifParaText {
# Escape any special characters
if ($sect_type eq 'phrase') {
- ($text) = &SDF_USER'ExpandLink($text) if $char_tag eq 'L';
+ ($text) = &SDF_USER::ExpandLink($text) if $char_tag eq 'L';
&_MifEscape(*text, $is_example);
}
elsif ($sect_type eq 'string') {
@@ -1886,10 +1886,10 @@ sub _MifParaText {
}
# Process formatting attributes
- &SdfAttrMap(*sect_attrs, 'mif', *SDF_USER'phraseattrs_to,
- *SDF_USER'phraseattrs_map, *SDF_USER'phraseattrs_attrs,
- $SDF_USER'phrasestyles_attrs{$char_tag});
- $char_font = &_MifCharFont($SDF_USER'phrasestyles_to{$char_tag}, " ",
+ &SdfAttrMap(*sect_attrs, 'mif', *SDF_USER::phraseattrs_to,
+ *SDF_USER::phraseattrs_map, *SDF_USER::phraseattrs_attrs,
+ $SDF_USER::phrasestyles_attrs{$char_tag});
+ $char_font = &_MifCharFont($SDF_USER::phrasestyles_to{$char_tag}, " ",
%sect_attrs);
push(@char_fonts, $char_font);
$para .= $char_font;
@@ -1993,7 +1993,7 @@ sub _MifAddLink {
# local();
if ($link) {
- $link = &_MifLink($link, $SDF_USER'var{'MIF_EXT'});
+ $link = &_MifLink($link, $SDF_USER::var{'MIF_EXT'});
$para .= " <Marker\n" .
" <MType 8>\n" .
" <MText `$link'>\n" .
@@ -2023,18 +2023,18 @@ sub _MifFinalise {
local($mainflow);
# Process document control settings
- &_MifProcessControls(*SDF_USER'var, $component_type);
+ &_MifProcessControls(*SDF_USER::var, $component_type);
# Get the page width and height
- $pwidth = $SDF_USER'var{'DOC_PAGE_WIDTH'};
- $pheight = $SDF_USER'var{'DOC_PAGE_HEIGHT'};
+ $pwidth = $SDF_USER::var{'DOC_PAGE_WIDTH'};
+ $pheight = $SDF_USER::var{'DOC_PAGE_HEIGHT'};
# Generate the master pages
$component_prefix = $component_type eq '' ? '' : $component_type . "_";
&_MifAddMasterPage('First', $component_prefix . "FIRST", $pwidth, $pheight,
$_MIF_TEXTFLOW_MAIN);
&_MifAddMasterPage('Right', $component_prefix . "RIGHT", $pwidth, $pheight);
- if ($SDF_USER'var{'DOC_TWO_SIDES'}) {
+ if ($SDF_USER::var{'DOC_TWO_SIDES'}) {
&_MifAddMasterPage('Left', $component_prefix . "LEFT", $pwidth, $pheight);
}
@@ -2127,8 +2127,8 @@ $igc_start = time;
"<TFAutoConnect Yes>",
"<TFSideheads Yes>",
"<TFSideheadPlacement Left>",
- "<TFSideheadGap $SDF_USER'var{OPT_SIDEHEAD_GAP}>",
- "<TFSideheadWidth $SDF_USER'var{OPT_SIDEHEAD_WIDTH}>",
+ "<TFSideheadGap $SDF_USER::var{OPT_SIDEHEAD_GAP}>",
+ "<TFSideheadWidth $SDF_USER::var{OPT_SIDEHEAD_WIDTH}>",
"<Notes ",
"> # end of Notes",
@text);
@@ -2191,12 +2191,12 @@ sub _MifProcessControls {
$_mif_ctrls{'DPageNumStyle'} = 'Arabic';
if ($component_type eq 'CHAPTER') {
$sdf_tag = $vars{'OPT_COMPONENT_COVER'} ? 'H1NUM' : 'H1';
- $mif_tag = $SDF_USER'parastyles_to{$sdf_tag};
+ $mif_tag = $SDF_USER::parastyles_to{$sdf_tag};
$prefix = "<\$paranumonly[$mif_tag]>";
}
elsif ($component_type eq 'APPENDIX') {
$sdf_tag = $vars{'OPT_COMPONENT_COVER'} ? 'A1NUM' : 'A1';
- $mif_tag = $SDF_USER'parastyles_to{$sdf_tag};
+ $mif_tag = $SDF_USER::parastyles_to{$sdf_tag};
$prefix = "<\$paranumonly[$mif_tag]>";
}
elsif ($component_type eq 'IX') {
@@ -2280,7 +2280,7 @@ sub _MifAddMasterPage {
$prefix = $sdf_type =~ /^IX/ ? 'OPT_IX' : 'OPT';
$sh_width = &SdfVarPoints("${prefix}_SIDEHEAD_WIDTH");
$sh_gap = &SdfVarPoints("${prefix}_SIDEHEAD_GAP");
- $col_count = $SDF_USER'var{"${prefix}_COLUMNS"};
+ $col_count = $SDF_USER::var{"${prefix}_COLUMNS"};
$col_gap = &SdfVarPoints("${prefix}_COLUMN_GAP");
# Add the main section
@@ -2565,7 +2565,7 @@ sub _MifAddPageBackground {
#$bg_ext = 'bg' . substr($sdf_fmext, -1);
$bg_ext = 'mif';
$bg_short = &NameJoin('', $background, $bg_ext);
- $bg_file = &SDF_USER'FindFile($bg_short);
+ $bg_file = &SDF_USER::FindFile($bg_short);
if ($bg_file eq '') {
&AppMsg("warning", "unable to find background file '$bg_short'");
return;
@@ -2637,7 +2637,7 @@ sub _MifAddRefPages {
for $name (sort keys %_mif_frames) {
%attr = &_MifAttrSplit($_mif_frames{$name});
$width = $attr{'Width'};
- $width = $SDF_USER'var{'DOC_FULL_WIDTH'} if $width eq '';
+ $width = $SDF_USER::var{'DOC_FULL_WIDTH'} if $width eq '';
$height = $attr{'Height'};
$page_y += $height + 36;
@@ -2706,9 +2706,9 @@ sub _MifAddSpecialTextFlow {
# we make sure this cannot happen!!!
@mif_text = ();
if ($name eq 'TOC') {
- for ($j = 1; $j <= $SDF_USER'var{'DOC_TOC'}; $j++) {
+ for ($j = 1; $j <= $SDF_USER::var{'DOC_TOC'}; $j++) {
for $tagtype ('H', 'A', 'P') {
- $hdgtag = $SDF_USER'parastyles_to{"$tagtype$j"};
+ $hdgtag = $SDF_USER::parastyles_to{"$tagtype$j"};
$tag = $hdgtag . $name;
$_mif_parastyle_used{$tag}++;
$layout = &_MifFixLayout($attr{'Layout'}, $hdgtag);
@@ -2723,7 +2723,7 @@ sub _MifAddSpecialTextFlow {
}
# Ensure the index makes it into the contents
- $hdgtag = $SDF_USER'parastyles_to{"IXT"};
+ $hdgtag = $SDF_USER::parastyles_to{"IXT"};
$tag = $hdgtag . $name;
$_mif_parastyle_used{$tag}++;
$layout = &_MifFixLayout($attr{'Layout'}, $hdgtag);
@@ -2736,7 +2736,7 @@ sub _MifAddSpecialTextFlow {
"> # end of Para");
}
elsif ($name eq 'LOF') {
- $hdgtag = $SDF_USER'parastyles_to{"FT"};
+ $hdgtag = $SDF_USER::parastyles_to{"FT"};
$tag = $hdgtag . $name;
$_mif_parastyle_used{$tag}++;
$layout = &_MifFixLayout($attr{'Layout'}, $hdgtag);
@@ -2749,7 +2749,7 @@ sub _MifAddSpecialTextFlow {
"> # end of Para");
}
elsif ($name eq 'LOT') {
- $hdgtag = $SDF_USER'parastyles_to{"TT"};
+ $hdgtag = $SDF_USER::parastyles_to{"TT"};
$tag = $hdgtag . $name;
$_mif_parastyle_used{$tag}++;
$layout = &_MifFixLayout($attr{'Layout'}, $hdgtag);
@@ -2835,7 +2835,7 @@ sub _MifAddLists {
local($toc_offset);
# Set some flags based on the output ultimately generated
- $target = $SDF_USER'var{'OPT_TARGET'};
+ $target = $SDF_USER::var{'OPT_TARGET'};
$soft = $target eq 'help' || $target eq 'html';
# Process the list definitions (add xrefs, etc.)
@@ -2887,16 +2887,16 @@ sub _MifListTitle {
# If we're building component covers, make sure that the relevant SDF
# macro gets called
$mif = '';
- if ($SDF_USER'var{'OPT_COMPONENT_COVER'} &&
+ if ($SDF_USER::var{'OPT_COMPONENT_COVER'} &&
($type eq 'TOC' || $type eq 'IX')) {
@sdf_data = ('!DOC_COMPONENT_COVER_BEGIN');
&_MifAddSection(*mif_data, *sdf_data);
$mif = join("\n", @mif_data) . "\n";
}
- $tag = $SDF_USER'parastyles_to{$type . 'T'};
+ $tag = $SDF_USER::parastyles_to{$type . 'T'};
$_mif_parastyle_used{$tag}++;
- $title = $SDF_USER'var{"DOC_${type}_TITLE"};
+ $title = $SDF_USER::var{"DOC_${type}_TITLE"};
$title = $default_title if $title eq '';
&_MifEscape(*title);
$mif .=
@@ -3034,7 +3034,7 @@ sub _MifHandlerTuning {
# Find the template file. A template file is searched for by
# looking for {{tuning}}.{{fmver}} along the SDF include
# path, where {{sdfver}} is fm4 or fm5 (typically).
- $template_file = &SDF_USER'FindFile(&NameJoin('', $tuning, $sdf_fmext));
+ $template_file = &SDF_USER::FindFile(&NameJoin('', $tuning, $sdf_fmext));
if ($template_file eq '') {
#&AppMsg("warning", "unable to find template '$tuning'");
return;
@@ -3092,7 +3092,7 @@ sub _MifHandlerTable {
# Get the style
$style = $attr{'style'};
- $style_tag = $SDF_USER'tablestyles_to{$style};
+ $style_tag = $SDF_USER::tablestyles_to{$style};
if ($style_tag eq '') {
&AppMsg("warning", "unknown table style '$style'");
$style_tag = $style;
@@ -3128,10 +3128,10 @@ sub _MifHandlerTable {
# Get the table width and 1% (i.e. unit) width
if ($attr{'wide'}) {
- $tbl_width = $SDF_USER'var{'DOC_FULL_WIDTH'} - $indent;
+ $tbl_width = $SDF_USER::var{'DOC_FULL_WIDTH'} - $indent;
}
else {
- $tbl_width = $SDF_USER'var{'DOC_TEXT_WIDTH'} - $indent;
+ $tbl_width = $SDF_USER::var{'DOC_TEXT_WIDTH'} - $indent;
}
$unit_width = $tbl_width / 100;
@@ -3161,7 +3161,7 @@ sub _MifHandlerTable {
# If we're ultimately going to rtf or hlp, output a simple set of
# column widths
- $target = $SDF_USER'var{'OPT_TARGET'};
+ $target = $SDF_USER::var{'OPT_TARGET'};
if ($target eq 'hlp' || $target eq 'rtf') {
push(@outbuffer, " <TblNumColumns $columns>");
@widths = split(/,/, $attr{'format'});
@@ -3387,7 +3387,7 @@ sub _MifHandlerEndTable {
$tbl_title = pop(@_mif_tbl_title);
$landscape = pop(@_mif_tbl_landscape);
if (@_mif_tbl_id) {
- &'AppMsg("warning", "ignoring nested MIF table");
+ &::AppMsg("warning", "ignoring nested MIF table");
}
else {
if ($landscape) {
@@ -3891,7 +3891,7 @@ sub _MifRunningHF {
# Convert the SDF tag names to Frame ones
@tags = split(/,/, $tags);
for $tag (@tags) {
- $fmtag = $SDF_USER'parastyles_to{$tag};
+ $fmtag = $SDF_USER::parastyles_to{$tag};
$tag = $fmtag if $fmtag ne '';
}
$defn = "<\$$type\[" . join(",", @tags) . "]>";
@@ -4042,7 +4042,7 @@ sub _MifAddRef {
#if (! &NameIsAbsolute($name) && $attr{'root'} ne '') {
#$name = &NameJoin($attr{'root'}, $name);
#}
- if ($SDF_USER'var{'OPT_TARGET'} eq 'hlp') {
+ if ($SDF_USER::var{'OPT_TARGET'} eq 'hlp') {
$mif_path = &_MifPathName($name);
}
else {
@@ -4129,7 +4129,7 @@ sub _MifUpdateMainFlow {
# Get the paragraph tag: 'Title' or 'Body'?
if ($title ne '') {
- $tag = $SDF_USER'parastyles_to{$_MIF_TITLE_TAG{$what}};
+ $tag = $SDF_USER::parastyles_to{$_MIF_TITLE_TAG{$what}};
# Escape special characters
$title =~ s/([\>\\])/\\$1/g;
@@ -4138,7 +4138,7 @@ sub _MifUpdateMainFlow {
$title =~ s/([`])/\\Q/g;
}
else {
- $tag = $SDF_USER'parastyles_to{$_MIF_NOTITLE_TAG{$what}};
+ $tag = $SDF_USER::parastyles_to{$_MIF_NOTITLE_TAG{$what}};
}
# Build the paragraph
@@ -4283,12 +4283,12 @@ sub _MifAddNestedText {
# The height is calculated as a percentage of the text column
# height. We also need an "adjusted height" for the embedded
# text rectangle, otherwise Frame crops the table border.
- $width = $SDF_USER'var{'DOC_TEXT_WIDTH'};
+ $width = $SDF_USER::var{'DOC_TEXT_WIDTH'};
if ($nested == 1) {
- $height = $SDF_USER'var{'DOC_TEXT_HEIGHT'};
+ $height = $SDF_USER::var{'DOC_TEXT_HEIGHT'};
}
elsif ($nested =~ /^(\d+)\%?$/) {
- $height = $SDF_USER'var{'DOC_TEXT_HEIGHT'} * $1 / 100;
+ $height = $SDF_USER::var{'DOC_TEXT_HEIGHT'} * $1 / 100;
}
else {
$height = &SdfPoints($nested);
@@ -4316,7 +4316,7 @@ sub _MifAddNestedText {
push(@_mif_figure, join("\n", @frame));
# Build the new text
- $tag = $SDF_USER'parastyles_to{'N'};
+ $tag = $SDF_USER::parastyles_to{'N'};
$_mif_parastyle_used{$tag}++;
@result = (
"<Para\n" .
@@ -4478,7 +4478,7 @@ sub MifNewComponent {
local($cname);
# Save away the component details (so a book can be constructed later)
- $cname = &_MifComponentName($SDF_USER'var{'DOC_BASE'});
+ $cname = &_MifComponentName($SDF_USER::var{'DOC_BASE'});
$type = 'chapter' if $type eq '1';
push(@_mif_component_tbl, "$cname|$type");
push(@_mif_component_type, "\U$type");
@@ -4486,7 +4486,7 @@ sub MifNewComponent {
# Ensure that each component gets placed into its own output file.
# (stdlib/mif.sdt takes care of the first part, so ignore it)
if (scalar(@_mif_component_tbl) > 2) {
- &SDF_USER'PrependText(
+ &SDF_USER::PrependText(
"!DOC_COMPONENT_END",
"!output '-'",
"!output '$cname'",
@@ -4494,7 +4494,7 @@ sub MifNewComponent {
"!DOC_COMPONENT_BEGIN");
}
else {
- $SDF_USER'var{'DOC_COMPONENT'} = $type;
+ $SDF_USER::var{'DOC_COMPONENT'} = $type;
}
# Return the component name (needed for stdlib/mif.sdt)
@@ -4511,7 +4511,7 @@ sub _MifComponentName {
local($cname);
$_mif_component_cntr++;
- $cname = $SDF_USER'var{'MIF_COMPONENT_PATTERN'};
+ $cname = $SDF_USER::var{'MIF_COMPONENT_PATTERN'};
$cname = '$b_$n.$o' if $cname eq '';
$cname =~ s/\$b/$base/g;
$cname =~ s/\$n/$_mif_component_cntr/;
@@ -4548,17 +4548,17 @@ sub _MifBookBuild {
%values = &TableRecSplit(*flds, $book[$i]);
$type = $values{'Type'};
if ($added_toc == 0 && $type ne 'front' && $type ne 'pretoc') {
- if ($SDF_USER'var{'DOC_TOC'}) {
+ if ($SDF_USER::var{'DOC_TOC'}) {
$mif_file = &_MifBookDerived($base, 'toc', 'Table of Contents');
&_MifBookAddPart(*newbook, *batch, $mif_file, 'toc');
push(@sdf_book_files, $mif_file);
}
- if ($SDF_USER'var{'DOC_LOF'}) {
+ if ($SDF_USER::var{'DOC_LOF'}) {
$mif_file = &_MifBookDerived($base, 'lof', 'List of Figures');
&_MifBookAddPart(*newbook, *batch, $mif_file, 'lof');
push(@sdf_book_files, $mif_file);
}
- if ($SDF_USER'var{'DOC_LOT'}) {
+ if ($SDF_USER::var{'DOC_LOT'}) {
$mif_file = &_MifBookDerived($base, 'lot', 'List of Tables');
&_MifBookAddPart(*newbook, *batch, $mif_file, 'lot');
push(@sdf_book_files, $mif_file);
@@ -4571,7 +4571,7 @@ sub _MifBookBuild {
&_MifBookAddPart(*newbook, *batch, $mif_file, $type);
push(@sdf_book_files, $mif_file);
}
- if ($SDF_USER'var{'DOC_IX'}) {
+ if ($SDF_USER::var{'DOC_IX'}) {
$mif_file = &_MifBookDerived($base, 'ix', 'Index');
&_MifBookAddPart(*newbook, *batch, $mif_file, 'ix');
push(@sdf_book_files, $mif_file);
@@ -4581,10 +4581,10 @@ sub _MifBookBuild {
&_MifRunBatch(*batch, $verbose);
# Cleanup the MIF for each part
- &SDF_USER'SdfBookClean();
+ &SDF_USER::SdfBookClean();
# Return result
- return &MifBook(*newbook, $SDF_USER'var{'OPT_NUMBER_PER_COMPONENT'});
+ return &MifBook(*newbook, $SDF_USER::var{'OPT_NUMBER_PER_COMPONENT'});
}
#
@@ -4604,7 +4604,7 @@ sub _MifBookDerived {
# Build the sdf
$upper_type = "\U$type";
$tag = $upper_type . 'T';
- $title = $SDF_USER'var{"DOC_${upper_type}_TITLE"};
+ $title = $SDF_USER::var{"DOC_${upper_type}_TITLE"};
$title = $default_title if $title eq '';
@sdf_text = ("$tag:$title");
@@ -4710,22 +4710,22 @@ sub MifBook {
if ($type eq 'toc') {
$suffix = 'TOC';
@tags = ();
- for ($j = 1; $j <= $SDF_USER'var{'DOC_TOC'}; $j++) {
- push(@tags, $SDF_USER'parastyles_to{"H$j"},
- $SDF_USER'parastyles_to{"A$j"}, $SDF_USER'parastyles_to{"P$j"});
+ for ($j = 1; $j <= $SDF_USER::var{'DOC_TOC'}; $j++) {
+ push(@tags, $SDF_USER::parastyles_to{"H$j"},
+ $SDF_USER::parastyles_to{"A$j"}, $SDF_USER::parastyles_to{"P$j"});
}
- push(@tags, $SDF_USER'parastyles_to{"LOFT"});
- push(@tags, $SDF_USER'parastyles_to{"LOTT"});
- push(@tags, $SDF_USER'parastyles_to{"IXT"});
+ push(@tags, $SDF_USER::parastyles_to{"LOFT"});
+ push(@tags, $SDF_USER::parastyles_to{"LOTT"});
+ push(@tags, $SDF_USER::parastyles_to{"IXT"});
}
elsif ($type eq 'lof') {
$suffix = 'LOF';
- @tags = ($SDF_USER'parastyles_to{"FT"});
+ @tags = ($SDF_USER::parastyles_to{"FT"});
$settings{'StartPageSide'} = 'NextAvailableSide';
}
elsif ($type eq 'lot') {
$suffix = 'LOT';
- @tags = ($SDF_USER'parastyles_to{"TT"});
+ @tags = ($SDF_USER::parastyles_to{"TT"});
$settings{'StartPageSide'} = 'NextAvailableSide';
}
elsif ($type eq 'ix') {
diff --git a/perllib/sdf/topod.pl b/perllib/sdf/topod.pl
index 81ae301..963a170 100755
--- a/perllib/sdf/topod.pl
+++ b/perllib/sdf/topod.pl
@@ -202,22 +202,22 @@ sub _PodParaAdd {
local($indent);
# Set the example flag
- $_pod_in_example = $SDF_USER'parastyles_category{$para_tag} eq 'example';
+ $_pod_in_example = $SDF_USER::parastyles_category{$para_tag} eq 'example';
# Get the target format name
- $para_fmt = $SDF_USER'parastyles_to{$para_tag};
+ $para_fmt = $SDF_USER::parastyles_to{$para_tag};
$para_fmt = $para_tag if $para_fmt eq '';
# Map the attributes
- &SdfAttrMap(*para_attrs, 'pod', *SDF_USER'paraattrs_to,
- *SDF_USER'paraattrs_map, *SDF_USER'paraattrs_attrs,
- $SDF_USER'parastyles_attrs{$para_tag});
+ &SdfAttrMap(*para_attrs, 'pod', *SDF_USER::paraattrs_to,
+ *SDF_USER::paraattrs_map, *SDF_USER::paraattrs_attrs,
+ $SDF_USER::parastyles_attrs{$para_tag});
# Build the Table of Contents as we go
$toc_jump = '';
if ($para_tag =~ /^[HAP](\d)$/) {
$hdg_level = $1;
- if ($hdg_level <= $SDF_USER'var{'DOC_TOC'} && !$para_attrs{'notoc'}) {
+ if ($hdg_level <= $SDF_USER::var{'DOC_TOC'} && !$para_attrs{'notoc'}) {
# Build a plain list in SDF
$toc_jump = $para_attrs{'id'};
@@ -326,12 +326,12 @@ sub _PodParaText {
$text = &_PodEscape($text, 1);
# Process formatting attributes
- &SdfAttrMap(*sect_attrs, 'pod', *SDF_USER'phraseattrs_to,
- *SDF_USER'phraseattrs_map, *SDF_USER'phraseattrs_attrs,
- $SDF_USER'phrasestyles_attrs{$char_tag});
+ &SdfAttrMap(*sect_attrs, 'pod', *SDF_USER::phraseattrs_to,
+ *SDF_USER::phraseattrs_map, *SDF_USER::phraseattrs_attrs,
+ $SDF_USER::phrasestyles_attrs{$char_tag});
# Map the font - italics is the default
- $char_font = $SDF_USER'phrasestyles_to{$char_tag};
+ $char_font = $SDF_USER::phrasestyles_to{$char_tag};
$char_font = 'I' if $char_font eq '';
# Add the text for this phrase
@@ -442,7 +442,7 @@ sub _PodElement {
# For headings, map the tag to a command
if ($tag =~ /^head/) {
- if ($SDF_USER'var{'MAN_CONVENTIONS'}) {
+ if ($SDF_USER::var{'MAN_CONVENTIONS'}) {
if ($tag =~ /^head1/ && !$seen_name) {
$seen_name = 1;
return "=$tag NAME\n\n$text\n";
diff --git a/perllib/sdf/tosgml.pl b/perllib/sdf/tosgml.pl
index 79f34fc..6779719 100755
--- a/perllib/sdf/tosgml.pl
+++ b/perllib/sdf/tosgml.pl
@@ -197,7 +197,7 @@ sub _SgmlParaAdd {
local($list_tag);
# Get the example flag
- $is_example = $SDF_USER'parastyles_category{$para_tag} eq 'example';
+ $is_example = $SDF_USER::parastyles_category{$para_tag} eq 'example';
# Enumerated lists are the same as list paragraphs at the previous level,
# except that we bold the text
@@ -207,13 +207,13 @@ sub _SgmlParaAdd {
}
# Get the target format name
- $para_fmt = $SDF_USER'parastyles_to{$para_tag};
+ $para_fmt = $SDF_USER::parastyles_to{$para_tag};
$para_fmt = $is_example ? 'tscreen' : 'p' if $para_fmt eq '';
# Map the attributes
- &SdfAttrMap(*para_attrs, 'sgml', *SDF_USER'paraattrs_to,
- *SDF_USER'paraattrs_map, *SDF_USER'paraattrs_attrs,
- $SDF_USER'parastyles_attrs{$para_tag});
+ &SdfAttrMap(*para_attrs, 'sgml', *SDF_USER::paraattrs_to,
+ *SDF_USER::paraattrs_map, *SDF_USER::paraattrs_attrs,
+ $SDF_USER::parastyles_attrs{$para_tag});
# Handle headings
if ($para_tag =~ /^[HAP](\d)$/) {
@@ -326,7 +326,7 @@ sub _SgmlParaText {
# Expand out link phrases
if ($char_tag eq 'L') {
- ($text, $url) = &SDF_USER'ExpandLink($text);
+ ($text, $url) = &SDF_USER::ExpandLink($text);
$sect_attrs{'jump'} = $url;
}
@@ -342,12 +342,12 @@ sub _SgmlParaText {
$added_anchors = &_SgmlAddAnchors(*text, *sect_attrs);
# Process formatting attributes
- &SdfAttrMap(*sect_attrs, 'sgml', *SDF_USER'phraseattrs_to,
- *SDF_USER'phraseattrs_map, *SDF_USER'phraseattrs_attrs,
- $SDF_USER'phrasestyles_attrs{$char_tag});
+ &SdfAttrMap(*sect_attrs, 'sgml', *SDF_USER::phraseattrs_to,
+ *SDF_USER::phraseattrs_map, *SDF_USER::phraseattrs_attrs,
+ $SDF_USER::phrasestyles_attrs{$char_tag});
# Map the font
- $char_font = $SDF_USER'phrasestyles_to{$char_tag};
+ $char_font = $SDF_USER::phrasestyles_to{$char_tag};
$char_font = 'em' if $char_font eq '' && !$added_anchors;
# Add the text for this phrase
@@ -532,7 +532,7 @@ sub _SgmlAddAnchors {
# requested, change the jump value accordingly. Also,
# we make sure than any special characters are escaped.
$value = $attr{'jump'};
- $user_ext = $SDF_USER'var{'SGML_EXT'};
+ $user_ext = $SDF_USER::var{'SGML_EXT'};
if ($user_ext) {
$value =~ s/\.sgml/.$user_ext/;
}
diff --git a/perllib/sdf/totxt.pl b/perllib/sdf/totxt.pl
index 289d5e1..33dfd1e 100755
--- a/perllib/sdf/totxt.pl
+++ b/perllib/sdf/totxt.pl
@@ -168,7 +168,7 @@ $_TXT_INCELL = 3;
##### Variables #####
# Right margin position
-$_txt_margin = $SDF_USER'var{'TXT_MARGIN'} || $_TXT_DEFAULT_MARGIN;
+$_txt_margin = $SDF_USER::var{'TXT_MARGIN'} || $_TXT_DEFAULT_MARGIN;
# Counters for ordered lists - index is the level
@_txt_list_num = 0;
@@ -199,7 +199,7 @@ sub TxtFormat {
local(@contents);
# Initialise defaults
- $_txt_margin = $SDF_USER'var{'TXT_MARGIN'} || $_TXT_DEFAULT_MARGIN;
+ $_txt_margin = $SDF_USER::var{'TXT_MARGIN'} || $_TXT_DEFAULT_MARGIN;
# Format the paragraphs
@contents = ();
@@ -273,7 +273,7 @@ sub _TxtParaAdd {
local($label);
# Set the example flag
- $in_example = $SDF_USER'parastyles_category{$para_tag} eq 'example';
+ $in_example = $SDF_USER::parastyles_category{$para_tag} eq 'example';
# Enumerated lists are the same as list paragraphs at the previous level
if ($para_tag =~ /^LI(\d)$/) {
@@ -281,20 +281,20 @@ sub _TxtParaAdd {
}
# Get the target format name
- $para_fmt = $SDF_USER'parastyles_to{$para_tag};
+ $para_fmt = $SDF_USER::parastyles_to{$para_tag};
$para_fmt = $para_tag if $para_fmt eq '';
# Map the attributes
- &SdfAttrMap(*para_attrs, 'txt', *SDF_USER'paraattrs_to,
- *SDF_USER'paraattrs_map, *SDF_USER'paraattrs_attrs,
- $SDF_USER'parastyles_attrs{$para_tag});
+ &SdfAttrMap(*para_attrs, 'txt', *SDF_USER::paraattrs_to,
+ *SDF_USER::paraattrs_map, *SDF_USER::paraattrs_attrs,
+ $SDF_USER::parastyles_attrs{$para_tag});
# Build the Table of Contents as we go
$toc_jump = '';
if ($para_tag =~ /^([HAP])(\d)$/) {
$hdg_level = $2;
$para_text = &SdfHeadingPrefix($1, $2) . $para_text;
- if ($hdg_level <= $SDF_USER'var{'DOC_TOC'} && !$para_attrs{'notoc'}) {
+ if ($hdg_level <= $SDF_USER::var{'DOC_TOC'} && !$para_attrs{'notoc'}) {
# Build a plain list in SDF
$toc_jump = $para_attrs{'id'};
@@ -391,7 +391,7 @@ sub _TxtParaText {
}
elsif ($sect_type eq 'phrase') {
- ($text) = &SDF_USER'ExpandLink($text) if $char_tag eq 'L';
+ ($text) = &SDF_USER::ExpandLink($text) if $char_tag eq 'L';
$para .= $text;
}
@@ -449,7 +449,7 @@ sub _TxtElement {
# For headings, underline the text unless requested not to
elsif ($tag =~ /^[HAP](\d)/) {
$txt = "$text\n";
- unless ($SDF_USER'var{'TXT_HDG_UL_OFF'}){
+ unless ($SDF_USER::var{'TXT_HDG_UL_OFF'}){
$char = $1 == 1 ? "=" : "-";
$txt .= ($char x length($text)) . "\n";
}
diff --git a/perllib/sdf/values.pl b/perllib/sdf/values.pl
index 83de635..19c2b53 100644
--- a/perllib/sdf/values.pl
+++ b/perllib/sdf/values.pl
@@ -61,7 +61,7 @@ sub references_Printdoc_Value {
# Get the filename and check it exists
$jump = &Value("references", $name, "Jump", $view);
- $jump = &'NameSubExt($jump, "ps");
+ $jump = &::NameSubExt($jump, "ps");
return '' unless -f $jump;
# Build the cgi call, using DIR_ABS_URL to get the absolute URL of
@@ -121,11 +121,11 @@ sub AttrToFile {
# Get the filename
$jump = &Value($class, $name, "Jump", $view);
if ($suffix) {
- ($dir, $base, $ext) = &'NameSplit($jump);
- $jump = &'NameJoin($dir, $base . "_$image", $ext);
+ ($dir, $base, $ext) = &::NameSplit($jump);
+ $jump = &::NameJoin($dir, $base . "_$image", $ext);
}
else {
- $jump = &'NameSubExt($jump, $image);
+ $jump = &::NameSubExt($jump, $image);
}
# If the name looks like a URL, assume it exists.
@@ -146,7 +146,7 @@ sub references_PS_Value {
# Get the filename
$jump = &Value("references", $name, "Jump", $view);
- $jump = &'NameSubExt($jump, "ps");
+ $jump = &::NameSubExt($jump, "ps");
# If the name looks like a URL, assume it exists.
# Otherwise, we assume it a filename and only return an icon
@@ -165,7 +165,7 @@ sub references_PDF_Value {
# Get the filename
$jump = &Value("references", $name, "Jump", $view);
- $jump = &'NameSubExt($jump, "pdf");
+ $jump = &::NameSubExt($jump, "pdf");
# If the name looks like a URL, assume it exists.
# Otherwise, we assume it a filename and only return an icon
@@ -184,7 +184,7 @@ sub references_TXT_Value {
# Get the filename
$jump = &Value("references", $name, "Jump", $view);
- $jump = &'NameSubExt($jump, "txt");
+ $jump = &::NameSubExt($jump, "txt");
# If the name looks like a URL, assume it exists.
# Otherwise, we assume it a filename and only return an icon
@@ -203,7 +203,7 @@ sub references_DOC_Value {
# Get the filename
$jump = &Value("references", $name, "Jump", $view);
- $jump = &'NameSubExt($jump, "doc");
+ $jump = &::NameSubExt($jump, "doc");
# If the name looks like a URL, assume it exists.
# Otherwise, we assume it a filename and only return an icon
@@ -238,7 +238,7 @@ sub references_Pages_Value {
# Get the filename and check it exists
$jump = &Value("references", $name, "Jump", $view);
- $jump = &'NameSubExt($jump, "ps");
+ $jump = &::NameSubExt($jump, "ps");
return '' unless -f $jump;
# build the result
diff --git a/t/macro/inherit.sdf b/t/macro/inherit.sdf
index 7663b35..f5e7f34 100644
--- a/t/macro/inherit.sdf
+++ b/t/macro/inherit.sdf
@@ -6,7 +6,7 @@
sub dump_path_Macro {
local($sdfhome, $igc);
- $sdfhome = $'app_lib_dir;
+ $sdfhome = $::app_lib_dir;
print "SDF include path is now:\n";
for $igc (@include_path) {
$igc =~ s/$sdfhome/\$SDFHOME/;