summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsabetts <sabetts>2005-01-15 05:35:59 +0000
committersabetts <sabetts>2005-01-15 05:35:59 +0000
commit122905248ec7c0ffd0b26fb5f782dab3fef7b495 (patch)
treeafa696fa0d56df82b27fa01d53ea3464c71a0338
parent06cabefa30b1838dbe6ba28aa62a6f5f7318834a (diff)
downloadratpoison-122905248ec7c0ffd0b26fb5f782dab3fef7b495.zip
* src/globals.h (RET_SUCCESS): set to 1
(RET_FAILURE): set to 0 * src/communications.c (receive_command_result) (receive_command_result): fix error deciding when to print to stderr.
-rw-r--r--ChangeLog9
-rw-r--r--src/communications.c2
-rw-r--r--src/globals.h4
3 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a2cfe1..c37574d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-01-15 Shawn Betts <katia_dilkina@verizon.net>
+
+ * src/globals.h (RET_SUCCESS): set to 1
+ (RET_FAILURE): set to 0
+
+ * src/communications.c (receive_command_result)
+ (receive_command_result): fix error deciding when to print to
+ stderr.
+
2005-01-15 Shawn Betts <sabetts@vcn.bc.ca>
* src/actions.c (parse_args): remove erroneous pointer dereference
diff --git a/src/communications.c b/src/communications.c
index 51da24a..8c86b60 100644
--- a/src/communications.c
+++ b/src/communications.c
@@ -75,7 +75,7 @@ receive_command_result (Window w)
/* If result is not the empty string, print it. */
if (strlen ((char *)result))
{
- if (result[1] == '0')
+ if (result[0] == '1')
printf ("%s\n", &result[1]);
else
fprintf (stderr, "%s\n", &result[1]);
diff --git a/src/globals.h b/src/globals.h
index 7aa2128..a1665fb 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -24,8 +24,8 @@
#include "data.h"
/* codes used in the cmdret code in actions.c */
-#define RET_SUCCESS 0
-#define RET_FAILURE 1
+#define RET_SUCCESS 1
+#define RET_FAILURE 0
#define FONT_HEIGHT(f) ((f)->max_bounds.ascent + (f)->max_bounds.descent)
#define MAX_FONT_WIDTH(f) ((f)->max_bounds.width)