home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / language / sozosun / subs_bsd.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-23  |  1.0 KB  |  43 lines

  1. /* Copyright (c) 1990 by Kent Dalton
  2.  *
  3.  * Permission is granted to anyone to use this software for any purpose
  4.  * on any computer system, and to redistribute it freely, with the
  5.  * following restrictions:
  6.  * 1) No charge may be made other than reasonable charges for reproduction.
  7.  * 2) Modified versions must be clearly marked as such.
  8.  * 3) The authors are not responsible for any harmful consequences
  9.  *    of using this software, even if they result from defects in it.
  10.  *
  11.  */
  12.  
  13. /* subs_bsd.c this module replaces the assembly language subs_tos.s file */
  14. /* for Sozobon C.                                                        */
  15. #include <stdio.h>
  16. #include <memory.h>
  17. #include "param.h"
  18. #include "nodes.h"
  19.  
  20. /* lclr - used to clear unions */
  21. lclr(t, len)
  22. NODE *t;
  23. int len;
  24.     {
  25.     unsigned int i;
  26.     unsigned int *ptr;
  27.  
  28.     ptr = (unsigned int *)t;
  29.     for(i=0; i<len; i++,ptr++) *ptr = 0;
  30.     }
  31.  
  32. /* lcpy - used to copy unions */
  33. lcpy(x, y, len)
  34. NODE *x,*y;
  35. int len;
  36.     {
  37.     memcpy( (char *)x, (char *)y, sizeof(NODE));
  38.     }
  39.  
  40.  
  41.  
  42.  
  43.