Download s s
Transcript
Dec 12, 1983
ra8kname.c Page 1
#include <stdio.h>
#include “def8”
struct m o d e %askname(line)
this take a kic input line and puts the mask name into a node
ohar *line;
I*
1
oxtern struct m o d e *maskhome;
struct nnode *node,*mlloc() ;
char mame[ 63 ,*index( );
-
I* create a pointer list of the masks and maskcrossings
node
maskhome; /*maskhame points to the first mask */
/* find the mask name from input line */
if(sscanf(line,*L I[a;]m,mname) < 1 ) {
printf(”mask name not found in line %s”,line);
exit( 1 ) ;
t
/* check to see if we already saw this mask */
while(node->nextmask !- 0){
if (strcmp(mname,node-)aame) =- 0)
break;
node = node->nextmask;
1
/* if it is a new mask then set
up a pointer for it
if (node->nextmask == 0)[
strcpy (node->name,mname ) ;
node->first = 0;
node->nextmask = n a l l o c ( ) ;
node->nextmask->ner~baesk= 0;
/*
I
return the node uhich points to that mask */
return( node) ;
1
*/
*/
*/