patch 8.1.1318: code for text changes is in a "misc" file

Problem:    Code for text changes is in a "misc" file.
Solution:   Move the code to change.c.
This commit is contained in:
Bram Moolenaar 2019-05-11 18:36:34 +02:00
parent 3f86ca0faa
commit ec28d1516e
14 changed files with 44 additions and 2276 deletions

View File

@ -20,6 +20,7 @@ SRC_ALL = \
src/blob.c \
src/blowfish.c \
src/buffer.c \
src/change.c \
src/channel.c \
src/charset.c \
src/crypt.c \
@ -155,6 +156,7 @@ SRC_ALL = \
src/proto/blob.pro \
src/proto/blowfish.pro \
src/proto/buffer.pro \
src/proto/change.pro \
src/proto/channel.pro \
src/proto/charset.pro \
src/proto/crypt.pro \

View File

@ -705,6 +705,7 @@ OBJ = \
$(OUTDIR)/blob.o \
$(OUTDIR)/blowfish.o \
$(OUTDIR)/buffer.o \
$(OUTDIR)/change.o \
$(OUTDIR)/charset.o \
$(OUTDIR)/crypt.o \
$(OUTDIR)/crypt_zip.o \

View File

@ -30,6 +30,7 @@ SRC = \
autocmd.c \
blowfish.c \
buffer.c \
change.c \
charset.c \
crypt.c \
crypt_zip.c \
@ -92,6 +93,7 @@ OBJ = o/arabic.o \
o/autocmd.o \
o/blowfish.o \
o/buffer.o \
o/change.o \
o/charset.o \
o/crypt.o \
o/crypt_zip.o \
@ -177,6 +179,8 @@ o/blowfish.o: blowfish.c $(SYMS)
o/buffer.o: buffer.c $(SYMS)
o/change.o: change.c $(SYMS)
o/charset.o: charset.c $(SYMS)
o/crypt.o: crypt.c $(SYMS)

View File

@ -40,6 +40,7 @@ SRC = arabic.c \
autocmd.c \
blowfish.c \
buffer.c \
change.c \
charset.c \
crypt.c \
crypt_zip.c \
@ -104,6 +105,7 @@ OBJ = obj/arabic.o \
obj/autocmd.o \
obj/blowfish.o \
obj/buffer.o \
obj/change.o \
obj/charset.o \
obj/crypt.o \
obj/crypt_zip.o \
@ -166,6 +168,7 @@ PRO = proto/arabic.pro \
proto/autocmd.pro \
proto/blowfish.pro \
proto/buffer.pro \
proto/change.pro \
proto/charset.pro \
proto/crypt.pro \
proto/crypt_zip.pro \
@ -280,6 +283,9 @@ obj/blowfish.o: blowfish.c
obj/buffer.o: buffer.c
$(CCSYM) $@ buffer.c
obj/change.o: change.c
$(CCSYM) $@ change.c
obj/charset.o: charset.c
$(CCSYM) $@ charset.c

View File

@ -28,6 +28,7 @@ SRC = arabic.c \
autocmd.c \
blowfish.c \
buffer.c \
change.c \
charset.c \
crypt.c \
crypt_zip.c \

View File

@ -700,6 +700,7 @@ OBJ = \
$(OUTDIR)\blob.obj \
$(OUTDIR)\blowfish.obj \
$(OUTDIR)\buffer.obj \
$(OUTDIR)\change.obj \
$(OUTDIR)\charset.obj \
$(OUTDIR)\crypt.obj \
$(OUTDIR)\crypt_zip.obj \
@ -1410,6 +1411,8 @@ $(OUTDIR)/blowfish.obj: $(OUTDIR) blowfish.c $(INCL)
$(OUTDIR)/buffer.obj: $(OUTDIR) buffer.c $(INCL)
$(OUTDIR)/change.obj: $(OUTDIR) change.c $(INCL)
$(OUTDIR)/charset.obj: $(OUTDIR) charset.c $(INCL)
$(OUTDIR)/crypt.obj: $(OUTDIR) crypt.c $(INCL)
@ -1700,6 +1703,7 @@ proto.h: \
proto/blob.pro \
proto/blowfish.pro \
proto/buffer.pro \
proto/change.pro \
proto/charset.pro \
proto/crypt.pro \
proto/crypt_zip.pro \

View File

@ -93,6 +93,7 @@ SRC = \
autocmd.c \
blowfish.c \
buffer.c \
change.c \
charset.c \
crypt.c \
crypt_zip.c \
@ -156,6 +157,7 @@ OBJ = \
autocmd.o \
blowfish.o \
buffer.o \
change.o \
charset.o \
crypt.o \
crypt_zip.o \
@ -219,6 +221,7 @@ PRO = \
proto/autocmd.pro \
proto/blowfish.pro \
proto/buffer.pro \
proto/change.pro \
proto/charset.pro \
proto/crypt.pro \
proto/crypt_zip.pro \
@ -340,6 +343,8 @@ blowfish.o: blowfish.c
proto/blowfish.pro: blowfish.c
buffer.o: buffer.c
proto/buffer.pro: buffer.c
change.o: change.c
proto/change.pro: change.c
charset.o: charset.c
proto/charset.pro: charset.c
crypt.o: crypt.c

View File

@ -2,7 +2,7 @@
# Makefile for Vim on OpenVMS
#
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
# Last change: 2019 Apr 26
# Last change: 2019 May 11
#
# This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
# with MMS and MMK
@ -307,7 +307,7 @@ ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
$(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c charset.c \
SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c change.c, charset.c \
crypt.c crypt_zip.c debugger.c dict.c diff.c digraph.c edit.c eval.c \
evalfunc.c ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c \
if_cscope.c if_xcmdsrv.c fileio.c findfile.c fold.c getchar.c \
@ -320,7 +320,7 @@ SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c charset.c \
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
$(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)
OBJ = arabic.obj autocmd.obj beval.obj blob.obj blowfish.obj buffer.obj \
OBJ = arabic.obj autocmd.obj beval.obj blob.obj blowfish.obj buffer.obj change.obj \
charset.obj crypt.obj crypt_zip.obj debugger.obj dict.obj diff.obj \
digraph.obj edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj \
ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj if_xcmdsrv.obj \
@ -510,6 +510,10 @@ buffer.obj : buffer.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h version.h
change.obj : change.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h version.h
charset.obj : charset.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \

View File

@ -1576,6 +1576,7 @@ BASIC_SRC = \
blob.c \
blowfish.c \
buffer.c \
change.c \
charset.c \
crypt.c \
crypt_zip.c \
@ -1691,6 +1692,7 @@ OBJ_COMMON = \
objects/autocmd.o \
objects/beval.o \
objects/buffer.o \
objects/change.o \
objects/blob.o \
objects/blowfish.o \
objects/crypt.o \
@ -1821,6 +1823,7 @@ PRO_AUTO = \
autocmd.pro \
blowfish.pro \
buffer.pro \
change.pro \
charset.pro \
crypt.pro \
crypt_zip.pro \
@ -2965,6 +2968,9 @@ objects/blowfish.o: blowfish.c
objects/buffer.o: buffer.c
$(CCC) -o $@ buffer.c
objects/change.o: change.c
$(CCC) -o $@ change.c
objects/charset.o: charset.c
$(CCC) -o $@ charset.c
@ -3430,6 +3436,10 @@ objects/buffer.o: buffer.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h version.h
objects/change.o: change.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h version.h
objects/charset.o: charset.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \

View File

@ -25,6 +25,7 @@ File name | Description
--------- | -----------
autocmd.c | autocommands
buffer.c | manipulating buffers (loaded files)
change.c | handling changes to text
debugger.c | vim script debugger
diff.c | diff mode (vimdiff)
eval.c | expression evaluation

View File

@ -1637,7 +1637,7 @@ ml_recover(void)
* empty. Don't set the modified flag then. */
if (!(curbuf->b_ml.ml_line_count == 2 && *ml_get(1) == NUL))
{
changed_int();
changed_internal();
++CHANGEDTICK(curbuf);
}
}
@ -1651,7 +1651,7 @@ ml_recover(void)
vim_free(p);
if (i != 0)
{
changed_int();
changed_internal();
++CHANGEDTICK(curbuf);
break;
}

File diff suppressed because it is too large Load Diff

View File

@ -63,6 +63,7 @@ extern int _stricoll(char *a, char *b);
# endif
# include "autocmd.pro"
# include "buffer.pro"
# include "change.pro"
# include "charset.pro"
# ifdef FEAT_CSCOPE
# include "if_cscope.pro"

View File

@ -7,7 +7,6 @@ int get_indent_str_vtab(char_u *ptr, int ts, int *vts, int list);
int set_indent(int size, int flags);
int get_number_indent(linenr_T lnum);
int get_breakindent_win(win_T *wp, char_u *line);
int open_line(int dir, int flags, int second_line_indent);
int get_leader_len(char_u *line, char_u **flags, int backward, int include_space);
int get_last_leader_offset(char_u *line, char_u **flags);
int plines(linenr_T lnum);
@ -17,33 +16,12 @@ int plines_win_nofill(win_T *wp, linenr_T lnum, int winheight);
int plines_win_nofold(win_T *wp, linenr_T lnum);
int plines_win_col(win_T *wp, linenr_T lnum, long column);
int plines_m_win(win_T *wp, linenr_T first, linenr_T last);
void ins_bytes(char_u *p);
void ins_bytes_len(char_u *p, int len);
void ins_char(int c);
void ins_char_bytes(char_u *buf, int charlen);
void ins_str(char_u *s);
int del_char(int fixpos);
int del_chars(long count, int fixpos);
int del_bytes(long count, int fixpos_arg, int use_delcombine);
int truncate_line(int fixpos);
void del_lines(long nlines, int undo);
int gchar_pos(pos_T *pos);
int gchar_cursor(void);
void pchar_cursor(int c);
int inindent(int extra);
char_u *skip_to_option_part(char_u *p);
void changed(void);
void changed_int(void);
void changed_bytes(linenr_T lnum, colnr_T col);
void inserted_bytes(linenr_T lnum, colnr_T col, int added);
void appended_lines(linenr_T lnum, long count);
void appended_lines_mark(linenr_T lnum, long count);
void deleted_lines(linenr_T lnum, long count);
void deleted_lines_mark(linenr_T lnum, long count);
void changed_lines(linenr_T lnum, colnr_T col, linenr_T lnume, long xtra);
void unchanged(buf_T *buf, int ff);
void check_status(buf_T *buf);
void change_warning(int col);
int ask_yesno(char_u *str, int direct);
int is_mouse_key(int c);
int get_keystroke(void);