[libav-devel] [PATCH 4/4] graph2dot: don't use getopt().

2012-07-08 Thread Anton Khirnov
It's not available on all systems and using argc/argv directly does not complicate the code much. --- tools/graph2dot.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/tools/graph2dot.c b/tools/graph2dot.c index 6ea2f32..0a90878 100644 --- a/tools/

Re: [libav-devel] [PATCH 4/4] graph2dot: don't use getopt().

2012-07-08 Thread Ronald S. Bultje
Hi, On Sat, Jul 7, 2012 at 1:47 PM, Måns Rullgård wrote: > "Ronald S. Bultje" wrote: >>On Sat, Jul 7, 2012 at 11:03 AM, Anton Khirnov >>wrote: >>> -while ((c = getopt(argc, argv, "hi:o:")) != -1) { >>> -switch (c) { >>> -case 'h': >>> +while (optindex < argc) { >>> +

Re: [libav-devel] [PATCH 4/4] graph2dot: don't use getopt().

2012-07-07 Thread Måns Rullgård
"Ronald S. Bultje" wrote: >Hi, > >On Sat, Jul 7, 2012 at 11:03 AM, Anton Khirnov >wrote: >> -while ((c = getopt(argc, argv, "hi:o:")) != -1) { >> -switch (c) { >> -case 'h': >> +while (optindex < argc) { >> +char *opt = argv[optindex++]; >> + >> +if (!op

Re: [libav-devel] [PATCH 4/4] graph2dot: don't use getopt().

2012-07-07 Thread Ronald S. Bultje
Hi, On Sat, Jul 7, 2012 at 11:03 AM, Anton Khirnov wrote: > -while ((c = getopt(argc, argv, "hi:o:")) != -1) { > -switch (c) { > -case 'h': > +while (optindex < argc) { > +char *opt = argv[optindex++]; > + > +if (!opt[0]) { Can that trigger? I don't think

[libav-devel] [PATCH 4/4] graph2dot: don't use getopt().

2012-07-07 Thread Anton Khirnov
It's not available on all systems and using argc/argv directly does not complicate the code much. --- tools/graph2dot.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/tools/graph2dot.c b/tools/graph2dot.c index 6ea2f32..82b2bf2 100644 --- a/tools/gr