[GRASS-SVN] r40842 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Feb 6 13:45:02 EST 2010
Author: glynn
Date: 2010-02-06 13:45:00 -0500 (Sat, 06 Feb 2010)
New Revision: 40842
Modified:
grass/trunk/lib/gis/parser.c
grass/trunk/lib/gis/parser_help.c
grass/trunk/lib/gis/parser_html.c
grass/trunk/lib/gis/parser_local_proto.h
grass/trunk/lib/gis/parser_script.c
grass/trunk/lib/gis/parser_standard_options.c
grass/trunk/lib/gis/parser_wps.c
Log:
Move header inclusions, macros into appropriate files
Modified: grass/trunk/lib/gis/parser.c
===================================================================
--- grass/trunk/lib/gis/parser.c 2010-02-06 08:03:10 UTC (rev 40841)
+++ grass/trunk/lib/gis/parser.c 2010-02-06 18:45:00 UTC (rev 40842)
@@ -73,8 +73,27 @@
* \author Soeren Gebbert added Dec. 2009 WPS process_description document
*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <grass/gis.h>
+#include <grass/spawn.h>
+#include <grass/glocale.h>
+
#include "parser_local_proto.h"
+enum opt_error {
+ BAD_SYNTAX = 1,
+ OUT_OF_RANGE = 2,
+ MISSING_VALUE = 3,
+ AMBIGUOUS = 4,
+ REPLACED = 5
+};
+
+#define KEYLENGTH 64
+
/* initialize the global struct */
struct state state;
struct state *st = &state;
Modified: grass/trunk/lib/gis/parser_help.c
===================================================================
--- grass/trunk/lib/gis/parser_help.c 2010-02-06 08:03:10 UTC (rev 40841)
+++ grass/trunk/lib/gis/parser_help.c 2010-02-06 18:45:00 UTC (rev 40842)
@@ -12,6 +12,12 @@
* \author Soeren Gebbert added Dec. 2009 WPS process_description document
*/
+#include <stdio.h>
+#include <string.h>
+
+#include <grass/gis.h>
+#include <grass/glocale.h>
+
#include "parser_local_proto.h"
static void show_options(int, const char *);
Modified: grass/trunk/lib/gis/parser_html.c
===================================================================
--- grass/trunk/lib/gis/parser_html.c 2010-02-06 08:03:10 UTC (rev 40841)
+++ grass/trunk/lib/gis/parser_html.c 2010-02-06 18:45:00 UTC (rev 40842)
@@ -1,3 +1,8 @@
+#include <stdio.h>
+
+#include <grass/gis.h>
+#include <grass/glocale.h>
+
#include "parser_local_proto.h"
static void print_escaped_for_html(FILE * f, const char *str);
Modified: grass/trunk/lib/gis/parser_local_proto.h
===================================================================
--- grass/trunk/lib/gis/parser_local_proto.h 2010-02-06 08:03:10 UTC (rev 40841)
+++ grass/trunk/lib/gis/parser_local_proto.h 2010-02-06 18:45:00 UTC (rev 40842)
@@ -1,25 +1,8 @@
#ifndef __PARSER_LOCAL_PROTO_H__
#define __PARSER_LOCAL_PROTO_H__
-#include <grass/config.h>
-
-#if defined(HAVE_LANGINFO_H)
-#include <langinfo.h>
-#endif
-#if defined(__MINGW32__) && defined(USE_NLS)
-#include <localcharset.h>
-#endif
-
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdarg.h>
-#include <sys/types.h>
#include <grass/gis.h>
-#include <grass/glocale.h>
-#include <grass/spawn.h>
struct Item
{
@@ -54,16 +37,8 @@
int n_items;
};
-
extern struct state *st;
-#define BAD_SYNTAX 1
-#define OUT_OF_RANGE 2
-#define MISSING_VALUE 3
-#define AMBIGUOUS 4
-#define REPLACED 5
-#define KEYLENGTH 64
-
/* functions which are used by several parser functions in different files */
void G__usage_xml(void);
@@ -71,7 +46,7 @@
void G__script(void);
void G__wps_print_process_description(void);
int G__uses_new_gisprompt(void);
-void G__print_keywords(FILE *fd, void (*format)(FILE *, const char *));
+void G__print_keywords(FILE *, void (*)(FILE *, const char *));
#endif
Modified: grass/trunk/lib/gis/parser_script.c
===================================================================
--- grass/trunk/lib/gis/parser_script.c 2010-02-06 08:03:10 UTC (rev 40841)
+++ grass/trunk/lib/gis/parser_script.c 2010-02-06 18:45:00 UTC (rev 40842)
@@ -12,6 +12,10 @@
* \author Soeren Gebbert added Dec. 2009 WPS process_description document
*/
+#include <stdio.h>
+
+#include <grass/gis.h>
+
#include "parser_local_proto.h"
void G__script(void)
Modified: grass/trunk/lib/gis/parser_standard_options.c
===================================================================
--- grass/trunk/lib/gis/parser_standard_options.c 2010-02-06 08:03:10 UTC (rev 40841)
+++ grass/trunk/lib/gis/parser_standard_options.c 2010-02-06 18:45:00 UTC (rev 40842)
@@ -12,6 +12,9 @@
* \author Soeren Gebbert added Dec. 2009 WPS process_description document
*/
+#include <grass/gis.h>
+#include <grass/glocale.h>
+
#include "parser_local_proto.h"
/*!
Modified: grass/trunk/lib/gis/parser_wps.c
===================================================================
--- grass/trunk/lib/gis/parser_wps.c 2010-02-06 08:03:10 UTC (rev 40841)
+++ grass/trunk/lib/gis/parser_wps.c 2010-02-06 18:45:00 UTC (rev 40842)
@@ -1,3 +1,20 @@
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+#include <grass/config.h>
+#include <grass/gis.h>
+#include <grass/glocale.h>
+
+#if defined(HAVE_LANGINFO_H)
+#include <langinfo.h>
+#endif
+#if defined(__MINGW32__) && defined(USE_NLS)
+#include <localcharset.h>
+#endif
+
#include "parser_local_proto.h"
/* Defines and prototypes for WPS process_description XML document generation
More information about the grass-commit
mailing list