gbranden pushed a commit to branch master
in repository groff.
commit e7a6373e6c6cf47c3477fe5eee59247048461687
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Nov 12 06:55:30 2025 -0600
src/preproc/pic/pic.ypp: Annotate null pointers.
...with `nullptr` comment to ease any future transition to C++11, which
defines it as a keyword.
---
src/preproc/pic/pic.ypp | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/preproc/pic/pic.ypp b/src/preproc/pic/pic.ypp
index 2ccc1e3aa..4bb8a6c57 100644
--- a/src/preproc/pic/pic.ypp
+++ b/src/preproc/pic/pic.ypp
@@ -79,7 +79,7 @@ implement_ptable(place)
PTABLE(place) top_table;
PTABLE(place) *current_table = &top_table;
-saved_state *current_saved_state = 0;
+saved_state *current_saved_state = 0 /* nullptr */;
object_list olist;
@@ -359,7 +359,7 @@ placeless_element:
lex_error("variable '%1' not defined", $1);
YYABORT;
}
- p->obj = 0;
+ p->obj = 0 /* nullptr */;
p->x = $4;
p->y = 0.0;
free($1);
@@ -521,7 +521,7 @@ print_arg:
{
$$.str = new char[GDIGITS + 1];
sprintf($$.str, "%g", $1);
- $$.filename = 0;
+ $$.filename = 0 /* nullptr */;
$$.lineno = 0;
}
| text
@@ -530,7 +530,7 @@ print_arg:
{
$$.str = new char[GDIGITS + 2 + GDIGITS + 1];
sprintf($$.str, "%g, %g", $1.x, $1.y);
- $$.filename = 0;
+ $$.filename = 0 /* nullptr */;
$$.lineno = 0;
}
;
@@ -613,7 +613,7 @@ element:
{
$$.obj = $1->make_object(¤t_position,
¤t_direction);
- if ($$.obj == 0)
+ if ($$.obj == 0 /* nullptr */)
YYABORT;
delete $1;
if ($$.obj)
@@ -631,7 +631,7 @@ element:
}
| LABEL ':' optional_separator position_not_place
{
- $$.obj = 0;
+ $$.obj = 0 /* nullptr */;
$$.x = $4.x;
$$.y = $4.y;
define_label($1, & $$);
@@ -661,7 +661,7 @@ element:
}
| placeless_element
{
- $$.obj = 0;
+ $$.obj = 0 /* nullptr */;
$$.x = current_position.x;
$$.y = current_position.y;
}
@@ -1816,7 +1816,7 @@ place *lookup_label(const char *label)
if (pl)
return pl;
if (!state)
- return 0;
+ return 0 /* nullptr */;
tbl = state->tbl;
state = state->prev;
}
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit