File: warnings

package info (click to toggle)
bogl 0.1.18-17
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,304 kB
  • sloc: ansic: 7,597; makefile: 211; perl: 26; sh: 10
file content (40 lines) | stat: -rw-r--r-- 1,177 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
 bogl-term.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

--- a/bogl-term.c
+++ b/bogl-term.c
@@ -27,6 +27,7 @@
 #include "bogl.h"
 #include "bogl-term.h"
 #include <string.h>
+#include <wctype.h>
 
 struct bogl_term *bogl_term_new(struct bogl_font *font)
 {
@@ -55,7 +56,7 @@ struct bogl_term *bogl_term_new(struct b
   term->bold = 0;
   term->state = 0;
   term->cur_visible = 1;
-  memset(&term->ps, 0, sizeof(&term->ps));
+  memset(&term->ps, 0, sizeof(term->ps));
 
   term->screen = malloc(term->xsize * term->ysize * sizeof(wchar_t));
   term->dirty = malloc(term->xsize * term->ysize);
@@ -210,11 +211,11 @@ printable (wchar_t wc)
   return (iswprint(wc) &&
       /* Invisible characters */
       (iswspace (wc) ||
-       !(wc >= 0x2000 && wc <= 0x200F ||
-         wc >= 0x2028 && wc <= 0x202F ||
-         wc >= 0x205F && wc <= 0x206F ||
-         wc == 0xFEFF ||
-         wc >= 0xE0000 && wc <= 0xE007F)));
+       !((wc >= 0x2000 && wc <= 0x200F) ||
+         (wc >= 0x2028 && wc <= 0x202F) ||
+         (wc >= 0x205F && wc <= 0x206F) ||
+          wc == 0xFEFF ||
+         (wc >= 0xE0000 && wc <= 0xE007F))));
 }
 
 static void