Markus Neteler 3c374600e3 print error when failing 16 anos atrás
..
colors 758f4c224d colors updated to MODIS V005 EVI/NDVI 16 anos atrás
FIPS.code db49180dd7 welcome to GRASS 7.0.svn 17 anos atrás
G.h 2ad6542ff8 Better handling of flipped/rotated maps 16 anos atrás
Makefile d60fab464e gui.tcl removed 16 anos atrás
README.TYPE db49180dd7 welcome to GRASS 7.0.svn 17 anos atrás
adj_cellhd.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
align_window.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
alloc.c b5ba88b751 Macro-ise G_*alloc() functions 16 anos atrás
alloc_cell.c 2c105f36d9 Reduce use of static variables 16 anos atrás
area.c 0e0697431b Bundle static variables into per-file structures 16 anos atrás
area_ellipse.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
area_poly1.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
area_poly2.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
area_sphere.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
ascii_chk.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
asprintf.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
auto_mask.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
basename.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
bres_line.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
cats.c 19531e1724 debug code (merge from devbr6) 16 anos atrás
cell_stats.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
cell_title.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
cellstats_eq.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
clear_scrn.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
clicker.c c313e28597 Bundle static variables into per-file structures 16 anos atrás
closecell.c ec0f58d22b Add write support to GDAL-link, r.external.out 16 anos atrás
color_compat.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_free.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_get.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_hist.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_init.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_insrt.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
color_invrt.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_look.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_org.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_rand.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_range.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_read.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_remove.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
color_rule.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_rule_get.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
color_rules.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_set.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_shift.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_str.c 1928e5aa0b Remove socket code 17 anos atrás
color_write.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
color_xform.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
colors.desc b6315a9387 typo fixed 16 anos atrás
commas.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
copy.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
copy_dir.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
copy_file.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
counter.c e4164ed7e4 Add --with-pthread etc to configure script 16 anos atrás
date.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
datum.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
datum.table db49180dd7 welcome to GRASS 7.0.svn 17 anos atrás
datumtransform.table db49180dd7 welcome to GRASS 7.0.svn 17 anos atrás
debug.c 0fb91788d7 Add, use G_is_initialized(), G_initialize_done() for one-shot initialisation 16 anos atrás
distance.c c313e28597 Bundle static variables into per-file structures 16 anos atrás
done_msg.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
element_list 631b3596e9 Move element_list to lib/gis, for earlier availability 16 anos atrás
ellipse.table db49180dd7 welcome to GRASS 7.0.svn 17 anos atrás
endian.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
env.c c18d93e671 fix doxygen documentation 16 anos atrás
error.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
file_name.c c3470870f5 i18n update (g.findfile) 16 anos atrás
find_cell.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
find_etc.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
find_file.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
find_vect.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
flate.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
fmode.dat db49180dd7 welcome to GRASS 7.0.svn 17 anos atrás
format.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
fpreclass.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
gdal.c ec0f58d22b Add write support to GDAL-link, r.external.out 16 anos atrás
geodesic.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
geodist.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
get_cellhd.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
get_ellipse.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
get_projinfo.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
get_row.c 2ad6542ff8 Better handling of flipped/rotated maps 16 anos atrás
get_row_colr.c 2c105f36d9 Reduce use of static variables 16 anos atrás
get_window.c 0fb91788d7 Add, use G_is_initialized(), G_initialize_done() for one-shot initialisation 16 anos atrás
getl.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
gisbase.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
gisdbase.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
gisinit.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
gislib.dox 32f0bc5f71 updated 16 anos atrás
gisrasterlib.dox 1f0cf514aa null file explanations from Glynn added 16 anos atrás
gisvectorlib.dox 0e0903421c doxygen fixes 17 anos atrás
histo_eq.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
histogram.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
history.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
home.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
index.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
interp.c 04f998eab9 Fix formatting 17 anos atrás
intersect.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
is.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
key_value1.c 4318f646ba libgis: avoid segfault if Key_Value is NULL (related to trac https://trac.osgeo.org/grass/ticket/492) 16 anos atrás
key_value2.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
key_value3.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
key_value4.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
legal_name.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
line_dist.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
list.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
ll_format.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
ll_scan.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
locale.c 474402cb81 Various MinGW bugfixes from Rosen Matev 16 anos atrás
location.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
ls.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
mach_name.c 474402cb81 Various MinGW bugfixes from Rosen Matev 16 anos atrás
make_loc.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
make_mapset.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
mapcase.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
mapset.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
mapset_msc.c 3c374600e3 print error when failing 16 anos atrás
mapset_nme.c 94a732aa89 attempt to fix trac https://trac.osgeo.org/grass/ticket/379 16 anos atrás
mask_info.c 2c105f36d9 Reduce use of static variables 16 anos atrás
maskfd.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
myname.c 2c105f36d9 Reduce use of static variables 16 anos atrás
named_colr.c 671e44225a Fix formatting of array initialisers 17 anos atrás
new_des db49180dd7 welcome to GRASS 7.0.svn 17 anos atrás
nl_to_spaces.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
nme_in_mps.c 96e1894267 Remove unused code 17 anos atrás
null_val.c f0ff28f5cc whitespace niceness (merge from devbr6), typo in warning msg 16 anos atrás
open.c ef13321e5a Prevent segfault if mapset == NULL 16 anos atrás
open_misc.c 835d80f89f Fix handling of qualified map names 17 anos atrás
opencell.c 16750a3610 /dev/null to G_DEV_NULL (trac https://trac.osgeo.org/grass/ticket/508; merge from devbr6) 16 anos atrás
overwrite.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
parser.c c7af3eb6c9 respect opt->label (merge from devbr6) 16 anos atrás
paths.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
percent.c 56b732bcc5 libgis: G_set_percent_routine() and G_unset_percent_routine() added 16 anos atrás
pi.h db49180dd7 welcome to GRASS 7.0.svn 17 anos atrás
plot.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
pole_in_poly.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
popen.c f3f9b42884 Windows has _popen, _pclose 16 anos atrás
progrm_nme.c 85fea69d7b Remove unnecessary static variables from opencell.c 16 anos atrás
proj1.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
proj2.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
proj3.c 21fa27a066 Eliminate use of static buffers for return values 16 anos atrás
projections db49180dd7 welcome to GRASS 7.0.svn 17 anos atrás
put_cellhd.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
put_row.c ec0f58d22b Add write support to GDAL-link, r.external.out 16 anos atrás
put_title.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
put_window.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
putenv.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
quant.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
quant_io.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
quant_rw.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
radii.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
range.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
raster.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
raster_metadata.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
rd_cellhd.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
reclass.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
remove.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
rename.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
rhumbline.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
rotate.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
sample.c 0f1ece679f Fix various bugs in G_get_raster_sample() 17 anos atrás
seek.c a1fb6123fe Add G_fseek(), G_ftell() 16 anos atrás
set_window.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
short_way.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
sleep.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
snprintf.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
spawn.c 474402cb81 Various MinGW bugfixes from Rosen Matev 16 anos atrás
state27 db49180dd7 welcome to GRASS 7.0.svn 17 anos atrás
state83 db49180dd7 welcome to GRASS 7.0.svn 17 anos atrás
strings.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
system.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
tempfile.c 0fb91788d7 Add, use G_is_initialized(), G_initialize_done() for one-shot initialisation 16 anos atrás
timestamp.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
token.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
trim_dec.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
user_config.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
verbose.c 0fb91788d7 Add, use G_is_initialized(), G_initialize_done() for one-shot initialisation 16 anos atrás
view.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
whoami.c ab082da4e0 Add "const" where appropriate to libgis return types 16 anos atrás
win32_pipes.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
wind_2_box.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
wind_format.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
wind_in.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
wind_limits.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
wind_overlap.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
wind_scan.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás
window_map.c 0fb91788d7 Add, use G_is_initialized(), G_initialize_done() for one-shot initialisation 16 anos atrás
worker.c e4164ed7e4 Add --with-pthread etc to configure script 16 anos atrás
wr_cellhd.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
writ_zeros.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
zero.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
zero_cell.c c7041e9ca3 Remove unnecessary return values 16 anos atrás
zone.c 8868d4b686 indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \ 17 anos atrás

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.