qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs display.c fbfrender.c html.c tty.c unihe...


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs display.c fbfrender.c html.c tty.c unihe...
Date: Fri, 21 Dec 2007 10:32:28 +0000

CVSROOT:        /cvsroot/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        07/12/21 10:32:28

Modified files:
        .              : display.c fbfrender.c html.c tty.c unihex.c 
                         x11.c 
        libqhtml       : css.c 

Log message:
        use INT_MAX instead of MAXINT
        use INT_MIN for NO_ARG

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/display.c?cvsroot=qemacs&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/qemacs/fbfrender.c?cvsroot=qemacs&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/qemacs/html.c?cvsroot=qemacs&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/qemacs/tty.c?cvsroot=qemacs&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/qemacs/unihex.c?cvsroot=qemacs&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/qemacs/x11.c?cvsroot=qemacs&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/qemacs/libqhtml/css.c?cvsroot=qemacs&r1=1.13&r2=1.14

Patches:
Index: display.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/display.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- display.c   12 Dec 2007 11:49:02 -0000      1.9
+++ display.c   21 Dec 2007 10:32:27 -0000      1.10
@@ -155,7 +155,7 @@
     QEFont *fc;
     int i, min_ts, min_index;
 
-    min_ts = MAXINT;
+    min_ts = INT_MAX;
     min_index = -1;
     for (i = 0; i < FONT_CACHE_SIZE; i++) {
         fc = font_cache[i];

Index: fbfrender.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/fbfrender.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- fbfrender.c 12 Dec 2007 11:49:02 -0000      1.7
+++ fbfrender.c 21 Dec 2007 10:32:27 -0000      1.8
@@ -259,7 +259,7 @@
         } else {
             /* select closest size */
             uf_found = NULL;
-            dmin = MAXINT;
+            dmin = INT_MAX;
             for (i = 0;i < nb_fonts;i++) {
                 uf = fonts[i];
                 d = abs(uf->pt_size - size);

Index: html.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/html.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- html.c      6 Dec 2007 17:43:48 -0000       1.8
+++ html.c      21 Dec 2007 10:32:27 -0000      1.9
@@ -89,7 +89,7 @@
     data.ctx = hs->css_ctx;
     data.wanted_offset = s->offset;
     data.closest_offset = 0;
-    data.dmin = MAXINT;
+    data.dmin = INT_MAX;
     css_box_iterate(hs->css_ctx, hs->top_box,
                     &data, recompute_offset_func);
     s->offset = data.closest_offset;
@@ -467,7 +467,7 @@
 
  ytest:
     /* if no y intersection with selected box, then see if it is closer */
-    if (m->ydmin == MAXINT ||
+    if (m->ydmin == INT_MAX ||
         y >= m->y2 || (y + box->height) <= m->y1) {
 
         d = abs(y1 - m->yd);
@@ -475,7 +475,7 @@
             m->ydmin = d;
             m->y1 = y;
             m->y2 = y + box->height;
-            m->xdmin = MAXINT;
+            m->xdmin = INT_MAX;
         } else if (d == m->ydmin) {
             /* also do x test if on the same line */
         } else {
@@ -525,8 +525,8 @@
         m->xd = xtarget;
     }
     m->dir = dir;
-    m->xdmin = MAXINT;
-    m->ydmin = MAXINT;
+    m->xdmin = INT_MAX;
+    m->ydmin = INT_MAX;
     m->box = NULL;
     m->xdbase = 0;
     
@@ -622,13 +622,13 @@
         m->y2 = cursor_pos.y2;
         
         m->dir = dir;
-        m->xdmin = MAXINT;
+        m->xdmin = INT_MAX;
         m->box = NULL;
         
         css_box_iterate(hs->css_ctx, hs->top_box, m, left_right_func);
         if (!m->box) {
             /* no box found : go up or down */
-            html_move_up_down1(s, dir, -dir * (MAXINT / 2));
+            html_move_up_down1(s, dir, -dir * (INT_MAX / 2));
         } else {
             offset = css_get_offset_pos(hs->css_ctx, m->box,
                                         cursor_pos.x1 - m->x0, dir);
@@ -657,13 +657,13 @@
         return;
 
     /* find the box closest to x */
-    xtarget = -dir * (MAXINT / 2);
+    xtarget = -dir * (INT_MAX / 2);
     m->xd = xtarget;
     m->y1 = cursor_pos.y1;
     m->y2 = cursor_pos.y2;
     
     m->dir = dir;
-    m->xdmin = MAXINT;
+    m->xdmin = INT_MAX;
     m->box = NULL;
     css_box_iterate(hs->css_ctx, hs->top_box, m, left_right_func);
     if (m->box) {

Index: tty.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/tty.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- tty.c       20 Dec 2007 20:40:55 -0000      1.28
+++ tty.c       21 Dec 2007 10:32:27 -0000      1.29
@@ -520,7 +520,7 @@
 {
     int i, cmin, dmin, d;
     
-    dmin = MAXINT;
+    dmin = INT_MAX;
     cmin = 0;
     for (i = 0; i < NB_COLORS; i++) {
         d = color_dist(color, tty_colors[i]);

Index: unihex.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/unihex.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9

Index: x11.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/x11.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- x11.c       18 Dec 2007 12:10:50 -0000      1.18
+++ x11.c       21 Dec 2007 10:32:27 -0000      1.19
@@ -139,7 +139,7 @@
         return;
 
     /* find closest rectangle */
-    dmin = MAXINT;
+    dmin = INT_MAX;
     r2 = update_rects;
     r1 = NULL;
     for (i = 0; i < update_nb; i++) {
@@ -719,7 +719,7 @@
 #endif
     /* iterate thru each font and select closer one */
     found = 0;
-    dist_min = MAXINT;
+    dist_min = INT_MAX;
     for (i = 0; i < count; i++) {
         dist = 0;
         p = list[i] + 1;

Index: libqhtml/css.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/libqhtml/css.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- libqhtml/css.c      15 Dec 2007 16:44:32 -0000      1.13
+++ libqhtml/css.c      21 Dec 2007 10:32:28 -0000      1.14
@@ -1664,7 +1664,7 @@
     for (;;) {
         x1 = s->x0;
         x2 = s->x0 + s->total_width;
-        y_next = MAXINT;
+        y_next = INT_MAX;
         for (b1 = s->layout_state->first_float; b1 != NULL; b1 = b1->next) {
             if (b1->float_type != -1) {
                 /* if intersection in y, then update x1 and x2 */
@@ -4238,7 +4238,7 @@
 
     font = css_select_font(s->screen, props);
 
-    dmin = MAXINT;
+    dmin = INT_MAX;
     x = 0;
     posc = -1;
     for (i = 0; i < len; i++) {




reply via email to

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