summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-06-03 23:56:08 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-06-03 23:56:08 -0700
commitd41d834d8b2be86eb56802de12c2399c7ff0919f (patch)
treecac177bbd9a7ce8eb4caae7b678f4fa2a982fa20
parentd5417f2eb09e7061801f63ce77e3441d80e5e4a1 (diff)
Print which option was in error along with usage message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--configure.ac2
-rw-r--r--dsimple.h2
-rw-r--r--xwininfo.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 2868a09..3149a5f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,7 +66,7 @@ PKG_CHECK_MODULES(XWININFO, [xcb >= 1.6] xcb-shape ${xcb_icccm_pc})
# Even when using xcb, xproto is still required for Xfuncproto.h
# and libX11 headers for cursorfont.h
-PKG_CHECK_MODULES(XLIB, x11 [xproto >= 7.0.17])
+PKG_CHECK_MODULES(XLIB, x11 [xproto >= 7.0.25])
XWININFO_CFLAGS="${XWININFO_CFLAGS} ${XLIB_CFLAGS}"
XWININFO_LIBS="${XWININFO_LIBS} ${LIBICONV}"
diff --git a/dsimple.h b/dsimple.h
index 9529605..6699e76 100644
--- a/dsimple.h
+++ b/dsimple.h
@@ -54,7 +54,7 @@ void Setup_Display_And_Screen (const char *displayname,
xcb_window_t Select_Window (xcb_connection_t *, const xcb_screen_t *, int);
xcb_window_t Window_With_Name (xcb_connection_t *, xcb_window_t, const char *);
-void Fatal_Error (const char *, ...) _X_NORETURN _X_ATTRIBUTE_PRINTF(1, 2);
+void Fatal_Error (const char *, ...) _X_NORETURN _X_ATTRIBUTE_PRINTF(1, 2) _X_COLD;
void Print_X_Error (xcb_connection_t *, xcb_generic_error_t *);
diff --git a/xwininfo.c b/xwininfo.c
index 39ae6ea..3f80b94 100644
--- a/xwininfo.c
+++ b/xwininfo.c
@@ -278,7 +278,7 @@ static size_t strlcat (char *dst, const char *src, size_t dstsize)
/*
* Report the syntax for calling xwininfo:
*/
-_X_NORETURN
+_X_NORETURN _X_COLD
static void
usage (void)
{
@@ -537,6 +537,8 @@ main (int argc, char **argv)
tree = stats = bits = events = wm = size = shape = 1;
continue;
}
+ fprintf (stderr, "%s: unrecognized argument %s\n\n",
+ program_name, argv[i]);
usage ();
}