Exemplo n.º 1
0
void
gdbscm_define_functions (const scheme_function *functions, int is_public)
{
  const scheme_function *sf;

  for (sf = functions; sf->name != NULL; ++sf)
    {
      SCM proc = scm_c_define_gsubr (sf->name, sf->required, sf->optional,
				     sf->rest, sf->func);

      scm_set_procedure_property_x (proc, gdbscm_documentation_symbol,
				    gdbscm_scm_from_c_string (sf->doc_string));
      if (is_public)
	scm_c_export (sf->name, NULL);
    }
}
Exemplo n.º 2
0
void init_sph_lib() {
  SCM primitive_process_create = scm_c_define_gsubr(
      "primitive-process-create", 8, 0, 0, scm_primitive_process_create);
  scm_set_procedure_property_x(
      primitive_process_create, (scm_from_locale_symbol("documentation")),
      (scm_from_locale_string(
          ("string (string ...) false/port/string/integer "
           "false/port/string/integer false/port/string/integer false/(string "
           "...) (integer ...) false/integer -> false/integer\n      "
           "executable (argument ...) input output error environ-result "
           "keep-file-descriptors path-open-flags -> child-process-id\n      "
           "values for input, output or error:\n      * false: /dev/null\n     "
           " * string: filesystem path\n      * integer: file descriptor\n     "
           " * port: port\n      creates a child process via an async safe "
           "fork/exec.\n      uses execve and does not search in directories "
           "of the PATH environment variable"))));
};