home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / desklib / !DeskLib / h / Validation < prev    next >
Encoding:
Text File  |  1992-04-09  |  1.5 KB  |  42 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Validation.h
  12.     Author:  Copyright © 1992 Jason Williams
  13.     Version: 1.00 (22 Mar 1992)
  14.     Purpose: Scanning of validation strings for various fields
  15. */
  16.  
  17.  
  18. #ifndef __dl_validation_h
  19. #define __dl_validation_h
  20.  
  21.  
  22. /* Validation_ScanString ---------------------------------------------------
  23.  * Scan the passed-in string for the special tag character, and return the
  24.  * index of the next char. e.g. scanning "a0-9;b3" for the bordertype can be
  25.  * done as follows:
  26.  *
  27.  * if (border = Icon_ScanValidString(icon.data.indirecttext.validstring, 'B'))
  28.  * {
  29.  *   border = icon.data.indirecttext.validstring[border] - '0';
  30.  *   switch (border)
  31.  *   ...
  32.  *
  33.  * If the tag is not found, a value of 0 will be returned, else the value
  34.  * is the index of the character FOLLOWING the tag in the string.
  35.  * (NOTE that the tag must be either the first character, or must directly
  36.  *  follow a semicolon)
  37.  *
  38.  */
  39. extern int Validation_ScanString(char *string, char tag);
  40.  
  41. #endif
  42.