tools/nxstyle.c: handle scientific notation with a negative exponent (eg. 9e-10)
This commit is contained in:
parent
96dc3308f4
commit
15242a65b6
@ -2033,6 +2033,19 @@ int main(int argc, char **argv, char **envp)
|
|||||||
check_spaces_leftright(line, lineno, n, n + 1);
|
check_spaces_leftright(line, lineno, n, n + 1);
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Scientific notation with a negative exponent (eg. 10e-10)
|
||||||
|
* REVISIT: This fails for cases where the variable name
|
||||||
|
* ends with 'e' preceded by a digit:
|
||||||
|
* a = abc1e-10;
|
||||||
|
* a = ABC1E-10;
|
||||||
|
*/
|
||||||
|
|
||||||
|
else if ((line[n - 1] == 'e' || line[n - 1] == 'E') &&
|
||||||
|
isdigit(line[n + 1]) && isdigit(line[n - 2]))
|
||||||
|
{
|
||||||
|
n++;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* '-' may function as a unary operator and snuggle
|
/* '-' may function as a unary operator and snuggle
|
||||||
|
Loading…
Reference in New Issue
Block a user