home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilsp / rink010 / Demo / h / rink
Encoding:
Text File  |  1995-06-25  |  1.4 KB  |  48 lines

  1.  
  2. /* ***************************************************/
  3. /* function definitions for the rink run time system */
  4. /* (c) Ben Summers 1995                              */
  5.  
  6. #include "kernel.h"
  7.  
  8. typedef void *rink_seghandle;
  9.  
  10. typedef void *(*_rink_fn)(void);
  11.  
  12. typedef struct {
  13.   char id[8];
  14.   int main_version;
  15.   int code_version;
  16. } rink_check;
  17.  
  18. typedef struct {
  19.   int main;
  20.   int code;
  21. } rink_version;
  22.  
  23. _kernel_oserror *rink_load(char *segment_name, char *links_name, rink_seghandle *sh, rink_check *ck);
  24.   /* loads segment and it's links and performs necessary linking. Returns 0 if succesful,
  25.      pointer to standard os error block otherwise. Internal errors translated - use
  26.      rinkptr to set the function used.
  27.      If values in segment do not match those in rink_check, an error is returned */
  28.  
  29.  
  30. void rink_unload(rink_seghandle sh);
  31.   /* unload code refered to by sh */
  32.  
  33.  
  34. _rink_fn rink_fn(rink_seghandle sh, int entry);
  35.   /* returns the address of function referenced by entry in the header */
  36.  
  37.  
  38.  
  39. _rink_fn rink_enum_named(rink_seghandle sh, int *ref, char **name);
  40.   /* enumerates named functions in a segment. for first call, set *ref = 0
  41.      preserve *ref between calls. *ref = -1 when finished.
  42.      *name set to pointer to name of function.
  43.      returns pointer to function  */
  44.  
  45.  
  46. rink_version *rink_readversion(rink_seghandle sh);
  47.   /* returns a pointer to a structure giving the version numbers of the segment */
  48.