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

« back to all changes in this revision

Viewing changes to raster/r.cross/cats.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:
17
17
 ***************************************************************************/
18
18
 
19
19
#include <string.h>
 
20
#include <grass/raster.h>
20
21
#include "glob.h"
21
22
 
22
23
static char *get_label(CELL, struct Categories *);
48
49
        lbl = get_label(cat[i], &labels[i]);
49
50
        strcat(buf, lbl);
50
51
    }
51
 
    G_set_cat(result, buf, pcats);
 
52
    Rast_set_c_cat(&result, &result, buf, pcats);
52
53
    return 0;
53
54
}
54
55
 
57
58
    char *lbl;
58
59
    static char temp[256];
59
60
 
60
 
    lbl = G_get_cat(cat, labels);
 
61
    lbl = Rast_get_c_cat(&cat, labels);
61
62
    if (*lbl == 0)
62
63
        sprintf(lbl = temp, "category %ld", (long)cat);
63
64
    return lbl;