Commit 48705611 authored by Michael Smith's avatar Michael Smith

Make ogginfo return a useful status code.

svn path=/trunk/vorbis-tools/; revision=4535
parent 9fd7cc41
......@@ -92,6 +92,8 @@ static int printinfo = 1;
static int printwarn = 1;
static int verbose = 1;
static int flawed;
static stream_set *create_stream_set(void) {
stream_set *set = calloc(1, sizeof(stream_set));
......@@ -118,6 +120,7 @@ static void warn(char *format, ...)
{
va_list ap;
flawed = 1;
if(!printwarn)
return;
......@@ -130,6 +133,8 @@ static void error(char *format, ...)
{
va_list ap;
flawed = 1;
va_start(ap, format);
vfprintf(stdout, format, ap);
va_end(ap);
......@@ -730,9 +735,12 @@ int main(int argc, char **argv) {
}
for(f=optind; f < argc; f++) {
flawed = 0;
process_file(argv[f]);
if(flawed != 0)
ret = flawed;
}
return 0;
return ret;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment