comparison src/device-tty.c @ 5401:4486ba63476b

Fix compile issues for C89 compilers. Use log() instead of log2().
author Jeff Sparkes <jsparkes@gmail.com>
date Sun, 17 Apr 2011 16:27:02 -0400
parents 5256fedd50e6
children 248176c74e6b
comparison
equal deleted inserted replaced
5400:aa78b0b0b289 5401:4486ba63476b
195 { 195 {
196 case DM_size_device: 196 case DM_size_device:
197 return Fcons (make_int (CONSOLE_TTY_DATA (con)->width), 197 return Fcons (make_int (CONSOLE_TTY_DATA (con)->width),
198 make_int (CONSOLE_TTY_DATA (con)->height)); 198 make_int (CONSOLE_TTY_DATA (con)->height));
199 case DM_num_bit_planes: 199 case DM_num_bit_planes:
200 return make_int (log2 (CONSOLE_TTY_DATA (con)->colors)); 200 {
201 EMACS_INT l2 = (EMACS_INT) (log (CONSOLE_TTY_DATA (con)->colors)
202 / log (2));
203 return make_int (l2);
204 }
201 case DM_num_color_cells: 205 case DM_num_color_cells:
202 return make_int (CONSOLE_TTY_DATA (con)->colors); 206 return make_int (CONSOLE_TTY_DATA (con)->colors);
203 default: /* No such device metric property for TTY devices */ 207 default: /* No such device metric property for TTY devices */
204 return Qunbound; 208 return Qunbound;
205 } 209 }