[GRASS-SVN] r40834 - grass/branches/develbranch_6/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Feb 5 17:15:17 EST 2010
Author: glynn
Date: 2010-02-05 17:15:16 -0500 (Fri, 05 Feb 2010)
New Revision: 40834
Modified:
grass/branches/develbranch_6/lib/gis/error.c
grass/branches/develbranch_6/lib/gis/list.c
grass/branches/develbranch_6/lib/gis/parser.c
Log:
Replace G_popen() with popen()
Modified: grass/branches/develbranch_6/lib/gis/error.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/error.c 2010-02-05 22:14:38 UTC (rev 40833)
+++ grass/branches/develbranch_6/lib/gis/error.c 2010-02-05 22:15:16 UTC (rev 40834)
@@ -373,7 +373,7 @@
return 1;
sprintf(command, "mail '%s'", G_whoami());
- if ((mail = G_popen(command, "w"))) {
+ if ((mail = popen(command, "w"))) {
fprintf(mail, "GIS %s: %s\n", fatal ? "ERROR" : "WARNING", msg);
G_pclose(mail);
}
Modified: grass/branches/develbranch_6/lib/gis/list.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/list.c 2010-02-05 22:14:38 UTC (rev 40833)
+++ grass/branches/develbranch_6/lib/gis/list.c 2010-02-05 22:15:16 UTC (rev 40834)
@@ -27,7 +27,7 @@
static int hit_return = 0;
static int list_element(FILE *, const char *, const char *, const char *,
int (*)(const char *, const char *, const char *));
-static void sigpipe_catch(int);
+static RETSIGTYPE sigpipe_catch(int);
int G_set_list_hit_return(int flag)
{
@@ -67,7 +67,7 @@
int count;
#ifdef SIGPIPE
- void (*sigpipe) ();
+ RETSIGTYPE (*sigpipe)(int);
#endif
/* must catch broken pipe in case "more" quits */
@@ -80,16 +80,15 @@
if (desc == 0 || *desc == 0)
desc = element;
- /* G_popen() does not work with MinGW? */
#ifndef __MINGW32__
/*
- * G_popen() the more command to page the output
+ * popen() the more command to page the output
*/
if (isatty(1)) {
#ifdef __MINGW32__
- more = G_popen("%GRASS_PAGER%", "w");
+ more = popen("%GRASS_PAGER%", "w");
#else
- more = G_popen("$GRASS_PAGER", "w");
+ more = popen("$GRASS_PAGER", "w");
#endif
if (!more)
more = stdout;
@@ -138,7 +137,7 @@
return 0;
}
-static void sigpipe_catch(int n)
+static RETSIGTYPE sigpipe_catch(int n)
{
broken_pipe = 1;
signal(n, sigpipe_catch);
Modified: grass/branches/develbranch_6/lib/gis/parser.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/parser.c 2010-02-05 22:14:38 UTC (rev 40833)
+++ grass/branches/develbranch_6/lib/gis/parser.c 2010-02-05 22:15:16 UTC (rev 40834)
@@ -1964,14 +1964,14 @@
#ifdef __MINGW32__
if (getenv("GRASS_DEBUG_GUI"))
- fp = G_popen("tee gui_dump.tcl | \"%GRASS_WISH%\"", "w");
+ fp = popen("tee gui_dump.tcl | \"%GRASS_WISH%\"", "w");
else
- fp = G_popen("\"%GRASS_WISH%\"", "w");
+ fp = popen("\"%GRASS_WISH%\"", "w");
#else
if (getenv("GRASS_DEBUG_GUI"))
- fp = G_popen("tee gui_dump.tcl | \"$GRASS_WISH\"", "w");
+ fp = popen("tee gui_dump.tcl | \"$GRASS_WISH\"", "w");
else
- fp = G_popen("\"$GRASS_WISH\"", "w");
+ fp = popen("\"$GRASS_WISH\"", "w");
#endif
if (!fp)
More information about the grass-commit
mailing list