From xemacs-m  Fri Feb 28 09:41:39 1997
Received: from newman (root@newman.aventail.com [38.225.141.10])
	by xemacs.org (8.8.5/8.8.5) with SMTP id JAA07038
	for <xemacs-beta@xemacs.org>; Fri, 28 Feb 1997 09:41:36 -0600 (CST)
Received: from kramer.in.aventail.com.aventail.com (wmperry@kramer [192.168.1.12]) by newman (8.6.12/8.6.9) with SMTP id HAA29232; Fri, 28 Feb 1997 07:39:39 -0800
Date: Fri, 28 Feb 1997 07:39:39 -0800
Message-Id: <199702281539.HAA29232@newman>
From: "William M. Perry" <wmperry@aventail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: friedman@splode.com
Cc: xemacs-beta@xemacs.org
Subject: Re: xemacs 20 needs char-to-int
In-Reply-To: <199702281135.DAA28598@piglet.splode.com>
References: <199702281135.DAA28598@piglet.splode.com>
Errors-to: wmperry@aventail.com
Reply-to: wmperry@aventail.com
X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7</SYF`{vYQ(&RI1&EiH[FvT;J}@f!4kfz
 x_!Y#=y{Uuj9GvUi=cPuajQ(Z42R[wE@{G,sn$qGr5g/wnb*"*ktI+,CD}1Z'wxrM2ag-r0p5I6\nA
 [WJopW_J.WY;

Noah Friedman writes:
>Now that ints and chars aren't the same type anymore, xemacs needs a way to
>convert them.
>
>You really want a more efficient way of doing it than consing a string,
>which is what you have to do at the moment, as far as I can tell.
>
>    (defun char-to-int (c)
>      (string-to-int (char-to-string c)))
>
>Yuck.

  Hmmm - char-int?

-Bill P.

char-int: (CH)
  -- a built-in function.
Convert a character into an equivalent integer.
The resulting integer will always be non-negative.  The integers in
the range 0 - 255 map to characters as follows:

0 - 31		Control set 0
32 - 127	ASCII
128 - 159	Control set 1
160 - 255	Right half of ISO-8859-1

If support for Mule does not exist, these are the only valid character
values.  When Mule support exists, the values assigned to other characters
may vary depending on the particular version of XEmacs, the order in which
character sets were loaded, etc., and you should not depend on them.

