public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] makedoc: warn about some obsolete and deprecated commands
Date: Fri, 08 Dec 2017 12:11:00 -0000	[thread overview]
Message-ID: <20171208121152.19047.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=2ce4e1e5ad5b694a729e5df13cccaaf514abad45

commit 2ce4e1e5ad5b694a729e5df13cccaaf514abad45
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Dec 5 18:40:44 2017 +0000

    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>

Diff:
---
 newlib/doc/doc.str   | 17 ++---------------
 newlib/doc/makedoc.c | 14 +++++++++++++-
 2 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/newlib/doc/doc.str b/newlib/doc/doc.str
index 949c6e7..b0bfc9e 100644
--- a/newlib/doc/doc.str
+++ b/newlib/doc/doc.str
@@ -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 
diff --git a/newlib/doc/makedoc.c b/newlib/doc/makedoc.c
index 45ddfb8..3f4ff4c 100644
--- a/newlib/doc/makedoc.c
+++ b/newlib/doc/makedoc.c
@@ -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');


                 reply	other threads:[~2017-12-08 12:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171208121152.19047.qmail@sourceware.org \
    --to=jturney@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).