Next: libsnd, Previous: libpil, Up: C API

### 5.32 libscm

#### 5.32.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/scm/index.html.

#### 5.32.2 API

— Function: int lw6scm_test (int mode)

> mode: 0 for check only, 1 for full test

> Runs the `scm` module test suite.

> Return value: 1 if test is successfull, 0 on error.

— Function: int lw6scm_c_define_gsubr (char * name, int req, int opt, int rst, lw6scm_func_t fcn)

> name: name of the function when called from guile

> req: required parameters

> opt: optional parameters

> rst: ? should RTFM to find that out

> fcn: the function itself (pointer on the C executable code)

> Wrapper on `scm_c_define_gsubr`, one of the value of this function is that it does check wether it's documented before registering it. So if you try to register something not documented, it will fire a warning, which is a very nice code-quality tool.

> Return value: 1 on success, 0 on failure.

— Function: int lw6scm_c_primitive_load (char * filename)

> filename: file to execute

> Loads and executes a script. Will add a log message while doing it.

> Return value: 1 on success, 0 on failure.