Glynn Clements 604a1fe33e Move header inclusions, macros into appropriate files 15 rokov pred
..
colors 3579328dbb flipud() 15 rokov pred
FIPS.code db49180dd7 welcome to GRASS 7.0.svn 17 rokov pred
G.h 0b7dc05f0d Split G__ between lib/gis and lib/raster 16 rokov pred
Makefile af2133adf1 Move regex/glob G__ls() filters into lib/gis 15 rokov pred
README.TYPE db49180dd7 welcome to GRASS 7.0.svn 17 rokov pred
adj_cellhd.c 7088a02761 Generate fatal errors rather than returning a status, for: 15 rokov pred
alloc.c 7c8c38685b Optimisations: 15 rokov pred
area.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
area_ellipse.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
area_poly1.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
area_poly2.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
area_sphere.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
ascii_chk.c c7041e9ca3 Remove unnecessary return values 16 rokov pred
asprintf.c 06ad8336d1 Fix G_snprintf() to allow for bug in Windows vsnprintf() 15 rokov pred
basename.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
bres_line.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
clicker.c c313e28597 Bundle static variables into per-file structures 16 rokov pred
color_str.c 8db528aa65 color_str.c moved back to libgis (modules fixed) 16 rokov pred
colors.desc c9f5a31d5d +haxby 15 rokov pred
commas.c c7041e9ca3 Remove unnecessary return values 16 rokov pred
copy_dir.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
copy_file.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
counter.c aff756a341 Fix G_is_initialized() for case of concurrent initialisation attempts 16 rokov pred
date.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
datum.c ab082da4e0 Add "const" where appropriate to libgis return types 16 rokov pred
datum.table 81089553eb update URLs 16 rokov pred
datumtransform.table e04042d394 explain why terms don't match ref URL 16 rokov pred
debug.c 0b7dc05f0d Split G__ between lib/gis and lib/raster 16 rokov pred
distance.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
done_msg.c c7041e9ca3 Remove unnecessary return values 16 rokov pred
element_list 631b3596e9 Move element_list to lib/gis, for earlier availability 16 rokov pred
ellipse.table db49180dd7 welcome to GRASS 7.0.svn 17 rokov pred
endian.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
env.c 88abdb3fab Eliminate G_copy(); replace with memcpy() or assignment 15 rokov pred
error.c ca1fcb75a4 Eliminate use of [G_]popen() 15 rokov pred
file_name.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to 16 rokov pred
find_cell.c b2a54a6471 gislib: G_find_cell renamed to G_find_raster 16 rokov pred
find_etc.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
find_file.c ba2fe339fb Always allocate returned mapset (so that it can be freed) 15 rokov pred
find_vect.c 2dcd0f6942 gislib: OGR dependency removed 16 rokov pred
flate.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
fmode.c 1acdd0be01 Build system clean-up 16 rokov pred
geodesic.c c7041e9ca3 Remove unnecessary return values 16 rokov pred
geodist.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
get_ellipse.c 4a29361f14 Generate fatal errors rather than returning a status, for: 15 rokov pred
get_projinfo.c 4a29361f14 Generate fatal errors rather than returning a status, for: 15 rokov pred
get_window.c df4d81abd4 Move raster-specific functions from lib/gis to lib/raster: 15 rokov pred
getl.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
gisbase.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
gisdbase.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
gisinit.c 0b7dc05f0d Split G__ between lib/gis and lib/raster 16 rokov pred
gislib.dox 664305e4b8 gisprompt docs updated based on Glynn's notes in ML 15 rokov pred
handler.c b9d454169d Add fatal error handlers 15 rokov pred
home.c 384d7f7b04 remove useless comment, we have to return something. probably the doxygen comments need adjustment 16 rokov pred
intersect.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
is.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
key_value1.c 4a29361f14 Generate fatal errors rather than returning a status, for: 15 rokov pred
key_value2.c 4a29361f14 Generate fatal errors rather than returning a status, for: 15 rokov pred
key_value3.c 4a29361f14 Generate fatal errors rather than returning a status, for: 15 rokov pred
key_value4.c 4a29361f14 Generate fatal errors rather than returning a status, for: 15 rokov pred
legal_name.c b2a54a6471 gislib: G_find_cell renamed to G_find_raster 16 rokov pred
line_dist.c c7041e9ca3 Remove unnecessary return values 16 rokov pred
list.c ca1fcb75a4 Eliminate use of [G_]popen() 15 rokov pred
ll_format.c ab082da4e0 Add "const" where appropriate to libgis return types 16 rokov pred
ll_scan.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
locale.c 474402cb81 Various MinGW bugfixes from Rosen Matev 16 rokov pred
location.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
ls.c c7041e9ca3 Remove unnecessary return values 16 rokov pred
ls_filter.c af2133adf1 Move regex/glob G__ls() filters into lib/gis 15 rokov pred
mach_name.c 474402cb81 Various MinGW bugfixes from Rosen Matev 16 rokov pred
make_loc.c 4a29361f14 Generate fatal errors rather than returning a status, for: 15 rokov pred
make_mapset.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
mapcase.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
mapset.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
mapset_msc.c b74ef2e464 better wording 15 rokov pred
mapset_nme.c 89125f06b6 rblazek: fix for QGIS crash 16 rokov pred
myname.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
named_colr.c 671e44225a Fix formatting of array initialisers 17 rokov pred
new_des db49180dd7 welcome to GRASS 7.0.svn 17 rokov pred
nl_to_spaces.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
nme_in_mps.c e09ca9b4fc libgis: G_fully_qualified_name() don't report mapset if empty string 15 rokov pred
open.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to 16 rokov pred
open_misc.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to 16 rokov pred
overwrite.c ab082da4e0 Add "const" where appropriate to libgis return types 16 rokov pred
pager.c 1e26c862c8 Fix pager/mail functions 15 rokov pred
parser.c 604a1fe33e Move header inclusions, macros into appropriate files 15 rokov pred
parser_help.c 604a1fe33e Move header inclusions, macros into appropriate files 15 rokov pred
parser_html.c 604a1fe33e Move header inclusions, macros into appropriate files 15 rokov pred
parser_interface.c ed15cdfc4d Remove remaining usage of system() and G_system() 15 rokov pred
parser_local_proto.h 604a1fe33e Move header inclusions, macros into appropriate files 15 rokov pred
parser_script.c 604a1fe33e Move header inclusions, macros into appropriate files 15 rokov pred
parser_standard_options.c 604a1fe33e Move header inclusions, macros into appropriate files 15 rokov pred
parser_wps.c 604a1fe33e Move header inclusions, macros into appropriate files 15 rokov pred
paths.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
percent.c 56b732bcc5 libgis: G_set_percent_routine() and G_unset_percent_routine() added 16 rokov pred
pi.h db49180dd7 welcome to GRASS 7.0.svn 17 rokov pred
plot.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
pole_in_poly.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
popen.c 1e26c862c8 Fix pager/mail functions 15 rokov pred
progrm_nme.c 5d366eb05b major gislib.dox update (still not complete, https://trac.osgeo.org/grass/changeset/37744) 16 rokov pred
proj1.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
proj2.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
proj3.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
projections c7478c69d3 enable Geostationary Satellite View (merge from devbr6) 15 rokov pred
put_window.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
putenv.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
radii.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
rd_cellhd.c 7088a02761 Generate fatal errors rather than returning a status, for: 15 rokov pred
remove.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to 16 rokov pred
rename.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to 16 rokov pred
rhumbline.c c7041e9ca3 Remove unnecessary return values 16 rokov pred
rotate.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
seek.c 16a6b956df Enable LFS globally 15 rokov pred
set_window.c 88abdb3fab Eliminate G_copy(); replace with memcpy() or assignment 15 rokov pred
short_way.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
sleep.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
snprintf.c 06ad8336d1 Fix G_snprintf() to allow for bug in Windows vsnprintf() 15 rokov pred
spawn.c aa90c6079e Ensure environment array is NULL-terminated 15 rokov pred
state27 db49180dd7 welcome to GRASS 7.0.svn 17 rokov pred
state83 db49180dd7 welcome to GRASS 7.0.svn 17 rokov pred
strings.c 0c79adbbf7 Elminate G_strdup(); replace with G_store() 15 rokov pred
tempfile.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
timestamp.c 5d366eb05b major gislib.dox update (still not complete, https://trac.osgeo.org/grass/changeset/37744) 16 rokov pred
token.c 619b3f6325 Eliminate G_index(), G_rindex(); replace with strchr(), strrchr() 15 rokov pred
trim_dec.c 8c1f95a84c Remove bogus return value from G_trim_decimal() 15 rokov pred
user_config.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
verbose.c 0fb91788d7 Add, use G_is_initialized(), G_initialize_done() for one-shot initialisation 16 rokov pred
view.c c7041e9ca3 Remove unnecessary return values 16 rokov pred
whoami.c 5d366eb05b major gislib.dox update (still not complete, https://trac.osgeo.org/grass/changeset/37744) 16 rokov pred
win32_pipes.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
wind_2_box.c 88abdb3fab Eliminate G_copy(); replace with memcpy() or assignment 15 rokov pred
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) 16 rokov pred
wind_in.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
wind_limits.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
wind_overlap.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 rokov pred
wind_scan.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred
window_map.c df4d81abd4 Move raster-specific functions from lib/gis to lib/raster: 15 rokov pred
worker.c e4164ed7e4 Add --with-pthread etc to configure script 16 rokov pred
wr_cellhd.c 0172a80e98 tbres is not measured in degrees (bug https://trac.osgeo.org/grass/ticket/821; merge from devbr6) 15 rokov pred
writ_zeros.c c7041e9ca3 Remove unnecessary return values 16 rokov pred
zero.c b06b8a0105 vectorlib: 16 rokov pred
zone.c bc702cc96b major gislib.dox update (still not complete) 16 rokov pred

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.