Martin Landa ad49a009a7 g.mapsets: clean up list_mapsets fns %!s(int64=15) %!d(string=hai) anos
..
colors af46ae1b89 +different monthly precip color table %!s(int64=15) %!d(string=hai) anos
FIPS.code db49180dd7 welcome to GRASS 7.0.svn %!s(int64=17) %!d(string=hai) anos
G.h 0b7dc05f0d Split G__ between lib/gis and lib/raster %!s(int64=16) %!d(string=hai) anos
Makefile af2133adf1 Move regex/glob G__ls() filters into lib/gis %!s(int64=15) %!d(string=hai) anos
README.TYPE db49180dd7 welcome to GRASS 7.0.svn %!s(int64=17) %!d(string=hai) anos
adj_cellhd.c 7088a02761 Generate fatal errors rather than returning a status, for: %!s(int64=15) %!d(string=hai) anos
alloc.c 7c8c38685b Optimisations: %!s(int64=15) %!d(string=hai) anos
area.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
area_ellipse.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
area_poly1.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
area_poly2.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
area_sphere.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
ascii_chk.c c7041e9ca3 Remove unnecessary return values %!s(int64=16) %!d(string=hai) anos
asprintf.c 06ad8336d1 Fix G_snprintf() to allow for bug in Windows vsnprintf() %!s(int64=15) %!d(string=hai) anos
basename.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
bres_line.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
clicker.c c313e28597 Bundle static variables into per-file structures %!s(int64=16) %!d(string=hai) anos
color_str.c 8db528aa65 color_str.c moved back to libgis (modules fixed) %!s(int64=16) %!d(string=hai) anos
colors.desc af46ae1b89 +different monthly precip color table %!s(int64=15) %!d(string=hai) anos
commas.c c7041e9ca3 Remove unnecessary return values %!s(int64=16) %!d(string=hai) anos
copy_dir.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
copy_file.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
counter.c aff756a341 Fix G_is_initialized() for case of concurrent initialisation attempts %!s(int64=16) %!d(string=hai) anos
date.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
datum.c ab082da4e0 Add "const" where appropriate to libgis return types %!s(int64=16) %!d(string=hai) anos
datum.table 72e1e2bf11 Add Swedish datum rt90 %!s(int64=15) %!d(string=hai) anos
datumtransform.table 95a1a4b2df reword to avoid confusion with mathematical 'add' (merge from devbr6 https://trac.osgeo.org/grass/changeset/40880) %!s(int64=15) %!d(string=hai) anos
debug.c 0b7dc05f0d Split G__ between lib/gis and lib/raster %!s(int64=16) %!d(string=hai) anos
distance.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
done_msg.c c7041e9ca3 Remove unnecessary return values %!s(int64=16) %!d(string=hai) anos
element_list 631b3596e9 Move element_list to lib/gis, for earlier availability %!s(int64=16) %!d(string=hai) anos
ellipse.table db49180dd7 welcome to GRASS 7.0.svn %!s(int64=17) %!d(string=hai) anos
endian.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
env.c 88abdb3fab Eliminate G_copy(); replace with memcpy() or assignment %!s(int64=15) %!d(string=hai) anos
error.c ca1fcb75a4 Eliminate use of [G_]popen() %!s(int64=15) %!d(string=hai) anos
file_name.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to %!s(int64=16) %!d(string=hai) anos
find_cell.c 3e65212312 libgis: debug G_find_raster/vector() %!s(int64=15) %!d(string=hai) anos
find_etc.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
find_file.c ba2fe339fb Always allocate returned mapset (so that it can be freed) %!s(int64=15) %!d(string=hai) anos
find_vect.c 3e65212312 libgis: debug G_find_raster/vector() %!s(int64=15) %!d(string=hai) anos
flate.c 4c00de6892 Fix signedness mismatch %!s(int64=15) %!d(string=hai) anos
fmode.c 1acdd0be01 Build system clean-up %!s(int64=16) %!d(string=hai) anos
geodesic.c c7041e9ca3 Remove unnecessary return values %!s(int64=16) %!d(string=hai) anos
geodist.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
get_ellipse.c 4a29361f14 Generate fatal errors rather than returning a status, for: %!s(int64=15) %!d(string=hai) anos
get_projinfo.c 4a29361f14 Generate fatal errors rather than returning a status, for: %!s(int64=15) %!d(string=hai) anos
get_window.c df4d81abd4 Move raster-specific functions from lib/gis to lib/raster: %!s(int64=15) %!d(string=hai) anos
getl.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
gisbase.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
gisdbase.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
gisinit.c 8568dbe3ac Revert https://trac.osgeo.org/grass/changeset/40855 (breaks g.proj, g.gisenv) %!s(int64=15) %!d(string=hai) anos
gislib.dox 664305e4b8 gisprompt docs updated based on Glynn's notes in ML %!s(int64=15) %!d(string=hai) anos
handler.c b9d454169d Add fatal error handlers %!s(int64=15) %!d(string=hai) anos
home.c 384d7f7b04 remove useless comment, we have to return something. probably the doxygen comments need adjustment %!s(int64=16) %!d(string=hai) anos
intersect.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
is.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
key_value1.c 4a29361f14 Generate fatal errors rather than returning a status, for: %!s(int64=15) %!d(string=hai) anos
key_value2.c 4a29361f14 Generate fatal errors rather than returning a status, for: %!s(int64=15) %!d(string=hai) anos
key_value3.c 4a29361f14 Generate fatal errors rather than returning a status, for: %!s(int64=15) %!d(string=hai) anos
key_value4.c 4a29361f14 Generate fatal errors rather than returning a status, for: %!s(int64=15) %!d(string=hai) anos
legal_name.c b2a54a6471 gislib: G_find_cell renamed to G_find_raster %!s(int64=16) %!d(string=hai) anos
line_dist.c c7041e9ca3 Remove unnecessary return values %!s(int64=16) %!d(string=hai) anos
list.c ca1fcb75a4 Eliminate use of [G_]popen() %!s(int64=15) %!d(string=hai) anos
ll_format.c ab082da4e0 Add "const" where appropriate to libgis return types %!s(int64=16) %!d(string=hai) anos
ll_scan.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
locale.c 474402cb81 Various MinGW bugfixes from Rosen Matev %!s(int64=16) %!d(string=hai) anos
location.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
ls.c c7041e9ca3 Remove unnecessary return values %!s(int64=16) %!d(string=hai) anos
ls_filter.c af2133adf1 Move regex/glob G__ls() filters into lib/gis %!s(int64=15) %!d(string=hai) anos
mach_name.c 474402cb81 Various MinGW bugfixes from Rosen Matev %!s(int64=16) %!d(string=hai) anos
make_loc.c 4a29361f14 Generate fatal errors rather than returning a status, for: %!s(int64=15) %!d(string=hai) anos
make_mapset.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
mapcase.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
mapset.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
mapset_msc.c b74ef2e464 better wording %!s(int64=15) %!d(string=hai) anos
mapset_nme.c 89125f06b6 rblazek: fix for QGIS crash %!s(int64=16) %!d(string=hai) anos
myname.c 9a6de1b163 more obvious error message (merge from devbr6) %!s(int64=15) %!d(string=hai) anos
named_colr.c 671e44225a Fix formatting of array initialisers %!s(int64=17) %!d(string=hai) anos
new_des db49180dd7 welcome to GRASS 7.0.svn %!s(int64=17) %!d(string=hai) anos
nl_to_spaces.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
nme_in_mps.c e09ca9b4fc libgis: G_fully_qualified_name() don't report mapset if empty string %!s(int64=15) %!d(string=hai) anos
open.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to %!s(int64=16) %!d(string=hai) anos
open_misc.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to %!s(int64=16) %!d(string=hai) anos
overwrite.c ab082da4e0 Add "const" where appropriate to libgis return types %!s(int64=16) %!d(string=hai) anos
pager.c 1e26c862c8 Fix pager/mail functions %!s(int64=15) %!d(string=hai) anos
parser.c 25c70c3586 etc/wxpython moved to ec/gui/wxpython %!s(int64=15) %!d(string=hai) anos
parser_help.c 8ffa3de2e2 Add --help-text option %!s(int64=15) %!d(string=hai) anos
parser_html.c 604a1fe33e Move header inclusions, macros into appropriate files %!s(int64=15) %!d(string=hai) anos
parser_interface.c ed15cdfc4d Remove remaining usage of system() and G_system() %!s(int64=15) %!d(string=hai) anos
parser_local_proto.h 8ffa3de2e2 Add --help-text option %!s(int64=15) %!d(string=hai) anos
parser_script.c 604a1fe33e Move header inclusions, macros into appropriate files %!s(int64=15) %!d(string=hai) anos
parser_standard_options.c ad49a009a7 g.mapsets: clean up list_mapsets fns %!s(int64=15) %!d(string=hai) anos
parser_wps.c 86f4afdb8d XML creation enhancements. %!s(int64=15) %!d(string=hai) anos
paths.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
percent.c 56b732bcc5 libgis: G_set_percent_routine() and G_unset_percent_routine() added %!s(int64=16) %!d(string=hai) anos
pi.h db49180dd7 welcome to GRASS 7.0.svn %!s(int64=17) %!d(string=hai) anos
plot.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
pole_in_poly.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
popen.c 770e798241 G_spawn_ex() expects descriptors as "int"s, not "char*". %!s(int64=15) %!d(string=hai) anos
progrm_nme.c 5d366eb05b major gislib.dox update (still not complete, https://trac.osgeo.org/grass/changeset/37744) %!s(int64=16) %!d(string=hai) anos
proj1.c cee89e72e7 libgis: better units handling %!s(int64=15) %!d(string=hai) anos
proj2.c cee89e72e7 libgis: better units handling %!s(int64=15) %!d(string=hai) anos
proj3.c cee89e72e7 libgis: better units handling %!s(int64=15) %!d(string=hai) anos
projections c7478c69d3 enable Geostationary Satellite View (merge from devbr6) %!s(int64=15) %!d(string=hai) anos
put_window.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
putenv.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
radii.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
rd_cellhd.c 7088a02761 Generate fatal errors rather than returning a status, for: %!s(int64=15) %!d(string=hai) anos
remove.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to %!s(int64=16) %!d(string=hai) anos
rename.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to %!s(int64=16) %!d(string=hai) anos
rhumbline.c c7041e9ca3 Remove unnecessary return values %!s(int64=16) %!d(string=hai) anos
rotate.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
seek.c 62b5a38794 gis/seek.c: doxygen strings added %!s(int64=15) %!d(string=hai) anos
set_window.c 88abdb3fab Eliminate G_copy(); replace with memcpy() or assignment %!s(int64=15) %!d(string=hai) anos
short_way.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
sleep.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
snprintf.c 06ad8336d1 Fix G_snprintf() to allow for bug in Windows vsnprintf() %!s(int64=15) %!d(string=hai) anos
spawn.c 0ef89abb41 Don't warn about not close()ing descriptors other than std{in,out,err} on Windows %!s(int64=15) %!d(string=hai) anos
state27 db49180dd7 welcome to GRASS 7.0.svn %!s(int64=17) %!d(string=hai) anos
state83 db49180dd7 welcome to GRASS 7.0.svn %!s(int64=17) %!d(string=hai) anos
strings.c e2426199ab libgis: avoid segfault on G_store(NULL) %!s(int64=15) %!d(string=hai) anos
tempfile.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
timestamp.c 5d366eb05b major gislib.dox update (still not complete, https://trac.osgeo.org/grass/changeset/37744) %!s(int64=16) %!d(string=hai) anos
token.c 619b3f6325 Eliminate G_index(), G_rindex(); replace with strchr(), strrchr() %!s(int64=15) %!d(string=hai) anos
trim_dec.c 8c1f95a84c Remove bogus return value from G_trim_decimal() %!s(int64=15) %!d(string=hai) anos
units.c d99616d7c5 m.measure: length is measured in LL locations in meters by default %!s(int64=15) %!d(string=hai) anos
user_config.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
verbose.c 0fb91788d7 Add, use G_is_initialized(), G_initialize_done() for one-shot initialisation %!s(int64=16) %!d(string=hai) anos
view.c c7041e9ca3 Remove unnecessary return values %!s(int64=16) %!d(string=hai) anos
whoami.c 5d366eb05b major gislib.dox update (still not complete, https://trac.osgeo.org/grass/changeset/37744) %!s(int64=16) %!d(string=hai) anos
win32_pipes.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
wind_2_box.c 88abdb3fab Eliminate G_copy(); replace with memcpy() or assignment %!s(int64=15) %!d(string=hai) anos
wind_format.c 687a3466a8 output correct precision for different projection types (bugs https://trac.osgeo.org/grass/ticket/654 and https://trac.osgeo.org/grass/ticket/335; merge from devbr6) %!s(int64=16) %!d(string=hai) anos
wind_in.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
wind_limits.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
wind_overlap.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ %!s(int64=17) %!d(string=hai) anos
wind_scan.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos
window_map.c df4d81abd4 Move raster-specific functions from lib/gis to lib/raster: %!s(int64=15) %!d(string=hai) anos
worker.c e4164ed7e4 Add --with-pthread etc to configure script %!s(int64=16) %!d(string=hai) anos
wr_cellhd.c 0172a80e98 tbres is not measured in degrees (bug https://trac.osgeo.org/grass/ticket/821; merge from devbr6) %!s(int64=15) %!d(string=hai) anos
writ_zeros.c c7041e9ca3 Remove unnecessary return values %!s(int64=16) %!d(string=hai) anos
zero.c b06b8a0105 vectorlib: %!s(int64=16) %!d(string=hai) anos
zone.c bc702cc96b major gislib.dox update (still not complete) %!s(int64=16) %!d(string=hai) anos

README.TYPE

.\" use -ms
.LP
There were two flavors of changes made to structures in gis.h
and to calls to routines in the library:

.IP 1.
Variables in structures, parameters in argument lists to library routines,
and return values from library routines that really represented
CELL data but were declared as int have been changed to CELL.

The following structures were changed:

.DS
Categories [gis.h]
Cell_stats
Colors
Histogram
Range
Reclass
.DE

The argument type for some parameters for the following routines was changed:

.DS
G_init_cats [cats.c]
G_get_cats
G_set_cats
G_get_color [color.c]
G_set_color
G_make_random_colors [make_colr2.c]
G_make_color_wave
G_make_grey_scale
G_make_color_ramp
G_make_aspect_colors
G_add_histogram [histogram.c]
G_set_histogram
G_update_range [range.c]
.DE

The return value for the following routines was changed:

.DS
G_number_of_cats [cats.c]
G_get_histogram_cat [histogram.c]
.DE

This change does not, at present, require changes to existing code since
the CELL type is currently defined as int.

In the future, if we (or someone else) want to
redefine CELL to long (say on a 16 bit machine), the application code
will compile ok, but will not run correctly since the calling seqences
(including printf and scanf) will not match anymore.
To upgrade GRASS code for this is a big deal.
It consists of
finding all places that ints are used in assignments with
CELL variables,
modifying all the calls to the above routines,
and modifying all calls to other routines that don't know about the CELL
type (in particular printf, scanf, and Vask code).

The way to handle printf for CELL data is to use %ld and cast the
CELL value to long:
.DS
CELL x
printf ("%ld", (long) x);
.DE
The way to handle scanf for CELL data is to use %ld into a long
and assign to the CELL varaible:
.DS
CELL x;
long t;

scanf ("%ld", &t);
x = (CELL) t;
.DE
For Vask calls, assign the CELL value to a long, call Vask will the long,
then assign the long to the CELL variable:
.DS
CELL x;
long t;

t = x;
V_clear();
V_ques (&t, 'l', ...);
V_call();
x = t;
.DE

The long vs int issue for CELL also presents a subtle, but
potentially fatal, problem with malloc(n) which requires n to be int.

Suppose we want to allocate an array for reclass, from
cats min to max. What we do now is

.DS
char *table;
CELL min,max;
int len;

len = max - min + 1;
table = malloc (len);
.DE
This will fail if CELL is long and the expression max-min+1 yields
a value which overflows an int. Therefore, we should do
.DS
long len;

len = max - min + 1;
if (len != (int)len)
error("To many categories");
table = malloc ((int)len);
.DE
.IP 2.
Variables in structures, parameters in argument lists to library routines,
and return values from library routines that should have been long
but were declared as int have been changed to long.

The following structures were changed:

.DS
Cell_stats [gis.h]
Histogram
.DE

The argument type for some parameters for the following routines was changed:

.DS
G_add_histogram [histogram.c]
G_set_histogram
G_find_cell_stat [cell_stats.c]
G_next_cell_stat
.DE

The return value for the following routines was changed:

.DS
G_get_histogram_count [histogram.c]
.DE


These changes required immediate upgrade.
I think this update is done, but I want to review it again.