thanks. now the output gets redirected using >. i'm quite new to programming
under unix. sorry for the inconvenience.

so i guess there is no really easy way to output an inhomogeneous struct to
stdout without using a loop to output each array contained in the struct.

cheers.

Rick C. Petty schrieb am 2009-06-30:
> On Tue, Jun 30, 2009 at 08:03:21PM +0200, Alexander Best wrote:
> > should be stdout.


> > struct Header *hdr = rom;

> > int new_fd = open("/dev/stdout", O_RDWR);
> > printf("SIZE: %d\n",sizeof(*hdr));
> > write(new_fd, hdr, sizeof(*hdr));
> > close(new_fd);

> Why are you reopening stdout?  It should already be open, so use
> "fileno(stdout)" or just plain "STDOUT_FILENO" instead of "new_fd".

> -- Rick C. Petty
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"

Reply via email to