[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: pcb.git: branch: master updated (6808e757496cca0347d92d72851d0c34ae31b532)



The branch, master has been updated
       via  6808e757496cca0347d92d72851d0c34ae31b532 (commit)
       via  896f228d8bb46f000b641bf6da4d9fa339495599 (commit)
       via  9969eb13fe767fcfc32393e57b12eac27ec6fe62 (commit)
       via  042524f3e450d1c77cbb53eb2e7280983afd9abf (commit)
       via  9b57aa315bc8da5621029f80c6b912696ebf780b (commit)
      from  6fb3667dc3f76b905572c0964f8349d70a600079 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 src/hid/batch/batch.c   |    9 +++---
 src/hid/bom/bom.c       |   22 ++++-----------
 src/hid/gcode/gcode.c   |   45 ++++++++++----------------------
 src/hid/gerber/gerber.c |   65 ++++++++++++++++++++++------------------------
 src/pcb-printf.c        |   12 +++-----
 src/pcb-printf.h        |    1 -
 6 files changed, 60 insertions(+), 94 deletions(-)


=================
 Commit Messages
=================

commit 6808e757496cca0347d92d72851d0c34ae31b532
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>

    Convert gerber hid to use pcb-printf

:100644 100644 b9f6f7b... b41556e... M	src/hid/gerber/gerber.c

commit 896f228d8bb46f000b641bf6da4d9fa339495599
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>

    Convert gcode hid to use pcb-printf

:100644 100644 8c545ea... bae327d... M	src/hid/gcode/gcode.c

commit 9969eb13fe767fcfc32393e57b12eac27ec6fe62
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>

    Convert BOM hid to use pcb-printf

:100644 100644 3319491... 0870bb5... M	src/hid/bom/bom.c

commit 042524f3e450d1c77cbb53eb2e7280983afd9abf
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>

    Correct handling of %.*f in pcb-printf, remove from known issues

:100644 100644 9110a10... 31a1e32... M	src/pcb-printf.c
:100644 100644 2c11b8f... 03aa978... M	src/pcb-printf.h

commit 9b57aa315bc8da5621029f80c6b912696ebf780b
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>

    Convert batch HID to use pcb-printf

:100644 100644 0208a1e... 962c594... M	src/hid/batch/batch.c

=========
 Changes
=========

commit 6808e757496cca0347d92d72851d0c34ae31b532
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>

    Convert gerber hid to use pcb-printf

diff --git a/src/hid/gerber/gerber.c b/src/hid/gerber/gerber.c
index b9f6f7b..b41556e 100644
--- a/src/hid/gerber/gerber.c
+++ b/src/hid/gerber/gerber.c
@@ -26,6 +26,7 @@
 #include "misc.h"
 #include "error.h"
 #include "draw.h"
+#include "pcb-printf.h"
 
 #include "hid.h"
 #include "../hidint.h"
@@ -70,16 +71,14 @@ static void gerber_fill_polygon (hidGC gc, int n_coords, int *x, int *y);
 /*----------------------------------------------------------------------------*/
 
 /* These are for films */
-#define gerberX(pcb, x) ((long) ((x)))
-#define gerberY(pcb, y) ((long) (((pcb)->MaxHeight - (y))))
-#define gerberXOffset(pcb, x) ((long) ((x)))
-#define gerberYOffset(pcb, y) ((long) (-(y)))
+#define gerberX(pcb, x) (x)
+#define gerberY(pcb, y) ((pcb)->MaxHeight - (y))
+#define gerberXOffset(pcb, x) (x)
+#define gerberYOffset(pcb, y) (-(y))
 
-/* These are for drills */
-#define gerberDrX(pcb, x) ((long) ((x)/10))
-#define gerberDrY(pcb, y) ((long) (((pcb)->MaxHeight - (y)))/10)
-#define gerberDrXOffset(pcb, x) ((long) ((x)/10))
-#define gerberDrYOffset(pcb, y) ((long) (-(y))/10)
+/* These are for drills (printed as mils but are really 1/10th mil) */
+#define gerberDrX(pcb, x) ((x) * 10)
+#define gerberDrY(pcb, y) (((pcb)->MaxHeight - (y)) * 10)
 
 /*----------------------------------------------------------------------------*/
 /* Private data structures                                                    */
@@ -229,17 +228,15 @@ fprintAperture (FILE *f, Aperture *aptr)
   switch (aptr->shape)
     {
     case ROUND:
-      fprintf (f, "%%ADD%dC,%.4f*%%\r\n", aptr->dCode,
-	       COORD_TO_INCH(aptr->width));
+      pcb_fprintf (f, "%%ADD%dC,%.4mi*%%\r\n", aptr->dCode, aptr->width);
       break;
     case SQUARE:
-      fprintf (f, "%%ADD%dR,%.4fX%.4f*%%\r\n", aptr->dCode,
-	       COORD_TO_INCH(aptr->width), COORD_TO_INCH(aptr->width));
+      pcb_fprintf (f, "%%ADD%dR,%.4miX%.4mi*%%\r\n", aptr->dCode, aptr->width, aptr->width);
       break;
     case OCTAGON:
-      fprintf (f, "%%AMOCT%d*5,0,8,0,0,%.4f,22.5*%%\r\n"
+      pcb_fprintf (f, "%%AMOCT%d*5,0,8,0,0,%.4mi,22.5*%%\r\n"
 	       "%%ADD%dOCT%d*%%\r\n", aptr->dCode,
-	       COORD_TO_INCH(aptr->width) / COS_22_5_DEGREE, aptr->dCode,
+	       (BDimension) ((double) aptr->width / COS_22_5_DEGREE), aptr->dCode,
 	       aptr->dCode);
       break;
 #if 0
@@ -649,7 +646,7 @@ gerber_set_layer (const char *name, int group, int empty)
 	      Aperture *ap = findAperture (curr_aptr_list, pending_drills[i].diam, ROUND);
 	      fprintf (f, "T%02d\r\n", ap->dCode);
 	    }
-	  fprintf (f, "X%06ldY%06ld\r\n",
+	  pcb_fprintf (f, "X%06.0mmY%06.0mm\r\n",
 		   gerberDrX (PCB, pending_drills[i].x),
 		   gerberDrY (PCB, pending_drills[i].y));
 	}
@@ -717,7 +714,7 @@ gerber_set_layer (const char *name, int group, int empty)
 	     always six-digit 0.1 mil resolution (i.e. 001100 = 0.11")*/
 	  fprintf (f, "M48\r\n" "INCH\r\n");
 	  for (search = aptr_list->data; search; search = search->next)
-	    fprintf (f, "T%02dC%.3f\r\n", search->dCode, COORD_TO_INCH(search->width));
+	    pcb_fprintf (f, "T%02dC%.3mi\r\n", search->dCode, search->width);
 	  fprintf (f, "%%\r\n");
 	  /* FIXME */
 	  return 1;
@@ -746,7 +743,7 @@ gerber_set_layer (const char *name, int group, int empty)
 #endif
 
       fprintf (f, "G04 Format: Gerber/RS-274X *\r\n");
-      fprintf (f, "G04 PCB-Dimensions: %d %d *\r\n",
+      pcb_fprintf (f, "G04 PCB-Dimensions: %.0mc %.0mc *\r\n",
 	       PCB->MaxWidth, PCB->MaxHeight);
       fprintf (f, "G04 PCB-Coordinate-Origin: lower left *\r\n");
 
@@ -899,7 +896,7 @@ use_gc (hidGC gc, int radius)
 	{
 	  Aperture *aptr = findAperture (curr_aptr_list, radius, ROUND);
 	  if (aptr == NULL)
-	    fprintf (stderr, "error: aperture for radius %d type ROUND is null\n", radius);
+	    pcb_fprintf (stderr, "error: aperture for radius %$mS type ROUND is null\n", radius);
 	  else if (f && !is_drill)
 	    fprintf (f, "G54D%d*", aptr->dCode);
 	  linewidth = radius;
@@ -926,7 +923,7 @@ use_gc (hidGC gc, int radius)
 	}
       aptr = findAperture (curr_aptr_list, linewidth, shape);
       if (aptr == NULL)
-        fprintf (stderr, "error: aperture for width %d type %s is null\n",
+        pcb_fprintf (stderr, "error: aperture for width %$mS type %s is null\n",
                  linewidth, shape == ROUND ? "ROUND" : "SQUARE");
       if (f)
 	fprintf (f, "G54D%d*", aptr->dCode);
@@ -1001,13 +998,13 @@ gerber_draw_line (hidGC gc, int x1, int y1, int x2, int y2)
     {
       m = true;
       lastX = x1;
-      fprintf (f, "X%ld", gerberX (PCB, lastX));
+      pcb_fprintf (f, "X%.0mc", gerberX (PCB, lastX));
     }
   if (y1 != lastY)
     {
       m = true;
       lastY = y1;
-      fprintf (f, "Y%ld", gerberY (PCB, lastY));
+      pcb_fprintf (f, "Y%.0mc", gerberY (PCB, lastY));
     }
   if ((x1 == x2) && (y1 == y2))
     fprintf (f, "D03*\r\n");
@@ -1018,12 +1015,12 @@ gerber_draw_line (hidGC gc, int x1, int y1, int x2, int y2)
       if (x2 != lastX)
 	{
 	  lastX = x2;
-	  fprintf (f, "X%ld", gerberX (PCB, lastX));
+	  pcb_fprintf (f, "X%.0mc", gerberX (PCB, lastX));
 	}
       if (y2 != lastY)
 	{
 	  lastY = y2;
-	  fprintf (f, "Y%ld", gerberY (PCB, lastY));
+	  pcb_fprintf (f, "Y%.0mc", gerberY (PCB, lastY));
 
 	}
       fprintf (f, "D01*\r\n");
@@ -1092,18 +1089,18 @@ gerber_draw_arc (hidGC gc, int cx, int cy, int width, int height,
     {
       m = true;
       lastX = arcStartX;
-      fprintf (f, "X%ld", gerberX (PCB, lastX));
+      pcb_fprintf (f, "X%.0mc", gerberX (PCB, lastX));
     }
   if (arcStartY != lastY)
     {
       m = true;
       lastY = arcStartY;
-      fprintf (f, "Y%ld", gerberY (PCB, lastY));
+      pcb_fprintf (f, "Y%.0mc", gerberY (PCB, lastY));
     }
   if (m)
     fprintf (f, "D02*");
-  fprintf (f,
-	   "G75*G0%1dX%ldY%ldI%ldJ%ldD01*G01*\r\n",
+  pcb_fprintf (f,
+	   "G75*G0%1dX%.0mcY%.0mcI%.0mcJ%.0mcD01*G01*\r\n",
 	   (delta_angle < 0) ? 2 : 3,
 	   gerberX (PCB, arcStopX), gerberY (PCB, arcStopY),
 	   gerberXOffset (PCB, cx - arcStartX),
@@ -1142,12 +1139,12 @@ gerber_fill_circle (hidGC gc, int cx, int cy, int radius)
   if (cx != lastX)
     {
       lastX = cx;
-      fprintf (f, "X%ld", gerberX (PCB, lastX));
+      pcb_fprintf (f, "X%.0mc", gerberX (PCB, lastX));
     }
   if (cy != lastY)
     {
       lastY = cy;
-      fprintf (f, "Y%ld", gerberY (PCB, lastY));
+      pcb_fprintf (f, "Y%.0mc", gerberY (PCB, lastY));
     }
   fprintf (f, "D03*\r\n");
 }
@@ -1173,13 +1170,13 @@ gerber_fill_polygon (hidGC gc, int n_coords, int *x, int *y)
 	{
 	  m = true;
 	  lastX = x[i];
-	  fprintf (f, "X%ld", gerberX (PCB, lastX));
+	  pcb_fprintf (f, "X%.0mc", gerberX (PCB, lastX));
 	}
       if (y[i] != lastY)
 	{
 	  m = true;
 	  lastY = y[i];
-	  fprintf (f, "Y%ld", gerberY (PCB, lastY));
+	  pcb_fprintf (f, "Y%.0mc", gerberY (PCB, lastY));
 	}
       if (firstTime)
 	{
@@ -1197,13 +1194,13 @@ gerber_fill_polygon (hidGC gc, int n_coords, int *x, int *y)
     {
       m = true;
       lastX = startX;
-      fprintf (f, "X%ld", gerberX (PCB, startX));
+      pcb_fprintf (f, "X%.0mc", gerberX (PCB, startX));
     }
   if (startY != lastY)
     {
       m = true;
       lastY = startY;
-      fprintf (f, "Y%ld", gerberY (PCB, lastY));
+      pcb_fprintf (f, "Y%.0mc", gerberY (PCB, lastY));
     }
   if (m)
     fprintf (f, "D01*\r\n");

commit 896f228d8bb46f000b641bf6da4d9fa339495599
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>

    Convert gcode hid to use pcb-printf

diff --git a/src/hid/gcode/gcode.c b/src/hid/gcode/gcode.c
index 8c545ea..bae327d 100644
--- a/src/hid/gcode/gcode.c
+++ b/src/hid/gcode/gcode.c
@@ -61,6 +61,7 @@
 #include "potracelib.h"
 #include "trace.h"
 #include "decompose.h"
+#include "pcb-printf.h"
 
 #include "hid/common/hidinit.h"
 
@@ -69,7 +70,6 @@
 #endif
 
 #define CRASH fprintf(stderr, "HID error: pcb called unimplemented GCODE function %s.\n", __FUNCTION__); abort()
-#define pcb_unit (INCH_TO_COORD(1)) /* pcb internal units per inch */
 struct color_struct
 {
   /* the descriptor used by the gd library */
@@ -184,27 +184,15 @@ REGISTER_ATTRIBUTES (gcode_attribute_list)
 /* *** Utility funcions **************************************************** */
 
 /* convert from default PCB units to gcode units */
-     static int pcb_to_gcode (int pcb)
+static int pcb_to_gcode (int pcb)
 {
-  int gcode;
-
-  gcode = (pcb * gcode_dpi) / pcb_unit;
-
-  return gcode;
+  return round(COORD_TO_INCH(pcb) * gcode_dpi);
 }
 
 static char *
 gcode_get_png_name (const char *basename, const char *suffix)
 {
-  char *buf;
-  int len;
-
-  len = strlen (basename) + strlen (suffix) + 6;
-  buf = (char *)malloc (sizeof (*buf) * len);
-
-  sprintf (buf, "%s.%s.png", basename, suffix);
-
-  return buf;
+  return g_strdup_printf ("%s.%s.png", basename, suffix);
 }
 
 /* Sorts drills in order of distance from the origin */
@@ -385,7 +373,7 @@ gcode_do_export (HID_Attr_Val * options)
   int save_ons[MAX_LAYER + 2];
   int i, idx;
   time_t t;
-  double scale = 0, d = 0, Bx, By;
+  double scale = 0, d = 0;
   int r, c, v, p, metric;
   char *filename;
   path_t *plist = NULL;
@@ -404,8 +392,6 @@ gcode_do_export (HID_Attr_Val * options)
      },
   };
 
-  Bx = PCB->MaxWidth / pcb_unit;
-  By = PCB->MaxHeight / pcb_unit;
   if (!options)
     {
       gcode_get_export_options (0);
@@ -447,9 +433,9 @@ gcode_do_export (HID_Attr_Val * options)
   gcode_cutdepth = options[HA_cutdepth].real_value * scale;
   gcode_drilldepth = options[HA_drilldepth].real_value * scale;
   gcode_safeZ = options[HA_safeZ].real_value * scale;
-  gcode_toolradius = options[HA_toolradius].real_value * scale * pcb_unit;	/* in PCB units */
-  if (metric)
-    gcode_toolradius *= 1 / 25.4;
+  gcode_toolradius = metric
+                   ? MM_TO_COORD(options[HA_toolradius].real_value * scale)
+                   : INCH_TO_COORD(options[HA_toolradius].real_value * scale);
   gcode_choose_groups ();
 
   for (i = 0; i < MAX_LAYER; i++)
@@ -523,10 +509,9 @@ gcode_do_export (HID_Attr_Val * options)
 	  fprintf (gcode_f2, "(%d dpi)\n", gcode_dpi);
 	  fprintf (gcode_f2, "(Unit: %s)\n", metric ? "mm" : "inch");
 	  if (metric)
-	    fprintf (gcode_f2, "(Board size: %.2fx%.2f mm)\n", Bx * 25.4,
-		     By * 25.4);
+	    pcb_fprintf (gcode_f2, "(Board size: %.2mmx%.2mm mm)", PCB->MaxWidth, PCB->MaxHeight);
 	  else
-	    fprintf (gcode_f2, "(Board size: %.2fx%.2f inches)\n", Bx, By);
+	    pcb_fprintf (gcode_f2, "(Board size: %.2mix%.2mi inches)", PCB->MaxWidth, PCB->MaxHeight);
 	  fprintf (gcode_f2, "#100=%f  (safe Z)\n", gcode_safeZ);
 	  fprintf (gcode_f2, "#101=%f  (cutting depth)\n", gcode_cutdepth);
 	  fprintf (gcode_f2, "(---------------------------------)\n");
@@ -577,11 +562,9 @@ gcode_do_export (HID_Attr_Val * options)
 	      fprintf (gcode_f2, "( %s )\n", filename);
 	      fprintf (gcode_f2, "(Unit: %s)\n", metric ? "mm" : "inch");
 	      if (metric)
-		fprintf (gcode_f2, "(Board size: %.2fx%.2f mm)\n", Bx * 25.4,
-			 By * 25.4);
+	        pcb_fprintf (gcode_f2, "(Board size: %.2mmx%.2mm mm)", PCB->MaxWidth, PCB->MaxHeight);
 	      else
-		fprintf (gcode_f2, "(Board size: %.2fx%.2f inches)\n", Bx,
-			 By);
+	        pcb_fprintf (gcode_f2, "(Board size: %.2mix%.2mi inches)", PCB->MaxWidth, PCB->MaxHeight);
 	      fprintf (gcode_f2, "#100=%f  (safe Z)\n", gcode_safeZ);
 	      fprintf (gcode_f2, "#101=%f  (drill depth)\n",
 		       gcode_drilldepth);
@@ -978,8 +961,8 @@ gcode_fill_circle (hidGC gc, int cx, int cy, int radius)
 					     sizeof (struct drill_struct));
 	  nmax_drill += 100;
 	}
-      drill[n_drill].x = (PCB->MaxWidth - cx) / pcb_unit;	/* convert to inch, flip: will drill from bottom side */
-      drill[n_drill].y = (PCB->MaxHeight - cy) / pcb_unit;	/* PCB reverses y axis */
+      drill[n_drill].x = COORD_TO_INCH(PCB->MaxWidth - cx);	/* convert to inch, flip: will drill from bottom side */
+      drill[n_drill].y = COORD_TO_INCH(PCB->MaxHeight - cy);	/* PCB reverses y axis */
       n_drill++;
 /*              printf("Circle %d %d\n",cx,cy); */
     }

commit 9969eb13fe767fcfc32393e57b12eac27ec6fe62
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>

    Convert BOM hid to use pcb-printf

diff --git a/src/hid/bom/bom.c b/src/hid/bom/bom.c
index 3319491..0870bb5 100644
--- a/src/hid/bom/bom.c
+++ b/src/hid/bom/bom.c
@@ -14,6 +14,7 @@
 #include "data.h"
 #include "error.h"
 #include "misc.h"
+#include "pcb-printf.h"
 
 #include "hid.h"
 #include "hid/common/hidnogui.h"
@@ -274,7 +275,8 @@ static int
 PrintBOM (void)
 {
   char utcTime[64];
-  double x, y, theta = 0.0, user_x, user_y;
+  BDimension x, y;
+  double theta = 0.0;
   double sumx, sumy;
   double pin1x = 0.0, pin1y = 0.0, pin1angle = 0.0;
   double pin2x = 0.0, pin2y = 0.0, pin2angle;
@@ -452,22 +454,10 @@ PrintBOM (void)
 	value = CleanBOMString ((char *)UNKNOWN (VALUE_NAME (element)));
 
  	y = PCB->MaxHeight - y;
- 	if (xy_dim_type) {
- 	  /* dimensions in mm */
- 	  user_x = 0.000254 * x;
- 	  user_y = 0.000254 * y;
- 	} else {
- 	  /* dimensions in mils */
- 	  user_x = 0.01 * x;
- 	  user_y = 0.01 * y;
- 	}
-	fprintf (fp, "%s,\"%s\",\"%s\",%.2f,%.2f,%g,%s\n",
+	pcb_fprintf (fp, "%s,\"%s\",\"%s\",%.2m*,%.2m*,%g,%s\n",
 		 name, descr, value,
-#if 0
-		 (double) element->MarkX, (double) element->MarkY,
-#else
-		 user_x, user_y,
-#endif
+		 (xy_dim_type ? "mm" : "mil"), x,
+		 (xy_dim_type ? "mm" : "mil"), y,
 		 theta, FRONT (element) == 1 ? "top" : "bottom");
 	free (name);
 	free (descr);

commit 042524f3e450d1c77cbb53eb2e7280983afd9abf
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>

    Correct handling of %.*f in pcb-printf, remove from known issues

diff --git a/src/pcb-printf.c b/src/pcb-printf.c
index 9110a10..31a1e32 100644
--- a/src/pcb-printf.c
+++ b/src/pcb-printf.c
@@ -229,7 +229,6 @@ static gchar *pcb_vprintf(const char *fmt, va_list args)
   while(*fmt)
     {
       enum e_suffix suffix = NO_SUFFIX;
-      int multiplier = 0;
 
       if(*fmt == '%')
         {
@@ -247,10 +246,6 @@ static gchar *pcb_vprintf(const char *fmt, va_list args)
                               || *fmt == 'h' || *fmt == '-')
             g_string_append_c (spec, *fmt++);
           /* Get our sub-specifiers */
-          if(*fmt == ':')
-            {
-              multiplier = strtol(fmt + 1, (char **)&fmt, 0);
-            }
           if(*fmt == '$')
             {
               suffix = SUFFIX;
@@ -279,9 +274,12 @@ static gchar *pcb_vprintf(const char *fmt, va_list args)
             case 'e': case 'E': case 'f':
             case 'g': case 'G':
               if (strchr (spec->str, '*'))
-                unit_str = g_strdup_printf (spec->str, va_arg(args, double));
+                {
+                  int prec = va_arg(args, int);
+                  unit_str = g_strdup_printf (spec->str, va_arg(args, double), prec);
+                }
               else
-                unit_str = g_strdup_printf (spec->str, va_arg(args, double), va_arg(args, int));
+                unit_str = g_strdup_printf (spec->str, va_arg(args, double));
               break;
             case 'c':
               if(spec->str[1] == 'l' && sizeof(int) <= sizeof(wchar_t))
diff --git a/src/pcb-printf.h b/src/pcb-printf.h
index 2c11b8f..03aa978 100644
--- a/src/pcb-printf.h
+++ b/src/pcb-printf.h
@@ -56,7 +56,6 @@
  *
  * KNOWN ISSUES:
  *   No support for %zu size_t printf spec
- *   No support for .* subspecifier for pcb specs
  */
 
 #ifndef	__PCB_PRINTF_INCLUDED__

commit 9b57aa315bc8da5621029f80c6b912696ebf780b
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>

    Convert batch HID to use pcb-printf

diff --git a/src/hid/batch/batch.c b/src/hid/batch/batch.c
index 0208a1e..962c594 100644
--- a/src/hid/batch/batch.c
+++ b/src/hid/batch/batch.c
@@ -16,6 +16,7 @@
 #include "misc.h"
 #include "hid.h"
 #include "../hidint.h"
+#include "pcb-printf.h"
 
 #include "hid/common/draw_helpers.h"
 #include "hid/common/hidnogui.h"
@@ -86,11 +87,9 @@ info (int argc, char **argv, int x, int y)
       return 0;
     }
   printf("Filename: %s\n", PCB->Filename);
-  printf("Size: %g x %g mils, %g x %g mm\n",
-	 COORD_TO_MIL(PCB->MaxWidth),
-	 COORD_TO_MIL(PCB->MaxHeight),
-	 COORD_TO_MM (PCB->MaxWidth),
-	 COORD_TO_MM (PCB->MaxHeight));
+  pcb_sprintf("Size: %ml x %ml mils, %mm x %mm mm\n",
+	 PCB->MaxWidth, PCB->MaxHeight,
+	 PCB->MaxWidth, PCB->MaxHeight);
   cg = GetLayerGroupNumberByNumber (component_silk_layer);
   sg = GetLayerGroupNumberByNumber (solder_silk_layer);
   for (i=0; i<MAX_LAYER; i++)




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs