about summary refs log tree commit diff
path: root/safe_u8putstr.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-08-31 17:30:17 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-08-31 17:30:17 +0200
commit66d0eff12fdf31e520493e7c2accb95410dcaec2 (patch)
treef67b59076967ec441daaf7e7c40c1d502a9136bd /safe_u8putstr.c
parentdfe09a7c5e3a2273f963d53432ef1686b34547db (diff)
downloadmblaze-66d0eff12fdf31e520493e7c2accb95410dcaec2.tar.gz
mblaze-66d0eff12fdf31e520493e7c2accb95410dcaec2.tar.xz
mblaze-66d0eff12fdf31e520493e7c2accb95410dcaec2.zip
style
Diffstat (limited to 'safe_u8putstr.c')
-rw-r--r--safe_u8putstr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/safe_u8putstr.c b/safe_u8putstr.c
index 28c541e..e198b54 100644
--- a/safe_u8putstr.c
+++ b/safe_u8putstr.c
@@ -1,5 +1,5 @@
-#include <stdio.h>
 #include <stdint.h>
+#include <stdio.h>
 
 void
 safe_u8putstr(char *s0, size_t l, FILE *stream)
@@ -10,7 +10,7 @@ safe_u8putstr(char *s0, size_t l, FILE *stream)
 	// - rest is assumed to be latin1, and translated into utf8
 	// - translate CRLF to CR
 
-	unsigned char *s = (unsigned char* )s0;
+	unsigned char *s = (unsigned char *)s0;
 	unsigned char *e = s + l;
 
 	while (s < e) {
@@ -56,13 +56,13 @@ safe_u8putstr(char *s0, size_t l, FILE *stream)
 				f = (s[0]<<24) | (s[1]<<16);
 			else if (e - s == 1)
 				f = (s[0]<<24);
-			
+
 			if      ((f & 0xe0c00000) == 0xc0800000) goto u2;
 			else if ((f & 0xf0c0c000) == 0xe0808000) goto u3;
 			else if ((f & 0xf8c0c0c0) == 0xf0808080) {
 				fputc(*s++, stream);
-u3:				fputc(*s++, stream);
-u2:				fputc(*s++, stream);
+u3:                             fputc(*s++, stream);
+u2:                             fputc(*s++, stream);
 				fputc(*s, stream);
 			} else {
 latin1: