Send commitlog mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r5953 - trunk/gta02-core/components ([email protected])
   2. r5954 - trunk/eda/fped ([email protected])
--- Begin Message ---
Author: werner
Date: 2010-05-03 15:22:25 +0200 (Mon, 03 May 2010)
New Revision: 5953

Modified:
   trunk/gta02-core/components/gsm_antenna.lib
   trunk/gta02-core/components/mkloe
Log:
Removed duplicate components from gta02-core.lib
 
- components/gsm_antenna.lib: deleted ANTENNA, which was just a copy of 
  GSM_ANTENNA and conflicted with ANTENNA from antenna.lib
- components/mkloe: removed duplicate entries "coax", "exc24cb102u", 
  "varistor", and "vibrator"



Modified: trunk/gta02-core/components/gsm_antenna.lib
===================================================================
--- trunk/gta02-core/components/gsm_antenna.lib 2010-04-29 21:34:29 UTC (rev 
5952)
+++ trunk/gta02-core/components/gsm_antenna.lib 2010-05-03 13:22:25 UTC (rev 
5953)
@@ -1,18 +1,5 @@
 EESchema-LIBRARY Version 2.3  Date: Tue 08 Sep 2009 20:03:04 BST
 #
-# ANTENNA
-#
-DEF ANTENNA ANT 0 40 Y Y 1 F N
-F0 "ANT" 200 0 60 H V C CNN
-F1 "ANTENNA" -250 0 60 H V C CNN
-DRAW
-P 3 0 1 6  0 50  -150 250  -150 250 N
-P 4 0 1 6  0 -50  0 250  0 250  0 250 N
-P 3 0 1 6  0 50  150 250  150 250 N
-X ~ 1 0 -250 200 U 50 50 1 1 P
-ENDDRAW
-ENDDEF
-#
 # GSM_ANTENNA
 #
 DEF GSM_ANTENNA ANT 0 40 Y Y 1 F N

Modified: trunk/gta02-core/components/mkloe
===================================================================
--- trunk/gta02-core/components/mkloe   2010-04-29 21:34:29 UTC (rev 5952)
+++ trunk/gta02-core/components/mkloe   2010-05-03 13:22:25 UTC (rev 5953)
@@ -2,9 +2,9 @@
 # Make a Library of Everything
 
 COMPS="aat1275irn k4m51323pe lis302dl pcf50633-04-n3 sc32442 wm8753lgefl"
-COMPS="$COMPS ms2v-t1s si1040x tas4025a atr0635 coax ht110 isc5804at2"
-COMPS="$COMPS exc24cb102u dtc123 fa2012 rt9013_b rt9702 rt9711_bd_5 varistor"
-COMPS="$COMPS 74x1g00_5 74x1g125 74x2g126 vibrator mini_usb_b smsn16"
+COMPS="$COMPS ms2v-t1s si1040x tas4025a atr0635 ht110 isc5804at2"
+COMPS="$COMPS dtc123 fa2012 rt9013_b rt9702 rt9711_bd_5"
+COMPS="$COMPS 74x1g00_5 74x1g125 74x2g126 mini_usb_b smsn16"
 COMPS="$COMPS sw_push_4 emh4 ht210 r3113d b7840 atr0610 it3205be gsm_antenna"
 COMPS="$COMPS coax dfbm-cs320 exc24cb102u gta02_wlan_h gta02_wlan_s"
 COMPS="$COMPS td028ttec1 varistor vibrator jack_4p microphone debug_con"




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2010-05-03 15:41:24 +0200 (Mon, 03 May 2010)
New Revision: 5954

Modified:
   trunk/eda/fped/fped.c
   trunk/eda/fped/postscript.c
   trunk/eda/fped/postscript.h
Log:
New option "-s scale" to set the exact scale factor for full-page Postscript 
output.

- postscript.h (postscript_params): didn't declare this global variable
- postscript.c (ps_package_fullpage): if postscript_params.zoom is non-zero,
  scale to this value (instead of auto-scaling) 
- fped.c (usage, main): added option "-s scale" to set the scale factor for -P



Modified: trunk/eda/fped/fped.c
===================================================================
--- trunk/eda/fped/fped.c       2010-05-03 13:22:25 UTC (rev 5953)
+++ trunk/eda/fped/fped.c       2010-05-03 13:41:24 UTC (rev 5954)
@@ -14,6 +14,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
+#include <string.h>
 #include <errno.h>
 
 #include "cpp.h"
@@ -22,6 +23,7 @@
 #include "obj.h"
 #include "inst.h"
 #include "file.h"
+#include "postscript.h"
 #include "dump.h"
 #include "gui.h"
 #include "delete.h"
@@ -65,14 +67,16 @@
 static void usage(const char *name)
 {
        fprintf(stderr,
-"usage: %s [-k] [-p|-P] [-T [-T]] [cpp_option ...] [in_file [out_file]]\n\n"
+"usage: %s [-k] [-p|-P [-s scale]] [-T [-T]] [cpp_option ...]\n"
+"       %*s [in_file [out_file]]\n\n"
 "  -k          write KiCad output, then exit\n"
 "  -p          write Postscript output, then exit\n"
 "  -P          write Postscript output (full page), then exit\n"
+"  -s scale    scale factor for -P (default: auto-scale)\n"
 "  -T          test mode. Load file, then exit\n"
 "  -T -T       test mode. Load file, dump to stdout, then exit\n"
 "  cpp_option  -Idir, -Dname[=value], or -Uname\n"
-    , name);
+    , name, (int) strlen(name), "");
        exit(1);
 }
 
@@ -84,6 +88,7 @@
        char *args[2];
        int fake_argc;
        char opt[] = "-?";
+       char *end;
        int error;
        int batch = 0;
        int test_mode = 0;
@@ -91,7 +96,7 @@
        int batch_write_ps = 0, batch_write_ps_fullpage = 0;
        int c;
 
-       while ((c = getopt(argc, argv, "kpD:I:PTU:")) != EOF)
+       while ((c = getopt(argc, argv, "kps:D:I:PTU:")) != EOF)
                switch (c) {
                case 'k':
                        batch_write_kicad = 1;
@@ -102,6 +107,13 @@
                case 'P':
                        batch_write_ps_fullpage = 1;
                        break;
+               case 's':
+                       if (!batch_write_ps_fullpage)
+                               usage(*argv);
+                       postscript_params.zoom = strtod(optarg, &end);
+                       if (*end)
+                               usage(*argv);
+                       break;
                case 'T':
                        batch = 1;
                        test_mode++;

Modified: trunk/eda/fped/postscript.c
===================================================================
--- trunk/eda/fped/postscript.c 2010-05-03 13:22:25 UTC (rev 5953)
+++ trunk/eda/fped/postscript.c 2010-05-03 13:41:24 UTC (rev 5954)
@@ -88,6 +88,7 @@
 
 
 struct postscript_params postscript_params = {
+       .zoom           = 0,
        .show_pad_names = 1,
        .show_stuff     = 0,
        .label_vecs     = 0,
@@ -1106,9 +1107,13 @@
        bbox = inst_get_bbox();
        cx = (bbox.min.x+bbox.max.x)/2;
        cy = (bbox.min.y+bbox.max.y)/2;
-       fx = 2.0*PAGE_HALF_WIDTH/(bbox.max.x-bbox.min.x);
-       fy = 2.0*PAGE_HALF_HEIGHT/(bbox.max.y-bbox.min.y);
-       f = fx < fy ? fx : fy;
+       if (active_params.zoom)
+               f = active_params.zoom;
+       else {
+               fx = 2.0*PAGE_HALF_WIDTH/(bbox.max.x-bbox.min.x);
+               fy = 2.0*PAGE_HALF_HEIGHT/(bbox.max.y-bbox.min.y);
+               f = fx < fy ? fx : fy;
+       }
        fprintf(file, "%d %d translate\n", (int) (-cx*f), (int) (-cy*f));
        ps_draw_package(file, pkg, f);
        fprintf(file, "showpage\n");

Modified: trunk/eda/fped/postscript.h
===================================================================
--- trunk/eda/fped/postscript.h 2010-05-03 13:22:25 UTC (rev 5953)
+++ trunk/eda/fped/postscript.h 2010-05-03 13:41:24 UTC (rev 5954)
@@ -1,5 +1,5 @@
 /*
- * ps.h - Dump objects in Postscript
+ * postscript.h - Dump objects in Postscript
  *
  * Written 2009, 2010 by Werner Almesberger
  * Copyright 2009, 2010 by Werner Almesberger
@@ -23,7 +23,7 @@
         int show_stuff;         /* vecs and frames */
         int label_vecs;
         int show_meas;
-};
+} postscript_params;
 
 
 int postscript(FILE *file);




--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to