Bug#241342: Acknowledgement (zed: C/C++ syntax highlighting catches too much)
Original patch failed to catch underscores. Here's a new one.
--- edvis.cc.orig 2000-04-05 02:36:20.000000000 -0700
+++ edvis.cc 2004-03-31 15:18:13.000000000 -0800
@@ -52,6 +52,8 @@
/***************************************************************************/
+#define istokchar(c) (isalnum(c) || (c) == '_')
+
int editor::coloracpp(unsigned short int *buf,char *str,
int vidx,int len,int ss)
{
@@ -135,7 +137,7 @@
while(*i!='\0')
{
- if (memcmp(p,i+1,(int)(*i-'0'))==0)
+ if (memcmp(p,i+1,(int)(*i-'0'))==0 && !istokchar(p[*i-'0']))
{ ava=(int)(*i-'0'); save1=ava; stato=12; break; }
i+=(int)(*i-'0')+1;
}
Reply to: