summaryrefslogtreecommitdiff
path: root/app/xwd/dsimple.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/xwd/dsimple.c')
-rw-r--r--app/xwd/dsimple.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/xwd/dsimple.c b/app/xwd/dsimple.c
index 972a72ef5..254607271 100644
--- a/app/xwd/dsimple.c
+++ b/app/xwd/dsimple.c
@@ -44,7 +44,7 @@ from The Open Group.
#include "dsimple.h"
/*
- * Just_display: A group of routines designed to make the writting of simple
+ * Just_display: A group of routines designed to make the writing of simple
* X11 applications which open a display but do not open
* any windows much faster and easier. Unless a routine says
* otherwise, it may be assumed to require program_name, dpy,
@@ -61,7 +61,7 @@ int screen = 0;
/*
- * Get_Display_Name (argc, argv) Look for -display, -d, or host:dpy (obselete)
+ * Get_Display_Name (argc, argv) Look for -display, -d, or host:dpy (obsolete)
* If found, remove it from command line. Don't go past a lone -.
*/
char *
@@ -71,14 +71,13 @@ Get_Display_Name(int *pargc, /* MODIFIED */
int argc = *pargc;
char **pargv = argv + 1;
char *displayname = NULL;
- int i;
- for (i = 1; i < argc; i++) {
+ for (int i = 1; i < argc; i++) {
char *arg = argv[i];
if (!strcmp(arg, "-display") || !strcmp(arg, "-d")) {
if (++i >= argc)
- usage("-display requires an argument");
+ usage("-display requires an argument", EXIT_FAILURE);
displayname = argv[i];
*pargc -= 2;
@@ -150,7 +149,7 @@ Close_Display(void)
/*
- * Select_Window_Args: a rountine to provide a common interface for
+ * Select_Window_Args: a routine to provide a common interface for
* applications that need to allow the user to select one
* window on the screen for special consideration.
* This routine implements the following command line
@@ -185,7 +184,8 @@ Select_Window_Args(int *rargc, char **argv)
#define OPTION argv[0]
#define NXTOPTP ++argv, --argc>0
-#define NXTOPT(arg) if (++argv, --argc==0) usage(arg " requires an argument")
+#define NXTOPT(arg) if (++argv, --argc==0) \
+ usage(arg " requires an argument", EXIT_FAILURE)
#define COPYOPT nargv++[0]=OPTION, nargc++
while (NXTOPTP) {