Send commitlog mailing list submissions to
        commitlog@lists.openmoko.org

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
        commitlog-requ...@lists.openmoko.org

You can reach the person managing the list at
        commitlog-ow...@lists.openmoko.org

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

   1. r5994 - trunk/eda/fped (wer...@docs.openmoko.org)
   2. r5995 - developers/werner/cncmap/spool (wer...@docs.openmoko.org)
--- Begin Message ---
Author: werner
Date: 2010-10-31 13:11:18 +0100 (Sun, 31 Oct 2010)
New Revision: 5994

Modified:
   trunk/eda/fped/gui_inst.c
Log:
The box coordinates were not properly initialized in gui_draw_pad_text

- gui_inst.c (gui_draw_pad_text): box_min and box_max were initialized to
  an undefined value, upsetting valgrind and yielding an incorrect
  location if pad and hole had the same size



Modified: trunk/eda/fped/gui_inst.c
===================================================================
--- trunk/eda/fped/gui_inst.c   2010-10-31 01:34:51 UTC (rev 5993)
+++ trunk/eda/fped/gui_inst.c   2010-10-31 12:11:18 UTC (rev 5994)
@@ -297,10 +297,12 @@
        hole_max = translate(self->u.pad.hole->u.hole.other);
        sort_coord(&hole_min, &hole_max);
 
-       box_min.x = box_min.y = box_max.x = box_max.y;
+       box_min.x = pad_min.x;                                  /* top */
+       box_min.y = pad_min.y;
+       box_max.x = pad_max.x;
+       box_max.y = hole_min.y;
+
        maximize_box(&box_min, &box_max,
-           pad_min.x, pad_min.y, pad_max.x, hole_min.y);       /* top */
-       maximize_box(&box_min, &box_max,
            pad_min.x, hole_max.y, pad_max.x, pad_max.y);       /* bottom */
        maximize_box(&box_min, &box_max,
            pad_min.x, pad_min.y, hole_min.x, pad_max.y);       /* left */




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2010-11-01 03:59:22 +0100 (Mon, 01 Nov 2010)
New Revision: 5995

Modified:
   developers/werner/cncmap/spool/spool.c
Log:
spool/spool.c: allow overriding of serial port with environment variable PORT



Modified: developers/werner/cncmap/spool/spool.c
===================================================================
--- developers/werner/cncmap/spool/spool.c      2010-10-31 12:11:18 UTC (rev 
5994)
+++ developers/werner/cncmap/spool/spool.c      2010-11-01 02:59:22 UTC (rev 
5995)
@@ -1,8 +1,8 @@
 /*
  * spool.c - Send a file to a Roland MDX series CNC mill
  *
- * Written 2009 by Werner Almesberger
- * Copyright 2009 Werner Almesberger
+ * Written 2009, 2010 by Werner Almesberger
+ * Copyright 2009, 2010 Werner Almesberger
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -17,6 +17,7 @@
 #include "serial.h"
 
 
+#define        DEFAULT_PORT    "/dev/ttyS0"
 #define BUF_SIZE       8192
 
 
@@ -32,6 +33,7 @@
        FILE *file;
        char buf[BUF_SIZE];
        size_t n;
+       char *port;
 
        switch (argc) {
        case 1:
@@ -47,7 +49,8 @@
        default:
                usage(*argv);
        }
-       serial_open("/dev/ttyS0");
+       port = getenv("PORT");
+       serial_open(port ? port : DEFAULT_PORT);
        while (1) {
                n = fread(buf, 1, BUF_SIZE, file);
                if (!n)




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to