/* 
read_until.c: copy stdin on stdout until "^string*" 
*/

/*
 * Copyright (C) 1998
 *      Michele Andreoli, Pontedera (PISA) Italy.  All rights reserved.
 */

#include <stdio.h>
#include <string.h>

#define USAGE "read_until string\n"

char line[256];
int n;
main(int argc, char** argv)
{

n=strlen(argv[1]);

while (1)
{
line[0]='\0';
gets(line);
if ( bcmp(line,argv[1],n) == 0 ) return(0);
if ( strlen(line)==0 ) return(1);
puts(line);

}


}
