int Encrypt_Init(IrcCommandDll **intp, Function_ptr *global_table) { int i, j; char buffer[BIG_BUFFER_SIZE+1]; initialize_module("encrypt"); add_module_proc(ALIAS_PROC, "encrypt", "MENCODE", NULL, 0, 0, func_encode, NULL); add_module_proc(ALIAS_PROC, "encrypt", "MDECODE", NULL, 0, 0, func_decode, NULL); encode_string = (char *)new_malloc(512); for (i = 1, j = 255; i <= 255; i++, j--) { switch (i) { case 27: case 127: case 255: encode_string[i-1] = i; break; default: encode_string[i-1] = j; break; } } sprintf(buffer, "$0+%s by panasync - $2 $3", encode_version); fset_string_var(FORMAT_VERSION_FSET, buffer); put_it("%s", convert_output_format("$G $0 v$1 by panasync. Based on suicide's Abot script.", "%s %s", encode_version, ENCODE_VERSION)); return 0; }
int Wavplay_Init(IrcCommandDll **intp, Function_ptr *global_table) { initialize_module("wavplay"); add_module_proc(COMMAND_PROC, "Wavplay", "wavplay", NULL, 0, 0, wav_play, NULL); bitchsay("Wavplay Module loaded. /wavplay <filename>"); return 0; }
int Possum_Init(IrcCommandDll **intp, Function_ptr *global_table) { char *tmp = getenv("MAIL"); initialize_module("possum"); MBOX.headers = NULL; add_module_proc(COMMAND_PROC, "possum", "pmheaders", NULL, 0, 0, pm_headers, NULL); add_module_proc(COMMAND_PROC, "possum", "pmcount", NULL, 0, 0, pm_count, NULL); add_module_proc(COMMAND_PROC, "possum", "pmlist", NULL, 0, 0, pm_list, NULL); add_module_proc(COMMAND_PROC, "possum", "pmread", NULL, 0, 0, pm_read, NULL); add_module_proc(COMMAND_PROC, "possum", "pmmailbox", NULL, 0, 0, pm_mailbox, NULL); add_module_proc(COMMAND_PROC, "possum", "pmhelp", NULL, 0, 0, pm_help, NULL); if (tmp) strncpy(MBOX.filename, tmp, MAX_FNAME_LENGTH); put_it("%s Possom Mail %s for BitchX has been excited.", cparse(PM_PROMPT, NULL, NULL), PM_VERSION); put_it("%s %s", cparse(PM_PROMPT, NULL, NULL), "Type /PMHELP for help."); if (tmp) { put_it("%s Using %s for default mail box.", cparse(PM_PROMPT, NULL, NULL), MBOX.filename); MBOX.headers = read_mbox(MBOX.filename); } else { put_it("%s Could not find MAIL in your environment.", cparse(PM_PROMPT, NULL, NULL)); put_it("%s You will have to manually set it with /PMMAILBOX.", cparse(PM_PROMPT,NULL, NULL)); } return 0; }
TEST(DeviceOpenTest, open_initializes_hardware) { struct file fil; struct inode inode; int read_wait_loop; u32 expected_control_write_addr = tddmodule_registers_p->control; u32 expected_control_read_addr = tddmodule_registers_p->status; u32 expected_control_reset_value = TDDMODULE_DEV_CONTROL_RESET; EXPECT_N_LEAKS(1); mock(fs_mock_namespace).ignoreOtherCalls(); initialize_module(); mock(iomem_mock_namespace).expectOneCall("writel") .withParameterOfType("unsigned", "value", &expected_control_reset_value) .withParameter("addr", (void*) &tddmodule_registers_p->control); mock(iomem_mock_namespace).expectOneCall("mb"); // force device to not be ready for N reads mock(iomem_mock_namespace).expectNCalls(5, "readl") .withParameter("addr", (void*) &tddmodule_registers_p->status) .andReturnValue(0); mock(iomem_mock_namespace).expectOneCall("readl") .withParameter("addr", (void*) &tddmodule_registers_p->status) .andReturnValue(1); tddmodule_dev_open( &inode, &fil); }
int Qbx_Init(IrcCommandDll **intp, Function_ptr *global_table) { initialize_module("qbx"); add_module_proc(HOOK_PROC, "qbx", NULL, "* % !q*", PUBLIC_LIST, 1, NULL, pub_proc); add_module_proc(HOOK_PROC, "qbx", NULL, "* % !q*", PUBLIC_OTHER_LIST, 1, NULL, pub_proc); add_module_proc(COMMAND_PROC, "qbx", "qbx", NULL, 0, 0, qbx_cmd, "<on|off>\n- Turns Qbx on or off"); put_it("Qbx %s loaded", QBX_VERSION); return 0; }
int Identd_Init(IrcCommandDll **intp, Function_ptr *global_table) { #if !defined(__EMX__) && !defined(WINNT) if (getuid() && geteuid()) { return -1; } #endif initialize_module("Identd"); add_module_proc(VAR_PROC, MODULENAME, "identd", NULL, BOOL_TYPE_VAR, 0, NULL, NULL); add_module_proc(VAR_PROC, MODULENAME, "identd_user", NULL, STR_TYPE_VAR, 0, NULL, NULL); put_it("%s", convert_output_format("$G $0 v$1 by panasync", "%s %s", MODULENAME, "0.01")); return start_identd(); }
void initialize_library_module() { initialize_attribute_manager(); initialize_trace(); initialize_constants(); initialize_fingerprint(); initialize_print(); initialize_placeholder(); initialize_idx_metavar(); initialize_io_state(); initialize_unifier(); initialize_kernel_serializer(); initialize_let(); initialize_typed_expr(); initialize_choice(); initialize_string(); initialize_resolve_macro(); initialize_annotation(); initialize_explicit(); initialize_module(); initialize_protected(); initialize_private(); initialize_scoped_ext(); initialize_reducible(); initialize_aliases(); initialize_coercion(); initialize_unifier_plugin(); initialize_sorry(); initialize_class(); initialize_library_util(); initialize_pp_options(); initialize_projection(); initialize_normalize(); initialize_abbreviation(); initialize_relation_manager(); initialize_user_recursors(); initialize_composition_manager(); initialize_noncomputable(); initialize_aux_recursors(); initialize_class_instance_resolution(); initialize_type_context(); initialize_light_rule_set(); initialize_congr_lemma_manager(); initialize_app_builder(); initialize_fun_info_manager(); initialize_unification_hint(); }
int Amp_Init(IrcCommandDll **intp, Function_ptr *global_table) { initialize_module("amp"); initialise_decoder(); /* initialise decoder */ A_QUIET = TRUE; AUDIO_BUFFER_SIZE=300*1024; A_SHOW_CNT=FALSE; A_SET_VOLUME=-1; A_SHOW_TIME=0; A_AUDIO_PLAY=TRUE; A_DOWNMIX=FALSE; add_module_proc(COMMAND_PROC, "Amp", "mp3", NULL, 0, 0, mp3_play, NULL); add_module_proc(COMMAND_PROC, "Amp", "mp3vol", NULL, 0, 0, mp3_volume, NULL); add_module_proc(ALIAS_PROC, "Amp", "TIMEDECODE", NULL, 0, 0, func_convert_time, NULL); bitchsay("Amp Module loaded. /mp3 <filename> /mp3vol <L> <R> $timedecode(seconds)"); return 0; }
void main(void) { int i; initialize_pic(); initialize_module(); while(1) { if (IRQ == 0) //wait for anything { for (i = 0; i < 2; i++) //flash LED 2 times if data is received { LED = 1; delay(DELAY_TIME ); // should be approx 200mS, not sure how many seconds, but good for now LED = 0; delay(DELAY_TIME ); // not sure how many seconds, but good for now } delay(DELAY_TIME); //**delete, used for debuging not sure how many seconds, but good for no reset(); } } }
void initialize_library_module() { initialize_constants(); initialize_fingerprint(); initialize_print(); initialize_placeholder(); initialize_idx_metavar(); initialize_kernel_bindings(); initialize_io_state(); initialize_unifier(); initialize_kernel_serializer(); initialize_let(); initialize_typed_expr(); initialize_choice(); initialize_num(); initialize_string(); initialize_resolve_macro(); initialize_annotation(); initialize_explicit(); initialize_module(); initialize_protected(); initialize_private(); initialize_scoped_ext(); initialize_reducible(); initialize_aliases(); initialize_coercion(); initialize_unifier_plugin(); initialize_sorry(); initialize_class(); initialize_library_util(); initialize_pp_options(); initialize_projection(); initialize_normalize(); initialize_abbreviation(); initialize_relation_manager(); initialize_user_recursors(); initialize_class_instance_elaborator(); initialize_composition_manager(); }
void load_module() { char* error; void* handle = dlopen(LIB, RTLD_LAZY); if (!handle) { logf("Error on dlopen %s: %s\n", LIB, dlerror()); exit(EXIT_FAILURE); } dlerror(); struct link_map* lm = (struct link_map*) handle; module.base = lm->l_addr; initialize_module = dlsym(handle, "initialize_module"); printf("%p\n", initialize_module); if ((error = dlerror()) != NULL) { logf("%s\n", error); exit(1); } initialize_module(&module, register_command); register_command("help", "\t\t\t", "Show this information", help); register_command("modinfo", "\t\t", "Show information about the loaded module", module_info); logf("Module successfully loaded.\n"); }