Root/dfbmp/patches/001.patch

1diff --git a/configure.in b/configure.in
2index 6caa564..7a27bc1 100644
3--- a/configure.in
4+++ b/configure.in
5@@ -71,7 +71,7 @@ _ldflags="$LDFLAGS"
6 CPPFLAGS="$libcurl_INCLUDES $CPPFLAGS"
7 LDFLAGS="$libcurl_LDFLAGS $LDFLAGS"
8 
9-AC_CHECK_LIB(curl, curl_easy_init,,AC_MSG_ERROR(Unable to locate curl library))
10+PKG_CHECK_MODULES(CURL, libcurl >= 7.19.6)
11 
12 CPPFLAGS="$_cppflags"
13 LDFLAGS="$_ldflags"
14diff --git a/src/dfbmp.c b/src/dfbmp.c
15index 5d265e8..79e7f7c 100644
16--- a/src/dfbmp.c
17+++ b/src/dfbmp.c
18@@ -171,7 +171,7 @@ void do_button(button_t button) {
19                 curl_handle=curl_easy_init();
20 
21                 curl_easy_setopt(curl_handle,
22- CURLOPT_NOPROGRESS, TRUE);
23+ CURLOPT_NOPROGRESS, 1);
24 
25                 curl_easy_setopt(curl_handle,
26                                 CURLOPT_URL, button.data);
27@@ -624,6 +624,7 @@ int main(int argc, char *argv[]) {
28     char * fontpath;
29     FILE * devnull;
30     int i;
31+ int status = 1;
32 
33     DFBSurfaceDescription dsc;
34     DFBFontDescription font_dsc;
35@@ -658,7 +659,7 @@ int main(int argc, char *argv[]) {
36 
37     if(dfb->CreateFont(dfb, fontpath, &font_dsc, &lrgfont) != DFB_OK) {
38         fprintf(stderr, "Unable to locate font %s\n", fontpath);
39- exit(1);
40+ goto err_init_font;
41     }
42 
43     font_dsc.flags = DFDESC_HEIGHT;
44@@ -666,7 +667,7 @@ int main(int argc, char *argv[]) {
45 
46     if(dfb->CreateFont(dfb, fontpath, &font_dsc, &smlfont) != DFB_OK) {
47         fprintf(stderr, "Unable to locate font %s\n", fontpath);
48- exit(1);
49+ goto err_init_font;
50     }
51 
52     lrgfont->GetHeight(lrgfont, &lfheight);
53@@ -693,14 +694,15 @@ int main(int argc, char *argv[]) {
54     lrgfont->Release(lrgfont);
55     smlfont->Release(smlfont);
56 
57- primary->Release (primary);
58- dfb->Release (dfb);
59-
60- free(fontpath);
61-
62     for(i=0;i<3;i++) {
63         freebutton(&button[i]);
64     }
65     
66- return 23;
67+ status = 23;
68+err_init_font:
69+ primary->Release (primary);
70+ dfb->Release (dfb);
71+ free(fontpath);
72+
73+ return status;
74 }
75

Archive Download this file



interactive