aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-06-14 13:42:52 +0300
committerSergey Poznyakoff <gray@gnu.org>2020-06-14 13:44:31 +0300
commit17e80d2f2a9bb5fe8f64d4c77fb9207dda360fca (patch)
tree0e7329b7539032a5f3d678eba32f14a68ad31643
parent8d4d064a9c467148be15cb54d625933e2cd0845f (diff)
downloadjumper-17e80d2f2a9bb5fe8f64d4c77fb9207dda360fca.tar.gz
jumper-17e80d2f2a9bb5fe8f64d4c77fb9207dda360fca.tar.bz2
Use grecs with wordsplit v1.1. Minor bugfixes.
* extra/expr.y (expr_eval): Fix size of the IFSTAT argument. * extra/ifalive.h (IFSTAT_SIZE): New define. (error,lex_init): New protos.
-rw-r--r--extra/expr.y5
-rw-r--r--extra/ifalive.h6
m---------grecs0
3 files changed, 9 insertions, 2 deletions
diff --git a/extra/expr.y b/extra/expr.y
index 098fc3e..d7e9957 100644
--- a/extra/expr.y
+++ b/extra/expr.y
@@ -141,2 +141,3 @@ expr_binop_comp(struct expr_node *a, struct expr_node *b,
void yyerror(char const *s);
+int yylex (void);
@@ -410,4 +411,4 @@ expr_eval(int argc, char **argv, IFSTAT a, IFSTAT b)
exit(1);
- memcpy(env.stat[0], a, sizeof a);
- memcpy(env.stat[1], b, sizeof b);
+ memcpy(env.stat[0], a, IFSTAT_SIZE);
+ memcpy(env.stat[1], b, IFSTAT_SIZE);
node_eval(parse_tree, &env, &res);
diff --git a/extra/ifalive.h b/extra/ifalive.h
index da070fa..127885e 100644
--- a/extra/ifalive.h
+++ b/extra/ifalive.h
@@ -27,2 +27,8 @@ enum {
typedef uintmax_t IFSTAT[MAX_STATS];
+#define IFSTAT_SIZE (sizeof(uintmax_t) * MAX_STATS)
int expr_eval(int argc, char **argv, IFSTAT a, IFSTAT b);
+
+void error(int ec, char const *fmt, ...);
+void lex_init(int argc, char **argv);
+
+
diff --git a/grecs b/grecs
-Subproject b06fb7d30415eec1d2efb39286ab96070c724fd
+Subproject 893d875a4065acb757fef55876c391b1dd07004

Return to:

Send suggestions and report system problems to the System administrator.