Mercurial > hg > octave-nkf
diff liboctave/mk-ops.awk @ 5030:160365410ad4
[project @ 2004-09-24 03:22:23 by jwe]
author | jwe |
---|---|
date | Fri, 24 Sep 2004 03:22:24 +0000 |
parents | 269c3d6c0569 |
children | fabb1be5fd84 |
line wrap: on
line diff
--- a/liboctave/mk-ops.awk +++ b/liboctave/mk-ops.awk @@ -26,8 +26,9 @@ { ntypes++; - if (NF == 5) + if (NF == 6) { + scalar_zero_val[ntypes] = $6; fwd_decl_ok[ntypes] = $5 == "YES"; header[ntypes] = $4 == "NONE" ? "" : $4; class[ntypes] = $3; @@ -62,8 +63,6 @@ if (rhs_conv == "NONE") rhs_conv = ""; - zero_val = (NF > n) ? $(++n) : ""; - k = 0 while (NF > n) bool_headers[k++] = $(++n); @@ -99,6 +98,10 @@ lhs_type = type[lhs_num]; rhs_type = type[rhs_num]; + result_scalar_zero_val = scalar_zero_val[result_num]; + lhs_scalar_zero_val = scalar_zero_val[lhs_num]; + rhs_scalar_zero_val = scalar_zero_val[rhs_num]; + result_header = header[result_num]; lhs_header = header[lhs_num]; rhs_header = header[rhs_num]; @@ -185,7 +188,7 @@ if ((lhs_class == "DM" && rhs_class == "M") || (lhs_class == "M" && rhs_class == "DM")) printf ("%s%s_BIN_OPS (%s, %s, %s, %s)\n", lhs_class, rhs_class, result_type, - lhs_type, rhs_type, zero_val) >> cc_file + lhs_type, rhs_type, result_scalar_zero_val) >> cc_file else printf ("%s%s_BIN_OPS (%s, %s, %s)\n", lhs_class, rhs_class, result_type, @@ -197,8 +200,9 @@ lhs_type, lhs_conv, rhs_type, rhs_conv) >> cc_file if (bool_ops) - printf ("%s%s_BOOL_OPS (%s, %s, %s)\n", lhs_class, rhs_class, - lhs_type, rhs_type, zero_val) >> cc_file + printf ("%s%s_BOOL_OPS2 (%s, %s, %s, %s)\n", lhs_class, rhs_class, + lhs_type, rhs_type, lhs_scalar_zero_val, + rhs_scalar_zero_val) >> cc_file close (cc_file);