bison-patches
[Top][All Lists]
Advanced

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

Re: [tim-3] Improved DJGPP support in src/files.c


From: Paul Eggert
Subject: Re: [tim-3] Improved DJGPP support in src/files.c
Date: Tue, 15 Jan 2002 16:53:53 -0800 (PST)

> From: "Tim Van Holder" <address@hidden>
> Date: Tue, 15 Jan 2002 21:31:28 +0100

> > #ifndef ISSLASH
> > # define ISSLASH(C) ((C) == '/')
> > #endif
> 
> Good enough for me.  One small point though: would those macros be meant
> for the user as well, or just for internal use by dirname.c?

My guess is that some poor benighted users will want it.  :-)


> It's just that for non-Unix systems, it's hard (if not impossible) to
> write a macro that does TRT without evaluating arguments twice (without
> relying on gcc extensions anyway).

Why not something like this?  Ugly, but it'll work.  (Or if you want
something more elegant and smaller you can replace the string with an
external table.)

#define ISSLASH(x) (! 
"...............................................\0............................................\0..................................................................................................................................................................."[(unsigned
 char) (x)])



> I'm afraid that in order to get a working solution you'd need platform
> conditionals for that one.

That's why it belongs in config.h, right?



reply via email to

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