diff --git a/src/viewer/actions_cmd.c b/src/viewer/actions_cmd.c index e6baa020d..51e65e576 100644 --- a/src/viewer/actions_cmd.c +++ b/src/viewer/actions_cmd.c @@ -3,7 +3,7 @@ Callback function for some actions (hotkeys, menu) Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007, 2009, 2011 + 2004, 2005, 2006, 2007, 2009, 2011, 2013 The Free Software Foundation, Inc. Written by: @@ -15,7 +15,7 @@ Pavel Machek, 1998 Roland Illig , 2004, 2005 Slava Zanko , 2009 - Andrew Borodin , 2009 + Andrew Borodin , 2009, 2013 Ilia Maslakov , 2009 This file is part of the Midnight Commander. @@ -69,7 +69,6 @@ #include "src/keybind-defaults.h" #include "internal.h" -#include "mcviewer.h" /*** global variables ****************************************************************************/ diff --git a/src/viewer/display.c b/src/viewer/display.c index 9c1611abf..dbdcee11c 100644 --- a/src/viewer/display.c +++ b/src/viewer/display.c @@ -3,7 +3,7 @@ Function for whow info on display Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007, 2009, 2011 + 2004, 2005, 2006, 2007, 2009, 2011, 2013 The Free Software Foundation, Inc. Written by: @@ -15,7 +15,7 @@ Pavel Machek, 1998 Roland Illig , 2004, 2005 Slava Zanko , 2009 - Andrew Borodin , 2009 + Andrew Borodin , 2009, 2013 Ilia Maslakov , 2009, 2010 This file is part of the Midnight Commander. @@ -52,7 +52,6 @@ #include "src/keybind-defaults.h" #include "internal.h" -#include "mcviewer.h" /*** global variables ****************************************************************************/ diff --git a/src/viewer/internal.h b/src/viewer/internal.h index 3a3d1a32f..dddc3acdf 100644 --- a/src/viewer/internal.h +++ b/src/viewer/internal.h @@ -14,6 +14,8 @@ #include "src/keybind-defaults.h" /* global_keymap_t */ #include "src/filemanager/dir.h" /* dir_list */ +#include "mcviewer.h" + /*** typedefs(not structures) and defined constants **********************************************/ typedef unsigned char byte; @@ -87,7 +89,7 @@ typedef struct struct mcview_nroff_struct; -typedef struct mcview_struct +struct mcview_struct { Widget widget; @@ -186,7 +188,7 @@ typedef struct mcview_struct * Pointer is used here as reference to WPanel::count */ int *dir_idx; /* Index of current file in dir structure. * Pointer is used here as reference to WPanel::count */ -} mcview_t; +}; typedef struct mcview_nroff_struct { diff --git a/src/viewer/lib.c b/src/viewer/lib.c index c99197faa..b1dc9f429 100644 --- a/src/viewer/lib.c +++ b/src/viewer/lib.c @@ -3,7 +3,7 @@ Common finctions (used from some other mcviewer functions) Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007, 2009, 2011 + 2004, 2005, 2006, 2007, 2009, 2011, 2013 The Free Software Foundation, Inc. Written by: @@ -15,7 +15,7 @@ Pavel Machek, 1998 Roland Illig , 2004, 2005 Slava Zanko , 2009 - Andrew Borodin , 2009 + Andrew Borodin , 2009, 2013 Ilia Maslakov , 2009 This file is part of the Midnight Commander. @@ -53,7 +53,6 @@ #endif #include "internal.h" -#include "mcviewer.h" /*** global variables ****************************************************************************/ diff --git a/src/viewer/mcviewer.c b/src/viewer/mcviewer.c index e84bbe1c2..bef2c8cdc 100644 --- a/src/viewer/mcviewer.c +++ b/src/viewer/mcviewer.c @@ -3,7 +3,7 @@ Interface functions Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007, 2009, 2011 + 2004, 2005, 2006, 2007, 2009, 2011, 2013 The Free Software Foundation, Inc. Written by: @@ -15,7 +15,7 @@ Pavel Machek, 1998 Roland Illig , 2004, 2005 Slava Zanko , 2009 - Andrew Borodin , 2009 + Andrew Borodin , 2009, 2013 Ilia Maslakov , 2009 This file is part of the Midnight Commander. @@ -50,7 +50,6 @@ #include "src/filemanager/midnight.h" /* the_menubar */ #include "internal.h" -#include "mcviewer.h" /*** global variables ****************************************************************************/ diff --git a/src/viewer/mcviewer.h b/src/viewer/mcviewer.h index d95171dcd..3d0b6100d 100644 --- a/src/viewer/mcviewer.h +++ b/src/viewer/mcviewer.h @@ -9,12 +9,13 @@ /*** typedefs(not structures) and defined constants **********************************************/ -struct mcview_struct; - /*** enums ***************************************************************************************/ /*** structures declarations (and typedefs of structures)*****************************************/ +struct mcview_struct; +typedef struct mcview_struct mcview_t; + /*** global variables defined in .c file *********************************************************/ extern int mcview_default_hex_mode; @@ -36,7 +37,7 @@ extern char *mcview_show_eof; /* Creates a new mcview_t object with the given properties. Caveat: the * origin is in y-x order, while the extent is in x-y order. */ -extern struct mcview_struct *mcview_new (int y, int x, int lines, int cols, gboolean is_panel); +extern mcview_t *mcview_new (int y, int x, int lines, int cols, gboolean is_panel); /* Shows {file} or the output of {command} in the internal viewer, @@ -44,7 +45,7 @@ extern struct mcview_struct *mcview_new (int y, int x, int lines, int cols, gboo */ extern gboolean mcview_viewer (const char *command, const vfs_path_t * file_vpath, int start_line); -extern gboolean mcview_load (struct mcview_struct *, const char *, const char *, int); +extern gboolean mcview_load (mcview_t * view, const char *command, const char *file, int start_line); /*** inline functions ****************************************************************************/ #endif /* MC__VIEWER_H */ diff --git a/src/viewer/plain.c b/src/viewer/plain.c index 5bf019d74..db9649599 100644 --- a/src/viewer/plain.c +++ b/src/viewer/plain.c @@ -3,7 +3,7 @@ Function for plain view Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007, 2009, 2011 + 2004, 2005, 2006, 2007, 2009, 2011, 2013 The Free Software Foundation, Inc. Written by: @@ -15,7 +15,7 @@ Pavel Machek, 1998 Roland Illig , 2004, 2005 Slava Zanko , 2009 - Andrew Borodin , 2009, 2010 + Andrew Borodin , 2009, 2010, 2013 Ilia Maslakov , 2009 This file is part of the Midnight Commander. @@ -47,7 +47,6 @@ #include "src/setup.h" /* option_tab_spacing */ #include "internal.h" -#include "mcviewer.h" /* mcview_show_eof */ /*** global variables ****************************************************************************/