• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

12.9 Foreign access to Prolog IO streams
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • Foreign access to Prolog IO streams
          • Get IO stream handles
          • Creating an IO stream
          • Interacting with foreign streams
          • Foreign stream error handling
            • Sferror()
            • Sclearerr()
            • Sseterr()
            • Sset_exception()
          • Foreign stream encoding
          • Foreign stream line endings
          • Foreign stream position information
    • Packages
ET
int Sclosehook(void (*hook)(IOSTREAM *s))
Register a hook function to be called by Sclose() just before the stream is deallocated. This is used internally to update the Prolog administration of open streams on Sclose().
int Sset_filter(IOSTREAM *parent, IOSTREAM *filter)
Register filter as a stream that reads from or writes to the stream parent.
void Ssetbuffer(IOSTREAM *s, char *buf, size_t size)
Set the input or output buffer for s to size. The buf argument is either NULL, asking the system to allocate a buffer or points at a buffer of (at least) the indicated size long. The default buffer size is defined by the C macro SIO_BUFSIZE

12.9.3.1 Writing Prolog terms to foreign streams

int PL_write_term(IOSTREAM *s, term_t term, int precedence, int flags)
Write term to s. precedence is the initial operator precedence, typically 1200. f

ClioPatria (version V3.1.1-42-gd6a756b-DIRTY)