PIPS
|
Go to the source code of this file.
Data Structures | |
struct | res_or_rule |
Storage for arguments of tpips commands. More... | |
Macros | |
#define | TPIPS_PRIMARY_PROMPT "tpips> " /**prompt for readline */ |
#define | TPIPS_REQUEST_PROMPT "tpips-request> " |
#define | TPIPS_SECONDARY_PROMPT "> " |
#define | TPIPS_CONTINUATION_CHAR '\\' |
#define | TPIPS_HISTENV "TPIPS_HISTORY" /**history file env variable */ |
#define | TPIPS_HISTORY_LENGTH 100 /**max length of history file */ |
#define | TPIPS_COMMENT_PREFIX '#' /**comment prefix */ |
#define | TPIPS_HISTORY ".tpips.history" /**default history file */ |
#define | SHELL_ESCAPE "shell" /**! used for history reference */ |
#define | CHANGE_DIR "cd" |
#define | TPIPS_SOURCE "source" |
#define | SET_ENV "setenv" |
#define | GET_ENV "getenv" |
#define | SET_PROP "setproperty" |
#define | GET_PROP "getproperty" |
#define | QUIT "quit" |
#define | HELP "help" |
#define | ECHO_N "echo" |
macro ECHO is reserved by flex More... | |
#define | skip_blanks(str) while (*str && (*str==' ' || *str=='\t' || *str=='\n')) str++ |
Variables | |
FILE * | tp_in |
bool | tpips_execution_mode |
cproto-generated files More... | |
bool | tpips_is_interactive |
bool | jpips_is_running |
bool | tpips_init_done |
variable globale, utilisee par le parser helas More... | |
bool | consistency_enforced_p |
Pipsmake does not enforce consistency when properties are changed. More... | |
int | tp_char |
revisions.c More... | |
int | tp_nerrs |
int | tp_leng |
tp_lex.c More... | |
FILE * | tp_out |
int | tp_lineno |
int | tp__flex_debug |
char * | tp_text |
string | tpips_unknown_string |
#define SHELL_ESCAPE "shell" /**! used for history reference */ |
#define skip_blanks | ( | str | ) | while (*str && (*str==' ' || *str=='\t' || *str=='\n')) str++ |
#define TPIPS_HISTORY ".tpips.history" /**default history file */ |
#define TPIPS_HISTORY_LENGTH 100 /**max length of history file */ |
#define TPIPS_PRIMARY_PROMPT "tpips> " /**prompt for readline */ |
char** get_module_names | ( | void | ) |
Build an array with the names of all available modules.
Free after a previous use:
By default, no available module:
Mainly inspired from wpips/emacs.c
Overkilling since most of time, the module list does not change but I guess there is no indicator in PIPS to tell some modules have been created or destroyed.
Note that since calloc initialize the memory to 0, this array will end with a NULL pointer as expected.
Definition at line 332 of file tpips.c.
References db_get_current_workspace_name(), db_get_module_list(), free(), gen_array_full_free(), gen_array_item(), and gen_array_nitems().
Referenced by param_generator().
void jpips_add_tag | ( | string | s | ) |
Definition at line 192 of file tpips.c.
References fprintf(), and out_to_jpips.
Referenced by jpips_tag2(), and tp_some_info().
void jpips_begin_tag | ( | string | s | ) |
Definition at line 187 of file tpips.c.
References fprintf(), JPIPS_TAG, and out_to_jpips.
Referenced by jpips_tag(), jpips_tag2(), and tp_some_info().
void jpips_done | ( | void | ) |
Definition at line 216 of file tpips.c.
References jpips_tag().
Referenced by tpips_process_a_file().
void jpips_end_tag | ( | void | ) |
Definition at line 197 of file tpips.c.
References fprintf(), and out_to_jpips.
Referenced by jpips_tag(), jpips_tag2(), and tp_some_info().
FILE* jpips_out_file | ( | void | ) |
Definition at line 182 of file tpips.c.
References out_to_jpips.
void jpips_printf | ( | const | string, |
... | |||
) |
string | ormat |
Definition at line 229 of file tpips.c.
References out_to_jpips.
Referenced by tpips_user_error(), and tpips_user_request().
void jpips_string | ( | const char * | a_message_format, |
va_list | some_arguments | ||
) |
a_message_format | _message_format |
some_arguments | ome_arguments |
Definition at line 221 of file tpips.c.
References out_to_jpips.
Referenced by tpips_user_error(), and tpips_user_request().
void jpips_tag | ( | string | s | ) |
Definition at line 203 of file tpips.c.
References jpips_begin_tag(), and jpips_end_tag().
Referenced by jpips_done(), tpips_user_error(), and tpips_user_request().
s1 | 1 |
s2 | 2 |
Definition at line 209 of file tpips.c.
References jpips_add_tag(), jpips_begin_tag(), jpips_end_tag(), and s1.
Referenced by display_a_resource(), and tp_some_info().
void* tp_alloc | ( | yy_size_t | ) |
void tp_begin_fname | ( | ) |
void tp_begin_key | ( | ) |
void tp_error | ( | ) |
void tp_error | ( | const char * | ) |
void tp_free | ( | void * | ) |
int tp_get_debug | ( | void | ) |
FILE* tp_get_in | ( | void | ) |
int tp_get_leng | ( | void | ) |
int tp_get_lineno | ( | void | ) |
FILE* tp_get_out | ( | void | ) |
char* tp_get_text | ( | void | ) |
void tp_init_lex | ( | ) |
int tp_lex | ( | ) |
int tp_lex_destroy | ( | void | ) |
int tp_parse | ( | ) |
void tp_pop_buffer_state | ( | void | ) |
void* tp_realloc | ( | void * | , |
yy_size_t | |||
) |
void tp_restart | ( | FILE * | ) |
void tp_set_debug | ( | int | ) |
void tp_set_in | ( | FILE * | ) |
void tp_set_lineno | ( | int | ) |
void tp_set_out | ( | FILE * | ) |
int tp_wrap | ( | void | ) |
bool tpips_behaves_like_a_shell | ( | void | ) |
Definition at line 143 of file tpips.c.
References get_bool_property(), string_is_true(), tpips_is_a_shell, and TPIPS_IS_A_SHELL.
void tpips_close | ( | void | ) |
Definition at line 868 of file tpips.c.
References close_workspace_if_opened(), default_hist_file_name(), file_name, logfile, safe_fclose(), TPIPS_HISTORY_LENGTH, and use_readline.
Referenced by tpips_exec(), and tpips_main().
string tpips_current_file_name | ( | void | ) |
Definition at line 76 of file tpips.c.
References current_name.
int tpips_current_line | ( | void | ) |
Definition at line 91 of file tpips.c.
References current_line.
Referenced by tpips_lex_print_pos().
int tpips_current_line_number | ( | void | ) |
string tpips_current_name | ( | void | ) |
Definition at line 96 of file tpips.c.
References current_name.
Referenced by tpips_lex_print_pos().
char* tpips_get_line_to_parse | ( | void | ) |
void tpips_help | ( | string | line | ) |
get the number of colunms for 80 chars
get the number of colunms for 80 chars
line | ine |
Definition at line 688 of file tpips.c.
References count, current_size, GET_PROP, line, pips_debug, prefix_equal_p(), printf(), skip_blanks, tgetnum(), TP_HELP, tp_phase_names, and tp_resource_names.
void tpips_init | ( | void | ) |
set_exception_callbacks(push_pips_context, pop_pips_context);
???
Definition at line 970 of file tpips.c.
References consistency_enforced_p, entity_local_name(), get_bool_property(), in_from_jpips, initialize_newgen(), initialize_sc(), out_to_jpips, pips_checks(), pips_error_handler, pips_internal_error_handler, pips_request_handler, set_bool_property(), tpips_init_done, tpips_internal_error(), tpips_user_error(), and tpips_user_request().
Referenced by tp_substitutions(), and tpips_exec().
void tpips_internal_error | ( | const char * | , |
const char * | , | ||
... | |||
) |
void tpips_lex_print_pos | ( | FILE * | fout | ) |
fout | out |
Definition at line 968 of file tp_lex.c.
References back, fprintf(), int, line_parsed, line_to_parse, tpips_current_line(), and tpips_current_name().
MAIN: interactive loop and history management.
I need this one right now, as tpips init may be called too late.
argc | rgc |
argv | rgv |
Definition at line 1298 of file tpips.c.
References asprintf, cc_version, debug_on, entity_local_name(), fprintf(), info_log, initialize_signal_catcher(), parse_arguments(), pips_stop, pop_pips_context(), push_pips_context(), set_exception_callbacks(), set_pips_meta_informations(), soft_date, soft_revisions, tpips_close(), and variable_debug_name.
void tpips_next_line | ( | void | ) |
Definition at line 86 of file tpips.c.
References current_line.
Referenced by get_next_line().
processing command line per line.
might be called recursively thru source.
push globals
interactive loop
file | ile |
name | ame |
use_rl | se_rl |
Definition at line 1062 of file tpips.c.
References current_file, current_line, current_name, free(), initialize_readline(), initialize_tpips_history(), jpips_done(), jpips_is_running, line, tpips_exec(), TPIPS_PRIMARY_PROMPT, tpips_read_a_line(), and use_readline.
Referenced by parse_arguments(), and process_file_list().
void tpips_set_line_to_parse | ( | char * | line | ) |
in lex file
store line pointer
line | ine |
Definition at line 953 of file tp_lex.c.
References cr_not_returned, line, line_parsed, line_to_parse, and skip_blanks.
void tpips_wrapper | ( | void | ) |
the child is a new tpips, it keeps on executing... the parent just acts as a wrapper, it never returns from here.
CHILD is tpips and returns.
code for the WRAPPER starts here. the PARENT.
special handlers.
forward to tpips. how to ensure that tpips is alive? SIGCHLD and SIGPIPE are caught.
handle signals.
stop tpips on EOF.
wrapper mission done.
Definition at line 270 of file wrapper.c.
References ABORTIT, CHECKPOINT, exit, INTERRUPT, KILL, KILLNOW, line, SIGNAL_TAG, starts_with, tpips_pid, tpw_fatal_error(), tpw_fork_inout(), tpw_log(), tpw_read_line(), tpw_send_string_to_tpips(), and tpw_set_sig_handlers().
Referenced by parse_arguments().
|
extern |
Pipsmake does not enforce consistency when properties are changed.
The consistency can be enforced by forbidding setproperty during a processing phase.
Definition at line 968 of file tpips.c.
Referenced by tpips_init().
|
extern |
Definition at line 97 of file tpips.h.
Referenced by parse_arguments(), tpips_process_a_file(), tpips_user_error(), and tpips_user_request().
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
cproto-generated files
cproto-generated files
Definition at line 89 of file tpips.h.
Referenced by parse_arguments().
|
extern |
variable globale, utilisee par le parser helas
Definition at line 111 of file tpips.h.
Referenced by tpips_exec(), and tpips_init().
|
extern |
Definition at line 90 of file tpips.h.
Referenced by parse_arguments().