Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: FAQ, German Umlauts (patch)



Zefram wrote:
> Peter Stephenson wrote:
> >+ item(tt(PRINT_EIGHT_BIT) (tt(-1)))(
> >+ Print eight bit characters literally in completion lists, etc.
> >+ This option is not necessary if your system correctly returns the
> >+ printability of eight bit characters (see manref(ctype)(3)).
> 
> If it's only needed if the system has a bug, then a run-time option is the
> wrong way to do it.  Make it a configure-time option (--enable-pass8),
> and conditionally compile in such a special version of isprint(), using
> it instead of the system's version.

I agree with Wolfgang on this:  you simply can't tell from the system
set-up whether it supports the hardware, i.e. whether the terminal
Does the Right Thing with eight bit characters or not. If you're using
a dumb character terminal as well as a smart terminal on the same system
you definitely need the run-time option.  In any case, there's no
way of deciding automatically and (as Uli has been saying) these NEXTSTEP
people like the thing just to work.  Configuring at compile-time whether
to dump raw characters at run-time to a terminal which could be anything
is just too brutal.  (What you possibly could configure is whether or not
to compile in the *option*, but I think it's obvious that that has less
than welcome side effects for code.  More plausibly you could decide at
compile time system by system whether the option should be in effect by
default.)

> >      VERBOSE,
> >      XTRACE,
> >      USEZLE,
> >!     OPT_SIZE,
> >!     PRINTEIGHTBIT
> >  };
> 
> Also this is wrong.  OPT_SIZE must be the last entry in the list, and
> the options in the list are in alphabetical order.

that was stupid... I simply noticed the last two were out of order and
thought therefore I could dump the new one on the end.  Here's a revised
version.

*** Doc/Zsh/options.yo.p8	Wed Apr 30 09:18:38 1997
--- Doc/Zsh/options.yo	Thu Jun 26 18:33:51 1997
***************
*** 622,627 ****
--- 622,634 ----
  tt(trap) and
  tt(unset).
  )
+ pindex(PRINT_EIGHT_BIT)
+ cindex(exit status, printing)
+ item(tt(PRINT_EIGHT_BIT) (tt(-1)))(
+ Print eight bit characters literally in completion lists, etc.
+ This option is not necessary if your system correctly returns the
+ printability of eight bit characters (see manref(ctype)(3)).
+ )
  pindex(PRINT_EXIT_VALUE)
  cindex(exit status, printing)
  item(tt(PRINT_EXIT_VALUE) (tt(-1)))(
*** Src/options.c.p8	Thu Jun 26 18:17:28 1997
--- Src/options.c	Thu Jun 26 18:14:26 1997
***************
*** 144,149 ****
--- 144,150 ----
  {NULL, "overstrike",	      0,			 OVERSTRIKE},
  {NULL, "pathdirs",	      0,			 PATHDIRS},
  {NULL, "posixbuiltins",	      OPT_EMULATE|OPT_BOURNE,	 POSIXBUILTINS},
+ {NULL, "printeightbit",       0,                         PRINTEIGHTBIT},
  {NULL, "printexitvalue",      0,			 PRINTEXITVALUE},
  {NULL, "privileged",	      OPT_SPECIAL,		 PRIVILEGED},
  {NULL, "promptcr",	      OPT_ALL,			 PROMPTCR},
*** Src/utils.c.p8	Thu Jun 26 18:17:18 1997
--- Src/utils.c	Thu Jun 26 18:39:11 1997
***************
*** 175,180 ****
--- 175,182 ----
      if (isprint(c))
  	goto done;
      if (c & 0x80) {
+ 	if (isset(PRINTEIGHTBIT))
+ 	    goto done;
  	*s++ = '\\';
  	*s++ = 'M';
  	*s++ = '-';
*** Src/zsh.h.p8	Tue Jun 24 09:09:11 1997
--- Src/zsh.h	Fri Jun 27 09:35:25 1997
***************
*** 1035,1040 ****
--- 1035,1041 ----
      OVERSTRIKE,
      PATHDIRS,
      POSIXBUILTINS,
+     PRINTEIGHTBIT,
      PRINTEXITVALUE,
      PRIVILEGED,
      PROMPTCR,


-- 
Peter Stephenson <pws@xxxxxx>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77413
Deutsches Elektronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.



Messages sorted by: Reverse Date, Date, Thread, Author