Difference for crossedit/Attr.c from version 1.21 to 1.22


version 1.21 version 1.22
Line 944
 
Line 944
  */   */
 void AttrDestroy(Attr self)  void AttrDestroy(Attr self)
 {  {
     Edit tmp;  
     Attr tmp2;      Attr tmp2;
   
     if (self->attr)      if (self->attr)
Line 959
 
Line 958
      * here we find out to what part this window belongs to.       * here we find out to what part this window belongs to.
      * it may be:       * it may be:
      *  - Attr of Look in App       *  - Attr of Look in App
      *  - MapAttr in Edit  
      *  - Attr of other Attr (inventory)       *  - Attr of other Attr (inventory)
      */       */
          
     if (self == self->app->attr)      if (self == self->app->attr)
  self->app->attr = NULL;   self->app->attr = NULL;
     else {      else {
  for (tmp = self->app->edit; tmp; tmp = tmp->next)  
      if (self == tmp->mapattr) {  
  tmp->mapattr = NULL;  
  break;  
      }  
  if (!tmp) {  
      for (tmp2 = self->app->attr; tmp2; tmp2 = tmp2->attr)       for (tmp2 = self->app->attr; tmp2; tmp2 = tmp2->attr)
  if (self == tmp2->attr) {   if (self == tmp2->attr) {
      tmp2->attr = NULL;       tmp2->attr = NULL;
Line 982
 
Line 974
  debug0 ("Cannot find origin of Attr!!\n");   debug0 ("Cannot find origin of Attr!!\n");
 #endif  #endif
  }    }
     }  
     XtFree((char*)self);      XtFree((char*)self);
 }  }
   


Legend:
line(s) removed in v.1.21 
line(s) changed
 line(s) added in v.1.22

File made using version 1.98 of cvs2html by leaf at 2011-07-21 19:48