Date: Tue, 30 Jun 2009 18:12:18 +0200 (CEST) From: Alexander Best <alexbestms@math.uni-muenster.de> To: <freebsd-hackers@FreeBSD.org> Subject: c question: *printf'ing arrays Message-ID: <permail-2009063016121880e26a0b000035b1-a_best01@message-id.uni-muenster.de>
next in thread | raw e-mail | index | archive | help
hi there, i need to output the header of a file to stdout. the header looks like this: struct Header { u_int8_t rom_entry[4]; u_int8_t nintendo_logo[156]; u_char game_title[12]; u_char game_code[4]; u_char maker_code[2]; u_int8_t fixed_val; u_int8_t unit_code; u_int8_t device_type; u_int8_t reserved_area1[7]; u_int8_t software_version; u_int8_t complement_check; u_int8_t reserved_area2; u_int8_t ram_entry[4]; u_int8_t boot_mode; u_int8_t slave_id; u_int8_t unused_area[26]; u_int8_t joybus_entry[4]; }; if there a way to use printf or some other variant of *printf without using sizeof()-loops for all the arrays? cheers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?permail-2009063016121880e26a0b000035b1-a_best01>