makedoc: warn about some obsolete and deprecated commands

To follow up the thread starting at [1], since all uses of TRAD_SYNOPSIS
have been removed, and all uses of ANSI_SYNOPSIS have been renamed to
SYNOPSIS, we can now warn about the use of these.

[1] https://sourceware.org/ml/newlib/2017/msg01182.html

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
This commit is contained in:
Jon Turney 2017-12-05 18:40:44 +00:00
parent 06bd0ecc8d
commit 2ce4e1e5ad
2 changed files with 15 additions and 16 deletions

View File

@ -62,25 +62,12 @@
indent
catstr
"@end example\n" catstr
;
: OLDTRAD_SYNOPSIS
skip_past_newline
"@strong{Traditional Synopsis}\n" catstr
"@example\n" catstr
get_stuff_in_command
do_fancy_stuff
nokill_bogus_lines
indent
catstr
"@end example\n" catstr
"ANSI_SYNOPSIS is deprecated, use SYNOPSIS instead" warn
;
: TRAD_SYNOPSIS
skip_past_newline
"TRAD_SYNOPSIS is obsolete and ignored" warn
;
: INDEX

View File

@ -1019,6 +1019,17 @@ WORD(maybecatstr)
}
/* write tos to stderr */
WORD(warn)
{
fputs("Warning: ", stderr);
fwrite(tos->ptr, tos->write_idx, 1, stderr);
fputc('\n', stderr);
delete_string(tos);
tos--;
pc++;
}
char *
DEFUN(nextword,(string, word),
char *string AND
@ -1390,7 +1401,8 @@ char *av[])
add_intrinsic("kill_bogus_lines", kill_bogus_lines);
add_intrinsic("indent", indent);
add_intrinsic("internalmode", internalmode);
add_intrinsic("warn", warn);
/* Put a nl at the start */
catchar(&buffer,'\n');