Attached.
diff -r 2effc50d2c4f st.c
--- a/st.c      Sun May 22 16:57:27 2011 +0200
+++ b/st.c      Thu May 26 14:30:53 2011 +0400
@@ -473,8 +473,7 @@
 
 void
 selnotify(XEvent *e) {
-       unsigned long nitems;
-       unsigned long ofs, rem;
+       unsigned long nitems, ofs, rem;
        int format;
        unsigned char *data;
        Atom type;
@@ -484,7 +483,7 @@
                if(XGetWindowProperty(xw.dpy, xw.win, XA_PRIMARY, ofs, BUFSIZ/4,
                                        False, AnyPropertyType, &type, &format,
                                        &nitems, &rem, &data)) {
-                       fprintf(stderr, "Clipboard allocation failed\n");
+                       fputs("Clipboard allocation failed\n", stderr);
                        return;
                }
                ttywrite((const char *) data, nitems * format / 8);
@@ -531,7 +530,7 @@
 
        /* all done, send a notification to the listener */
        if(!XSendEvent(xsre->display, xsre->requestor, True, 0, (XEvent *) 
&xev))
-               fprintf(stderr, "Error sending SelectionNotify event\n");
+               fputs("Error sending SelectionNotify event\n", stderr);
 }
 
 void
@@ -594,8 +593,7 @@
 void
 bmotion(XEvent *e) {
        if(sel.mode) {
-               int oldey = sel.ey,
-                       oldex = sel.ex;
+               int oldey = sel.ey, oldex = sel.ex;
                getbuttoninfo(e, NULL, &sel.ex, &sel.ey);
 
                if(oldey != sel.ey || oldex != sel.ex) {
@@ -675,7 +673,7 @@
        static int col;
        fprintf(stderr, " %02x '%c' ", c, isprint(c)?c:'.');
        if(++col % 10 == 0)
-               fprintf(stderr, "\n");
+               fputc('\n', stderr);
 }
 
 void
@@ -753,7 +751,7 @@
        term.row = row, term.col = col;
        term.line = malloc(term.row * sizeof(Line));
        term.alt  = malloc(term.row * sizeof(Line));
-       for(row = 0 ; row < term.row; row++) {
+       for(row = 0; row < term.row; row++) {
                term.line[row] = malloc(term.col * sizeof(Glyph));
                term.alt [row] = malloc(term.col * sizeof(Glyph));
        }
@@ -1007,7 +1005,7 @@
        switch(escseq.mode) {
        default:
        unknown:
-               fprintf(stderr, "erresc: unknown csi ");
+               fputs("erresc: unknown csi ", stderr);
                csidump();
                /* die(""); */
                break;

Reply via email to