[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
COLS should be type size_t
From: |
Gurganus, Brant L |
Subject: |
COLS should be type size_t |
Date: |
Tue, 25 Jul 2006 21:11:50 -0400 |
Currently COLS is an int which can default to being signed or unsigned on different machines. As far as I can tell, though I don't have significant experience with ncurses, there shouldn't be a reason for these to be negative and since they are size of something, they should use size_t which, on most machines, should be unsigned. Ambiguity about its signed/unsigned nature can lead to problems in comparing signed and unsigned values. It should always be the case that anything you would compare COLS to would be a size_t so the signed/unsigned issue wouldn't come up.
Brant Gurganus
http://www.rose-hulman.edu/~gurganbl
- COLS should be type size_t,
Gurganus, Brant L <=