From 4495957319bf14735e95841e37e9abb5559b2457 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 24 Mar 2013 13:37:11 +0400 Subject: [PATCH 1/5] 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 --- src/viewer/actions_cmd.c | 5 ++--- src/viewer/display.c | 5 ++--- src/viewer/internal.h | 6 ++++-- src/viewer/lib.c | 5 ++--- src/viewer/mcviewer.c | 5 ++--- src/viewer/mcviewer.h | 9 +++++---- src/viewer/plain.c | 5 ++--- 7 files changed, 19 insertions(+), 21 deletions(-) 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 ****************************************************************************/ From 5c01fea8887f2c3759bdb7690ad716ad1914d734 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 24 Mar 2013 13:54:39 +0400 Subject: [PATCH 2/5] (exec_extension_view): refactoring: remove temporary file in exec_extension(). Signed-off-by: Andrew Borodin --- src/filemanager/ext.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/filemanager/ext.c b/src/filemanager/ext.c index b022dcb79..6436dcf97 100644 --- a/src/filemanager/ext.c +++ b/src/filemanager/ext.c @@ -337,8 +337,7 @@ exec_make_shell_string (const char *lc_data, const vfs_path_t * filename_vpath) /* --------------------------------------------------------------------------------------------- */ static void -exec_extension_view (char *cmd, const vfs_path_t * filename_vpath, int start_line, - vfs_path_t * temp_file_name_vpath) +exec_extension_view (char *cmd, const vfs_path_t * filename_vpath, int start_line) { int def_hex_mode = mcview_default_hex_mode, changed_hex_mode = 0; int def_nroff_flag = mcview_default_nroff_flag, changed_nroff_flag = 0; @@ -350,16 +349,7 @@ exec_extension_view (char *cmd, const vfs_path_t * filename_vpath, int start_lin if (def_nroff_flag != mcview_default_nroff_flag) changed_nroff_flag = 1; - /* If we've written whitespace only, then just load filename - * into view - */ - if (written_nonspace) - { - mcview_viewer (cmd, filename_vpath, start_line); - mc_unlink (temp_file_name_vpath); - } - else - mcview_viewer (NULL, filename_vpath, start_line); + mcview_viewer (cmd, filename_vpath, start_line); if (changed_hex_mode && !mcview_altered_hex_mode) mcview_default_hex_mode = def_hex_mode; @@ -493,7 +483,16 @@ exec_extension (const vfs_path_t * filename_vpath, const char *lc_data, int star } if (run_view) - exec_extension_view (cmd, filename_vpath, start_line, temp_file_name_vpath); + { + /* If we've written whitespace only, then just load filename into view */ + if (!written_nonspace) + exec_extension_view (NULL, filename_vpath, start_line); + else + { + exec_extension_view (cmd, filename_vpath, start_line); + mc_unlink (temp_file_name_vpath); + } + } else { shell_execute (cmd, EXECUTE_INTERNAL); From bd8ad7e94b92c2fdc1e7f5c004f0c074cf101352 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Fri, 5 Apr 2013 19:15:31 +0400 Subject: [PATCH 3/5] (exec_extension): rename variable. --- src/filemanager/ext.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/filemanager/ext.c b/src/filemanager/ext.c index 6436dcf97..3e4614b70 100644 --- a/src/filemanager/ext.c +++ b/src/filemanager/ext.c @@ -391,7 +391,7 @@ static void exec_extension (const vfs_path_t * filename_vpath, const char *lc_data, int start_line) { char *shell_string, *export_variables; - vfs_path_t *temp_file_name_vpath = NULL; + vfs_path_t *script_vpath = NULL; int cmd_file_fd; FILE *cmd_file; char *cmd = NULL; @@ -426,7 +426,7 @@ exec_extension (const vfs_path_t * filename_vpath, const char *lc_data, int star * Sometimes it's not needed (e.g. for %cd and %view commands), * but it's easier to create it anyway. */ - cmd_file_fd = mc_mkstemps (&temp_file_name_vpath, "mcext", SCRIPT_SUFFIX); + cmd_file_fd = mc_mkstemps (&script_vpath, "mcext", SCRIPT_SUFFIX); if (cmd_file_fd == -1) { @@ -457,7 +457,7 @@ exec_extension (const vfs_path_t * filename_vpath, const char *lc_data, int star { char *file_name; - file_name = vfs_path_to_str (temp_file_name_vpath); + file_name = vfs_path_to_str (script_vpath); fprintf (cmd_file, "\n/bin/rm -f %s\n", file_name); g_free (file_name); } @@ -466,17 +466,17 @@ exec_extension (const vfs_path_t * filename_vpath, const char *lc_data, int star if ((run_view && !written_nonspace) || is_cd) { - mc_unlink (temp_file_name_vpath); - vfs_path_free (temp_file_name_vpath); - temp_file_name_vpath = NULL; + mc_unlink (script_vpath); + vfs_path_free (script_vpath); + script_vpath = NULL; } else { char *file_name; - file_name = vfs_path_to_str (temp_file_name_vpath); + file_name = vfs_path_to_str (script_vpath); /* Set executable flag on the command file ... */ - mc_chmod (temp_file_name_vpath, S_IRWXU); + mc_chmod (script_vpath, S_IRWXU); /* ... but don't rely on it - run /bin/sh explicitly */ cmd = g_strconcat ("/bin/sh ", file_name, (char *) NULL); g_free (file_name); @@ -490,7 +490,7 @@ exec_extension (const vfs_path_t * filename_vpath, const char *lc_data, int star else { exec_extension_view (cmd, filename_vpath, start_line); - mc_unlink (temp_file_name_vpath); + mc_unlink (script_vpath); } } else @@ -510,7 +510,7 @@ exec_extension (const vfs_path_t * filename_vpath, const char *lc_data, int star exec_cleanup_file_name (filename_vpath, TRUE); ret: - vfs_path_free (temp_file_name_vpath); + vfs_path_free (script_vpath); } /* --------------------------------------------------------------------------------------------- */ From 4d0f17e79a93e652ec3d55c614d9f224bc8b428d Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 24 Mar 2013 13:40:36 +0400 Subject: [PATCH 4/5] (regex_command_for): new function to use regex_command in already created viewer/editor ...and related changes. Signed-off-by: Andrew Borodin --- src/filemanager/ext.c | 52 +++++++++++++++++++++++++++++++------------ src/filemanager/ext.h | 10 ++++++++- 2 files changed, 47 insertions(+), 15 deletions(-) diff --git a/src/filemanager/ext.c b/src/filemanager/ext.c index 3e4614b70..c57f841a4 100644 --- a/src/filemanager/ext.c +++ b/src/filemanager/ext.c @@ -98,9 +98,22 @@ static gboolean is_cd = FALSE; static gboolean written_nonspace = FALSE; static gboolean do_local_copy = FALSE; +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ +static void +exec_cleanup_script (vfs_path_t * script_vpath) +{ + if (script_vpath != NULL) + { + (void) mc_unlink (script_vpath); + vfs_path_free (script_vpath); + } +} + +/* --------------------------------------------------------------------------------------------- */ + static void exec_cleanup_file_name (const vfs_path_t * filename_vpath, gboolean has_changed) { @@ -142,6 +155,7 @@ exec_get_file_name (const vfs_path_t * filename_vpath) } /* --------------------------------------------------------------------------------------------- */ + static char * exec_expand_format (char symbol, gboolean is_result_quoted) { @@ -337,11 +351,13 @@ exec_make_shell_string (const char *lc_data, const vfs_path_t * filename_vpath) /* --------------------------------------------------------------------------------------------- */ static void -exec_extension_view (char *cmd, const vfs_path_t * filename_vpath, int start_line) +exec_extension_view (void *target, char *cmd, const vfs_path_t * filename_vpath, int start_line) { int def_hex_mode = mcview_default_hex_mode, changed_hex_mode = 0; int def_nroff_flag = mcview_default_nroff_flag, changed_nroff_flag = 0; + (void) target; + mcview_altered_hex_mode = 0; mcview_altered_nroff_flag = 0; if (def_hex_mode != mcview_default_hex_mode) @@ -387,8 +403,8 @@ exec_extension_cd (void) /* --------------------------------------------------------------------------------------------- */ -static void -exec_extension (const vfs_path_t * filename_vpath, const char *lc_data, int start_line) +static vfs_path_t * +exec_extension (void *target, const vfs_path_t * filename_vpath, const char *lc_data, int start_line) { char *shell_string, *export_variables; vfs_path_t *script_vpath = NULL; @@ -396,7 +412,7 @@ exec_extension (const vfs_path_t * filename_vpath, const char *lc_data, int star FILE *cmd_file; char *cmd = NULL; - g_return_if_fail (lc_data != NULL); + g_return_val_if_fail (lc_data != NULL, NULL); pbuffer = NULL; localmtime = 0; @@ -466,8 +482,7 @@ exec_extension (const vfs_path_t * filename_vpath, const char *lc_data, int star if ((run_view && !written_nonspace) || is_cd) { - mc_unlink (script_vpath); - vfs_path_free (script_vpath); + exec_cleanup_script (script_vpath); script_vpath = NULL; } else @@ -486,12 +501,9 @@ exec_extension (const vfs_path_t * filename_vpath, const char *lc_data, int star { /* If we've written whitespace only, then just load filename into view */ if (!written_nonspace) - exec_extension_view (NULL, filename_vpath, start_line); + exec_extension_view (target, NULL, filename_vpath, start_line); else - { - exec_extension_view (cmd, filename_vpath, start_line); - mc_unlink (script_vpath); - } + exec_extension_view (target, cmd, filename_vpath, start_line); } else { @@ -510,7 +522,7 @@ exec_extension (const vfs_path_t * filename_vpath, const char *lc_data, int star exec_cleanup_file_name (filename_vpath, TRUE); ret: - vfs_path_free (script_vpath); + return script_vpath; } /* --------------------------------------------------------------------------------------------- */ @@ -755,6 +767,7 @@ flush_extension_file (void) /* --------------------------------------------------------------------------------------------- */ /** * The second argument is action, i.e. Open, View or Edit + * Use target object to open file in. * * This function returns: * @@ -767,7 +780,8 @@ flush_extension_file (void) */ int -regex_command (const vfs_path_t * filename_vpath, const char *action) +regex_command_for (void *target, const vfs_path_t * filename_vpath, const char *action, + vfs_path_t ** script_vpath) { char *filename, *p, *q, *r, c; size_t file_len; @@ -783,6 +797,9 @@ regex_command (const vfs_path_t * filename_vpath, const char *action) if (filename_vpath == NULL) return 0; + if (script_vpath != NULL) + *script_vpath = NULL; + /* Check for the special View:%d parameter */ if (strncmp (action, "View:", 5) == 0) { @@ -1021,7 +1038,14 @@ regex_command (const vfs_path_t * filename_vpath, const char *action) */ if (p < q) { - exec_extension (filename_vpath, r + 1, view_at_line_number); + vfs_path_t *sv; + + sv = exec_extension (target, filename_vpath, r + 1, view_at_line_number); + if (script_vpath != NULL) + *script_vpath = sv; + else + exec_cleanup_script (sv); + ret = 1; } break; diff --git a/src/filemanager/ext.h b/src/filemanager/ext.h index a4c470b52..771ca18d2 100644 --- a/src/filemanager/ext.h +++ b/src/filemanager/ext.h @@ -14,7 +14,8 @@ /*** declarations of public functions ************************************************************/ -int regex_command (const vfs_path_t * filename_vpath, const char *action); +int regex_command_for (void *target, const vfs_path_t * filename_vpath, const char *action, + vfs_path_t ** script_vpath); /* Call it after the user has edited the mc.ext file, * to flush the cached mc.ext file @@ -22,4 +23,11 @@ int regex_command (const vfs_path_t * filename_vpath, const char *action); void flush_extension_file (void); /*** inline functions ****************************************************************************/ + +static inline int +regex_command (const vfs_path_t * filename_vpath, const char *action) +{ + return regex_command_for (NULL, filename_vpath, action, NULL); +} + #endif /* MC__EXT_H */ From d70f6b5b63a247beb201d5451b8c90c18e2b5ba8 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 24 Mar 2013 16:14:33 +0400 Subject: [PATCH 5/5] Fix mode switch after CK_FileNext/CK_FilePrev. Signed-off-by: Andrew Borodin --- src/filemanager/ext.c | 13 ++++++++++--- src/viewer/actions_cmd.c | 33 ++++++++++++++++++++++++++++----- src/viewer/internal.h | 1 + 3 files changed, 39 insertions(+), 8 deletions(-) diff --git a/src/filemanager/ext.c b/src/filemanager/ext.c index c57f841a4..d8979102d 100644 --- a/src/filemanager/ext.c +++ b/src/filemanager/ext.c @@ -356,8 +356,6 @@ exec_extension_view (void *target, char *cmd, const vfs_path_t * filename_vpath, int def_hex_mode = mcview_default_hex_mode, changed_hex_mode = 0; int def_nroff_flag = mcview_default_nroff_flag, changed_nroff_flag = 0; - (void) target; - mcview_altered_hex_mode = 0; mcview_altered_nroff_flag = 0; if (def_hex_mode != mcview_default_hex_mode) @@ -365,7 +363,16 @@ exec_extension_view (void *target, char *cmd, const vfs_path_t * filename_vpath, if (def_nroff_flag != mcview_default_nroff_flag) changed_nroff_flag = 1; - mcview_viewer (cmd, filename_vpath, start_line); + if (target == NULL) + mcview_viewer (cmd, filename_vpath, start_line); + else + { + char *file_name; + + file_name = vfs_path_to_str (filename_vpath); + mcview_load ((mcview_t *) target, cmd, file_name, start_line); + g_free (file_name); + } if (changed_hex_mode && !mcview_altered_hex_mode) mcview_default_hex_mode = def_hex_mode; diff --git a/src/viewer/actions_cmd.c b/src/viewer/actions_cmd.c index 51e65e576..502454202 100644 --- a/src/viewer/actions_cmd.c +++ b/src/viewer/actions_cmd.c @@ -63,6 +63,7 @@ #include "src/filemanager/layout.h" #include "src/filemanager/cmd.h" #include "src/filemanager/midnight.h" /* current_panel */ +#include "src/filemanager/ext.h" /* regex_command_for() */ #include "src/history.h" #include "src/execute.h" @@ -78,9 +79,23 @@ /*** file scope variables ************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /*** file scope functions ************************************************************************/ /* --------------------------------------------------------------------------------------------- */ +static void +mcview_remove_ext_script (mcview_t * view) +{ + if (view->ext_script != NULL) + { + mc_unlink (view->ext_script); + vfs_path_free (view->ext_script); + view->ext_script = NULL; + } +} + +/* --------------------------------------------------------------------------------------------- */ + /* Both views */ static void mcview_search (mcview_t * view) @@ -320,7 +335,7 @@ mcview_load_next_prev (mcview_t * view, int direction) dir_list *dir; int *dir_count, *dir_idx; vfs_path_t *vfile; - char *file; + vfs_path_t *ext_script = NULL; mcview_load_next_prev_init (view); mcview_scan_for_file (view, direction); @@ -333,15 +348,22 @@ mcview_load_next_prev (mcview_t * view, int direction) view->dir_count = NULL; view->dir_idx = NULL; vfile = vfs_path_append_new (view->workdir_vpath, dir->list[*dir_idx].fname, (char *) NULL); - file = vfs_path_to_str (vfile); - vfs_path_free (vfile); mcview_done (view); + mcview_remove_ext_script (view); mcview_init (view); - mcview_load (view, NULL, file, 0); - g_free (file); + if (regex_command_for (view, vfile, "View", &ext_script) == 0) + { + char *file; + + file = vfs_path_to_str (vfile); + mcview_load (view, NULL, file, 0); + g_free (file); + } + vfs_path_free (vfile); view->dir = dir; view->dir_count = dir_count; view->dir_idx = dir_idx; + view->ext_script = ext_script; view->dpy_bbar_dirty = FALSE; /* FIXME */ view->dirty++; @@ -622,6 +644,7 @@ mcview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void * mcview_ok_to_quit (view); } mcview_done (view); + mcview_remove_ext_script (view); return MSG_HANDLED; default: diff --git a/src/viewer/internal.h b/src/viewer/internal.h index dddc3acdf..a94d8fd40 100644 --- a/src/viewer/internal.h +++ b/src/viewer/internal.h @@ -188,6 +188,7 @@ 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 */ + vfs_path_t *ext_script; /* Temporary script file created by regex_command_for() */ }; typedef struct mcview_nroff_struct