ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RP] patch: return error messages instead of ignoring them.


From: Bernhard R. Link
Subject: [RP] patch: return error messages instead of ignoring them.
Date: Wed, 2 Feb 2005 22:21:56 +0100
User-agent: Mutt/1.3.28i

The following patch fixes some missing returns:

Index: ChangeLog
===================================================================
RCS file: /cvsroot/ratpoison/ratpoison/ChangeLog,v
retrieving revision 1.384
diff -u -r1.384 ChangeLog
--- ChangeLog   30 Jan 2005 17:14:09 -0000      1.384
+++ ChangeLog   2 Feb 2005 21:20:47 -0000
@@ -1,3 +1,12 @@
+2005-02-01  Bernhard R. Link  <address@hidden>
+
+       * src/actions.c (cmd_unalias) return error message generated
+       instead of ignoring it.
+       (cmd_nextscreen) likewise
+       (cmd_prevscreen) likewise
+       (cmd_gdelete) likewise
+       (set_winname) likewise and use canonic name
+
 2005-01-30  Shawn Betts  <address@hidden>
 
        * src/actions.c (cmd_escape): when the escape key doesn't have a
Index: src/actions.c
===================================================================
RCS file: /cvsroot/ratpoison/ratpoison/src/actions.c,v
retrieving revision 1.242
diff -u -r1.242 actions.c
--- src/actions.c       1 Feb 2005 02:34:54 -0000       1.242
+++ src/actions.c       2 Feb 2005 21:20:48 -0000
@@ -3542,7 +3542,7 @@
   else if (!strncmp (name, "class", 5))
     defaults.win_name = WIN_NAME_RES_CLASS;
   else
-    cmdret_new ("defwinname: invalid argument", RET_FAILURE);
+    return cmdret_new ("set winname: invalid argument", RET_FAILURE);
 
   return cmdret_new (NULL, RET_SUCCESS);
 }
@@ -3880,7 +3880,7 @@
       free (alias_list[alias_list_last].name);
     }
   else
-    cmdret_new ("unalias: alias not found", RET_SUCCESS);
+    return cmdret_new ("unalias: alias not found", RET_SUCCESS);
 
   return cmdret_new (NULL, RET_SUCCESS);
 }
@@ -3892,7 +3892,7 @@
 
   /* No need to go through the motions when we don't have to. */
   if (num_screens <= 1)
-    cmdret_new ("nextscreen: no other screen", RET_FAILURE);
+    return cmdret_new ("nextscreen: no other screen", RET_FAILURE);
 
   new_screen = rp_current_screen + 1;
   if (new_screen >= num_screens)
@@ -3910,7 +3910,7 @@
 
   /* No need to go through the motions when we don't have to. */
   if (num_screens <= 1)
-    cmdret_new ("prevscreen: no other screen", RET_SUCCESS);
+    return cmdret_new ("prevscreen: no other screen", RET_SUCCESS);
 
   new_screen = rp_current_screen - 1;
   if (new_screen < 0)
@@ -4568,10 +4568,9 @@
     case GROUP_DELETE_GROUP_OK:
       break;
     case GROUP_DELETE_GROUP_NONEMPTY:
-      cmdret_new ("gdelete: non-empty group", RET_FAILURE);
-      break;
+      return cmdret_new ("gdelete: non-empty group", RET_FAILURE);
     default:
-      cmdret_new ("gdelete: unknown return code (this shouldn't happen)", 
RET_FAILURE);
+      return cmdret_new ("gdelete: unknown return code (this shouldn't 
happen)", RET_FAILURE);
     }
 
   return cmdret_new (NULL, RET_SUCCESS);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]