Mercurial > hg > octave-nkf
changeset 5023:89814b22b729
[project @ 2004-09-22 15:12:02 by jwe]
author | jwe |
---|---|
date | Wed, 22 Sep 2004 15:12:02 +0000 |
parents | 4da942f0b76f |
children | 1009e55429bc |
files | src/ov-fcn-inline.cc |
diffstat | 1 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ov-fcn-inline.cc +++ b/src/ov-fcn-inline.cc @@ -608,19 +608,21 @@ fargs.resize (1); fargs(0) = "x"; - for (int i = 0; i < fun.length(); i++) + for (int i = 0; i < fun.length (); i++) { - if (islower (fun [i]) && - (i == 0 ? true : !islower (fun [i-1])) && - (i == fun.length() ? true : !islower (fun [i+1]))) + if (islower (fun[i]) + && (i == 0 || ! islower (fun[i-1])) + && (i == fun.length () || ! islower (fun[i+1]))) { char new_c = fun [i]; if (new_c == 'i' || new_c == 'j') continue; - int new_dist = std::abs(new_c - 'x'); - if (dist == -1 || (new_dist < dist) || - ((new_dist == dist) && (c < new_c))) + + int new_dist = std::abs (new_c - 'x'); + + if (dist == -1 || (new_dist < dist) + || (new_dist == dist && c < new_c)) { fargs(0) = new_c; dist = new_dist;