Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
2668 syntax error in terminfo.src trips uninitialized var in tic, scr…
Browse files Browse the repository at this point in the history
…ews terminfo

Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Jason King <jason.brian.king@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
  • Loading branch information
richlowe committed May 1, 2012
1 parent d0b2dca commit 09a48d4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 20 deletions.
4 changes: 2 additions & 2 deletions usr/src/cmd/terminfo/terminfo.src
Expand Up @@ -4890,7 +4890,7 @@ screen-16color-s|GNU Screen with 16 colors and status line,
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,

# ======================================================================
Expand All @@ -4908,7 +4908,7 @@ screen-256color-bce|GNU Screen with 256 colors and BCE,
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,

Expand Down
2 changes: 1 addition & 1 deletion usr/src/cmd/tic/tic_parse.c
Expand Up @@ -235,7 +235,7 @@ void
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) {
Expand Down
4 changes: 1 addition & 3 deletions usr/src/cmd/tic/tic_scan.c
Expand Up @@ -37,8 +37,6 @@
* contributors.
*/

#pragma ident "%Z%%M% %I% %E% SMI"

/*
* COPYRIGHT NOTICE
*
Expand Down Expand Up @@ -135,7 +133,7 @@ int
get_token()
{
long number;
int type;
int type = UNDEF;
register int ch;
static char buffer[1024];
register char *ptr;
Expand Down
13 changes: 6 additions & 7 deletions usr/src/lib/libcurses/screen/compiler.h
Expand Up @@ -40,8 +40,6 @@
#ifndef _COMPILER_H
#define _COMPILER_H

#pragma ident "%Z%%M% %I% %E% SMI"

/*
* COPYRIGHT NOTICE
*
Expand Down Expand Up @@ -131,11 +129,12 @@ EXTERN int debug_level; /* level of debugging output */
*
*/

#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 */
Expand Down
15 changes: 8 additions & 7 deletions usr/src/lib/libxcurses/src/tic/tic.h
Expand Up @@ -24,8 +24,6 @@
* All rights reserved.
*/

#pragma ident "%Z%%M% %I% %E% SMI"

/*
* tic.h Terminal Information Compiler
*
Expand Down Expand Up @@ -114,12 +112,15 @@ extern int debug_level; /* level of debugging output */
* 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
Expand Down

0 comments on commit 09a48d4

Please sign in to comment.