home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / CD32 / CD32_Support / examples / SA_Examples / cd / CDTest / debug.c < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-27  |  1.3 KB  |  73 lines

  1. /*
  2. **  cd.device Test
  3. **  Written by John J. Szucs
  4. **  Copyright © 1993-1999 Amiga, Inc.
  5. **  All Rights Reserved
  6. */
  7.  
  8. /*
  9. **  ANSI includes
  10. */
  11.  
  12. #include <stdio.h>
  13. #include <stdlib.h>
  14. #include <string.h>
  15. #include <math.h>
  16.  
  17. /*
  18. **  System includes
  19. */
  20.  
  21. #include <exec/types.h>
  22. #include <exec/interrupts.h>
  23. #include <exec/io.h>
  24.  
  25. #include <dos/dos.h>
  26.  
  27. #include <devices/cd.h>
  28.  
  29. #include <rexx/rxslib.h>
  30. #include <rexx/storage.h>
  31. #include <rexx/errors.h>
  32.  
  33. #include <clib/exec_protos.h>
  34. #include <clib/dos_protos.h>
  35. #include <clib/rexxsyslib_protos.h>
  36. #include <clib/alib_protos.h>
  37.  
  38. /*
  39. **  Local includes
  40. */
  41.  
  42. #include "simplerexx.h"
  43. #include "cdtest.h"
  44.  
  45. STRPTR testStemVarInt(struct RexxMsg *rxMsg,STRPTR args,LONG *error)
  46. {
  47.  
  48.     struct options {
  49.         STRPTR stem;
  50.         STRPTR member;
  51.         LONG *value;
  52.     } options;
  53.     struct RDArgs *rdArgs;
  54.  
  55.     /* Parse arguments */
  56.     rdArgs=obtainArgs(args,"STEM/A,MEMBER/A,VALUE/N/A",
  57.         &options,sizeof(options));
  58.     if (!rdArgs) {
  59.         *error=RC_ERROR;
  60.         return(NULL);
  61.     }
  62.  
  63.     /* Entry */
  64.     if (debugMode) {
  65.         printf("testStemVarInt: stem=%s, member=%s, value=%ld\n",
  66.             options.stem,options.member,*options.value);
  67.     }
  68.  
  69.     /* Set integer stem variable */
  70.     setStemVarInt(rxMsg,options.stem,options.member,*options.value);
  71.  
  72. }
  73.