AddressLib/vopio.c
void iorefs(MomImageType type,TChan (**readfunc)(MomImageData),
	     void (**writefunc)(MomImageData,TChan))

{
  switch (type) {
  case UCHAR_TYPE:
    if (readfunc) *readfunc=&getuchardata;
    if (writefunc) *writefunc=&setuchardata;
    return;
  case SHORT_TYPE:
    if (readfunc) *readfunc=&getshortdata;
    if (writefunc) *writefunc=&setshortdata;
    return;
  case FLOAT_TYPE:
    if (readfunc) *readfunc=&getunused;
    if (writefunc) *writefunc=&setunused;
    return;
  case NONE_TYPE:
    return;
  }
  return;
}
/**********************************************************************/
/*  iorefs  returns read-write function for selected buffer           */
/**********************************************************************/
iorefs  returns read-write function for selected buffer
iorefs returns read - write function for selected buffer
void iorefs(MomImageType type,TChan (**readfunc)(MomImageData),
	     void (**writefunc)(MomImageData,TChan))
{
  switch (type) {
  case UCHAR_TYPE:
    if (readfunc) *readfunc=&getuchardata;
    if (writefunc) *writefunc=&setuchardata;
    return;
  case SHORT_TYPE:
    if (readfunc) *readfunc=&getshortdata;
    if (writefunc) *writefunc=&setshortdata;
    return;
  case FLOAT_TYPE:
    if (readfunc) *readfunc=&getunused;
    if (writefunc) *writefunc=&setunused;
    return;
  case NONE_TYPE:
    return;
  }
  return;
}
void iorefs ( MomImageType type , TChan ( * * readfunc ) ( MomImageData ) , void ( * * writefunc ) ( MomImageData , TChan ) ) { switch ( type ) { case UCHAR_TYPE : if ( readfunc ) * readfunc = & getuchardata ; if ( writefunc ) * writefunc = & setuchardata ; return ; case SHORT_TYPE : if ( readfunc ) * readfunc = & getshortdata ; if ( writefunc ) * writefunc = & setshortdata ; return ; case FLOAT_TYPE : if ( readfunc ) * readfunc = & getunused ; if ( writefunc ) * writefunc = & setunused ; return ; case NONE_TYPE : return ; } return ; }
iorefs  returns read-write function for selected buffer
iorefs returns read - write function for selected buffer