Skip to content

Commit

Permalink
patch 8.1.2094: the fileio.c file is too big
Browse files Browse the repository at this point in the history
Problem:    The fileio.c file is too big.
Solution:   Move buf_write() to bufwrite.c. (Yegappan Lakshmanan,
            closes #4990)
  • Loading branch information
brammool authored and manuelschiller committed Nov 10, 2019
1 parent b0b1cc1 commit c079f0f
Show file tree
Hide file tree
Showing 15 changed files with 2,983 additions and 2,933 deletions.
2 changes: 2 additions & 0 deletions Filelist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ SRC_ALL = \
src/blob.c \
src/blowfish.c \
src/buffer.c \
src/bufwrite.c \
src/change.c \
src/channel.c \
src/charset.c \
Expand Down Expand Up @@ -186,6 +187,7 @@ SRC_ALL = \
src/proto/blob.pro \
src/proto/blowfish.pro \
src/proto/buffer.pro \
src/proto/bufwrite.pro \
src/proto/change.pro \
src/proto/channel.pro \
src/proto/charset.pro \
Expand Down
1 change: 1 addition & 0 deletions src/Make_cyg_ming.mak
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ OBJ = \
$(OUTDIR)/blob.o \
$(OUTDIR)/blowfish.o \
$(OUTDIR)/buffer.o \
$(OUTDIR)/bufwrite.o \
$(OUTDIR)/change.o \
$(OUTDIR)/charset.o \
$(OUTDIR)/cmdexpand.o \
Expand Down
1 change: 1 addition & 0 deletions src/Make_morph.mak
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ SRC = arabic.c \
autocmd.c \
blowfish.c \
buffer.c \
bufwrite.c \
change.c \
charset.c \
cmdexpand.c \
Expand Down
4 changes: 4 additions & 0 deletions src/Make_mvc.mak
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@ OBJ = \
$(OUTDIR)\blob.obj \
$(OUTDIR)\blowfish.obj \
$(OUTDIR)\buffer.obj \
$(OUTDIR)\bufwrite.obj \
$(OUTDIR)\change.obj \
$(OUTDIR)\charset.obj \
$(OUTDIR)\cmdexpand.obj \
Expand Down Expand Up @@ -1457,6 +1458,8 @@ $(OUTDIR)/blowfish.obj: $(OUTDIR) blowfish.c $(INCL)

$(OUTDIR)/buffer.obj: $(OUTDIR) buffer.c $(INCL)

$(OUTDIR)/bufwrite.obj: $(OUTDIR) bufwrite.c $(INCL)

$(OUTDIR)/change.obj: $(OUTDIR) change.c $(INCL)

$(OUTDIR)/charset.obj: $(OUTDIR) charset.c $(INCL)
Expand Down Expand Up @@ -1788,6 +1791,7 @@ proto.h: \
proto/blob.pro \
proto/blowfish.pro \
proto/buffer.pro \
proto/bufwrite.pro \
proto/change.pro \
proto/charset.pro \
proto/cmdexpand.pro \
Expand Down
242 changes: 204 additions & 38 deletions src/Make_vms.mms
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Makefile for Vim on OpenVMS
#
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
# Last change: 2019 Sep 27
# Last change: 2019 Sep 28
#
# This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
# with MMS and MMK
Expand Down Expand Up @@ -307,48 +307,210 @@ 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 arglist.c autocmd.c beval.c blob.c blowfish.c buffer.c \
change.c charset.c cmdexpand.c cmdhist.c crypt.c crypt_zip.c \
debugger.c dict.c diff.c digraph.c drawline.c drawscreen.c edit.c \
eval.c evalbuffer.c evalfunc.c \
evalvars.c evalwindow.c ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c \
SRC = \
arabic.c \
arglist.c \
autocmd.c \
beval.c \
blob.c \
blowfish.c \
buffer.c \
bufwrite.c \
change.c \
charset.c \
cmdexpand.c \
cmdhist.c \
crypt.c \
crypt_zip.c \
debugger.c \
dict.c \
diff.c \
digraph.c \
drawline.c \
drawscreen.c \
edit.c \
eval.c \
evalbuffer.c \
evalfunc.c \
evalvars.c \
evalwindow.c \
ex_cmds.c \
ex_cmds2.c \
ex_docmd.c \
ex_eval.c \
ex_getln.c \
if_cscope.c if_xcmdsrv.c fileio.c filepath.c, findfile.c fold.c \
getchar.c hardcopy.c hashtab.c highlight.c \
indent.c insexpand.c json.c list.c main.c map.c mark.c menu.c mbyte.c \
memfile.c memline.c message.c misc1.c misc2.c mouse.c move.c normal.c \
fileio.c \
filepath.c, \
findfile.c \
fold.c \
getchar.c \
hardcopy.c \
hashtab.c \
highlight.c \
if_cscope.c \
if_xcmdsrv.c \
indent.c \
insexpand.c \
json.c \
list.c \
main.c \
map.c \
mark.c \
mbyte.c \
memfile.c \
memline.c \
menu.c \
message.c \
misc1.c \
misc2.c \
mouse.c \
move.c \
normal.c \
ops.c \
option.c optionstr.c popupmenu.c popupwin.c profiler.c quickfix.c \
regexp.c register.c scriptfile.c \
search.c session.c sha256.c sign.c spell.c spellfile.c spellsuggest.c \
syntax.c tag.c \
term.c termlib.c testing.c textprop.c ui.c undo.c usercmd.c \
userfunc.c version.c viminfo.c screen.c window.c os_unix.c os_vms.c \
option.c \
optionstr.c \
os_unix.c \
os_vms.c \
pathdef.c \
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
$(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)

OBJ = arabic.obj arglist.obj autocmd.obj beval.obj blob.obj blowfish.obj \
buffer.obj change.obj charset.obj cmdexpand.obj cmdhist.obj \
crypt.obj crypt_zip.obj debugger.obj dict.obj diff.obj digraph.obj \
drawline.obj drawscreen.obj edit.obj eval.obj evalbuffer.obj \
evalfunc.obj evalvars.obj evalwindow.obj ex_cmds.obj ex_cmds2.obj \
ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj if_xcmdsrv.obj \
fileio.obj filepath.obj \
findfile.obj fold.obj getchar.obj hardcopy.obj hashtab.obj \
highlight.obj indent.obj insexpand.obj json.obj list.obj main.obj \
map.obj mark.obj menu.obj memfile.obj memline.obj message.obj \
misc1.obj misc2.obj mouse.obj move.obj mbyte.obj normal.obj ops.obj \
popupmenu.c \
popupwin.c \
profiler.c \
quickfix.c \
regexp.c \
register.c \
screen.c \
scriptfile.c \
search.c \
session.c \
sha256.c \
sign.c \
spell.c \
spellfile.c \
spellsuggest.c \
syntax.c \
tag.c \
term.c \
termlib.c \
testing.c \
textprop.c \
ui.c \
undo.c \
usercmd.c \
userfunc.c \
version.c \
viminfo.c \
window.c \
$(GUI_SRC) \
$(PERL_SRC) \
$(PYTHON_SRC) \
$(TCL_SRC) \
$(RUBY_SRC) \
$(HANGULIN_SRC) \
$(MZSCH_SRC) \
$(XDIFF_SRC)

OBJ = \
arabic.obj \
arglist.obj \
autocmd.obj \
beval.obj \
blob.obj \
blowfish.obj \
buffer.obj \
bufwrite.obj \
change.obj \
charset.obj \
cmdexpand.obj \
cmdhist.obj \
crypt.obj \
crypt_zip.obj \
debugger.obj \
dict.obj \
diff.obj \
digraph.obj \
drawline.obj \
drawscreen.obj \
edit.obj \
eval.obj \
evalbuffer.obj \
evalfunc.obj \
evalvars.obj \
evalwindow.obj \
ex_cmds.obj \
ex_cmds2.obj \
ex_docmd.obj \
ex_eval.obj \
ex_getln.obj \
fileio.obj \
filepath.obj \
findfile.obj \
fold.obj \
getchar.obj \
hardcopy.obj \
hashtab.obj \
highlight.obj \
if_cscope.obj \
if_mzsch.obj \
if_xcmdsrv.obj \
indent.obj \
insexpand.obj \
json.obj \
list.obj \
main.obj \
map.obj \
mark.obj \
mbyte.obj \
memfile.obj \
memline.obj \
menu.obj \
message.obj \
misc1.obj \
misc2.obj \
mouse.obj \
move.obj \
normal.obj \
ops.obj \
option.obj \
optionstr.obj popupmenu.obj popupwin.obj profiler.obj quickfix.obj \
regexp.obj register.obj scriptfile.obj \
search.obj session.obj sha256.obj sign.obj spell.obj spellfile.obj \
spellsuggest.obj syntax.obj tag.obj term.obj termlib.obj testing.obj \
optionstr.obj \
os_unix.obj \
os_vms.obj \
pathdef.obj \
popupmenu.obj \
popupwin.obj \
profiler.obj \
quickfix.obj \
regexp.obj \
register.obj \
screen.obj \
scriptfile.obj \
search.obj \
session.obj \
sha256.obj \
sign.obj \
spell.obj \
spellfile.obj \
spellsuggest.obj \
syntax.obj \
tag.obj \
term.obj \
termlib.obj \
testing.obj \
textprop.obj \
ui.obj undo.obj usercmd.obj userfunc.obj screen.obj version.obj \
viminfo.obj window.obj os_unix.obj os_vms.obj pathdef.obj if_mzsch.obj \
$(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
$(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ) $(XDIFF_OBJ)
ui.obj \
undo.obj \
usercmd.obj \
userfunc.obj \
version.obj \
viminfo.obj \
window.obj \
$(GUI_OBJ) \
$(PERL_OBJ) \
$(PYTHON_OBJ) \
$(TCL_OBJ) \
$(RUBY_OBJ) \
$(HANGULIN_OBJ) \
$(MZSCH_OBJ) \
$(XDIFF_OBJ)

# Default target is making the executable
all : [.auto]config.h mmk_compat motif_env gtk_env perl_env python_env tcl_env ruby_env $(TARGET)
Expand Down Expand Up @@ -526,6 +688,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
bufwrite.obj : bufwrite.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 \
Expand Down
10 changes: 10 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1668,6 +1668,7 @@ BASIC_SRC = \
version.c \
viminfo.c \
window.c \
bufwrite.c \
$(OS_EXTRA_SRC)

SRC = $(BASIC_SRC) \
Expand Down Expand Up @@ -1804,6 +1805,7 @@ OBJ_COMMON = \
objects/version.o \
objects/viminfo.o \
objects/window.o \
objects/bufwrite.o \
$(GUI_OBJ) \
$(TERM_OBJ) \
$(LUA_OBJ) \
Expand Down Expand Up @@ -1966,6 +1968,7 @@ PRO_AUTO = \
version.pro \
viminfo.pro \
window.pro \
bufwrite.pro \
beval.pro \
gui_beval.pro \
netbeans.pro \
Expand Down Expand Up @@ -3432,6 +3435,9 @@ objects/viminfo.o: viminfo.c
objects/window.o: window.c
$(CCC) -o $@ window.c

objects/bufwrite.o: bufwrite.c
$(CCC) -o $@ bufwrite.c

objects/netbeans.o: netbeans.c
$(CCC) -o $@ netbeans.c

Expand Down Expand Up @@ -3949,6 +3955,10 @@ objects/window.o: window.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
objects/bufwrite.o: bufwrite.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
objects/gui.o: gui.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 \
Expand Down
1 change: 1 addition & 0 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ arglist.c | handling argument list
autocmd.c | autocommands
blob.c | blob data type
buffer.c | manipulating buffers (loaded files)
bufwrite.c | writing a buffer to file
change.c | handling changes to text
cmdexpand.c | command-line completion
cmdhist.c | command-line history
Expand Down

0 comments on commit c079f0f

Please sign in to comment.