|
Post Scarcity
A prototype for a post scarcity programming environment
|
#include <curl/curl.h>#include <wchar.h>#include <wctype.h>Go to the source code of this file.
Data Structures | |
| struct | fcurl_data |
| union | fcurl_data.handle |
Macros | |
| #define | url_fputwc(wc, f) ((f->type = CFTYPE_FILE) ? fputwc(wc, f->handle.file) : 0) |
| #define | url_fputws(ws, f) ((f->type = CFTYPE_FILE) ? fputws(ws, f->handle.file) : 0) |
| #define | url_fwprintf(f, ...) ((f->type = CFTYPE_FILE) ? fwprintf( f->handle.file, __VA_ARGS__) : -1) |
Typedefs | |
| typedef struct fcurl_data | URL_FILE |
Enumerations | |
| enum | fcurl_type_e { CFTYPE_NONE = 0 , CFTYPE_FILE = 1 , CFTYPE_CURL = 2 } |
Functions | |
| int | url_fclose (URL_FILE *file) |
| int | url_feof (URL_FILE *file) |
| char * | url_fgets (char *ptr, size_t size, URL_FILE *file) |
| URL_FILE * | url_fopen (const char *url, const char *operation) |
| size_t | url_fread (void *ptr, size_t size, size_t nmemb, URL_FILE *file) |
| void | url_rewind (URL_FILE *file) |
| struct fcurl_data |
| Data Fields | ||
|---|---|---|
| char * | buffer | |
| size_t | buffer_len | |
| size_t | buffer_pos | |
| union fcurl_data.handle | handle | |
| int | still_running | |
| enum fcurl_type_e | type | |
| #define url_fputwc | ( | wc, | |
| f | |||
| ) | ((f->type = CFTYPE_FILE) ? fputwc(wc, f->handle.file) : 0) |
| #define url_fputws | ( | ws, | |
| f | |||
| ) | ((f->type = CFTYPE_FILE) ? fputws(ws, f->handle.file) : 0) |
| #define url_fwprintf | ( | f, | |
| ... | |||
| ) | ((f->type = CFTYPE_FILE) ? fwprintf( f->handle.file, __VA_ARGS__) : -1) |
| typedef struct fcurl_data URL_FILE |
| enum fcurl_type_e |
| int url_fclose | ( | URL_FILE * | file | ) |
Definition at line 258 of file fopen.c.
References fcurl_data::buffer, CFTYPE_CURL, CFTYPE_FILE, fcurl_data::handle, and fcurl_data::type.
Referenced by free_cell(), and lisp_close().
| int url_feof | ( | URL_FILE * | file | ) |
Definition at line 286 of file fopen.c.
References fcurl_data::buffer_pos, CFTYPE_CURL, CFTYPE_FILE, fcurl_data::handle, fcurl_data::still_running, and fcurl_data::type.
Referenced by lisp_repl(), lisp_slurp(), read_continuation(), and read_path().
| char * url_fgets | ( | char * | ptr, |
| size_t | size, | ||
| URL_FILE * | file | ||
| ) |
Definition at line 346 of file fopen.c.
References fcurl_data::buffer, fcurl_data::buffer_pos, CFTYPE_CURL, CFTYPE_FILE, fcurl_data::handle, and fcurl_data::type.
Referenced by url_fgetwc().
| URL_FILE * url_fopen | ( | const char * | url, |
| const char * | operation | ||
| ) |
Definition at line 202 of file fopen.c.
References fcurl_data::buffer_pos, CFTYPE_CURL, CFTYPE_FILE, CFTYPE_NONE, fcurl_data::handle, index_of(), io_share, fcurl_data::still_running, and fcurl_data::type.
Referenced by lisp_open(), and main().
| size_t url_fread | ( | void * | ptr, |
| size_t | size, | ||
| size_t | nmemb, | ||
| URL_FILE * | file | ||
| ) |
Definition at line 307 of file fopen.c.
References fcurl_data::buffer, fcurl_data::buffer_pos, CFTYPE_CURL, CFTYPE_FILE, fcurl_data::handle, and fcurl_data::type.
| void url_rewind | ( | URL_FILE * | file | ) |
Definition at line 393 of file fopen.c.
References fcurl_data::buffer, fcurl_data::buffer_len, fcurl_data::buffer_pos, CFTYPE_CURL, CFTYPE_FILE, fcurl_data::handle, and fcurl_data::type.