From 3f0b0df963a7b8cff08495e731c2e1a8e4b0c01b Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Thu, 24 Mar 1994 14:58:00 +0000 Subject: [PATCH] Initial revision --- src/as/ascheck.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 src/as/ascheck.c diff --git a/src/as/ascheck.c b/src/as/ascheck.c new file mode 100644 index 000000000..68e6d1759 --- /dev/null +++ b/src/as/ascheck.c @@ -0,0 +1,83 @@ +/* share/src/as/ascheck.c */ +/* share/src/as $Id$ */ +/***************************************************************** + COPYRIGHT NOTIFICATION +***************************************************************** + +THE FOLLOWING IS A NOTICE OF COPYRIGHT, AVAILABILITY OF THE CODE, +AND DISCLAIMER WHICH MUST BE INCLUDED IN THE PROLOGUE OF THE CODE +AND IN ALL SOURCE LISTINGS OF THE CODE. + +(C) COPYRIGHT 1993 UNIVERSITY OF CHICAGO + +Argonne National Laboratory (ANL), with facilities in the States of +Illinois and Idaho, is owned by the United States Government, and +operated by the University of Chicago under provision of a contract +with the Department of Energy. + +Portions of this material resulted from work developed under a U.S. +Government contract and are subject to the following license: For +a period of five years from March 30, 1993, the Government is +granted for itself and others acting on its behalf a paid-up, +nonexclusive, irrevocable worldwide license in this computer +software to reproduce, prepare derivative works, and perform +publicly and display publicly. With the approval of DOE, this +period may be renewed for two additional five year periods. +Following the expiration of this period or periods, the Government +is granted for itself and others acting on its behalf, a paid-up, +nonexclusive, irrevocable worldwide license in this computer +software to reproduce, prepare derivative works, distribute copies +to the public, perform publicly and display publicly, and to permit +others to do so. + +***************************************************************** + DISCLAIMER +***************************************************************** + +NEITHER THE UNITED STATES GOVERNMENT NOR ANY AGENCY THEREOF, NOR +THE UNIVERSITY OF CHICAGO, NOR ANY OF THEIR EMPLOYEES OR OFFICERS, +MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL +LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR +USEFULNESS OF ANY INFORMATION, APPARATUS, PRODUCT, OR PROCESS +DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT INFRINGE PRIVATELY +OWNED RIGHTS. + +***************************************************************** +LICENSING INQUIRIES MAY BE DIRECTED TO THE INDUSTRIAL TECHNOLOGY +DEVELOPMENT CENTER AT ARGONNE NATIONAL LABORATORY (708-252-2000). +*/ +/* Modification Log: + * ----------------- + * .01 03-24-94 mrk Initial Implementation +*/ + +#include +#include +#include +#include +static char my_buffer[100]; +static char *my_buffer_ptr="\0"; + +static int my_yyinput(char *buf, int max_size) +{ + int l,n; + + if(*my_buffer_ptr==0) { + if(gets(my_buffer)==NULL) return(0); + my_buffer_ptr = &my_buffer[0]; + strcat(my_buffer_ptr,"\n"); + } + l = strlen(my_buffer_ptr); + n = (l<=max_size ? l : max_size); + memcpy(buf,my_buffer_ptr,n); + my_buffer_ptr += n; + return(n); +} +int main() +{ + long status; + + status = asInitialize(my_yyinput); + if(status) errMessage(status,"from asInitialize"); + return(0); +}