Changeset 837

Show
Ignore:
Timestamp:
08/23/07 22:54:09 (15 months ago)
Author:
volker
Message:

logging info clarified

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/volker_dev/widget.c

    r828 r837  
    181181    if (Class->type != type) { 
    182182  error("widget '%s': class '%s' not applicable", name, class); 
     183  switch (Class->type) { 
     184  case WIDGET_TYPE_RC: 
     185      error("  Widgetclass %s is placed by Row/Column", class); 
     186      break; 
     187  case WIDGET_TYPE_XY: 
     188      error("  Widgetclass %s is placed by X/Y", class); 
     189      break; 
     190  case WIDGET_TYPE_GPO: 
     191  case WIDGET_TYPE_TIMER: 
     192  case WIDGET_TYPE_KEYPAD: 
     193  default: 
     194      error("  Widgetclass %s has unknown type %d", class, Class->type); 
     195  } 
    183196  free(class); 
    184197  return -1; 
     
    201214    /* another sanity check */ 
    202215    if (nWidgets >= MAX_WIDGETS) { 
    203   error("internal error: widget buffer full! Tried to allocate %d widgets (max: %s)", nWidgets, MAX_WIDGETS); 
     216  error("internal error: widget buffer full! Tried to allocate %d widgets (max: %d)", nWidgets, MAX_WIDGETS); 
    204217  return -1; 
    205218    } 
     
    228241    Widget->col = col; 
    229242 
    230     info(" widget '%s': Class '%s', Parent '%s', Layer %d, Row %d, Col %d", 
    231          name, (NULL == Class) ? "<none>" : Class->name, (NULL == Parent) ? "<root>" : Parent->name, layer, row, col); 
    232      
     243    info(" widget '%s': Class '%s', Parent '%s', Layer %d, %s %d, %s %d", 
     244   name, (NULL == Class) ? "<none>" : Class->name, 
     245   (NULL == Parent) ? "<root>" : Parent->name, 
     246   layer, (WIDGET_TYPE_XY == Class->type) ? "Y" : "Row", row, (WIDGET_TYPE_XY == Class->type) ? "X" : "Col", col); 
     247 
    233248    if (Class->init != NULL) { 
    234249  Class->init(Widget);