[Mndiff-dev] [PATCH] mndiff (er, mnzip): alternative stream usage patch
Michael Niedermayer
michaelni at gmx.at
Wed Jun 20 02:00:24 CEST 2007
Hi
On Mon, Jun 18, 2007 at 05:35:15PM -0700, Corey Hickey wrote:
> Michael Niedermayer wrote:
> >Hi
> >
> >On Mon, Jun 18, 2007 at 01:21:48AM -0700, Corey Hickey wrote:
> >>This patch supersedes my previous two patches with regard to argument
> >>checking and file open checking.
> >>
> >>The version attached allows input and output to be files, stdin/stdout,
> >>or a combination. I've tested it pretty thoroughly, but, if I messed it
> >>up, blame it on the fact that I should have been in bed long ago.
> >
> >i dont think this will apply anymore after ive applied the last 3
>
> Yeah, I meant it to be applied instead, but I guess I wasn't quick
> enough. ...and, of course, I meant mnzip in the subject of my previous
> message.
>
> I had a few minutes to re-make the patch; I also added some usage
> examples to help().
[...]
> - int comp= !strcmp(argv[0], "mnzip");
> + int comp= !strcmp(argv[0], "mnzib");
hmm
> int low_mem= 0;
> int block_size= 1<<22;
> int outsize, i;
> static const uint8_t header[7]={'M','N','Z','I','P',0,0};
>
> - if (argc != 3)
> - help();
> -
> - for(i=0; argv[1][i]; i++){
> + for(i=0; argv[1] && argv[1][i]; i++){
shouldnt we rather check argc instead of argv[1]?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mndiff-dev/attachments/20070620/6f3cca46/attachment.pgp>
More information about the Mndiff-dev
mailing list