From 95a436f7efd7061a15e3be533c56e573aac2db92 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 26 Aug 2012 21:45:45 -0700 Subject: Refactor error printing to use common functions All errors currently recognized by xscope fall into two forms, with or without a 32-bit value to print as a bad value, so use common implementations for those two forms so we can stop duplicating that code for every new extension-defined error. Signed-off-by: Alan Coopersmith --- x11.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'x11.h') diff --git a/x11.h b/x11.h index 6cdf270..fa6cfef 100644 --- a/x11.h +++ b/x11.h @@ -656,4 +656,9 @@ uint32_t getreqlen(FD fd, const unsigned char *buf) { /* Constant defined in Generic Event Protocol 1.0 for event type */ #define Event_Type_Generic 35 +/* Routines for printing the two common forms of error responses */ +extern void printErrorWithValue(const unsigned char *buf, + short FieldType, const char *desc); +extern void printErrorNoValue(const unsigned char *buf); + #endif /* XSCOPE_X11_H */ -- cgit v1.2.1