aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rio/showevent/README
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/rio/showevent/README')
-rw-r--r--src/cmd/rio/showevent/README28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/cmd/rio/showevent/README b/src/cmd/rio/showevent/README
new file mode 100644
index 00000000..b6429cb8
--- /dev/null
+++ b/src/cmd/rio/showevent/README
@@ -0,0 +1,28 @@
+I have edited this code to work on modern compilers.
+
+Russ Cox
+
+---
+
+There are times during debugging when it would be real useful to be able to
+print the fields of an event in a human readable form. Too many times I found
+myself scrounging around in section 8 of the Xlib manual looking for the valid
+fields for the events I wanted to see, then adding printf's to display the
+numeric values of the fields, and then scanning through X.h trying to decode
+the cryptic detail and state fields. After playing with xev, I decided to
+write a couple of standard functions that I could keep in a library and call
+on whenever I needed a little debugging verbosity. The first function,
+GetType(), is useful for returning the string representation of the type of
+an event. The second function, ShowEvent(), is used to display all the fields
+of an event in a readable format. The functions are not complicated, in fact,
+they are mind-numbingly boring - but that's just the point nobody wants to
+spend the time writing functions like this, they just want to have them when
+they need them.
+
+A simple, sample program is included which does little else but to demonstrate
+the use of these two functions. These functions have saved me many an hour
+during debugging and I hope you find some benefit to these. If you have any
+comments, suggestions, improvements, or if you find any blithering errors you
+can get it touch with me at the following location:
+
+ ken@richsun.UUCP