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. r5923 - trunk/eda/fped (wer...@docs.openmoko.org)
2. r5924 - trunk/eda/fped (wer...@docs.openmoko.org)
3. r5925 - trunk/eda/fped (wer...@docs.openmoko.org)
--- Begin Message ---
Author: werner
Date: 2010-04-20 03:55:49 +0200 (Tue, 20 Apr 2010)
New Revision: 5923
Modified:
trunk/eda/fped/fpd.l
trunk/eda/fped/fpd.y
trunk/eda/fped/inst.h
Log:
Updated copyright dates of files changed in 2010.
Modified: trunk/eda/fped/fpd.l
===================================================================
--- trunk/eda/fped/fpd.l 2010-04-20 01:11:45 UTC (rev 5922)
+++ trunk/eda/fped/fpd.l 2010-04-20 01:55:49 UTC (rev 5923)
@@ -2,8 +2,8 @@
/*
* fpd.l - FootPrint Definition language
*
- * Written 2009 by Werner Almesberger
- * Copyright 2009 by Werner Almesberger
+ * Written 2009, 2010 by Werner Almesberger
+ * Copyright 2009, 2010 by 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
Modified: trunk/eda/fped/fpd.y
===================================================================
--- trunk/eda/fped/fpd.y 2010-04-20 01:11:45 UTC (rev 5922)
+++ trunk/eda/fped/fpd.y 2010-04-20 01:55:49 UTC (rev 5923)
@@ -2,8 +2,8 @@
/*
* fpd.y - FootPrint Definition language
*
- * Written 2009 by Werner Almesberger
- * Copyright 2009 by Werner Almesberger
+ * Written 2009, 2010 by Werner Almesberger
+ * Copyright 2009, 2010 by 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
Modified: trunk/eda/fped/inst.h
===================================================================
--- trunk/eda/fped/inst.h 2010-04-20 01:11:45 UTC (rev 5922)
+++ trunk/eda/fped/inst.h 2010-04-20 01:55:49 UTC (rev 5923)
@@ -1,8 +1,8 @@
/*
* inst.h - Instance structures
*
- * Written 2009 by Werner Almesberger
- * Copyright 2009 by Werner Almesberger
+ * Written 2009, 2010 by Werner Almesberger
+ * Copyright 2009, 2010 by 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
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2010-04-20 04:12:46 +0200 (Tue, 20 Apr 2010)
New Revision: 5924
Modified:
trunk/eda/fped/inst.c
Log:
The characteristics of the diagonal of the object selected (length and angle)
were taken from the bounding box and thus included silk width and other
confusing things.
- inst.c (rect_status_sort): wrapper for rect_status that sorts the coordinates
(min/max)
- inst.c (line_op_select, rect_op_select, meas_op_select): display the
characteristics of the diagonal of the ideal line(s), not of the bounding box
- inst.c (pad_op_select, rpad_op_select): normalize the diagonal by using
rect_status_sort instead of rect_status. This makes pads behave like silk
screen objects.
Modified: trunk/eda/fped/inst.c
===================================================================
--- trunk/eda/fped/inst.c 2010-04-20 01:55:49 UTC (rev 5923)
+++ trunk/eda/fped/inst.c 2010-04-20 02:12:46 UTC (rev 5924)
@@ -548,6 +548,14 @@
}
+static void rect_status_sort(struct coord a, struct coord b, unit_type width,
+ int rounded)
+{
+ sort_coord(&a, &b);
+ rect_status(a, b, width, rounded);
+}
+
+
/* ----- helper functions for instance creation ---------------------------- */
@@ -756,7 +764,7 @@
static void line_op_select(struct inst *self)
{
- rect_status(self->bbox.min, self->bbox.max, self->u.rect.width, 0);
+ rect_status_sort(self->base, self->u.rect.end, self->u.rect.width, 0);
obj_line_edit(self->obj);
}
@@ -796,7 +804,7 @@
static void rect_op_select(struct inst *self)
{
- rect_status(self->bbox.min, self->bbox.max, self->u.rect.width, 0);
+ rect_status_sort(self->base, self->u.rect.end, self->u.rect.width, 0);
obj_rect_edit(self->obj);
}
@@ -853,7 +861,7 @@
{
status_set_type_entry(NULL, "label =");
status_set_name("Pad name (actual)", "%s", self->u.pad.name);
- rect_status(self->base, self->u.pad.other, -1, 0);
+ rect_status_sort(self->base, self->u.pad.other, -1, 0);
obj_pad_edit(self->obj);
}
@@ -870,7 +878,7 @@
{
status_set_type_entry(NULL, "label =");
status_set_name("Pad name (actual)", "%s", self->u.pad.name);
- rect_status(self->base, self->u.pad.other, -1, 1);
+ rect_status_sort(self->base, self->u.pad.other, -1, 1);
obj_pad_edit(self->obj);
}
@@ -970,7 +978,7 @@
static void meas_op_select(struct inst *self)
{
- rect_status(self->bbox.min, self->bbox.max, -1, 0);
+ rect_status_sort(self->base, self->u.meas.end, -1, 0);
status_set_type_entry(NULL, "offset =");
set_with_units(status_set_name, "", self->u.meas.offset,
"Measurement line offset");
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2010-04-20 05:16:09 +0200 (Tue, 20 Apr 2010)
New Revision: 5925
Modified:
trunk/eda/fped/fped.c
Log:
- fped.c (load_file): don't falsely complain about empty files
Modified: trunk/eda/fped/fped.c
===================================================================
--- trunk/eda/fped/fped.c 2010-04-20 02:12:46 UTC (rev 5924)
+++ trunk/eda/fped/fped.c 2010-04-20 03:16:09 UTC (rev 5925)
@@ -41,8 +41,11 @@
file = fopen(name, "r");
if (file) {
if (!fgets(line, sizeof(line), file)) {
- perror(name);
- exit(1);
+ if (ferror(file)) {
+ perror(name);
+ exit(1);
+ }
+ *line = 0;
}
no_save = strcmp(line, MACHINE_GENERATED);
fclose(file);
--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog