| Age | Commit message (Collapse) | Author |
|
Fixes consist in:
- no use of comma operator for multi statement purpose
- avoid confusing comma in for loops first and third clauses
- avoid implicit long to int casts by storing to long, or explicit bound checking before cast
|
|
Originally the code was doing double to int conversions like
y = (int)(x + 0.5)
which results in rounding when typecasting. In an earlier attempt to
avoid buffer overflows in integer typecasts this was changed to
y = lround(x + 0.5)
which doesn't give the origial results. We fix that here by instead
doing
y = lround(x)
It is safe to so as long as x is positive.
|
|
|
|
|
|
- Move includes to the top
- Move #defines to the top after includes
- Get M_PI and DEG90 from projects.h
|
|
|
|
As this is a part of PROJ, having these functions possibly not static
is confusing. Time to declare this is just a part of PROJ.
|
|
input. Added test to check for those cases.
|
|
|
|
Tried building before committing time
|
|
The return values are not used and do not mean anything.
Similar to #423
|
|
|
|
|
|
|
|
* Avoid using angle brackets for PROJ headers.
Switching from #include <proj.h> to #include "proj.h",
and correspondingly for projects.h and proj_api.h,
reduces the risk of accidentally picking up a system
installed older version of the header while building
a new version of PROJ.
* Also handle geodesic.h
|
|
Some macros seemed to be leftover from earlier code, so I removed them.
Others seemed like they should have been used, but weren't.
There should be no functional change, except the following: in floating-
point arithmetic, x / y is not the same as x * (1.0 / y). It can be
argued that using the multiplication is significantly faster, and the
algorithm is approximative anyway. Otherwise, the constants are
obviously not required.
Also fixes one location in PJ_aitoff.c, where an enumeration value
should have been used.
|
|
Having non-const variables of static lifetime or even global scope is
usually a bad idea. These variables are inherently constants, and this
should be enforced.
This required marking some functions as not modifying input parameters
and marking some pointers as pointers to const.
One advantage is that the compiler usually puts const static variables
in a read-only code segment, so they can't be modified physically.
This can be verified with `nm` (on POSIX systems).
To avoid changes to the public API, functions returning non-const
pointers to data tables were left intact, but the returned data may not
be modified. Internally we prefer using the proj_list_* functions over
the pj_get_*_ref functions, because the former return const pointers.
|
|
* Removed remaining traces of the builtin selftest system. Moved all functionality to test/gie
* Updated Appveyor and Travis build scripts
* Another appveyor script update
|
|
|
|
In most cases memory deallocation is completely removed from the
code since it can be handled by the default destructor. In a few
special cases a local destructor overrides the default destructor
and makes sure that locally allocated memored is cleaned up correctly.
Move all deallocation from pj_free to pj_default_destructor
Rename pj_latlong.c to fit with the conventional format PJ_latlong.c - freeup was missed here due to wrong naming
Clean up pj_init to avoid double deallocation; Also resolve #576 by adding z_0 and t_0 options in pj_init, while cleaning
Add a prototype for dealloc_params
Added missing errno.h include in pj_ctx.c
Temporarily removing ob_tran from testvarious, to be sure that is where the trouble is
Make PJ_ob_tran.c use proper initialization for the chained projection
proj=ob_tran: make it clear, that we disallow ellipsoidal projections, and, for improved backwards compatibility, turns off default settings, which could inject unwanted ellipsoid definitions
... then also remove the ellipsoid definition from the testvarious test case - which is probably buggy anyway
Work around cs2cs spherical init bug in testvarious; Forbid defs for ob_tran in pj_init
|
|
Expanded *_ERROR* macros with calls to proj_errno_set() and proper
returns when necessary. Defined a bunch of new PJD_ERR_ constants in
projects.h that corresponds to the error numbers in pj_strerrno.c. A few
unknown error numbers were replaced by existing ones in pj_strerrno.c.
|
|
|
|
-Wmissing-prototypes -Wmissing-declarations
|
|
|
|
|
|
|
|
Eliminated load time non-constant initializers, mixed code/declarations
and C++ style comments.
A lot of non-constant initializers remain in PJ_healpix. Should probably
be handled before next release.
|
|
|
|
cleaner diffs for upcomming commits.
|
|
These variables are re-written immediately after.
|
|
|
|
|
|
|
|
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2402 4e78687f-474d-0410-85f9-8d5e500ac6b2
|
|
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2173 4e78687f-474d-0410-85f9-8d5e500ac6b2
|
|
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2169 4e78687f-474d-0410-85f9-8d5e500ac6b2
|
|
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2165 4e78687f-474d-0410-85f9-8d5e500ac6b2
|