if( list[rec_count-2].dpi == default_resolution )
if( (list[rec_count-2].x_dpi == default_resolution) && (list[rec_count-2].y_dpi == default_resolution) )
XpuResolutionList XpuGetResolutionList( Display *pdpy, XPContext pcontext, int *numEntriesPtr ){  XpuResolutionList list = NULL;  int               rec_count = 1; /* Allocate one more |XpuResolutionRec| structure                                    * as terminator */  char             *value;  char             *tok_lasts;  const char       *s;  long              default_resolution = -1;  int               default_resolution_rec_index = -1;  /* Get default document resolution */  if( XpuGetOneLongAttribute(pdpy, pcontext, XPDocAttr, "default-printer-resolution", &default_resolution) != 1 )  {    default_resolution = -1;  }    value = XpGetOneAttribute(pdpy, pcontext, XPPrinterAttr, "printer-resolutions-supported");  if (!value)  {    fprintf(stderr, "XpuGetResolutionList: Internal error, no 'printer-resolutions-supported' XPPrinterAttr found.\n");    return(NULL);  }    for( s = strtok_r(value, " ", &tok_lasts) ;       s != NULL ;       s = strtok_r(NULL, " ", &tok_lasts) )  {    long tmp;        tmp = strtol(s, (char **)NULL, 10);        if( ((tmp == 0L) || (tmp == LONG_MIN) || (tmp == LONG_MAX)) &&         ((errno == ERANGE) || (errno == EINVAL)) )    {      fprintf(stderr, "XpuGetResolutionList: Internal parser errror for '%s'.\n", s);      continue;    }          rec_count++;    list = (XpuResolutionRec *)realloc(list, sizeof(XpuResolutionRec)*rec_count);    if( !list )      return(NULL);        list[rec_count-2].dpi = tmp;    if( default_resolution != -1 )    {      /* Is this the default resolution ? */      if( list[rec_count-2].dpi == default_resolution )      {        default_resolution_rec_index = rec_count-2;      }    }    }    XFree(value);  if( list )  {    /* users: DO NOT COUNT ON THIS DETAIL      * (this is only to make current impl. of XpuFreeMediumSourceSizeList() easier)     * I may remove this implementation detail in a later revision of     * the library! */    list[rec_count-1].dpi = -1;    rec_count--;  }  else  {    rec_count = 0;  }  /* Make the default resolution always the first item in the list... */  if( (default_resolution_rec_index != -1) && list )  {    XpuResolutionRec tmp;    tmp = list[0];    list[0] = list[default_resolution_rec_index];    list[default_resolution_rec_index] = tmp;  }  *numEntriesPtr = rec_count;   return(list);}