# HG changeset patch # User Richard Lowe # Date 1335904037 -3600 # Node ID 1b5898b11b5563f6ca63a18a8202ce728df02836 # Parent 8f2b5c7a4c80a7e69ecb1562874d7c61c352253b 2668 syntax error in terminfo.src trips uninitialized var in tic, screws terminfo Reviewed by: Gordon Ross Reviewed by: Igor Kozhukhov Reviewed by: Jason King Approved by: Robert Mustacchi diff -r 8f2b5c7a4c80 -r 1b5898b11b55 usr/src/cmd/terminfo/terminfo.src --- a/usr/src/cmd/terminfo/terminfo.src Fri Apr 27 17:48:39 2012 +0100 +++ b/usr/src/cmd/terminfo/terminfo.src Tue May 01 21:27:17 2012 +0100 @@ -4890,7 +4890,7 @@ screen-16color-bce|GNU Screen with 16 colors and BCE, use=ibm+16color, use=screen-bce, -screen-16color-bce-s|GNU Screen with 16 colors, BCE, and status line, +screen-16color-bce-s|GNU Screen with 16 colors BCE and status line, bce, use=ibm+16color, use=screen-s, # ====================================================================== @@ -4908,7 +4908,7 @@ ccc@, initc@, use=xterm+256color, use=screen-bce, -screen-256color-bce-s|GNU Screen with 256 colors, BCE, and status line, +screen-256color-bce-s|GNU Screen with 256 colors BCE and status line, bce, ccc@, initc@, use=xterm+256color, use=screen-s, diff -r 8f2b5c7a4c80 -r 1b5898b11b55 usr/src/cmd/tic/tic_parse.c --- a/usr/src/cmd/tic/tic_parse.c Fri Apr 27 17:48:39 2012 +0100 +++ b/usr/src/cmd/tic/tic_parse.c Tue May 01 21:27:17 2012 +0100 @@ -235,7 +235,7 @@ dump_list(char *str) { struct use_item *ptr; - char line[512]; + char line[1024]; fprintf(stderr, "dump_list %s\n", str); for (ptr = use_list.head; ptr != NULL; ptr = ptr->fptr) { diff -r 8f2b5c7a4c80 -r 1b5898b11b55 usr/src/cmd/tic/tic_scan.c --- a/usr/src/cmd/tic/tic_scan.c Fri Apr 27 17:48:39 2012 +0100 +++ b/usr/src/cmd/tic/tic_scan.c Tue May 01 21:27:17 2012 +0100 @@ -37,8 +37,6 @@ * contributors. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * COPYRIGHT NOTICE * @@ -135,7 +133,7 @@ get_token() { long number; - int type; + int type = UNDEF; register int ch; static char buffer[1024]; register char *ptr; diff -r 8f2b5c7a4c80 -r 1b5898b11b55 usr/src/lib/libcurses/screen/compiler.h --- a/usr/src/lib/libcurses/screen/compiler.h Fri Apr 27 17:48:39 2012 +0100 +++ b/usr/src/lib/libcurses/screen/compiler.h Tue May 01 21:27:17 2012 +0100 @@ -40,8 +40,6 @@ #ifndef _COMPILER_H #define _COMPILER_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * COPYRIGHT NOTICE * @@ -131,11 +129,12 @@ * */ -#define BOOLEAN 0 /* Boolean capability */ -#define NUMBER 1 /* Numeric capability */ -#define STRING 2 /* String-valued capability */ -#define CANCEL 3 /* Capability to be cancelled in following tc's */ -#define NAMES 4 /* The names for a terminal type */ +#define BOOLEAN 0 /* Boolean capability */ +#define NUMBER 1 /* Numeric capability */ +#define STRING 2 /* String-valued capability */ +#define CANCEL 3 /* Capability to be cancelled in following tc's */ +#define NAMES 4 /* The names for a terminal type */ +#define UNDEF 5 /* Invalid token type */ #define MAXBOOLS 64 /* Maximum # of boolean caps we can handle */ #define MAXNUMS 64 /* Maximum # of numeric caps we can handle */ diff -r 8f2b5c7a4c80 -r 1b5898b11b55 usr/src/lib/libxcurses/src/tic/tic.h --- a/usr/src/lib/libxcurses/src/tic/tic.h Fri Apr 27 17:48:39 2012 +0100 +++ b/usr/src/lib/libxcurses/src/tic/tic.h Tue May 01 21:27:17 2012 +0100 @@ -24,8 +24,6 @@ * All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * tic.h Terminal Information Compiler * @@ -114,12 +112,15 @@ * The first three are also used in the hash table of capability * names. The scanner returns one of these values after loading * the specifics into the global structure curr_token. + * + * Note that EOF is also, implicitly, a token type. */ -#define BOOLEAN 0 /* Boolean capability */ -#define NUMBER 1 /* Numeric capability */ -#define STRING 2 /* String-valued capability */ -#define CANCEL 3 /* Capability to be cancelled in following tc's */ -#define NAMES 4 /* The names for a terminal type */ +#define BOOLEAN 0 /* Boolean capability */ +#define NUMBER 1 /* Numeric capability */ +#define STRING 2 /* String-valued capability */ +#define CANCEL 3 /* Capability to be cancelled in following tc's */ +#define NAMES 4 /* The names for a terminal type */ +#define UNDEF 5 /* Invalid token */ /* * The global structure in which the specific parts of a