From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 5 05:35:22 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A305316A41C for ; Sun, 5 Jun 2005 05:35:22 +0000 (GMT) (envelope-from fbsd.hackers@gmail.com) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4904B43D4C for ; Sun, 5 Jun 2005 05:35:22 +0000 (GMT) (envelope-from fbsd.hackers@gmail.com) Received: by rproxy.gmail.com with SMTP id i8so1463355rne for ; Sat, 04 Jun 2005 22:35:21 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AxXWOOdc+f9xbVTsZTNlvDWdOrBRfEC1BvnUJkrUqIFLUW0WYKZ6IbKFr2Yf78cb9YpzDTNCsdBd/7skc5e1HIZ+9/UdP7zQTfuevn6m85BwFwsaPYnfKgXSpP8hn0JXwcH3DHfkq5lBABrHxs38IIkA9EkUa735f+HHDwX637I= Received: by 10.38.137.4 with SMTP id k4mr158395rnd; Sat, 04 Jun 2005 22:35:21 -0700 (PDT) Received: by 10.38.11.11 with HTTP; Sat, 4 Jun 2005 22:35:21 -0700 (PDT) Message-ID: Date: Sun, 5 Jun 2005 01:35:21 -0400 From: Pablo Mora To: Victor Balada Diaz , freebsd-hackers@freebsd.org In-Reply-To: <20050604181730.GB49520@pato.euesrg02.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050604181730.GB49520@pato.euesrg02.net> Cc: Subject: Re: help me with C languaje please, re: files. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Pablo Mora List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jun 2005 05:35:22 -0000 #include #include int main(void) { FILE *p_to_f; char buf[1024]; int i, j =3D 0; p_to_f =3D fopen("test","r"); if(p_to_f =3D=3D NULL) { perror("fopen"); exit(EXIT_FAILURE); } for(i =3D 0; i < 4 && !feof(p_to_f); i++) { fgets(buf,1024,p_to_f); printf("%s", buf); } fclose(p_to_f); return 0; } I expect that be well what I did. Thanks Victor. PD Corrigeme Si hay algo malo. :D --=20 Concepci=F3n, Chile.