[hackers] [sandy] Fixed styling (by Evil_Bob) || Dimitris Zervas

From: <git_AT_suckless.org>
Date: Sun, 20 Jul 2014 19:02:14 +0200

commit 19f09638d65af5b4a6d4786f580523b7955315e5
Author: Dimitris Zervas <dzervas_AT_dzervas.gr>
Date: Sun Jul 20 19:58:22 2014 +0300

    Fixed styling (by Evil_Bob)

diff --git a/config.mk b/config.mk
index 0ae10a3..0246ddd 100644
--- a/config.mk
+++ b/config.mk
_AT_@ -12,7 +12,7 @@ INCS = -I. -I/usr/include
 LIBS = -L/usr/lib -lc -lncurses
 
 # flags
-CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE
+CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L
 #CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
 #LDFLAGS = -s ${LIBS}
 CFLAGS = -ggdb -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
diff --git a/sandy.c b/sandy.c
index b1f9dc4..22d1fdb 100644
--- a/sandy.c
+++ b/sandy.c
_AT_@ -14,41 +14,33 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-
-/* Defines */
-#ifndef PIPESIZ /* This is POSIX magic */
-#define PIPESIZ 4096
-#endif /*PIPESIZ*/
-
-#ifndef PATHSIZ /* Max path length */
-#define PATHSIZ 1024
-#endif /*PATHSIZ*/
+#include <limits.h>
 
 #define LENGTH(x) ((int)(sizeof (x) / sizeof *(x)))
 #define LINSIZ 128
-#define UTF8LEN(ch) ((unsigned char)ch>=0xFC ? 6 : \
- ((unsigned char)ch>=0xF8 ? 5 : \
- ((unsigned char)ch>=0xF0 ? 4 : \
- ((unsigned char)ch>=0xE0 ? 3 : \
- ((unsigned char)ch>=0xC0 ? 2 : 1)))))
+#define UTF8LEN(ch) ((unsigned char)ch>=0xFC ? 6 : \
+ ((unsigned char)ch>=0xF8 ? 5 : \
+ ((unsigned char)ch>=0xF0 ? 4 : \
+ ((unsigned char)ch>=0xE0 ? 3 : \
+ ((unsigned char)ch>=0xC0 ? 2 : 1)))))
 #define ISASCII(ch) ((unsigned char)ch < 0x80)
-#define ISCTRL(ch) (((unsigned char)ch < 0x20) || (ch == 0x7F))
+#define ISCTRL(ch) (((unsigned char)ch < ' ') || (ch == 0x7F))
 #define ISFILL(ch) (isutf8 && !ISASCII(ch) && (unsigned char)ch<=0xBF)
 #define ISBLANK(ch) (ch == ' ' || ch == ' ' || ch == '
Received on Sun Jul 20 2014 - 19:02:14 CEST

This archive was generated by hypermail 2.3.0 : Sun Jul 20 2014 - 19:12:08 CEST