diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-02-14 13:22:17 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-02-14 13:22:17 +0100 |
commit | 0a8fed6231c84e4e1b3a7dd6c0d95d3f98207fe0 (patch) | |
tree | b0545af3bfa25ced1890c33fe9c1facf1e749358 /src/proto | |
parent | f2cecb6c10909184281e31a8f968200f3841562d (diff) | |
download | vim-git-0a8fed6231c84e4e1b3a7dd6c0d95d3f98207fe0.tar.gz |
patch 8.2.0256: time and timer related code is spread outv8.2.0256
Problem: Time and timer related code is spread out.
Solution: Move time and timer related code to a new file. (Yegappan
Lakshmanan, closes #5604)
Diffstat (limited to 'src/proto')
-rw-r--r-- | src/proto/ex_cmds.pro | 1 | ||||
-rw-r--r-- | src/proto/ex_cmds2.pro | 11 | ||||
-rw-r--r-- | src/proto/main.pro | 3 | ||||
-rw-r--r-- | src/proto/memline.pro | 2 | ||||
-rw-r--r-- | src/proto/misc1.pro | 1 | ||||
-rw-r--r-- | src/proto/misc2.pro | 3 | ||||
-rw-r--r-- | src/proto/time.pro | 28 |
7 files changed, 28 insertions, 21 deletions
diff --git a/src/proto/ex_cmds.pro b/src/proto/ex_cmds.pro index 3693cf426..92887a6cf 100644 --- a/src/proto/ex_cmds.pro +++ b/src/proto/ex_cmds.pro @@ -9,7 +9,6 @@ void do_bang(int addr_count, exarg_T *eap, int forceit, int do_in, int do_out); void do_shell(char_u *cmd, int flags); char_u *make_filter_cmd(char_u *cmd, char_u *itmp, char_u *otmp); void append_redir(char_u *buf, int buflen, char_u *opt, char_u *fname); -time_T vim_time(void); void do_fixdel(exarg_T *eap); void print_line_no_prefix(linenr_T lnum, int use_number, int list); void print_line(linenr_T lnum, int use_number, int list); diff --git a/src/proto/ex_cmds2.pro b/src/proto/ex_cmds2.pro index 9f694da93..b9d1929f7 100644 --- a/src/proto/ex_cmds2.pro +++ b/src/proto/ex_cmds2.pro @@ -1,15 +1,4 @@ /* ex_cmds2.c */ -long proftime_time_left(proftime_T *due, proftime_T *now); -timer_T *create_timer(long msec, int repeat); -long check_due_timer(void); -void stop_timer(timer_T *timer); -int set_ref_in_timer(int copyID); -void timer_free_all(void); -void f_timer_info(typval_T *argvars, typval_T *rettv); -void f_timer_pause(typval_T *argvars, typval_T *rettv); -void f_timer_start(typval_T *argvars, typval_T *rettv); -void f_timer_stop(typval_T *argvars, typval_T *rettv); -void f_timer_stopall(typval_T *argvars, typval_T *rettv); int autowrite(buf_T *buf, int forceit); void autowrite_all(void); int check_changed(buf_T *buf, int flags); diff --git a/src/proto/main.pro b/src/proto/main.pro index c663cd2b1..5fa96c390 100644 --- a/src/proto/main.pro +++ b/src/proto/main.pro @@ -12,9 +12,6 @@ void getout_preserve_modified(int exitval); void getout(int exitval); int process_env(char_u *env, int is_viminit); void mainerr_arg_missing(char_u *str); -void time_push(void *tv_rel, void *tv_start); -void time_pop(void *tp); -void time_msg(char *mesg, void *tv_start); void server_to_input_buf(char_u *str); char_u *eval_client_expr_to_string(char_u *expr); int sendToLocalVim(char_u *cmd, int asExpr, char_u **result); diff --git a/src/proto/memline.pro b/src/proto/memline.pro index 663930dab..113417042 100644 --- a/src/proto/memline.pro +++ b/src/proto/memline.pro @@ -13,8 +13,6 @@ void ml_recover(int checkext); int recover_names(char_u *fname, int list, int nr, char_u **fname_out); char_u *make_percent_swname(char_u *dir, char_u *name); void get_b0_dict(char_u *fname, dict_T *d); -struct tm *vim_localtime(const time_t *timep, struct tm *result); -char *get_ctime(time_t thetime, int add_newline); void ml_sync_all(int check_file, int check_char); void ml_preserve(buf_T *buf, int message); char_u *ml_get(linenr_T lnum); diff --git a/src/proto/misc1.pro b/src/proto/misc1.pro index e4f2c3d8b..1327701e0 100644 --- a/src/proto/misc1.pro +++ b/src/proto/misc1.pro @@ -47,5 +47,4 @@ int goto_im(void); char_u *get_isolated_shell_name(void); int path_is_url(char_u *p); int path_with_url(char_u *fname); -void add_time(char_u *buf, size_t buflen, time_t tt); /* vim: set ft=c : */ diff --git a/src/proto/misc2.pro b/src/proto/misc2.pro index a52b46280..6c047f332 100644 --- a/src/proto/misc2.pro +++ b/src/proto/misc2.pro @@ -94,11 +94,8 @@ int filewritable(char_u *fname); int get2c(FILE *fd); int get3c(FILE *fd); int get4c(FILE *fd); -time_T get8ctime(FILE *fd); char_u *read_string(FILE *fd, int cnt); int put_bytes(FILE *fd, long_u nr, int len); -int put_time(FILE *fd, time_T the_time); -void time_to_bytes(time_T the_time, char_u *buf); int has_non_ascii(char_u *s); int mch_parse_cmd(char_u *cmd, int use_shcf, char ***argv, int *argc); int build_argv_from_string(char_u *cmd, char ***argv, int *argc); diff --git a/src/proto/time.pro b/src/proto/time.pro new file mode 100644 index 000000000..becafea3b --- /dev/null +++ b/src/proto/time.pro @@ -0,0 +1,28 @@ +/* time.c */ +char *get_ctime(time_t thetime, int add_newline); +time_T vim_time(void); +void f_localtime(typval_T *argvars, typval_T *rettv); +void f_reltime(typval_T *argvars, typval_T *rettv); +void f_reltimefloat(typval_T *argvars, typval_T *rettv); +void f_reltimestr(typval_T *argvars, typval_T *rettv); +void f_strftime(typval_T *argvars, typval_T *rettv); +void f_strptime(typval_T *argvars, typval_T *rettv); +long proftime_time_left(proftime_T *due, proftime_T *now); +timer_T *create_timer(long msec, int repeat); +long check_due_timer(void); +void stop_timer(timer_T *timer); +int set_ref_in_timer(int copyID); +void timer_free_all(void); +void f_timer_info(typval_T *argvars, typval_T *rettv); +void f_timer_pause(typval_T *argvars, typval_T *rettv); +void f_timer_start(typval_T *argvars, typval_T *rettv); +void f_timer_stop(typval_T *argvars, typval_T *rettv); +void f_timer_stopall(typval_T *argvars, typval_T *rettv); +void time_push(void *tv_rel, void *tv_start); +void time_pop(void *tp); +void time_msg(char *mesg, void *tv_start); +time_T get8ctime(FILE *fd); +int put_time(FILE *fd, time_T the_time); +void time_to_bytes(time_T the_time, char_u *buf); +void add_time(char_u *buf, size_t buflen, time_t tt); +/* vim: set ft=c : */ |