Toolkit Tutorial: Advanced Programming


  dt_Handle errors , error ;
 
dt_Integer length ;
 
dt_String string ;

 
/* Error messages are contained in a sequence of string objects. */
 
if ( NULL_OB != ( errors = dt_smilinerrors ())) {
   
while ( NULL_OB != ( error = dt_next ( errors ))) {
     
string = dt_stringvalue ( & length , error );
     
fprintf ( stderr , "%.*s\n" , length , string );
     
dt_dealloc ( error );
   
}
   
dt_dealloc ( errors );
 
}
 
dt_errorclear ();