home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_07_02 / v7n2081a.txt < prev    next >
Text File  |  1988-09-07  |  2KB  |  72 lines

  1. Changes to function stmt_compile:
  2.  
  3.  
  4.             else if ( i = isfunction( buf ) )
  5.             {
  6.                 *actptr++ = T_FUNCTION;
  7. #if MPU68000 || MC68000
  8.                                 if ( (long) actptr & 0x1 ) actptr++;
  9. #endif
  10.                 *((int *)actptr) = i;   /* original form */
  11.                 actptr += sizeof( int * );
  12.             }
  13.     .
  14.     .
  15.     .
  16.                 *actptr++ = T_VARIABLE;
  17.                 if (!(cp = (char *)findvar(buf)))
  18.                     cp = (char *)addvar(buf);
  19. #if MPU68000 || MC68000
  20.                                 if ( (long) actptr & 0x1 ) actptr++;
  21. #endif
  22.                 *((char **)actptr) = cp;
  23.     .
  24.     .
  25.     .
  26.             /*
  27.              * It's a character constant
  28.              */
  29.             *actptr++ = T_CONSTANT;
  30.             str_compile( buf, '\'' );
  31. #if MPU68000 || MC68000
  32.             if ( (long) actptr & 0x1 ) actptr++;
  33. #endif
  34.             *((int *)actptr) = *buf;
  35.     .
  36.     .
  37.     .
  38.             /*
  39.              * It's a numeric constant
  40.              */
  41.             *actptr++ = T_CONSTANT;
  42.             cp = buf;
  43.             do
  44.                 *cp++ = c;
  45.             while ((c=getcharacter()) != -1 && isdigit(c));
  46.             ungetcharacter( c );
  47.             *cp = 0;
  48. #if MPU68000 || MC68000
  49.             if ( (long) actptr & 0x1 ) actptr++;
  50. #endif
  51.             *((int *)actptr) = atoi(buf);
  52.  
  53.  
  54. changes to function getoken:
  55.  
  56.     case T_VARIABLE:
  57. #if MPU68000 || MC68000
  58.         if ( (long) Actptr & 0x1 ) Actptr++;
  59. #endif
  60.         Value.dptr = *((char **)Actptr);
  61.         Actptr += sizeof( char ** );
  62.         break;
  63.     case T_FUNCTION:
  64.     case T_CONSTANT:
  65. #if MPU68000 || MC68000
  66.         if ( (long) Actptr & 0x1 ) Actptr++;
  67. #endif
  68.         Value.ival = *((int *)Actptr);
  69.  
  70.  
  71.      Listing 3 - Changes to bawkact.c for 68000 processors
  72.