Hamish Bowman 058c8ff497 UTM: Universe Transverse Mercator -> Universal (m from devbr6) před 15 roky
..
colors 05a63924ee integration of SST scale from Goddard's OceanColor for more differentiation před 15 roky
FIPS.code db49180dd7 welcome to GRASS 7.0.svn před 17 roky
G.h 0b7dc05f0d Split G__ between lib/gis and lib/raster před 16 roky
Makefile 002bbe23df Keep all library dependencies in Grass.make před 15 roky
README.TYPE db49180dd7 welcome to GRASS 7.0.svn před 17 roky
adj_cellhd.c 8827c8f5c5 adj_cellhd.c, rd_cellhd.c, get_cellhd.c moved back to gislib před 16 roky
align_window.c 0e6c5dd691 remove rasterlib dependency from libgis (todo: clean-up G__ & libraries initialization) před 16 roky
alloc.c 2ab701af5d change error msg so it makes sense to users who are not familiar with C (merge from devbr6) před 16 roky
area.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
area_ellipse.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
area_poly1.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
area_poly2.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
area_sphere.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
ascii_chk.c c7041e9ca3 Remove unnecessary return values před 16 roky
asprintf.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
basename.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
bres_line.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
clear_scrn.c c7041e9ca3 Remove unnecessary return values před 16 roky
clicker.c c313e28597 Bundle static variables into per-file structures před 16 roky
color_str.c 8db528aa65 color_str.c moved back to libgis (modules fixed) před 16 roky
colors.desc 1990468932 color table for accumulated growing degree days před 15 roky
commas.c c7041e9ca3 Remove unnecessary return values před 16 roky
copy.c c7041e9ca3 Remove unnecessary return values před 16 roky
copy_dir.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
copy_file.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
counter.c aff756a341 Fix G_is_initialized() for case of concurrent initialisation attempts před 16 roky
date.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
datum.c ab082da4e0 Add "const" where appropriate to libgis return types před 16 roky
datum.table 81089553eb update URLs před 16 roky
datumtransform.table e04042d394 explain why terms don't match ref URL před 16 roky
debug.c 0b7dc05f0d Split G__ between lib/gis and lib/raster před 16 roky
distance.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
done_msg.c c7041e9ca3 Remove unnecessary return values před 16 roky
element_list 631b3596e9 Move element_list to lib/gis, for earlier availability před 16 roky
ellipse.table db49180dd7 welcome to GRASS 7.0.svn před 17 roky
endian.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
env.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
error.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
file_name.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to před 16 roky
find_cell.c b2a54a6471 gislib: G_find_cell renamed to G_find_raster před 16 roky
find_etc.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
find_file.c 2dcd0f6942 gislib: OGR dependency removed před 16 roky
find_vect.c 2dcd0f6942 gislib: OGR dependency removed před 16 roky
flate.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
fmode.c 1acdd0be01 Build system clean-up před 16 roky
geodesic.c c7041e9ca3 Remove unnecessary return values před 16 roky
geodist.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
get_ellipse.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
get_projinfo.c de5c6b1d68 Suppress warnings for xy locations (trac https://trac.osgeo.org/grass/ticket/492) před 16 roky
get_window.c 0b7dc05f0d Split G__ between lib/gis and lib/raster před 16 roky
getl.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
gisbase.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
gisdbase.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
gisinit.c 0b7dc05f0d Split G__ between lib/gis and lib/raster před 16 roky
gislib.dox cb2fc26796 indent, reasonable output precision for doubles (merge from devbr6) před 16 roky
home.c 384d7f7b04 remove useless comment, we have to return something. probably the doxygen comments need adjustment před 16 roky
index.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
intersect.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
is.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
key_value1.c 4318f646ba libgis: avoid segfault if Key_Value is NULL (related to trac https://trac.osgeo.org/grass/ticket/492) před 16 roky
key_value2.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
key_value3.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
key_value4.c ab082da4e0 Add "const" where appropriate to libgis return types před 16 roky
legal_name.c b2a54a6471 gislib: G_find_cell renamed to G_find_raster před 16 roky
line_dist.c c7041e9ca3 Remove unnecessary return values před 16 roky
list.c c7041e9ca3 Remove unnecessary return values před 16 roky
ll_format.c ab082da4e0 Add "const" where appropriate to libgis return types před 16 roky
ll_scan.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
locale.c 474402cb81 Various MinGW bugfixes from Rosen Matev před 16 roky
location.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
ls.c c7041e9ca3 Remove unnecessary return values před 16 roky
mach_name.c 474402cb81 Various MinGW bugfixes from Rosen Matev před 16 roky
make_loc.c ab082da4e0 Add "const" where appropriate to libgis return types před 16 roky
make_mapset.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
mapcase.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
mapset.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
mapset_msc.c b74ef2e464 better wording před 15 roky
mapset_nme.c 89125f06b6 rblazek: fix for QGIS crash před 16 roky
myname.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
named_colr.c 671e44225a Fix formatting of array initialisers před 17 roky
new_des db49180dd7 welcome to GRASS 7.0.svn před 17 roky
nl_to_spaces.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
nme_in_mps.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to před 16 roky
open.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to před 16 roky
open_misc.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to před 16 roky
overwrite.c ab082da4e0 Add "const" where appropriate to libgis return types před 16 roky
parser.c 994deb050b initial steps towards direct OGR support (map/layer <-> OGR dsn/layer) před 15 roky
paths.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
percent.c 56b732bcc5 libgis: G_set_percent_routine() and G_unset_percent_routine() added před 16 roky
pi.h db49180dd7 welcome to GRASS 7.0.svn před 17 roky
plot.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
pole_in_poly.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
popen.c f3f9b42884 Windows has _popen, _pclose před 16 roky
progrm_nme.c 5d366eb05b major gislib.dox update (still not complete, https://trac.osgeo.org/grass/changeset/37744) před 16 roky
proj1.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
proj2.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
proj3.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
projections 058c8ff497 UTM: Universe Transverse Mercator -> Universal (m from devbr6) před 15 roky
put_window.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
putenv.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
radii.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
rd_cellhd.c 37c0e5bdfc Replace fseek/ftell with G_fseek/G_ftell před 16 roky
remove.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to před 16 roky
rename.c 69ac420b2f gislib G__name_is_fully_qualified() renamed to před 16 roky
rhumbline.c c7041e9ca3 Remove unnecessary return values před 16 roky
rotate.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
seek.c a1fb6123fe Add G_fseek(), G_ftell() před 16 roky
set_window.c 25761d39b2 Re-instate G_set_window() před 16 roky
short_way.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
sleep.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
snprintf.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
spawn.c 89bbc027b7 Implement SF_BINDING for Windows před 15 roky
state27 db49180dd7 welcome to GRASS 7.0.svn před 17 roky
state83 db49180dd7 welcome to GRASS 7.0.svn před 17 roky
strings.c 1f0953aca0 G_strdup() back for Windows (merge from devel_branch6, https://trac.osgeo.org/grass/changeset/38567) před 16 roky
system.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
tempfile.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
timestamp.c 5d366eb05b major gislib.dox update (still not complete, https://trac.osgeo.org/grass/changeset/37744) před 16 roky
token.c c7041e9ca3 Remove unnecessary return values před 16 roky
trim_dec.c 8c1f95a84c Remove bogus return value from G_trim_decimal() před 15 roky
user_config.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
verbose.c 0fb91788d7 Add, use G_is_initialized(), G_initialize_done() for one-shot initialisation před 16 roky
view.c c7041e9ca3 Remove unnecessary return values před 16 roky
whoami.c 5d366eb05b major gislib.dox update (still not complete, https://trac.osgeo.org/grass/changeset/37744) před 16 roky
win32_pipes.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
wind_2_box.c c7041e9ca3 Remove unnecessary return values před 16 roky
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) před 16 roky
wind_in.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
wind_limits.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
wind_overlap.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ před 17 roky
wind_scan.c bc702cc96b major gislib.dox update (still not complete) před 16 roky
window_map.c 0b7dc05f0d Split G__ between lib/gis and lib/raster před 16 roky
worker.c e4164ed7e4 Add --with-pthread etc to configure script před 16 roky
wr_cellhd.c c7041e9ca3 Remove unnecessary return values před 16 roky
writ_zeros.c c7041e9ca3 Remove unnecessary return values před 16 roky
zero.c b06b8a0105 vectorlib: před 16 roky
zone.c bc702cc96b major gislib.dox update (still not complete) před 16 roky

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.