Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 May 2000 09:10:13 +0400 (MSD)
From:      isupov@moonhe.jinr.ru
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/18582: joe can't read @7 termcap capability and case insensitive search doesn't work for non-C localizations
Message-ID:  <200005160510.JAA39185@moonhe.jinr.ru>

next in thread | raw e-mail | index | archive | help

>Number:         18582
>Category:       ports
>Synopsis:       joe can't read @7 termcap capability and case insensitive search doesn't work for non-C localizations
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 15 22:10:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Isupov A.Yu.
>Release:        FreeBSD 3.4-RELEASE i386
>Organization:
JINR, LHE
>Environment:

	ports collection of FreeBSD 3.4-RELEASE i386,
	/usr/ports/editors/joe

>Description:

	1) joe can't read @7 termcap capability (used in cons25w entry).
	2) case insensitive search doesn't work for non-C localizations.

	Proposed two refinements, respectively:
	1) joe's termcap.c changed to permit it read termcap capabilities with
	names, beginning from '@' and '#', and 'eol .@7' entry added to all
	joe's configuration files.
	2) in the zstr.c, zstr.h two tables for upper and lower case of
	characters are added, both initialized in the main.c by localized
	functions toupper() and tolower(), and functions toup() and todn()
	are changed to use such tables.

>How-To-Repeat:

	1) <End> key doesn't work in joe with TERM=cons25r (system termcap).
	2) Try to use joe's search in some localized environment.

>Fix:
	
	1) (file /usr/ports/editors/joe/patches/patch-af, diff -c output) :
	------------------cut here-------------------
	*** termcap.c.orig	Mon Jan 23 12:07:10 1995
	--- termcap.c	Sun May 14 14:58:14 2000
	***************
	*** 275,281 ****
	   *pp++=0;
	   loop1:
	   if(pp[0]==' ' || pp[0]=='\t') goto loop;
	!  for(q=0;pp[q] && pp[q]!='#' && pp[q]!='=' && pp[q]!='@' && pp[q]!=':';++q);
	   qq=pp;
	   c=pp[q]; pp[q]=0;
	   if(c) pp+=q+1;
	--- 275,281 ----
	   *pp++=0;
	   loop1:
	   if(pp[0]==' ' || pp[0]=='\t') goto loop;
	!  for(q=0;pp[q] && pp[q]!='=' && (pp[q]!='#' && pp[q]!='@' || !q) && pp[q]!=':';++q);
	   qq=pp;
	   c=pp[q]; pp[q]=0;
	   if(c) pp+=q+1;
	*** .jmacsrc.orig	Mon Jan 23 06:45:11 1995
	--- .jmacsrc	Sun May 14 15:44:38 2000
	***************
	*** 393,398 ****
	--- 393,399 ----
	  edit		^X ^F		Edit a file: creates orphaned buffers
	  eof		^[ >		Go to end of file
	  eol		.kH		Go to end of line
	+ eol		.@7
	  eol		^E
	  eop		^[ n		(uemacs)
	  execmd		^[ x
	*** .joerc.orig	Sun Jan  8 19:04:50 1995
	--- .joerc	Sun May 14 15:45:15 2000
	***************
	*** 477,482 ****
	--- 477,483 ----
	  eof		^K ^V
	  eof		^K v
	  eol		.kH		Go to end of line
	+ eol		.@7
	  eol		^E
	  exsave		^K X		Save and exit
	  exsave		^K ^X
	*** .jpicorc.orig	Sat Jan 14 19:34:06 1995
	--- .jpicorc	Sun May 14 15:45:43 2000
	***************
	*** 372,377 ****
	--- 372,378 ----
	  eof		^[ ^V
	  eof		^[ v
	  eol		.kH		Go to end of line
	+ eol		.@7
	  eol		^E
	  execmd		^[ X		Prompt for command to execute
	  execmd		^[ ^X		Prompt for command to execute
	*** .jstarrc.orig	Sun Jan  8 19:04:39 1995
	--- .jstarrc	Sun May 14 15:46:34 2000
	***************
	*** 403,408 ****
	--- 403,409 ----
	  eof		^Q ^C
	  eof		^Q c
	  eol		.kH		Go to end of line
	+ eol		.@7
	  eol		^Q D
	  eol		^Q ^D
	  eol		^Q d
	*** .rjoerc.orig	Sun Jan  8 19:06:00 1995
	--- .rjoerc	Sun May 14 15:47:08 2000
	***************
	*** 457,462 ****
	--- 457,463 ----
	  eof		^K ^V
	  eof		^K v
	  eol		.kH		Go to end of line
	+ eol		.@7
	  eol		^E
	  exsave		^K X		Save and exit
	  exsave		^K ^X
	*** jmacsrc.orig	Mon Jan 23 06:45:11 1995
	--- jmacsrc	Mon May 15 11:51:33 2000
	***************
	*** 393,398 ****
	--- 393,399 ----
	  edit		^X ^F		Edit a file: creates orphaned buffers
	  eof		^[ >		Go to end of file
	  eol		.kH		Go to end of line
	+ eol		.@7
	  eol		^E
	  eop		^[ n		(uemacs)
	  execmd		^[ x
	*** joerc.orig	Sun Jan  8 19:04:50 1995
	--- joerc	Mon May 15 11:51:59 2000
	***************
	*** 477,482 ****
	--- 477,483 ----
	  eof		^K ^V
	  eof		^K v
	  eol		.kH		Go to end of line
	+ eol		.@7
	  eol		^E
	  exsave		^K X		Save and exit
	  exsave		^K ^X
	*** jpicorc.orig	Sat Jan 14 19:34:06 1995
	--- jpicorc	Mon May 15 11:52:21 2000
	***************
	*** 372,377 ****
	--- 372,378 ----
	  eof		^[ ^V
	  eof		^[ v
	  eol		.kH		Go to end of line
	+ eol		.@7
	  eol		^E
	  execmd		^[ X		Prompt for command to execute
	  execmd		^[ ^X		Prompt for command to execute
	*** jstarrc.orig	Sun Jan  8 19:04:39 1995
	--- jstarrc	Mon May 15 11:52:45 2000
	***************
	*** 403,408 ****
	--- 403,409 ----
	  eof		^Q ^C
	  eof		^Q c
	  eol		.kH		Go to end of line
	+ eol		.@7
	  eol		^Q D
	  eol		^Q ^D
	  eol		^Q d
	*** rjoerc.orig	Sun Jan  8 19:06:00 1995
	--- rjoerc	Mon May 15 11:53:10 2000
	***************
	*** 457,462 ****
	--- 457,463 ----
	  eof		^K ^V
	  eof		^K v
	  eol		.kH		Go to end of line
	+ eol		.@7
	  eol		^E
	  exsave		^K X		Save and exit
	  exsave		^K ^X
	------------------end of cut-------------------



	2) (file /usr/ports/editors/joe/patches/patch-ae, diff -c output) :
	------------------cut here-------------------
	*** main.c.orig	Tue Oct 15 16:54:32 1996
	--- main.c	Fri May 12 15:32:00 2000
	***************
	*** 21,26 ****
	--- 21,27 ----
	  #ifdef __FreeBSD__
	  #include <locale.h>
	  #include <ctype.h>
	+ #include "zstr.h"
	  #endif
	  #include "config.h"
	  #include "w.h"
	***************
	*** 202,207 ****
	--- 203,215 ----
	      xlata[c]=a;
	      if(isprint(c))
	       xlatc[c]=c;
	+     _ctaB[c]=_ctaB[c] & !(_upp|_low);
	+     if(isupper(c))
	+      _ctaB[c]|=_upp;
	+     if(islower(c))
	+      _ctaB[c]|=_low;
	+     _toup[c]=toupper(c);
	+     _todn[c]=tolower(c);
	    }
	  #endif
	  
	*** zstr.c.orig	Mon Jan 16 21:02:47 1995
	--- zstr.c	Fri May 12 15:15:13 2000
	***************
	*** 42,49 ****
	--- 42,57 ----
	   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
	   };
	  
	+ #ifdef __FreeBSD__
	+ unsigned char _toup[256];
	+ unsigned char _todn[256];
	+ int toup(a) { return _toup[(unsigned char)a]; }
	+ int todn(a) { return _todn[(unsigned char)a]; }
	+ #else
	  int toup(a) { return clower(a) ? a+'A'-'a' : a; }
	  int todn(a) { return cupper(a) ? a+'a'-'A' : a; }
	+ #endif
	+ 
	  unsigned Umin(a,b) unsigned a,b; { return a<b?a:b; }
	  unsigned Umax(a,b) unsigned a,b; { return a>b?a:b; }
	  int Imin(a,b) { return a<b?a:b; }
	*** zstr.h.orig	Fri May 12 14:35:44 2000
	--- zstr.h	Fri May 12 15:29:51 2000
	***************
	*** 36,41 ****
	--- 36,46 ----
	  
	  extern char _ctaB[], _ctaA[];
	  
	+ #ifdef __FreeBSD__
	+ extern unsigned char _toup[];
	+ extern unsigned char _todn[];
	+ #endif
	+ 
	  /* Character type test macros */
	  
	  /* Upper case */
	------------------end of cut-------------------


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005160510.JAA39185>