Commit 7e0ada84 authored by Jody Goldberg's avatar Jody Goldberg

This is even cleaner.

parent b1e93eff
......@@ -798,12 +798,10 @@ applix_read_view (ApplixReadState *state, char *name)
int row, height;
char *tmp;
tmp = ++ptr;
row = strtol (tmp, &ptr, 10) - 1;
row = strtol (tmp = ptr + 1, &ptr, 10) - 1;
if (tmp == ptr || row < 0 || *ptr != ':')
return applix_parse_error (state, "Invalid row size row number");
tmp = ++ptr;
height = strtol (tmp, &ptr, 10);
height = strtol (tmp = ptr + 1, &ptr, 10);
if (height >= 32768)
height -= 32768;
......@@ -825,12 +823,10 @@ applix_read_view (ApplixReadState *state, char *name)
int col, width;
char *tmp;
tmp = ++ptr;
col = parse_col_name (tmp, (char const **)&ptr);
col = parse_col_name (tmp = ptr + 1, (char const **)&ptr);
if (tmp == ptr || col < 0 || *ptr != ':')
return applix_parse_error (state, "Invalid column");
tmp = ++ptr;
width = strtol (tmp, &ptr, 10);
width = strtol (tmp = ptr + 1, &ptr, 10);
if (tmp == ptr || width <= 0)
return applix_parse_error (state, "Invalid column size");
......
......@@ -1193,16 +1193,13 @@ xml_not_used_old_array_spec (Cell *cell, char const *content)
rows = strtol (ptr = expr_end + 2, &end, 10);
if (end == ptr || *end != ',')
return TRUE;
ptr = ++end;
cols = strtol (ptr, &end, 10);
cols = strtol (ptr = end + 1, &end, 10);
if (end == ptr || end[0] != ')' || end[1] != '[')
return TRUE;
ptr = (end += 2);
row = strtol (ptr, &end, 10);
row = strtol (ptr = end + 2, &end, 10);
if (end == ptr || end[0] != ']' || end[1] != '[')
return TRUE;
ptr = (end += 2);
col = strtol (ptr, &end, 10);
col = strtol (ptr = end + 2, &end, 10);
if (end == ptr || end[0] != ']' || end[1] != '\0')
return TRUE;
......
......@@ -1193,16 +1193,13 @@ xml_not_used_old_array_spec (Cell *cell, char const *content)
rows = strtol (ptr = expr_end + 2, &end, 10);
if (end == ptr || *end != ',')
return TRUE;
ptr = ++end;
cols = strtol (ptr, &end, 10);
cols = strtol (ptr = end + 1, &end, 10);
if (end == ptr || end[0] != ')' || end[1] != '[')
return TRUE;
ptr = (end += 2);
row = strtol (ptr, &end, 10);
row = strtol (ptr = end + 2, &end, 10);
if (end == ptr || end[0] != ']' || end[1] != '[')
return TRUE;
ptr = (end += 2);
col = strtol (ptr, &end, 10);
col = strtol (ptr = end + 2, &end, 10);
if (end == ptr || end[0] != ']' || end[1] != '\0')
return TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment