Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/xlint/xlint add -S flag for c99 support.



details:   https://anonhg.NetBSD.org/src/rev/2e2fc0d8b91f
branches:  trunk
changeset: 538502:2e2fc0d8b91f
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Oct 21 21:16:12 2002 +0000

description:
add -S flag for c99 support.

diffstat:

 usr.bin/xlint/xlint/lint.1  |   6 ++++--
 usr.bin/xlint/xlint/xlint.c |  20 +++++++++++++-------
 2 files changed, 17 insertions(+), 9 deletions(-)

diffs (94 lines):

diff -r 79f92725d4bc -r 2e2fc0d8b91f usr.bin/xlint/xlint/lint.1
--- a/usr.bin/xlint/xlint/lint.1        Mon Oct 21 21:14:51 2002 +0000
+++ b/usr.bin/xlint/xlint/lint.1        Mon Oct 21 21:16:12 2002 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: lint.1,v 1.23 2002/09/26 01:09:46 wiz Exp $
+.\" $NetBSD: lint.1,v 1.24 2002/10/21 21:16:12 christos Exp $
 .\"
 .\" Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
 .\" Copyright (c) 1994, 1995 Jochen Pohl
@@ -76,7 +76,7 @@
 .Nm lint
 .Op Fl abceghprvwzHFV
 .Bk -words
-.Op Fl s | Fl t
+.Op Fl s | Fl t | Fl S
 .Ek
 .Bk -words
 .Fl C Ar library
@@ -295,6 +295,8 @@
 flag,
 .Li __STRICT_ANSI__
 is a predefined preprocessor macro.
+.It Fl S
+C9X mode. Currently not fully implemented.
 .It Fl t
 Traditional C mode.
 .Li __STDC__
diff -r 79f92725d4bc -r 2e2fc0d8b91f usr.bin/xlint/xlint/xlint.c
--- a/usr.bin/xlint/xlint/xlint.c       Mon Oct 21 21:14:51 2002 +0000
+++ b/usr.bin/xlint/xlint/xlint.c       Mon Oct 21 21:16:12 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xlint.c,v 1.29 2002/07/20 08:40:17 grant Exp $ */
+/* $NetBSD: xlint.c,v 1.30 2002/10/21 21:16:13 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: xlint.c,v 1.29 2002/07/20 08:40:17 grant Exp $");
+__RCSID("$NetBSD: xlint.c,v 1.30 2002/10/21 21:16:13 christos Exp $");
 #endif
 
 #include <sys/param.h>
@@ -103,7 +103,7 @@
 static  char   *libexec_path;
 
 /* flags */
-static int     iflag, oflag, Cflag, sflag, tflag, Fflag, dflag, Bflag;
+static int     iflag, oflag, Cflag, sflag, tflag, Fflag, dflag, Bflag, Sflag;
 
 /* print the commands executed to run the stages of compilation */
 static int     Vflag;
@@ -285,13 +285,13 @@
 {
 
        (void)fprintf(stderr,
-           "Usage: %s [-abceghprvwxzHF] [-s|-t] [-i|-nu] [-Dname[=def]]"
+           "Usage: %s [-abceghprvwxzHFS] [-s|-t] [-i|-nu] [-Dname[=def]]"
            " [-Uname] [-X <id>[,<id>]...\n", getprogname());
        (void)fprintf(stderr,
            "\t[-Idirectory] [-Ldirectory] [-llibrary] [-ooutputfile]"
            " file...\n");
        (void)fprintf(stderr,
-           "       %s [-abceghprvwzHF] [-s|-t] -Clibrary [-Dname[=def]]\n"
+           "       %s [-abceghprvwzHFS] [|-s|-t] -Clibrary [-Dname[=def]]\n"
            " [-X <id>[,<id>]...\n", getprogname());
        (void)fprintf(stderr, "\t[-Idirectory] [-Uname] [-Bpath] file"
            " ...\n");
@@ -361,8 +361,7 @@
        (void)signal(SIGINT, terminate);
        (void)signal(SIGQUIT, terminate);
        (void)signal(SIGTERM, terminate);
-
-       while ((c = getopt(argc, argv, "abcd:eghil:no:prstuvwxzB:C:D:FHI:L:U:VX:")) != -1) {
+       while ((c = getopt(argc, argv, "abcd:eghil:no:prstuvwxzB:C:D:FHI:L:SU:VX:")) != -1) {
                switch (c) {
 
                case 'a':
@@ -426,6 +425,13 @@
                        sflag = 1;
                        break;
 
+               case 'S':
+                       if (tflag)
+                               usage();
+                       appcstrg(&l1flags, "-S");
+                       Sflag = 1;
+                       break;
+
 #if !HAVE_CONFIG_H
                case 't':
                        if (sflag)



Home | Main Index | Thread Index | Old Index