now passes on Solaris (-Wall -W -Wno-char-subscripts) too
This commit is contained in:
parent
37d3bd813d
commit
3f570d7cc7
8
check.t
8
check.t
@ -1,4 +1,4 @@
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.5 2005/05/23 15:03:04 tg Exp $
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.6 2005/05/23 15:54:30 tg Exp $
|
||||
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
|
||||
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
|
||||
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
|
||||
@ -1876,6 +1876,8 @@ name: history-ed-1
|
||||
description:
|
||||
Basic (ed) editing works (assumes you have generic ed editor
|
||||
that prints no prompts).
|
||||
# we don't have persistent history on Solaris (no flock)
|
||||
category: !os:solaris
|
||||
arguments: !-i!
|
||||
env-setup: !ENV=./Env!HISTFILE=hist.file!
|
||||
file-setup: file 644 "Env"
|
||||
@ -1895,6 +1897,7 @@ expected-stderr-pattern:
|
||||
name: history-ed-2
|
||||
description:
|
||||
Correct command is edited when number given
|
||||
category: !os:solaris
|
||||
arguments: !-i!
|
||||
env-setup: !ENV=./Env!HISTFILE=hist.file!
|
||||
file-setup: file 644 "Env"
|
||||
@ -1923,6 +1926,7 @@ description:
|
||||
in history.
|
||||
(NOTE: adapted for COMPLEX HISTORY compile time option)
|
||||
(ksh88 fails 'cause it lists the fc command)
|
||||
category: !os:solaris
|
||||
arguments: !-i!
|
||||
env-setup: !ENV=./Env!HISTFILE=hist.file!
|
||||
file-setup: file 644 "Env"
|
||||
@ -3604,5 +3608,5 @@ category: pdksh
|
||||
stdin:
|
||||
echo $KSH_VERSION
|
||||
expected-stdout:
|
||||
@(#)MIRBSD KSH R21
|
||||
@(#)MIRBSD KSH R21 2005/05/23
|
||||
---
|
||||
|
11
histrap.c
11
histrap.c
@ -1,4 +1,4 @@
|
||||
/** $MirOS: src/bin/mksh/histrap.c,v 1.6 2005/05/23 15:36:55 tg Exp $ */
|
||||
/** $MirOS: src/bin/mksh/histrap.c,v 1.7 2005/05/23 15:54:31 tg Exp $ */
|
||||
/* $OpenBSD: history.c,v 1.30 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: trap.c,v 1.22 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
|
||||
@ -8,17 +8,17 @@
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.6 2005/05/23 15:36:55 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.7 2005/05/23 15:54:31 tg Exp $");
|
||||
|
||||
static int histfd;
|
||||
static int hsize;
|
||||
|
||||
static void histinsert(Source *, int, unsigned char *);
|
||||
#ifndef __sun__
|
||||
static int hist_count_lines(unsigned char *, int);
|
||||
static int hist_shrink(unsigned char *, int);
|
||||
static unsigned char *hist_skip_back(unsigned char *,int *,int);
|
||||
static void histload(Source *, unsigned char *, int);
|
||||
static void histinsert(Source *, int, unsigned char *);
|
||||
static void writehistfile(int, char *);
|
||||
static int sprinkle(int);
|
||||
#endif
|
||||
@ -588,7 +588,8 @@ init_histvec(void)
|
||||
* save command in history
|
||||
*/
|
||||
void
|
||||
histsave(int lno, const char *cmd, int dowrite)
|
||||
histsave(int lno __attribute__((unused)), const char *cmd,
|
||||
int dowrite __attribute__((unused)))
|
||||
{
|
||||
char **hp;
|
||||
char *c, *cp;
|
||||
@ -878,7 +879,6 @@ histload(Source *s, unsigned char *base, int bytes)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Insert a line into the history at a specified number
|
||||
@ -896,7 +896,6 @@ histinsert(Source *s, int lno, unsigned char *line)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef __sun__
|
||||
/*
|
||||
* write a command to the end of the history file
|
||||
* This *MAY* seem easy but it's also necessary to check
|
||||
|
6
main.c
6
main.c
@ -1,4 +1,4 @@
|
||||
/** $MirOS: src/bin/mksh/main.c,v 1.3 2005/05/23 15:36:55 tg Exp $ */
|
||||
/** $MirOS: src/bin/mksh/main.c,v 1.4 2005/05/23 15:54:31 tg Exp $ */
|
||||
/* $OpenBSD: main.c,v 1.38 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: tty.c,v 1.8 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: io.c,v 1.21 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
@ -10,7 +10,7 @@
|
||||
#include <ctype.h>
|
||||
#include <pwd.h>
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.3 2005/05/23 15:36:55 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.4 2005/05/23 15:54:31 tg Exp $");
|
||||
|
||||
extern char **environ;
|
||||
|
||||
@ -18,7 +18,7 @@ static void reclaim(void);
|
||||
static void remove_temps(struct temp *tp);
|
||||
static int is_restricted(char *name);
|
||||
|
||||
const char ksh_version[] = "@(#)MIRBSD KSH R21";
|
||||
const char ksh_version[] = "@(#)MIRBSD KSH R21 2005/05/23";
|
||||
|
||||
static const char initifs[] = "IFS= \t\n";
|
||||
|
||||
|
6
misc.c
6
misc.c
@ -1,4 +1,4 @@
|
||||
/** $MirOS: src/bin/mksh/misc.c,v 1.2 2005/05/23 15:18:16 tg Exp $ */
|
||||
/** $MirOS: src/bin/mksh/misc.c,v 1.3 2005/05/23 15:54:31 tg Exp $ */
|
||||
/* $OpenBSD: misc.c,v 1.28 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: path.c,v 1.12 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
#include <sys/param.h> /* for MAXPATHLEN */
|
||||
#include <sys/stat.h>
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.2 2005/05/23 15:18:16 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.3 2005/05/23 15:54:31 tg Exp $");
|
||||
|
||||
short chtypes[UCHAR_MAX+1]; /* type bits for unsigned char */
|
||||
|
||||
@ -1451,7 +1451,7 @@ chvt(char *f)
|
||||
#endif
|
||||
|
||||
static int
|
||||
parse_T(char *fn)
|
||||
parse_T(char *fn __attribute__((unused)))
|
||||
{
|
||||
#ifdef NO_CHVT
|
||||
warningf(0, "chvt: %s", NO_CHVT);
|
||||
|
Loading…
x
Reference in New Issue
Block a user