Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37765388
en ru br
ALT Linux repositórios
5.0: 0.31.1-alt2.1
4.1: 0.31.1-alt2
4.0: 0.31.1-alt2
3.0: 0.31.1-alt1.6

Group :: Gráficos
RPM: autotrace

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: autotrace-0.31.1-gcc41-deb.patch
Download


--- autotrace-0.31.1.orig/autotrace.h
+++ autotrace-0.31.1/autotrace.h
@@ -42,12 +42,10 @@
 typedef struct _at_output_opts_type  at_output_opts_type;
 typedef struct _at_bitmap_type at_bitmap_type;
 typedef struct _at_color_type at_color_type;
-typedef enum _at_polynomial_degree at_polynomial_degree;
 typedef struct _at_spline_type at_spline_type;
 typedef struct _at_spline_list_type at_spline_list_type;
 typedef struct _at_spline_list_array_type at_spline_list_array_type;
 #define at_splines_type at_spline_list_array_type 
-typedef enum _at_msg_type at_msg_type;
 
 /* Color in RGB */
 struct _at_color_type
@@ -69,6 +67,7 @@
   /* not the real number of points to define a
      circle but to distinguish between a cubic spline */
 };
+typedef enum _at_polynomial_degree at_polynomial_degree;
 
 /* A Bezier spline can be represented as four points in the real plane:
    a starting point, ending point, and two control points.  The
@@ -225,6 +224,7 @@
   AT_MSG_FATAL = 1,
   AT_MSG_WARNING,
 };
+typedef enum _at_msg_type at_msg_type;
 
 typedef
 void (* at_msg_func) (at_string msg, at_msg_type msg_type, at_address client_data);
--- autotrace-0.31.1.orig/curve.c
+++ autotrace-0.31.1/curve.c
@@ -116,7 +116,7 @@
 
   if (!log_file) return;
 
-  LOG1 ("curve id = %x:\n", (unsigned long) curve);
+  LOG1 ("curve id = %lx:\n", (unsigned long) curve);
   LOG1 ("  length = %u.\n", CURVE_LENGTH (curve));
   if (CURVE_CYCLIC (curve))
     LOG ("  cyclic.\n");
@@ -177,7 +177,7 @@
 
   if (!log_file) return;
 
-  LOG1 ("curve id = %x:\n", (unsigned long) curve);
+  LOG1 ("curve id = %lx:\n", (unsigned long) curve);
   LOG1 ("  length = %u.\n", CURVE_LENGTH (curve));
   if (CURVE_CYCLIC (curve))
     LOG ("  cyclic.\n");
--- autotrace-0.31.1.orig/fit.c
+++ autotrace-0.31.1/fit.c
@@ -1079,7 +1079,8 @@
   spline = best_spline;
   error = best_error;
 
-  if (error < fitting_opts->error_threshold && CURVE_CYCLIC(curve) == false)
+  if ((error < 0.002 || error < fitting_opts->error_threshold)
+      && CURVE_CYCLIC(curve) == false)
     {
       /* The points were fitted with a
          spline.  We end up here whenever a fit is accepted.  We have
--- autotrace-0.31.1.orig/main.c
+++ autotrace-0.31.1/main.c
@@ -34,16 +34,16 @@
 static at_output_write_func output_writer = NULL;
 
 /* Whether to print version information */
-static at_bool printed_version;
+static int printed_version;
 
 /* Whether to write a log file */
-static at_bool logging = false;
+static int logging = false;
 
 /* Whether to dump a bitmap file */
-static at_bool dumping_bitmap = false;
+static int dumping_bitmap = false;
 
 /* Report tracing status in real time (--report-progress) */
-static at_bool report_progress = false;
+static int report_progress = false;
 #define dot_printer_max_column 50
 #define dot_printer_char '|'
 static void dot_printer(at_real percentage, at_address client_data);
@@ -322,7 +322,7 @@
 	    str = "big";
 	  
 	  printf("%d bit, %s endian\n",
-		 sizeof(void *) * 8,
+		 (int)(sizeof(void *) * 8),
 		 str);
 	  exit(0);
 	}
--- autotrace-0.31.1.orig/output-pdf.c
+++ autotrace-0.31.1/output-pdf.c
@@ -201,16 +201,16 @@
   tmp += (strlen (temp));
   sprintf(temp, "%d", ury);
   tmp += (strlen (temp));
-  OUT1     ("%010d 00000 n \n", tmp);
-  sprintf(temp, "%d", length);
+  OUT1     ("%010"SIZET_FORMAT"u 00000 n \n", tmp);
+  sprintf(temp, "%"SIZET_FORMAT"u", length);
   tmp += 50 + length + strlen(temp);
-  OUT1     ("%010d 00000 n \n", tmp);
+  OUT1     ("%010"SIZET_FORMAT"u 00000 n \n", tmp);
   OUT_LINE ("trailer");
   OUT_LINE ("   << /Size 7");
   OUT_LINE ("      /Root 1 0 R");
   OUT_LINE ("   >>");
   OUT_LINE ("startxref");
-  OUT1 ("%d\n", tmp + 25);
+  OUT1 ("%"SIZET_FORMAT"u\n", tmp + 25);
   OUT_LINE ("%%EOF");
 
   return 0;
@@ -243,7 +243,8 @@
           if (this_list > 0)
             {
               SOUT_LINE ((shape.centerline || list.open) ? "S" : "f");
-              SOUT_LINE("h");
+              /* In PDF a Stroke (S) or fill (f) causes an implicit closepath (h) -Paul Sladen */
+              /* SOUT_LINE("h"); */
             }
           SOUT4 ("%.3f %.3f %.3f %s\n", (double) list.color.r / 255.0,
             (double) list.color.g / 255.0, (double) list.color.b / 255.0,
@@ -270,7 +271,7 @@
     SOUT_LINE ((shape.centerline || list.open) ? "S" : "f");
 
   OUT_LINE ("5 0 obj");
-  OUT1 ("   << /Length %d >>\n", *length);
+  OUT1 ("   << /Length %"SIZET_FORMAT"u >>\n", *length);
   OUT_LINE ("stream");
 
   last_color.r = 0;
@@ -291,7 +292,8 @@
           if (this_list > 0)
             {
               OUT_LINE ((shape.centerline || list.open) ? "S" : "f");
-              OUT_LINE("h");
+              /* In PDF a Stroke (S) or fill (f) causes an implicit closepath (h) -Paul Sladen */
+              /* OUT_LINE("h"); */
             }
           OUT4 ("%.3f %.3f %.3f %s\n", (double) list.color.r / 255.0,
             (double) list.color.g / 255.0, (double) list.color.b / 255.0,
--- autotrace-0.31.1.orig/output-pstoedit.c
+++ autotrace-0.31.1/output-pstoedit.c
@@ -276,7 +276,7 @@
 }
 
 at_bool
-output_pstoedit_is_unusable_writer(const at_string name)
+output_pstoedit_is_unusable_writer(const char *name)
 {
   if (0 == strcmp(name, "sam")
       || 0 == strcmp(name, "dbg")
--- autotrace-0.31.1.orig/output-pstoedit.h
+++ autotrace-0.31.1/output-pstoedit.h
@@ -32,6 +32,6 @@
 						at_spline_list_array_type shape,
 						at_msg_func msg_func, 
 						at_address msg_data);
-at_bool output_pstoedit_is_unusable_writer(const at_string name);
+at_bool output_pstoedit_is_unusable_writer(const char *name);
 
 #endif /* Not def: OUTPUTPSTOEDIT_H */
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009