Martin Landa b06b8a0105 vectorlib: пре 16 година
..
colors 8c53e81ed5 +EU Corine land cover colors (thanks to Emilia Venturato, from http://dataservice.eea.europa.eu/dataservice/metadetails.asp?id=1007) пре 16 година
FIPS.code db49180dd7 welcome to GRASS 7.0.svn пре 17 година
G.h 0b7dc05f0d Split G__ between lib/gis and lib/raster пре 16 година
Makefile b06b8a0105 vectorlib: пре 16 година
README.TYPE db49180dd7 welcome to GRASS 7.0.svn пре 17 година
adj_cellhd.c 8827c8f5c5 adj_cellhd.c, rd_cellhd.c, get_cellhd.c moved back to gislib пре 16 година
align_window.c 0e6c5dd691 remove rasterlib dependency from libgis (todo: clean-up G__ & libraries initialization) пре 16 година
alloc.c 8daf2e7064 alloc_cell.c updated, see http://trac.osgeo.org/grass/wiki/Grass7/RasterLib пре 16 година
area.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
area_ellipse.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
area_poly1.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
area_poly2.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
area_sphere.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
ascii_chk.c c7041e9ca3 Remove unnecessary return values пре 16 година
asprintf.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
basename.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
bres_line.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
clear_scrn.c c7041e9ca3 Remove unnecessary return values пре 16 година
clicker.c c313e28597 Bundle static variables into per-file structures пре 16 година
color_str.c 8db528aa65 color_str.c moved back to libgis (modules fixed) пре 16 година
colors.desc 8c53e81ed5 +EU Corine land cover colors (thanks to Emilia Venturato, from http://dataservice.eea.europa.eu/dataservice/metadetails.asp?id=1007) пре 16 година
commas.c c7041e9ca3 Remove unnecessary return values пре 16 година
copy.c c7041e9ca3 Remove unnecessary return values пре 16 година
copy_dir.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
copy_file.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
counter.c aff756a341 Fix G_is_initialized() for case of concurrent initialisation attempts пре 16 година
date.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
datum.c ab082da4e0 Add "const" where appropriate to libgis return types пре 16 година
datum.table d92fa54233 Add gda94 пре 16 година
datumtransform.table e130a24aa0 Fix CH1903 datum transformation parameters as per bug https://trac.osgeo.org/grass/ticket/35 пре 16 година
debug.c 0b7dc05f0d Split G__ between lib/gis and lib/raster пре 16 година
distance.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
done_msg.c c7041e9ca3 Remove unnecessary return values пре 16 година
element_list 631b3596e9 Move element_list to lib/gis, for earlier availability пре 17 година
ellipse.table db49180dd7 welcome to GRASS 7.0.svn пре 17 година
endian.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
env.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
error.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
file_name.c c3470870f5 i18n update (g.findfile) пре 17 година
find_cell.c 5d366eb05b major gislib.dox update (still not complete, https://trac.osgeo.org/grass/changeset/37744) пре 16 година
find_etc.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
find_file.c b06b8a0105 vectorlib: пре 16 година
find_vect.c b06b8a0105 vectorlib: пре 16 година
flate.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
fmode.c 1acdd0be01 Build system clean-up пре 16 година
geodesic.c c7041e9ca3 Remove unnecessary return values пре 16 година
geodist.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
get_ellipse.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
get_projinfo.c de5c6b1d68 Suppress warnings for xy locations (trac https://trac.osgeo.org/grass/ticket/492) пре 16 година
get_window.c 0b7dc05f0d Split G__ between lib/gis and lib/raster пре 16 година
getl.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
gisbase.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
gisdbase.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
gisinit.c 0b7dc05f0d Split G__ between lib/gis and lib/raster пре 16 година
gislib.dox d60480276c leftover doxygen tag removed пре 16 година
home.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
index.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
intersect.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
is.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
key_value1.c 4318f646ba libgis: avoid segfault if Key_Value is NULL (related to trac https://trac.osgeo.org/grass/ticket/492) пре 16 година
key_value2.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
key_value3.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
key_value4.c ab082da4e0 Add "const" where appropriate to libgis return types пре 16 година
legal_name.c b06b8a0105 vectorlib: пре 16 година
line_dist.c c7041e9ca3 Remove unnecessary return values пре 16 година
list.c c7041e9ca3 Remove unnecessary return values пре 16 година
ll_format.c ab082da4e0 Add "const" where appropriate to libgis return types пре 16 година
ll_scan.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
locale.c 474402cb81 Various MinGW bugfixes from Rosen Matev пре 16 година
location.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
ls.c c7041e9ca3 Remove unnecessary return values пре 16 година
mach_name.c 474402cb81 Various MinGW bugfixes from Rosen Matev пре 16 година
make_loc.c ab082da4e0 Add "const" where appropriate to libgis return types пре 16 година
make_mapset.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
mapcase.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
mapset.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
mapset_msc.c 3c374600e3 print error when failing пре 16 година
mapset_nme.c 89125f06b6 rblazek: fix for QGIS crash пре 16 година
myname.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
named_colr.c 671e44225a Fix formatting of array initialisers пре 17 година
new_des db49180dd7 welcome to GRASS 7.0.svn пре 17 година
nl_to_spaces.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
nme_in_mps.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
open.c b06b8a0105 vectorlib: пре 16 година
open_misc.c 835d80f89f Fix handling of qualified map names пре 17 година
overwrite.c ab082da4e0 Add "const" where appropriate to libgis return types пре 16 година
parser.c a4b20a6288 less ambiguous fn name пре 16 година
paths.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
percent.c 56b732bcc5 libgis: G_set_percent_routine() and G_unset_percent_routine() added пре 16 година
pi.h db49180dd7 welcome to GRASS 7.0.svn пре 17 година
plot.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
pole_in_poly.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
popen.c f3f9b42884 Windows has _popen, _pclose пре 16 година
progrm_nme.c 5d366eb05b major gislib.dox update (still not complete, https://trac.osgeo.org/grass/changeset/37744) пре 16 година
proj1.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
proj2.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
proj3.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
projections db49180dd7 welcome to GRASS 7.0.svn пре 17 година
put_window.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
putenv.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
radii.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
rd_cellhd.c 0e6c5dd691 remove rasterlib dependency from libgis (todo: clean-up G__ & libraries initialization) пре 16 година
remove.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
rename.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
rhumbline.c c7041e9ca3 Remove unnecessary return values пре 16 година
rotate.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
seek.c a1fb6123fe Add G_fseek(), G_ftell() пре 16 година
set_window.c 25761d39b2 Re-instate G_set_window() пре 16 година
short_way.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
sleep.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
snprintf.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
spawn.c 11d07fa4ce add debug msgs (merge from devbr6) пре 16 година
state27 db49180dd7 welcome to GRASS 7.0.svn пре 17 година
state83 db49180dd7 welcome to GRASS 7.0.svn пре 17 година
strings.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
system.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
tempfile.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
timestamp.c 5d366eb05b major gislib.dox update (still not complete, https://trac.osgeo.org/grass/changeset/37744) пре 16 година
token.c c7041e9ca3 Remove unnecessary return values пре 16 година
trim_dec.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
user_config.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
verbose.c 0fb91788d7 Add, use G_is_initialized(), G_initialize_done() for one-shot initialisation пре 16 година
view.c c7041e9ca3 Remove unnecessary return values пре 16 година
whoami.c 5d366eb05b major gislib.dox update (still not complete, https://trac.osgeo.org/grass/changeset/37744) пре 16 година
win32_pipes.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
wind_2_box.c c7041e9ca3 Remove unnecessary return values пре 16 година
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 година
wind_in.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
wind_limits.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
wind_overlap.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ пре 17 година
wind_scan.c bc702cc96b major gislib.dox update (still not complete) пре 16 година
window_map.c 0b7dc05f0d Split G__ between lib/gis and lib/raster пре 16 година
worker.c e4164ed7e4 Add --with-pthread etc to configure script пре 16 година
wr_cellhd.c c7041e9ca3 Remove unnecessary return values пре 16 година
writ_zeros.c c7041e9ca3 Remove unnecessary return values пре 16 година
zero.c b06b8a0105 vectorlib: пре 16 година
zone.c bc702cc96b major gislib.dox update (still not complete) пре 16 година

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.