[GRASS-dev] Re: [GRASS-user] r.stats: negative cell counts and
percentages
Hamish
hamish_b at yahoo.com
Thu Oct 1 09:43:13 EDT 2009
Hamish wrote:
> I notice r.info uses unsigned long long + printf %llu
> Shall we standardize on that? If it can be done without
> dealing with --enable-lfs all the better, I'm pretty sure
> that LFS has more to do with which 64bit friendly glibc
> functions to use so not relevant. But I'm not 100% sure
> about this stuff so I ask.
... and g.region uses an #ifdef:
#ifdef HAVE_LONG_LONG_INT
fprintf(stdout, "%-*s %lld\n", width, "cells:",
(long long)window->rows * window->cols);
if (print_flag & PRINT_3D)
fprintf(stdout, "%-*s %lld\n", width, "3dcells:",
(long long)window->rows3 * window->cols3 *
window->depths);
#else
fprintf(stdout, "%-*s %ld\n", width, "cells:",
(long)window->rows * window->cols);
if (print_flag & PRINT_3D)
fprintf(stdout, "%-*s %ld\n", width, "3dcells:",
(long)window->rows3 * window->cols3 * window->depths);
#endif
Hamish
More information about the grass-dev
mailing list