Hello All,
        More random patches...

The first is to update exhibit to use the current etk API.  
        exhibit-etk-init-fix.patches
I find it crashes a little be less frequently at startup now ;-)

The second is to make the exhibit header files use C89 prototypes,
rather than K&R declarations for functions with no arguments.
        exhibit-welcome-to-c89.patches

This includes quite a few places where functions were called with
arguments, when they took none and other fun things.

There are still a lot of warnings when I compile, but most are coming
from ETK now.

        Regards,
        nash
Index: exhibit_image.h
===================================================================
RCS file: /var/cvs/e/e17/apps/exhibit/src/bin/exhibit_image.h,v
retrieving revision 1.15
diff -i -u -r1.15 exhibit_image.h
--- exhibit_image.h	28 Sep 2007 22:02:58 -0000	1.15
+++ exhibit_image.h	16 Oct 2007 05:43:01 -0000
@@ -17,15 +17,15 @@
 void          _ex_image_save(Etk_Image *im);
 void	      _ex_image_save_as_entry_cb(Etk_Object *object, Etk_Event_Key_Down *ev, void *data);
 int	      _ex_image_save_as_cb(void *data);
-Ex_Filedialog *_ex_image_file_dialog_new();
+Ex_Filedialog *_ex_image_file_dialog_new(void);
 void          _ex_image_file_dialog_destroy(Ex_Filedialog *fd);
 void	      _ex_image_move_entry_cb(Etk_Object *object, Etk_Event_Key_Down *ev, void *data);
 void	      _ex_image_move_cb(void *data);
-void          _ex_image_save_as();
+void          _ex_image_save_as(void);
 void	      _ex_image_delete(Exhibit *e);
-void	      _ex_image_move();
-void	      _ex_image_rename();
-void	      _ex_image_refresh();
+void	      _ex_image_move(void);
+void	      _ex_image_rename(void);
+void	      _ex_image_refresh(void);
 void          _ex_image_run(const char *app);
 void          _ex_image_zoom(Etk_Image *im, int zoom); 
 void          _ex_image_brightness(Etk_Image *im, int brightness);
Index: exhibit_main.c
===================================================================
RCS file: /var/cvs/e/e17/apps/exhibit/src/bin/exhibit_main.c,v
retrieving revision 1.128
diff -i -u -r1.128 exhibit_main.c
--- exhibit_main.c	28 Sep 2007 22:02:58 -0000	1.128
+++ exhibit_main.c	16 Oct 2007 05:43:03 -0000
@@ -624,7 +624,7 @@
 	
 	entry = etk_combobox_entry_entry_get(ETK_COMBOBOX_ENTRY(e->combobox_entry));
 	
-	_ex_slideshow_stop(e);
+	_ex_slideshow_stop();
 	_ex_thumb_abort();
         e->cur_tab->dir = _ex_path_normalize((char*)etk_entry_text_get(ETK_ENTRY(entry)));
         etk_tree_clear(ETK_TREE(e->cur_tab->itree));
@@ -642,7 +642,7 @@
    
    etk_combobox_entry_item_fields_get(etk_combobox_entry_active_item_get(ETK_COMBOBOX_ENTRY(e->combobox_entry)),
 				      &dir, NULL);   
-   _ex_slideshow_stop(e);
+   _ex_slideshow_stop();
    _ex_thumb_abort();
    e->cur_tab->dir = strdup(dir);
    etk_tree_clear(ETK_TREE(e->cur_tab->itree));
@@ -747,7 +747,7 @@
 }
 
 void
-_ex_main_window_slideshow_toggle()
+_ex_main_window_slideshow_toggle(void)
 {
    if (e->slideshow.active)     
      _ex_slideshow_stop();     
Index: exhibit_main.h
===================================================================
RCS file: /var/cvs/e/e17/apps/exhibit/src/bin/exhibit_main.h,v
retrieving revision 1.19
diff -i -u -r1.19 exhibit_main.h
--- exhibit_main.h	1 Jun 2007 10:19:06 -0000	1.19
+++ exhibit_main.h	16 Oct 2007 05:43:03 -0000
@@ -8,13 +8,13 @@
 void         _ex_main_populate_files(const char *selected_file, Ex_Tree_Update update);
 void         _ex_main_itree_add(const char *file, const char *selected_file);
 int          _ex_main_window_slideshow_next(void *data);
-void         _ex_main_window_slideshow_toggle();    
-void         _ex_main_window_fullscreen_toggle();    
+void         _ex_main_window_slideshow_toggle(void);    
+void         _ex_main_window_fullscreen_toggle(Exhibit *);    
 void         _ex_main_window_tab_append(Ex_Tab *tab);
 void         _ex_main_window_tab_remove(Ex_Tab *tab);
 void         _ex_main_dialog_show(char *text, Etk_Message_Dialog_Type type);
 void         _ex_main_window_show(char *dir, int fullscreen, int slideshow);
-void         _ex_main_image_unset();
+void         _ex_main_image_unset(void);
 void         _ex_main_image_set(Exhibit *e, char *image);
 void         _ex_main_button_fit_to_window_cb(Etk_Object *obj, void *data);
 void         _ex_main_button_zoom_one_to_one_cb(Etk_Object *obj, void *data);
Index: exhibit_menus.c
===================================================================
RCS file: /var/cvs/e/e17/apps/exhibit/src/bin/exhibit_menus.c,v
retrieving revision 1.51
diff -i -u -r1.51 exhibit_menus.c
--- exhibit_menus.c	2 Sep 2007 18:37:37 -0000	1.51
+++ exhibit_menus.c	16 Oct 2007 05:43:04 -0000
@@ -384,8 +384,8 @@
 {
    EX_MENU_ITEM_GET_RETURN(obj);
    
-   e = data;   
-   _ex_main_window_slideshow_toggle(e);
+   e = data;
+   _ex_main_window_slideshow_toggle();
 }
 
 void
Index: exhibit_options.c
===================================================================
RCS file: /var/cvs/e/e17/apps/exhibit/src/bin/exhibit_options.c,v
retrieving revision 1.27
diff -i -u -r1.27 exhibit_options.c
--- exhibit_options.c	12 Jul 2007 13:33:08 -0000	1.27
+++ exhibit_options.c	16 Oct 2007 05:43:05 -0000
@@ -42,15 +42,15 @@
 static void _ex_options_set_apply_cb(Etk_Object *object, void *data);
 static void _ex_options_set_ok_cb(Etk_Object *object, void *data);
 static Etk_Bool _ex_options_window_delete_cb(void *data);
-static void _ex_options_set();
-static Etk_Widget *_ex_options_page_1_create();
-static Etk_Widget *_ex_options_page_2_create();
+static void _ex_options_set(void);
+static Etk_Widget *_ex_options_page_1_create(void);
+static Etk_Widget *_ex_options_page_2_create(void);
 static void _ex_options_combobox_active_item_changed_cb(Etk_Object *object, void *data);
-static Etk_Widget *_ex_options_page_3_create();
-static Etk_Widget *_ex_options_page_4_create();
+static Etk_Widget *_ex_options_page_3_create(void);
+static Etk_Widget *_ex_options_page_4_create(void);
 
 int
-_ex_options_init()
+_ex_options_init(void)
 {
    char     *home;
    char      buf[PATH_MAX];
@@ -131,7 +131,7 @@
 }
 
 int
-_ex_options_shutdown()
+_ex_options_shutdown(void)
 {
    FREED(_ex_config_options_edd);
    FREED(_ex_config_version_edd);   
@@ -180,7 +180,7 @@
 }
 
 Ex_Options *
-_ex_options_new()
+_ex_options_new(void)
 {
    Ex_Options *o;
    
@@ -531,7 +531,7 @@
 }
 
 static Etk_Widget *
-_ex_options_page_1_create()
+_ex_options_page_1_create(void)
 {
    Etk_Widget *vbox, *hbox;
    Etk_Widget *vbox2;
@@ -606,7 +606,7 @@
 }
 
 static Etk_Widget *
-_ex_options_page_2_create()
+_ex_options_page_2_create(void)
 {
    Etk_Widget *vbox, *vbox2;
    Etk_Widget *label;
@@ -680,7 +680,7 @@
 }
 
 static Etk_Widget *
-_ex_options_page_3_create()
+_ex_options_page_3_create(void)
 {
    Etk_Widget *vbox, *vbox1, *hbox;
    Etk_Widget *vbox2;
@@ -764,7 +764,7 @@
 
 
 static Etk_Widget *
-_ex_options_page_4_create()
+_ex_options_page_4_create(void)
 {
    Etk_Widget *vbox, *vbox2;
    Etk_Widget *frame, *table;
@@ -842,7 +842,7 @@
 }
 
 void
-_ex_options_window_show()
+_ex_options_window_show(void)
 {
    Etk_Widget *win;
    Etk_Widget *vbox;
Index: exhibit_options.h
===================================================================
RCS file: /var/cvs/e/e17/apps/exhibit/src/bin/exhibit_options.h,v
retrieving revision 1.5
diff -i -u -r1.5 exhibit_options.h
--- exhibit_options.h	2 Sep 2006 01:43:23 -0000	1.5
+++ exhibit_options.h	16 Oct 2007 05:43:05 -0000
@@ -4,13 +4,13 @@
 #ifndef _EX_OPTIONS_H
 #define _EX_OPTIONS_H
 
-int             _ex_options_init();
-int             _ex_options_shutdown();
-Ex_Options     *_ex_options_new();
+int             _ex_options_init(void);
+int             _ex_options_shutdown(void);
+Ex_Options     *_ex_options_new(void);
 void            _ex_options_default(Exhibit *o);
 void            _ex_options_free(Exhibit *e);
 int             _ex_options_save(Exhibit *e);
 int             _ex_options_load(Exhibit *e);
-void            _ex_options_window_show();
+void            _ex_options_window_show(void);
 
 #endif
Index: exhibit_slideshow.c
===================================================================
RCS file: /var/cvs/e/e17/apps/exhibit/src/bin/exhibit_slideshow.c,v
retrieving revision 1.13
diff -i -u -r1.13 exhibit_slideshow.c
--- exhibit_slideshow.c	6 Jul 2007 20:29:50 -0000	1.13
+++ exhibit_slideshow.c	16 Oct 2007 05:43:05 -0000
@@ -4,7 +4,7 @@
 #include "exhibit.h"
 
 void
-_ex_slideshow_stop()
+_ex_slideshow_stop(void)
 {
    if(e->slideshow.active)
      {
@@ -15,7 +15,7 @@
 }
 
 void
-_ex_slideshow_start()
+_ex_slideshow_start(void)
 {
 	if (e->options->slide_interval)
 		e->slideshow.interval = e->options->slide_interval;
Index: exhibit_slideshow.h
===================================================================
RCS file: /var/cvs/e/e17/apps/exhibit/src/bin/exhibit_slideshow.h,v
retrieving revision 1.4
diff -i -u -r1.4 exhibit_slideshow.h
--- exhibit_slideshow.h	14 Dec 2006 12:07:46 -0000	1.4
+++ exhibit_slideshow.h	16 Oct 2007 05:43:05 -0000
@@ -4,8 +4,8 @@
 #ifndef _EX_SLIDESHOW_H
 #define _EX_SLIDESHOW_H
 
-void  _ex_slideshow_stop();
-void  _ex_slideshow_start();
+void  _ex_slideshow_stop(void);
+void  _ex_slideshow_start(void);
 int   _ex_slideshow_next(void *data);    
 int   _ex_slideshow_prev(void *data);    
 
Index: exhibit_tab.c
===================================================================
RCS file: /var/cvs/e/e17/apps/exhibit/src/bin/exhibit_tab.c,v
retrieving revision 1.43
diff -i -u -r1.43 exhibit_tab.c
--- exhibit_tab.c	10 Sep 2007 09:21:32 -0000	1.43
+++ exhibit_tab.c	16 Oct 2007 05:43:06 -0000
@@ -375,7 +375,7 @@
    char *path, *real_path;
 
    e = data;
-   _ex_slideshow_stop(e);
+   _ex_slideshow_stop();
    _ex_thumb_abort();
    
    tree = ETK_TREE(object);
Index: exhibit_tab.h
===================================================================
RCS file: /var/cvs/e/e17/apps/exhibit/src/bin/exhibit_tab.h,v
retrieving revision 1.7
diff -i -u -r1.7 exhibit_tab.h
--- exhibit_tab.h	10 Sep 2007 09:21:32 -0000	1.7
+++ exhibit_tab.h	16 Oct 2007 05:43:06 -0000
@@ -5,13 +5,13 @@
 #define _EX_TAB_H
 
 Ex_Tab *_ex_tab_new(Exhibit *e, char *dir);
-void    _ex_tab_delete();    
+void    _ex_tab_delete(void);    
 void    _ex_tab_select(Ex_Tab *tab);
 void    _ex_tab_current_zoom_in(Exhibit *e);
 void    _ex_tab_current_zoom_out(Exhibit *e);
 void    _ex_tab_current_zoom_one_to_one(Exhibit *e);
 void    _ex_tab_current_fit_to_window(Exhibit *e);
 Ex_Tab *_ex_tab_find_by_itree(Etk_Tree *itree);
-void    _ex_tab_imagelist_rebuild();
+void    _ex_tab_imagelist_rebuild(void);
 void    _ex_tab_imagelist_free(Ex_Tab *tab);
 #endif
Index: exhibit_thumb.c
===================================================================
RCS file: /var/cvs/e/e17/apps/exhibit/src/bin/exhibit_thumb.c,v
retrieving revision 1.17
diff -i -u -r1.17 exhibit_thumb.c
--- exhibit_thumb.c	2 Sep 2007 18:37:37 -0000	1.17
+++ exhibit_thumb.c	16 Oct 2007 05:43:06 -0000
@@ -125,7 +125,7 @@
 _ex_thumb_update_at_row(Etk_Tree_Row *row)
 {   
    Etk_Tree *tree;
-   Epsilon *ep;
+   Epsilon *ep = NULL;
    char file[PATH_MAX];
    char *icol_string;
    char *old_thumb;   
Index: exhibit_thumb.h
===================================================================
RCS file: /var/cvs/e/e17/apps/exhibit/src/bin/exhibit_thumb.h,v
retrieving revision 1.3
diff -i -u -r1.3 exhibit_thumb.h
--- exhibit_thumb.h	3 May 2007 10:30:41 -0000	1.3
+++ exhibit_thumb.h	16 Oct 2007 05:43:06 -0000
@@ -5,9 +5,9 @@
 #define _EX_THUMB_H
 
 int         _ex_thumb_exe_exit(void *data, int type, void *event);
-void        _ex_thumb_generate();
-void        _ex_thumb_abort();
-void        _ex_thumb_abort_all();
+void        _ex_thumb_generate(void);
+void        _ex_thumb_abort(void);
+void        _ex_thumb_abort_all(void);
 void        _ex_thumb_update_at_row(Etk_Tree_Row *row);
 
 #endif
Index: exhibit_main.c
===================================================================
RCS file: /var/cvs/e/e17/apps/exhibit/src/bin/exhibit_main.c,v
retrieving revision 1.128
diff -i -u -r1.128 exhibit_main.c
--- exhibit_main.c	28 Sep 2007 22:02:58 -0000	1.128
+++ exhibit_main.c	16 Oct 2007 05:43:03 -0000
@@ -1264,7 +1264,7 @@
 	  slideshow = 1;
      }
    
-   if (!etk_init(&argc, &argv))
+   if (!etk_init(argc, argv))
      {
 	fprintf(stderr, "Could not init etk. Exiting...\n");
 	return 0;

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to