tabs vs spaces
This commit is contained in:
parent
d43f4efe60
commit
edeb22fb96
16
lex.c
16
lex.c
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.80 2009/03/15 18:30:40 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.81 2009/04/07 19:06:43 tg Exp $");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* states while lexing word
|
* states while lexing word
|
||||||
@ -84,14 +84,14 @@ struct State_info {
|
|||||||
Lex_state *end;
|
Lex_state *end;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void readhere(struct ioword *);
|
static void readhere(struct ioword *);
|
||||||
static int getsc__(void);
|
static int getsc__(void);
|
||||||
static void getsc_line(Source *);
|
static void getsc_line(Source *);
|
||||||
static int getsc_bn(void);
|
static int getsc_bn(void);
|
||||||
static char *get_brace_var(XString *, char *);
|
static char *get_brace_var(XString *, char *);
|
||||||
static int arraysub(char **);
|
static int arraysub(char **);
|
||||||
static const char *ungetsc(int);
|
static const char *ungetsc(int);
|
||||||
static void gethere(bool);
|
static void gethere(bool);
|
||||||
static Lex_state *push_state_(State_info *, Lex_state *);
|
static Lex_state *push_state_(State_info *, Lex_state *);
|
||||||
static Lex_state *pop_state_(State_info *, Lex_state *);
|
static Lex_state *pop_state_(State_info *, Lex_state *);
|
||||||
|
|
||||||
|
10
syn.c
10
syn.c
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/syn.c,v 1.32 2008/12/13 17:02:17 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/syn.c,v 1.33 2009/04/07 19:06:43 tg Exp $");
|
||||||
|
|
||||||
struct nesting_state {
|
struct nesting_state {
|
||||||
int start_token; /* token than began nesting (eg, FOR) */
|
int start_token; /* token than began nesting (eg, FOR) */
|
||||||
@ -44,10 +44,10 @@ static struct nesting_state nesting; /* \n changed to ; */
|
|||||||
static int reject; /* token(cf) gets symbol again */
|
static int reject; /* token(cf) gets symbol again */
|
||||||
static int symbol; /* yylex value */
|
static int symbol; /* yylex value */
|
||||||
|
|
||||||
#define REJECT (reject = 1)
|
#define REJECT (reject = 1)
|
||||||
#define ACCEPT (reject = 0)
|
#define ACCEPT (reject = 0)
|
||||||
#define token(cf) ((reject) ? (ACCEPT, symbol) : (symbol = yylex(cf)))
|
#define token(cf) ((reject) ? (ACCEPT, symbol) : (symbol = yylex(cf)))
|
||||||
#define tpeek(cf) ((reject) ? (symbol) : (REJECT, symbol = yylex(cf)))
|
#define tpeek(cf) ((reject) ? (symbol) : (REJECT, symbol = yylex(cf)))
|
||||||
#define musthave(c,cf) do { if (token(cf) != (c)) syntaxerr(NULL); } while (0)
|
#define musthave(c,cf) do { if (token(cf) != (c)) syntaxerr(NULL); } while (0)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
16
var.c
16
var.c
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.69 2009/03/14 18:12:55 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.70 2009/04/07 19:06:44 tg Exp $");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Variables
|
* Variables
|
||||||
@ -15,13 +15,13 @@ __RCSID("$MirOS: src/bin/mksh/var.c,v 1.69 2009/03/14 18:12:55 tg Exp $");
|
|||||||
*/
|
*/
|
||||||
static struct tbl vtemp;
|
static struct tbl vtemp;
|
||||||
static struct table specials;
|
static struct table specials;
|
||||||
static char *formatstr(struct tbl *, const char *);
|
static char *formatstr(struct tbl *, const char *);
|
||||||
static void export(struct tbl *, const char *);
|
static void export(struct tbl *, const char *);
|
||||||
static int special(const char *);
|
static int special(const char *);
|
||||||
static void unspecial(const char *);
|
static void unspecial(const char *);
|
||||||
static void getspec(struct tbl *);
|
static void getspec(struct tbl *);
|
||||||
static void setspec(struct tbl *);
|
static void setspec(struct tbl *);
|
||||||
static void unsetspec(struct tbl *);
|
static void unsetspec(struct tbl *);
|
||||||
static struct tbl *arraysearch(struct tbl *, uint32_t);
|
static struct tbl *arraysearch(struct tbl *, uint32_t);
|
||||||
static const char *array_index_calc(const char *, bool *, uint32_t *);
|
static const char *array_index_calc(const char *, bool *, uint32_t *);
|
||||||
static int rnd_get(void);
|
static int rnd_get(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user