Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

user/2907: mg regex extension and minibuffer patch

From: <roman(at)amicapital.com>
Date: Mon Aug 26 2002 - 23:21:06 EDT


>Number: 2907
>Category: user
>Synopsis: regexes limited to 80 characters echo line displayed poorly
>Confidential: no
        

	System      : OpenBSD 3.1
	Architecture: OpenBSD.i386
	Machine     : i386

>Description:
Issues in within the mg editor. The size of regular expressions and search patterns in the editor was limited to 80 characters. The minibuffer would not display characters typed after the cursor reached the end of the terminal line.

>How-To-Repeat:
        

>Fix:

Index: src/usr.bin/mg/def.h



RCS file: /cvs/src/usr.bin/mg/def.h,v
retrieving revision 1.39
diff -u -u -r1.39 def.h
--- src/usr.bin/mg/def.h        18 Mar 2002 01:45:54 -0000      1.39
+++ src/usr.bin/mg/def.h        26 Aug 2002 15:16:11 -0000
@@ -31,7 +31,7 @@
 #define NLINE  256             /* Length, line.                 */
 #define PBMODES 4              /* modes per buffer              */
 #define NKBDM  256             /* Length, keyboard macro.       */
-#define NPAT   80              /* Length, pattern.              */
+#define NPAT   160             /* Length, pattern.              */
 #define HUGE   1000            /* A rather large number.        */
 #define NSRCH  128             /* Undoable search commands.     */
 #define NXNAME 64              /* Length, extended command.     */
Index: src/usr.bin/mg/echo.c

RCS file: /cvs/src/usr.bin/mg/echo.c,v
retrieving revision 1.21
diff -u -u -r1.21 echo.c
--- src/usr.bin/mg/echo.c       11 Mar 2002 13:02:56 -0000      1.21
+++ src/usr.bin/mg/echo.c       26 Aug 2002 15:16:11 -0000
@@ -724,6 +724,14 @@
                }
                ttputc(c);
                ++ttcol;
+       } else {
+               eerase();
+               if (ISCTRL(c)) {
+                       eputc('^');
+                       c = CCHR(c);
+               }
+               ttputc(c);
+               ++ttcol;
        }

 }

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

Received on Thu Nov 7 15:58:29 2002

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:36 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library