r.buffer/main.c:
.......
/* need to keep track of distance zones - in memory.
* process MAX_DIST at a time
*
* Coding: 0 == not-yet determined, 1 == input cells,
* 2 == distance zone #1, 3 == distance zone #2, etc.
*/
read_input_map (input, mapset, ZEROFLAG);
offset = 0;
nsteps = (count - 1) / MAX_DIST + 1;
pd = distances;
for (step = 1; count > 0; step++) {
if (nsteps > 1)
G_message(_("Pass %d (of %d)"), step, nsteps);
ndist = count;
if (ndist > MAX_DIST)
ndist = MAX_DIST;
if(count_rows_with_data > 0)
execute_distance();
write_output_map(output, offset);
offset += ndist;
distances += ndist;
count -= ndist; }
...
0000e80: 2e30 0000 0000 0100 0100 0000 0000 0100 .0..............
0000e90: 0100 0000 0100 0100 0100 0000 0100 0000 ................
0000ea0: 0100 0100 0000 0100 0000 0100 0000 0100 ................
0000eb0: 0100 0000 0000 0000 0200 0000 0100 0100 ................
0000ec0: 0000 0000 0100 0000 0100 0100 0000 0000 ................
0000ed0: 0000 0100 0000 0000 0100 0000 0000 0200 ................
0000ee0: 0000 0000 0200 0100 0000 0000 0100 0100 ................
0000ef0: 0100 0100 0100 0100 0300 0000 0000 0000 ................
0000f00: 0200 0000 0100 0000 0000 0000 0100 0100 ................
0000f10: 0100 0000 0000 0000 0000 0000 0000 0200 ................
0000f20: 0200 0100 0100 0100 0100 0000 0100 0100 ................
0000f30: 0200 0100 0000 0100 0000 0200 0100 0200 ................
0000f40: eb02 0000 1000 0000 0000 0000 1469 690d .............ii.
0000f50: 0000 0300 e304 0000 1000 0000 1069 690d .............ii.
...