#include "global.h"#include "interpret.h"#include "svalue.h"#include "pike_macros.h"#include "object.h"#include "program.h"#include "array.h"#include "pike_error.h"#include "constants.h"#include "mapping.h"#include "stralloc.h"#include "multiset.h"#include "pike_types.h"#include "pike_rusage.h"#include "operators.h"#include "fsort.h"#include "callback.h"#include "gc.h"#include "backend.h"#include "main.h"#include "pike_memory.h"#include "threads.h"#include "time_stuff.h"#include "version.h"#include "encode.h"#include <math.h>#include <ctype.h>#include "module_support.h"#include "module.h"#include "opcodes.h"#include "cyclic.h"#include "signal_handler.h"#include "pike_security.h"#include "builtin_functions.h"#include "bignum.h"#include "peep.h"#include "docode.h"#include "lex.h"#include "pike_float.h"#include "case_info.h"#include "combine_path.h"Classes | |
| struct | case_info |
| struct | tupel |
| struct | replace_many_context |
| struct | diff_magic_link |
| struct | diff_magic_link_pool |
| struct | diff_magic_link_head |
Defines | |
| #define | CIM_NONE 0 |
| #define | CIM_UPPERDELTA 1 |
| #define | CIM_LOWERDELTA 2 |
| #define | CIM_CASEBIT 3 |
| #define | CIM_CASEBITOFF 4 |
| #define | DO_LOWER_CASE(C) |
| #define | DO_LOWER_CASE_SHIFT0(C) |
| #define | DO_UPPER_CASE(C) |
| #define | DO_UPPER_CASE_SHIFT0(C) |
| #define | TWO_SHIFTS(S1, S2) ((S1)|((S2)<<2)) |
| #define | CASE_SHIFT(S1, S2) |
| #define | TWO_SHIFTS(S1, S2) ((S1)|((S2)<<2)) |
| #define | CASE_SHIFT(S1, S2) |
| #define | NT_COMBINE_PATH |
| #define | UNIX_COMBINE_PATH |
| #define | AMIGAOS_COMBINE_PATH |
| #define | GET_CONT_CHAR(in, i, c) |
| #define | UTF8_SEQ_ERROR(prefix, c, i, problem) |
| #define | FIX_OVERLOADED_TYPE(n, lf, X) fix_overloaded_type(n,lf,X,CONSTANT_STRLEN(X)) |
| #define | SETFLAG(FLAGS, FLAG, ONOFF) FLAGS = (FLAGS & ~FLAG) | ( ONOFF ? FLAG : 0 ) |
| #define | GET_TIME_ELAPSED GETTIMEOFDAY(&tv) |
| #define | TIME_ELAPSED ((tv.tv_sec-t0.tv_sec) + (tv.tv_usec-t0.tv_usec)*1e-6) |
| #define | FIX_LEFT() |
| #define | POLL_SLEEP_LIMIT 0.02 |
| #define | GET_TIME_ELAPSED GETTIMEOFDAY(&tv) |
| #define | TIME_ELAPSED ((tv.tv_sec-t0.tv_sec) + (tv.tv_usec-t0.tv_usec)*1e-6) |
| #define | FIX_LEFT() |
| #define | TYPEP(ID, NAME, TYPE, TYPE_NAME) |
| #define | DMLPOOLSIZE 16384 |
| #define | tMapStuff(IN, SUB, OUTFUN, OUTSET, OUTPROG, OUTMIX, OUTARR, OUTMAP) |
Functions | |
| PMOD_EXPORT void | f_equal (INT32 args) |
| PMOD_EXPORT void | debug_f_aggregate (INT32 args) |
| PMOD_EXPORT void | f_hash (INT32 args) |
| void | f_hash_value (INT32 args) |
| PMOD_EXPORT void | f_copy_value (INT32 args) |
| PMOD_EXPORT void | f_lower_case (INT32 args) |
| PMOD_EXPORT void | f_upper_case (INT32 args) |
| PMOD_EXPORT void | f_random_string (INT32 args) |
| PMOD_EXPORT void | f_random_seed (INT32 args) |
| void | f_query_num_arg (INT32 args) |
| PMOD_EXPORT void | f_search (INT32 args) |
| PMOD_EXPORT void | f_has_prefix (INT32 args) |
| PMOD_EXPORT void | f_has_suffix (INT32 args) |
| PMOD_EXPORT void | f_has_index (INT32 args) |
| PMOD_EXPORT void | f_has_value (INT32 args) |
| PMOD_EXPORT void | f_add_constant (INT32 args) |
| PMOD_EXPORT void | f_zero_type (INT32 args) |
| PMOD_EXPORT void | f_string_to_unicode (INT32 args) |
| PMOD_EXPORT void | f_unicode_to_string (INT32 args) |
| PMOD_EXPORT void | f_string_to_utf8 (INT32 args) |
| PMOD_EXPORT void | f_utf8_to_string (INT32 args) |
| PMOD_EXPORT void | f_all_constants (INT32 args) |
| PMOD_EXPORT void | f_allocate (INT32 args) |
| void | f_this_object (INT32 args) |
| PMOD_EXPORT void | f_throw (INT32 args) |
| PMOD_EXPORT void | f_exit (INT32 args) |
| void | f__exit (INT32 args) |
| PMOD_EXPORT void | f_time (INT32 args) |
| PMOD_EXPORT void | f_crypt (INT32 args) |
| PMOD_EXPORT void | f_destruct (INT32 args) |
| PMOD_EXPORT void | f_indices (INT32 args) |
| PMOD_EXPORT void | f_values (INT32 args) |
| PMOD_EXPORT void | f_next_object (INT32 args) |
| PMOD_EXPORT void | f_object_program (INT32 args) |
| node * | fix_object_program_type (node *n) |
| PMOD_EXPORT void | f_reverse (INT32 args) |
| PMOD_EXPORT void | f_replace (INT32 args) |
| node * | optimize_replace (node *n) |
| PMOD_EXPORT void | f_compile (INT32 args) |
| void | f_set_weak_flag (INT32 args) |
| PMOD_EXPORT void | f_objectp (INT32 args) |
| PMOD_EXPORT void | f_functionp (INT32 args) |
| PMOD_EXPORT void | f_callablep (INT32 args) |
| PMOD_EXPORT void | f_sleep (INT32 args) |
| PMOD_EXPORT void | f_delay (INT32 args) |
| void | f_gc (INT32 args) |
| PMOD_EXPORT void | f_programp (INT32 args) |
| PMOD_EXPORT void | f_sort (INT32 args) |
| PMOD_EXPORT void | f_rows (INT32 args) |
| PMOD_EXPORT void | f__verify_internals (INT32 args) |
| PMOD_EXPORT void | f_glob (INT32 args) |
| PMOD_EXPORT void | f_permute (INT32 args) |
| PMOD_EXPORT void | f_diff (INT32 args) |
| PMOD_EXPORT void | f_diff_compare_table (INT32 args) |
| PMOD_EXPORT void | f_diff_longest_sequence (INT32 args) |
| PMOD_EXPORT void | f_diff_dyn_longest_sequence (INT32 args) |
| callback * | add_memory_usage_callback (callback_func call, void *arg, callback_func free_func) |
| PMOD_EXPORT void | f__memory_usage (INT32 args) |
| PMOD_EXPORT void | f__next (INT32 args) |
| PMOD_EXPORT void | f__prev (INT32 args) |
| PMOD_EXPORT void | f__refs (INT32 args) |
| PMOD_EXPORT void | f__typeof (INT32 args) |
| PMOD_EXPORT void | f_replace_master (INT32 args) |
| PMOD_EXPORT void | f_master (INT32 args) |
| PMOD_EXPORT void | f_gethrvtime (INT32 args) |
| PMOD_EXPORT void | f_gethrtime (INT32 args) |
| PMOD_EXPORT void | f_object_variablep (INT32 args) |
| PMOD_EXPORT void | f_uniq_array (INT32 args) |
| PMOD_EXPORT void | f_splice (INT32 args) |
| PMOD_EXPORT void | f_everynth (INT32 args) |
| PMOD_EXPORT void | f_transpose (INT32 args) |
| PMOD_EXPORT void | f_map (INT32 args) |
| PMOD_EXPORT void | f_filter (INT32 args) |
| void | f_enumerate (INT32 args) |
| PMOD_EXPORT void | f_inherit_list (INT32 args) |
| PMOD_EXPORT void | f_function_defined (INT32 args) |
| void | init_builtin_efuns (void) |
|
|
|
|
|
Value: case TWO_SHIFTS(S1, S2): \ { \ PIKE_CONCAT(p_wchar,S1) *s1 = PIKE_CONCAT(STR,S1)(a) + a->len - b->len; \ PIKE_CONCAT(p_wchar,S2) *s2 = PIKE_CONCAT(STR,S2)(b); \ ptrdiff_t len = b->len; \ while(len-- && (s1[len] == s2[len])) \ ; \ pop_n_elems(args); \ push_int(len == -1); \ return; \ } \ break |
|
|
Value: case TWO_SHIFTS(S1, S2): \ { \ PIKE_CONCAT(p_wchar,S1) *s1 = PIKE_CONCAT(STR,S1)(a); \ PIKE_CONCAT(p_wchar,S2) *s2 = PIKE_CONCAT(STR,S2)(b); \ ptrdiff_t len = b->len; \ while(len-- && (s1[len] == s2[len])) \ ; \ pop_n_elems(args); \ push_int(len == -1); \ return; \ } \ break |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: do {\ INT32 c = C; \ if(c<0xb5){if(c >= 'A' && c <= 'Z' ) C=c+0x20;}else {\ struct case_info *ci = find_ci(c); \ if (ci) { \ switch(ci->mode) { \ case CIM_NONE: case CIM_LOWERDELTA: break; \ case CIM_UPPERDELTA: C = c + ci->data; break; \ case CIM_CASEBIT: C = c | ci->data; break; \ case CIM_CASEBITOFF: C = ((c - ci->data) | ci->data) + ci->data; break; \ default: Pike_fatal("lower_case(): Unknown case_info mode: %d\n", ci->mode); \ } \ }} \ } while(0) |
|
|
Value: do {\ INT32 c = C; \ if(c<0xb5){if(c >= 'A' && c <= 'Z' ) C=c+0x20;}else {\ struct case_info *ci = find_ci_shift0(c); \ if (ci) { \ switch(ci->mode) { \ case CIM_NONE: case CIM_LOWERDELTA: break; \ case CIM_UPPERDELTA: C = c + ci->data; break; \ case CIM_CASEBIT: C = c | ci->data; break; \ case CIM_CASEBITOFF: C = ((c - ci->data) | ci->data) + ci->data; break; \ default: Pike_fatal("lower_case(): Unknown case_info mode: %d\n", ci->mode); \ } \ }} \ } while(0) |
|
|
Value: do {\ INT32 c = C; \ if(c<0xb5){if(c >= 'a' && c <= 'z' ) C=c-0x20;}else {\ struct case_info *ci = find_ci(c); \ if (ci) { \ switch(ci->mode) { \ case CIM_NONE: case CIM_UPPERDELTA: break; \ case CIM_LOWERDELTA: C = c - ci->data; break; \ case CIM_CASEBIT: C = c & ~ci->data; break; \ case CIM_CASEBITOFF: C = ((c - ci->data)& ~ci->data) + ci->data; break; \ default: Pike_fatal("upper_case(): Unknown case_info mode: %d\n", ci->mode); \ } \ }} \ } while(0) |
|
|
Value: do {\ INT32 c = C; \ if(c<0xb5){if(c >= 'a' && c <= 'z' ) C=c-0x20;}else {\ struct case_info *ci = find_ci_shift0(c); \ if (ci) { \ switch(ci->mode) { \ case CIM_NONE: case CIM_UPPERDELTA: break; \ case CIM_LOWERDELTA: C = c - ci->data; break; \ case CIM_CASEBIT: C = c & ~ci->data; break; \ case CIM_CASEBITOFF: C = ((c - ci->data)& ~ci->data) + ci->data; break; \ default: Pike_fatal("lower_case(): Unknown case_info mode: %d\n", ci->mode); \ } \ }} \ } while(0) |
|
|
Value: GET_TIME_ELAPSED; \
left = delay - TIME_ELAPSED; \
if (do_microsleep) left-=POLL_SLEEP_LIMIT;
|
|
|
Value: GET_TIME_ELAPSED; \
left = delay - TIME_ELAPSED;
|
|
|
|
|
|
Value: do { \ i++; \ if (i >= in->len) \ bad_arg_error ("utf8_to_string", Pike_sp - args, args, 1, \ NULL, Pike_sp - args, \ "Truncated UTF-8 sequence at end of string.\n"); \ c = STR0 (in)[i]; \ if ((c & 0xc0) != 0x80) \ bad_arg_error ("utf8_to_string", Pike_sp - args, args, 1, \ NULL, Pike_sp - args, \ "Expected continuation character at index %d, " \ "got 0x%02x.\n", \ i, c); \ } while (0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: tOr7( tFuncV(IN tFuncV(SUB,tMix,tSetvar(2,tAny)),tMix,OUTFUN), \ tIfnot(tFuncV(IN tFunction,tMix,tMix), \ tOr(tFuncV(IN tPrg(tObj), tMix, OUTPROG), \ tFuncV(IN tObj, tMix, OUTMIX))), \ tFuncV(IN tSet(tMix),tMix,OUTSET), \ tFuncV(IN tMap(tMix, tSetvar(2,tMix)), tMix, OUTMAP), \ tFuncV(IN tArray, tMix, OUTARR), \ tFuncV(IN tInt0, tMix, OUTMIX), \ tFuncV(IN, tVoid, OUTMIX) ) |
|
|
|
|
|
|
|
|
Value: PMOD_EXPORT void ID(INT32 args) \ { \ int t; \ struct program *p; \ if (args<1) \ SIMPLE_TOO_FEW_ARGS_ERROR(NAME, 1); \ if (Pike_sp[-args].type == T_OBJECT && \ (p = Pike_sp[-args].u.object->prog)) \ { \ int fun = FIND_LFUN(p->inherits[Pike_sp[-args].subtype].prog, \ LFUN__IS_TYPE); \ if (fun != -1) \ { \ int id_level = \ p->inherits[Pike_sp[-args].subtype].identifier_level; \ push_constant_text(TYPE_NAME); \ apply_low(Pike_sp[-args-1].u.object, fun + id_level, 1); \ stack_unlink(args); \ return; \ } \ } \ t = Pike_sp[-args].type == TYPE; \ pop_n_elems(args); \ push_int(t); \ } |
|
|
|
|
|
Value: do { \ bad_arg_error ("utf8_to_string", Pike_sp - args, args, 1, \ NULL, Pike_sp - args, \ "UTF-8 sequence beginning with %s0x%02x " \ "at index %"PRINTPTRDIFFT"d %s.\n", \ prefix, c, i, problem); \ } while (0) |
|
||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.9.1