Skip to content

Commit 4aea03e

Browse files
committed
patch 8.1.2077: the ops.c file is too big
Problem: The ops.c file is too big. Solution: Move code for dealing with registers to a new file. (Yegappan Lakshmanan, closes #4982)
1 parent e0d749a commit 4aea03e

14 files changed

Lines changed: 5168 additions & 5195 deletions

Filelist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ SRC_ALL = \
100100
src/regexp_bt.c \
101101
src/regexp_nfa.c \
102102
src/regexp.h \
103+
src/register.c \
103104
src/scriptfile.c \
104105
src/screen.c \
105106
src/search.c \
@@ -244,6 +245,7 @@ SRC_ALL = \
244245
src/proto/profiler.pro \
245246
src/proto/quickfix.pro \
246247
src/proto/regexp.pro \
248+
src/proto/register.pro \
247249
src/proto/scriptfile.pro \
248250
src/proto/screen.pro \
249251
src/proto/search.pro \

src/Make_cyg_ming.mak

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,7 @@ OBJ = \
769769
$(OUTDIR)/profiler.o \
770770
$(OUTDIR)/quickfix.o \
771771
$(OUTDIR)/regexp.o \
772+
$(OUTDIR)/register.o \
772773
$(OUTDIR)/scriptfile.o \
773774
$(OUTDIR)/screen.o \
774775
$(OUTDIR)/search.o \
@@ -1186,6 +1187,9 @@ $(OUTDIR)/os_win32.o: os_win32.c $(INCL) $(MZSCHEME_INCL)
11861187
$(OUTDIR)/regexp.o: regexp.c regexp_bt.c regexp_nfa.c $(INCL)
11871188
$(CC) -c $(CFLAGS) regexp.c -o $@
11881189

1190+
$(OUTDIR)/register.o: register.c $(INCL)
1191+
$(CC) -c $(CFLAGS) register.c -o $@
1192+
11891193
$(OUTDIR)/terminal.o: terminal.c $(INCL) $(TERM_DEPS)
11901194
$(CC) -c $(CFLAGS) terminal.c -o $@
11911195

src/Make_morph.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ SRC = arabic.c \
8585
profiler.c \
8686
quickfix.c \
8787
regexp.c \
88+
register.c \
8889
scriptfile.c \
8990
screen.c \
9091
search.c \

src/Make_mvc.mak

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ OBJ = \
776776
$(OUTDIR)\profiler.obj \
777777
$(OUTDIR)\quickfix.obj \
778778
$(OUTDIR)\regexp.obj \
779+
$(OUTDIR)\register.obj \
779780
$(OUTDIR)\scriptfile.obj \
780781
$(OUTDIR)\screen.obj \
781782
$(OUTDIR)\search.obj \
@@ -1651,6 +1652,8 @@ $(OUTDIR)/quickfix.obj: $(OUTDIR) quickfix.c $(INCL)
16511652

16521653
$(OUTDIR)/regexp.obj: $(OUTDIR) regexp.c regexp_bt.c regexp_nfa.c $(INCL)
16531654

1655+
$(OUTDIR)/register.obj: $(OUTDIR) register.c $(INCL)
1656+
16541657
$(OUTDIR)/scriptfile.obj: $(OUTDIR) scriptfile.c $(INCL)
16551658

16561659
$(OUTDIR)/screen.obj: $(OUTDIR) screen.c $(INCL)
@@ -1840,6 +1843,7 @@ proto.h: \
18401843
proto/profiler.pro \
18411844
proto/quickfix.pro \
18421845
proto/regexp.pro \
1846+
proto/register.pro \
18431847
proto/scriptfile.pro \
18441848
proto/screen.pro \
18451849
proto/search.pro \

src/Make_vms.mms

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ SRC = arabic.c arglist.c autocmd.c beval.c blob.c blowfish.c buffer.c \
319319
memfile.c memline.c message.c misc1.c misc2.c mouse.c move.c normal.c \
320320
ops.c \
321321
option.c optionstr.c popupmnu.c popupwin.c profiler.c quickfix.c \
322-
regexp.c scriptfile.c \
322+
regexp.c register.c scriptfile.c \
323323
search.c session.c sha256.c sign.c spell.c spellfile.c syntax.c tag.c \
324324
term.c termlib.c testing.c textprop.c ui.c undo.c usercmd.c \
325325
userfunc.c version.c viminfo.c screen.c window.c os_unix.c os_vms.c \
@@ -340,7 +340,7 @@ OBJ = arabic.obj arglist.obj autocmd.obj beval.obj blob.obj blowfish.obj \
340340
misc1.obj misc2.obj mouse.obj move.obj mbyte.obj normal.obj ops.obj \
341341
option.obj \
342342
optionstr.obj popupmnu.obj popupwin.obj profiler.obj quickfix.obj \
343-
regexp.obj scriptfile.obj \
343+
regexp.obj register.obj scriptfile.obj \
344344
search.obj session.obj sha256.obj sign.obj spell.obj spellfile.obj \
345345
syntax.obj tag.obj term.obj termlib.obj testing.obj textprop.obj \
346346
ui.obj undo.obj usercmd.obj userfunc.obj screen.obj version.obj \
@@ -755,6 +755,10 @@ regexp.obj : regexp.c vim.h [.auto]config.h feature.h os_unix.h \
755755
ascii.h keymap.h term.h macros.h structs.h regexp.h \
756756
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
757757
globals.h
758+
register.obj : register.c vim.h [.auto]config.h feature.h os_unix.h \
759+
ascii.h keymap.h term.h macros.h structs.h regexp.h \
760+
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
761+
globals.h
758762
scriptfile.obj : scriptfile.c vim.h [.auto]config.h feature.h os_unix.h \
759763
ascii.h keymap.h term.h macros.h structs.h regexp.h \
760764
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \

src/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,6 +1644,7 @@ BASIC_SRC = \
16441644
pty.c \
16451645
quickfix.c \
16461646
regexp.c \
1647+
register.c \
16471648
scriptfile.c \
16481649
screen.c \
16491650
search.c \
@@ -1778,6 +1779,7 @@ OBJ_COMMON = \
17781779
objects/pty.o \
17791780
objects/quickfix.o \
17801781
objects/regexp.o \
1782+
objects/register.o \
17811783
objects/scriptfile.o \
17821784
objects/screen.o \
17831785
objects/search.o \
@@ -1937,6 +1939,7 @@ PRO_AUTO = \
19371939
pty.pro \
19381940
quickfix.pro \
19391941
regexp.pro \
1942+
register.pro \
19401943
scriptfile.pro \
19411944
screen.pro \
19421945
search.pro \
@@ -3353,6 +3356,9 @@ objects/quickfix.o: quickfix.c
33533356
objects/regexp.o: regexp.c regexp_bt.c regexp_nfa.c
33543357
$(CCC) -o $@ regexp.c
33553358

3359+
objects/register.o: register.c
3360+
$(CCC) -o $@ register.c
3361+
33563362
objects/scriptfile.o: scriptfile.c
33573363
$(CCC) -o $@ scriptfile.c
33583364

@@ -3835,6 +3841,10 @@ objects/regexp.o: regexp.c vim.h protodef.h auto/config.h feature.h os_unix.h \
38353841
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
38363842
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
38373843
proto.h globals.h regexp_bt.c regexp_nfa.c
3844+
objects/register.o: register.c vim.h protodef.h auto/config.h feature.h os_unix.h \
3845+
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
3846+
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
3847+
proto.h globals.h
38383848
objects/scriptfile.o: scriptfile.c vim.h protodef.h auto/config.h feature.h os_unix.h \
38393849
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
38403850
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \

src/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ popupwin.c | popup window
6363
profiler.c | vim script profiler
6464
quickfix.c | quickfix commands (":make", ":cn")
6565
regexp.c | pattern matching
66+
register.c | handling registers
6667
scriptfile.c | runtime directory handling and sourcing scripts
6768
screen.c | lower level screen functions
6869
search.c | pattern searching

0 commit comments

Comments
 (0)