mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-05 04:09:41 +02:00
genex/genex.c: new option -d to dump the tree instead of making a PDF
This commit is contained in:
parent
1b7ace9043
commit
904a60f7f9
@ -22,7 +22,8 @@
|
||||
static void usage(const char *name)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"usage: %s [-L libdir ...] [-l lib ...] hierarchy [descriptions ...]\n\n"
|
||||
"usage: %s [-d] [-L libdir ...] [-l lib ...] hierarchy [descriptions ...]\n\n"
|
||||
" -d dump the tree instead of generating a PDF\n"
|
||||
" -L libdir search all libraries in the specified directory\n"
|
||||
" -l lib search the specified component library\n"
|
||||
, name);
|
||||
@ -34,10 +35,14 @@ int main(int argc, char **argv)
|
||||
{
|
||||
FILE *file;
|
||||
int c;
|
||||
int dump = 0;
|
||||
char **arg;
|
||||
|
||||
while ((c = getopt(argc, argv, "L:l:")) != EOF)
|
||||
while ((c = getopt(argc, argv, "dL:l:")) != EOF)
|
||||
switch (c) {
|
||||
case 'd':
|
||||
dump = 1;
|
||||
break;
|
||||
case 'L':
|
||||
add_libdir(optarg);
|
||||
break;
|
||||
@ -74,7 +79,9 @@ int main(int argc, char **argv)
|
||||
read_desc(file);
|
||||
fclose(file);
|
||||
}
|
||||
// dump_tree();
|
||||
make_pdf();
|
||||
if (dump)
|
||||
dump_tree();
|
||||
else
|
||||
make_pdf();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user