From 6209aa6374a226cc889b4578a505b91f3ec0ec7e Mon Sep 17 00:00:00 2001 From: Mateusz Loskot Date: Fri, 17 Nov 2006 22:16:33 +0000 Subject: Uploaded PROJ.4 port for Windows CE. git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1377 4e78687f-474d-0410-85f9-8d5e500ac6b2 --- src/nad_init.c | 14 +++++++++++++- src/pj_gridinfo.c | 14 +++++++++++++- src/pj_gridlist.c | 14 +++++++++++++- src/pj_open_lib.c | 8 ++++++++ src/projects.h | 12 ++++++++++++ 5 files changed, 59 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/nad_init.c b/src/nad_init.c index f582b747..936bada5 100644 --- a/src/nad_init.c +++ b/src/nad_init.c @@ -28,6 +28,9 @@ ****************************************************************************** * * $Log$ + * Revision 1.9 2006/11/17 22:16:30 mloskot + * Uploaded PROJ.4 port for Windows CE. + * * Revision 1.8 2003/03/17 18:56:01 warmerda * implement delayed loading of ctable format files * @@ -53,9 +56,18 @@ #include #include #include -#include #include +#ifdef _WIN32_WCE +/* assert.h includes all Windows API headers and causes 'LP' name clash. + * Here assert we disable assert() for Windows CE. + * TODO - mloskot: re-implement porting friendly assert + */ +# define assert(exp) ((void)0) +#else +# include +#endif /* _WIN32_WCE */ + /************************************************************************/ /* nad_ctable_load() */ /* */ diff --git a/src/pj_gridinfo.c b/src/pj_gridinfo.c index 19dc1bf5..2eaf6a09 100644 --- a/src/pj_gridinfo.c +++ b/src/pj_gridinfo.c @@ -29,6 +29,9 @@ ****************************************************************************** * * $Log$ + * Revision 1.8 2006/11/17 22:16:30 mloskot + * Uploaded PROJ.4 port for Windows CE. + * * Revision 1.7 2005/07/07 00:16:03 fwarmerdam * Fixed debug fprintf syntax per: * http://bugzilla.remotesensing.org/show_bug.cgi?id=886 @@ -59,7 +62,16 @@ #include #include #include -#include + +#ifdef _WIN32_WCE +/* assert.h includes all Windows API headers and causes 'LP' name clash. + * Here assert we disable assert() for Windows CE. + * TODO - mloskot: re-implement porting friendly assert + */ +# define assert(exp) ((void)0) +#else +# include +#endif /* _WIN32_WCE */ /************************************************************************/ /* swap_words() */ diff --git a/src/pj_gridlist.c b/src/pj_gridlist.c index f30d2c55..e86dd575 100644 --- a/src/pj_gridlist.c +++ b/src/pj_gridlist.c @@ -29,6 +29,9 @@ ****************************************************************************** * * $Log$ + * Revision 1.5 2006/11/17 22:16:30 mloskot + * Uploaded PROJ.4 port for Windows CE. + * * Revision 1.4 2005/11/01 05:56:13 fwarmerdam * improved error handling if gridcount is zero * @@ -48,7 +51,16 @@ #include #include #include -#include + +#ifdef _WIN32_WCE +/* assert.h includes all Windows API headers and causes 'LP' name clash. + * Here assert we disable assert() for Windows CE. + * TODO - mloskot: re-implement porting friendly assert + */ +# define assert(exp) ((void)0) +#else +# include +#endif /* _WIN32_WCE */ static PJ_GRIDINFO *grid_list = NULL; diff --git a/src/pj_open_lib.c b/src/pj_open_lib.c index e7b26ca6..e53e8e2d 100644 --- a/src/pj_open_lib.c +++ b/src/pj_open_lib.c @@ -31,6 +31,9 @@ ****************************************************************************** * * $Log$ + * Revision 1.7 2006/11/17 22:16:30 mloskot + * Uploaded PROJ.4 port for Windows CE. + * * Revision 1.6 2004/09/16 15:14:01 fwarmerdam * * src/pj_open_lib.c: added pj_set_searchpath() provided by Eric Miller. * @@ -111,6 +114,8 @@ pj_open_lib(char *name, char *mode) { int n = 0; int i; +#ifndef _WIN32_WCE + /* check if ~/name */ if (*name == '~' && name[1] == DIR_CHAR) if (sysname = getenv("HOME")) { @@ -163,4 +168,7 @@ pj_open_lib(char *name, char *mode) { fid == NULL ? "failed" : "succeeded" ); return(fid); +#else + return NULL; +#endif /* _WIN32_WCE */ } diff --git a/src/projects.h b/src/projects.h index 80bccab5..a8e6e28e 100644 --- a/src/projects.h +++ b/src/projects.h @@ -28,6 +28,9 @@ ****************************************************************************** * * $Log$ + * Revision 1.25 2006/11/17 22:16:30 mloskot + * Uploaded PROJ.4 port for Windows CE. + * * Revision 1.24 2006/10/18 04:34:03 fwarmerdam * added mlist functions from libproj4 * @@ -147,6 +150,15 @@ extern "C" { /* prototype hypot for systems where absent */ #ifndef _WIN32 extern double hypot(double, double); +#endif + +#ifdef _WIN32_WCE +# include +# include +# define rewind wceex_rewind +# define getenv wceex_getenv +# define strdup _strdup +# define hypot _hypot #endif /* some useful constants */ -- cgit v1.2.3