xref: /original-bsd/usr.bin/pascal/src/yycopy.c (revision c3e32dec)
1 /*-
2  * Copyright (c) 1980, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)yycopy.c	8.1 (Berkeley) 06/06/93";
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