chiark / gitweb /
Correct handling of @@ stuff inside @@?; make NC_SITES vary.
authorian <ian>
Tue, 24 Jul 2001 18:53:40 +0000 (18:53 +0000)
committerian <ian>
Tue, 24 Jul 2001 18:53:40 +0000 (18:53 +0000)
files/_.configs_setenvir
gpt

index f3cff5a..7805096 100755 (executable)
@@ -31,8 +31,10 @@ export PAGER PERLLIB PS1 TRNINIT WWW_HOME
 
 # NNTPAUTH
 
-NC_SITES=cam:bos
+@@?$ncipher@@
+NC_SITES=@@$ncipher@@:@@ $ncipher eq 'bos' ? 'cam' : 'bos' @@
 export NC_SITES
+@@;
 
 unset MAILPATH
 unset ignoreeof
diff --git a/gpt b/gpt
index 5076cc2..129ead4 100755 (executable)
--- a/gpt
+++ b/gpt
@@ -124,9 +124,12 @@ sub process_input () {
                ($to,$op,$esc,$l) = ($`,$1,$&,$');
                add_text($to);
                if ($op =~ m/[-< \$?\n]/) {
-                   $substr.= $esc if @oplist;
+                   if (!@oplist) {
+                       add_perl($op) if $op =~ m/[\$]/;
+                   } else {
+                       $substr.= $esc;
+                   }
                    push @oplist, $op;
-                   add_perl($op) if $op =~ m/[\$]/;
                } elsif ($op =~ m/[\)\}\;\:]/) {
                    err("unmatched closing \@\@$op") unless @oplist;
                    $want= pop @oplist;