type
stringclasses
5 values
content
stringlengths
9
163k
functions
void ADC_Handler(void) {}
functions
void WZTOE_Handler(void) {}
functions
void EXTI_Handler(void) {}
includes
#include <dico.h>
includes
#include <appi18n.h>
includes
#include <wordsplit.h>
includes
#include <errno.h>
includes
#include <security/pam_appl.h>
defines
#define COPY_STRING(s) (s) ? strdup(s) : NULL
defines
#define overwrite_and_free(ptr) \
defines
#define PAM_ERROR if (pamerror != PAM_SUCCESS) break;
structs
struct pam_cred { const char *user; const char *pass; };
functions
int _dico_conv(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr) { int status = PAM_SUCCESS; int i; struct pam_response *reply = NULL; struct pam_cred *cred = appdata_ptr; reply = calloc(num_msg, sizeof(*reply)); if (!reply) return PAM_CONV_ERR...
functions
int db_check_pass(void *handle, const char *pwres, const char *key, const char *pass) { pam_handle_t *pamh; int pamerror; struct pam_cred cred = { key, pass }
functions
int db_get_groups(void *handle, const char *qgr, const char *key, dico_list_t *pgroups) { *pgroups = NULL; return 0; }
functions
int dico_pam_init(int argc, char **argv) { struct dico_option init_option[] = { { DICO_OPTSTR(service), dico_opt_string, &service }
defines
#define __CLEAN_IMPL
defines
#define clean_stmt_while clean_stmt_flow
defines
#define clean_stmt_until clean_stmt_flow
defines
#define clean_stmt_jump clean_dummy
defines
#define clean_stmt_pp clean_dummy
defines
#define clean_stmt_break clean_dummy
defines
#define clean_stmt_continue clean_dummy
defines
#define clean_stmt_retry clean_dummy
functions
void clean_array_sub(Clean *a, Array_Sub b) { if (b->exp) clean_exp(a, b->exp); }
functions
void clean_id_list(Clean *a, ID_List b) { if (b->next) clean_id_list(a, b->next); }
functions
void clean_specialized_list(Clean *a, Specialized_List b) { if (b->traits) clean_id_list(a, b->traits); if (b->next) clean_specialized_list(a, b->next); }
functions
void clean_type_list(Clean *a, Type_List b) { clean_type_decl(a, b->td); if (b->next) clean_type_list(a, b->next); }
functions
void clean_tmpl(Clean *a, Tmpl *b) { if (b->base < 0 && b->list) clean_specialized_list(a, b->list); if (b->call) clean_type_list(a, b->call); }
functions
void clean_range(Clean *a, Range *b) { if (b->start) clean_exp(a, b->start); if (b->end) clean_exp(a, b->end); }
functions
void clean_type_decl(Clean *a, Type_Decl *b) { if (b->array) clean_array_sub(a, b->array); if (b->types) clean_type_list(a, b->types); if (b->next) clean_type_decl(a, b->next); }
functions
void clean_prim(Clean *a, Exp_Primary *b) { if (b->prim_type == ae_prim_hack || b->prim_type == ae_prim_dict || b->prim_type == ae_prim_interp) clean_exp(a, b->d.exp); else if (b->prim_type == ae_prim_array) clean_array_sub(a, b->d.array); else if (b->prim_type == ae_prim_range) clean_range(a, b->d.ra...
functions
void clean_var_decl(Clean *a, Var_Decl b) { if (b->array) clean_array_sub(a, b->array); if (a->scope && b->value && !tflag(b->value->type, tflag_error)) value_remref(b->value, a->gwion); }
functions
void clean_var_decl_list(Clean *a, Var_Decl_List b) { clean_var_decl(a, b->self); if (b->next) clean_var_decl_list(a, b->next); }
functions
void clean_exp_decl(Clean *a, Exp_Decl *b) { if (b->td) clean_type_decl(a, b->td); clean_var_decl_list(a, b->list); }
functions
void clean_exp_binary(Clean *a, Exp_Binary *b) { clean_exp(a, b->lhs); clean_exp(a, b->rhs); }
functions
void clean_exp_unary(Clean *a, Exp_Unary *b) { switch (b->unary_type) { case unary_exp: clean_exp(a, b->exp); break; case unary_td: clean_type_decl(a, b->ctor.td); if(b->ctor.exp) clean_exp(a, b->ctor.exp); break; case unary_code: clean_stmt(a, b->code); break; }
functions
void clean_exp_cast(Clean *a, Exp_Cast *b) { clean_type_decl(a, b->td); clean_exp(a, b->exp); }
functions
void clean_exp_post(Clean *a, Exp_Postfix *b) { clean_exp(a, b->exp); }
functions
void clean_exp_call(Clean *a, Exp_Call *b) { clean_exp(a, b->func); if (b->args) clean_exp(a, b->args); if (b->tmpl) clean_tmpl(a, b->tmpl); }
functions
void clean_exp_array(Clean *a, Exp_Array *b) { clean_exp(a, b->base); clean_array_sub(a, b->array); }
functions
void clean_exp_slice(Clean *a, Exp_Slice *b) { clean_exp(a, b->base); clean_range(a, b->range); }
functions
void clean_exp_if(Clean *a, Exp_If *b) { clean_exp(a, b->cond); if (b->if_exp) clean_exp(a, b->if_exp); clean_exp(a, b->else_exp); }
functions
void clean_exp_dot(Clean *a, Exp_Dot *b) { clean_exp(a, b->base); }
functions
void clean_exp_lambda(Clean *a, Exp_Lambda *b) { clean_func_def(a, b->def); }
functions
void clean_exp_td(Clean *a, Type_Decl **b) { clean_type_decl(a, *b); }
functions
void clean_exp(Clean *a, Exp b) { clean_exp_func[b->exp_type](a, &b->d); if (b->next) clean_exp(a, b->next); }
functions
void clean_stmt_exp(Clean *a, Stmt_Exp b) { if (b->val) clean_exp(a, b->val); }
functions
void clean_stmt_flow(Clean *a, Stmt_Flow b) { ++a->scope; clean_exp(a, b->cond); clean_stmt(a, b->body); --a->scope; }
functions
void clean_stmt_for(Clean *a, Stmt_For b) { ++a->scope; clean_stmt(a, b->c1); if (b->c2) clean_stmt(a, b->c2); if (b->c3) clean_exp(a, b->c3); clean_stmt(a, b->body); --a->scope; }
functions
void clean_idx(Clean *a, struct EachIdx_ *b) { if (b->v) value_remref(b->v, a->gwion); }
functions
void clean_stmt_each(Clean *a, Stmt_Each b) { ++a->scope; clean_exp(a, b->exp); clean_stmt(a, b->body); // if (b->v) value_remref(b->v, a->gwion); if (b->v) mp_free(a->gwion->mp, Value, b->v); if (b->idx) clean_idx(a, b->idx); --a->scope; }
functions
void clean_stmt_loop(Clean *a, Stmt_Loop b) { ++a->scope; clean_exp(a, b->cond); clean_stmt(a, b->body); --a->scope; }
functions
void clean_stmt_if(Clean *a, Stmt_If b) { ++a->scope; clean_exp(a, b->cond); clean_stmt(a, b->if_body); if (b->else_body) clean_stmt(a, b->else_body); --a->scope; }
functions
void clean_stmt_code(Clean *a, Stmt_Code b) { ++a->scope; if (b->stmt_list) clean_stmt_list(a, b->stmt_list); --a->scope; }
functions
void clean_stmt_varloop(Clean *a, Stmt_VarLoop b) { ++a->scope; clean_exp(a, b->exp); clean_stmt(a, b->body); --a->scope; }
functions
void clean_stmt_return(Clean *a, Stmt_Exp b) { if (b->val) clean_exp(a, b->val); }
functions
void clean_case_list(Clean *a, Stmt_List b) { clean_stmt_case(a, &b->stmt->d.stmt_match); if (b->next) clean_case_list(a, b->next); }
functions
void clean_handler_list(Clean *a, Handler_List b) { ++a->scope; clean_stmt(a, b->stmt); --a->scope; if (b->next) clean_handler_list(a, b->next); }
functions
void clean_stmt_try(Clean *a, Stmt_Try b) { ++a->scope; clean_stmt(a, b->stmt); --a->scope; clean_handler_list(a, b->handler); }
functions
void clean_stmt_match(Clean *a, Stmt_Match b) { ++a->scope; clean_exp(a, b->cond); clean_case_list(a, b->list); if (b->where) clean_stmt(a, b->where); --a->scope; }
functions
void clean_stmt_case(Clean *a, Stmt_Match b) { ++a->scope; clean_exp(a, b->cond); clean_stmt_list(a, b->list); if (b->when) clean_exp(a, b->when); --a->scope; }
functions
void clean_stmt_defer(Clean *a, Stmt_Defer b) { clean_stmt(a, b->stmt); }
functions
void clean_dummy(Clean *a NUSED, void *b NUSED) {}
functions
void clean_stmt(Clean *a, Stmt b) { clean_stmt_func[b->stmt_type](a, &b->d); }
functions
void clean_arg_list(Clean *a, Arg_List b) { if (b->td) clean_type_decl(a, b->td); clean_var_decl(a, b->var_decl); if (b->next) clean_arg_list(a, b->next); }
functions
void clean_stmt_list(Clean *a, Stmt_List b) { clean_stmt(a, b->stmt); if (b->next) clean_stmt_list(a, b->next); }
functions
void clean_func_base(Clean *a, Func_Base *b) { if (b->td) clean_type_decl(a, b->td); if (b->args) clean_arg_list(a, b->args); if (b->tmpl) clean_tmpl(a, b->tmpl); }
functions
void clean_func_def(Clean *a, Func_Def b) { clean_func_base(a, b->base); ++a->scope; if (!b->builtin && b->d.code && !(b->base->func && safe_vflag(b->base->func->value_ref, vflag_builtin))) clean_stmt(a, b->d.code); else b->d.code = NULL; --a->scope; }
functions
void func_def_cleaner(const Gwion gwion, Func_Def b) { Clean a = {.gwion = gwion}
functions
void clean_extend_def(Clean *a, Extend_Def b) { clean_type_decl(a, b->td); clean_ast(a, b->body); }
functions
void clean_class_def(Clean *a, Class_Def b) { clean_type_def(a, &b->base); if (b->traits) clean_id_list(a, b->traits); if (b->body) clean_ast(a, b->body); }
functions
void class_def_cleaner(const Gwion gwion, Class_Def b) { Clean a = {.gwion = gwion}
functions
void clean_enum_def(Clean *a, Enum_Def b) { clean_id_list(a, b->list); if (b->values.ptr) vector_release(&b->values); }
functions
void clean_union_list(Clean *a, Union_List b) { clean_type_decl(a, b->td); if (b->next) clean_union_list(a, b->next); }
functions
void clean_union_def(Clean *a, Union_Def b) { clean_union_list(a, b->l); if (b->tmpl) clean_tmpl(a, b->tmpl); }
functions
void clean_fptr_def(Clean *a, Fptr_Def b) { clean_func_base(a, b->base); if (b->type) type_remref(b->type, a->gwion); }
functions
void clean_type_def(Clean *a, Type_Def b) { if (b->ext) clean_type_decl(a, b->ext); if (b->when) { clean_exp(a, b->when); if (b->when_def) clean_func_def(a, b->when_def); }
functions
void clean_trait_def(Clean *a, Trait_Def b) { if (b->traits) clean_id_list(a, b->traits); if (b->body) clean_ast(a, b->body); }
functions
void clean_section(Clean *a, Section *b) { clean_section_func[b->section_type](a, *(void **)&b->d); }
functions
void clean_ast(Clean *a, Ast b) { clean_section(a, b->section); if (b->next) clean_ast(a, b->next); }
functions
void ast_cleaner(const Gwion gwion, Ast b) { Clean a = {.gwion = gwion}
defines
#define __4CFILE__ "visTest.c"
defines
#define VL_TEST_BROWSE
functions
void osTraceLevel(VIS_UINT uLevel) { VIS_UINT u; for (u = 0; u < uLevel; u++) { OS_FPRINTF(os_stdout, " "); }
functions
void BrowseWholeProject(VIS_UINT uLevel, VIS_CHAR *szParent) { VIS_UINT uRes; VIS_UINT uCount; VIS_UINT uDBIVar = 0; VIS_DATA *pDBIVar = NULL; VIS_CHAR szType[1000]; uDBIVar = g_uDBIVar; pDBIVar = g_pDBIVar; uRes = visGetChildren(&pDBIVar, &uDBIVar, FALSE); if (uRes != OK) { uDBIVar = 0...
functions
void TestFWDownload(void) { IEC_UINT uRes = OK; IEC_UINT uResult = 0; IEC_UDINT ulLen; IEC_DATA p[100000]; IEC_DATA x[100100]; /* 1 */ FILE *f = fopen("D:\\FWDown\\Firmware1.img", "rb"); if (f == NULL) { return; }
functions
void TestLic(void) { IEC_UINT uRes = OK; IEC_CHAR szLic[100]; IEC_CHAR *szBuffer; IEC_UINT uLen; IEC_UDINT ulSN; IEC_UINT uAvail; IEC_UINT uLic; IEC_DATA *pKeyEx = NULL; uRes = visGetTargetType(&szBuffer, &uLen); if (uRes == OK) { OS_FPRINTF(os_stdout, "visGetTargetType: %s\r\n",...
main
int main (int argc, char *argv[]) { VIS_UINT uRes; OS_FPRINTF(os_stdout, "\r\nATCMControl VisuComm Library " RTS_MAIN_VERSION" ("RTS_FULL_VERSION")\r\n", PRODUCT_BUILD); if (argc < 3) { uRes = visInitialize("172.17.3.139", VIS_PORT_SCAN); }
includes
#include <config.h>
includes
#include <stdlib.h>
includes
#include <stdio.h>
includes
#include <string.h>
includes
#include <unistd.h>
includes
#include <pwd.h>
includes
#include <glib.h>
includes
#include <config.h>
includes
#include <stdlib.h>
includes
#include <stdio.h>
includes
#include <string.h>