more static initialisers (verified using nm comparision between mksh
built with/-out "-ffunction-sections -fdata-sections -Wl,--gc-sections"
This commit is contained in:
parent
c0e1e7645a
commit
6c0255ecb2
4
edit.c
4
edit.c
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.209 2011/04/22 12:10:13 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.210 2011/04/22 12:15:38 tg Exp $");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* in later versions we might use libtermcap for this, but since external
|
* in later versions we might use libtermcap for this, but since external
|
||||||
@ -1186,7 +1186,7 @@ x_emacs(char *buf, size_t len)
|
|||||||
static int
|
static int
|
||||||
x_insert(int c)
|
x_insert(int c)
|
||||||
{
|
{
|
||||||
static int left = 0, pos, save_arg;
|
static int left, pos, save_arg;
|
||||||
static char str[4];
|
static char str[4];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
3
sh.h
3
sh.h
@ -151,7 +151,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EXTERN
|
#ifdef EXTERN
|
||||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.463 2011/04/17 12:24:44 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.464 2011/04/22 12:15:40 tg Exp $");
|
||||||
#endif
|
#endif
|
||||||
#define MKSH_VERSION "R39 2011/04/17"
|
#define MKSH_VERSION "R39 2011/04/17"
|
||||||
|
|
||||||
@ -353,6 +353,7 @@ typedef uint32_t mksh_uari_t;
|
|||||||
/* boolean type (no <stdbool.h> deliberately) */
|
/* boolean type (no <stdbool.h> deliberately) */
|
||||||
typedef unsigned char mksh_bool;
|
typedef unsigned char mksh_bool;
|
||||||
#undef bool
|
#undef bool
|
||||||
|
/* false MUST equal 0 */
|
||||||
#undef false
|
#undef false
|
||||||
#undef true
|
#undef true
|
||||||
/* access macros for boolean type */
|
/* access macros for boolean type */
|
||||||
|
4
syn.c
4
syn.c
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/syn.c,v 1.60 2011/04/09 15:14:54 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/syn.c,v 1.61 2011/04/22 12:15:42 tg Exp $");
|
||||||
|
|
||||||
extern short subshell_nesting_level;
|
extern short subshell_nesting_level;
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ static struct ioword *
|
|||||||
synio(int cf)
|
synio(int cf)
|
||||||
{
|
{
|
||||||
struct ioword *iop;
|
struct ioword *iop;
|
||||||
static struct ioword *nextiop = NULL;
|
static struct ioword *nextiop;
|
||||||
bool ishere;
|
bool ishere;
|
||||||
|
|
||||||
if (nextiop != NULL) {
|
if (nextiop != NULL) {
|
||||||
|
4
tree.c
4
tree.c
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.43 2011/04/09 15:14:55 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.44 2011/04/22 12:15:42 tg Exp $");
|
||||||
|
|
||||||
#define INDENT 8
|
#define INDENT 8
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ static void iofree(struct ioword **, Area *);
|
|||||||
static void wdstrip_internal(struct shf *, const char *, bool, bool);
|
static void wdstrip_internal(struct shf *, const char *, bool, bool);
|
||||||
|
|
||||||
/* "foo& ; bar" and "foo |& ; bar" are invalid */
|
/* "foo& ; bar" and "foo |& ; bar" are invalid */
|
||||||
static bool prevent_semicolon = false;
|
static bool prevent_semicolon;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* print a command tree
|
* print a command tree
|
||||||
|
Loading…
x
Reference in New Issue
Block a user