automake
[Top][All Lists]
Advanced

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

Re: 56-mying-changes.patch


From: Akim Demaille
Subject: Re: 56-mying-changes.patch
Date: 23 Feb 2001 19:34:18 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)

Tom Tromey <address@hidden> writes:

> Akim> -    local ($in_ac_output, $in_ac_replace) = (0, 0);
> Akim> +    # Watchout: these guys need dynamic scope!
> 
> Why remove the other local() though?
> Those variables also have dynamic scope :-(

Hm, do they?

I moved them inside the routines which uses them:

~/src/am % cat /tmp/in-ac.sed                                    nostromo 19:33
#n
/^sub/, /^}/ {
  /^sub/h
  /in_ac/{x; p; x; p;}
}
~/src/am % sed -f /tmp/in-ac.sed automake.in                     nostromo 19:33
sub scan_one_autoconf_file
        if (! $in_ac_replace && s/AC_REPLACE_FUNCS\s*\(\[?//)
sub scan_one_autoconf_file
            $in_ac_replace = 1;
sub scan_one_autoconf_file
        if ($in_ac_replace)
sub scan_one_autoconf_file
            $in_ac_replace = 0 if s/[\]\)].*$//;
sub scan_one_autoconf_file
        if (! $in_ac_output && s/AC_(OUTPUT|CONFIG_FILES)\s*\(\[?//)
sub scan_one_autoconf_file
            $in_ac_output = 1;
sub scan_one_autoconf_file
        if ($in_ac_output)
sub scan_one_autoconf_file
                $in_ac_output = 0;
sub scan_autoconf_files
    local ($in_ac_output, $in_ac_replace) = (0, 0);



reply via email to

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