From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 30 17:32:43 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8183E106566C for ; Tue, 30 Jun 2009 17:32:43 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out1.uni-muenster.de (ZIVM-OUT1.UNI-MUENSTER.DE [128.176.192.8]) by mx1.freebsd.org (Postfix) with ESMTP id 151798FC2D for ; Tue, 30 Jun 2009 17:32:42 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.42,317,1243807200"; d="scan'208";a="275907856" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER05.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay1.uni-muenster.de with ESMTP; 30 Jun 2009 19:32:41 +0200 Received: by ZIVMAILUSER05.UNI-MUENSTER.DE (Postfix, from userid 149459) id A82C81B07E4; Tue, 30 Jun 2009 19:32:41 +0200 (CEST) Date: Tue, 30 Jun 2009 19:32:41 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Igor Mozolevsky Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Tom Evans , freebsd-hackers@freebsd.org Subject: Re: c question: *printf'ing arrays X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2009 17:32:43 -0000 that works, but i really want to have a pretty output to stdout. i guess i have to stick with printf and use `for (i=0; i < sizeof(XXX); i++)` for each array in the struct. just thought i could avoid it. btw. `./my-program | hexdump` works, but if i do `./my-program > output` output is being created, but is empty. is this normal? cheers. Igor Mozolevsky schrieb am 2009-06-30: > 2009/6/30 Alexander Best : > > thanks. but that simply dumps the contents of the struct to stdout. > > but since > > most of the struct's contents aren't ascii the output isn't really > > of much > > use. > How about ./your-program | hexdump ? > -- > Igor