Changeset 9b9efa2b


Ignore:
Timestamp:
Dec 21, 2010, 5:54:31 PM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
fa90c34
Parents:
e974152
git-author:
David Benjamin <davidben@mit.edu> (12/15/10 13:24:03)
git-committer:
David Benjamin <davidben@mit.edu> (12/21/10 17:54:31)
Message:
Punt owl_util_max and owl_util_min in favor of MAX and MIN

glib already provides those macros which we happily use outside of one
place.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • popwin.c

    r03ca005 r9b9efa2b  
    3939  owl_window_get_position(parent, &glines, &gcols, 0, 0);
    4040
    41   lines = owl_util_min(glines,24)*3/4 + owl_util_max(glines-24,0)/2;
     41  lines = MIN(glines, 24) * 3/4 + MAX(glines - 24, 0) / 2;
    4242  startline = (glines-lines)/2;
    43   cols = owl_util_min(gcols,90)*15/16 + owl_util_max(gcols-90,0)/2;
     43  cols = MIN(gcols, 90) * 15 / 16 + MAX(gcols - 90, 0) / 2;
    4444  startcol = (gcols-cols)/2;
    4545
  • util.c

    r950e2da r9b9efa2b  
    495495}
    496496
    497 int owl_util_max(int a, int b)
    498 {
    499   if (a>b) return(a);
    500   return(b);
    501 }
    502 
    503 int owl_util_min(int a, int b)
    504 {
    505   if (a<b) return(a);
    506   return(b);
    507 }
    508 
    509497/* Return the base class or instance from a zephyr class, by removing
    510498   leading `un' or trailing `.d'.
Note: See TracChangeset for help on using the changeset viewer.