[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tmpdir.c:path_search() v. VMS

From: Paul Eggert
Subject: Re: tmpdir.c:path_search() v. VMS
Date: Mon, 15 Jul 2013 14:48:23 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7

On 07/15/2013 01:10 PM, Steven M. Schweda wrote:
>    Around here, I get fewer %SYSTEM-F-ACCVIO run-time complaints if I
> reorder the arguments:

Thanks, I fixed that typo.

 (No need for the "(int)" type cast around here, either.)

The cast is needed on some platforms, and shouldn't hurt on VMS.

>    Call me old-fashioned, but if I were writing code which does integer
> arithmetic with a variable ("dlen + add_slash + plen + 6 + 1"), then I'd
> probably declare it as "int" rather than "bool", especially if the code
> works only if "true" is one, "false" is zero, and "!" doesn't mess that
> up.

"bool" has that property in C99, as well as in the Gnulib substitute
for stdbool.  So it should be safe.

The general style I use nowadays is that if something is always either
0 or 1, I make it 'bool'.  Admittedly the style is not for everybody.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]