~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to lib/bitmap/sparse.c

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <grass/bitmap.h>
24
24
 
25
25
 
26
 
#define BM_col_to_byte(x)  ((x)/8)
27
 
#define BM_col_to_bit(x)   ((x)%8)
 
26
#define BM_col_to_byte(x)  ((x) >> 3)  /* x / 8 */
 
27
#define BM_col_to_bit(x)   ((x) & 7)   /* x % 8 */
28
28
 
29
29
static int depth;
30
30
 
269
269
 *  \return int
270
270
 */
271
271
 
272
 
int BM_get_map_size_sparse(struct BM *map)
 
272
size_t BM_get_map_size_sparse(struct BM *map)
273
273
{
274
274
    int i;
275
 
    int size;
 
275
    size_t size;
276
276
    struct BMlink *p;
277
277
 
278
 
    size = map->rows * sizeof(struct BMlink *);
 
278
    size = (size_t) map->rows * sizeof(struct BMlink *);
279
279
    for (i = 0; i < map->rows; i++) {
280
280
        p = ((struct BMlink **)(map->data))[i];
281
281
        while (p != NULL) {