Update of /cvsroot/pure-data/pd/extra/expr~ In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9652/extra/expr~
Modified Files: makefile vexp.c vexp_if.c Log Message: checking in version 0.38test5.
Oops, I realize I forgot some more nice files, will add them and re-commit.
Index: vexp.c =================================================================== RCS file: /cvsroot/pure-data/pd/extra/expr~/vexp.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** vexp.c 23 Sep 2003 00:18:13 -0000 1.3 --- vexp.c 6 Sep 2004 20:20:27 -0000 1.4 *************** *** 79,99 **** char *atoif(char *s, long int *value, long int *type);
! static struct ex_ex *ex_lex(struct expr *exp, long int *n); struct ex_ex *ex_match(struct ex_ex *eptr, long int op); ! struct ex_ex *ex_parse(struct expr *exp, struct ex_ex *iptr, struct ex_ex *optr, long int *argc); ! struct ex_ex *ex_eval(struct expr *exp, struct ex_ex *eptr, struct ex_ex *optr, int i);
! int expr_donew(struct expr *expr, int ac, t_atom *av); [...1572 lines suppressed...] (eptr->ex_ptr)[i] = 0; ! exp->exp_str = p; /* * we mark this as a string and later we will change this --- 1844,1858 ---- * function or a table */ ! p = --expr->exp_str; for (i = 0; name_ok(*p); i++) p++; if (!i) { ! post("expr: syntax error: %s\n", expr->exp_str); return (1); } eptr->ex_ptr = (char *)fts_malloc(i + 1); ! strncpy(eptr->ex_ptr, expr->exp_str, (int) i); (eptr->ex_ptr)[i] = 0; ! expr->exp_str = p; /* * we mark this as a string and later we will change this
Index: vexp_if.c =================================================================== RCS file: /cvsroot/pure-data/pd/extra/expr~/vexp_if.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** vexp_if.c 23 Sep 2003 00:18:13 -0000 1.3 --- vexp_if.c 6 Sep 2004 20:20:27 -0000 1.4 *************** *** 40,49 **** #include <stdlib.h>
- #include "vexp.h"
static char *exp_version = "0.4";
! extern struct ex_ex *ex_eval(struct expr *exp, struct ex_ex *eptr, struct ex_ex *optr, int n);
--- 40,48 ---- #include <stdlib.h>
#include "vexp.h"
static char *exp_version = "0.4";
! extern struct ex_ex *ex_eval(struct expr *expr, struct ex_ex *eptr, struct ex_ex *optr, int n);
*************** *** 82,86 **** else if (x->exp_var[i].ex_type == ET_II) x->exp_var[i].ex_int = argv[i].a_w.w_float; ! else pd_error(x, "expr: type mismatch"); } else if (argv[i].a_type == A_SYMBOL) --- 81,86 ---- else if (x->exp_var[i].ex_type == ET_II) x->exp_var[i].ex_int = argv[i].a_w.w_float; ! else if (x->exp_var[i].ex_type) ! pd_error(x, "expr: type mismatch"); } else if (argv[i].a_type == A_SYMBOL) *************** *** 88,92 **** if (x->exp_var[i].ex_type == ET_SI) x->exp_var[i].ex_ptr = (char *)argv[i].a_w.w_symbol; ! else pd_error(x, "expr: type mismatch"); } } --- 88,93 ---- if (x->exp_var[i].ex_type == ET_SI) x->exp_var[i].ex_ptr = (char *)argv[i].a_w.w_symbol; ! else if (x->exp_var[i].ex_type) ! pd_error(x, "expr: type mismatch"); } } *************** *** 889,893 **** */ int ! max_ex_tab(struct expr *exp,fts_symbol_t s,struct ex_ex *arg,struct ex_ex *optr) { #ifdef PD --- 890,895 ---- */ int ! max_ex_tab(struct expr *expr, fts_symbol_t s, struct ex_ex *arg, ! struct ex_ex *optr) { #ifdef PD *************** *** 901,905 **** optr->ex_type = ET_FLT; optr->ex_flt = 0; ! pd_error(exp, "no such table '%s'", s->s_name); return (1); } --- 903,907 ---- optr->ex_type = ET_FLT; optr->ex_flt = 0; ! pd_error(expr, "no such table '%s'", s->s_name); return (1); } *************** *** 916,920 ****
default: /* do something with strings */ ! pd_error(exp, "expr: bad argument for table '%s'\n", fts_symbol_name(s)); indx = 0; } --- 918,922 ----
default: /* do something with strings */ ! pd_error(expr, "expr: bad argument for table '%s'\n", fts_symbol_name(s)); indx = 0; } *************** *** 934,938 ****
int ! max_ex_var(struct expr *exp, fts_symbol_t var, struct ex_ex *optr) { optr->ex_type = ET_FLT; --- 936,940 ----
int ! max_ex_var(struct expr *expr, fts_symbol_t var, struct ex_ex *optr) { optr->ex_type = ET_FLT; *************** *** 940,944 **** optr->ex_type = ET_FLT; optr->ex_flt = 0; ! pd_error(exp, "no such var '%s'", var->s_name); return (1); } --- 942,946 ---- optr->ex_type = ET_FLT; optr->ex_flt = 0; ! pd_error(expr, "no such var '%s'", var->s_name); return (1); }
Index: makefile =================================================================== RCS file: /cvsroot/pure-data/pd/extra/expr~/makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** makefile 22 Feb 2004 16:29:28 -0000 1.5 --- makefile 6 Sep 2004 20:20:27 -0000 1.6 *************** *** 80,86 **** .SUFFIXES: .pd_linux_o
! LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \ ! -Wall -W -Wshadow -Wstrict-prototypes \ ! -Wno-unused -Wno-parentheses -Wno-switch
LINUXINCLUDE = -I../../src --- 80,86 ---- .SUFFIXES: .pd_linux_o
! LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer -fPIC \ ! -Wall -W -Wshadow -Wstrict-prototypes \ ! -Wno-unused -Wno-parentheses -Wno-switch $(CFLAGS)
LINUXINCLUDE = -I../../src