Permalink
Browse files

Merged from the latest developing branch.

git-svn-id: https://vim.svn.sourceforge.net/svnroot/vim/trunk@1460 2a77ed30-b011-0410-a7ad-c7884a0aa172
  • Loading branch information...
1 parent 138d22b commit 046c7872a4ca631ae5ea5b7267a741bd3a345f99 edyfox committed May 15, 2009
Showing with 105 additions and 56 deletions.
  1. +50 −0 src/auto/configure
  2. +5 −9 src/buffer.c
  3. +1 −2 src/charset.c
  4. +3 −0 src/config.h.in
  5. +5 −0 src/configure.in
  6. +2 −4 src/diff.c
  7. +2 −4 src/edit.c
  8. +9 −13 src/ex_cmds.c
  9. +11 −20 src/ex_cmds2.c
  10. +2 −2 src/os_mswin.c
  11. +7 −2 src/version.c
  12. +8 −0 src/vim.h
View
@@ -10362,6 +10362,56 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: checking whether __attribute__((unused)) is allowed" >&5
+$as_echo_n "checking whether __attribute__((unused)) is allowed... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+int x __attribute__((unused));
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }; cat >>confdefs.h <<\_ACEOF
+#define HAVE_ATTRIBUTE_UNUSED 1
+_ACEOF
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
if test "${ac_cv_header_elf_h+set}" = set; then
{ $as_echo "$as_me:$LINENO: checking for elf.h" >&5
$as_echo_n "checking for elf.h... " >&6; }
View
@@ -512,12 +512,11 @@ buf_clear_file(buf)
* buf_freeall() - free all things allocated for a buffer that are related to
* the file.
*/
-/*ARGSUSED*/
void
buf_freeall(buf, del_buf, wipe_buf)
buf_T *buf;
- int del_buf; /* buffer is going to be deleted */
- int wipe_buf; /* buffer is going to be wiped out */
+ int del_buf UNUSED; /* buffer is going to be deleted */
+ int wipe_buf UNUSED; /* buffer is going to be wiped out */
{
#ifdef FEAT_AUTOCMD
int is_curbuf = (buf == curbuf);
@@ -2437,11 +2436,10 @@ wininfo_other_tab_diff(wip)
* another tab page.
* Returns NULL when there isn't any info.
*/
-/*ARGSUSED*/
static wininfo_T *
find_wininfo(buf, skip_diff_buffer)
buf_T *buf;
- int skip_diff_buffer;
+ int skip_diff_buffer UNUSED;
{
wininfo_T *wip;
@@ -4278,10 +4276,9 @@ fix_fname(fname)
* Make "ffname" a full file name, set "sfname" to "ffname" if not NULL.
* "ffname" becomes a pointer to allocated memory (or NULL).
*/
-/*ARGSUSED*/
void
fname_expand(buf, ffname, sfname)
- buf_T *buf;
+ buf_T *buf UNUSED;
char_u **ffname;
char_u **sfname;
{
@@ -5577,11 +5574,10 @@ buf_contents_changed(buf)
* this buffer. Call this to wipe out a temp buffer that does not contain any
* marks.
*/
-/*ARGSUSED*/
void
wipe_buffer(buf, aucmd)
buf_T *buf;
- int aucmd; /* When TRUE trigger autocommands. */
+ int aucmd UNUSED; /* When TRUE trigger autocommands. */
{
if (buf->b_fnum == top_file_num - 1)
--top_file_num;
View
@@ -1026,13 +1026,12 @@ lbr_chartabsize_adv(s, col)
* string at start of line. Warning: *headp is only set if it's a non-zero
* value, init to 0 before calling.
*/
-/*ARGSUSED*/
int
win_lbr_chartabsize(wp, s, col, headp)
win_T *wp;
char_u *s;
colnr_T col;
- int *headp;
+ int *headp UNUSED;
{
#ifdef FEAT_LINEBREAK
int c;
View
@@ -30,6 +30,9 @@
/* Define when __DATE__ " " __TIME__ can be used */
#undef HAVE_DATE_TIME
+/* Define when __attribute__((unused)) can be used */
+#undef HAVE_ATTRIBUTE_UNUSED
+
/* defined always when using configure */
#undef UNIX
View
@@ -2067,6 +2067,11 @@ AC_TRY_COMPILE([#include <stdio.h>], [printf("(" __DATE__ " " __TIME__ ")");],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DATE_TIME),
AC_MSG_RESULT(no))
+AC_MSG_CHECKING(whether __attribute__((unused)) is allowed)
+AC_TRY_COMPILE([#include <stdio.h>], [int x __attribute__((unused));],
+ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ATTRIBUTE_UNUSED),
+ AC_MSG_RESULT(no))
+
dnl Checks for header files.
AC_CHECK_HEADER(elf.h, HAS_ELF=1)
dnl AC_CHECK_HEADER(dwarf.h, SVR4=1)
View
@@ -652,10 +652,9 @@ diff_write(buf, fname)
* The buffers are written to a file, also for unmodified buffers (the file
* could have been produced by autocommands, e.g. the netrw plugin).
*/
-/*ARGSUSED*/
void
ex_diffupdate(eap)
- exarg_T *eap; /* can be NULL, it's not used */
+ exarg_T *eap UNUSED; /* can be NULL */
{
buf_T *buf;
int idx_orig;
@@ -1094,10 +1093,9 @@ ex_diffsplit(eap)
/*
* Set options to show difs for the current window.
*/
-/*ARGSUSED*/
void
ex_diffthis(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
/* Set 'diff', 'scrollbind' on and 'wrap' off. */
diff_win_options(curwin, TRUE);
View
@@ -1447,10 +1447,9 @@ edit(cmdchar, startln, count)
* Only redraw when there are no characters available. This speeds up
* inserting sequences of characters (e.g., for CTRL-R).
*/
-/*ARGSUSED*/
static void
ins_redraw(ready)
- int ready; /* not busy with something */
+ int ready UNUSED; /* not busy with something */
{
if (!char_avail())
{
@@ -1962,10 +1961,9 @@ backspace_until_column(col)
* Only matters when there are composing characters.
* Return TRUE when something was deleted.
*/
-/*ARGSUSED*/
static int
del_char_after_col(limit_col)
- int limit_col;
+ int limit_col UNUSED;
{
#ifdef FEAT_MBYTE
if (enc_utf8 && limit_col >= 0)
View
@@ -43,10 +43,9 @@ static int
/*
* ":ascii" and "ga".
*/
-/*ARGSUSED*/
void
do_ascii(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
int c;
int cval;
@@ -2373,10 +2372,9 @@ viminfo_writestring(fd, p)
* ^? ^H
* not ^? ^?
*/
-/*ARGSUSED*/
void
do_fixdel(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
char_u *p;
@@ -4637,7 +4635,7 @@ do_sub(eap)
if (do_ask)
{
- int typed;
+ int typed = 0;
/* change State to CONFIRM, so that the mouse works
* properly */
@@ -6127,21 +6125,19 @@ fix_help_buffer()
/*
* ":exusage"
*/
-/*ARGSUSED*/
void
ex_exusage(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
do_cmdline_cmd((char_u *)"help ex-cmd-index");
}
/*
* ":viusage"
*/
-/*ARGSUSED*/
void
ex_viusage(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
do_cmdline_cmd((char_u *)"help normal-index");
}
@@ -6553,6 +6549,7 @@ struct sign
static sign_T *first_sign = NULL;
static int last_sign_typenr = MAX_TYPENR; /* is decremented */
+static int sign_cmd_idx __ARGS((char_u *begin_cmd, char_u *end_cmd));
static void sign_list_defined __ARGS((sign_T *sp));
static void sign_undefine __ARGS((sign_T *sp, sign_T *sp_prev));
@@ -6579,8 +6576,8 @@ static char *cmds[] = {
*/
static int
sign_cmd_idx(begin_cmd, end_cmd)
- char *begin_cmd; /* begin of sign subcmd */
- char *end_cmd; /* just after sign subcmd */
+ char_u *begin_cmd; /* begin of sign subcmd */
+ char_u *end_cmd; /* just after sign subcmd */
{
int idx;
char save = *end_cmd;
@@ -7153,10 +7150,9 @@ static enum
* Function given to ExpandGeneric() to obtain the sign command
* expansion.
*/
-/*ARGSUSED*/
char_u *
get_sign_name(xp, idx)
- expand_T *xp;
+ expand_T *xp UNUSED;
int idx;
{
sign_T *sp;
Oops, something went wrong.

0 comments on commit 046c787

Please sign in to comment.