Initial revision
This commit is contained in:
@@ -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 <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <asLib.h>
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user