Index: [Article Count Order] [Thread]

Date:  Sun, 21 Nov 1999 12:32:45 +0900
From:  TAGA Nayuta <>
Subject:  [mayu-ml:00007] BUGS
Message-Id:  <>
X-Mail-Count: 00007


BUG 1:

		> key I-* = 
		> と記述すると、この文以降のデフォルトモディファイヤは 
		> ~C-~M-~S-*NL-*CL-*SL-I- となります。


		> key *I- = 
		> と記述すると、この文以降のデフォルトモディファイヤは 
		> ~C-~M-~S-*NL-*CL-*SL-*I- となります。


BUG 2:

BUG 3:

BUG 4:

	TeraTerm で emacs を使っているときに、反対側のウィンドウをスク

	keymap TeraTerm
	  key M-PageUp => C-c BackSpace
	  key M-PageDown => C-c Space

REF 1:
	Windows で emacs 的キーバインディングを実現するソフト。

∩∩ | TAGA Nayuta <> 多賀 奈由太
"∪" | Department of Information Science, University of Tokyo
Bug in regexp::regexec( )
There is a bug in regexp::regexec() in the for() clause at line 1100
 causing the input string to be overrunned by missing the zero termination.

for ( LPTSTR s = string; s != NULL; s = _tcschr( s+1 , regstart ) )
	if ( executor.regtry( s) ) return true;
return false;

changed to:
for ( LPTSTR s = string; s != NULL; s = _tcschr( s+1 , regstart ) )
	if ( executor.regtry( s) ) return true;
	if (*s == 0) return false; 
return false;

This seems to correct the problem.
substring problems with more than one sub-pattern
Just downloaded the source and compiled it to a DLL. 
I have problem with Substrings. 
Given a pattern "NLSGet(\(\".*\"\))" 
and a string like "this is an nlsGet(\"test\")" everything works fine (re[1] return "test"). 
As soon as there is more than one sub-pattern in my regexp, the substrings returned by the [] operator are all bogus. 
and re.Match("this is an NLSGet(\"test\")") 
SubStrings returns 2 (OK) 
rgx[1] returns "N" which is wrong (should be "NLSGet" or "NLSGetv"; I debugged operator[] and the length is really 6, but after memcpy only 1 character is in the buffer (more specifically there is a 0x0 in the 2nd position of the buffer). 

I tried lots of things: 
compiling different versions with and without _MBCS, with and without _UNICODE. Without the _MBCS I get link errors; your documentation says MBCS is not supported. 
I couldn't get any of them to work. 

Please help. 
What are the "right" compiler switches? Is there a VC 6 compatible version?
word matching and \0, \1...
Great class. It seems however that the sub-expressions "\0", "\1",
"\2"... do not work with "word mathing" patterns. For instance with
(\<foo\>) as a regular expression, I can specify "&", but not "\0" nor
"\1" in the replace expression. I'm not so familiar with Harry
Spencer's code to find out how to add it, but some comments in your
source seem to confirm this lack. Some hints?
In fact I see that it DOES work if you specify \<(foo)\> instead of
(\<foo\>). This may be a good workaround.
Excelent work Guy. Thankyou very much for the super class, and
wrapper, and I don't mind at all that it's using CString etc:)

However, GetErrorString() sometimes does not work... enter "*" as your
regex (clearly invalid), this fails to compile but the calling code
can't see the szError that was correctly set up as it's in a local

// First pass: determine size, legality.
 CRegValidator tester( exp );
 if (tester.reg(0, &flags) == NULL)
  return false;

This fix(?) seems to do the trick. The szError in tester is a local
object, and hence cannot be accessed by any calling functionality.