[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: filetool.c
User: danmc
Date: 05/02/22 17:45:14
Modified: . filetool.c
Log:
a pid_t isn't always an int so cast to a long and use %ld in printf's.
Revision Changes Path
1.4 +6 -6 eda/geda/devel/geda/graphman/filetool.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: filetool.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/geda/graphman/filetool.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- filetool.c 12 Feb 2005 22:06:03 -0000 1.3
+++ filetool.c 22 Feb 2005 22:45:13 -0000 1.4
@@ -1,4 +1,4 @@
-/* $Id: filetool.c,v 1.3 2005/02/12 22:06:03 danmc Exp $ */
+/* $Id: filetool.c,v 1.4 2005/02/22 22:45:13 danmc Exp $ */
/*******************************************************************************/
/* */
@@ -241,7 +241,7 @@
Pid = getpid();
/* redirecting stdout */
- sprintf(szValue, "/%s/%s-stdout-%d", GM_TMPDIR, GM_TMPNAME, Pid);
+ sprintf(szValue, "/%s/%s-stdout-%ld", GM_TMPDIR, GM_TMPNAME, (long) Pid);
hStdOut = freopen(szValue, "w", stdout);
if (hStdOut == NULL)
{
@@ -249,7 +249,7 @@
}
/* redirecting stderr */
- sprintf(szValue, "/%s/%s-stderr-%d", GM_TMPDIR, GM_TMPNAME, Pid);
+ sprintf(szValue, "/%s/%s-stderr-%ld", GM_TMPDIR, GM_TMPNAME, (long) Pid);
hStdErr = freopen(szValue, "w", stderr);
if (hStdErr == NULL)
{
@@ -279,7 +279,7 @@
else
{
/* print stderr */
- sprintf(szValue, "/%s/%s-stderr-%d", GM_TMPDIR, GM_TMPNAME, Pid);
+ sprintf(szValue, "/%s/%s-stderr-%ld", GM_TMPDIR, GM_TMPNAME, (long) Pid);
hStdErr = fopen(szValue, "r");
if (hStdErr == NULL)
{
@@ -308,7 +308,7 @@
}
/* remove last stdout file */
- sprintf(szValue, "/%s/%s-stdout-%d", GM_TMPDIR, GM_TMPNAME, Pid);
+ sprintf(szValue, "/%s/%s-stdout-%ld", GM_TMPDIR, GM_TMPNAME, (long) Pid);
iResult = remove(szValue);
if (iResult != 0)
{
@@ -316,7 +316,7 @@
}
/* remove last stderr file */
- sprintf(szValue, "/%s/%s-stderr-%d", GM_TMPDIR, GM_TMPNAME, Pid);
+ sprintf(szValue, "/%s/%s-stderr-%ld", GM_TMPDIR, GM_TMPNAME, (long) Pid);
iResult = remove(szValue);
if (iResult != 0)
{