[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs qe.c charset.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs qe.c charset.c |
Date: |
Sat, 31 May 2014 00:26:26 +0000 |
CVSROOT: /sources/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 14/05/31 00:26:26
Modified files:
. : qe.c charset.c
Log message:
fix scoring of 4 byte charsets
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.180&r2=1.181
http://cvs.savannah.gnu.org/viewcvs/qemacs/charset.c?cvsroot=qemacs&r1=1.37&r2=1.38
Patches:
Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -b -r1.180 -r1.181
--- qe.c 30 May 2014 22:57:34 -0000 1.180
+++ qe.c 31 May 2014 00:26:26 -0000 1.181
@@ -1923,7 +1923,7 @@
void do_set_auto_coding(EditState *s, int verbose)
{
- u8 buf[4097];
+ u8 buf[4096];
int buf_size;
EditBuffer *b = s->b;
EOLType eol_type = b->eol_type;
Index: charset.c
===================================================================
RCS file: /sources/qemacs/qemacs/charset.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- charset.c 27 May 2014 22:59:49 -0000 1.37
+++ charset.c 31 May 2014 00:26:26 -0000 1.38
@@ -596,7 +596,7 @@
return 0;
}
}
- if (count_spaces + count_lines > size / 16)
+ if (count_spaces + count_lines > size / (16 * 2))
return 1;
else
return 0;
@@ -732,7 +732,7 @@
return 0;
}
}
- if (count_spaces + count_lines > size / 16)
+ if (count_spaces + count_lines > size / (16 * 2))
return 1;
else
return 0;
@@ -872,11 +872,11 @@
if (!(magic & (1 << c)))
return 0;
} else
- if (c >= 0x10000) {
+ if (c > 0x10FFFF) {
return 0;
}
}
- if (count_spaces + count_lines > size / 16)
+ if (count_spaces + count_lines > size / (16 * 4))
return 1;
else
return 0;
@@ -1002,11 +1002,11 @@
if (!(magic & (1 << c)))
return 0;
} else
- if (c >= 0x10000) {
+ if (c > 0x10FFFF) {
return 0;
}
}
- if (count_spaces + count_lines > size / 16)
+ if (count_spaces + count_lines > size / (16 * 4))
return 1;
else
return 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemacs-commit] qemacs qe.c charset.c,
Charlie Gordon <=