From owner-freebsd-ports Mon May 15 22:10:25 2000 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id EC4A237BA29 for ; Mon, 15 May 2000 22:10:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id WAA49836; Mon, 15 May 2000 22:10:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from jimex.jinr.ru (jimex.jinr.ru [159.93.17.7]) by hub.freebsd.org (Postfix) with ESMTP id 91B5437B5B6 for ; Mon, 15 May 2000 22:09:24 -0700 (PDT) (envelope-from isupov@moonhe.jinr.ru) Received: from moonhe.jinr.ru (isupov@moonhe.jinr.ru [159.93.18.27]) by jimex.jinr.ru (8.8.8/8.8.4) with ESMTP id JAA02583 for ; Tue, 16 May 2000 09:09:21 +0400 (MSD) Received: (from isupov@localhost) by moonhe.jinr.ru (8.9.3/8.9.3) id JAA39185; Tue, 16 May 2000 09:10:13 +0400 (MSD) (envelope-from isupov) Message-Id: <200005160510.JAA39185@moonhe.jinr.ru> Date: Tue, 16 May 2000 09:10:13 +0400 (MSD) From: isupov@moonhe.jinr.ru Reply-To: isupov@moonhe.jinr.ru To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/18582: joe can't read @7 termcap capability and case insensitive search doesn't work for non-C localizations Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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) 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 #include + #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 ab?a:b; } int Imin(a,b) { return aRelease-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message