[GRASS-SVN] r40849 - grass/branches/releasebranch_6_4/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Feb 6 14:57:04 EST 2010
Author: neteler
Date: 2010-02-06 14:57:03 -0500 (Sat, 06 Feb 2010)
New Revision: 40849
Modified:
grass/branches/releasebranch_6_4/lib/gis/error.c
grass/branches/releasebranch_6_4/lib/gis/list.c
grass/branches/releasebranch_6_4/lib/gis/parser.c
Log:
Replace G_popen() with popen() (backport from devbr6, r40834)
Modified: grass/branches/releasebranch_6_4/lib/gis/error.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/gis/error.c 2010-02-06 19:47:42 UTC (rev 40848)
+++ grass/branches/releasebranch_6_4/lib/gis/error.c 2010-02-06 19:57:03 UTC (rev 40849)
@@ -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/releasebranch_6_4/lib/gis/list.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/gis/list.c 2010-02-06 19:47:42 UTC (rev 40848)
+++ grass/branches/releasebranch_6_4/lib/gis/list.c 2010-02-06 19:57:03 UTC (rev 40849)
@@ -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/releasebranch_6_4/lib/gis/parser.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/gis/parser.c 2010-02-06 19:47:42 UTC (rev 40848)
+++ grass/branches/releasebranch_6_4/lib/gis/parser.c 2010-02-06 19:57:03 UTC (rev 40849)
@@ -1955,14 +1955,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