<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/groff-git.git/src/roff/troff/node.cpp, branch master</title>
<subtitle>git.savannah.gnu.org: git/groff.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/groff-git.git/'/>
<entry>
<title>[troff]: Trivially refactor ("constant_int_reg").</title>
<updated>2022-12-07T08:51:57+00:00</updated>
<author>
<name>G. Branden Robinson</name>
<email>g.branden.robinson@gmail.com</email>
</author>
<published>2022-12-05T16:57:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/groff-git.git/commit/?id=9b1201303eccf7cb8136e90a6eb64f33bafe3ccc'/>
<id>9b1201303eccf7cb8136e90a6eb64f33bafe3ccc</id>
<content type='text'>
Rename class `constant_int_reg` to `readonly_register`.  Say "readonly"
instead of "const" to try to avoid confusion with C++ constness.  Drop
"int" because integer-valued registers are the norm, not the exception.

* src/roff/troff/column.cpp (init_column_requests):
* src/roff/troff/div.cpp (init_div_requests):
* src/roff/troff/input.cpp (top level, init_input_requests):
* src/roff/troff/node.cpp (init_node_requests):
* src/roff/troff/reg.h: Do it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename class `constant_int_reg` to `readonly_register`.  Say "readonly"
instead of "const" to try to avoid confusion with C++ constness.  Drop
"int" because integer-valued registers are the norm, not the exception.

* src/roff/troff/column.cpp (init_column_requests):
* src/roff/troff/div.cpp (init_div_requests):
* src/roff/troff/input.cpp (top level, init_input_requests):
* src/roff/troff/node.cpp (init_node_requests):
* src/roff/troff/reg.h: Do it.
</pre>
</div>
</content>
</entry>
<entry>
<title>[troff]: Trivially refactor ("number_reg_dic...").</title>
<updated>2022-12-07T08:51:57+00:00</updated>
<author>
<name>G. Branden Robinson</name>
<email>g.branden.robinson@gmail.com</email>
</author>
<published>2022-12-05T15:46:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/groff-git.git/commit/?id=ab2442e6386d93e1a9a3524b29b3ebed7e476c73'/>
<id>ab2442e6386d93e1a9a3524b29b3ebed7e476c73</id>
<content type='text'>
Rename `number_reg_dictionary` to `register_dictionary`.  It's shorter
_and_ non-abbreviated _and_ matches our documentation.

* src/roff/troff/column.cpp (init_column_requests):
* src/roff/troff/div.cpp (page_number, init_div_requests):
* src/roff/troff/env.cpp (print_env, init_env_requests)
  (init_hyphen_requests):
* src/roff/troff/input.cpp (length_request, interpolate_number_format)
  (do_register, do_if_request, main, init_registers)
  (init_input_requests):
* src/roff/troff/node.cpp (get_register, init_node_requests):
* src/roff/troff/reg.cpp (top level, define_number_reg
  (inline_define_reg, alter_format, remove_reg, alias_reg, rename_reg)
  (print_number_regs):
* src/roff/troff/reg.h: Do it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename `number_reg_dictionary` to `register_dictionary`.  It's shorter
_and_ non-abbreviated _and_ matches our documentation.

* src/roff/troff/column.cpp (init_column_requests):
* src/roff/troff/div.cpp (page_number, init_div_requests):
* src/roff/troff/env.cpp (print_env, init_env_requests)
  (init_hyphen_requests):
* src/roff/troff/input.cpp (length_request, interpolate_number_format)
  (do_register, do_if_request, main, init_registers)
  (init_input_requests):
* src/roff/troff/node.cpp (get_register, init_node_requests):
* src/roff/troff/reg.cpp (top level, define_number_reg
  (inline_define_reg, alter_format, remove_reg, alias_reg, rename_reg)
  (print_number_regs):
* src/roff/troff/reg.h: Do it.
</pre>
</div>
</content>
</entry>
<entry>
<title>[troff]: Boolify `character_exists()`.</title>
<updated>2022-11-25T21:07:27+00:00</updated>
<author>
<name>G. Branden Robinson</name>
<email>g.branden.robinson@gmail.com</email>
</author>
<published>2022-11-25T21:07:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/groff-git.git/commit/?id=790e2067c4907278842a0a9dcbbb34b57b9a7495'/>
<id>790e2067c4907278842a0a9dcbbb34b57b9a7495</id>
<content type='text'>
* src/roff/troff/node.h (character_exists):
* src/roff/troff/node.cpp (character_exists): Boolify.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/roff/troff/node.h (character_exists):
* src/roff/troff/node.cpp (character_exists): Boolify.
</pre>
</div>
</content>
</entry>
<entry>
<title>src/roff/troff/node.cpp: Fix code style nit.</title>
<updated>2022-08-23T18:03:21+00:00</updated>
<author>
<name>G. Branden Robinson</name>
<email>g.branden.robinson@gmail.com</email>
</author>
<published>2022-08-23T13:22:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/groff-git.git/commit/?id=4bee153f83d2cd6c84ecce6c3f392ba7fcccce2c'/>
<id>4bee153f83d2cd6c84ecce6c3f392ba7fcccce2c</id>
<content type='text'>
* src/roff/troff/node.cpp: Fix code style nit.  Put space around binary
  arithmetic operators.  Put a space after `sizeof` because it is an
  operator, not a function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/roff/troff/node.cpp: Fix code style nit.  Put space around binary
  arithmetic operators.  Put a space after `sizeof` because it is an
  operator, not a function.
</pre>
</div>
</content>
</entry>
<entry>
<title>src/roff/troff/node.cpp: Refactor make_definite().</title>
<updated>2022-08-23T18:03:21+00:00</updated>
<author>
<name>G. Branden Robinson</name>
<email>g.branden.robinson@gmail.com</email>
</author>
<published>2022-08-23T13:20:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/groff-git.git/commit/?id=085765dca1cacc5bd643a4582a79c1fd415af469'/>
<id>085765dca1cacc5bd643a4582a79c1fd415af469</id>
<content type='text'>
* src/roff/troff/node.cpp (font_family::make_definite): Refactor.
  Rename parameter from inscrutable `i` to `mounting_position`.  Add
  `assert()` to enforce invariant: we're passed a mounting position that
  is nonnegative.  Use `pos` as short alias of parameter once we're into
  the function body.  Relocate conditional branches to front-load early
  returns as well as those requiring little code to handle.  This
  reduces the average indentation level of the function, a readability
  win.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/roff/troff/node.cpp (font_family::make_definite): Refactor.
  Rename parameter from inscrutable `i` to `mounting_position`.  Add
  `assert()` to enforce invariant: we're passed a mounting position that
  is nonnegative.  Use `pos` as short alias of parameter once we're into
  the function body.  Relocate conditional branches to front-load early
  returns as well as those requiring little code to handle.  This
  reduces the average indentation level of the function, a readability
  win.
</pre>
</div>
</content>
</entry>
<entry>
<title>[troff]: Add source file line # to grohtml-info.</title>
<updated>2022-07-14T09:24:38+00:00</updated>
<author>
<name>G. Branden Robinson</name>
<email>g.branden.robinson@gmail.com</email>
</author>
<published>2022-07-08T23:16:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/groff-git.git/commit/?id=d2da424836f1423634f3b05263010f8f12a09608'/>
<id>d2da424836f1423634f3b05263010f8f12a09608</id>
<content type='text'>
* src/roff/troff/node.cpp (suppress_node::tprint): Add source file line
  number after its name when emitting "grohtml-info", to aid debugging.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/roff/troff/node.cpp (suppress_node::tprint): Add source file line
  number after its name when emitting "grohtml-info", to aid debugging.
</pre>
</div>
</content>
</entry>
<entry>
<title>[troff]: Refactor.</title>
<updated>2022-07-14T09:24:38+00:00</updated>
<author>
<name>G. Branden Robinson</name>
<email>g.branden.robinson@gmail.com</email>
</author>
<published>2022-07-08T23:10:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/groff-git.git/commit/?id=bca4506f36eeda9640c4fcc01b66444e7291b508'/>
<id>bca4506f36eeda9640c4fcc01b66444e7291b508</id>
<content type='text'>
* src/roff/troff/node.cpp (get_register, get_string): Reorder null
  pointer inequality comparisons; they don't need to be in a funny order
  because it's pretty hard to mistype `!=` as an assignment operator.
  Annotate them as null pointers to ease any future migration to ISO
  C++11.  Use primitive type constructor instead of C-style cast
  operator; this seems more idiomatic.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/roff/troff/node.cpp (get_register, get_string): Reorder null
  pointer inequality comparisons; they don't need to be in a funny order
  because it's pretty hard to mistype `!=` as an assignment operator.
  Annotate them as null pointers to ease any future migration to ISO
  C++11.  Use primitive type constructor instead of C-style cast
  operator; this seems more idiomatic.
</pre>
</div>
</content>
</entry>
<entry>
<title>[troff]: Trivially refactor.</title>
<updated>2022-06-23T13:45:13+00:00</updated>
<author>
<name>G. Branden Robinson</name>
<email>g.branden.robinson@gmail.com</email>
</author>
<published>2022-06-22T21:45:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/groff-git.git/commit/?id=4def9fdba37a257f14a39d3aeeaa328a61f0fd5c'/>
<id>4def9fdba37a257f14a39d3aeeaa328a61f0fd5c</id>
<content type='text'>
* src/roff/troff/input.cpp (token::next): Rename statement label to use
  documentary terminology.

* src/roff/troff/node.cpp (make_composite_node, make_glyph_node): Make
  functions static since nothing outside this translation unit calls
  them.

* src/roff/troff/node.cpp (make_glyph_node): Refactor optional argument
  and its usage.  Put it down, flip it, and reverse it.  That is, demote
  its type from `int` to `bool`, invert its sense, and rename it since
  it affects warning, not error, diagnostics.

  (character_exists): Update only call site of `make_glyph_node()` that
  uses non-default argument value.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/roff/troff/input.cpp (token::next): Rename statement label to use
  documentary terminology.

* src/roff/troff/node.cpp (make_composite_node, make_glyph_node): Make
  functions static since nothing outside this translation unit calls
  them.

* src/roff/troff/node.cpp (make_glyph_node): Refactor optional argument
  and its usage.  Put it down, flip it, and reverse it.  That is, demote
  its type from `int` to `bool`, invert its sense, and rename it since
  it affects warning, not error, diagnostics.

  (character_exists): Update only call site of `make_glyph_node()` that
  uses non-default argument value.
</pre>
</div>
</content>
</entry>
<entry>
<title>[troff]: Adjust diagnostic message text.</title>
<updated>2022-06-23T13:45:13+00:00</updated>
<author>
<name>G. Branden Robinson</name>
<email>g.branden.robinson@gmail.com</email>
</author>
<published>2022-06-22T21:08:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/groff-git.git/commit/?id=64512940a2b00cc0888e0d9fa1f2720ef0417b35'/>
<id>64512940a2b00cc0888e0d9fa1f2720ef0417b35</id>
<content type='text'>
[troff]: Adjust diagnostic message text to clarify and better match
terminology used in documentation.

* src/roff/troff/input.cpp (set_escape_char, do_overstrike, do_bracket,
  do_name_test, do_width, do_special):
* src/roff/troff/node.cpp (suppress_node::tprint): Migrate from "escape"
  to "escape sequence".

* src/roff/troff/node.cpp (make_composite_node, make_glyph_node):
  Clarify what went wrong.

* src/roff/troff/input.cpp (token::get_char, check_missing_character):
  Migrate from "normal character" to "ordinary character" (see
  groff_char(7)).

Also add comment near possibly unreachable code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[troff]: Adjust diagnostic message text to clarify and better match
terminology used in documentation.

* src/roff/troff/input.cpp (set_escape_char, do_overstrike, do_bracket,
  do_name_test, do_width, do_special):
* src/roff/troff/node.cpp (suppress_node::tprint): Migrate from "escape"
  to "escape sequence".

* src/roff/troff/node.cpp (make_composite_node, make_glyph_node):
  Clarify what went wrong.

* src/roff/troff/input.cpp (token::get_char, check_missing_character):
  Migrate from "normal character" to "ordinary character" (see
  groff_char(7)).

Also add comment near possibly unreachable code.
</pre>
</div>
</content>
</entry>
<entry>
<title>src/roff/troff/node.cpp: Fix code style nit.</title>
<updated>2022-06-21T18:03:01+00:00</updated>
<author>
<name>G. Branden Robinson</name>
<email>g.branden.robinson@gmail.com</email>
</author>
<published>2022-06-20T19:01:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/groff-git.git/commit/?id=5faaa8dead225e329112e4ace7e81184b3aed237'/>
<id>5faaa8dead225e329112e4ace7e81184b3aed237</id>
<content type='text'>
* src/roff/troff/node.cpp (mount_font_no_translate): Annotate null
  pointers with `nullptr` comment to ease any future transition to
  C++11, which defines it as a keyword.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/roff/troff/node.cpp (mount_font_no_translate): Annotate null
  pointers with `nullptr` comment to ease any future transition to
  C++11, which defines it as a keyword.
</pre>
</div>
</content>
</entry>
</feed>
