Merge branch 'master' of git.distorted.org.uk:public-git/misc
authorMark Wooding <mdw@distorted.org.uk>
Fri, 26 Oct 2012 18:25:47 +0000 (19:25 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 26 Oct 2012 18:25:47 +0000 (19:25 +0100)
* 'master' of git.distorted.org.uk:public-git/misc:
  xtitle.c: Ignore boring return codes better.
  hush.1.in: Fix some stupid (but relatively minor) formatting foulups.

hush.1.in
xtitle.c

index b84465c..d849700 100644 (file)
--- a/hush.1.in
+++ b/hush.1.in
@@ -64,9 +64,10 @@ log files are left.
 .TP
 .BI "\-p " mode
 Set the permissions on the logfile to
-.I mode ,
+.IR mode ,
 a mode specification acceptable to
-.BR chmod (1), though relative permissions will be applied to mode
+.BR chmod (1),
+though relative permissions will be applied to mode
 .B 600
 (i.e.,
 .BR u=rw,og= ).
index 29607cb..a6696d3 100644 (file)
--- a/xtitle.c
+++ b/xtitle.c
@@ -6,13 +6,14 @@
 #include <string.h>
 #include <fcntl.h>
 
+#define IGNORE(x) do if (x); while (0)
+
 int main(int argc, char *argv[])
 {
   int query = 0;
   int fd;
   int openned = 0;
   int i;
-  int hunoz;
 
   for (;;) {
     i = getopt(argc, argv, "q");
@@ -52,13 +53,13 @@ int main(int argc, char *argv[])
 
   if (!query) {
     char sp = ' ';
-    hunoz = write(fd, "\33]0;", 4);
+    IGNORE(write(fd, "\33]0;", 4));
     for (i = optind; i < argc; i++) {
-      hunoz = write(fd, argv[i], strlen(argv[i]));
+      IGNORE(write(fd, argv[i], strlen(argv[i])));
       if (i < argc - 1)
-       hunoz = write(fd, &sp, 1);
+       IGNORE(write(fd, &sp, 1));
     }
-    hunoz = write(fd, "\7", 2);
+    IGNORE(write(fd, "\7", 2));
   } else {
     struct termios o, n;
     char hack;
@@ -72,7 +73,7 @@ int main(int argc, char *argv[])
     n.c_cflag &= ~(CSIZE|PARENB);
     n.c_cflag |= CS8;
     tcsetattr(fd, TCSAFLUSH, &n);
-    hunoz = write(fd, "\33[21t", 5);
+    IGNORE(write(fd, "\33[21t", 5));
 
     while (state != -1) {
       if (read(fd, &hack, 1) < 1)