some null/NUL
This commit is contained in:
parent
979406bba7
commit
cf5fc9eac2
8
edit.c
8
edit.c
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.106 2007/07/22 13:34:48 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.107 2007/07/22 13:38:25 tg Exp $");
|
||||||
|
|
||||||
/* tty driver characters we are interested in */
|
/* tty driver characters we are interested in */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -1697,7 +1697,7 @@ x_delete(int nc, int push)
|
|||||||
|
|
||||||
xep -= nb;
|
xep -= nb;
|
||||||
cp = xcp;
|
cp = xcp;
|
||||||
memmove(xcp, xcp + nb, xep - xcp + 1); /* Copies the null */
|
memmove(xcp, xcp + nb, xep - xcp + 1); /* Copies the NUL */
|
||||||
x_adj_ok = 0; /* don't redraw */
|
x_adj_ok = 0; /* don't redraw */
|
||||||
xlp_valid = false;
|
xlp_valid = false;
|
||||||
x_zots(xcp);
|
x_zots(xcp);
|
||||||
@ -3476,9 +3476,9 @@ static int modified; /* buffer has been "modified" */
|
|||||||
static int state;
|
static int state;
|
||||||
|
|
||||||
/* Information for keeping track of macros that are being expanded.
|
/* Information for keeping track of macros that are being expanded.
|
||||||
* The format of buf is the alias contents followed by a null byte followed
|
* The format of buf is the alias contents followed by a NUL byte followed
|
||||||
* by the name (letter) of the alias. The end of the buffer is marked by
|
* by the name (letter) of the alias. The end of the buffer is marked by
|
||||||
* a double null. The name of the alias is stored so recursive macros can
|
* a double NUL. The name of the alias is stored so recursive macros can
|
||||||
* be detected.
|
* be detected.
|
||||||
*/
|
*/
|
||||||
struct macro_state {
|
struct macro_state {
|
||||||
|
6
exec.c
6
exec.c
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.34 2007/07/22 13:34:49 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.35 2007/07/22 13:38:26 tg Exp $");
|
||||||
|
|
||||||
static int comexec(struct op *, struct tbl *volatile, const char **,
|
static int comexec(struct op *, struct tbl *volatile, const char **,
|
||||||
int volatile);
|
int volatile);
|
||||||
@ -406,9 +406,9 @@ comexec(struct op *t, struct tbl *volatile tp, const char **ap,
|
|||||||
* before we can do a path search (in case the assignments change
|
* before we can do a path search (in case the assignments change
|
||||||
* PATH).
|
* PATH).
|
||||||
* Odd cases:
|
* Odd cases:
|
||||||
* FOO=bar exec > /dev/null FOO is kept but not exported
|
* FOO=bar exec >/dev/null FOO is kept but not exported
|
||||||
* FOO=bar exec foobar FOO is exported
|
* FOO=bar exec foobar FOO is exported
|
||||||
* FOO=bar command exec > /dev/null FOO is neither kept nor exported
|
* FOO=bar command exec >/dev/null FOO is neither kept nor exported
|
||||||
* FOO=bar command FOO is neither kept nor exported
|
* FOO=bar command FOO is neither kept nor exported
|
||||||
* PATH=... foobar use new PATH in foobar search
|
* PATH=... foobar use new PATH in foobar search
|
||||||
*/
|
*/
|
||||||
|
4
misc.c
4
misc.c
@ -6,7 +6,7 @@
|
|||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.61 2007/07/22 13:34:51 tg Exp $\t"
|
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.62 2007/07/22 13:38:26 tg Exp $\t"
|
||||||
MKSH_SH_H_ID);
|
MKSH_SH_H_ID);
|
||||||
|
|
||||||
#undef USE_CHVT
|
#undef USE_CHVT
|
||||||
@ -65,7 +65,7 @@ initctypes(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate a string of size n+1 and copy upto n characters from the possibly
|
/* Allocate a string of size n+1 and copy upto n characters from the possibly
|
||||||
* null terminated string s into it. Always returns a null terminated string
|
* NUL terminated string s into it. Always returns a NUL terminated string
|
||||||
* (unless n < 0).
|
* (unless n < 0).
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
|
7
sh.h
7
sh.h
@ -8,7 +8,7 @@
|
|||||||
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */
|
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */
|
||||||
/* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */
|
/* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */
|
||||||
|
|
||||||
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.158 2007/07/22 13:34:51 tg Exp $"
|
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.159 2007/07/22 13:38:26 tg Exp $"
|
||||||
#define MKSH_VERSION "R30 2007/07/17"
|
#define MKSH_VERSION "R30 2007/07/17"
|
||||||
|
|
||||||
#if HAVE_SYS_PARAM_H
|
#if HAVE_SYS_PARAM_H
|
||||||
@ -429,9 +429,10 @@ enum sh_flag {
|
|||||||
|
|
||||||
#define Flag(f) (shell_flags[(int) (f)])
|
#define Flag(f) (shell_flags[(int) (f)])
|
||||||
|
|
||||||
EXTERN char shell_flags [FNFLAGS];
|
EXTERN char shell_flags[FNFLAGS];
|
||||||
|
|
||||||
EXTERN char null [] I__(""); /* null value for variable */
|
/* null value for variable; comparision pointer for unset */
|
||||||
|
EXTERN char null[] I__("");
|
||||||
|
|
||||||
enum temp_type {
|
enum temp_type {
|
||||||
TT_HEREDOC_EXP, /* expanded heredoc */
|
TT_HEREDOC_EXP, /* expanded heredoc */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user