Source-Changes-HG archive

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

[src/trunk]: src/lib/libterminfo Our API just uses typedefs, so don't use the...



details:   https://anonhg.NetBSD.org/src/rev/54e13800b474
branches:  trunk
changeset: 757773:54e13800b474
user:      roy <roy%NetBSD.org@localhost>
date:      Wed Sep 22 06:10:51 2010 +0000

description:
Our API just uses typedefs, so don't use the struct symbol which will avoid
any potential conflicts with userland.

diffstat:

 lib/libterminfo/term.h         |   4 ++--
 lib/libterminfo/term_private.h |  10 +++++-----
 lib/libterminfo/termcap.c      |  10 ++++++----
 lib/libterminfo/termcap_map.c  |   6 +++---
 lib/libterminfo/tparm.c        |   8 ++++----
 5 files changed, 20 insertions(+), 18 deletions(-)

diffs (150 lines):

diff -r eddc276f40f2 -r 54e13800b474 lib/libterminfo/term.h
--- a/lib/libterminfo/term.h    Wed Sep 22 04:32:53 2010 +0000
+++ b/lib/libterminfo/term.h    Wed Sep 22 06:10:51 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: term.h,v 1.5 2010/02/26 00:09:00 roy Exp $ */
+/* $NetBSD: term.h,v 1.6 2010/09/22 06:10:51 roy Exp $ */
 
 /*
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -1449,7 +1449,7 @@
 #define zero_motion                     t_zero_motion(cur_term)
 
 #ifndef _TERMINFO
-typedef struct terminal {
+typedef struct {
        int fildes;
        /* We need to expose these so that the macros work */
        const char *name;
diff -r eddc276f40f2 -r 54e13800b474 lib/libterminfo/term_private.h
--- a/lib/libterminfo/term_private.h    Wed Sep 22 04:32:53 2010 +0000
+++ b/lib/libterminfo/term_private.h    Wed Sep 22 06:10:51 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: term_private.h,v 1.7 2010/03/02 14:11:11 roy Exp $ */
+/* $NetBSD: term_private.h,v 1.8 2010/09/22 06:10:51 roy Exp $ */
 
 /*
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
 #define VALID_NUMERIC(s) ((s) >= 0)
 #define VALID_STRING(s)  ((s) != CANCELLED_STRING && (s) != ABSENT_STRING)
 
-typedef struct termextra {
+typedef struct {
        const char *id;
        char type;
        char flag;
@@ -79,7 +79,7 @@
        const char *str;
 } TERMUSERDEF;
 
-typedef struct terminal {
+typedef struct {
        int fildes;
        /* We need to expose these so that the macros work */
        const char *name;
@@ -125,14 +125,14 @@
 
 #define UINT16_T_MAX 0xffff
 
-typedef struct tbuf {
+typedef struct {
        char *buf;
        size_t buflen;
        size_t bufpos;
        size_t entries;
 } TBUF;
 
-typedef struct tic {
+typedef struct {
        char *name;
        char *alias;
        char *desc;
diff -r eddc276f40f2 -r 54e13800b474 lib/libterminfo/termcap.c
--- a/lib/libterminfo/termcap.c Wed Sep 22 04:32:53 2010 +0000
+++ b/lib/libterminfo/termcap.c Wed Sep 22 06:10:51 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: termcap.c,v 1.8 2010/07/04 07:30:33 roy Exp $ */
+/* $NetBSD: termcap.c,v 1.9 2010/09/22 06:10:51 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: termcap.c,v 1.8 2010/07/04 07:30:33 roy Exp $");
+__RCSID("$NetBSD: termcap.c,v 1.9 2010/09/22 06:10:51 roy Exp $");
 
 #include <assert.h>
 #include <ctype.h>
@@ -326,10 +326,12 @@
        return NULL;
 }
 
-static struct def_info {
+typedef struct {
        const char *name;
        const char *cap;
-} def_infos[] = {
+} DEF_INFO;
+
+static DEF_INFO def_infos[] = {
        { "bel",        "^G" },
        { "cr",         "^M" },
        { "cud1",       "^J" },
diff -r eddc276f40f2 -r 54e13800b474 lib/libterminfo/termcap_map.c
--- a/lib/libterminfo/termcap_map.c     Wed Sep 22 04:32:53 2010 +0000
+++ b/lib/libterminfo/termcap_map.c     Wed Sep 22 06:10:51 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: termcap_map.c,v 1.2 2010/02/12 10:18:56 roy Exp $ */
+/* $NetBSD: termcap_map.c,v 1.3 2010/09/22 06:10:51 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,9 +28,9 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: termcap_map.c,v 1.2 2010/02/12 10:18:56 roy Exp $");
+__RCSID("$NetBSD: termcap_map.c,v 1.3 2010/09/22 06:10:51 roy Exp $");
 
-typedef struct termcap_entry {
+typedef struct {
        const char id[3];
        int ti;
 } TENTRY;
diff -r eddc276f40f2 -r 54e13800b474 lib/libterminfo/tparm.c
--- a/lib/libterminfo/tparm.c   Wed Sep 22 04:32:53 2010 +0000
+++ b/lib/libterminfo/tparm.c   Wed Sep 22 06:10:51 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tparm.c,v 1.1 2010/02/03 15:16:32 roy Exp $ */
+/* $NetBSD: tparm.c,v 1.2 2010/09/22 06:10:51 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: tparm.c,v 1.1 2010/02/03 15:16:32 roy Exp $");
+__RCSID("$NetBSD: tparm.c,v 1.2 2010/09/22 06:10:51 roy Exp $");
 
 #include <assert.h>
 #include <ctype.h>
@@ -42,13 +42,13 @@
 
 static TERMINAL *dumbterm; /* For non thread safe functions */
 
-typedef struct tpstack {
+typedef struct {
        long nums[20];
        char *strings[20];
        size_t offset;
 } TPSTACK;
 
-typedef struct tpvar {
+typedef struct {
        long num;
        char *string;
 } TPVAR;



Home | Main Index | Thread Index | Old Index