2009/1/6 Gustavo Sverzut Barbieri <[email protected]>:
> Not yet!
>
> add the following to your /etc/mime.types:
>
> text/patch                                      patch
> text/diff                                       diff
>
> Regards,

Added, and again the patch attached, I hope. ;)

>
> On Tue, Jan 6, 2009 at 7:54 PM, André Loureiro
> <[email protected]> wrote:
>> 2009/1/6 Steven Le Roux <[email protected]>:
>>> On Tue, Jan 6, 2009 at 9:41 PM, André Loureiro
>>> <[email protected]> wrote:
>>>> Hi guys,
>>>>
>>>> Attached the patch for eina in the epdf library.
>>>>
>>>
>>> Hi André,
>>>
>>> There is no file ;)
>>>
>>  Maybe the sourceforge removed, so I attached one by one.
>> ;)
>> Thanks
>>>
>>>
>>>
>>> --
>>> Steven Le Roux
>>> Jabber-ID : [email protected]
>>> 0x39494CCB <[email protected]>
>>> 2FF7 226B 552E 4709 03F0  6281 72D7 A010 3949 4CCB
>>>
>>
>>
>>
>> --
>> André Loureiro
>>
>> Graduando em Engenharia da Computação - EST-UEA
>> Pesquisador Desenvolvedor da Plataforma MAEMO - INdT/Fucapi
>>
>> ------------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It is the best place to buy or sell services for
>> just about anything Open Source.
>> http://p.sf.net/sfu/Xq1LFB
>> _______________________________________________
>> enlightenment-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>
>
>
> --
> Gustavo Sverzut Barbieri
> http://profusion.mobi embedded systems
> --------------------------------------
> MSN: [email protected]
> Skype: gsbarbieri
> Mobile: +55 (19) 9225-2202
>



-- 
André Loureiro

Graduando em Engenharia da Computação - EST-UEA
Pesquisador Desenvolvedor da Plataforma MAEMO - INdT/Fucapi
--- ../../e_src/epdf/configure.ac	2009-01-06 17:17:46.000000000 -0400
+++ configure.ac	2008-12-27 21:17:36.000000000 -0400
@@ -47,10 +47,11 @@
 AC_MSG_RESULT(${_cv_have___attribute__})
 
 evas_version=0.9.9
+eina_version=0.0.1
 ecore_version=0.9.9
 
 PKG_CHECK_MODULES(EPDF,
-   [ evas >= ${evas_version} ecore >= ${ecore_version}  poppler >= 0.6 ]
+   [ evas >= ${evas_version} eina-0 >= ${eina_version} ecore >= ${ecore_version}  poppler >= 0.6 ]
 )
 
 PKG_CHECK_MODULES(ECORE_EVAS,
--- ../../../../e_src/epdf/src/lib/epdf_document.cpp	2009-01-06 17:17:45.000000000 -0400
+++ epdf_document.cpp	2008-12-27 19:38:31.000000000 -0400
@@ -240,7 +240,7 @@
   return document->pdfdoc->getPDFVersion();
 }
 
-Ecore_List *
+Eina_List *
 epdf_document_fonts_get (const Epdf_Document *document)
 {
   if (!document)
@@ -250,10 +250,10 @@
                                        epdf_document_page_count_get (document));
 }
 
-Ecore_List *
+Eina_List *
 epdf_document_scan_for_fonts (const Epdf_Document *document, int page_count)
 {
-  Ecore_List *fonts;
+  Eina_List *fonts = NULL;
   int         length;
 
   if (!document)
@@ -264,9 +264,11 @@
     return NULL;
 
   length = items->getLength();
-  fonts = ecore_list_new ();
-  ecore_list_free_cb_set (fonts, ECORE_FREE_CB (epdf_font_info_delete));
-
+  if (eina_list_init() == 0){
+    fprintf(stderr, "Error: Module Eina not started!Exit\n");
+    exit(-1);
+  }
+    
   for ( int i = 0; i < length; ++i ) {
     Epdf_Font_Info     *font;
     Epdf_Font_Info     *font2;
@@ -303,7 +305,7 @@
 //                                 font->is_subset,
 //                                 font->type);
 //     ecore_list_append (fonts, font2);
-    ecore_list_append (fonts, font);
+    fonts = eina_list_append (fonts, font);
 //     free (font_name);
 //     epdf_font_info_delete (font);
   }
--- ../../../../e_src/epdf/src/lib/epdf_document.h	2009-01-06 17:17:45.000000000 -0400
+++ epdf_document.h	2008-12-27 19:13:56.000000000 -0400
@@ -172,7 +172,7 @@
  *
  * Return a list of the fonts used in the document @p document
  */
-Ecore_List *epdf_document_fonts_get (const Epdf_Document *document);
+Eina_List *epdf_document_fonts_get (const Epdf_Document *document);
 
 /**
  * @brief Return a list of the fonts used in a page of the document
@@ -184,7 +184,7 @@
  * Return a list of the fonts used in the document @p document in the
  * page number @p page_count
  */
-Ecore_List * epdf_document_scan_for_fonts (const Epdf_Document *document,
+Eina_List * epdf_document_scan_for_fonts (const Epdf_Document *document,
                                            int                  page_count);
 
 
--- ../../../../e_src/epdf/src/lib/epdf_index.cpp	2009-01-06 17:17:45.000000000 -0400
+++ epdf_index.cpp	2008-12-27 21:30:48.000000000 -0400
@@ -16,9 +16,9 @@
 
 static char *unicode_to_char   (Unicode    *unicode,
                                 int         len);
-static void  epdf_index_fill   (Ecore_List *items,
+static void  epdf_index_fill   (Eina_List *items,
                                 GooList    *gitems);
-static void  epdf_index_unfill (Ecore_List *items);
+static void  epdf_index_unfill (Eina_List *items);
 
 /* Index item */
 Epdf_Index_Item *
@@ -48,8 +48,9 @@
   if (item->children) {
     Epdf_Index_Item *i;
 
-    ecore_list_first_goto (item->children);
-    while ((i = (Epdf_Index_Item *)ecore_list_next (item->children))) {
+    //ecore_list_first_goto (item->children);
+    while ((i = (Epdf_Index_Item *)item->children->data)) {
+      item->children = eina_list_next(item->children);
       epdf_index_item_delete (i);
     }
   }
@@ -65,7 +66,7 @@
   return item->title;
 }
 
-Ecore_List *
+Eina_List *
 epdf_index_item_children_get (const Epdf_Index_Item *item)
 {
   if (!item)
@@ -129,12 +130,12 @@
 
 /* Index */
 
-Ecore_List *
+Eina_List *
 epdf_index_new (const Epdf_Document *document)
 {
   Outline    *outline;
   GooList    *gitems;
-  Ecore_List *index = NULL;
+  Eina_List *index = NULL;
 
   if (!document)
     return index;
@@ -147,17 +148,21 @@
   if (gitems == NULL)
     return index;
 
-  index = ecore_list_new ();
+  if (eina_list_init() == 0){
+    fprintf(stderr, "Error: Module Eina not started!Exit\n");
+    exit(-1);
+  }
+  
   epdf_index_fill (index, gitems);
 
   return index;
 }
 
 void
-epdf_index_delete (Ecore_List *index)
+epdf_index_delete (Eina_List *index)
 {
-  Ecore_List      *items = index;
-  Epdf_Index_Item *item;
+  //Eina_List      *items = index;
+  //Epdf_Index_Item *item;
 
   if (!index)
     return;
@@ -191,7 +196,7 @@
 }
 
 static void
-epdf_index_fill (Ecore_List *items,
+epdf_index_fill (Eina_List *items,
                  GooList    *gitems)
 {
   if (!items || !gitems)
@@ -207,23 +212,23 @@
     item->action = oitem->getAction ();
     oitem->open ();
     if (oitem->hasKids () && oitem->getKids ()) {
-      item->children = ecore_list_new ();
       epdf_index_fill (item->children, oitem->getKids ());
     }
-    ecore_list_append (items, item);
+    items = eina_list_append (items, item);
   }
 }
 
 static void
-epdf_index_unfill (Ecore_List *items)
+epdf_index_unfill (Eina_List *items)
 {
   Epdf_Index_Item *item;
 
   if (!items)
     return;
 
-  ecore_list_first_goto (items);
-  while ((item = (Epdf_Index_Item *)ecore_list_next (items))) {
+  
+  while (items) {
+      item = (Epdf_Index_Item *)items->data;
     if (item->title)
       free (item->title);
 
@@ -231,6 +236,7 @@
       epdf_index_unfill (item->children);
     }
     free (item);
+    items = eina_list_next(items);
   }
-  ecore_list_destroy (items);
+  eina_list_free (items);
 }
--- ../../../../e_src/epdf/src/lib/epdf_index.h	2009-01-06 17:17:45.000000000 -0400
+++ epdf_index.h	2008-12-27 21:19:15.000000000 -0400
@@ -49,7 +49,7 @@
  * Return a list of all the children of the item @p item (that is, the
  * subsection), or NULL if no child.
  */
-Ecore_List *epdf_index_item_children_get (const Epdf_Index_Item *item);
+Eina_List *epdf_index_item_children_get (const Epdf_Index_Item *item);
 
 /**
  * @brief Return the action kind of an item
@@ -84,7 +84,7 @@
  * documant (a kind of Table of Contents). The result must be freed with
  * epdf_index_delete()
  */
-Ecore_List *epdf_index_new (const Epdf_Document *document);
+Eina_List *epdf_index_new (const Epdf_Document *document);
 
 /**
  * @brief Delete an Epdf_Index object
@@ -95,7 +95,7 @@
  * with epdf_index_new()
  *
  */
-void epdf_index_delete (Ecore_List *index);
+void epdf_index_delete (Eina_List *index);
 
 /**
  * @}
--- ../../../../e_src/epdf/src/lib/epdf_page.cpp	2009-01-06 17:17:45.000000000 -0400
+++ epdf_page.cpp	2008-12-27 19:39:16.000000000 -0400
@@ -6,7 +6,7 @@
 #include <sys/time.h>
 
 #include <Evas.h>
-#include <Ecore_Data.h>
+#include <Eina.h>
 
 #include <PDFDoc.h>
 #include <Page.h>
@@ -304,14 +304,14 @@
   return result;
 }
 
-Ecore_List *
+Eina_List *
 epdf_page_text_find (const Epdf_Page *page,
                      const char      *text,
                      unsigned char    is_case_sensitive)
 {
   Epdf_Rectangle *match;
   TextOutputDev  *output_dev;
-  Ecore_List     *matches = NULL;
+  Eina_List      *matches = NULL;
   double          xMin, yMin, xMax, yMax;
   int             length;
   int             height;
@@ -356,15 +356,16 @@
 			       1, 0, // startAtLast, stopAtLast
 			       is_case_sensitive, 0, // caseSensitive, backwards
 			       &xMin, &yMin, &xMax, &yMax)) {
-    if (!matches)
-      matches = ecore_list_new ();
-    ecore_list_free_cb_set (matches, ECORE_FREE_CB (free));
+    if (eina_list_init() == 0){
+        fprintf(stderr, "Module Eina not started!Exit\n");
+        exit(-1);
+    }
     match = (Epdf_Rectangle *)malloc (sizeof (Epdf_Rectangle));
     match->x1 = xMin;
     match->y1 = yMin;//height - yMax;
     match->x2 = xMax;
     match->y2 = yMax;//height - yMin;
-    ecore_list_append (matches, match);
+    matches = eina_list_append (matches, match);
   }
 
   delete output_dev;
--- ../../../../e_src/epdf/src/lib/epdf_page.h	2009-01-06 17:17:45.000000000 -0400
+++ epdf_page.h	2008-12-27 19:12:11.000000000 -0400
@@ -3,7 +3,7 @@
 
 
 #include <Evas.h>
-#include <Ecore_Data.h>
+#include <Eina.h>
 
 #include "epdf_forward.h"
 
@@ -134,10 +134,10 @@
  *
  * Return a list of rectangles in the page @p page containing the text
  * @p text. If @p is_case_sensitive is equal to 0, the case is not taken
- * into account. The list must be destroyed with a call to
- * ecore_list_destroy()
+ * into account. The list must be free with a call to
+ * eina_list_free(list)
  */
-Ecore_List *epdf_page_text_find (const Epdf_Page *page,
+Eina_List *epdf_page_text_find (const Epdf_Page *page,
                                  const char      *text,
                                  unsigned char    is_case_sensitive);
 
--- ../../../../e_src/epdf/src/lib/epdf_private.h	2009-01-06 17:17:45.000000000 -0400
+++ epdf_private.h	2008-12-27 21:22:59.000000000 -0400
@@ -65,7 +65,7 @@
 {
   char       *title;
   LinkAction *action;
-  Ecore_List *children;
+  Eina_List *children;
 };
 
 struct _Epdf_Postscript
--- ../../../../e_src/epdf/src/lib/esmart_pdf.c	2009-01-06 17:17:45.000000000 -0400
+++ esmart_pdf.c	2008-12-27 20:09:47.000000000 -0400
@@ -436,7 +436,7 @@
  * Return the index of the smart pdf object @p obj
  *
  */
-Ecore_List *
+Eina_List *
 esmart_pdf_pdf_index_get (Evas_Object *obj)
 {
   Smart_Pdf *sp;
--- ../../../../e_src/epdf/src/lib/esmart_pdf.h	2009-01-06 17:17:45.000000000 -0400
+++ esmart_pdf.h	2008-12-27 20:06:34.000000000 -0400
@@ -66,7 +66,7 @@
 
   Epdf_Document        *pdf_document;   /**< The Epdf document */
   Epdf_Page            *pdf_page;       /**< The Epdf current page */
-  Ecore_List           *pdf_index;      /**< The Epdf index */
+  Eina_List            *pdf_index;      /**< The Epdf index */
 };
 
 Evas_Object          *esmart_pdf_add (Evas *evas);
@@ -93,7 +93,7 @@
 
 Epdf_Document        *esmart_pdf_pdf_document_get (Evas_Object *obj);
 Epdf_Page            *esmart_pdf_pdf_page_get (Evas_Object *obj);
-Ecore_List           *esmart_pdf_pdf_index_get (Evas_Object *obj);
+Eina_List            *esmart_pdf_pdf_index_get (Evas_Object *obj);
 
 /**
  * @}
--- ../../../../e_src/epdf/src/lib/etk_pdf.c	2009-01-06 17:17:45.000000000 -0400
+++ etk_pdf.c	2008-12-27 20:33:13.000000000 -0400
@@ -355,8 +355,8 @@
      pdf->search.list = epdf_page_text_find(page,
                                             pdf->search.text,
                                             pdf->search.is_case_sensitive);
-     if (pdf->search.list)
-        ecore_list_first_goto(pdf->search.list);
+//     if (pdf->search.list)
+//        ecore_list_first_goto(pdf->search.list);
      epdf_page_delete(page);
    }
 
@@ -365,7 +365,7 @@
      Epdf_Rectangle *rect;
      int             x, y, w, h;
 
-     if ((rect = (Epdf_Rectangle *)ecore_list_next(pdf->search.list))) {
+     if ((rect = (Epdf_Rectangle *)pdf->search.list->data)) {
        if (pdf->search.page != epdf_page_page_get(pdf->pdf_page)) {
          etk_pdf_page_set(pdf, pdf->search.page);
          _etk_pdf_load(pdf);
@@ -383,7 +383,7 @@
        return ETK_TRUE;
      }
      else { /* no more word to find. We destroy the list */
-       ecore_list_destroy(pdf->search.list);
+       eina_list_free(pdf->search.list);
        pdf->search.list = NULL;
        /* we search a new one */
        printf("page0 : %d\n", pdf->search.page);
@@ -431,7 +431,7 @@
  * @param pdf an pdf
  * @return Returns the index of the pdf document (NULL on failure)
  */
-Ecore_List *etk_pdf_pdf_index_get(Etk_Pdf *pdf)
+Eina_List *etk_pdf_pdf_index_get(Etk_Pdf *pdf)
 {
    if (!pdf)
       return NULL;
--- ../../../../e_src/epdf/src/lib/etk_pdf.h	2009-01-06 17:17:45.000000000 -0400
+++ etk_pdf.h	2008-12-27 20:28:46.000000000 -0400
@@ -66,12 +66,12 @@
 
    Epdf_Document        *pdf_document;   /**< The Epdf document */
    Epdf_Page            *pdf_page;       /**< The Epdf current page */
-   Ecore_List           *pdf_index;      /**< The Epdf index */
+   Eina_List            *pdf_index;      /**< The Epdf index */
 
   struct {
      Evas_Object        *o;
      char               *text;
-     Ecore_List         *list;
+     Eina_List          *list;
      int                 page;
      int                 is_case_sensitive;
      int                 is_circular;
@@ -104,7 +104,7 @@
 
 Epdf_Document        *etk_pdf_pdf_document_get(Etk_Pdf *pdf);
 Epdf_Page            *etk_pdf_pdf_page_get(Etk_Pdf *pdf);
-Ecore_List           *etk_pdf_pdf_index_get(Etk_Pdf *pdf);
+Eina_List           *etk_pdf_pdf_index_get(Etk_Pdf *pdf);
 
 /**
  * @}
--- ../../../../e_src/epdf/src/lib/ewl_pdf.c	2009-01-06 17:17:45.000000000 -0400
+++ ewl_pdf.c	2008-12-27 20:46:26.000000000 -0400
@@ -549,8 +549,8 @@
                 pdf->search.list = epdf_page_text_find(page,
                                                        pdf->search.text,
                                                        pdf->search.is_case_sensitive);
-                if (pdf->search.list)
-                        ecore_list_first_goto(pdf->search.list);
+//                if (pdf->search.list)
+//                        ecore_list_first_goto(pdf->search.list);
                 epdf_page_delete(page);
         }
 
@@ -558,7 +558,7 @@
         if (pdf->search.list) {
                 Epdf_Rectangle *rect;
 
-                if ((rect = (Epdf_Rectangle *)ecore_list_next(pdf->search.list))) {
+                if ((rect = (Epdf_Rectangle *)pdf->search.list->data)) {
                   if (pdf->search.page != epdf_page_page_get(pdf->pdf_page)) {
                           ewl_pdf_page_set(pdf, pdf->search.page);
                           ewl_callback_call(EWL_WIDGET(pdf), EWL_CALLBACK_REVEAL);
@@ -575,7 +575,7 @@
                         DRETURN_INT(TRUE, DLEVEL_STABLE);
                 }
                 else { /* no more word to find. We destroy the list */
-                        ecore_list_destroy(pdf->search.list);
+                        eina_list_free(pdf->search.list);
                         pdf->search.list = NULL;
                         /* we search a new one */
                 printf("page0 : %d\n", pdf->search.page);
@@ -627,7 +627,7 @@
  * @return Returns the poppler index of the pdf (NULL on failure)
  * @brief get the poppler index of the pdf
  */
-Ecore_List *
+Eina_List *
 ewl_pdf_pdf_index_get(Ewl_Pdf *pdf)
 {
         DENTER_FUNCTION(DLEVEL_STABLE);
--- ../../../../e_src/epdf/src/lib/ewl_pdf.h	2009-01-06 17:17:45.000000000 -0400
+++ ewl_pdf.h	2008-12-27 20:35:28.000000000 -0400
@@ -73,12 +73,12 @@
 
         Epdf_Document        *pdf_document;   /**< The Epdf document */
         Epdf_Page            *pdf_page;       /**< The Epdf current page */
-        Ecore_List           *pdf_index;      /**< The Epdf index */
+        Eina_List            *pdf_index;      /**< The Epdf index */
 
         struct {
                 void         *o;
                 char         *text;
-                Ecore_List   *list;
+                Eina_List    *list;
                 int           page;
                 int           is_case_sensitive;
                 int           is_circular;
@@ -112,7 +112,7 @@
 
 Epdf_Document        *ewl_pdf_pdf_document_get(Ewl_Pdf *pdf);
 Epdf_Page            *ewl_pdf_pdf_page_get(Ewl_Pdf *pdf);
-Ecore_List           *ewl_pdf_pdf_index_get(Ewl_Pdf *pdf);
+Eina_List           *ewl_pdf_pdf_index_get(Ewl_Pdf *pdf);
 
 /*
  * Internally used callbacks, override at your own risk.
--- ../../../../e_src/epdf/src/bin/epdf_evas_test.c	2009-01-06 17:17:45.000000000 -0400
+++ epdf_evas_test.c	2008-12-27 21:44:28.000000000 -0400
@@ -3,6 +3,7 @@
 #include <string.h>
 
 #include <Evas.h>
+#include <Eina.h>
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 
@@ -109,20 +110,20 @@
   return EXIT_SUCCESS;
 }
 
-static void display_index (Epdf_Document *document, Ecore_List *children, int n)
+static void display_index (Epdf_Document *document, Eina_List *children, int n)
 {
   Epdf_Index_Item *item;
 
   if (!children)
     return;
 
-  ecore_list_first_goto (children);
-  while ((item = ecore_list_next (children))) {
+  //ecore_list_first_goto (children);
+  while (children) {
     char *buf;
     char  buf2[64];
     int page;
-    Ecore_List *c;
-
+    Eina_List *c;
+    item = (Epdf_Index_Item *)children->data;
     buf = (char *)malloc (sizeof (char) * 2 * n + 1);
     memset (buf, ' ', 2 * n);
     buf[2 * n] = '\0';
@@ -134,6 +135,7 @@
     printf ("%s%s (%s)\n", buf, epdf_index_item_title_get (item), buf2);
     free (buf);
     c = epdf_index_item_children_get (item);
+    children = eina_list_next(children);
     if (c)
       display_index (document, c, n + 1);
   }
@@ -142,8 +144,8 @@
 static void
 document_info_print (Epdf_Document *document, Epdf_Page *page)
 {
-  Ecore_List     *fonts;
-  Ecore_List     *index;
+  Eina_List      *fonts;
+  Eina_List      *index;
   Epdf_Font_Info *font;
   char           *title;
   char           *author;
@@ -222,8 +224,9 @@
   printf ("\n");
 
   fonts = epdf_document_fonts_get (document);
-  ecore_list_first_goto (fonts);
-  while ((font = ecore_list_next (fonts))) {
+  //ecore_list_first_goto (fonts);
+  while (fonts) {
+    font = (Epdf_Font_Info *)fonts->data;
     printf ("    %s (", epdf_font_info_font_name_get (font));
     printf ("%s, ", epdf_font_info_font_path_get (font));
     printf ("%s, ", epdf_font_info_type_name_get (font));
@@ -233,8 +236,9 @@
     if (!epdf_font_info_is_subset_get (font))
       printf ("not ");
     printf ("subset)\n");
+    fonts = eina_list_next(fonts);
   }
-  ecore_list_destroy (fonts);
+  eina_list_free (fonts);
   printf ("\n");
 
   printf ("  Page Properties:\n");
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to