emacs-devel
[Top][All Lists]
Advanced

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

Booleans


From: Eli Zaretskii
Subject: Booleans
Date: Sun, 15 Dec 2013 19:40:16 +0200

Paul, I'm not sure I understand why we want such a wholesale
replacement of 0/1 with false/true.  It's okay to make such changes as
part of other development, same as we do with whitespace, but why is
it a good idea to convert everything, including bitfields (which
required introduction of a new non-standard typedef), into booleans?

In any case, this part:

  -   If CCL_PROG is nil, we just reset the structure pointed by CCL.  */
  -int
  +   If CCL_PROG is nil, just reset the structure pointed by CCL.  */
  +bool
   setup_ccl_program (struct ccl_program *ccl, Lisp_Object ccl_prog)
   {
     int i;
  @@ -1933,7 +1931,7 @@ setup_ccl_program (struct ccl_program *c

         ccl_prog = ccl_get_compiled_code (ccl_prog, &ccl->idx);
         if (! VECTORP (ccl_prog))
  -       return -1;
  +       return false;
         vp = XVECTOR (ccl_prog);
         ccl->size = vp->header.size;
         ccl->prog = vp->contents;
  @@ -1950,14 +1948,11 @@ setup_ccl_program (struct ccl_program *c
     ccl->ic = CCL_HEADER_MAIN;
     for (i = 0; i < 8; i++)
       ccl->reg[i] = 0;
  -  ccl->last_block = 0;
  -  ccl->private_state = 0;
  +  ccl->last_block = false;
     ccl->status = 0;
     ccl->stack_idx = 0;
  -  ccl->suppress_error = 0;
  -  ccl->eight_bit_control = 0;
  -  ccl->quit_silently = 0;
  -  return 0;
  +  ccl->quit_silently = false;
  +  return true;
   }

as well as related changes, IMO should have been a separate commit, as
it is not a mechanical replacement, far from it.

And if changes like this:

  -#if 0
  +#if false

are intentional, then I'm afraid I don't see the point; please
explain.

Thanks.



reply via email to

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