John Marriott wrote:

On 14 March 2017 at 19:17, John Marriott <[email protected]> wrote:

> On 13-Mar-2017 05:22, Bram Moolenaar wrote:
>
>> Patch 8.0.0451
>> Problem:    Some macros are in lower case.
>> Solution:   Make a few more macros upper case. Avoid lower case macros
>> use an
>>              argument twice.
>> Files:      src/macros.h, src/charset.c, src/misc2.c, src/proto/misc2.pro
>> ,
>>              src/edit.c, src/eval.c, src/ex_cmds.c, src/ex_cmds2.c,
>>              src/ex_docmd.c, src/ex_getln.c, src/fileio.c, src/fold.c,
>>              src/gui.c, src/gui_gtk.c, src/mark.c, src/memline.c,
>> src/mbyte.c,
>>              src/menu.c, src/message.c, src/misc1.c, src/ops.c,
>> src/option.c,
>>              src/os_amiga.c, src/os_mswin.c, src/os_unix.c,
>> src/os_win32.c,
>>              src/popupmnu.c, src/regexp.c, src/regexp_nfa.c, src/screen.c,
>>              src/search.c, src/spell.c, src/spellfile.c, src/syntax.c,
>>              src/tag.c, src/ui.c, src/undo.c, src/window.c
>>
>>
>>
>> After applying this patch, I get this error compiling on HPUX:
> ...
>     cc -c -I. -Iproto -DHAVE_CONFIG_H     -O2        -o objects/misc2.o
> misc2.c
> cc: "misc2.c", line 3387: error 1588: "n" undefined.
> cc: "misc2.c", line 3387: warning 563: Argument #1 is not the correct type.
> cc: "misc2.c", line 3387: warning 563: Argument #1 is not the correct type.
> cc: "misc2.c", line 3387: error 1588: "p" undefined.
> cc: "misc2.c", line 3387: warning 563: Argument #2 is not the correct type.
> *** Error exit code 1
>
> The attached patch seems to fix it.
>

 Thanks.  Are all the type casts really needed?  We can make
illegal_slash() also accept a const:

  illegal_slash(const char *name)

Then perhaps this works:

  return illegal_slash(name) ? -1 : stat(name, stp);

I hope stat() does take a "const char *" argument.

-- 
hundred-and-one symptoms of being an internet addict:
121. You ask for e-mail adresses instead of telephone numbers.

 /// 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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui