home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / FileMover / HF-OM1.DMS / in.adf / OpusSDK.lha / SDK / docs / args.doc < prev    next >
Encoding:
Text File  |  1996-08-28  |  2.4 KB  |  76 lines

  1. dopus5.library/ParseArgs                             dopus5.library/ParseArgs
  2.  
  3.     NAME
  4.         ParseArgs - easier interface to ReadArgs()
  5.  
  6.     SYNOPSIS
  7.         ParseArgs(template, args)
  8.                      A0      A1
  9.  
  10.         FuncArgs *ParseArgs(char *, char *);
  11.  
  12.     FUNCTION
  13.         This routine makes it much more straightforward to use ReadArgs() to
  14.         parse an argument string. Using ReadArgs to parse a string requires
  15.         you to allocate and initialise a RDArgs structure and argument
  16.         array structure, and also requires the argument string to have a 
  17.         newline character. This function automates this process for you.
  18.  
  19.     INPUTS
  20.         template - pointer to ReadArgs template string
  21.         args - pointer to argument string (need not have a newline)
  22.  
  23.     RESULT
  24.         If successful, this function returns a FuncArgs structure. This
  25.         structure has several fields, but the useful ones are :
  26.  
  27.             FA_Arguments
  28.  
  29.             This is the argument array you should use. It is an array
  30.             of long *, each member of which points to the argument result
  31.             for the corresponding template entry. If you need to modify
  32.             any of the values in this array you can, as it is just a copy
  33.             of the real array.
  34.  
  35.             FA_Count
  36.  
  37.             This contains the number of arguments in the template. Opus
  38.             counts the arguments in the template and initialises the
  39.             argument array accordingly.
  40.  
  41.         The strings supplied to this function are not needed once the
  42.         function has returned.
  43.  
  44.     NOTES
  45.         You should use this routine when parsing arguments supplied to
  46.         your Opus modules.
  47.  
  48.     SEE ALSO
  49.         DisposeArgs(), dos.library/ReadArgs()
  50.  
  51. dopus5.library/DisposeArgs                         dopus5.library/DisposeArgs
  52.  
  53.     NAME
  54.         DisposeArgs - free a FuncArgs structure
  55.  
  56.     SYNOPSIS
  57.         DisposeArgs(funcargs)
  58.                        A0
  59.  
  60.         void DisposeArgs(FuncArgs *);
  61.  
  62.     FUNCTION
  63.         This function frees the FuncArgs structure returned by ParseArgs().
  64.  
  65.     INPUTS
  66.         funcargs - pointer to FuncArgs structure to free
  67.  
  68.     RESULT
  69.         The structure is free. Once you have freed it, none of the arguments
  70.         remain valid, so you should make local copies of anything you need
  71.         to refer to.
  72.  
  73.     SEE ALSO
  74.         ParseArgs(), dos.library/ReadArgs()
  75.  
  76.