Stefan Schuermans

Stefan Schuermans commited on 2011-09-11 17:14:43
Showing 24 changed files, with 45 additions and 34 deletions.

... ...
@@ -1,3 +1,7 @@
1
+1.0.2 2010-08-30
2
+----------------
3
+replaced strerror() with strerror_r()
4
+
1 5
 1.0.1 2010-08-19
2 6
 ----------------
3 7
 fixed generation and cleanup of exmaples in Makfile
... ...
@@ -1,5 +1,5 @@
1 1
 # FlexiPix library
2
-# !version: 1.0.1! !date: 2010-08-19!
2
+# !version: 1.0.2! !date: 2010-08-30!
3 3
 #
4 4
 # Copyright 2010 Stefan Schuermans <stefan schuermans info>
5 5
 #
... ...
@@ -19,7 +19,7 @@
19 19
 LIBTARGET=libflexipix
20 20
 VER=1
21 21
 VERMIN=0
22
-VERREV=1
22
+VERREV=2
23 23
 
24 24
 SRCS=$(wildcard src/*.c)
25 25
 EX_SRCS=$(wildcard examples/src/*.c)
... ...
@@ -121,8 +121,8 @@ pack:
121 121
 	$(MAKE) clean
122 122
 	mkdir -p pack/$(PACKNAME)
123 123
 	cp -r $(PACKDATA) pack/$(PACKNAME)
124
-	sed -i 's/!version: 1.0.1!]*!/!version: 1.0.1!/g' $$(find pack -type f)
125
-	sed -i 's/!date: 2010-08-19!]*!/!date: 2010-08-19!/g' $$(find pack -type f)
124
+	sed -i 's/!version: 1.0.2!]*!/!version: 1.0.2!/g' $$(find pack -type f)
125
+	sed -i 's/!date: 2010-08-30!]*!/!date: 2010-08-30!/g' $$(find pack -type f)
126 126
 	cd pack; tar jcf ../$(PACKNAME).tar.bz2 $(PACKNAME)
127 127
 	$(MAKE) clean
128 128
 
... ...
@@ -1,5 +1,5 @@
1 1
 FlexiPix library
2
-!version: 1.0.1! !date: 2010-08-19!
2
+!version: 1.0.2! !date: 2010-08-30!
3 3
 
4 4
 FlexPix is a large scale display architecure that is driven using UDP/IP.
5 5
 It consists of single pixels that are connected to chains. A number of those
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -601,10 +601,13 @@ int flp_config_proc_file(flp_display_t *p_display,
601 601
   /* open file */
602 602
   file = fopen(sz_config_file, "rt");
603 603
   if (!file) {
604
-    if (p_msg_func)
604
+    if (p_msg_func) {
605
+      char errmsg[256];
606
+      strerror_r(errno, errmsg, sizeof(errmsg));
605 607
       p_msg_func(p_msg_ctx, flp_msg_type_err,
606 608
                  "cannot open config file \"%s\" for reading: %s\n",
607
-                 sz_config_file, strerror(errno));
609
+                 sz_config_file, errmsg);
610
+    }
608 611
     return -1;
609 612
   }
610 613
 
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -81,10 +81,12 @@ flp_display_t *flp_display_create(const char *sz_config_file,
81 81
   p_display->sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
82 82
   if (p_display->sock < 0) {
83 83
     flp_display_free(p_display);
84
-    if (p_msg_func)
84
+    if (p_msg_func) {
85
+      char errmsg[256];
86
+      strerror_r(errno, errmsg, sizeof(errmsg));
85 87
       p_msg_func(p_msg_ctx, flp_msg_type_err,
86
-                 "could not create UDP socket: %s\n",
87
-                 strerror(errno));
88
+                 "could not create UDP socket: %s\n", errmsg);
89
+    }
88 90
     return NULL;
89 91
   }
90 92
 
... ...
@@ -92,12 +94,14 @@ flp_display_t *flp_display_create(const char *sz_config_file,
92 94
   if (bind(p_display->sock, (struct sockaddr *)&p_display->bind_addr,
93 95
            sizeof (p_display->bind_addr))) {
94 96
     flp_display_free(p_display);
95
-    if (p_msg_func)
97
+    if (p_msg_func) {
98
+      char errmsg[256];
99
+      strerror_r(errno, errmsg, sizeof(errmsg));
96 100
       p_msg_func(p_msg_ctx, flp_msg_type_err,
97 101
                  "could not bind UDP socket to \"%s:%u\": %s\n",
98 102
                  inet_ntoa(p_display->bind_addr.sin_addr),
99
-                 (unsigned int)ntohs(p_display->bind_addr.sin_port),
100
-                 strerror(errno));
103
+                 (unsigned int)ntohs(p_display->bind_addr.sin_port), errmsg);
104
+    }
101 105
     return NULL;
102 106
   }
103 107
 
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FlexiPix library
3
- * !version: 1.0.1! !date: 2010-08-19!
3
+ * !version: 1.0.2! !date: 2010-08-30!
4 4
  *
5 5
  * Copyright 2010 Stefan Schuermans <stefan schuermans info>
6 6
  *
7 7