xref: /original-bsd/usr.bin/pascal/src/yycopy.c (revision 1ff91bf0)
1 /*-
2  * Copyright (c) 1980 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)yycopy.c	5.2 (Berkeley) 04/16/91";
10 #endif /* not lint */
11 
12 #include	"whoami.h"
13 #include	"0.h"
14 #include 	"tree_ty.h"		/* must be included for yy.h */
15 #include	"yy.h"
16 
17 OYcopy ()
18     {
19 	register int	*r0 = ((int *) & OY);
20 	register int	*r1 = ((int *) & Y);
21 	register int	r2 = ( sizeof ( struct yytok ) ) / ( sizeof ( int ) );
22 
23 	do
24 	    {
25 		* r0 ++ = * r1 ++ ;
26 	    }
27 	    while ( -- r2 > 0 );
28     }
29