🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #6733

Re: función leer

#6733
From: Tuareg
Date: Tue, 20 May 2003 23:09
31 lines
1409 bytes
Creo q tendr�a que ser algo as�. Pero no me funciona.



#include <stdio.h>
#include <fcntl.h>

#define MAX_BUFFER 256


int main ()
   {
int n;

char buffer[MAX_BUFFER];
int tam_buffer;



     while ((n=read(0,buffer,MAX_BUFFER)>0)) {
		write(1,buffer,n);
		if ((strstr(buffer,"final\n"!=0) && (n==6)))

                        /* si se cumple la palabra final hay que terminar 
y empezar el tratamiento
		*/
			
                        break;

     }
  }
Technical Details
Message-ID: <e2eee5e.0305201509.3531bb69@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
References: <e2eee5e.0305181354.5648c48b@posting.google.com> <e2eee5e.0305190822.61450289@posting.google.com> <3EC9313A.F48FCF9A@yale.cl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f86c8,6217607b5fc9d798
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-05-20 16:09:07 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
From: duatlo@hotmail.com (Tuareg)
Newsgroups: es.comp.os.linux.programacion
Subject: Re: función leer
Date: 20 May 2003 16:09:06 -0700
Organization: http://groups.google.com/
Lines: 31
Message-ID: <e2eee5e.0305201509.3531bb69@posting.google.com>
References: <e2eee5e.0305181354.5648c48b@posting.google.com> <e2eee5e.0305190822.61450289@posting.google.com> <3EC9313A.F48FCF9A@yale.cl>
NNTP-Posting-Host: 193.153.7.47
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1053472147 4852 127.0.0.1 (20 May 2003 23:09:07 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 20 May 2003 23:09:07 GMT