Add write_simple_defaults() helper
This commit is contained in:
parent
f1248a3b5e
commit
874ffe9007
1
c/main.c
1
c/main.c
|
@ -15,7 +15,6 @@
|
||||||
#define BOOT_ENV_R7RS 1
|
#define BOOT_ENV_R7RS 1
|
||||||
#define BOOT_ENV_UNSTABLE 2
|
#define BOOT_ENV_UNSTABLE 2
|
||||||
|
|
||||||
extern void write_defaults_indent(struct ios *f, value_t v);
|
|
||||||
|
|
||||||
static value_t argv_list(int argc, char *argv[])
|
static value_t argv_list(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
|
|
@ -913,6 +913,14 @@ void display_defaults(struct ios *f, value_t v)
|
||||||
print_with_options(f, v, &opts);
|
print_with_options(f, v, &opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void write_simple_defaults(struct ios *f, value_t v)
|
||||||
|
{
|
||||||
|
struct printer_options opts;
|
||||||
|
|
||||||
|
memset(&opts, 0, sizeof(opts));
|
||||||
|
print_with_options(f, v, &opts);
|
||||||
|
}
|
||||||
|
|
||||||
void write_defaults_indent(struct ios *f, value_t v)
|
void write_defaults_indent(struct ios *f, value_t v)
|
||||||
{
|
{
|
||||||
struct printer_options opts;
|
struct printer_options opts;
|
||||||
|
|
|
@ -715,6 +715,10 @@ value_t fl_toplevel_eval(value_t expr);
|
||||||
value_t fl_apply(value_t f, value_t l);
|
value_t fl_apply(value_t f, value_t l);
|
||||||
value_t fl_applyn(uint32_t n, value_t f, ...);
|
value_t fl_applyn(uint32_t n, value_t f, ...);
|
||||||
|
|
||||||
|
void display_defaults(struct ios *f, value_t v);
|
||||||
|
void write_simple_defaults(struct ios *f, value_t v);
|
||||||
|
void write_defaults_indent(struct ios *f, value_t v);
|
||||||
|
|
||||||
extern value_t printprettysym, printreadablysym, printwidthsym;
|
extern value_t printprettysym, printreadablysym, printwidthsym;
|
||||||
|
|
||||||
// object model manipulation
|
// object model manipulation
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
|
|
||||||
#include "scheme.h"
|
#include "scheme.h"
|
||||||
|
|
||||||
extern void display_defaults(struct ios *f, value_t v);
|
|
||||||
|
|
||||||
value_t fl_stringp(value_t *args, uint32_t nargs)
|
value_t fl_stringp(value_t *args, uint32_t nargs)
|
||||||
{
|
{
|
||||||
argcount("string?", nargs, 1);
|
argcount("string?", nargs, 1);
|
||||||
|
|
Loading…
Reference in New Issue