

char * getdata_focas(struct multi_image *rv, RBFILE& s, BOOL header_only);
char * getdata_fits(struct multi_image *rv, RBFILE& s, BOOL header_only);
char * getdata_ascii(struct multi_image *rv, RBFILE& s, BOOL header_only);
char * getdata_sphere(struct multi_image *rv, RBFILE& s, BOOL header_only);
char * getdata_ATTSSW(struct multi_image *rv, RBFILE& s, BOOL header_only);
char * getdata_SIG(struct multi_image *rv, RBFILE& s, BOOL header_only);
char * getdata_EST(struct multi_image *rv, RBFILE& s, BOOL header_only);
char * getdata_HTK(struct multi_image *rv, RBFILE& s, BOOL header_only);


enum read_in_e { LOCAL_ORDER = 0, NETWORK_ORDER=1, ANTI_NETWORK, SWAB, SWAW, SWAWB};


BOOL focas_writefile(C struct image *p, FILE *out, C proplist& control);
BOOL ascii_writefile(C struct image *p, FILE *out, C proplist& control);
BOOL FITS_writefile(C struct image *p, FILE *out, C proplist& control);
BOOL sphere_writefile(C struct image *p, FILE *out, C proplist& control);
BOOL SIG_writefile(C struct image *p, FILE *out, C proplist& control);
BOOL ESPS_writefile(C struct image *p, FILE *out, C proplist& control);
BOOL HTK_writefile(C struct image *p, FILE *out, C proplist& control);

BOOL write_out_data(FILE *out, C struct image *p, int bitpix,
			read_in_e swap, double sc, double sh);

void scale_image_for_bitpix(C struct image *p, int bitpix,
				double *bscale, double *bzero,
				double *raw_data_min, double *raw_data_max,
				proplist *q, BOOL allow_bzero);



char *gpkio_errmsg(C RBFILE &s);
