do case insensitive comparison on domain name
[unix-history] / usr / src / usr.bin / window / wwredrawwin.c
index 7da3db4..e8ef26f 100644 (file)
@@ -1,13 +1,24 @@
-#ifndef lint
-static char sccsid[] = "@(#)wwredrawwin.c      3.10 %G%";
-#endif
-
 /*
 /*
- * Copyright (c) 1983 Regents of the University of California,
- * All rights reserved.  Redistribution permitted subject to
- * the terms of the Berkeley Software License Agreement.
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
  */
 
+#ifndef lint
+static char sccsid[] = "@(#)wwredrawwin.c      3.14 (Berkeley) %G%";
+#endif /* not lint */
+
 #include "ww.h"
 
 wwredrawwin1(w, row1, row2, offset)
 #include "ww.h"
 
 wwredrawwin1(w, row1, row2, offset)
@@ -20,6 +31,7 @@ int row1, row2, offset;
        register union ww_char *buf;
        register char *win;
        register union ww_char *ns;
        register union ww_char *buf;
        register char *win;
        register union ww_char *ns;
+       int x;
        int nchanged;
 
        for (row = row1; row < row2; row++) {
        int nchanged;
 
        for (row = row1; row < row2; row++) {
@@ -30,14 +42,13 @@ int row1, row2, offset;
                win = w->ww_win[row];
                nchanged = 0;
                for (; col < w->ww_i.r; col++)
                win = w->ww_win[row];
                nchanged = 0;
                for (; col < w->ww_i.r; col++)
-                       if (*smap++ == w->ww_index) {
+                       if (*smap++ == w->ww_index &&
+                           ns[col].c_w !=
+                           (x = buf[col].c_w ^ win[col] << WWC_MSHIFT)) {
                                nchanged++;
                                nchanged++;
-                               ns[col].c_w =
-                                       buf[col].c_w ^ win[col] << WWC_MSHIFT;
+                               ns[col].c_w = x;
                        }
                        }
-               if (nchanged > 4)
-                       wwtouched[row] |= WWU_MAJOR|WWU_TOUCHED;
-               else if (nchanged > 0)
+               if (nchanged > 0)
                        wwtouched[row] |= WWU_TOUCHED;
        }
 }
                        wwtouched[row] |= WWU_TOUCHED;
        }
 }