qemacs-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemacs-commit] qemacs tty.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs tty.c
Date: Fri, 19 Jun 2015 21:39:07 +0000

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        15/06/19 21:39:07

Modified files:
        .              : tty.c 

Log message:
        commented casts

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/tty.c?cvsroot=qemacs&r1=1.63&r2=1.64

Patches:
Index: tty.c
===================================================================
RCS file: /sources/qemacs/qemacs/tty.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- tty.c       3 May 2015 10:16:15 -0000       1.63
+++ tty.c       19 Jun 2015 21:39:07 -0000      1.64
@@ -830,9 +830,8 @@
 unsigned int const *tty_fg_colors = tty_putty_colors;
 int tty_fg_colors_count = 16;
 
-static inline int color_dist(unsigned int c1, unsigned int c2)
-{
-
+static inline int color_dist(unsigned int c1, unsigned int c2) {
+    /* using casts because c1 and c2 are unsigned */
     return      abs((int)((c1 >>  0) & 0xff) - (int)((c2 >>  0) & 0xff)) +
             2 * abs((int)((c1 >>  8) & 0xff) - (int)((c2 >>  8) & 0xff)) +
                 abs((int)((c1 >> 16) & 0xff) - (int)((c2 >> 16) & 0xff));



reply via email to

[Prev in Thread] Current Thread [Next in Thread]