texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Patrice Dumas
Date: Tue, 1 Oct 2024 17:24:29 -0400 (EDT)

branch: master
commit 2a7a4d0a07020a9c2de1c9d259e60002040c99f8
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Jul 29 12:22:25 2024 +0200

    * tp/maintain/generate_convert_data_perl_code.pl: process special
    units before directions.  Change in spacing.
    
    * tp/Texinfo/Data/default_direction_strings.csv: change order to match
    better order in C enum.
    
    * tp/Texinfo/XS/main/utils.c: change in spacing.
---
 ChangeLog                                      |  10 +
 tp/Texinfo/Data.pm                             | 242 ++++++++++++-------------
 tp/Texinfo/Data/default_direction_strings.csv  |  22 +--
 tp/Texinfo/XS/main/utils.c                     |  14 +-
 tp/maintain/generate_convert_data_perl_code.pl | 222 +++++++++++------------
 5 files changed, 260 insertions(+), 250 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d2fd8a8eed..69ea6b9e9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-07-29  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/maintain/generate_convert_data_perl_code.pl: process special
+       units before directions.  Change in spacing.
+
+       * tp/Texinfo/Data/default_direction_strings.csv: change order to match
+       better order in C enum.
+
+       * tp/Texinfo/XS/main/utils.c: change in spacing.
+
 2024-07-29  Patrice Dumas  <pertusus@free.fr>
 
        * tp/texi2any.pl: get file handle from XS for - too.
diff --git a/tp/Texinfo/Data.pm b/tp/Texinfo/Data.pm
index d02095a530..d8e45d4ba1 100644
--- a/tp/Texinfo/Data.pm
+++ b/tp/Texinfo/Data.pm
@@ -71,84 +71,140 @@ sub get_base_default_css_info() {
   return \%base_default_css_element_class_styles;
 }
 
+my %default_special_unit_info = (
+
+  'class' => {
+    'contents' => 'contents',
+    'shortcontents' => 'shortcontents',
+    'footnotes' => 'footnotes',
+    'about' => 'about',
+  },
+
+  'direction' => {
+    'contents' => 'Contents',
+    'shortcontents' => 'Overview',
+    'footnotes' => 'Footnotes',
+    'about' => 'About',
+  },
+
+  'order' => {
+    'contents' => '30',
+    'shortcontents' => '20',
+    'footnotes' => '10',
+    'about' => '40',
+  },
+
+  'file_string' => {
+    'contents' => '_toc',
+    'shortcontents' => '_ovr',
+    'footnotes' => '_fot',
+    'about' => '_abt',
+  },
+
+  'target' => {
+    'contents' => 'SEC_Contents',
+    'shortcontents' => 'SEC_Shortcontents',
+    'footnotes' => 'SEC_Footnotes',
+    'about' => 'SEC_About',
+  },
+);
+
+sub get_default_special_unit_info() {
+  return \%default_special_unit_info;
+}
+
+my %default_translated_special_unit_info = (
+
+  'heading' => {
+    'contents' => Texinfo::Common::pgdt('contents section heading', 'Table of 
Contents'),
+    'shortcontents' => Texinfo::Common::pgdt('shortcontents section heading', 
'Short Table of Contents'),
+    'footnotes' => Texinfo::Common::pgdt('footnotes section heading', 
'Footnotes'),
+    'about' => Texinfo::Common::pgdt('about section heading', 'About This 
Document'),
+  },
+);
+
+sub get_default_translated_special_unit_info() {
+  return \%default_translated_special_unit_info;
+}
+
 my %default_converted_directions_strings = (
 
   'rel' => {
-    ' ' => '',
+    'First' => '',
     'Top' => 'start',
-    'Contents' => 'contents',
-    'Overview' => '',
     'Index' => 'index',
+    'Last' => '',
+    ' ' => '',
     'This' => '',
+    'Forward' => 'next',
     'Back' => 'prev',
+    'FastForward' => '',
     'FastBack' => '',
+    'Next' => 'next',
     'Prev' => 'prev',
     'Up' => 'up',
-    'Next' => 'next',
-    'NodeUp' => 'up',
     'NodeNext' => 'next',
+    'NodeUp' => 'up',
     'NodePrev' => 'prev',
     'NodeForward' => '',
     'NodeBack' => '',
-    'Forward' => 'next',
-    'FastForward' => '',
-    'About' => 'help',
-    'First' => '',
-    'Last' => '',
-    'NextFile' => 'next',
     'PrevFile' => 'prev',
+    'NextFile' => 'next',
+    'Contents' => 'contents',
+    'Overview' => '',
+    'About' => 'help',
   },
 
   'accesskey' => {
-    ' ' => '',
+    'First' => '',
     'Top' => '',
-    'Contents' => '',
-    'Overview' => '',
     'Index' => '',
+    'Last' => '',
+    ' ' => '',
     'This' => '',
+    'Forward' => 'n',
     'Back' => 'p',
+    'FastForward' => '',
     'FastBack' => '',
+    'Next' => 'n',
     'Prev' => 'p',
     'Up' => 'u',
-    'Next' => 'n',
-    'NodeUp' => 'u',
     'NodeNext' => 'n',
+    'NodeUp' => 'u',
     'NodePrev' => 'p',
     'NodeForward' => '',
     'NodeBack' => '',
-    'Forward' => 'n',
-    'FastForward' => '',
-    'About' => '',
-    'First' => '',
-    'Last' => '',
-    'NextFile' => '',
     'PrevFile' => '',
+    'NextFile' => '',
+    'Contents' => '',
+    'Overview' => '',
+    'About' => '',
   },
 
   'example' => {
-    ' ' => '',
+    'First' => '1.',
     'Top' => ' &nbsp; ',
-    'Contents' => ' &nbsp; ',
-    'Overview' => ' &nbsp; ',
     'Index' => ' &nbsp; ',
+    'Last' => '1.2.4',
+    ' ' => '',
     'This' => '1.2.3',
+    'Forward' => '1.2.4',
     'Back' => '1.2.2',
+    'FastForward' => '2',
     'FastBack' => '1',
+    'Next' => '1.2.4',
     'Prev' => '1.2.2',
     'Up' => '1.2',
-    'Next' => '1.2.4',
-    'NodeUp' => '1.2',
     'NodeNext' => '1.2.4',
+    'NodeUp' => '1.2',
     'NodePrev' => '1.2.2',
     'NodeForward' => '1.2.4',
     'NodeBack' => '1.2.2',
-    'Forward' => '1.2.4',
-    'FastForward' => '2',
-    'About' => ' &nbsp; ',
-    'First' => '1.',
-    'Last' => '1.2.4',
-    'NextFile' => ' &nbsp; ',
     'PrevFile' => ' &nbsp; ',
+    'NextFile' => ' &nbsp; ',
+    'Contents' => ' &nbsp; ',
+    'Overview' => ' &nbsp; ',
+    'About' => ' &nbsp; ',
   },
 );
 
@@ -159,80 +215,80 @@ sub get_default_converted_directions_strings() {
 my %default_translated_directions_strings = (
 
   'text' => {
-    ' ' => {'converted' => ' &nbsp; '},
+    'First' => {'converted' => ' |&lt; '},
     'Top' => {'to_convert' => Texinfo::Common::pgdt('Top direction string', 
'Top')},
-    'Contents' => {'to_convert' => Texinfo::Common::pgdt('Contents direction 
string', 'Contents')},
-    'Overview' => {'to_convert' => Texinfo::Common::pgdt('Overview direction 
string', 'Overview')},
     'Index' => {'to_convert' => Texinfo::Common::pgdt('Index direction 
string', 'Index')},
+    'Last' => {'converted' => ' &gt;| '},
+    ' ' => {'converted' => ' &nbsp; '},
     'This' => {'to_convert' => Texinfo::Common::pgdt('This (current section) 
direction string', 'current')},
+    'Forward' => {'converted' => ' &gt; '},
     'Back' => {'converted' => ' &lt; '},
+    'FastForward' => {'converted' => ' &gt;&gt; '},
     'FastBack' => {'converted' => ' &lt;&lt; '},
+    'Next' => {'to_convert' => Texinfo::Common::pgdt('Next direction string', 
'Next')},
     'Prev' => {'to_convert' => Texinfo::Common::pgdt('Prev direction string', 
'Prev')},
     'Up' => {'to_convert' => Texinfo::Common::pgdt('Up direction string', ' Up 
')},
-    'Next' => {'to_convert' => Texinfo::Common::pgdt('Next direction string', 
'Next')},
-    'NodeUp' => {'to_convert' => Texinfo::Common::pgdt('NodeUp direction 
string', 'Up')},
     'NodeNext' => {'to_convert' => Texinfo::Common::pgdt('NodeNext direction 
string', 'Next')},
+    'NodeUp' => {'to_convert' => Texinfo::Common::pgdt('NodeUp direction 
string', 'Up')},
     'NodePrev' => {'to_convert' => Texinfo::Common::pgdt('NodePrev direction 
string', 'Previous')},
     'NodeForward' => {'to_convert' => Texinfo::Common::pgdt('NodeForward 
direction string', 'Forward node')},
     'NodeBack' => {'to_convert' => Texinfo::Common::pgdt('NodeBack direction 
string', 'Back node')},
-    'Forward' => {'converted' => ' &gt; '},
-    'FastForward' => {'converted' => ' &gt;&gt; '},
-    'About' => {'converted' => ' ? '},
-    'First' => {'converted' => ' |&lt; '},
-    'Last' => {'converted' => ' &gt;| '},
-    'NextFile' => {'to_convert' => Texinfo::Common::pgdt('NextFile direction 
string', 'Next file')},
     'PrevFile' => {'to_convert' => Texinfo::Common::pgdt('PrevFile direction 
string', 'Previous file')},
+    'NextFile' => {'to_convert' => Texinfo::Common::pgdt('NextFile direction 
string', 'Next file')},
+    'Contents' => {'to_convert' => Texinfo::Common::pgdt('Contents direction 
string', 'Contents')},
+    'Overview' => {'to_convert' => Texinfo::Common::pgdt('Overview direction 
string', 'Overview')},
+    'About' => {'converted' => ' ? '},
   },
 
   'description' => {
+    'First' => {'to_convert' => Texinfo::Common::pgdt('First direction 
description', 'First section in reading order')},
     'Top' => {'to_convert' => Texinfo::Common::pgdt('Top direction 
description', 'Cover (top) of document')},
-    'Contents' => {'to_convert' => Texinfo::Common::pgdt('Contents direction 
description', 'Table of contents')},
-    'Overview' => {'to_convert' => Texinfo::Common::pgdt('Overview direction 
description', 'Short table of contents')},
     'Index' => {'to_convert' => Texinfo::Common::pgdt('Index direction 
description', 'Index')},
+    'Last' => {'to_convert' => Texinfo::Common::pgdt('Last direction 
description', 'Last section in reading order')},
     'This' => {'to_convert' => Texinfo::Common::pgdt('This (current section) 
direction description', 'Current section')},
+    'Forward' => {'to_convert' => Texinfo::Common::pgdt('Forward direction 
description', 'Next section in reading order')},
     'Back' => {'to_convert' => Texinfo::Common::pgdt('Back direction 
description', 'Previous section in reading order')},
+    'FastForward' => {'to_convert' => Texinfo::Common::pgdt('FastForward 
direction description', 'Next chapter')},
     'FastBack' => {'to_convert' => Texinfo::Common::pgdt('FastBack direction 
description', 'Beginning of this chapter or previous chapter')},
+    'Next' => {'to_convert' => Texinfo::Common::pgdt('Next direction 
description', 'Next section on same level')},
     'Prev' => {'to_convert' => Texinfo::Common::pgdt('Prev direction 
description', 'Previous section on same level')},
     'Up' => {'to_convert' => Texinfo::Common::pgdt('Up direction description', 
'Up section')},
-    'Next' => {'to_convert' => Texinfo::Common::pgdt('Next direction 
description', 'Next section on same level')},
-    'NodeUp' => {'to_convert' => Texinfo::Common::pgdt('NodeUp direction 
description', 'Up node')},
     'NodeNext' => {'to_convert' => Texinfo::Common::pgdt('NodeNext direction 
description', 'Next node')},
+    'NodeUp' => {'to_convert' => Texinfo::Common::pgdt('NodeUp direction 
description', 'Up node')},
     'NodePrev' => {'to_convert' => Texinfo::Common::pgdt('NodePrev direction 
description', 'Previous node')},
     'NodeForward' => {'to_convert' => Texinfo::Common::pgdt('NodeForward 
direction description', 'Next node in node reading order')},
     'NodeBack' => {'to_convert' => Texinfo::Common::pgdt('NodeBack direction 
description', 'Previous node in node reading order')},
-    'Forward' => {'to_convert' => Texinfo::Common::pgdt('Forward direction 
description', 'Next section in reading order')},
-    'FastForward' => {'to_convert' => Texinfo::Common::pgdt('FastForward 
direction description', 'Next chapter')},
-    'About' => {'to_convert' => Texinfo::Common::pgdt('About direction 
description', 'About (help)')},
-    'First' => {'to_convert' => Texinfo::Common::pgdt('First direction 
description', 'First section in reading order')},
-    'Last' => {'to_convert' => Texinfo::Common::pgdt('Last direction 
description', 'Last section in reading order')},
-    'NextFile' => {'to_convert' => Texinfo::Common::pgdt('NextFile direction 
description', 'Forward section in next file')},
     'PrevFile' => {'to_convert' => Texinfo::Common::pgdt('PrevFile direction 
description', 'Back section in previous file')},
+    'NextFile' => {'to_convert' => Texinfo::Common::pgdt('NextFile direction 
description', 'Forward section in next file')},
+    'Contents' => {'to_convert' => Texinfo::Common::pgdt('Contents direction 
description', 'Table of contents')},
+    'Overview' => {'to_convert' => Texinfo::Common::pgdt('Overview direction 
description', 'Short table of contents')},
+    'About' => {'to_convert' => Texinfo::Common::pgdt('About direction 
description', 'About (help)')},
   },
 
   'button' => {
-    ' ' => {'converted' => ' '},
+    'First' => {'to_convert' => Texinfo::Common::pgdt('First direction button 
label', 'First')},
     'Top' => {'to_convert' => Texinfo::Common::pgdt('Top direction button 
label', 'Top')},
-    'Contents' => {'to_convert' => Texinfo::Common::pgdt('Contents direction 
button label', 'Contents')},
-    'Overview' => {'to_convert' => Texinfo::Common::pgdt('Overview direction 
button label', 'Overview')},
     'Index' => {'to_convert' => Texinfo::Common::pgdt('Index direction button 
label', 'Index')},
+    'Last' => {'to_convert' => Texinfo::Common::pgdt('Last direction button 
label', 'Last')},
+    ' ' => {'converted' => ' '},
     'This' => {'to_convert' => Texinfo::Common::pgdt('This direction button 
label', 'This')},
+    'Forward' => {'to_convert' => Texinfo::Common::pgdt('Forward direction 
button label', 'Forward')},
     'Back' => {'to_convert' => Texinfo::Common::pgdt('Back direction button 
label', 'Back')},
+    'FastForward' => {'to_convert' => Texinfo::Common::pgdt('FastForward 
direction button label', 'FastForward')},
     'FastBack' => {'to_convert' => Texinfo::Common::pgdt('FastBack direction 
button label', 'FastBack')},
+    'Next' => {'to_convert' => Texinfo::Common::pgdt('Next direction button 
label', 'Next')},
     'Prev' => {'to_convert' => Texinfo::Common::pgdt('Prev direction button 
label', 'Prev')},
     'Up' => {'to_convert' => Texinfo::Common::pgdt('Up direction button 
label', 'Up')},
-    'Next' => {'to_convert' => Texinfo::Common::pgdt('Next direction button 
label', 'Next')},
-    'NodeUp' => {'to_convert' => Texinfo::Common::pgdt('NodeUp direction 
button label', 'NodeUp')},
     'NodeNext' => {'to_convert' => Texinfo::Common::pgdt('NodeNext direction 
button label', 'NodeNext')},
+    'NodeUp' => {'to_convert' => Texinfo::Common::pgdt('NodeUp direction 
button label', 'NodeUp')},
     'NodePrev' => {'to_convert' => Texinfo::Common::pgdt('NodePrev direction 
button label', 'NodePrev')},
     'NodeForward' => {'to_convert' => Texinfo::Common::pgdt('NodeForward 
direction button label', 'NodeForward')},
     'NodeBack' => {'to_convert' => Texinfo::Common::pgdt('NodeBack direction 
button label', 'NodeBack')},
-    'Forward' => {'to_convert' => Texinfo::Common::pgdt('Forward direction 
button label', 'Forward')},
-    'FastForward' => {'to_convert' => Texinfo::Common::pgdt('FastForward 
direction button label', 'FastForward')},
-    'About' => {'to_convert' => Texinfo::Common::pgdt('About direction button 
label', 'About')},
-    'First' => {'to_convert' => Texinfo::Common::pgdt('First direction button 
label', 'First')},
-    'Last' => {'to_convert' => Texinfo::Common::pgdt('Last direction button 
label', 'Last')},
-    'NextFile' => {'to_convert' => Texinfo::Common::pgdt('NextFile direction 
button label', 'NextFile')},
     'PrevFile' => {'to_convert' => Texinfo::Common::pgdt('PrevFile direction 
button label', 'PrevFile')},
+    'NextFile' => {'to_convert' => Texinfo::Common::pgdt('NextFile direction 
button label', 'NextFile')},
+    'Contents' => {'to_convert' => Texinfo::Common::pgdt('Contents direction 
button label', 'Contents')},
+    'Overview' => {'to_convert' => Texinfo::Common::pgdt('Overview direction 
button label', 'Overview')},
+    'About' => {'to_convert' => Texinfo::Common::pgdt('About direction button 
label', 'About')},
   },
 );
 
@@ -240,62 +296,6 @@ sub get_default_translated_directions_strings() {
   return \%default_translated_directions_strings;
 }
 
-my %default_special_unit_info = (
-
-  'class' => {
-    'contents' => 'contents',
-    'shortcontents' => 'shortcontents',
-    'footnotes' => 'footnotes',
-    'about' => 'about',
-  },
-
-  'direction' => {
-    'contents' => 'Contents',
-    'shortcontents' => 'Overview',
-    'footnotes' => 'Footnotes',
-    'about' => 'About',
-  },
-
-  'order' => {
-    'contents' => '30',
-    'shortcontents' => '20',
-    'footnotes' => '10',
-    'about' => '40',
-  },
-
-  'file_string' => {
-    'contents' => '_toc',
-    'shortcontents' => '_ovr',
-    'footnotes' => '_fot',
-    'about' => '_abt',
-  },
-
-  'target' => {
-    'contents' => 'SEC_Contents',
-    'shortcontents' => 'SEC_Shortcontents',
-    'footnotes' => 'SEC_Footnotes',
-    'about' => 'SEC_About',
-  },
-);
-
-sub get_default_special_unit_info() {
-  return \%default_special_unit_info;
-}
-
-my %default_translated_special_unit_info = (
-
-  'heading' => {
-    'contents' => Texinfo::Common::pgdt('contents section heading', 'Table of 
Contents'),
-    'shortcontents' => Texinfo::Common::pgdt('shortcontents section heading', 
'Short Table of Contents'),
-    'footnotes' => Texinfo::Common::pgdt('footnotes section heading', 
'Footnotes'),
-    'about' => Texinfo::Common::pgdt('about section heading', 'About This 
Document'),
-  },
-);
-
-sub get_default_translated_special_unit_info() {
-  return \%default_translated_special_unit_info;
-}
-
 my %html_style_commands_element = (
     'b'    => 'b',
     'cite'    => 'cite',
diff --git a/tp/Texinfo/Data/default_direction_strings.csv 
b/tp/Texinfo/Data/default_direction_strings.csv
index 1ab9e11851..96eb305cf8 100644
--- a/tp/Texinfo/Data/default_direction_strings.csv
+++ b/tp/Texinfo/Data/default_direction_strings.csv
@@ -1,24 +1,24 @@
 direction|rel|accesskey|example|text converted|text to_convert context|text 
to_convert string|description converted|description to_convert 
context|description to_convert string|button converted|button to_convert 
context|button to_convert string|
- |||| $html_default_entity_nbsp |||||| |||
+First|||1.| ${bar}&lt; ||||First direction description|First section in 
reading order||First direction button label|First|
 Top|start|| $html_default_entity_nbsp ||Top direction string|Top||Top 
direction description|Cover (top) of document||Top direction button label|Top|
-Contents|contents|| $html_default_entity_nbsp ||Contents direction 
string|Contents||Contents direction description|Table of contents||Contents 
direction button label|Contents|
-Overview||| $html_default_entity_nbsp ||Overview direction 
string|Overview||Overview direction description|Short table of 
contents||Overview direction button label|Overview|
 Index|index|| $html_default_entity_nbsp ||Index direction string|Index||Index 
direction description|Index||Index direction button label|Index|
+Last|||1.2.4| &gt;${bar} ||||Last direction description|Last section in 
reading order||Last direction button label|Last|
+ |||| $html_default_entity_nbsp |||||| |||
 This|||1.2.3||This (current section) direction string|current||This (current 
section) direction description|Current section||This direction button 
label|This|
+Forward|next|n|1.2.4| &gt; ||||Forward direction description|Next section in 
reading order||Forward direction button label|Forward|
 Back|prev|p|1.2.2| &lt; ||||Back direction description|Previous section in 
reading order||Back direction button label|Back|
+FastForward|||2| &gt;&gt; ||||FastForward direction description|Next 
chapter||FastForward direction button label|FastForward|
 FastBack|||1| &lt;&lt; ||||FastBack direction description|Beginning of this 
chapter or previous chapter||FastBack direction button label|FastBack|
+Next|next|n|1.2.4||Next direction string|Next||Next direction description|Next 
section on same level||Next direction button label|Next|
 Prev|prev|p|1.2.2||Prev direction string|Prev||Prev direction 
description|Previous section on same level||Prev direction button label|Prev|
 Up|up|u|1.2||Up direction string| Up ||Up direction description|Up section||Up 
direction button label|Up|
-Next|next|n|1.2.4||Next direction string|Next||Next direction description|Next 
section on same level||Next direction button label|Next|
-NodeUp|up|u|1.2||NodeUp direction string|Up||NodeUp direction description|Up 
node||NodeUp direction button label|NodeUp|
 NodeNext|next|n|1.2.4||NodeNext direction string|Next||NodeNext direction 
description|Next node||NodeNext direction button label|NodeNext|
+NodeUp|up|u|1.2||NodeUp direction string|Up||NodeUp direction description|Up 
node||NodeUp direction button label|NodeUp|
 NodePrev|prev|p|1.2.2||NodePrev direction string|Previous||NodePrev direction 
description|Previous node||NodePrev direction button label|NodePrev|
 NodeForward|||1.2.4||NodeForward direction string|Forward node||NodeForward 
direction description|Next node in node reading order||NodeForward direction 
button label|NodeForward|
 NodeBack|||1.2.2||NodeBack direction string|Back node||NodeBack direction 
description|Previous node in node reading order||NodeBack direction button 
label|NodeBack|
-Forward|next|n|1.2.4| &gt; ||||Forward direction description|Next section in 
reading order||Forward direction button label|Forward|
-FastForward|||2| &gt;&gt; ||||FastForward direction description|Next 
chapter||FastForward direction button label|FastForward|
-About|help|| $html_default_entity_nbsp | ? ||||About direction 
description|About (help)||About direction button label|About|
-First|||1.| ${bar}&lt; ||||First direction description|First section in 
reading order||First direction button label|First|
-Last|||1.2.4| &gt;${bar} ||||Last direction description|Last section in 
reading order||Last direction button label|Last|
-NextFile|next|| $html_default_entity_nbsp ||NextFile direction string|Next 
file||NextFile direction description|Forward section in next file||NextFile 
direction button label|NextFile|
 PrevFile|prev|| $html_default_entity_nbsp ||PrevFile direction string|Previous 
file||PrevFile direction description|Back section in previous file||PrevFile 
direction button label|PrevFile|
+NextFile|next|| $html_default_entity_nbsp ||NextFile direction string|Next 
file||NextFile direction description|Forward section in next file||NextFile 
direction button label|NextFile|
+Contents|contents|| $html_default_entity_nbsp ||Contents direction 
string|Contents||Contents direction description|Table of contents||Contents 
direction button label|Contents|
+Overview||| $html_default_entity_nbsp ||Overview direction 
string|Overview||Overview direction description|Short table of 
contents||Overview direction button label|Overview|
+About|help|| $html_default_entity_nbsp | ? ||||About direction 
description|About (help)||About direction button label|About|
diff --git a/tp/Texinfo/XS/main/utils.c b/tp/Texinfo/XS/main/utils.c
index f0b9ba247f..b5b84942e7 100644
--- a/tp/Texinfo/XS/main/utils.c
+++ b/tp/Texinfo/XS/main/utils.c
@@ -80,22 +80,22 @@ DEF_ALIAS def_aliases[] = {
   /* TRANSLATORS: category of user-modifiable options for @defopt */
   CM_defopt, CM_defvr, gdt_noop("User Option"), 0,
   CM_deftypefun, CM_deftypefn,
-       pgdt_context_noop("category of functions for @deftypefun", "Function"), 
+       pgdt_context_noop("category of functions for @deftypefun", "Function"),
   CM_deftypevar, CM_deftypevr,
    pgdt_context_noop("category of variables in typed languages for 
@deftypevar",
-                     "Variable"), 
-  CM_defivar, CM_defcv, 
+                     "Variable"),
+  CM_defivar, CM_defcv,
    pgdt_context_noop("category of instance variables in object-oriented 
programming for @defivar",
-                     "Instance Variable"), 
+                     "Instance Variable"),
   CM_deftypeivar, CM_deftypecv,
    pgdt_context_noop("category of instance variables with data type in 
object-oriented programming for @deftypeivar",
-                     "Instance Variable"), 
+                     "Instance Variable"),
   CM_defmethod, CM_defop,
    pgdt_context_noop("category of methods in object-oriented programming for 
@defmethod",
-                     "Method"), 
+                     "Method"),
   CM_deftypemethod, CM_deftypeop,
    pgdt_context_noop("category of methods with data type in object-oriented 
programming for @deftypemethod",
-                     "Method"), 
+                     "Method"),
 
   /* the following aliases are not used in the XS parser */
   CM_defunx, CM_deffnx, "Function", "category of functions for @defun",
diff --git a/tp/maintain/generate_convert_data_perl_code.pl 
b/tp/maintain/generate_convert_data_perl_code.pl
index 58920cbe34..386b5f54f1 100755
--- a/tp/maintain/generate_convert_data_perl_code.pl
+++ b/tp/maintain/generate_convert_data_perl_code.pl
@@ -18,7 +18,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# ./maintain/generate_convert_html_perl_code.pl 
Texinfo/Data/default_css_element_class_styles.csv 
Texinfo/Data/default_direction_strings.csv 
Texinfo/Data/default_special_unit_info.csv 
Texinfo/Data/html_style_commands_element.csv Texinfo/Data.pm
+# ./maintain/generate_convert_data_perl_code.pl 
Texinfo/Data/default_css_element_class_styles.csv 
Texinfo/Data/default_direction_strings.csv 
Texinfo/Data/default_special_unit_info.csv 
Texinfo/Data/html_style_commands_element.csv Texinfo/Data.pm
 
 use strict;
 
@@ -31,11 +31,11 @@ my $program_name = basename($0);
 
 my $base_default_css_element_class_styles_file = $ARGV[0];
 
-open (BDCSS, "<$base_default_css_element_class_styles_file") 
+open (BDCSS, "<$base_default_css_element_class_styles_file")
   or die "open $base_default_css_element_class_styles_file failed: $!";
 
 my $default_direction_strings_file = $ARGV[1];
-open (DDS, "<$default_direction_strings_file") 
+open (DDS, "<$default_direction_strings_file")
   or die "open $default_direction_strings_file failed: $!";
 
 my $default_special_unit_info_file = $ARGV[2];
@@ -110,6 +110,103 @@ print OUT 'sub get_base_default_css_info() {
 }'."\n\n";
 
 
+my @su_ordered_untranslated_hashes;
+my @su_ordered_translated_hashes;
+
+my $su_header_line = <DSUI>;
+chomp($su_header_line);
+#print STDERR "$su_header_line\n";
+my @su_header = split(/\|/, $su_header_line);
+my $special_unit_header = shift @su_header;
+
+my $su_header_index = 1;
+my $su_type;
+my %su_header_indices;
+foreach my $header (@su_header) {
+  if ($header =~ /^([^ ]+) ([^ ]+)$/) {
+    my $spec = $2;
+    if ($spec ne 'context' and $spec ne 'string') {
+      die "Unknown special unit column spec $spec\n";
+    }
+    if ($spec eq 'context') {
+      $su_type = $1;
+      push @su_ordered_translated_hashes, $su_type;
+      $su_header_indices{$su_type} = {};
+    } elsif ($1 ne $su_type) {
+      die "Non matching type $1 ne $su_type\n";
+    }
+    $su_header_indices{$su_type}->{$spec} = $su_header_index;
+  } elsif ($header eq '') {
+    continue;
+  } else {
+    push @su_ordered_untranslated_hashes, $header;
+    $su_type = undef;
+    $su_header_indices{$header} = $su_header_index;
+  }
+  $su_header_index++;
+}
+
+my %su_hash_lines;
+foreach my $type (@su_ordered_untranslated_hashes, 
@su_ordered_translated_hashes) {
+  $su_hash_lines{$type} = '';
+}
+my @su_ordered;
+while (<DSUI>) {
+  chomp;
+  my @data = split (/\|/);
+  my $special_unit = $data[0];
+  push @su_ordered, $special_unit;
+  foreach my $untranslated_type (@su_ordered_untranslated_hashes) {
+    my $index = $su_header_indices{$untranslated_type};
+    my $value = '';
+    if (defined($data[$index])) {
+      $value = $data[$index];
+    }
+    $su_hash_lines{$untranslated_type} .= "    '$special_unit' => '$value',\n";
+  }
+  foreach my $translated_type (@su_ordered_translated_hashes) {
+    my $context = $data[$su_header_indices{$translated_type}->{'context'}];
+    my $string = $data[$su_header_indices{$translated_type}->{'string'}];
+    if (defined($string) and $string ne '') {
+      if (!defined($context) or $context eq '') {
+        print STDERR "ERROR: '$special_unit': '$string' but no context\n";
+      } else {
+        $su_hash_lines{$translated_type}
+         .= "    '$special_unit' => Texinfo::Common::pgdt('$context', 
'$string'),\n";
+      }
+    } else {
+      print STDERR "REMARK: '$special_unit': no $translated_type\n";
+    }
+  }
+}
+
+print OUT "my %default_special_unit_info = (\n";
+
+foreach my $type (@su_ordered_untranslated_hashes) {
+  print OUT "\n  '$type' => {\n";
+  print OUT $su_hash_lines{$type};
+  print OUT "  },\n";
+}
+
+print OUT ");\n\n";
+
+print OUT 'sub get_default_special_unit_info() {
+  return \%default_special_unit_info;
+}'."\n\n";
+
+print OUT "my %default_translated_special_unit_info = (\n";
+foreach my $type (@su_ordered_translated_hashes) {
+  print OUT "\n  '$type' => {\n";
+  print OUT $su_hash_lines{$type};
+  print OUT "  },\n";
+}
+print OUT ");\n\n";
+
+print OUT 'sub get_default_translated_special_unit_info() {
+  return \%default_translated_special_unit_info;
+}'."\n\n";
+
+
 my @d_ordered_untranslated_hashes;
 my @d_ordered_translated_hashes;
 
@@ -178,7 +275,7 @@ while (<DDS>) {
   foreach my $translated_type (@d_ordered_translated_hashes) {
     my $converted_value = 
$data[$d_header_indices{$translated_type}->{'converted'}];
     if (defined($converted_value) and $converted_value ne '') {
-      $hash_lines{$translated_type} 
+      $hash_lines{$translated_type}
         .= "    '$direction' => {'converted' => '"
                    .substitute_direction_value($converted_value)."'},\n";
     } else {
@@ -226,119 +323,22 @@ print OUT 'sub 
get_default_translated_directions_strings() {
 }'."\n\n";
 
 
-my @su_ordered_untranslated_hashes;
-my @su_ordered_translated_hashes;
-
-my $su_header_line = <DSUI>;
-chomp($su_header_line);
-#print STDERR "$su_header_line\n";
-my @su_header = split(/\|/, $su_header_line);
-my $special_unit_header = shift @su_header;
-
-my $su_header_index = 1;
-my $su_type;
-my %su_header_indices;
-foreach my $header (@su_header) {
-  if ($header =~ /^([^ ]+) ([^ ]+)$/) {
-    my $spec = $2;
-    if ($spec ne 'context' and $spec ne 'string') {
-      die "Unknown special unit column spec $spec\n";
-    }
-    if ($spec eq 'context') {
-      $su_type = $1;
-      push @su_ordered_translated_hashes, $su_type;
-      $su_header_indices{$su_type} = {}; 
-    } elsif ($1 ne $su_type) {
-      die "Non matching type $1 ne $su_type\n";
-    }
-    $su_header_indices{$su_type}->{$spec} = $su_header_index;
-  } elsif ($header eq '') {
-    continue;
-  } else {
-    push @su_ordered_untranslated_hashes, $header;
-    $su_type = undef;
-    $su_header_indices{$header} = $su_header_index;
-  }
-  $su_header_index++;
-}
-
-my %su_hash_lines;
-foreach my $type (@su_ordered_untranslated_hashes, 
@su_ordered_translated_hashes) {
-  $su_hash_lines{$type} = '';
-}
-my @su_ordered;
-while (<DSUI>) {
-  chomp;
-  my @data = split (/\|/);
-  my $special_unit = $data[0];
-  push @su_ordered, $special_unit;
-  foreach my $untranslated_type (@su_ordered_untranslated_hashes) {
-    my $index = $su_header_indices{$untranslated_type};
-    my $value = '';
-    if (defined($data[$index])) {
-      $value = $data[$index];
-    }
-    $su_hash_lines{$untranslated_type} .= "    '$special_unit' => '$value',\n";
-  }
-  foreach my $translated_type (@su_ordered_translated_hashes) {
-    my $context = $data[$su_header_indices{$translated_type}->{'context'}];
-    my $string = $data[$su_header_indices{$translated_type}->{'string'}];
-    if (defined($string) and $string ne '') {
-      if (!defined($context) or $context eq '') {
-        print STDERR "ERROR: '$special_unit': '$string' but no context\n";
-      } else {
-        $su_hash_lines{$translated_type}
-         .= "    '$special_unit' => Texinfo::Common::pgdt('$context', 
'$string'),\n";
-      }
-    } else {
-      print STDERR "REMARK: '$special_unit': no $translated_type\n";
-    }
-  }
-}
-
-print OUT "my %default_special_unit_info = (\n";
-
-foreach my $type (@su_ordered_untranslated_hashes) {
-  print OUT "\n  '$type' => {\n";
-  print OUT $su_hash_lines{$type};
-  print OUT "  },\n";
-}
-
-print OUT ");\n\n";
-
-print OUT 'sub get_default_special_unit_info() {
-  return \%default_special_unit_info;
-}'."\n\n";
-
-print OUT "my %default_translated_special_unit_info = (\n";
-foreach my $type (@su_ordered_translated_hashes) {
-  print OUT "\n  '$type' => {\n";
-  print OUT $su_hash_lines{$type};
-  print OUT "  },\n";
-}
-print OUT ");\n\n";
-
-print OUT 'sub get_default_translated_special_unit_info() {
-  return \%default_translated_special_unit_info;
-}'."\n\n";
-
-
 my $sce_header_line = <SCE>;
 chomp($sce_header_line);
 #print STDERR "$sce_header_line\n";
 my @sce_header = split(/\|/, $sce_header_line);
 my ($sce_command_index, $sce_html_element_index, $sce_notes_index);
-my $sce_header_index = 0; 
+my $sce_header_index = 0;
 foreach my $header (@sce_header) {
   if ($header eq 'command') {
     $sce_command_index = $sce_header_index;
   } elsif ($header eq 'html_element') {
     $sce_html_element_index = $sce_header_index;
-  } elsif ($header eq 'notes') { 
+  } elsif ($header eq 'notes') {
     $sce_notes_index = $sce_header_index;
-  } 
+  }
   $sce_header_index++;
-} 
+}
 if (!defined($sce_command_index) or !defined($sce_html_element_index)
     or !defined($notes_index)) {
   die "missing header column ($sce_command_index, "
@@ -351,7 +351,7 @@ my $line_nr = 1;
 while (<SCE>) {
   $line_nr++;
   chomp;
-  my @data = split (/\|/); 
+  my @data = split (/\|/);
   my $notes = $data[$sce_notes_index];
   if (defined($notes) and $notes ne '') {
     my $lines = wrap($initial_notes_tab, $subsequent_notes_tab, ($notes));
@@ -360,16 +360,16 @@ while (<SCE>) {
   my $sce_command = $data[$sce_command_index];
   if (!defined($sce_command) or $sce_command eq '') {
     die "$style_commands_element_file: $line_nr: Bad command\n";
-  } 
+  }
   my $sce_html_element = $data[$sce_html_element_index];
   if (!defined($sce_html_element) or $sce_html_element eq '') {
     die "$style_commands_element_file: $line_nr: Bad html_element\n";
-  }   
+  }
   print OUT "    '$sce_command'    => '$sce_html_element',\n";
-}   
-    
+}
+
 print OUT ");\n\n";
-    
+
 print OUT 'sub get_html_style_commands_element() {
   return \%html_style_commands_element;
 }'."\n\n";



reply via email to

[Prev in Thread] Current Thread [Next in Thread]