[hackers] [st] fix: whitespace || Markus Teich

From: <git_AT_suckless.org>
Date: Thu, 04 Jul 2013 18:24:58 +0200

commit 40e4d76d227d9c517054036f546acd49431bca42
Author: Markus Teich <markus.teich_AT_stusta.mhn.de>
Date: Sat Jun 22 23:07:00 2013 +0200

    fix: whitespace

diff --git a/config.def.h b/config.def.h
index 2de9a0a..9a3d2c8 100644
--- a/config.def.h
+++ b/config.def.h
_AT_@ -160,7 +160,7 @@ static Key key[] = {
         { XK_KP_Right, XK_ANY_MOD, "", 0, -1, 0},
         { XK_KP_Right, XK_ANY_MOD, "OC", 0, +1, 0},
         { XK_KP_Prior, ShiftMask, "[5;2~", 0, 0, 0},
- { XK_KP_Prior, XK_ANY_MOD, "[5~", 0, 0, 0},
+ { XK_KP_Prior, XK_ANY_MOD, "[5~", 0, 0, 0},
         { XK_KP_Begin, XK_ANY_MOD, "", 0, 0, 0},
         { XK_KP_End, ControlMask, "", -1, 0, 0},
         { XK_KP_End, ControlMask, "", +1, 0, 0},
_AT_@ -213,7 +213,7 @@ static Key key[] = {
         { XK_Left, ShiftMask, "", 0, 0, 0},
         { XK_Left, ControlMask, "", 0, 0, 0},
         { XK_Left, Mod1Mask, "", 0, 0, 0},
- { XK_Left, XK_ANY_MOD, "", 0, -1, 0},
+ { XK_Left, XK_ANY_MOD, "", 0, -1, 0},
         { XK_Left, XK_ANY_MOD, "OD", 0, +1, 0},
         { XK_Right, ShiftMask, "", 0, 0, 0},
         { XK_Right, ControlMask, "", 0, 0, 0},
diff --git a/st.c b/st.c
index 0fc724b..289ecb8 100644
--- a/st.c
+++ b/st.c
_AT_@ -98,37 +98,37 @@ enum cursor_movement {
 enum cursor_state {
         CURSOR_DEFAULT = 0,
         CURSOR_WRAPNEXT = 1,
- CURSOR_ORIGIN = 2
+ CURSOR_ORIGIN = 2
 };
 
 enum term_mode {
- MODE_WRAP = 1,
+ MODE_WRAP = 1,
         MODE_INSERT = 2,
         MODE_APPKEYPAD = 4,
         MODE_ALTSCREEN = 8,
- MODE_CRLF = 16,
+ MODE_CRLF = 16,
         MODE_MOUSEBTN = 32,
         MODE_MOUSEMOTION = 64,
         MODE_REVERSE = 128,
         MODE_KBDLOCK = 256,
- MODE_HIDE = 512,
- MODE_ECHO = 1024,
- MODE_APPCURSOR = 2048,
+ MODE_HIDE = 512,
+ MODE_ECHO = 1024,
+ MODE_APPCURSOR = 2048,
         MODE_MOUSESGR = 4096,
- MODE_8BIT = 8192,
- MODE_BLINK = 16384,
- MODE_FBLINK = 32768,
- MODE_FOCUS = 65536,
- MODE_MOUSEX10 = 131072,
+ MODE_8BIT = 8192,
+ MODE_BLINK = 16384,
+ MODE_FBLINK = 32768,
+ MODE_FOCUS = 65536,
+ MODE_MOUSEX10 = 131072,
         MODE_MOUSEMANY = 262144,
         MODE_MOUSE = MODE_MOUSEBTN|MODE_MOUSEMOTION|MODE_MOUSEX10\
- |MODE_MOUSEMANY,
+ |MODE_MOUSEMANY,
 };
 
 enum escape_state {
         ESC_START = 1,
- ESC_CSI = 2,
- ESC_STR = 4, /* DSC, OSC, PM, APC */
+ ESC_CSI = 2,
+ ESC_STR = 4, /* DSC, OSC, PM, APC */
         ESC_ALTCHARSET = 8,
         ESC_STR_END = 16, /* a final string was encountered */
         ESC_TEST = 32, /* Enter in test mode */
_AT_@ -156,16 +156,16 @@ typedef unsigned long ulong;
 typedef unsigned short ushort;
 
 typedef struct {
- char c[UTF_SIZ]; /* character code */
- uchar mode; /* attribute flags */
- ushort fg; /* foreground */
- ushort bg; /* background */
+ char c[UTF_SIZ]; /* character code */
+ uchar mode; /* attribute flags */
+ ushort fg; /* foreground */
+ ushort bg; /* background */
 } Glyph;
 
 typedef Glyph *Line;
 
 typedef struct {
- Glyph attr; /* current char attributes */
+ Glyph attr; /* current char attributes */
         int x;
         int y;
         char state;
_AT_@ -175,36 +175,36 @@ typedef struct {
 /* ESC '[' [[ [<priv>] <arg> [;]] <mode>] */
 typedef struct {
         char buf[ESC_BUF_SIZ]; /* raw string */
- int len; /* raw string length */
+ int len; /* raw string length */
         char priv;
         int arg[ESC_ARG_SIZ];
- int narg; /* nb of args */
+ int narg; /* nb of args */
         char mode;
 } CSIEscape;
 
 /* STR Escape sequence structs */
 /* ESC type [[ [<priv>] <arg> [;]] <mode>] ESC '\' */
 typedef struct {
- char type; /* ESC type ... */
+ char type; /* ESC type ... */
         char buf[STR_BUF_SIZ]; /* raw string */
- int len; /* raw string length */
+ int len; /* raw string length */
         char *args[STR_ARG_SIZ];
- int narg; /* nb of args */
+ int narg; /* nb of args */
 } STREscape;
 
 /* Internal representation of the screen */
 typedef struct {
- int row; /* nb row */
- int col; /* nb col */
- Line *line; /* screen */
- Line *alt; /* alternate screen */
- bool *dirty; /* dirtyness of lines */
- TCursor c; /* cursor */
- int top; /* top scroll limit */
- int bot; /* bottom scroll limit */
- int mode; /* terminal mode flags */
- int esc; /* escape state flags */
- bool numlock; /* lock numbers in keyboard */
+ int row; /* nb row */
+ int col; /* nb col */
+ Line *line; /* screen */
+ Line *alt; /* alternate screen */
+ bool *dirty; /* dirtyness of lines */
+ TCursor c; /* cursor */
+ int top; /* top scroll limit */
+ int bot; /* bottom scroll limit */
+ int mode; /* terminal mode flags */
+ int esc; /* escape state flags */
+ bool numlock; /* lock numbers in keyboard */
         bool *tabs;
 } Term;
 
_AT_@ -241,9 +241,9 @@ typedef struct {
         uint mask;
         char s[ESC_BUF_SIZ];
         /* three valued logic variables: 0 indifferent, 1 on, -1 off */
- signed char appkey; /* application keypad */
- signed char appcursor; /* application cursor */
- signed char crlf; /* crlf mode */
+ signed char appkey; /* application keypad */
+ signed char appcursor; /* application cursor */
+ signed char crlf; /* crlf mode */
 } Key;
 
 typedef struct {
_AT_@ -1182,7 +1182,7 @@ sigchld(int a) {
         int stat = 0;
 
         if(waitpid(pid, &stat, 0) < 0)
- die("Waiting for pid %hd failed: %s
", pid, SERRNO);
+ die("Waiting for pid %hd failed: %s
", pid, SERRNO);
 
         if(WIFEXITED(stat)) {
                 exit(WEXITSTATUS(stat));
_AT_@ -1821,7 +1821,7 @@ tsetmode(bool priv, bool set, int *args, int narg) {
                                         tclearregion(0, 0, term.col-1,
                                                         term.row-1);
                                 }
- if(set ^ alt) /* set is always 1 or 0 */
+ if(set ^ alt) /* set is always 1 or 0 */
                                         tswapscreen();
                                 if(*args != 1049)
                                         break;
_AT_@ -2184,10 +2184,10 @@ techo(char *buf, int len) {
         for(; len > 0; buf++, len--) {
                 char c = *buf;
 
- if(c == '') { /* escape */
+ if(c == '') { /* escape */
                         tputc("^", 1);
                         tputc("[", 1);
- } else if(c < '\x20') { /* control code */
+ } else if(c < '\x20') { /* control code */
                         if(c != '
' && c != ' ' && c != ' ') {
                                 c |= '\x40';
                                 tputc("^", 1);
_AT_@ -2258,31 +2258,31 @@ tputc(char *c, int len) {
          */
         if(control) {
                 switch(ascii) {
- case ' ': /* HT */
+ case ' ': /* HT */
                         tputtab(1);
                         return;
- case '': /* BS */
+ case '': /* BS */
                         tmoveto(term.c.x-1, term.c.y);
                         return;
- case ' ': /* CR */
+ case ' ': /* CR */
                         tmoveto(0, term.c.y);
                         return;
- case ' ': /* LF */
- case ' ': /* VT */
- case '
': /* LF */
+ case ' ': /* LF */
+ case ' ': /* VT */
+ case '
': /* LF */
                         /* go to first col if the mode is set */
                         tnewline(IS_SET(MODE_CRLF));
                         return;
- case '': /* BEL */
+ case '': /* BEL */
                         if(!(xw.state & WIN_FOCUSED))
                                 xseturgency(1);
                         return;
- case '': /* ESC */
+ case '': /* ESC */
                         csireset();
                         term.esc = ESC_START;
                         return;
- case '': /* SO */
- case '': /* SI */
+ case '': /* SO */
+ case '': /* SI */
                         /*
                          * Different charsets are hard to handle. Applications
                          * should use the right alt charset escapes for the
_AT_@ -2290,15 +2290,15 @@ tputc(char *c, int len) {
                          * rest is incompatible history st should not support.
                          */
                         return;
- case '': /* SUB */
- case '': /* CAN */
+ case '': /* SUB */
+ case '': /* CAN */
                         csireset();
                         return;
- case '': /* ENQ (IGNORED) */
- case '
Received on Thu Jul 04 2013 - 18:24:58 CEST

This archive was generated by hypermail 2.3.0 : Thu Jul 04 2013 - 18:36:10 CEST