mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-30 11:42:54 +03:00
* edit.h: Decentralize includes.
This commit is contained in:
parent
996886fcfd
commit
7969f851bb
@ -1,5 +1,7 @@
|
||||
2002-11-14 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* edit.h: Decentralize includes.
|
||||
|
||||
* editmenu.c (edit_user_menu_cmd): Move to ../src/cmd.c.
|
||||
|
||||
* edit.c (edit_delete_line): Don't remove and restore the
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifndef __EDIT_WIDGET_H
|
||||
#define __EDIT_WIDGET_H
|
||||
|
||||
#include "src/dlg.h" /* Widget */
|
||||
|
||||
struct macro {
|
||||
short command;
|
||||
short ch;
|
||||
@ -36,7 +38,7 @@ struct _book_mark {
|
||||
struct _book_mark *prev;
|
||||
};
|
||||
|
||||
struct editor_widget {
|
||||
typedef struct WEdit {
|
||||
Widget widget;
|
||||
#define from_here num_widget_lines
|
||||
int num_widget_lines;
|
||||
@ -118,9 +120,7 @@ struct editor_widget {
|
||||
int macro_i; /* -1 if not recording index to macro[] otherwise */
|
||||
int macro_depth; /* depth of the macro recursion */
|
||||
struct macro macro[MAX_MACRO_LENGTH];
|
||||
};
|
||||
|
||||
typedef struct editor_widget WEdit;
|
||||
} WEdit;
|
||||
|
||||
#define EDIT_DIR PATH_SEP_STR ".mc" PATH_SEP_STR "cedit"
|
||||
#define SYNTAX_FILE EDIT_DIR PATH_SEP_STR "Syntax"
|
||||
|
@ -23,6 +23,13 @@
|
||||
#include <config.h>
|
||||
#include "edit.h"
|
||||
|
||||
#include "src/cmd.h" /* view_other_cmd() */
|
||||
#include "src/user.h" /* user_menu_cmd() */
|
||||
#include "src/tty.h" /* keys */
|
||||
#include "src/main.h" /* edit_one_file */
|
||||
#include "src/key.h" /* SHIFT_PRESSED */
|
||||
#include "src/wtools.h" /* query_dialog() */
|
||||
|
||||
#include "src/charsets.h"
|
||||
#include "src/selcodepage.h"
|
||||
|
||||
|
26
edit/edit.h
26
edit/edit.h
@ -43,25 +43,8 @@
|
||||
#endif
|
||||
|
||||
#include "src/global.h"
|
||||
#include "src/tty.h"
|
||||
#include "src/main.h" /* for char *shell */
|
||||
#include "src/dlg.h"
|
||||
#include "src/widget.h"
|
||||
#include "src/color.h"
|
||||
#include "src/dialog.h"
|
||||
#include "src/mouse.h"
|
||||
#include "src/help.h"
|
||||
#include "src/key.h"
|
||||
#include "src/wtools.h" /* for QuickWidgets */
|
||||
#include "src/cmd.h" /* for menu_edit_cmd */
|
||||
#include "src/win.h"
|
||||
#include "vfs/vfs.h"
|
||||
#include "src/menu.h"
|
||||
#include "edit-widget.h"
|
||||
#include "src/user.h" /* for user_menu_cmd, must be after edit-widget.h */
|
||||
#include "edit-widget.h" /* WEdit */
|
||||
|
||||
# define WANT_WIDGETS
|
||||
|
||||
# define WIDGET_COMMAND (WIDGET_USER + 10)
|
||||
# define N_menus 5
|
||||
|
||||
@ -349,9 +332,12 @@ extern char *home_dir;
|
||||
or EDIT_KEY_EMULATION_EMACS
|
||||
*/
|
||||
extern int edit_key_emulation;
|
||||
|
||||
extern WEdit *wedit;
|
||||
extern Menu *EditMenuBar[];
|
||||
extern WMenu *edit_menubar;
|
||||
struct Menu;
|
||||
extern struct Menu *EditMenuBar[];
|
||||
struct WMenu;
|
||||
extern struct WMenu *edit_menubar;
|
||||
|
||||
extern int option_word_wrap_line_length;
|
||||
extern int option_typewriter_wrap;
|
||||
|
@ -29,6 +29,13 @@
|
||||
#include "edit.h"
|
||||
#include "editcmddef.h"
|
||||
|
||||
#include "src/color.h" /* dialog_colors */
|
||||
#include "src/tty.h" /* LINES */
|
||||
#include "src/widget.h" /* listbox_new() */
|
||||
#include "src/main.h" /* mc_home */
|
||||
#include "src/help.h" /* interactive_display() */
|
||||
#include "src/key.h" /* XCTRL */
|
||||
#include "src/wtools.h" /* message() */
|
||||
#include "src/charsets.h"
|
||||
|
||||
/* globals: */
|
||||
|
@ -25,6 +25,11 @@
|
||||
|
||||
#define MAX_LINE_LEN 1024
|
||||
|
||||
#include "src/color.h" /* EDITOR_NORMAL_COLOR */
|
||||
#include "src/tty.h" /* attrset() */
|
||||
#include "src/widget.h" /* redraw_labels() */
|
||||
#include "src/key.h" /* is_idle() */
|
||||
|
||||
#include "src/charsets.h"
|
||||
|
||||
/* Text styles */
|
||||
|
@ -21,8 +21,13 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "edit.h"
|
||||
#include "src/user.h"
|
||||
#include "src/wtools.h" /* query_dialog() */
|
||||
#include "src/menu.h" /* menu_entry */
|
||||
#include "src/tty.h" /* KEY_F */
|
||||
#include "src/key.h" /* XCTRL */
|
||||
#include "src/main.h" /* drop_menus */
|
||||
|
||||
#include "editcmddef.h"
|
||||
|
||||
@ -415,7 +420,7 @@ static menu_entry OptMenuEmacs[] =
|
||||
|
||||
#define menu_entries(x) sizeof(x)/sizeof(menu_entry)
|
||||
|
||||
Menu *EditMenuBar[N_menus];
|
||||
struct Menu *EditMenuBar[N_menus];
|
||||
|
||||
void edit_init_menu_normal (void)
|
||||
{
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include "edit.h"
|
||||
#include "src/wtools.h" /* QuickDialog */
|
||||
|
||||
#define OPT_DLG_H 15
|
||||
#define OPT_DLG_W 72
|
||||
|
@ -23,8 +23,13 @@
|
||||
#include <config.h>
|
||||
#include "edit.h"
|
||||
|
||||
#include "src/tty.h" /* LINES */
|
||||
#include "src/key.h" /* get_modifier() */
|
||||
#include "src/widget.h" /* redraw_labels() */
|
||||
#include "src/menu.h" /* menubar_new() */
|
||||
|
||||
WEdit *wedit;
|
||||
WMenu *edit_menubar;
|
||||
struct WMenu *edit_menubar;
|
||||
|
||||
int column_highlighting = 0;
|
||||
|
||||
|
@ -22,6 +22,9 @@
|
||||
|
||||
#include <config.h>
|
||||
#include "edit.h"
|
||||
#include "src/color.h" /* use_colors */
|
||||
#include "src/main.h" /* mc_home */
|
||||
#include "src/wtools.h" /* message() */
|
||||
|
||||
/* bytes */
|
||||
#define SYNTAX_MARKER_DENSITY 512
|
||||
|
Loading…
x
Reference in New Issue
Block a user