Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include "duktape.h"
Go to the source code of this file.
Functions | |
void | poll_register (duk_context *ctx) |
void | ncurses_register (duk_context *ctx) |
void | socket_register (duk_context *ctx) |
void | fileio_register (duk_context *ctx) |
void | eventloop_register (duk_context *ctx) |
int | eventloop_run (duk_context *ctx) |
static void | my_sighandler (int x) |
static void | set_sigint_handler (void) |
static void | print_error (duk_context *ctx, FILE *f) |
int | wrapped_compile_execute (duk_context *ctx) |
int | handle_fh (duk_context *ctx, FILE *f, const char *filename) |
int | handle_file (duk_context *ctx, const char *filename) |
int | handle_stdin (duk_context *ctx) |
int | main (int argc, char *argv[]) |
Variables | |
static int | c_evloop = 0 |
|
extern |
Definition at line 601 of file duktape-1.5.2/examples/eventloop/c_eventloop.c.
Referenced by main().
|
extern |
Definition at line 257 of file duktape-1.5.2/examples/eventloop/c_eventloop.c.
Referenced by wrapped_compile_execute().
|
extern |
Definition at line 62 of file duktape-1.5.2/examples/eventloop/fileio.c.
Referenced by main().
int handle_fh | ( | duk_context * | ctx, |
FILE * | f, | ||
const char * | filename ) |
Definition at line 101 of file vendor/civetweb/third_party/duktape-1.5.2/examples/eventloop/main.c.
References DUK_EXEC_SUCCESS, duk_pop(), duk_push_lstring(), duk_push_string(), duk_safe_call(), error(), fread(), free, malloc, NULL, print_error(), and wrapped_compile_execute().
Referenced by handle_file(), and handle_stdin().
int handle_file | ( | duk_context * | ctx, |
const char * | filename ) |
Definition at line 145 of file vendor/civetweb/third_party/duktape-1.5.2/examples/eventloop/main.c.
References error(), handle_fh(), and NULL.
Referenced by main().
int handle_stdin | ( | duk_context * | ctx | ) |
Definition at line 165 of file vendor/civetweb/third_party/duktape-1.5.2/examples/eventloop/main.c.
References handle_fh().
Referenced by main().
int main | ( | int | argc, |
char * | argv[] ) |
Definition at line 173 of file vendor/civetweb/third_party/duktape-1.5.2/examples/eventloop/main.c.
References arg, c_evloop, duk_create_heap_default, duk_destroy_heap(), duk_eval_file, eventloop_register(), fileio_register(), handle_file(), handle_stdin(), ncurses_register(), NULL, poll_register(), set_sigint_handler(), socket_register(), and usage().
|
static |
Definition at line 27 of file vendor/civetweb/third_party/duktape-1.5.2/examples/eventloop/main.c.
Referenced by set_sigint_handler().
|
extern |
Definition at line 98 of file duktape-1.5.2/examples/eventloop/ncurses.c.
References duk_pop(), duk_push_global_object(), duk_push_object(), duk_put_function_list(), duk_put_prop_string(), and ncurses_funcs.
Referenced by main().
|
extern |
Definition at line 103 of file duktape-1.5.2/examples/eventloop/poll.c.
References duk_pop(), duk_push_global_object(), duk_push_object(), duk_put_function_list(), duk_put_number_list(), duk_put_prop_string(), poll_consts, and poll_funcs.
Referenced by main().
|
static |
Definition at line 37 of file vendor/civetweb/third_party/duktape-1.5.2/examples/eventloop/main.c.
References duk_get_prop_string(), duk_get_string(), duk_has_prop_string(), duk_is_object(), duk_is_string(), duk_pop(), duk_pop_2(), and duk_to_string().
Referenced by handle_fh().
|
static |
Definition at line 31 of file vendor/civetweb/third_party/duktape-1.5.2/examples/eventloop/main.c.
References my_sighandler().
Referenced by main().
|
extern |
Definition at line 279 of file duktape-1.5.2/examples/eventloop/socket.c.
References duk_pop(), duk_push_global_object(), duk_push_object(), duk_put_function_list(), duk_put_prop_string(), and socket_funcs.
Referenced by main().
int wrapped_compile_execute | ( | duk_context * | ctx | ) |
Definition at line 57 of file vendor/civetweb/third_party/duktape-1.5.2/examples/eventloop/main.c.
References c_evloop, duk_compile, duk_eval_string, duk_insert(), duk_pop(), duk_push_global_object(), duk_put_prop_string(), duk_safe_call(), duk_to_string(), eventloop_run(), and printf.
Referenced by handle_fh().
|
static |
Definition at line 24 of file vendor/civetweb/third_party/duktape-1.5.2/examples/eventloop/main.c.
Referenced by main(), and wrapped_compile_execute().