home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / gcc / !GCC / patches / DeskLib / h / Validation < prev    next >
Encoding:
Text File  |  1994-10-03  |  1.5 KB  |  49 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. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24.  
  25. /* Validation_ScanString ---------------------------------------------------
  26.  * Scan the passed-in string for the special tag character, and return the
  27.  * index of the next char. e.g. scanning "a0-9;b3" for the bordertype can be
  28.  * done as follows:
  29.  *
  30.  * if (border = Icon_ScanValidString(icon.data.indirecttext.validstring, 'B'))
  31.  * {
  32.  *   border = icon.data.indirecttext.validstring[border] - '0';
  33.  *   switch (border)
  34.  *   ...
  35.  *
  36.  * If the tag is not found, a value of 0 will be returned, else the value
  37.  * is the index of the character FOLLOWING the tag in the string.
  38.  * (NOTE that the tag must be either the first character, or must directly
  39.  *  follow a semicolon)
  40.  *
  41.  */
  42. extern int Validation_ScanString(char *string, char tag);
  43.  
  44. #ifdef __cplusplus
  45.            }
  46. #endif
  47.  
  48. #endif
  49.