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. r5985 - trunk/eda/boom (wer...@docs.openmoko.org)
2. r5986 - trunk/eda/fped (wer...@docs.openmoko.org)
3. r5987 - trunk/eda/boom (wer...@docs.openmoko.org)
4. r5988 - trunk/eda/boom (wer...@docs.openmoko.org)
--- Begin Message ---
Author: werner
Date: 2010-10-16 13:14:37 +0200 (Sat, 16 Oct 2010)
New Revision: 5985
Modified:
trunk/eda/boom/prettyord
Log:
boom/prettyord: added option -t to display totals
Modified: trunk/eda/boom/prettyord
===================================================================
--- trunk/eda/boom/prettyord 2010-10-16 01:03:56 UTC (rev 5984)
+++ trunk/eda/boom/prettyord 2010-10-16 11:14:37 UTC (rev 5985)
@@ -6,16 +6,20 @@
sub usage
{
- print STDERR "usage: $0 [-s/from/to/ ...] ...\n";
+ print STDERR "usage: $0 [-s/from/to/ ...] [-t] ...\n";
exit(1);
}
-
-while ($ARGV[0] =~ /^-s/) {
- &usage unless &dsc_xlat_arg($');
+while ($ARGV[0] =~ /^-./) {
+ if ($ARGV[0] =~ /^-s/) {
+ &usage unless &dsc_xlat_arg($');
+ } elsif ($ARGV[0] eq "-t") {
+ $total = 1;
+ } else {
+ &usage;
+ }
shift @ARGV;
}
-&usage if $ARGV[0] =~ /^-./;
&parse;
@@ -36,6 +40,7 @@
push(@{ $out[3] }, defined $dsc ? $dsc : "???");
push(@{ $out[4] }, $order{$_}[1]);
push(@{ $out[5] }, sprintf("%.2f", $order{$_}[2]));
+ $price{$order{$_}[1]} += $order{$_}[2];
}
for (@out) {
@@ -68,3 +73,11 @@
$l =~ s/\s*$//;
print "$l\n";
}
+
+if ($total) {
+ print "$n item".($n == 1 ? "" : "s");
+ for (sort keys %price) {
+ print ", $_ $price{$_}";
+ }
+ print "\n";
+}
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2010-10-16 15:52:50 +0200 (Sat, 16 Oct 2010)
New Revision: 5986
Modified:
trunk/eda/fped/Makefile
Log:
fped/Makefile: added LDFLAGS (currently empty)
Modified: trunk/eda/fped/Makefile
===================================================================
--- trunk/eda/fped/Makefile 2010-10-16 11:14:37 UTC (rev 5985)
+++ trunk/eda/fped/Makefile 2010-10-16 13:52:50 UTC (rev 5986)
@@ -41,6 +41,7 @@
-DSVN_VERSION='"$(SVN_VERSION)$(SVN_STATUS)"' $(CFLAGS_WARN)
SLOPPY = -Wno-unused -Wno-implicit-function-declaration \
-Wno-missing-prototypes -Wno-missing-declarations
+LDFLAGS =
LDLIBS = -lm -lfl $(LIBS_GTK)
YACC = bison -y
YYFLAGS = -v
@@ -116,7 +117,7 @@
all: fped
fped: $(OBJS)
- $(CC) -o $@ $(OBJS) $(LDLIBS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
lex.yy.c: fpd.l y.tab.h
$(LEX) fpd.l
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2010-10-17 02:19:52 +0200 (Sun, 17 Oct 2010)
New Revision: 5987
Modified:
trunk/eda/boom/parser.pl
Log:
Make include relative to the includer, facilitating use of subdirectories.
- boom/parser.pl: make relative paths in includes relative to the directory
containing the file from which we include
Modified: trunk/eda/boom/parser.pl
===================================================================
--- trunk/eda/boom/parser.pl 2010-10-16 13:52:50 UTC (rev 5986)
+++ trunk/eda/boom/parser.pl 2010-10-17 00:19:52 UTC (rev 5987)
@@ -363,22 +363,43 @@
}
+sub dirname
+{
+ local ($name) = @_;
+
+ return $name =~ m|/[^/]*$| ? $` : ".";
+}
+
+
+sub rel_path
+{
+ local ($cwd, $path) = @_;
+
+ return $path =~ m|^/| ? $path : "$cwd/$path";
+}
+
+
sub parse_one
{
local ($name) = @_;
my $file = new IO::File->new($name) || die "$name: $!";
+ my $dir = &dirname($name);
+
while (1) {
$_ = <$file>;
if (!defined $_) {
$file->close();
return unless @inc;
$file = pop @inc;
+ $dir = pop @dir;
next;
}
if (/^\s*include\s+(.*?)\s*$/) {
push(@inc, $file);
- $file = new IO::File->new($1) || die "$1: $!";
+ push(@dir, $dir);
+ $name = &rel_path($dir, $1);
+ $file = new IO::File->new($name) || die "$name: $!";
next;
}
chop;
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2010-10-17 04:45:47 +0200 (Sun, 17 Oct 2010)
New Revision: 5988
Modified:
trunk/eda/boom/parser.pl
Log:
boom/parser.pl (parse_one): update include directory to track sub-includes
Modified: trunk/eda/boom/parser.pl
===================================================================
--- trunk/eda/boom/parser.pl 2010-10-17 00:19:52 UTC (rev 5987)
+++ trunk/eda/boom/parser.pl 2010-10-17 02:45:47 UTC (rev 5988)
@@ -399,6 +399,7 @@
push(@inc, $file);
push(@dir, $dir);
$name = &rel_path($dir, $1);
+ $dir = &dirname($name);
$file = new IO::File->new($name) || die "$name: $!";
next;
}
--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog