home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d4xx / d430 / smartfields.lha / SmartFields / Functions / mask_chars.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-01-11  |  589 b   |  27 lines

  1. /***************************************
  2. *  MASK CHARacterS v1.11
  3. *  © Copyright 1988 Timm Martin
  4. *  All Rights Reserved
  5. ****************************************/
  6.  
  7. #include <exec/types.h>
  8. #include <console/fields.h>
  9. #include <console/functions.h>
  10.  
  11. void mask_chars( mask, string, set )
  12.   struct FieldMask *mask;
  13.   UBYTE  *string;
  14.   ULONG   set;
  15. {
  16.   if (set)
  17.     while (*string) {
  18.       mask->Element[*string>>5] |= MASK_ENABLE << (*string % 32);
  19.       string++;
  20.     }
  21.   else
  22.     while (*string) {
  23.       mask->Element[*string>>5] &= ~(MASK_ENABLE << (*string % 32));
  24.       string++;
  25.     }
  26. }
  27.