de-lint:
- bad arithmetic shift - const castaways.
This commit is contained in:
parent
9791d7cf26
commit
9e90cfbd5c
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: color.c,v 1.13 2000/12/19 21:34:24 jdc Exp $ */
|
||||
/* $NetBSD: color.c,v 1.14 2001/01/05 22:57:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: color.c,v 1.13 2000/12/19 21:34:24 jdc Exp $");
|
||||
__RCSID("$NetBSD: color.c,v 1.14 2001/01/05 22:57:56 christos Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "curses.h"
|
||||
@ -343,7 +343,7 @@ __set_color(attr_t attr)
|
||||
{
|
||||
short pair;
|
||||
|
||||
pair = PAIR_NUMBER(attr);
|
||||
pair = PAIR_NUMBER((u_int32_t)attr);
|
||||
#ifdef DEBUG
|
||||
__CTRACE("__set_color: %d, %d, %d\n", pair, pairs[pair].fore,
|
||||
pairs[pair].back);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: curses.h,v 1.53 2001/01/05 22:51:21 christos Exp $ */
|
||||
/* $NetBSD: curses.h,v 1.54 2001/01/05 22:57:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
@ -418,8 +418,8 @@ extern chtype _acs_char[NUM_ACS];
|
||||
#define COLOR_CYAN 0x06
|
||||
#define COLOR_WHITE 0x07
|
||||
|
||||
#define COLOR_PAIR(n) (((n) << 25) & A_COLOR)
|
||||
#define PAIR_NUMBER(n) (((n) & A_COLOR) >> 25)
|
||||
#define COLOR_PAIR(n) ((((u_int32_t)n) << 25) & A_COLOR)
|
||||
#define PAIR_NUMBER(n) ((((u_int32_t)n) & A_COLOR) >> 25)
|
||||
|
||||
/* Curses external declarations. */
|
||||
extern WINDOW *curscr; /* Current screen. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: initscr.c,v 1.20 2000/12/19 21:34:24 jdc Exp $ */
|
||||
/* $NetBSD: initscr.c,v 1.21 2001/01/05 22:57:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)initscr.c 8.2 (Berkeley) 5/4/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: initscr.c,v 1.20 2000/12/19 21:34:24 jdc Exp $");
|
||||
__RCSID("$NetBSD: initscr.c,v 1.21 2001/01/05 22:57:56 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -58,7 +58,7 @@ struct __winlist *__winlistp;
|
||||
WINDOW *
|
||||
initscr(void)
|
||||
{
|
||||
char *sp;
|
||||
const char *sp;
|
||||
|
||||
#ifdef DEBUG
|
||||
__CTRACE("initscr\n");
|
||||
@ -75,8 +75,9 @@ initscr(void)
|
||||
* use Def_term.
|
||||
*/
|
||||
if (My_term || (sp = getenv("TERM")) == NULL)
|
||||
sp = (char *)Def_term;
|
||||
if (setterm(sp) == ERR)
|
||||
sp = Def_term;
|
||||
/* LINTED const castaway; setterm does not modify sp! */
|
||||
if (setterm((char *)sp) == ERR)
|
||||
return (NULL);
|
||||
|
||||
/* Need either homing or cursor motion for refreshes */
|
||||
|
Loading…
Reference in New Issue
Block a user