gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r16588 - in gnunet-gtk: . src/fs src/include src/lib src/pe


From: gnunet
Subject: [GNUnet-SVN] r16588 - in gnunet-gtk: . src/fs src/include src/lib src/peerinfo src/setup
Date: Tue, 16 Aug 2011 18:17:52 +0200

Author: grothoff
Date: 2011-08-16 18:17:52 +0200 (Tue, 16 Aug 2011)
New Revision: 16588

Modified:
   gnunet-gtk/.indent.pro
   gnunet-gtk/pre-commit
   gnunet-gtk/src/fs/gnunet-fs-gtk-common.h
   gnunet-gtk/src/fs/gnunet-fs-gtk-download.h
   gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.c
   gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.h
   gnunet-gtk/src/fs/gnunet-fs-gtk-event_handler.c
   gnunet-gtk/src/fs/gnunet-fs-gtk-event_handler.h
   gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c
   gnunet-gtk/src/fs/gnunet-fs-gtk.c
   gnunet-gtk/src/include/gnunet_gtk.h
   gnunet-gtk/src/lib/eventloop.c
   gnunet-gtk/src/peerinfo/peerinfo.h
   gnunet-gtk/src/setup/gnunet-setup-options.h
   gnunet-gtk/src/setup/gnunet-setup-transport-test.h
Log:
even nicer indentation, thanks to LRN's indent patch

Modified: gnunet-gtk/.indent.pro
===================================================================
--- gnunet-gtk/.indent.pro      2011-08-16 16:03:20 UTC (rev 16587)
+++ gnunet-gtk/.indent.pro      2011-08-16 16:17:52 UTC (rev 16588)
@@ -1,3 +1,5 @@
+//LRN extension for return values for prototypes
+-nddd
 //GNU (default) style:         
 //
 //-nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2

Modified: gnunet-gtk/pre-commit
===================================================================
--- gnunet-gtk/pre-commit       2011-08-16 16:03:20 UTC (rev 16587)
+++ gnunet-gtk/pre-commit       2011-08-16 16:17:52 UTC (rev 16588)
@@ -1,8 +1,8 @@
 #!/bin/sh
 find src/ -name "*.c" -exec indent {} \;
-find src/ -name "*.c" -exec indent {} \;
+find src/ -name "*.h" -exec indent {} \;
 if test -x "`which 'dos2unix'`"
 then
   find src/ -name "*.c" -exec dos2unix {} \;
-  find src/ -name "*.c" -exec dos2unix {} \;
+  find src/ -name "*.h" -exec dos2unix {} \;
 fi

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk-common.h
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk-common.h    2011-08-16 16:03:20 UTC (rev 
16587)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk-common.h    2011-08-16 16:17:52 UTC (rev 
16588)
@@ -38,7 +38,8 @@
  * @return NULL on error, otherwise the embedded thumbnail
  */
 GdkPixbuf *
-GNUNET_FS_GTK_get_thumbnail_from_meta_data (const struct 
GNUNET_CONTAINER_MetaData *meta);
+GNUNET_FS_GTK_get_thumbnail_from_meta_data (const struct
+                                            GNUNET_CONTAINER_MetaData *meta);
 
 
 /**
@@ -49,7 +50,7 @@
  * @param builder
  */
 void
-GNUNET_FS_GTK_setup_expiration_year_adjustment (GtkBuilder *builder);
+GNUNET_FS_GTK_setup_expiration_year_adjustment (GtkBuilder * builder);
 
 
 /**
@@ -59,8 +60,8 @@
  * @param spin button with the year
  * @param time converted from the spin button
  */
-struct GNUNET_TIME_Absolute 
-GNUNET_FS_GTK_get_expiration_time (GtkSpinButton *spin);
+struct GNUNET_TIME_Absolute
+GNUNET_FS_GTK_get_expiration_time (GtkSpinButton * spin);
 
 
 /**
@@ -73,8 +74,8 @@
  */
 void
 GNUNET_FS_GTK_mmap_and_scan (const char *filename,
-                            GNUNET_FS_DirectoryEntryProcessor dep,
-                            void *dep_cls);
+                             GNUNET_FS_DirectoryEntryProcessor dep,
+                             void *dep_cls);
 
 
 /**
@@ -92,15 +93,13 @@
  * @param data actual meta-data found
  * @param data_len number of bytes in data
  * @return 0 to continue (always)
- */ 
+ */
 int
-GNUNET_FS_GTK_add_meta_data_to_list_store (void *cls,
-                                          const char *plugin_name,
-                                          enum EXTRACTOR_MetaType type,
-                                          enum EXTRACTOR_MetaFormat format,
-                                          const char *data_mime_type,
-                                          const char *data,
-                                          size_t data_len);
+GNUNET_FS_GTK_add_meta_data_to_list_store (void *cls, const char *plugin_name,
+                                           enum EXTRACTOR_MetaType type,
+                                           enum EXTRACTOR_MetaFormat format,
+                                           const char *data_mime_type,
+                                           const char *data, size_t data_len);
 
 #endif
 /* end of gnunet-fs-gtk-common.h */

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk-download.h
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk-download.h  2011-08-16 16:03:20 UTC (rev 
16587)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk-download.h  2011-08-16 16:17:52 UTC (rev 
16588)
@@ -45,7 +45,7 @@
 
   /**
    * Mime type.
-   */ 
+   */
   char *mime;
 
   /**

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.c       2011-08-16 
16:03:20 UTC (rev 16587)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.c       2011-08-16 
16:17:52 UTC (rev 16588)
@@ -190,7 +190,9 @@
 }
 
 
-void 
GNUNET_GTK_edit_file_information_metadata_preview_file_chooser_button_file_set_cb
 (GtkFileChooserButton * widget, gpointer user_data)
+void
+GNUNET_GTK_edit_file_information_metadata_preview_file_chooser_button_file_set_cb
+    (GtkFileChooserButton * widget, gpointer user_data)
 {
   gchar *fn;
   GtkImage *image;

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.h
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.h       2011-08-16 
16:03:20 UTC (rev 16587)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk-edit_publish_dialog.h       2011-08-16 
16:17:52 UTC (rev 16588)
@@ -31,11 +31,9 @@
 
 
 void
-GNUNET_FS_GTK_edit_publish_dialog (int *do_index,
-                                  char **short_fn,
-                                  guint *anonymity_level,
-                                  guint *priority,
-                                  struct GNUNET_FS_FileInformation *fip);
+GNUNET_FS_GTK_edit_publish_dialog (int *do_index, char **short_fn,
+                                   guint * anonymity_level, guint * priority,
+                                   struct GNUNET_FS_FileInformation *fip);
 
 #endif
 /* end of gnunet-fs-gtk-edit_publish_dialog.h */

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk-event_handler.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk-event_handler.c     2011-08-16 16:03:20 UTC 
(rev 16587)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk-event_handler.c     2011-08-16 16:17:52 UTC 
(rev 16588)
@@ -1654,8 +1654,8 @@
     {
       ret =
           handle_publish_completed (ret,
-                                    info->value.publish.specifics.
-                                    resume.chk_uri);
+                                    info->value.publish.specifics.resume.
+                                    chk_uri);
     }
     return ret;
   case GNUNET_FS_STATUS_PUBLISH_SUSPEND:
@@ -1670,8 +1670,8 @@
                                  info->value.publish.specifics.error.message);
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     return handle_publish_completed (info->value.publish.cctx,
-                                     info->value.publish.specifics.
-                                     completed.chk_uri);
+                                     info->value.publish.specifics.completed.
+                                     chk_uri);
   case GNUNET_FS_STATUS_PUBLISH_STOPPED:
     close_publish_tab (info->value.publish.cctx);
     return NULL;
@@ -1705,12 +1705,12 @@
                                    info->value.download.size,
                                    info->value.download.completed,
                                    
info->value.download.specifics.progress.data,
-                                   info->value.download.specifics.
-                                   progress.offset,
-                                   info->value.download.specifics.
-                                   progress.data_len,
-                                   info->value.download.specifics.
-                                   progress.depth);
+                                   info->value.download.specifics.progress.
+                                   offset,
+                                   info->value.download.specifics.progress.
+                                   data_len,
+                                   info->value.download.specifics.progress.
+                                   depth);
   case GNUNET_FS_STATUS_DOWNLOAD_ERROR:
     return mark_download_error (info->value.download.cctx,
                                 info->value.download.specifics.error.message);
@@ -1747,19 +1747,19 @@
         process_search_result (info->value.search.cctx, 
info->value.search.pctx,
                                info->value.search.specifics.resume_result.uri,
                                info->value.search.specifics.resume_result.meta,
-                               info->value.search.specifics.
-                               resume_result.result,
-                               info->value.search.specifics.
-                               resume_result.applicability_rank);
+                               info->value.search.specifics.resume_result.
+                               result,
+                               info->value.search.specifics.resume_result.
+                               applicability_rank);
     return update_search_result (ret,
-                                 info->value.search.specifics.
-                                 resume_result.meta,
-                                 info->value.search.specifics.
-                                 resume_result.applicability_rank,
-                                 info->value.search.specifics.
-                                 resume_result.availability_certainty,
-                                 info->value.search.specifics.
-                                 resume_result.availability_rank);
+                                 info->value.search.specifics.resume_result.
+                                 meta,
+                                 info->value.search.specifics.resume_result.
+                                 applicability_rank,
+                                 info->value.search.specifics.resume_result.
+                                 availability_certainty,
+                                 info->value.search.specifics.resume_result.
+                                 availability_rank);
   case GNUNET_FS_STATUS_SEARCH_SUSPEND:
     close_search_tab (info->value.search.cctx);
     return NULL;
@@ -1769,20 +1769,20 @@
                                   info->value.search.specifics.result.uri,
                                   info->value.search.specifics.result.meta,
                                   info->value.search.specifics.result.result,
-                                  info->value.search.specifics.
-                                  result.applicability_rank);
+                                  info->value.search.specifics.result.
+                                  applicability_rank);
   case GNUNET_FS_STATUS_SEARCH_RESULT_NAMESPACE:
     GNUNET_break (0);
     break;
   case GNUNET_FS_STATUS_SEARCH_UPDATE:
     return update_search_result (info->value.search.specifics.update.cctx,
                                  info->value.search.specifics.update.meta,
-                                 info->value.search.specifics.
-                                 update.applicability_rank,
-                                 info->value.search.specifics.
-                                 update.availability_certainty,
-                                 info->value.search.specifics.
-                                 update.availability_rank);
+                                 info->value.search.specifics.update.
+                                 applicability_rank,
+                                 info->value.search.specifics.update.
+                                 availability_certainty,
+                                 info->value.search.specifics.update.
+                                 availability_rank);
   case GNUNET_FS_STATUS_SEARCH_ERROR:
     return handle_search_error (info->value.search.cctx,
                                 info->value.search.specifics.error.message);

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk-event_handler.h
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk-event_handler.h     2011-08-16 16:03:20 UTC 
(rev 16587)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk-event_handler.h     2011-08-16 16:17:52 UTC 
(rev 16588)
@@ -120,7 +120,7 @@
    * Tree store where we are stored.
    */
   GtkTreeStore *ts;
-  
+
   /**
    * Tab where this download is currently on display.
    */
@@ -147,10 +147,9 @@
  * @return NULL on error, otherwise search tab with the new entry
  */
 struct SearchTab *
-GNUNET_GTK_add_to_uri_tab (GtkTreeIter *iter,
-                          struct SearchResult **sr,
-                          const struct GNUNET_CONTAINER_MetaData *meta,
-                          const struct GNUNET_FS_Uri *uri);
+GNUNET_GTK_add_to_uri_tab (GtkTreeIter * iter, struct SearchResult **sr,
+                           const struct GNUNET_CONTAINER_MetaData *meta,
+                           const struct GNUNET_FS_Uri *uri);
 
 
 
@@ -167,13 +166,12 @@
  * @return entry for the search result
  */
 struct SearchResult *
-GNUNET_GTK_add_search_result (struct SearchTab *tab,
-                             GtkTreeIter *iter,
-                             GtkTreeRowReference *parent_rr,
-                             const struct GNUNET_FS_Uri *uri,
-                             const struct GNUNET_CONTAINER_MetaData *meta,
-                             struct GNUNET_FS_SearchResult *result,
-                             uint32_t applicability_rank);
+GNUNET_GTK_add_search_result (struct SearchTab *tab, GtkTreeIter * iter,
+                              GtkTreeRowReference * parent_rr,
+                              const struct GNUNET_FS_Uri *uri,
+                              const struct GNUNET_CONTAINER_MetaData *meta,
+                              struct GNUNET_FS_SearchResult *result,
+                              uint32_t applicability_rank);
 
 
 /**
@@ -191,8 +189,9 @@
  *         will be passed to future callbacks in the respective
  *         field in the GNUNET_FS_ProgressInfo struct.
  */
-void* GNUNET_GTK_fs_event_handler (void *cls,
-                                  const struct GNUNET_FS_ProgressInfo *info);
+void *
+GNUNET_GTK_fs_event_handler (void *cls,
+                             const struct GNUNET_FS_ProgressInfo *info);
 
 
 /* end of gnunet-fs-gtk-event_handler.h */

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c 2011-08-16 
16:03:20 UTC (rev 16587)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c 2011-08-16 
16:17:52 UTC (rev 16588)
@@ -237,7 +237,9 @@
 }
 
 
-void 
GNUNET_GTK_advertise_pseudonym_metadata_preview_file_chooser_button_file_set_cb 
()
+void
+GNUNET_GTK_advertise_pseudonym_metadata_preview_file_chooser_button_file_set_cb
+    ()
 {
   GNUNET_break (0);
 }

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk.c   2011-08-16 16:03:20 UTC (rev 16587)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk.c   2011-08-16 16:17:52 UTC (rev 16588)
@@ -124,8 +124,8 @@
 /**
  * Search selected in 'file' menu. (from main_window_file_search.c)
  */
-void GNUNET_GTK_main_menu_file_search_activate_cb (GtkWidget * dummy,
-                                                   gpointer data);
+void
+GNUNET_GTK_main_menu_file_search_activate_cb (GtkWidget * dummy, gpointer 
data);
 
 
 /**

Modified: gnunet-gtk/src/include/gnunet_gtk.h
===================================================================
--- gnunet-gtk/src/include/gnunet_gtk.h 2011-08-16 16:03:20 UTC (rev 16587)
+++ gnunet-gtk/src/include/gnunet_gtk.h 2011-08-16 16:17:52 UTC (rev 16588)
@@ -96,8 +96,7 @@
  * @param dialogname name of the about dialog in the file
  */
 void
-GNUNET_GTK_display_about (const char *dialogfile,
-                         const char *dialogname);
+GNUNET_GTK_display_about (const char *dialogfile, const char *dialogname);
 
 
 
@@ -109,15 +108,14 @@
  * @param tooltip tooltip for the tray icon
  */
 void
-GNUNET_GTK_tray_icon_create (GtkWindow *main,
-                            const char *icon_name,
-                            const char *tooltip);
+GNUNET_GTK_tray_icon_create (GtkWindow * main, const char *icon_name,
+                             const char *tooltip);
 
 
 /**
  * Destroy the tray icon.
  */
-void 
+void
 GNUNET_GTK_tray_icon_destroy (void);
 
 
@@ -142,13 +140,11 @@
  * @return GNUNET_OK on success, GNUNET_SYSERR on error (i.e. bad command-line 
options, etc)
  */
 int
-GNUNET_GTK_main_loop_start (const char *binary_name,
-                           const char *binary_help,
-                           int argc,
-                           char *const*argv,
-                           struct GNUNET_GETOPT_CommandLineOption *options,
-                           const char *main_window_file,
-                           GNUNET_SCHEDULER_Task main_task);
+GNUNET_GTK_main_loop_start (const char *binary_name, const char *binary_help,
+                            int argc, char *const *argv,
+                            struct GNUNET_GETOPT_CommandLineOption *options,
+                            const char *main_window_file,
+                            GNUNET_SCHEDULER_Task main_task);
 
 /**
  * Get an object from the main window.
@@ -159,7 +155,7 @@
  */
 GObject *
 GNUNET_GTK_main_loop_get_object (struct GNUNET_GTK_MainLoop *ml,
-                                const char *name);
+                                 const char *name);
 
 
 
@@ -180,8 +176,8 @@
  */
 void
 GNUNET_GTK_main_loop_quit (struct GNUNET_GTK_MainLoop *ml);
-                   
 
 
+
 #endif
 /* end of gnunet_gtk.h */

Modified: gnunet-gtk/src/lib/eventloop.c
===================================================================
--- gnunet-gtk/src/lib/eventloop.c      2011-08-16 16:03:20 UTC (rev 16587)
+++ gnunet-gtk/src/lib/eventloop.c      2011-08-16 16:17:52 UTC (rev 16588)
@@ -361,8 +361,9 @@
     int need_nfds =
         (rfds->sds.fd_count + rfds->sds.fd_count + rfds->sds.fd_count >
          0 ? 3 : 0) + (rfds ==
-                       NULL ? 0 : GNUNET_CONTAINER_slist_count (rfds->handles))
-        + (wfds == NULL ? 0 : 1) + 1;
+                       NULL ? 0 : GNUNET_CONTAINER_slist_count (rfds->
+                                                                handles)) +
+        (wfds == NULL ? 0 : 1) + 1;
     if (need_nfds >= ml->cached_poll_array_size)
       resize_cached_poll_array (ml, need_nfds * 2);
     /* Since there are also gmainloop's own fds, just need_nfds won't be
@@ -616,8 +617,8 @@
         (set |=
          (FD_ISSET (ml->cached_poll_array[i].fd, &aread) &&
           (0 !=
-           (ml->
-            cached_poll_array[i].revents & (G_IO_IN | G_IO_HUP | G_IO_ERR))))))
+           (ml->cached_poll_array[i].
+            revents & (G_IO_IN | G_IO_HUP | G_IO_ERR))))))
       GNUNET_NETWORK_fdset_set_native (rfds, ml->cached_poll_array[i].fd);
     if ((NULL != wfds) &&
         (set |=

Modified: gnunet-gtk/src/peerinfo/peerinfo.h
===================================================================
--- gnunet-gtk/src/peerinfo/peerinfo.h  2011-08-16 16:03:20 UTC (rev 16587)
+++ gnunet-gtk/src/peerinfo/peerinfo.h  2011-08-16 16:17:52 UTC (rev 16588)
@@ -39,9 +39,9 @@
  */
 void
 GNUNET_GTK_peerinfo_processor (void *cls,
-                              const struct GNUNET_PeerIdentity * peer,
-                              const struct GNUNET_HELLO_Message * hello,
-                              const char * err_msg);
+                               const struct GNUNET_PeerIdentity *peer,
+                               const struct GNUNET_HELLO_Message *hello,
+                               const char *err_msg);
 
 /* end of peerinfo.h */
 #endif

Modified: gnunet-gtk/src/setup/gnunet-setup-options.h
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup-options.h 2011-08-16 16:03:20 UTC (rev 
16587)
+++ gnunet-gtk/src/setup/gnunet-setup-options.h 2011-08-16 16:17:52 UTC (rev 
16588)
@@ -40,12 +40,11 @@
  * @param cfg configuration handle
  * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem
  */
-typedef int (*GNUNET_SETUP_LoadFunction)(const void *cls,
-                                        const char *section,
-                                        const char *option,
-                                        const char *value,
-                                        GObject *widget,
-                                        const struct 
GNUNET_CONFIGURATION_Handle *cfg);
+typedef int (*GNUNET_SETUP_LoadFunction) (const void *cls, const char *section,
+                                          const char *option, const char 
*value,
+                                          GObject * widget,
+                                          const struct
+                                          GNUNET_CONFIGURATION_Handle * cfg);
 
 
 /**
@@ -59,11 +58,10 @@
  * @param cfg configuration handle to update
  * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem
  */
-typedef int (*GNUNET_SETUP_SaveFunction)(const void *cls,
-                                        const char *section,
-                                        const char *option,
-                                        GObject *widget,
-                                        struct GNUNET_CONFIGURATION_Handle 
*cfg);
+typedef int (*GNUNET_SETUP_SaveFunction) (const void *cls, const char *section,
+                                          const char *option, GObject * widget,
+                                          struct GNUNET_CONFIGURATION_Handle *
+                                          cfg);
 
 
 /**
@@ -87,7 +85,7 @@
   /**
    * If the option value matchis this regex, the widget should be
    * hidden.  If NULL, the "show_value" controls visibility.
-   */  
+   */
   const char *hide_value;
 
 };

Modified: gnunet-gtk/src/setup/gnunet-setup-transport-test.h
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup-transport-test.h  2011-08-16 16:03:20 UTC 
(rev 16587)
+++ gnunet-gtk/src/setup/gnunet-setup-transport-test.h  2011-08-16 16:17:52 UTC 
(rev 16588)
@@ -36,9 +36,8 @@
  * @param failure_image image to show on failure
  */
 void
-GNUNET_setup_transport_test (const char *section_name,
-                            int is_tcp,
-                            const char *success_image,
-                            const char *failure_image);
+GNUNET_setup_transport_test (const char *section_name, int is_tcp,
+                             const char *success_image,
+                             const char *failure_image);
 
 #endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]