Tom Ryder wrote:
> On Sat, Jun 15, 2019 at 04:06:17PM +0200, Bram Moolenaar wrote:
> >I rather not add a new file, this can go into evalfunc.c. That file is
> >getting a bit big, I'll probably move some things out of there later.
>
> I had considered that, but localtime()/localtime_r() is called in two
> other contexts outside evalfunc.c:f_strftime(): memline.c:get_ctime(),
> which is called by swapfile_info() and attention_message() in the same
> file, and undo.c:u_add_time(), so I wasn't sure how to make that work.
>
> I was going to add the vim_localtime() prototype to vim.h, but that
> seemed wrong because there are so few existing ones already in there,
> although a few of the ones towards the end of the file are time-related.
Just add it as a global function, without "static". Then update the
prototype in src/proto/evalfunc.pro. You can do it automatically if you
have cproto, but it's easy enough to do manually.
Sorry you had to update all those files when adding a new source file,
that's why I don't like adding many smaller files. Well, and it makes
building slower.
--
hundred-and-one symptoms of being an internet addict:
198. You read all the quotes at Netaholics Anonymous and keep thinking
"What's wrong with that?"
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/201906161332.x5GDWUIL018609%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.