home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / p / plbin.zip / pl / src / pl-extend.c < prev    next >
C/C++ Source or Header  |  1992-06-24  |  2KB  |  44 lines

  1. /*  pl-extend.c,v 1.1 1992/06/24 08:29:11 jan Exp
  2.  
  3.     Copyright (c) 1991 Jan Wielemaker. All rights reserved.
  4.     jan@swi.psy.uva.nl
  5.  
  6.     Purpose: Skeleton for extensions
  7. */
  8.  
  9. #include <stdio.h>
  10. #include "pl-itf.h"
  11. /*#include <SWI-Prolog.h>*/
  12.  
  13. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  14. C-extension   can  either  be   loaded  through the   foreign language
  15. interface  implemented   by   load_foreign/[1,2,5]  or  through static
  16. linking.  The latter  mechanism  is  to be  used if  the first is  not
  17. ported to your machine/operating system.  Static linking is also to be
  18. preferred  for large   applications   as  it  puts  the   text  in the
  19. text-section of the (unix) process rather  than te  data section.  The
  20. text-section  of  a  process  is  normally write-protected  (providing
  21. better protection) and shared between multiple copies of the program.
  22.  
  23. To create a statically linked executable, perform the following steps:
  24.  
  25.   1) Make the file `pl.o' containing all of SWI-Prolog using
  26.      `make pl.o' in the machine-directory and install it.
  27.   2) Make a copy of this file.  In this copy:
  28.   3) Put the right #include directives
  29.   4) Fill the table below.  
  30.   5) Link pl.o with this file and the .o files defining your application.
  31.  
  32. If there are prolog parts involved:
  33.  
  34.   6) Start the image; load the prolog and create a state using
  35.      save_program/2.
  36. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  37.  
  38. PL_extension PL_extensions [] =
  39. {
  40. /*{ "name",    arity,  function,    PL_FA_<flags> },*/
  41.  
  42.   { NULL,    0,     NULL,        0 }    /* terminating line */
  43. };
  44.