Update of /cvsroot/fink/dists/10.3/unstable/main/finkinfo/text
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20857

Modified Files:
        ptex.patch 
Log Message:
new patch for ebb.c

Index: ptex.patch
===================================================================
RCS file: /cvsroot/fink/dists/10.3/unstable/main/finkinfo/text/ptex.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ptex.patch  27 Jun 2004 16:22:29 -0000      1.1
+++ ptex.patch  21 Jan 2005 06:18:31 -0000      1.2
@@ -306,3 +306,106 @@
  
  Makefile: Makefile.in ../config.status
        cd .. && $(SHELL) config.status
+--- tetex-src-2.0.2/texk/dvipdfm/ebb.c.orig    Fri Jun 29 04:55:26 2001
++++ tetex-src-2.0.2/texk/dvipdfm/ebb.c Tue Dec  2 11:48:16 2003
+@@ -40,7 +40,7 @@
+ #endif
+ 
+ #define EBB_PROGRAM "ebb"
+-#define EBB_VERSION "Version 0.5.2"
++#define EBB_VERSION "Version 0.5.2 (+ArtBox)"
+ 
+ static void usage (void)
+ {
+@@ -51,11 +51,13 @@
+   fprintf (stderr, "under certain conditions.  Details are distributed with 
the software.\n");
+   fprintf (stderr, "\nUsage: [-v] [-b] ebb [files]\n");
+   fprintf (stderr, "\t-b\t\tWrite .bb file in binary mode\n");
++  fprintf (stderr, "\t-c\t\tUse MediaBox/CropBox for BoundingBox. (PDF)\n");
+   fprintf (stderr, "\t-v\t\tVerbose\n");
+   exit(1);
+ }
+ 
+ static char verbose = 0;
++static char compat  = 0;
+ 
+ static void do_time(FILE *file)
+ {
+@@ -189,7 +191,7 @@
+ 
+ void do_pdf (FILE *file, char *filename)
+ {
+-  pdf_obj *trailer, *catalog, *page_tree, *media_box, *crop_box;
++  pdf_obj *trailer, *catalog, *page_tree, *media_box, *crop_box, *rotate;
+   pdf_obj *kids_ref, *kids, *tmp1;
+   if (verbose) {
+     fprintf (stderr, "%s looks like a PDF file...", filename);
+@@ -211,6 +213,7 @@
+   /* Media box can be inherited so start looking for it now */
+   media_box = pdf_deref_obj (pdf_lookup_dict (page_tree, "MediaBox"));
+   crop_box = pdf_deref_obj (pdf_lookup_dict (page_tree, "CropBox"));
++  rotate = pdf_deref_obj(pdf_lookup_dict(page_tree, "Rotate"));
+   while ((kids_ref = pdf_lookup_dict (page_tree, "Kids")) != NULL) {
+     kids = pdf_deref_obj (kids_ref);
+     pdf_release_obj (page_tree);
+@@ -228,15 +231,43 @@
+       pdf_release_obj (crop_box);
+     if (tmp1) 
+       crop_box = tmp1;
++    tmp1 = pdf_deref_obj(pdf_lookup_dict(page_tree, "Rotate"));
++    if (tmp1 && rotate)
++      pdf_release_obj (rotate);
++    if (tmp1)
++      rotate = tmp1;
+   }
++
++  if (crop_box) {
++    pdf_release_obj(media_box);
++    media_box = crop_box;
++  }
++
++  if (!compat) {
++    pdf_obj *tmp;
++
++    if ((tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "TrimBox")))) {
++      if (media_box)
++      pdf_release_obj(media_box);
++      media_box = tmp;
++    }
++    if ((tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "BleedBox")))) {
++      if (media_box)
++      pdf_release_obj(media_box);
++      media_box = tmp;
++    }
++    if ((tmp = pdf_deref_obj(pdf_lookup_dict(page_tree, "ArtBox")))) {
++      if (media_box)
++      pdf_release_obj(media_box);
++      media_box = tmp;
++    }
++    if (rotate && pdf_number_value(rotate) != 0.0)
++      fprintf(stderr, "\n<< /Rotate %d >> found.\n",  
(int)pdf_number_value(rotate));
++  }
++
+   /* At this point, we should have the media box for the first page */ 
+   {
+     pdf_obj *bbllx, *bblly, *bburx, *bbury;
+-    if (crop_box) {
+-      pdf_release_obj (media_box);
+-      media_box = crop_box;
+-      crop_box = NULL;
+-    }
+     if ((bbllx = pdf_get_array (media_box, 0)) == NULL ||
+       (bblly = pdf_get_array (media_box, 1)) == NULL ||
+       (bburx = pdf_get_array (media_box, 2)) == NULL ||
+@@ -267,6 +298,11 @@
+       bb_file_mode = FOPEN_WBIN_MODE;
+     case 'v':
+       verbose = 1;
++      argc -= 1;
++      argv += 1;
++      break;
++    case 'c':
++      compat = 1;
+       argc -= 1;
+       argv += 1;
+       break;



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to