Mercurial > vim
comparison src/fold.c @ 7801:a1e71a01dbd6 v7.4.1197
commit https://github.com/vim/vim/commit/d25c16e2f2776d50245bf31d6e4d5364f12d188e
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jan 29 22:13:30 2016 +0100
patch 7.4.1197
Problem: Still using __ARGS.
Solution: Remove __ARGS in several files. (script by Hirohito Higashi)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 29 Jan 2016 22:15:05 +0100 |
parents | 286fd54c7ae3 |
children | 1a5d34492798 |
comparison
equal
deleted
inserted
replaced
7800:a835f2222ce6 | 7801:a1e71a01dbd6 |
---|---|
41 #define FD_LEVEL 2 /* depends on 'foldlevel' (nested folds too) */ | 41 #define FD_LEVEL 2 /* depends on 'foldlevel' (nested folds too) */ |
42 | 42 |
43 #define MAX_LEVEL 20 /* maximum fold depth */ | 43 #define MAX_LEVEL 20 /* maximum fold depth */ |
44 | 44 |
45 /* static functions {{{2 */ | 45 /* static functions {{{2 */ |
46 static void newFoldLevelWin __ARGS((win_T *wp)); | 46 static void newFoldLevelWin(win_T *wp); |
47 static int checkCloseRec __ARGS((garray_T *gap, linenr_T lnum, int level)); | 47 static int checkCloseRec(garray_T *gap, linenr_T lnum, int level); |
48 static int foldFind __ARGS((garray_T *gap, linenr_T lnum, fold_T **fpp)); | 48 static int foldFind(garray_T *gap, linenr_T lnum, fold_T **fpp); |
49 static int foldLevelWin __ARGS((win_T *wp, linenr_T lnum)); | 49 static int foldLevelWin(win_T *wp, linenr_T lnum); |
50 static void checkupdate __ARGS((win_T *wp)); | 50 static void checkupdate(win_T *wp); |
51 static void setFoldRepeat __ARGS((linenr_T lnum, long count, int do_open)); | 51 static void setFoldRepeat(linenr_T lnum, long count, int do_open); |
52 static linenr_T setManualFold __ARGS((linenr_T lnum, int opening, int recurse, int *donep)); | 52 static linenr_T setManualFold(linenr_T lnum, int opening, int recurse, int *donep); |
53 static linenr_T setManualFoldWin __ARGS((win_T *wp, linenr_T lnum, int opening, int recurse, int *donep)); | 53 static linenr_T setManualFoldWin(win_T *wp, linenr_T lnum, int opening, int recurse, int *donep); |
54 static void foldOpenNested __ARGS((fold_T *fpr)); | 54 static void foldOpenNested(fold_T *fpr); |
55 static void deleteFoldEntry __ARGS((garray_T *gap, int idx, int recursive)); | 55 static void deleteFoldEntry(garray_T *gap, int idx, int recursive); |
56 static void foldMarkAdjustRecurse __ARGS((garray_T *gap, linenr_T line1, linenr_T line2, long amount, long amount_after)); | 56 static void foldMarkAdjustRecurse(garray_T *gap, linenr_T line1, linenr_T line2, long amount, long amount_after); |
57 static int getDeepestNestingRecurse __ARGS((garray_T *gap)); | 57 static int getDeepestNestingRecurse(garray_T *gap); |
58 static int check_closed __ARGS((win_T *win, fold_T *fp, int *use_levelp, int level, int *maybe_smallp, linenr_T lnum_off)); | 58 static int check_closed(win_T *win, fold_T *fp, int *use_levelp, int level, int *maybe_smallp, linenr_T lnum_off); |
59 static void checkSmall __ARGS((win_T *wp, fold_T *fp, linenr_T lnum_off)); | 59 static void checkSmall(win_T *wp, fold_T *fp, linenr_T lnum_off); |
60 static void setSmallMaybe __ARGS((garray_T *gap)); | 60 static void setSmallMaybe(garray_T *gap); |
61 static void foldCreateMarkers __ARGS((linenr_T start, linenr_T end)); | 61 static void foldCreateMarkers(linenr_T start, linenr_T end); |
62 static void foldAddMarker __ARGS((linenr_T lnum, char_u *marker, int markerlen)); | 62 static void foldAddMarker(linenr_T lnum, char_u *marker, int markerlen); |
63 static void deleteFoldMarkers __ARGS((fold_T *fp, int recursive, linenr_T lnum_off)); | 63 static void deleteFoldMarkers(fold_T *fp, int recursive, linenr_T lnum_off); |
64 static void foldDelMarker __ARGS((linenr_T lnum, char_u *marker, int markerlen)); | 64 static void foldDelMarker(linenr_T lnum, char_u *marker, int markerlen); |
65 static void foldUpdateIEMS __ARGS((win_T *wp, linenr_T top, linenr_T bot)); | 65 static void foldUpdateIEMS(win_T *wp, linenr_T top, linenr_T bot); |
66 static void parseMarker __ARGS((win_T *wp)); | 66 static void parseMarker(win_T *wp); |
67 | 67 |
68 static char *e_nofold = N_("E490: No fold found"); | 68 static char *e_nofold = N_("E490: No fold found"); |
69 | 69 |
70 /* | 70 /* |
71 * While updating the folds lines between invalid_top and invalid_bot have an | 71 * While updating the folds lines between invalid_top and invalid_bot have an |
2140 | 2140 |
2141 /* Flag is set when redrawing is needed. */ | 2141 /* Flag is set when redrawing is needed. */ |
2142 static int fold_changed; | 2142 static int fold_changed; |
2143 | 2143 |
2144 /* Function declarations. {{{2 */ | 2144 /* Function declarations. {{{2 */ |
2145 static linenr_T foldUpdateIEMSRecurse __ARGS((garray_T *gap, int level, linenr_T startlnum, fline_T *flp, void (*getlevel)__ARGS((fline_T *)), linenr_T bot, int topflags)); | 2145 static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level, linenr_T startlnum, fline_T *flp, void (*getlevel)__ARGS((fline_T *)), linenr_T bot, int topflags); |
2146 static int foldInsert __ARGS((garray_T *gap, int i)); | 2146 static int foldInsert(garray_T *gap, int i); |
2147 static void foldSplit __ARGS((garray_T *gap, int i, linenr_T top, linenr_T bot)); | 2147 static void foldSplit(garray_T *gap, int i, linenr_T top, linenr_T bot); |
2148 static void foldRemove __ARGS((garray_T *gap, linenr_T top, linenr_T bot)); | 2148 static void foldRemove(garray_T *gap, linenr_T top, linenr_T bot); |
2149 static void foldMerge __ARGS((fold_T *fp1, garray_T *gap, fold_T *fp2)); | 2149 static void foldMerge(fold_T *fp1, garray_T *gap, fold_T *fp2); |
2150 static void foldlevelIndent __ARGS((fline_T *flp)); | 2150 static void foldlevelIndent(fline_T *flp); |
2151 #ifdef FEAT_DIFF | 2151 #ifdef FEAT_DIFF |
2152 static void foldlevelDiff __ARGS((fline_T *flp)); | 2152 static void foldlevelDiff(fline_T *flp); |
2153 #endif | 2153 #endif |
2154 static void foldlevelExpr __ARGS((fline_T *flp)); | 2154 static void foldlevelExpr(fline_T *flp); |
2155 static void foldlevelMarker __ARGS((fline_T *flp)); | 2155 static void foldlevelMarker(fline_T *flp); |
2156 static void foldlevelSyntax __ARGS((fline_T *flp)); | 2156 static void foldlevelSyntax(fline_T *flp); |
2157 | 2157 |
2158 /* foldUpdateIEMS() {{{2 */ | 2158 /* foldUpdateIEMS() {{{2 */ |
2159 /* | 2159 /* |
2160 * Update the folding for window "wp", at least from lines "top" to "bot". | 2160 * Update the folding for window "wp", at least from lines "top" to "bot". |
2161 * Return TRUE if any folds did change. | 2161 * Return TRUE if any folds did change. |
3312 } | 3312 } |
3313 | 3313 |
3314 /* functions for storing the fold state in a View {{{1 */ | 3314 /* functions for storing the fold state in a View {{{1 */ |
3315 /* put_folds() {{{2 */ | 3315 /* put_folds() {{{2 */ |
3316 #if defined(FEAT_SESSION) || defined(PROTO) | 3316 #if defined(FEAT_SESSION) || defined(PROTO) |
3317 static int put_folds_recurse __ARGS((FILE *fd, garray_T *gap, linenr_T off)); | 3317 static int put_folds_recurse(FILE *fd, garray_T *gap, linenr_T off); |
3318 static int put_foldopen_recurse __ARGS((FILE *fd, win_T *wp, garray_T *gap, linenr_T off)); | 3318 static int put_foldopen_recurse(FILE *fd, win_T *wp, garray_T *gap, linenr_T off); |
3319 static int put_fold_open_close __ARGS((FILE *fd, fold_T *fp, linenr_T off)); | 3319 static int put_fold_open_close(FILE *fd, fold_T *fp, linenr_T off); |
3320 | 3320 |
3321 /* | 3321 /* |
3322 * Write commands to "fd" to restore the manual folds in window "wp". | 3322 * Write commands to "fd" to restore the manual folds in window "wp". |
3323 * Return FAIL if writing fails. | 3323 * Return FAIL if writing fails. |
3324 */ | 3324 */ |