Displaying 7 results from an estimated 7 matches for "xxreadtoken".
Did you mean:
readtoken
2019 Jan 25
0
[klibc:update-dash] parser: use pgetc_eatbnl() in more places
...le changed, 21 insertions(+), 38 deletions(-)
diff --git a/usr/dash/parser.c b/usr/dash/parser.c
index 382658e7..8b945e36 100644
--- a/usr/dash/parser.c
+++ b/usr/dash/parser.c
@@ -106,6 +106,7 @@ STATIC void parseheredoc(void);
STATIC int peektoken(void);
STATIC int readtoken(void);
STATIC int xxreadtoken(void);
+STATIC int pgetc_eatbnl();
STATIC int readtoken1(int, char const *, char *, int);
STATIC void synexpect(int) __attribute__((__noreturn__));
STATIC void synerror(const char *) __attribute__((__noreturn__));
@@ -656,8 +657,10 @@ parseheredoc(void)
if (needprompt) {
setprompt(2);...
2020 Mar 28
0
[klibc:update-dash] dash: parser: use pgetc_eatbnl() in more places
...le changed, 21 insertions(+), 38 deletions(-)
diff --git a/usr/dash/parser.c b/usr/dash/parser.c
index 382658e7..8b945e36 100644
--- a/usr/dash/parser.c
+++ b/usr/dash/parser.c
@@ -106,6 +106,7 @@ STATIC void parseheredoc(void);
STATIC int peektoken(void);
STATIC int readtoken(void);
STATIC int xxreadtoken(void);
+STATIC int pgetc_eatbnl();
STATIC int readtoken1(int, char const *, char *, int);
STATIC void synexpect(int) __attribute__((__noreturn__));
STATIC void synerror(const char *) __attribute__((__noreturn__));
@@ -656,8 +657,10 @@ parseheredoc(void)
if (needprompt) {
setprompt(2);...
2019 Jan 25
0
[klibc:update-dash] [INPUT] Kill pgetc_macro
...;
void popallfiles(void);
void closescript(void);
-
-#define pgetc_macro() \
- (--parsenleft >= 0 ? (signed char)*parsenextc++ : preadbuffer())
diff --git a/usr/dash/parser.c b/usr/dash/parser.c
index 572cbcd5..c4eaae2b 100644
--- a/usr/dash/parser.c
+++ b/usr/dash/parser.c
@@ -775,7 +775,7 @@ xxreadtoken(void)
setprompt(2);
}
for (;;) { /* until token or start of word found */
- c = pgetc_macro();
+ c = pgetc();
switch (c) {
case ' ': case '\t':
case PEOA:
@@ -1009,7 +1009,7 @@ quotemark:
USTPUTC(c, out);
}
}
- c = pgetc_macro();
+ c = pgetc();...
2019 Jan 25
0
[klibc:update-dash] [PARSER] Add nlprompt/nlnoprompt helpers
...r/dash/parser.c
+++ b/usr/dash/parser.c
@@ -743,6 +743,19 @@ out:
return (t);
}
+static void nlprompt(void)
+{
+ plinno++;
+ if (doprompt)
+ setprompt(2);
+}
+
+static void nlnoprompt(void)
+{
+ plinno++;
+ needprompt = doprompt;
+}
+
/*
* Read the next input token.
@@ -786,16 +799,13 @@ xxreadtoken(void)
continue;
case '\\':
if (pgetc() == '\n') {
- plinno++;
- if (doprompt)
- setprompt(2);
+ nlprompt();
continue;
}
pungetc();
goto breakloop;
case '\n':
- plinno++;
- needprompt = doprompt;
+ nlnoprompt();
RETURN(TNL...
2020 Mar 28
0
[klibc:update-dash] dash: [INPUT] Kill pgetc_macro
...;
void popallfiles(void);
void closescript(void);
-
-#define pgetc_macro() \
- (--parsenleft >= 0 ? (signed char)*parsenextc++ : preadbuffer())
diff --git a/usr/dash/parser.c b/usr/dash/parser.c
index 572cbcd5..c4eaae2b 100644
--- a/usr/dash/parser.c
+++ b/usr/dash/parser.c
@@ -775,7 +775,7 @@ xxreadtoken(void)
setprompt(2);
}
for (;;) { /* until token or start of word found */
- c = pgetc_macro();
+ c = pgetc();
switch (c) {
case ' ': case '\t':
case PEOA:
@@ -1009,7 +1009,7 @@ quotemark:
USTPUTC(c, out);
}
}
- c = pgetc_macro();
+ c = pgetc();...
2020 Mar 28
0
[klibc:update-dash] dash: [PARSER] Add nlprompt/nlnoprompt helpers
...r/dash/parser.c
+++ b/usr/dash/parser.c
@@ -743,6 +743,19 @@ out:
return (t);
}
+static void nlprompt(void)
+{
+ plinno++;
+ if (doprompt)
+ setprompt(2);
+}
+
+static void nlnoprompt(void)
+{
+ plinno++;
+ needprompt = doprompt;
+}
+
/*
* Read the next input token.
@@ -786,16 +799,13 @@ xxreadtoken(void)
continue;
case '\\':
if (pgetc() == '\n') {
- plinno++;
- if (doprompt)
- setprompt(2);
+ nlprompt();
continue;
}
pungetc();
goto breakloop;
case '\n':
- plinno++;
- needprompt = doprompt;
+ nlnoprompt();
RETURN(TNL...
2012 Oct 01
0
[klibc:master] Avoid overflow for very long variable name
...s=18446744071562067972)
at memalloc.c:132
#7 0x000000000040ece9 in grabstackblock (len=18446744071562067972)
at memalloc.h:67
#8 0x00000000004106b5 in readtoken1 (firstc=118, syntax=0x419522 "",
eofmark=0x0, striptabs=0) at parser.c:1040
#9 0x00000000004101a4 in xxreadtoken () at parser.c:826
#10 0x000000000040fe1d in readtoken () at parser.c:697
#11 0x000000000040edcc in parsecmd (interact=0) at parser.c:145
#12 0x000000000040c679 in cmdloop (top=1) at main.c:224
#13 0x000000000040c603 in main (argc=2, argv=0x7fffffffd9f8) at main.c:178
#8 0x0000000000410...