From owner-freebsd-questions@FreeBSD.ORG Thu Jul 31 23:33:21 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45934750 for ; Thu, 31 Jul 2014 23:33:21 +0000 (UTC) Received: from p3plsmtpa07-03.prod.phx3.secureserver.net (p3plsmtpa07-03.prod.phx3.secureserver.net [173.201.192.232]) by mx1.freebsd.org (Postfix) with ESMTP id EC6A92992 for ; Thu, 31 Jul 2014 23:33:19 +0000 (UTC) Received: from ethic.thought.org ([209.180.213.209]) by p3plsmtpa07-03.prod.phx3.secureserver.net with id ZBZJ1o0084XeM0101BZJv8; Thu, 31 Jul 2014 16:33:19 -0700 Date: Thu, 31 Jul 2014 16:33:35 -0700 From: Gary Kline To: FreeBSD Mailing List Subject: how to grab text w/ fcanf Message-ID: <20140731233335.GA24151@ethic.thought.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jul 2014 23:33:21 -0000 ===== Organization: Thought Unlimited. Public service Unix since 1986. Of_Interest: With 28 years of service to the Unix community. guys, need some insight before I lose it {completely}. I've got a *.c file that returns in [let's say] /tmp/share/voice a bunch of files named: "text.1.txt", "text.2.txt", "text.3.txt" ... text.N-1.txt", each file containing a few sentences of plain ol' ASCII or [whatever] text. what is the easiest way, in C, *knowing the count=N*, to grab the *text files and stuff the paragraphs into a global buffer: char *parabuffer[1024]; ?? I'll usr the parabuffer strings in a GTK+ 3.0 window. (note that I've already figured out how to display the paragraphs in window "label" widgets that are left-justified. tia, y'all, gary -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix Twenty-eight years of service to the Unix community.