Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/xlint/common lint: order tspec_name in the same way ...



details:   https://anonhg.NetBSD.org/src/rev/de9c5c44ac83
branches:  trunk
changeset: 948843:de9c5c44ac83
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jan 02 01:36:28 2021 +0000

description:
lint: order tspec_name in the same way as the enum

diffstat:

 usr.bin/xlint/common/tyname.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (55 lines):

diff -r 9ccc1dcc577a -r de9c5c44ac83 usr.bin/xlint/common/tyname.c
--- a/usr.bin/xlint/common/tyname.c     Sat Jan 02 01:12:38 2021 +0000
+++ b/usr.bin/xlint/common/tyname.c     Sat Jan 02 01:36:28 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tyname.c,v 1.18 2021/01/01 01:42:55 rillig Exp $       */
+/*     $NetBSD: tyname.c,v 1.19 2021/01/02 01:36:28 rillig Exp $       */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tyname.c,v 1.18 2021/01/01 01:42:55 rillig Exp $");
+__RCSID("$NetBSD: tyname.c,v 1.19 2021/01/02 01:36:28 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -57,10 +57,12 @@
 tspec_name(tspec_t t)
 {
        switch (t) {
+       case SIGNED:    return "signed";
+       case UNSIGN:    return "unsigned";
        case BOOL:      return "_Bool";
        case CHAR:      return "char";
+       case SCHAR:     return "signed char";
        case UCHAR:     return "unsigned char";
-       case SCHAR:     return "signed char";
        case SHORT:     return "short";
        case USHORT:    return "unsigned short";
        case INT:       return "int";
@@ -77,18 +79,16 @@
        case DOUBLE:    return "double";
        case LDOUBLE:   return "long double";
        case VOID:      return "void";
-       case PTR:       return "pointer";
-       case ENUM:      return "enum";
        case STRUCT:    return "struct";
        case UNION:     return "union";
+       case ENUM:      return "enum";
+       case PTR:       return "pointer";
+       case ARRAY:     return "array";
        case FUNC:      return "function";
-       case ARRAY:     return "array";
+       case COMPLEX:   return "_Complex";
        case FCOMPLEX:  return "float _Complex";
        case DCOMPLEX:  return "double _Complex";
        case LCOMPLEX:  return "long double _Complex";
-       case COMPLEX:   return "_Complex";
-       case SIGNED:    return "signed";
-       case UNSIGN:    return "unsigned";
        default:
                LERROR("tspec_name(%d)", t);
                return NULL;



Home | Main Index | Thread Index | Old Index