anchor.diff:  : (nvupdate-one) ( adr type -- "value" )
      CASE
      1 OF aligned @ (.) ENDOF
  -   2 OF drop s" 0 0" ENDOF
  +   2 OF drop 0 0 ENDOF
      3 OF count ENDOF
      4 OF c@ IF s" true" ELSE s" false" THEN ENDOF
      5 OF c@ (.) ENDOF \ XXX: print symbolically
  
positive.code: 
  : .print-all-env
     .printenv-header
     envvars cell+ BEGIN @ dup WHILE dup link> >name
     name>string .print-one-env cr REPEAT drop
  ;
  
  : printenv
     parse-word dup 0= IF
     2drop .print-all-env ELSE findenv dup 0=
     ABORT" not a configuration variable"
     rot over cr ." Current: " (printenv)
     cr ." Default: " (printenv) THEN
  ;
  
  \ set envvar(s) to default value
  
negative.code:   drop c@ isdigit if true else false then ;
  
  : findtype ( param len name len -- param len name len type )
     2dup findenv                         \ try to find type of envvar
     dup IF                               \ found a type?
        nip nip
        EXIT
     THEN
  
     \ No type found yet, try to auto-detect:
     drop 2swap
     2dup test-flag IF
        4 -rot                         \ boolean type
     ELSE
        2dup test-secmode IF
           5 -rot                      \ secmode type
        ELSE
           2dup test-int IF
              1 -rot                   \ integer type
           ELSE
              2dup test-string
              IF 3 ELSE 2 THEN         \ 3 = string, 2 = default to bytes
              -rot
           THEN
        THEN
     THEN
     rot
     >r 2swap r>
  ;
  
  \ set an envvar
  : $setenv ( param len name len -- )
     4dup set-option
     findtype
     -rot $CREATE
     CASE
        1 OF evaluate env-int ENDOF \ XXX: wants decimal and 0x...
        2 OF env-bytes ENDOF
        3 OF env-string ENDOF
        4 OF evaluate env-flag ENDOF
        5 OF evaluate env-secmode ENDOF \ XXX: recognize none, command, full
     ENDCASE
  ;
  
  \ print an envvar
  : (printenv) ( adr type -- )
     CASE
     1 OF aligned @ . ENDOF
     2 OF aligned dup cell+ swap @ swap . . ENDOF
     3 OF count type ENDOF
     4 OF c@ IF ." true" ELSE ." false" THEN ENDOF
     5 OF c@ . ENDOF \ XXX: print symbolically
  