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 f3cff5a474fc8d32c0cbde1964d5107467963329..7805096f2ef65fd66dd3becf48249733e8d79524 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 5076cc2ea3c8682beeafd44825bdf717f1c81e2c..129ead4db67b7928bc1989705c1d81f26dfba7ab 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;