Adapt to compiling with -Wcast-qual by constifying vt220_putstring()'s

first argument.  Also gets rid of unneccessary casts to (u_char*).
This commit is contained in:
he 2005-06-09 09:23:39 +00:00
parent f1f4a50e8b
commit bdc36c4d9b
2 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: vt220.c,v 1.5 2004/03/13 18:48:26 bjh21 Exp $ */
/* $NetBSD: vt220.c,v 1.6 2005/06/09 09:23:39 he Exp $ */
/*
* Copyright (c) 1994-1995 Melvyn Tang-Richardson
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vt220.c,v 1.5 2004/03/13 18:48:26 bjh21 Exp $");
__KERNEL_RCSID(0, "$NetBSD: vt220.c,v 1.6 2005/06/09 09:23:39 he Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -115,7 +115,7 @@ void clr_params(struct vt220_info *);
void respond(struct vconsole *);
int vt220_init(struct vconsole *);
int vt220_putstring(char *, int, struct vconsole *);
int vt220_putstring(const char *, int, struct vconsole *);
int vt220_swapin(struct vconsole *);
int vt220_swapout(struct vconsole *);
int vt220_sleep(struct vconsole *);
@ -603,7 +603,7 @@ vt_da(vc)
struct vconsole *vc;
{
struct vt220_info *cdata = (struct vt220_info *)vc->data;
static u_char *response = (u_char *)DA_VT220;
static const char *response = DA_VT220;
cdata->report_chars = response;
cdata->report_count = 18;
@ -829,10 +829,10 @@ vt_dsr(vc)
struct vconsole *vc;
{
struct vt220_info *cdata = (struct vt220_info *)vc->data;
static u_char *answr = (u_char *)"\033[0n";
static u_char *panswr = (u_char *)"\033[?13n"; /* Printer Unattached */
static u_char *udkanswr = (u_char *)"\033[?21n"; /* UDK Locked */
static u_char *langanswr = (u_char *)"\033[?27;1n"; /* North American*/
static const char *answr = "\033[0n";
static const char *panswr = "\033[?13n"; /* Printer Unattached */
static const char *udkanswr = "\033[?21n"; /* UDK Locked */
static const char *langanswr = "\033[?27;1n"; /* North American*/
static u_char buffer[16];
int i = 0;
@ -1311,7 +1311,7 @@ do_render(c, vc)
int
TERMTYPE_PUTSTRING(string, length, vc)
char *string;
const char *string;
int length;
struct vconsole *vc;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: vt220.h,v 1.1 2001/10/05 22:27:45 reinoud Exp $ */
/* $NetBSD: vt220.h,v 1.2 2005/06/09 09:23:39 he Exp $ */
/*
* Copyright (c) 1994-1995 Melvyn Tang-Richardson
@ -100,7 +100,7 @@ struct vt220_info {
int xcur, ycur, sc_xcur, sc_ycur;
int sc_flag;
char *report_chars;
const char *report_chars;
int report_count;
int cursor_on;