summaryrefslogtreecommitdiffstats
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-10-09 22:53:08 +0200
committerBram Moolenaar <Bram@vim.org>2019-10-09 22:53:08 +0200
commit14c01f83487d5c53192297a710eda2b8a4ab17c9 (patch)
treed5c5e8d42ab13b257fd2e17fd7530511a766ba8a /src/evalfunc.c
parent6bd1d7706766a7899904163e8fd55ea117fb1953 (diff)
patch 8.1.2127: the indent.c file is a bit bigv8.1.2127
Problem: The indent.c file is a bit big. Solution: Move C-indent code a a new cindent.c file. Move other indent-related code to indent.c. (Yegappan Lakshmanan, closes #5031)
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 4a04696d6b..962c6c49bb 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -51,7 +51,6 @@ static void f_ceil(typval_T *argvars, typval_T *rettv);
#endif
static void f_changenr(typval_T *argvars, typval_T *rettv);
static void f_char2nr(typval_T *argvars, typval_T *rettv);
-static void f_cindent(typval_T *argvars, typval_T *rettv);
static void f_col(typval_T *argvars, typval_T *rettv);
static void f_confirm(typval_T *argvars, typval_T *rettv);
static void f_copy(typval_T *argvars, typval_T *rettv);
@@ -108,7 +107,6 @@ static void f_hlID(typval_T *argvars, typval_T *rettv);
static void f_hlexists(typval_T *argvars, typval_T *rettv);
static void f_hostname(typval_T *argvars, typval_T *rettv);
static void f_iconv(typval_T *argvars, typval_T *rettv);
-static void f_indent(typval_T *argvars, typval_T *rettv);
static void f_index(typval_T *argvars, typval_T *rettv);
static void f_input(typval_T *argvars, typval_T *rettv);
static void f_inputdialog(typval_T *argvars, typval_T *rettv);
@@ -128,7 +126,6 @@ static void f_libcall(typval_T *argvars, typval_T *rettv);
static void f_libcallnr(typval_T *argvars, typval_T *rettv);
static void f_line(typval_T *argvars, typval_T *rettv);
static void f_line2byte(typval_T *argvars, typval_T *rettv);
-static void f_lispindent(typval_T *argvars, typval_T *rettv);
static void f_localtime(typval_T *argvars, typval_T *rettv);
#ifdef FEAT_FLOAT
static void f_log(typval_T *argvars, typval_T *rettv);
@@ -1491,29 +1488,6 @@ f_char2nr(typval_T *argvars, typval_T *rettv)
rettv->vval.v_number = tv_get_string(&argvars[0])[0];
}
-/*
- * "cindent(lnum)" function
- */
- static void
-f_cindent(typval_T *argvars UNUSED, typval_T *rettv)
-{
-#ifdef FEAT_CINDENT
- pos_T pos;
- linenr_T lnum;
-
- pos = curwin->w_cursor;
- lnum = tv_get_lnum(argvars);
- if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
- {
- curwin->w_cursor.lnum = lnum;
- rettv->vval.v_number = get_c_indent();
- curwin->w_cursor = pos;
- }
- else
-#endif
- rettv->vval.v_number = -1;
-}
-
win_T *
get_optional_window(typval_T *argvars, int idx)
{
@@ -3946,21 +3920,6 @@ f_iconv(typval_T *argvars UNUSED, typval_T *rettv)
}
/*
- * "indent()" function
- */
- static void
-f_indent(typval_T *argvars, typval_T *rettv)
-{
- linenr_T lnum;
-
- lnum = tv_get_lnum(argvars);
- if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
- rettv->vval.v_number = get_indent_lnum(lnum);
- else
- rettv->vval.v_number = -1;
-}
-
-/*
* "index()" function
*/
static void
@@ -4451,29 +4410,6 @@ f_line2byte(typval_T *argvars UNUSED, typval_T *rettv)
}
/*
- * "lispindent(lnum)" function
- */
- static void
-f_lispindent(typval_T *argvars UNUSED, typval_T *rettv)
-{
-#ifdef FEAT_LISP
- pos_T pos;
- linenr_T lnum;
-
- pos = curwin->w_cursor;
- lnum = tv_get_lnum(argvars);
- if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
- {
- curwin->w_cursor.lnum = lnum;
- rettv->vval.v_number = get_lisp_indent();
- curwin->w_cursor = pos;
- }
- else
-#endif
- rettv->vval.v_number = -1;
-}
-
-/*
* "localtime()" function
*/
static void