home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / c / CLib37x.lha / c_lib / source / lib_source / SampleFuncs.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-25  |  1.3 KB  |  51 lines

  1. /*
  2. **      $VER: SampleFuncs.c 37.5 (24.1.97)
  3. **
  4. **      Demo functions for example.library
  5. **
  6. **      (C) Copyright 1996-97 Andreas R. Kleinert
  7. **      All Rights Reserved.
  8. */
  9.  
  10. #define __USE_SYSBASE        //ignored by MAXON
  11.  
  12. #include <exec/types.h>
  13. #include <exec/memory.h>
  14.  
  15. #ifdef __MAXON__
  16. #include <clib/exec_protos.h>
  17. #include <clib/intuition_protos.h>
  18. #else
  19. #include <proto/exec.h>
  20. #include <proto/intuition.h>
  21. #include <intuition/intuition.h>
  22. #endif
  23.  
  24. #include "compiler.h"
  25.  
  26.  /* Please note, that &ExampleBase always resides in register __a6 as well,
  27.     but if we don't need it, we need not reference it here.
  28.  
  29.     Also note, that registers a0, a1, d0, d1 always are scratch registers,
  30.     so you usually should only *pass* parameters there, but make a copy
  31.     directly after entering the function.
  32.  
  33.     In this example case, it would not be necessary, but we did it
  34.     nevertheless.
  35.   */
  36.  
  37. ULONG __saveds __asm EXF_TestRequest( register __d1 UBYTE *title_d1, register __d2 UBYTE *body, register __d3 UBYTE *gadgets)
  38. {
  39.  UBYTE *title = title_d1;
  40.  
  41.  struct EasyStruct __aligned estr;
  42.  
  43.  estr.es_StructSize   = sizeof(struct EasyStruct);
  44.  estr.es_Flags        = NULL;
  45.  estr.es_Title        = title;
  46.  estr.es_TextFormat   = body;
  47.  estr.es_GadgetFormat = gadgets;
  48.  
  49.  return( (ULONG) EasyRequestArgs(NULL, &estr, NULL, NULL));
  50. }
  51.