zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <A.Main@dcs.warwick.ac.uk>
To: hzoli@cs.elte.hu (Zoltan Hidvegi)
Cc: A.Main@dcs.warwick.ac.uk, zsh-workers@math.gatech.edu
Subject: Re: (NULL == 0) ?
Date: Mon, 27 May 1996 23:11:48 +0100 (BST)	[thread overview]
Message-ID: <25534.199605272211@stone.dcs.warwick.ac.uk> (raw)
In-Reply-To: <199605272200.AAA02444@hzoli.ppp.cs.elte.hu> from "Zoltan Hidvegi" at May 28, 96 00:00:42 am

>It is used to determine the size of buffers to store the string
>representation of an integer.  Just grep for 'SIZEOF_LONG \* 8'.

If we change the `8' to `CHAR_BIT' (which will need to be determined at
configuration time if there isn't a limits.h), it would be more
portable.  But we are assuming 8-bit bytes, as well as ASCII, in a lot
of character handling code.

>ntype in struct node has to be at least 32 bit long but it is defined to
>int.  But it would be wasting of memory to use long on systems where int
>has 32 bits and long has 64.

It might be wise to do a configuration check for the smallest type of
at least 32 bits.  There are a number of bitfields that could use
this.

>In hashtable.h it is assumed that sizeof(void*) >= sizeof(long).

We should have a union there, as we do elsewhere.  long and void * are
sufficient, but it might be neater to have some other pointer types too
(it would reduce casting, and would not decrease efficiency).

-zefram



  reply	other threads:[~1996-05-27 22:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-25 14:38 clwords bugfix Zefram
1996-05-25 18:02 ` Richard Coleman
1996-05-25 20:52   ` Zefram
1996-05-25 21:25     ` (NULL == 0) ? Richard Coleman
1996-05-25 22:00       ` Zefram
1996-05-27  0:00         ` Zoltan Hidvegi
1996-05-27  6:39           ` Bart Schaefer
1996-05-27  7:29             ` anthony baxter
1996-05-27 13:07           ` Zefram
1996-05-27 22:00             ` Zoltan Hidvegi
1996-05-27 22:11               ` Zefram [this message]
1996-05-27 22:41                 ` Zoltan Hidvegi
1996-05-27 22:54                   ` Zefram
1996-05-28  4:54                     ` Bart Schaefer
1996-05-27 23:36                 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25534.199605272211@stone.dcs.warwick.ac.uk \
    --to=a.main@dcs.warwick.ac.uk \
    --cc=hzoli@cs.elte.hu \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).