(trunk) #1400, #2308: differentiate warnings and errors; differentiate between local messages and messages from the tracker

This commit is contained in:
Charles Kerr
2009-08-05 01:25:36 +00:00
parent c86d2cc871
commit a4767894e7
11 changed files with 92 additions and 38 deletions

View File

@@ -439,6 +439,9 @@ main( int argc,
{
char line[LINEWIDTH];
const tr_stat * st;
const char * messageName[] = { NULL, "Tracker returned a warning:",
"Tracker returned an error:",
"Error:" };
tr_wait( 200 );
@@ -470,8 +473,9 @@ main( int argc,
getStatusStr( st, line, sizeof( line ) );
printf( "\r%-*s", LINEWIDTH, line );
if( st->error )
fprintf( stderr, "\n%s\n", st->errorString );
if( messageName[st->error] )
fprintf( stderr, "\n%s: %s\n", messageName[st->error], st->errorString );
}
cleanup: