gnome-commander r2176 - branches/gcmd-1-3/src/intviewer



Author: epiotr
Date: Fri Oct 10 20:34:32 2008
New Revision: 2176
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=2176&view=rev

Log:
Code cleanup

Modified:
   branches/gcmd-1-3/src/intviewer/bm_byte.h
   branches/gcmd-1-3/src/intviewer/bm_chartype.h
   branches/gcmd-1-3/src/intviewer/datapresentation.cc
   branches/gcmd-1-3/src/intviewer/datapresentation.h
   branches/gcmd-1-3/src/intviewer/image-render.h
   branches/gcmd-1-3/src/intviewer/inputmodes.cc
   branches/gcmd-1-3/src/intviewer/inputmodes.h
   branches/gcmd-1-3/src/intviewer/scroll-box.cc
   branches/gcmd-1-3/src/intviewer/scroll-box.h
   branches/gcmd-1-3/src/intviewer/search-dlg.h
   branches/gcmd-1-3/src/intviewer/search-progress-dlg.cc
   branches/gcmd-1-3/src/intviewer/search-progress-dlg.h
   branches/gcmd-1-3/src/intviewer/searcher.cc
   branches/gcmd-1-3/src/intviewer/searcher.h
   branches/gcmd-1-3/src/intviewer/text-render.cc
   branches/gcmd-1-3/src/intviewer/text-render.h
   branches/gcmd-1-3/src/intviewer/viewer-widget.cc
   branches/gcmd-1-3/src/intviewer/viewer-widget.h

Modified: branches/gcmd-1-3/src/intviewer/bm_byte.h
==============================================================================
--- branches/gcmd-1-3/src/intviewer/bm_byte.h	(original)
+++ branches/gcmd-1-3/src/intviewer/bm_byte.h	Fri Oct 10 20:34:32 2008
@@ -28,9 +28,7 @@
 #include <glib.h>
 #include <glib-object.h>
 
-typedef struct _GVIEWER_BMBYTE_DATA GViewerBMByteData;
-
-struct _GVIEWER_BMBYTE_DATA
+struct GViewerBMByteData
 {
     /* good-suffix-shift array, one element for each (unique) character in the search pattern */
     int *good;

Modified: branches/gcmd-1-3/src/intviewer/bm_chartype.h
==============================================================================
--- branches/gcmd-1-3/src/intviewer/bm_chartype.h	(original)
+++ branches/gcmd-1-3/src/intviewer/bm_chartype.h	Fri Oct 10 20:34:32 2008
@@ -28,9 +28,7 @@
 #include <glib.h>
 #include <glib-object.h>
 
-typedef struct _GVIEWER_BM_CHARTYPE_DATA GViewerBMChartypeData;
-
-struct _GVIEWER_BM_CHARTYPE_DATA
+struct GViewerBMChartypeData
 {
     /* good-suffix-shift array, one element for each (unique) character in the search pattern */
     int *good;

Modified: branches/gcmd-1-3/src/intviewer/datapresentation.cc
==============================================================================
--- branches/gcmd-1-3/src/intviewer/datapresentation.cc	(original)
+++ branches/gcmd-1-3/src/intviewer/datapresentation.cc	Fri Oct 10 20:34:32 2008
@@ -44,7 +44,7 @@
 typedef offset_type (*scroll_lines_proc)(GVDataPresentation *dp, offset_type current_offset, int delta);
 typedef offset_type (*get_end_of_line_offset_proc)(GVDataPresentation *dp, offset_type start_of_line);
 
-struct _GVDataPresentation
+struct GVDataPresentation
 {
     GVInputModesData *imd;
     guint wrap_limit;

Modified: branches/gcmd-1-3/src/intviewer/datapresentation.h
==============================================================================
--- branches/gcmd-1-3/src/intviewer/datapresentation.h	(original)
+++ branches/gcmd-1-3/src/intviewer/datapresentation.h	Fri Oct 10 20:34:32 2008
@@ -25,17 +25,16 @@
 #ifndef __LIBGVIEWER_DATA_PRESENTATION_H__
 #define __LIBGVIEWER_DATA_PRESENTATION_H__
 
-typedef struct _GVDataPresentation GVDataPresentation;
+struct GVDataPresentation;
 
-typedef enum
+enum PRESENTATION
 {
     PRSNT_NO_WRAP,
     PRSNT_WRAP,
 
-    /* Here, BIN_FIXED is "fixed number of binary characters per line"
-       (e.g. CHAR=BYTE, no UTF-8 or other translations) */
+    // Here, BIN_FIXED is "fixed number of binary characters per line" (e.g. CHAR=BYTE, no UTF-8 or other translations)
     PRSNT_BIN_FIXED
-} PRESENTATION;
+};
 
 GVDataPresentation *gv_data_presentation_new();
 

Modified: branches/gcmd-1-3/src/intviewer/image-render.h
==============================================================================
--- branches/gcmd-1-3/src/intviewer/image-render.h	(original)
+++ branches/gcmd-1-3/src/intviewer/image-render.h	Fri Oct 10 20:34:32 2008
@@ -32,24 +32,22 @@
 #define IMAGE_RENDER_DEFAULT_WIDTH    (100)
 #define IMAGE_RENDER_DEFAULT_HEIGHT   (200)
 
-typedef struct _ImageRender           ImageRender;
-typedef struct _ImageRenderPrivate    ImageRenderPrivate;
-typedef struct _ImageRenderClass      ImageRenderClass;
-typedef struct _ImageRenderStatus     ImageRenderStatus;
+struct ImageRenderPrivate;
+struct ImageRenderStatus;
 
-struct _ImageRender
+struct ImageRender
 {
     GtkWidget widget;
     ImageRenderPrivate *priv;
 };
 
-struct _ImageRenderClass
+struct ImageRenderClass
 {
     GtkWidgetClass parent_class;
     void (*image_status_changed)  (ImageRender *obj, ImageRenderStatus *status);
 };
 
-struct _ImageRenderStatus
+struct ImageRenderStatus
 {
     gboolean best_fit;
     gdouble  scale_factor;
@@ -85,6 +83,6 @@
 void           image_render_set_scale_factor (ImageRender *obj, double scalefactor);
 double         image_render_get_scale_factor (ImageRender *obj);
 
-void           image_render_operation (ImageRender *obk, IMAGEOPERATION op);
+void           image_render_operation (ImageRender *obj, IMAGEOPERATION op);
 
 #endif /* __IMAGE_RENDER_H__ */

Modified: branches/gcmd-1-3/src/intviewer/inputmodes.cc
==============================================================================
--- branches/gcmd-1-3/src/intviewer/inputmodes.cc	(original)
+++ branches/gcmd-1-3/src/intviewer/inputmodes.cc	Fri Oct 10 20:34:32 2008
@@ -35,7 +35,7 @@
 using namespace std;
 
 
-struct _GVInputModesData
+struct GVInputModesData
 {
     gchar *input_mode_name;
 

Modified: branches/gcmd-1-3/src/intviewer/inputmodes.h
==============================================================================
--- branches/gcmd-1-3/src/intviewer/inputmodes.h	(original)
+++ branches/gcmd-1-3/src/intviewer/inputmodes.h	Fri Oct 10 20:34:32 2008
@@ -27,7 +27,7 @@
 
 #define is_displayable(c) (((c) >= 0x20) && ((c) < 0x7f))
 
-typedef struct _GVInputModesData GVInputModesData;
+struct GVInputModesData;
 
 /* input function types */
 typedef char_type (*input_get_char_proc)(GVInputModesData *imd, offset_type offset);

Modified: branches/gcmd-1-3/src/intviewer/scroll-box.cc
==============================================================================
--- branches/gcmd-1-3/src/intviewer/scroll-box.cc	(original)
+++ branches/gcmd-1-3/src/intviewer/scroll-box.cc	Fri Oct 10 20:34:32 2008
@@ -40,7 +40,7 @@
 static GtkTableClass *parent_class = NULL;
 
 // Class Private Data
-struct _ScrollBoxPrivate
+struct ScrollBoxPrivate
 {
     GtkWidget *hscroll;
     GtkWidget *vscroll;

Modified: branches/gcmd-1-3/src/intviewer/scroll-box.h
==============================================================================
--- branches/gcmd-1-3/src/intviewer/scroll-box.h	(original)
+++ branches/gcmd-1-3/src/intviewer/scroll-box.h	Fri Oct 10 20:34:32 2008
@@ -29,17 +29,15 @@
 #define SCROLL_BOX_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, scroll_box_get_type (), ScrollBoxClass)
 #define IS_SCROLL_BOX(obj)       GTK_CHECK_TYPE (obj, scroll_box_get_type ())
 
-typedef struct _ScrollBox           ScrollBox;
-typedef struct _ScrollBoxPrivate    ScrollBoxPrivate;
-typedef struct _ScrollBoxClass      ScrollBoxClass;
+struct ScrollBoxPrivate;
 
-struct _ScrollBox
+struct ScrollBox
 {
     GtkTable table;
     ScrollBoxPrivate *priv;
 };
 
-struct _ScrollBoxClass
+struct ScrollBoxClass
 {
     GtkTableClass parent_class;
 };

Modified: branches/gcmd-1-3/src/intviewer/search-dlg.h
==============================================================================
--- branches/gcmd-1-3/src/intviewer/search-dlg.h	(original)
+++ branches/gcmd-1-3/src/intviewer/search-dlg.h	Fri Oct 10 20:34:32 2008
@@ -29,23 +29,21 @@
 #define GVIEWER_SEARCH_DLG_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gviewer_search_dlg_get_type(), GViewerSearchDlgClass)
 #define IS_GVIEWER_SEARCH_DLG(obj)       GTK_CHECK_TYPE (obj, gviewer_search_dlg_get_type())
 
-typedef struct _GViewerSearchDlg        GViewerSearchDlg;
-typedef struct _GViewerSearchDlgPrivate GViewerSearchDlgPrivate;
-typedef struct _GViewerSearchDlgClass   GViewerSearchDlgClass;
-typedef struct _GViewerSearchDlgStatus  GViewerSearchDlgStatus;
+struct GViewerSearchDlgPrivate;
 
-typedef enum {
+enum SEARCHMODE
+{
     SEARCH_MODE_TEXT,
     SEARCH_MODE_HEX
-} SEARCHMODE;
+};
 
-struct _GViewerSearchDlg
+struct GViewerSearchDlg
 {
     GtkDialog dialog;
     GViewerSearchDlgPrivate *priv;
 };
 
-struct _GViewerSearchDlgClass
+struct GViewerSearchDlgClass
 {
     GtkDialogClass parent_class;
 };

Modified: branches/gcmd-1-3/src/intviewer/search-progress-dlg.cc
==============================================================================
--- branches/gcmd-1-3/src/intviewer/search-progress-dlg.cc	(original)
+++ branches/gcmd-1-3/src/intviewer/search-progress-dlg.cc	Fri Oct 10 20:34:32 2008
@@ -36,7 +36,7 @@
 static void search_progress_dlg_destroy (GtkObject *object);
 static void search_progress_dlg_action_response(GtkDialog *dlg, gint arg1, GViewerSearchProgressDlg *sdlg);
 
-struct _GViewerSearchProgressDlgPrivate
+struct GViewerSearchProgressDlgPrivate
 {
     GtkWidget *label, *progressbar;
     gdouble progress;

Modified: branches/gcmd-1-3/src/intviewer/search-progress-dlg.h
==============================================================================
--- branches/gcmd-1-3/src/intviewer/search-progress-dlg.h	(original)
+++ branches/gcmd-1-3/src/intviewer/search-progress-dlg.h	Fri Oct 10 20:34:32 2008
@@ -29,18 +29,15 @@
 #define GVIEWER_SEARCH_PROGRESS_DLG_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gviewer_search_progress_dlg_get_type(), GViewerSearchProgressDlgClass)
 #define IS_GVIEWER_SEARCH_PROGRESS_DLG(obj)       GTK_CHECK_TYPE (obj, gviewer_search_progress_dlg_get_type())
 
-typedef struct _GViewerSearchProgressDlg        GViewerSearchProgressDlg;
-typedef struct _GViewerSearchProgressDlgPrivate GViewerSearchProgressDlgPrivate;
-typedef struct _GViewerSearchProgressDlgClass   GViewerSearchProgressDlgClass;
-typedef struct _GViewerSearchProgressDlgStatus  GViewerSearchProgressDlgStatus;
+struct GViewerSearchProgressDlgPrivate;
 
-struct _GViewerSearchProgressDlg
+struct GViewerSearchProgressDlg
 {
     GtkDialog dialog;
     GViewerSearchProgressDlgPrivate *priv;
 };
 
-struct _GViewerSearchProgressDlgClass
+struct GViewerSearchProgressDlgClass
 {
     GtkDialogClass parent_class;
 };

Modified: branches/gcmd-1-3/src/intviewer/searcher.cc
==============================================================================
--- branches/gcmd-1-3/src/intviewer/searcher.cc	(original)
+++ branches/gcmd-1-3/src/intviewer/searcher.cc	Fri Oct 10 20:34:32 2008
@@ -42,7 +42,7 @@
     HEX
 };
 
-struct _GViewerSearcherPrivate
+struct GViewerSearcherPrivate
 {
     // gint-s for the indicator's atomic operations
     gint abort_indicator;

Modified: branches/gcmd-1-3/src/intviewer/searcher.h
==============================================================================
--- branches/gcmd-1-3/src/intviewer/searcher.h	(original)
+++ branches/gcmd-1-3/src/intviewer/searcher.h	Fri Oct 10 20:34:32 2008
@@ -35,17 +35,15 @@
 #define G_IS_VIEWERSEARCHER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_VIEWERSEARCHER))
 #define G_VIEWERSEARCHER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_VIEWERSEARCHER, GViewerSearcherClass))
 
-typedef struct _GViewerSearcher GViewerSearcher;
-typedef struct _GViewerSearcherPrivate GViewerSearcherPrivate;
-typedef struct _GViewerSearcherClass GViewerSearcherClass;
+struct GViewerSearcherPrivate;
 
-struct _GViewerSearcher
+struct GViewerSearcher
 {
     GObject parent;
     GViewerSearcherPrivate *priv;
 };
 
-struct _GViewerSearcherClass
+struct GViewerSearcherClass
 {
     GObjectClass parent_class;
     /* Add Signal Functions Here */

Modified: branches/gcmd-1-3/src/intviewer/text-render.cc
==============================================================================
--- branches/gcmd-1-3/src/intviewer/text-render.cc	(original)
+++ branches/gcmd-1-3/src/intviewer/text-render.cc	Fri Oct 10 20:34:32 2008
@@ -67,7 +67,7 @@
 
 
 // Class Private Data
-struct _TextRenderPrivate
+struct TextRenderPrivate
 {
     guint8 button; // The button pressed in "button_press_event"
 

Modified: branches/gcmd-1-3/src/intviewer/text-render.h
==============================================================================
--- branches/gcmd-1-3/src/intviewer/text-render.h	(original)
+++ branches/gcmd-1-3/src/intviewer/text-render.h	Fri Oct 10 20:34:32 2008
@@ -31,31 +31,31 @@
 
 #define TEXT_RENDER_DEFAULT_WIDTH   (100)
 #define TEXT_RENDER_DEFAULT_HEIGHT  (200)
-typedef struct _TextRender          TextRender;
-typedef struct _TextRenderPrivate   TextRenderPrivate;
-typedef struct _TextRenderClass     TextRenderClass;
-typedef struct _TextRenderStatus    TextRenderStatus;
 
-struct _TextRender
+struct TextRenderPrivate;
+struct TextRenderStatus;
+
+struct TextRender
 {
     GtkWidget widget;
     TextRenderPrivate *priv;
 };
 
-struct _TextRenderClass
+struct TextRenderClass
 {
     GtkWidgetClass parent_class;
 
     void (* text_status_changed)  (TextRender *obj, TextRenderStatus *status);
 };
 
-typedef enum {
+enum TEXTDISPLAYMODE
+{
     TR_DISP_MODE_TEXT,
     TR_DISP_MODE_BINARY,
     TR_DISP_MODE_HEXDUMP
-} TEXTDISPLAYMODE;
+};
 
-struct _TextRenderStatus
+struct TextRenderStatus
 {
     offset_type current_offset;
     offset_type size;

Modified: branches/gcmd-1-3/src/intviewer/viewer-widget.cc
==============================================================================
--- branches/gcmd-1-3/src/intviewer/viewer-widget.cc	(original)
+++ branches/gcmd-1-3/src/intviewer/viewer-widget.cc	Fri Oct 10 20:34:32 2008
@@ -55,7 +55,7 @@
 
 
 /* Class Private Data */
-struct _GViewerPrivate
+struct GViewerPrivate
 {
     GtkWidget         *tscrollbox;
     TextRender        *textr;

Modified: branches/gcmd-1-3/src/intviewer/viewer-widget.h
==============================================================================
--- branches/gcmd-1-3/src/intviewer/viewer-widget.h	(original)
+++ branches/gcmd-1-3/src/intviewer/viewer-widget.h	Fri Oct 10 20:34:32 2008
@@ -29,24 +29,23 @@
 #define GVIEWER_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gviewer_get_type (), GViewerClass)
 #define IS_GVIEWER(obj)       GTK_CHECK_TYPE (obj, gviewer_get_type ())
 
-typedef struct _GViewer         GViewer;
-typedef struct _GViewerPrivate  GViewerPrivate;
-typedef struct _GViewerClass    GViewerClass;
+struct GViewerPrivate;
 
-typedef enum {
+ enum VIEWERDISPLAYMODE
+{
     DISP_MODE_TEXT_FIXED,
     DISP_MODE_BINARY,
     DISP_MODE_HEXDUMP,
     DISP_MODE_IMAGE
-} VIEWERDISPLAYMODE;
+};
 
-struct _GViewer
+struct GViewer
 {
     GtkTable table;
     GViewerPrivate *priv;
 };
 
-struct _GViewerClass
+struct GViewerClass
 {
     GtkTableClass parent_class;
     void (*status_line_changed)  (GViewer *obj, const gchar *statusline);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]