Esempio n. 1
0
unsigned char *
read_bitmap_data(IOSTREAM *fd, int *w, int *h)
{ long offset = Stell(fd);
  unsigned char *rval;

  if ( (rval = read_x11_bitmap_file(fd, w, h)) != NULL )
    return rval;
  Sseek(fd, offset, 0);

  return NULL;
}
Esempio n. 2
0
static unsigned char *
read_bitmap_data(IOSTREAM *fd, int *w, int *h)
{ long offset = Stell(fd);
  unsigned char *rval;
  int c0;

  c0 = Sgetc(fd);
  Sungetc(c0, fd);

  switch(c0)
  { case '#':
      if ( (rval = read_x11_bitmap_file(fd, w, h)) != NULL )
	return rval;
      Sseek(fd, offset, SIO_SEEK_SET);
      break;
    case '/':
      if ( (rval = read_sun_icon_file(fd, w, h)) != NULL )
	return rval;
      Sseek(fd, offset, SIO_SEEK_SET);
      break;
  }

  return NULL;
}