Ticket #2968: mcviewer: broken Raw/Parse and Format/UnformatRaw/Parse and Format/Unformat

...after CK_FileNext/CK_FilePrev.

Initial commit: refactoring of mcview_t typedef.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2013-03-24 13:37:11 +04:00
parent 68d5b0d610
commit 4495957319
7 changed files with 19 additions and 21 deletions

View File

@ -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 <roland.illig@gmx.de>, 2004, 2005
Slava Zanko <slavazanko@google.com>, 2009
Andrew Borodin <aborodin@vmail.ru>, 2009
Andrew Borodin <aborodin@vmail.ru>, 2009, 2013
Ilia Maslakov <il.smind@gmail.com>, 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 ****************************************************************************/

View File

@ -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 <roland.illig@gmx.de>, 2004, 2005
Slava Zanko <slavazanko@google.com>, 2009
Andrew Borodin <aborodin@vmail.ru>, 2009
Andrew Borodin <aborodin@vmail.ru>, 2009, 2013
Ilia Maslakov <il.smind@gmail.com>, 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 ****************************************************************************/

View File

@ -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
{

View File

@ -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 <roland.illig@gmx.de>, 2004, 2005
Slava Zanko <slavazanko@google.com>, 2009
Andrew Borodin <aborodin@vmail.ru>, 2009
Andrew Borodin <aborodin@vmail.ru>, 2009, 2013
Ilia Maslakov <il.smind@gmail.com>, 2009
This file is part of the Midnight Commander.
@ -53,7 +53,6 @@
#endif
#include "internal.h"
#include "mcviewer.h"
/*** global variables ****************************************************************************/

View File

@ -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 <roland.illig@gmx.de>, 2004, 2005
Slava Zanko <slavazanko@google.com>, 2009
Andrew Borodin <aborodin@vmail.ru>, 2009
Andrew Borodin <aborodin@vmail.ru>, 2009, 2013
Ilia Maslakov <il.smind@gmail.com>, 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 ****************************************************************************/

View File

@ -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 */

View File

@ -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 <roland.illig@gmx.de>, 2004, 2005
Slava Zanko <slavazanko@google.com>, 2009
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010
Andrew Borodin <aborodin@vmail.ru>, 2009, 2010, 2013
Ilia Maslakov <il.smind@gmail.com>, 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 ****************************************************************************/