summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormongo <andmarti@gmail.com>2023-06-01 10:17:33 -0300
committermongo <andmarti@gmail.com>2023-06-01 10:17:33 -0300
commit402742a7cab0b66a8916043624e4b53f8cc64690 (patch)
tree6d6528892dd3ac57b970afa54afe342066dde4b0
parentccad70412e28720e0e277c32cac5b140ed271916 (diff)
ansi C
-rw-r--r--src/sheet.c3
-rw-r--r--src/tui.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/sheet.c b/src/sheet.c
index f399623..6782d94 100644
--- a/src/sheet.c
+++ b/src/sheet.c
@@ -204,7 +204,8 @@ void delete_sheet(struct roman * roman, struct sheet * sh, int flg_free) {
// that could refer to this one by rebuilding the graph.
if (! flg_free) rebuild_graph();
- for (int row = 0; sh->tbl != NULL && row < sh->maxrows; row++) {
+ int row;
+ for (row = 0; sh->tbl != NULL && row < sh->maxrows; row++) {
if (sh->tbl[row] != NULL) {
free(sh->tbl[row]);
sh->tbl[row] = NULL;
diff --git a/src/tui.c b/src/tui.c
index eadbb9f..d66825b 100644
--- a/src/tui.c
+++ b/src/tui.c
@@ -1138,7 +1138,8 @@ void ui_show_celldetails() {
int il_pos = 0;
// show filenames
- for (struct roman * rom = session->first_doc; rom != NULL; rom = rom->next) {
+ struct roman * rom;
+ for (rom = session->first_doc; rom != NULL; rom = rom->next) {
#ifdef USECOLORS
ui_set_ucolor(input_win, &ucolors[FILENM], DEFAULT_COLOR);
#endif
@@ -1147,7 +1148,8 @@ void ui_show_celldetails() {
il_pos += strlen(file_name) + 1;
// show sheets
- for (struct sheet * sh = rom->first_sh; sh != NULL; sh = sh->next) {
+ struct sheet * sh;
+ for (sh = rom->first_sh; sh != NULL; sh = sh->next) {
if (sh == session->cur_doc->cur_sh) {
#ifdef USECOLORS
ui_set_ucolor(input_win, &ucolors[CURRENT_SHEET], DEFAULT_COLOR);