Browse Source

Remove unneeded `struct` keyword for typedef'd structs

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Yury V. Zaytsev 9 years ago
parent
commit
a8f512c12c
10 changed files with 20 additions and 22 deletions
  1. 3 1
      lib/global.h
  2. 5 5
      lib/lock.c
  3. 1 1
      lib/utilunix.c
  4. 1 1
      lib/vfs/interface.c
  5. 3 3
      lib/vfs/vfs.c
  6. 1 1
      lib/widget/buttonbar.c
  7. 1 5
      lib/widget/buttonbar.h
  8. 2 2
      lib/widget/dialog-switch.h
  9. 1 1
      lib/widget/dialog.h
  10. 2 2
      lib/widget/history.c

+ 3 - 1
lib/global.h

@@ -163,6 +163,8 @@
 
 #define DEFAULT_CHARSET "ASCII"
 
+#include "lib/timer.h"          /* mc_timer_t */
+
 /*** enums ***************************************************************************************/
 
 /* run mode and params */
@@ -180,7 +182,7 @@ typedef struct
 {
     mc_run_mode_t mc_run_mode;
     /* global timer */
-    struct mc_timer_t *timer;
+    mc_timer_t *timer;
     /* Used so that widgets know if they are being destroyed or shut down */
     gboolean midnight_shutdown;
 

+ 5 - 5
lib/lock.c

@@ -69,11 +69,11 @@
 
 /*** file scope type declarations ****************************************************************/
 
-struct lock_s
+typedef struct
 {
     char *who;
     pid_t pid;
-};
+} lock_s;
 
 /*** file scope variables ************************************************************************/
 
@@ -135,13 +135,13 @@ lock_build_symlink_name (const vfs_path_t * fname_vpath)
  * Extract pid from user@host.domain.pid string
  */
 
-static struct lock_s *
+static lock_s *
 lock_extract_info (const char *str)
 {
     size_t i, len;
     const char *p, *s;
     static char pid[PID_BUF_SIZE], who[BUF_SIZE];
-    static struct lock_s lock;
+    static lock_s lock;
 
     len = strlen (str);
 
@@ -201,7 +201,7 @@ lock_file (const vfs_path_t * fname_vpath)
 {
     char *lockfname = NULL, *newlock, *msg;
     struct stat statbuf;
-    struct lock_s *lockinfo;
+    lock_s *lockinfo;
     gboolean is_local;
     gboolean symlink_ok = FALSE;
     const char *elpath;

+ 1 - 1
lib/utilunix.c

@@ -974,7 +974,7 @@ custom_canonicalize_pathname (char *path, CANON_PATH_FLAGS flags)
                     && strncmp (s - url_delim_len, VFS_PATH_URL_DELIMITER, url_delim_len) == 0)
                 {
                     char *vfs_prefix = s - url_delim_len;
-                    struct vfs_class *vclass;
+                    vfs_class *vclass;
 
                     while (vfs_prefix > lpath && !IS_PATH_SEP (*--vfs_prefix))
                         ;

+ 1 - 1
lib/vfs/interface.c

@@ -61,7 +61,7 @@
 
 /* TODO: move it to separate private .h */
 extern GString *vfs_str_buffer;
-extern struct vfs_class *current_vfs;
+extern vfs_class *current_vfs;
 extern struct dirent *mc_readdir_result;
 
 /*** global variables ****************************************************************************/

+ 3 - 3
lib/vfs/vfs.c

@@ -63,13 +63,13 @@
 extern struct dirent *mc_readdir_result;
 extern GPtrArray *vfs__classes_list;
 extern GString *vfs_str_buffer;
-extern struct vfs_class *current_vfs;
+extern vfs_class *current_vfs;
 
 /*** global variables ****************************************************************************/
 
 GPtrArray *vfs__classes_list = NULL;
 GString *vfs_str_buffer = NULL;
-struct vfs_class *current_vfs = NULL;
+vfs_class *current_vfs = NULL;
 
 /*** file scope macro definitions ****************************************************************/
 
@@ -86,7 +86,7 @@ struct vfs_class *current_vfs = NULL;
 struct vfs_openfile
 {
     int handle;
-    struct vfs_class *vclass;
+    vfs_class *vclass;
     void *fsinfo;
 };
 

+ 1 - 1
lib/widget/buttonbar.c

@@ -262,7 +262,7 @@ buttonbar_new (gboolean visible)
 
 void
 buttonbar_set_label (WButtonBar * bb, int idx, const char *text,
-                     const struct global_keymap_t *keymap, const Widget * receiver)
+                     const global_keymap_t * keymap, const Widget * receiver)
 {
     if ((bb != NULL) && (idx >= 1) && (idx <= BUTTONBAR_LABELS_NUM))
     {

+ 1 - 5
lib/widget/buttonbar.h

@@ -19,8 +19,6 @@
 
 /*** structures declarations (and typedefs of structures)*****************************************/
 
-struct global_keymap_t;
-
 typedef struct WButtonBar
 {
     Widget widget;
@@ -34,15 +32,13 @@ typedef struct WButtonBar
     } labels[BUTTONBAR_LABELS_NUM];
 } WButtonBar;
 
-struct global_keymap_t;
-
 /*** global variables defined in .c file *********************************************************/
 
 /*** declarations of public functions ************************************************************/
 
 WButtonBar *buttonbar_new (gboolean visible);
 void buttonbar_set_label (WButtonBar * bb, int idx, const char *text,
-                          const struct global_keymap_t *keymap, const Widget * receiver);
+                          const global_keymap_t * keymap, const Widget * receiver);
 WButtonBar *find_buttonbar (const WDialog * h);
 
 /*** inline functions ****************************************************************************/

+ 2 - 2
lib/widget/dialog-switch.h

@@ -16,8 +16,8 @@ extern WDialog *midnight_dlg;
 
 /*** declarations of public functions ************************************************************/
 
-void dialog_switch_add (struct WDialog *h);
-void dialog_switch_remove (struct WDialog *h);
+void dialog_switch_add (WDialog * h);
+void dialog_switch_remove (WDialog * h);
 size_t dialog_switch_num (void);
 
 void dialog_switch_next (void);

+ 1 - 1
lib/widget/dialog.h

@@ -189,7 +189,7 @@ void update_cursor (WDialog * h);
 /* --------------------------------------------------------------------------------------------- */
 
 static inline unsigned long
-dlg_get_current_widget_id (const struct WDialog *h)
+dlg_get_current_widget_id (const WDialog * h)
 {
     return WIDGET (h->current->data)->id;
 }

+ 2 - 2
lib/widget/history.c

@@ -165,7 +165,7 @@ history_get (const char *input_name)
  * Load history from the mc_config
  */
 GList *
-history_load (struct mc_config_t * cfg, const char *name)
+history_load (mc_config_t * cfg, const char *name)
 {
     size_t i;
     GList *hist = NULL;
@@ -228,7 +228,7 @@ history_load (struct mc_config_t * cfg, const char *name)
   * Save history to the mc_config, but don't save config to file
   */
 void
-history_save (struct mc_config_t *cfg, const char *name, GList * h)
+history_save (mc_config_t * cfg, const char *name, GList * h)
 {
     GIConv conv = INVALID_CONV;
     GString *buffer;

Some files were not shown because too many files changed in this diff