From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id EAA10232 for ; Thu, 17 Aug 1995 04:24:36 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA05582 (5.65c/Gatech-10.0-IDA for ); Wed, 16 Aug 1995 14:23:20 -0400 Received: by math (5.x/SMI-SVR4) id AA18241; Wed, 16 Aug 1995 14:17:36 -0400 Resent-Date: Wed, 16 Aug 1995 11:18:47 -0700 (PDT) Old-Return-Path: Subject: Re: hzoli change: $foo:s//r/ To: Zoltan Hidvegi Date: Wed, 16 Aug 1995 11:18:47 -0700 (PDT) From: Wayne Davison Cc: zsh-workers@math.gatech.edu In-Reply-To: <199508161523.RAA22132@bolyai.cs.elte.hu> from "Zoltan Hidvegi" at Aug 16, 95 05:20:19 pm Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <9508161118.aa06965@tenor.clarinet.com> Resent-Message-Id: <"mXjPL2.0.xS4._OZCm"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/325 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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..