Exemplo n.º 1
0
    "Render newlines as \\n when printing using `write'." },
  { SCM_OPTION_BOOLEAN, "r7rs-symbols", 0,
    "Escape symbols using R7RS |...| symbol notation." },
  { 0 },
};

SCM_DEFINE (scm_print_options, "print-options-interface", 0, 1, 0, 
            (SCM setting),
	    "Option interface for the print options. Instead of using\n"
	    "this procedure directly, use the procedures\n"
	    "@code{print-enable}, @code{print-disable}, @code{print-set!}\n"
	    "and @code{print-options}.")
#define FUNC_NAME s_scm_print_options
{
  SCM ans = scm_options (setting,
			 scm_print_opts,
			 FUNC_NAME);
  return ans;
}
#undef FUNC_NAME


/* {Printing of Scheme Objects}
 */

/* Detection of circular references.
 *
 * Due to other constraints in the implementation, this code has bad
 * time complexity (O (depth * N)), The printer code can be
 * rewritten to be O(N).
 */
Exemplo n.º 2
0
Arquivo: debug.c Projeto: ijp/guile
/* {Run time control of the debugging evaluator}
 */

SCM_DEFINE (scm_debug_options, "debug-options-interface", 0, 1, 0,
            (SCM setting),
            "Option interface for the debug options. Instead of using\n"
            "this procedure directly, use the procedures @code{debug-enable},\n"
            "@code{debug-disable}, @code{debug-set!} and @code{debug-options}.")
#define FUNC_NAME s_scm_debug_options
{
    SCM ans;

    scm_dynwind_begin (0);
    scm_dynwind_critical_section (SCM_BOOL_F);

    ans = scm_options (setting, scm_debug_opts, FUNC_NAME);
    scm_stack_checking_enabled_p = SCM_STACK_CHECKING_P;

    scm_dynwind_end ();
    return ans;
}
#undef FUNC_NAME


SCM_SYMBOL (scm_sym_source, "source");

SCM_DEFINE (scm_procedure_name, "procedure-name", 1, 0, 0,
            (SCM proc),
            "Return the name of the procedure @var{proc}")
#define FUNC_NAME s_scm_procedure_name
{
Exemplo n.º 3
0
  { SCM_OPTION_INTEGER, "history-length", 200,
    "History length." },
  { SCM_OPTION_INTEGER, "bounce-parens", 500,
    "Time (ms) to show matching opening parenthesis (0 = off)."},
  { 0 }
};

extern void stifle_history (int max);

SCM_DEFINE (scm_readline_options, "readline-options-interface", 0, 1, 0, 
            (SCM setting),
"")
#define FUNC_NAME s_scm_readline_options
{
  SCM ans = scm_options (setting,
			 scm_readline_opts,
			 FUNC_NAME);
  stifle_history (SCM_HISTORY_LENGTH);
  return ans;
}
#undef FUNC_NAME

#ifndef HAVE_STRDUP
static char *
strdup (char *s)
{
  size_t len = strlen (s);
  char *new = malloc (len + 1);
  strcpy (new, s);
  return new;
}