To: vim-dev@vim.org Subject: Patch 6.2.109 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.109 Problem: Compiler warnings with various Amiga compilers. Solution: Add typecast, prototypes, et al. that are also useful for other systems. (Flavio Stanchina) Files: src/eval.c, src/ops.c *** ../vim-6.2.108/src/eval.c Sat Sep 27 19:36:46 2003 --- src/eval.c Wed Sep 17 21:53:22 2003 *************** *** 9552,9559 **** sprintf((char *)IObuff, ":return \"%s\"", ((VAR)retvar)->var_val.var_string); else ! sprintf((char *)IObuff, ":return %d", ! ((VAR)retvar)->var_val.var_number); return vim_strsave(s); } --- 9552,9559 ---- sprintf((char *)IObuff, ":return \"%s\"", ((VAR)retvar)->var_val.var_string); else ! sprintf((char *)IObuff, ":return %ld", ! (long)(((VAR)retvar)->var_val.var_number)); return vim_strsave(s); } *** ../vim-6.2.108/src/ops.c Sat Sep 27 19:36:47 2003 --- src/ops.c Wed Sep 17 21:59:01 2003 *************** *** 4334,4341 **** linenr_T lnum; { char_u *s = ml_get(lnum); ! return (*s != NUL && vim_iswhite(s[STRLEN(s) - 1])); } /* --- 4334,4347 ---- linenr_T lnum; { char_u *s = ml_get(lnum); + size_t l; ! if (*s == NUL) ! return FALSE; ! /* Don't use STRLEN() inside vim_iswhite(), SAS/C complains: "macro ! * invocation may call function multiple times". */ ! l = STRLEN(s) - 1; ! return vim_iswhite(s[l]); } /* *** ../vim-6.2.108/src/version.c Sun Oct 12 16:52:45 2003 --- src/version.c Sun Oct 12 16:55:21 2003 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 109, /**/ -- The CIA drives around in cars with the "Intel inside" logo. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///