|
Post Scarcity
A prototype for a post scarcity programming environment
|
#include <ctype.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <wchar.h>#include <wctype.h>#include "memory/conspage.h"#include "memory/consspaceobject.h"#include "memory/hashmap.h"#include "arith/integer.h"#include "ops/intern.h"#include "memory/stack.h"#include "io/print.h"#include "time/psse_time.h"#include "memory/vectorspace.h"Go to the source code of this file.
Functions | |
| struct cons_pointer | print (URL_FILE *output, struct cons_pointer pointer) |
Print the cons-space object indicated by pointer to the stream indicated by output. | |
| void | print_128bit (URL_FILE *output, __int128_t n) |
| stolen from https://stackoverflow.com/questions/11656241/how-to-print-uint128-t-number-using-gcc | |
| void | print_list (URL_FILE *output, struct cons_pointer pointer) |
| void | print_list_contents (URL_FILE *output, struct cons_pointer pointer, bool initial_space) |
Print a single list cell (cons cell) indicated by pointer to the stream indicated by output. | |
| void | print_map (URL_FILE *output, struct cons_pointer map) |
| void | print_string (URL_FILE *output, struct cons_pointer pointer) |
print all the characters in the string indicated by pointer onto the stream at this output, prepending and appending double quote characters. | |
| void | print_string_contents (URL_FILE *output, struct cons_pointer pointer) |
print all the characters in the symbol or string indicated by pointer onto this output; if pointer does not indicate a string or symbol, don't print anything but just return. | |
| void | print_vso (URL_FILE *output, struct cons_pointer pointer) |
| void | println (URL_FILE *output) |
| struct cons_pointer print | ( | URL_FILE * | output, |
| struct cons_pointer | pointer | ||
| ) |
Print the cons-space object indicated by pointer to the stream indicated by output.
Definition at line 151 of file print.c.
References c_string_to_lisp_symbol(), CONSTV, dec_ref(), dump_stack_trace(), EXCEPTIONTV, FUNCTIONTV, integer_to_string(), INTEGERTV, KEYTV, LAMBDATV, make_cons(), NILTV, NLAMBDATV, cons_space_object::payload, pointer2cell, print(), print_128bit(), print_list(), print_string(), print_string_contents(), print_vso(), RATIOTV, READTV, REALTV, SPECIALTV, STRINGTV, SYMBOLTV, cons_space_object::tag, time_to_string(), TIMETV, TRUETV, url_fputwc, url_fputws, url_fwprintf, VECTORPOINTTV, and WRITETV.
Referenced by check_exception(), debug_print_object(), dump_frame(), dump_map(), dump_object(), dump_stack_trace(), dump_string_cell(), lisp_print(), lisp_repl(), print(), print_list_contents(), and print_map().
| void print_128bit | ( | URL_FILE * | output, |
| __int128_t | n | ||
| ) |
stolen from https://stackoverflow.com/questions/11656241/how-to-print-uint128-t-number-using-gcc
Definition at line 129 of file print.c.
References url_fwprintf.
Referenced by print().
| void print_list | ( | URL_FILE * | output, |
| struct cons_pointer | pointer | ||
| ) |
Definition at line 85 of file print.c.
References print_list_contents(), and url_fputws.
Referenced by print().
| void print_list_contents | ( | URL_FILE * | output, |
| struct cons_pointer | pointer, | ||
| bool | initial_space | ||
| ) |
Print a single list cell (cons cell) indicated by pointer to the stream indicated by output.
if initial_space is true, prepend a space character.
Definition at line 64 of file print.c.
References CONSTV, NILTV, cons_space_object::payload, pointer2cell, print(), print_list_contents(), cons_space_object::tag, url_fputwc, and url_fwprintf.
Referenced by print_list(), and print_list_contents().
| void print_map | ( | URL_FILE * | output, |
| struct cons_pointer | map | ||
| ) |
Definition at line 91 of file print.c.
References c_car(), c_cdr(), hashmap_get(), hashmap_keys(), hashmapp, nilp, pointer_to_vso, print(), url_fputwc, and url_fputws.
Referenced by print_vso().
| void print_string | ( | URL_FILE * | output, |
| struct cons_pointer | pointer | ||
| ) |
print all the characters in the string indicated by pointer onto the stream at this output, prepending and appending double quote characters.
Definition at line 52 of file print.c.
References print_string_contents(), and url_fputwc.
Referenced by print().
| void print_string_contents | ( | URL_FILE * | output, |
| struct cons_pointer | pointer | ||
| ) |
print all the characters in the symbol or string indicated by pointer onto this output; if pointer does not indicate a string or symbol, don't print anything but just return.
Definition at line 35 of file print.c.
References keywordp, cons_space_object::payload, pointer2cell, stringp, symbolp, and url_fputwc.
Referenced by print(), and print_string().
| void print_vso | ( | URL_FILE * | output, |
| struct cons_pointer | pointer | ||
| ) |
Definition at line 113 of file print.c.
References HASHTV, vector_space_object::header, pointer_to_vso, print_map(), and vector_space_header::tag.
Referenced by print().
| void println | ( | URL_FILE * | output | ) |