comparison src/screen.c @ 2675:f987220caa57 v7.3.094

updated for version 7.3.094 Problem: Using abs() requires type cast to int. Solution: Use labs() so that the value remains long. (Hong Xu)
author Bram Moolenaar <bram@vim.org>
date Thu, 30 Dec 2010 14:57:08 +0100
parents a03f7551bacc
children 0606065af0a0
comparison
equal deleted inserted replaced
2674:f921368d43c3 2675:f987220caa57
2315 if (wp->w_p_nu) 2315 if (wp->w_p_nu)
2316 /* 'number' */ 2316 /* 'number' */
2317 num = (long)lnum; 2317 num = (long)lnum;
2318 else 2318 else
2319 /* 'relativenumber', don't use negative numbers */ 2319 /* 'relativenumber', don't use negative numbers */
2320 num = (long)abs((int)get_cursor_rel_lnum(wp, lnum)); 2320 num = labs((long)get_cursor_rel_lnum(wp, lnum));
2321 2321
2322 sprintf((char *)buf, "%*ld ", w, num); 2322 sprintf((char *)buf, "%*ld ", w, num);
2323 #ifdef FEAT_RIGHTLEFT 2323 #ifdef FEAT_RIGHTLEFT
2324 if (wp->w_p_rl) 2324 if (wp->w_p_rl)
2325 /* the line number isn't reversed */ 2325 /* the line number isn't reversed */
3473 if (wp->w_p_nu) 3473 if (wp->w_p_nu)
3474 /* 'number' */ 3474 /* 'number' */
3475 num = (long)lnum; 3475 num = (long)lnum;
3476 else 3476 else
3477 /* 'relativenumber', don't use negative numbers */ 3477 /* 'relativenumber', don't use negative numbers */
3478 num = (long)abs((int)get_cursor_rel_lnum(wp, 3478 num = labs((long)get_cursor_rel_lnum(wp, lnum));
3479 lnum));
3480 3479
3481 sprintf((char *)extra, "%*ld ", 3480 sprintf((char *)extra, "%*ld ",
3482 number_width(wp), num); 3481 number_width(wp), num);
3483 if (wp->w_skipcol > 0) 3482 if (wp->w_skipcol > 0)
3484 for (p_extra = extra; *p_extra == ' '; ++p_extra) 3483 for (p_extra = extra; *p_extra == ' '; ++p_extra)