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

« back to all changes in this revision

Viewing changes to raster/r.flow/mem.h

  • 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:
8
8
#define SEGCOLS ((int) (region.cols/3) + 1)
9
9
#define SEGROWS ((int)(MB/region.cols/3) <= 1 ? 1 : (int)(MB/region.cols/3))
10
10
 
11
 
#ifdef MAIN
12
 
CELL v;                         /* address for segment retrieval macros */
13
 
#else
14
11
extern CELL v;
15
 
#endif
16
12
 
17
13
 
18
14
/*
33
29
void put_row_seg( /* l, row */ );
34
30
 
35
31
#define get_row(l, row) \
36
 
    ((parm.seg && (segment_flush(l.seg) < 1 || \
37
 
                   segment_get_row(l.seg, l.buf[row] - l.col_offset, \
 
32
    ((parm.seg && (Segment_flush(l.seg) < 1 || \
 
33
                   Segment_get_row(l.seg, l.buf[row] - l.col_offset, \
38
34
                                          row + l.row_offset) < 1)) ? \
39
35
        (sprintf(string, "r.flow: cannot write segment file for %s", l.name),\
40
36
         G_fatal_error(string), (DCELL *) NULL) : \
42
38
 
43
39
/*   This was is Astley's version 12...
44
40
   > #define get_cell_row(l, row) \
45
 
   >     ((parm.seg && (segment_flush(l.seg) < 1 || \
46
 
   >                  segment_get_row(l.seg, l.buf[row] - l.col_offset, \
 
41
   >     ((parm.seg && (Segment_flush(l.seg) < 1 || \
 
42
   >                  Segment_get_row(l.seg, l.buf[row] - l.col_offset, \
47
43
   >                                         row + l.row_offset) < 1)) ? \
48
44
   >       (sprintf(string, "r.flow: cannot write segment file for %s", l.name),\
49
45
   >        G_fatal_error(string), (CELL *) NULL) : \
53
49
 
54
50
#define aspect(row, col) \
55
51
    (parm.seg ? \
56
 
        (segment_get(as.seg, &v, \
 
52
        (Segment_get(as.seg, &v, \
57
53
                        row + as.row_offset, col + as.col_offset) < 1 ? \
58
54
          (sprintf(string,"r.flow: cannot read segment file for %s",as.name), \
59
 
           G_fatal_error(string)) : \
 
55
           G_fatal_error(string), 0) :                                  \
60
56
          v) : \
61
57
        (parm.mem ? \
62
58
           aspect_fly(el.buf[row - 1] + col, \
66
62
 
67
63
#define get(l, row, col) \
68
64
    (parm.seg ? \
69
 
        (segment_get(l.seg, &v, row + l.row_offset, col + l.col_offset) < 1 ? \
 
65
        (Segment_get(l.seg, &v, row + l.row_offset, col + l.col_offset) < 1 ? \
70
66
          (sprintf(string,"r.flow: cannot read segment file for %s",l.name),\
71
 
           G_fatal_error(string)) : \
 
67
           G_fatal_error(string), 0) : \
72
68
         v) : \
73
69
        l.buf[row][col])
74
70
 
75
71
#define put(l, row, col, w) \
76
72
    (parm.seg ? \
77
73
        (v = w, \
78
 
         segment_put(l.seg, &v, row + l.row_offset, col + l.col_offset) < 1 ? \
 
74
         Segment_put(l.seg, &v, row + l.row_offset, col + l.col_offset) < 1 ? \
79
75
          (sprintf(string,"r.flow: cannot write segment file for %s",l.name), \
80
 
           G_fatal_error(string)) : \
 
76
           G_fatal_error(string), 0) : \
81
77
         0) : \
82
78
        (l.buf[row][col] = w))