> >  -------- Original-Nachricht --------
> >  > Datum: Thu, 17 Apr 2008 11:42:08 +0100
> >  > Von: "Paul Herring" <[EMAIL PROTECTED]>
> No. You simply have to 'print' your struct to file, as if you were
> displaying it on screen:
> 
> export_mystruct(struct mystruct* s, file* fp){
>       fprintf(fp, "%s\n", s->mystring);
>       fprintf(fp, "%g\n", s->myfloat);
>       fprintf(fp, "%d\n", s->myint);
> };
> 
> 
> -- 

Im developing a plugin , which runs in a host app. Apart from doing its own 
file import/export, it can also export/import to/from host. This of course 
works according to the plugin standard  -  exchanging blocks of memory (passing 
void pointers and length). And i need to take care of endianess in that case 
too.
So it would be good if my struct was already 'endian-compatible' , before i 
then either stream it to a file or pass it to /from the host app it is running 
in.
Thanks again
Max

Reply via email to