ソースを参照

move libgis-related G__ fns to local_proto.h

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@63865 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 年 前
コミット
4bda27da81

+ 0 - 11
include/defs/gis.h

@@ -218,15 +218,12 @@ void G_setenv_nogisrc(const char *, const char *);
 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 @@ const char *G_gisdbase(void);
 /* 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_ls_glob_filter(const char *, int, int);
 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 @@ int G_mapset_permissions2(const char *, const char *, const char *);
 
 /* 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_init_timestamp(struct TimeStamp *);
 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 *);

+ 3 - 0
lib/gis/error.c

@@ -21,6 +21,9 @@
 #include <sys/types.h>
 #include <grass/glocale.h>
 #include <grass/gis.h>
+
+#include "local_proto.h"
+
 /*!
  * \def MSG
  *

+ 1 - 0
lib/gis/get_window.c

@@ -17,6 +17,7 @@
 #include <grass/glocale.h>
 
 #include "G.h"
+#include "local_proto.h"
 
 static struct state {
     int initialized;

+ 1 - 0
lib/gis/gisinit.c

@@ -24,6 +24,7 @@
 #include <grass/glocale.h>
 
 #include "G.h"
+#include "local_proto.h"
 
 struct G__ G__;
 

+ 2 - 0
lib/gis/home.c

@@ -16,6 +16,8 @@
 #include <grass/gis.h>
 #include <grass/glocale.h>
 
+#include "local_proto.h"
+
 /*!
  * \brief Get user's home directory
  *

+ 27 - 0
lib/gis/local_proto.h

@@ -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__ */

+ 2 - 0
lib/gis/mapset_nme.c

@@ -17,6 +17,8 @@
 #include <unistd.h>
 #include <grass/gis.h>
 
+#include "local_proto.h"
+
 static struct state {
     struct list {
 	char **names;

+ 2 - 0
lib/gis/open.c

@@ -22,6 +22,8 @@
 #include <grass/gis.h>
 #include <grass/glocale.h>
 
+#include "local_proto.h"
+
 /*!
   \brief Lowest level open routine.
 

+ 2 - 0
lib/gis/open_misc.c

@@ -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)

+ 2 - 0
lib/gis/put_window.c

@@ -14,6 +14,8 @@
 #include <stdlib.h>
 #include <grass/gis.h>
 
+#include "local_proto.h"
+
 /*!
  * \brief Writes the region (window)
  *

+ 2 - 0
lib/gis/rd_cellhd.c

@@ -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 *);

+ 2 - 0
lib/gis/set_window.c

@@ -16,6 +16,8 @@
 
 #include "G.h"
 
+#include "local_proto.h"
+
 /*!
   \brief Get the current working window (region)
 

+ 2 - 0
lib/gis/tempfile.c

@@ -16,6 +16,8 @@
 #include <sys/stat.h>
 #include <grass/gis.h>
 
+#include "local_proto.h"
+
 static struct Counter unique;
 static int initialized;