vim7: externals which can be made static (long)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

vim7: externals which can be made static (long)

Walter Briscoe
I have applied PC-lint to vim7.
It identified many identifiers with external linkage which can have
internal linkage instead. (extern foo -> static foo) I used grep
identifier *.c to check diagnoses and did not apply it to 5 including:
Info 765: external 'tgoto(char *, int, int)' (line 2423, file term.c) could be made static

I believe the following changes are safe. I have compressed them because
the 10k original seems large. 5k is not great but I can do no better.

--
Walter Briscoe

t.t.bz2 (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: vim7: externals which can be made static (long)

Bram Moolenaar

Walter Briscoe wrote:

> I have applied PC-lint to vim7.
> It identified many identifiers with external linkage which can have
> internal linkage instead. (extern foo -> static foo) I used grep
> identifier *.c to check diagnoses and did not apply it to 5 including:
> Info 765: external 'tgoto(char *, int, int)' (line 2423, file term.c)
> could be made static

Yes, it can be made static.

> I believe the following changes are safe. I have compressed them because
> the 10k original seems large. 5k is not great but I can do no better.

Thanks.  Looks OK, I'll include it.

--
Far out in the uncharted backwaters of the unfashionable end of the
Western Spiral arm of the Galaxy lies a small unregarded yellow sun.
Orbiting this at a distance of roughly ninety-eight million miles is an
utterly insignificant little blue-green planet whose ape-descended life
forms are so amazingly primitive that they still think digital watches
are a pretty neat idea ...
                -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\     Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html   ///
Reply | Threaded
Open this post in threaded view
|

Re: vim7: externals which can be made static (long)

Walter Briscoe
In message <[hidden email]> of Wed, 1 Jun
2005 18:32:22 in , Bram Moolenaar <[hidden email]> writes

>
>Walter Briscoe wrote:
>
>> I have applied PC-lint to vim7.
>> It identified many identifiers with external linkage which can have
>> internal linkage instead. (extern foo -> static foo) I used grep
>> identifier *.c to check diagnoses and did not apply it to 5 including:
>> Info 765: external 'tgoto(char *, int, int)' (line 2423, file term.c)
>> could be made static
>
>Yes, it can be made static.
>
>> I believe the following changes are safe. I have compressed them because
>> the 10k original seems large. 5k is not great but I can do no better.
>
>Thanks.  Looks OK, I'll include it.
>

I have the change. I had misunderstood "Yes, it can be made static".
You may like to consider the following:
Info 765: external 'mch_expandpath(struct growarray *, unsigned char *,
int)' (line 8334, file misc1.c) could be made static
Info 765: external 'message_window' (line 2457, file os_mswin.c) could
be made static
Info 765: external 'current_font_height' (line 3130, file os_mswin.c)
could be made static
Info 765: external 'current_funccal' (line 748, file eval.c) could be
made static

I rejected all of them. I also rejected tgoto. It seems helpful to push
them at you in case I was too conservative.
--
Walter Briscoe