[GRASS-SVN] r63865 - in grass/trunk: include/defs lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Dec 29 12:16:43 PST 2014
Author: martinl
Date: 2014-12-29 12:16:43 -0800 (Mon, 29 Dec 2014)
New Revision: 63865
Added:
grass/trunk/lib/gis/local_proto.h
Modified:
grass/trunk/include/defs/gis.h
grass/trunk/lib/gis/error.c
grass/trunk/lib/gis/get_window.c
grass/trunk/lib/gis/gisinit.c
grass/trunk/lib/gis/home.c
grass/trunk/lib/gis/mapset_nme.c
grass/trunk/lib/gis/open.c
grass/trunk/lib/gis/open_misc.c
grass/trunk/lib/gis/put_window.c
grass/trunk/lib/gis/rd_cellhd.c
grass/trunk/lib/gis/set_window.c
grass/trunk/lib/gis/tempfile.c
Log:
move libgis-related G__ fns to local_proto.h
Modified: grass/trunk/include/defs/gis.h
===================================================================
--- grass/trunk/include/defs/gis.h 2014-12-29 19:48:26 UTC (rev 63864)
+++ grass/trunk/include/defs/gis.h 2014-12-29 20:16:43 UTC (rev 63865)
@@ -218,15 +218,12 @@
void G_setenv_nogisrc2(const char *, const char *, int);
void G_unsetenv(const char *);
void G_unsetenv2(const char *, int);
-void G__write_env(void);
const char *G_get_env_name(int);
-void G__read_env(void);
void G_set_gisrc_mode(int);
int G_get_gisrc_mode(void);
void G_create_alt_env(void);
void G_switch_env(void);
void G__read_mapset_env(void);
-void G__read_gisrc_env(void);
/* error.c */
jmp_buf *G_fatal_longjmp(int);
@@ -321,17 +318,14 @@
/* gisinit.c */
void G__gisinit(const char *, const char *);
void G__no_gisinit(const char *);
-void G__check_gisinit(void);
void G_init_all(void);
/* handler.c */
void G_add_error_handler(void (*)(void *), void *);
void G_remove_error_handler(void (*)(void *), void *);
-void G__call_error_handlers(void);
/* home.c */
const char *G_home(void);
-const char *G__home(void);
const char *G_config_path(void);
/* ilist.c */
@@ -423,9 +417,6 @@
void G_free_ls_filter(void *);
#endif
-/* mach_name.c */
-const char *G__machine_name(void);
-
/* make_loc.c */
int G_make_location(const char *, struct Cell_head *, const struct Key_Value *,
const struct Key_Value *);
@@ -451,7 +442,6 @@
/* mapset_nme.c */
const char *G_get_mapset_name(int);
-void G__get_list_of_mapsets(void);
void G_create_alt_search_path(void);
void G_switch_search_path(void);
void G_reset_mapsets(void);
@@ -669,7 +659,6 @@
void G_set_timestamp(struct TimeStamp *, const struct DateTime *);
void G_set_timestamp_range(struct TimeStamp *, const struct DateTime *,
const struct DateTime *);
-int G__read_timestamp(FILE *, struct TimeStamp *);
int G_write_timestamp(FILE *, const struct TimeStamp *);
void G_get_timestamps(const struct TimeStamp *, struct DateTime *, struct DateTime *, int *);
int G_format_timestamp(const struct TimeStamp *, char *);
Modified: grass/trunk/lib/gis/error.c
===================================================================
--- grass/trunk/lib/gis/error.c 2014-12-29 19:48:26 UTC (rev 63864)
+++ grass/trunk/lib/gis/error.c 2014-12-29 20:16:43 UTC (rev 63865)
@@ -21,6 +21,9 @@
#include <sys/types.h>
#include <grass/glocale.h>
#include <grass/gis.h>
+
+#include "local_proto.h"
+
/*!
* \def MSG
*
Modified: grass/trunk/lib/gis/get_window.c
===================================================================
--- grass/trunk/lib/gis/get_window.c 2014-12-29 19:48:26 UTC (rev 63864)
+++ grass/trunk/lib/gis/get_window.c 2014-12-29 20:16:43 UTC (rev 63865)
@@ -17,6 +17,7 @@
#include <grass/glocale.h>
#include "G.h"
+#include "local_proto.h"
static struct state {
int initialized;
Modified: grass/trunk/lib/gis/gisinit.c
===================================================================
--- grass/trunk/lib/gis/gisinit.c 2014-12-29 19:48:26 UTC (rev 63864)
+++ grass/trunk/lib/gis/gisinit.c 2014-12-29 20:16:43 UTC (rev 63865)
@@ -24,6 +24,7 @@
#include <grass/glocale.h>
#include "G.h"
+#include "local_proto.h"
struct G__ G__;
Modified: grass/trunk/lib/gis/home.c
===================================================================
--- grass/trunk/lib/gis/home.c 2014-12-29 19:48:26 UTC (rev 63864)
+++ grass/trunk/lib/gis/home.c 2014-12-29 20:16:43 UTC (rev 63865)
@@ -16,6 +16,8 @@
#include <grass/gis.h>
#include <grass/glocale.h>
+#include "local_proto.h"
+
/*!
* \brief Get user's home directory
*
Added: grass/trunk/lib/gis/local_proto.h
===================================================================
--- grass/trunk/lib/gis/local_proto.h (rev 0)
+++ grass/trunk/lib/gis/local_proto.h 2014-12-29 20:16:43 UTC (rev 63865)
@@ -0,0 +1,27 @@
+#ifndef __LOCAL_PROTO_H__
+#define __LOCAL_PROTO_H__
+
+/* env.c */
+void G__read_env(void);
+void G__write_env(void);
+void G__read_gisrc_env(void);
+
+/* gisinit.c */
+void G__check_gisinit(void);
+
+/* handler.c */
+void G__call_error_handlers(void);
+
+/* home.c */
+const char *G__home(void);
+
+/* mach_name.c */
+const char *G__machine_name(void);
+
+/* mapset_nme.c */
+void G__get_list_of_mapsets(void);
+
+/* timestamp.c */
+int G__read_timestamp(FILE *, struct TimeStamp *);
+
+#endif /* LOCAL_PROTO_H__ */
Property changes on: grass/trunk/lib/gis/local_proto.h
___________________________________________________________________
Added: svn:mime-type
+ text/x-chdr
Added: svn:eol-style
+ native
Modified: grass/trunk/lib/gis/mapset_nme.c
===================================================================
--- grass/trunk/lib/gis/mapset_nme.c 2014-12-29 19:48:26 UTC (rev 63864)
+++ grass/trunk/lib/gis/mapset_nme.c 2014-12-29 20:16:43 UTC (rev 63865)
@@ -17,6 +17,8 @@
#include <unistd.h>
#include <grass/gis.h>
+#include "local_proto.h"
+
static struct state {
struct list {
char **names;
Modified: grass/trunk/lib/gis/open.c
===================================================================
--- grass/trunk/lib/gis/open.c 2014-12-29 19:48:26 UTC (rev 63864)
+++ grass/trunk/lib/gis/open.c 2014-12-29 20:16:43 UTC (rev 63865)
@@ -22,6 +22,8 @@
#include <grass/gis.h>
#include <grass/glocale.h>
+#include "local_proto.h"
+
/*!
\brief Lowest level open routine.
Modified: grass/trunk/lib/gis/open_misc.c
===================================================================
--- grass/trunk/lib/gis/open_misc.c 2014-12-29 19:48:26 UTC (rev 63864)
+++ grass/trunk/lib/gis/open_misc.c 2014-12-29 20:16:43 UTC (rev 63865)
@@ -29,6 +29,8 @@
#include <grass/gis.h>
#include <grass/glocale.h>
+#include "local_proto.h"
+
static int G__open_misc(const char *dir,
const char *element,
const char *name, const char *mapset, int mode)
Modified: grass/trunk/lib/gis/put_window.c
===================================================================
--- grass/trunk/lib/gis/put_window.c 2014-12-29 19:48:26 UTC (rev 63864)
+++ grass/trunk/lib/gis/put_window.c 2014-12-29 20:16:43 UTC (rev 63865)
@@ -14,6 +14,8 @@
#include <stdlib.h>
#include <grass/gis.h>
+#include "local_proto.h"
+
/*!
* \brief Writes the region (window)
*
Modified: grass/trunk/lib/gis/rd_cellhd.c
===================================================================
--- grass/trunk/lib/gis/rd_cellhd.c 2014-12-29 19:48:26 UTC (rev 63864)
+++ grass/trunk/lib/gis/rd_cellhd.c 2014-12-29 20:16:43 UTC (rev 63865)
@@ -16,6 +16,8 @@
#include <grass/gis.h>
#include <grass/glocale.h>
+#include "local_proto.h"
+
static int scan_item(const char *, char *, char *);
static int scan_int(const char *, int *);
static double scan_double(const char *, double *);
Modified: grass/trunk/lib/gis/set_window.c
===================================================================
--- grass/trunk/lib/gis/set_window.c 2014-12-29 19:48:26 UTC (rev 63864)
+++ grass/trunk/lib/gis/set_window.c 2014-12-29 20:16:43 UTC (rev 63865)
@@ -16,6 +16,8 @@
#include "G.h"
+#include "local_proto.h"
+
/*!
\brief Get the current working window (region)
Modified: grass/trunk/lib/gis/tempfile.c
===================================================================
--- grass/trunk/lib/gis/tempfile.c 2014-12-29 19:48:26 UTC (rev 63864)
+++ grass/trunk/lib/gis/tempfile.c 2014-12-29 20:16:43 UTC (rev 63865)
@@ -16,6 +16,8 @@
#include <sys/stat.h>
#include <grass/gis.h>
+#include "local_proto.h"
+
static struct Counter unique;
static int initialized;
More information about the grass-commit
mailing list