Shorten GPLv2 licence text in header of each source file
[emu8051.git] / src / gtk / memwin.c
index 56d728b..3a3780d 100644 (file)
@@ -4,19 +4,7 @@
  * Copyright (C) 1999 Jonathan St-AndrĂ©
  * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * This file is released under the GPLv2
  */
 
 #if HAVE_CONFIG_H
@@ -34,7 +22,7 @@
 #include "cpu8051.h"
 #include "regwin.h"
 #include "memwin.h"
-#include "emugtk.h"
+#include "main.h"
 #include "options.h"
 #include "app-config.h"
 
@@ -246,6 +234,8 @@ memwin_init(char *title, int memory_id)
        GtkWidget *scrollwin;
        GtkListStore *store;
 
+       log_debug("memwin_init");
+
        COL_ASCII = cfg->bytes_per_row + 1;
        N_COLUMNS = COL_ASCII + 1;
 
@@ -305,9 +295,8 @@ memwin_row_changed(int memory_id, int row, unsigned int address)
            (crc_new == memwin_infos->crc[row])) {
                row_changed = false;
        } else {
-               memwin_infos->crc_init = true;
                memwin_infos->crc[row] = crc_new;
-               log_debug("    Row %02d value(s) change", row);
+               log_debug("  Row %02d value(s) change", row);
                row_changed = true;
        }
 
@@ -322,6 +311,8 @@ memwin_refresh(int memory_id)
        unsigned int Address = 0;
        GtkListStore *store;
 
+       log_debug("memwin_refresh");
+
        memwin_infos_select(memory_id);
 
        store = GTK_LIST_STORE(gtk_tree_view_get_model(
@@ -346,7 +337,7 @@ memwin_refresh(int memory_id)
                }
 
                if (!valid) {
-                       printf("Invalid iter...\n");
+                       log_err("Tree model: invalid iter");
                        return;
                }
 
@@ -377,4 +368,7 @@ memwin_refresh(int memory_id)
                        gtk_list_store_set(store, &iter, COL_ASCII, ascii_str, -1);
                }
        }
+
+       /* At this point we know all rows crc have been initialized. */
+       memwin_infos->crc_init = true;
 }