make tempvar() and vtemp global
This commit is contained in:
parent
45fba44292
commit
dc5ae267ce
5
expr.c
5
expr.c
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.56 2012/03/31 17:52:33 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.57 2012/06/28 20:02:27 tg Exp $");
|
||||||
|
|
||||||
/* The order of these enums is constrained by the order of opinfo[] */
|
/* The order of these enums is constrained by the order of opinfo[] */
|
||||||
enum token {
|
enum token {
|
||||||
|
@ -160,7 +160,6 @@ static struct tbl *evalexpr(Expr_state *, int);
|
||||||
static void exprtoken(Expr_state *);
|
static void exprtoken(Expr_state *);
|
||||||
static struct tbl *do_ppmm(Expr_state *, enum token, struct tbl *, bool);
|
static struct tbl *do_ppmm(Expr_state *, enum token, struct tbl *, bool);
|
||||||
static void assign_check(Expr_state *, enum token, struct tbl *);
|
static void assign_check(Expr_state *, enum token, struct tbl *);
|
||||||
static struct tbl *tempvar(void);
|
|
||||||
static struct tbl *intvar(Expr_state *, struct tbl *);
|
static struct tbl *intvar(Expr_state *, struct tbl *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -641,7 +640,7 @@ assign_check(Expr_state *es, enum token op, struct tbl *vasn)
|
||||||
evalerr(es, ET_RDONLY, opinfo[(int)op].name);
|
evalerr(es, ET_RDONLY, opinfo[(int)op].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct tbl *
|
struct tbl *
|
||||||
tempvar(void)
|
tempvar(void)
|
||||||
{
|
{
|
||||||
struct tbl *vp;
|
struct tbl *vp;
|
||||||
|
|
5
sh.h
5
sh.h
|
@ -157,7 +157,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EXTERN
|
#ifdef EXTERN
|
||||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.565 2012/06/28 20:01:00 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.566 2012/06/28 20:02:28 tg Exp $");
|
||||||
#endif
|
#endif
|
||||||
#define MKSH_VERSION "R40 2012/06/26"
|
#define MKSH_VERSION "R40 2012/06/26"
|
||||||
|
|
||||||
|
@ -1063,6 +1063,8 @@ struct tbl {
|
||||||
char name[4];
|
char name[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
EXTERN struct tbl vtemp;
|
||||||
|
|
||||||
/* common flag bits */
|
/* common flag bits */
|
||||||
#define ALLOC BIT(0) /* val.s has been allocated */
|
#define ALLOC BIT(0) /* val.s has been allocated */
|
||||||
#define DEFINED BIT(1) /* is defined in block */
|
#define DEFINED BIT(1) /* is defined in block */
|
||||||
|
@ -1643,6 +1645,7 @@ size_t utf_ptradj(const char *);
|
||||||
int utf_wcwidth(unsigned int);
|
int utf_wcwidth(unsigned int);
|
||||||
#endif
|
#endif
|
||||||
int ksh_access(const char *, int);
|
int ksh_access(const char *, int);
|
||||||
|
struct tbl *tempvar(void);
|
||||||
/* funcs.c */
|
/* funcs.c */
|
||||||
int c_hash(const char **);
|
int c_hash(const char **);
|
||||||
int c_pwd(const char **);
|
int c_pwd(const char **);
|
||||||
|
|
3
var.c
3
var.c
|
@ -27,7 +27,7 @@
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.150 2012/06/25 16:31:18 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.151 2012/06/28 20:02:29 tg Exp $");
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Variables
|
* Variables
|
||||||
|
@ -39,7 +39,6 @@ __RCSID("$MirOS: src/bin/mksh/var.c,v 1.150 2012/06/25 16:31:18 tg Exp $");
|
||||||
* if (flag&EXPORT), val.s contains "name=value" for E-Z exporting.
|
* if (flag&EXPORT), val.s contains "name=value" for E-Z exporting.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct tbl vtemp;
|
|
||||||
static struct table specials;
|
static struct table specials;
|
||||||
static uint32_t lcg_state = 5381;
|
static uint32_t lcg_state = 5381;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue