No question hunks from slang-1.4.6 patchset
- From: "Andrew V. Samoilov" <andrew email zp ua>
- To: mc-devel gnome org
- Subject: No question hunks from slang-1.4.6 patchset
- Date: Fri, 22 Oct 2004 20:57:10 +0300 (EEST)
Hello,
--
Regards,
Andrew V. Samoilov.
diff -ur --new-file slang-1.4.5/src/sldisply.c slang-1.4.6/src/sldisply.c
--- slang-1.4.5/src/sldisply.c Sun Feb 10 02:39:19 2002
+++ slang-1.4.6/src/sldisply.c Mon Oct 7 16:36:22 2002
@@ -1700,7 +1739,7 @@
blank = *p1;
/* black+white attributes do not support bce */
else
- blank = 32;
+ blank = ' ';
while ((p1 < pmax) && (CHAR_EQS (*p1, blank)))
p1++;
@@ -1740,7 +1779,7 @@
n_spaces = 0;
while (p < pmax)
{
- if (CHAR_EQS(*q, 32) && CHAR_EQS(*p, 32))
+ if (CHAR_EQS(*q, ' ') && CHAR_EQS(*p, ' '))
{
/* If *q is not a space, we would have to overwrite it.
* However, if *q is a space, then while *p is also one,
@@ -1749,8 +1788,8 @@
space_match = p;
p++; q++;
while ((p < pmax)
- && CHAR_EQS(*q, 32)
- && CHAR_EQS(*p, 32))
+ && CHAR_EQS(*q, ' ')
+ && CHAR_EQS(*p, ' '))
{
p++;
q++;
@@ -1811,20 +1850,22 @@
}
*buf = 0;
+ /* At this point, the buffer contains characters that do not match */
if (buf != buffer) send_attr_str (buffer);
buf = buffer;
if (n_spaces
&& ((p < pmax) /* erase to eol will achieve this effect*/
- || (space_char != 32)))/* unless space_char is not a simple space */
+ || (space_char != ' ')))/* unless space_char is not a simple space */
{
forward_cursor (n_spaces, row);
}
-
/* Now we overwrote what we could and cursor is placed at position
* of a possible match of new and old. If this is the case, skip
* some more.
*/
+
+ /* Note that from here on, the buffer will contain matched characters */
#if !SLANG_HAS_KANJI_SUPPORT
while ((p < pmax) && CHAR_EQS(*p, *q))
{
@@ -1888,6 +1929,12 @@
}
}
+ /* At this point we have reached the end of the new string with the
+ * exception of space_chars hanging off the end of it, but we may not have
+ * reached the end of the old string if they did not match.
+ */
+
+ /* Here the buffer will consist only of characters that have matched */
if (buf != buffer)
{
if (q < qmax)
@@ -2215,7 +2262,7 @@
if (is_xterm && (Del_Bol_Str == NULL))
Del_Bol_Str = "\033[1K";
if (is_xterm && (Del_Eol_Str == NULL))
- Del_Bol_Str = "\033[K";
+ Del_Eol_Str = "\033[K";
Rev_Vid_Str = SLtt_tgetstr("mr");
if (Rev_Vid_Str == NULL) Rev_Vid_Str = SLtt_tgetstr("so");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]