zsh-workers
 help / color / mirror / code / Atom feed
* How ANSI can we assume C?
@ 2005-02-23  9:23 Andrey Borzenkov
  2005-02-23  9:42 ` Andrey Borzenkov
  2005-02-23 11:13 ` Peter Stephenson
  0 siblings, 2 replies; 4+ messages in thread
From: Andrey Borzenkov @ 2005-02-23  9:23 UTC (permalink / raw)
  To: zsh-workers

As long as widechar support remains conditional, defining wide/non-wide 
versions really becomes nightmare.

Specifically I'd like simply use

#define ZWC(c) L ## c (or even L ## 'c')

and use it everyhere. It is much easier to use than inventing obscure names 
for characters.

-andrey


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How ANSI can we assume C?
  2005-02-23  9:23 How ANSI can we assume C? Andrey Borzenkov
@ 2005-02-23  9:42 ` Andrey Borzenkov
  2005-02-23 11:01   ` Peter Stephenson
  2005-02-23 11:13 ` Peter Stephenson
  1 sibling, 1 reply; 4+ messages in thread
From: Andrey Borzenkov @ 2005-02-23  9:42 UTC (permalink / raw)
  To: zsh-workers

On Wednesday 23 February 2005 12:23, Andrey Borzenkov wrote:
> As long as widechar support remains conditional, defining wide/non-wide
> versions really becomes nightmare.
>
> Specifically I'd like simply use
>
> #define ZWC(c) L ## c (or even L ## 'c')
                        ^^^^^^^^^^^^^^^^^ nope, bad idea
>
> and use it everyhere. It is much easier to use than inventing obscure names
> for characters.
>

And it also allows wide strings in place which is fast impossible otherwise 
without tons of ifdef


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How ANSI can we assume C?
  2005-02-23  9:42 ` Andrey Borzenkov
@ 2005-02-23 11:01   ` Peter Stephenson
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2005-02-23 11:01 UTC (permalink / raw)
  To: zsh-workers

Andrey Borzenkov wrote:
> On Wednesday 23 February 2005 12:23, Andrey Borzenkov wrote:
> > As long as widechar support remains conditional, defining wide/non-wide
> > versions really becomes nightmare.
> >
> > Specifically I'd like simply use
> >
> > #define ZWC(c) L ## c (or even L ## 'c')
>                         ^^^^^^^^^^^^^^^^^ nope, bad idea
> >
> > and use it everyhere. It is much easier to use than inventing obscure names
> > for characters.
> >
> 
> And it also allows wide strings in place which is fast impossible otherwise 
> without tons of ifdef

The code is already full of "const"s.  I suspect we can probably get
away with this.  I hope the last K&R compiler has now died...

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How ANSI can we assume C?
  2005-02-23  9:23 How ANSI can we assume C? Andrey Borzenkov
  2005-02-23  9:42 ` Andrey Borzenkov
@ 2005-02-23 11:13 ` Peter Stephenson
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2005-02-23 11:13 UTC (permalink / raw)
  To: zsh-workers

Andrey Borzenkov wrote:
> #define ZWC(c) L ## c

A further thought is that we only need this feature when
ZLE_UNICODE_SUPPORT is defined.  For older compilers we don't need to
paste tokens:

#ifdef ZLE_UNICODE_SUPPORT
#define ZWC(c) L ## c
#else
#define ZWC(c)	c
#endif

I think that's unobjectionable.  It's very hard if not impossible to
imagine a system with multibyte and wide character support using a K&R
compiler.

I'll change this in the patch I'm doing.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-02-23 11:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-23  9:23 How ANSI can we assume C? Andrey Borzenkov
2005-02-23  9:42 ` Andrey Borzenkov
2005-02-23 11:01   ` Peter Stephenson
2005-02-23 11:13 ` Peter Stephenson

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).