From: Mark Wooding Date: Fri, 26 Oct 2012 18:25:47 +0000 (+0100) Subject: Merge branch 'master' of git.distorted.org.uk:public-git/misc X-Git-Tag: 1.2.8.1~1 X-Git-Url: https://git.distorted.org.uk/~mdw/misc/commitdiff_plain/910510e4671b26ebd62eff162f5207d28a58a39d?hp=fd0488150b2d4642721c96d7a4c394da1004676f Merge branch 'master' of git.distorted.org.uk:public-git/misc * '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. --- diff --git a/hush.1.in b/hush.1.in index b84465c..d849700 100644 --- 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= ). diff --git a/xtitle.c b/xtitle.c index 29607cb..a6696d3 100644 --- a/xtitle.c +++ b/xtitle.c @@ -6,13 +6,14 @@ #include #include +#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)