Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: hzoli change: $foo:s//r/
- X-seq: zsh-workers 325
- From: Wayne Davison <wayne@xxxxxxxxxxxxxxxxxx>
- To: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- Subject: Re: hzoli change: $foo:s//r/
- Date: Wed, 16 Aug 1995 11:18:47 -0700 (PDT)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <199508161523.RAA22132@xxxxxxxxxxxxxxxxx> from "Zoltan Hidvegi" at Aug 16, 95 05:20:19 pm
If you wish to initialize globals in a file that is used to either
declare or define, I find the following syntax more readable:
--------------------------------------------------------
#ifdef GLOBALS
# define EXTERN
# define INIT(x) = x
#else
# define EXTERN extern
# define INIT(x)
#endif
[...]
/* the last l for s/l/r/ history substitution */
EXTERN char *hsubl INIT(NULL);
/* the last r for s/l/r/ history substitution */
EXTERN char *hsubr INIT(NULL);
--------------------------------------------------------
This can be used for any type variable and could simplify a few
of the other #ifdef GLOBALS initializations in the file.
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author