id
stringlengths
21
132
codebase
stringclasses
57 values
c_file
stringlengths
3
108
function
stringlengths
3
74
sloc
stringclasses
134 values
c_code
stringlengths
25
52.1k
c_constructs
dict
bc-1.07.1#dc_prep#main.c
bc-1.07.1
dc.c
main
54
int main ( int argc , char **argv ) { static struct option const long_opts[] = { {"expression", 1, ((void *)0), 'e'}, {"file", 1, ((void *)0), 'f'}, {"help", 0, ((void *)0), 'h'}, {"version", 0, ((void *)0), 'V'}, {((void *)0), 0, ((void *)0), 0} }; int did_eval = 0; int c; progname = r1bindex(*argv, '/'); dc_math_init(); dc_string_init(); dc_register_init(); dc_array_init(); while ((c = getopt_long(argc, argv, "hVe:f:", long_opts, (int *)0)) != (-1)) { switch (c) { case 'e': { dc_data string = dc_makestring(optarg, strlen(optarg)); if (dc_evalstr(&string) != 0) return flush_okay(); dc_free_str(&string.v.string); did_eval = 1; } break; case 'f': try_file(optarg); did_eval = 1; break; case 'h': usage(stdout); return flush_okay(); case 'V': show_version(); return flush_okay(); default: usage(stderr); return 1; } } for (; optind < argc; ++optind) { try_file(argv[optind]); did_eval = 1; } if (did_eval == 0) { if (dc_evalfile(stdin) != 0) return 1; } return flush_okay(); }
{ "array_type": 1, "break_continue_statement": 2, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 6, "struct_type": 0, "switch_statement": 1, "type_casting": 6, "union_type": 0, "while_loop": 1 }
json-c#json_object_prep#json_object_array_get_idx.c
json-c
json_object.c
json_object_array_get_idx
5
struct json_object *json_object_array_get_idx(const struct json_object *jso, size_t idx) { ((void) sizeof ((json_object_get_type(jso) == json_type_array) ? 1 : 0), __extension__ ({ if (json_object_get_type(jso) == json_type_array) ; else __assert_fail ("json_object_get_type(jso) == json_type_array", "/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/json-c/json_object.c", 1543, __extension__ __PRETTY_FUNCTION__); })); return (struct json_object *)array_list_get_idx(JC_ARRAY_C(jso)->c_array, idx); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
json.h#allow_json5_prep#json_value_as_number.c
json.h
allow_json5.c
json_value_as_number
6
struct json_number_s *json_value_as_number(struct json_value_s *const value) { if (value->type != json_type_number) { return 0; } return (struct json_number_s *)value->payload; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS_prep#cmpfunc.c
transcoder-set
SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS.c
cmpfunc
1
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
bzip2#bzlib_prep#BZ2_bzWriteClose.c
bzip2
bzlib.c
BZ2_bzWriteClose
10
void BZ2_bzWriteClose ( int* bzerror, BZFILE* b, int abandon, unsigned int* nbytes_in, unsigned int* nbytes_out ) { BZ2_bzWriteClose64 ( bzerror, b, abandon, nbytes_in, ((void *)0), nbytes_out, ((void *)0) ); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tmux#mode-tree_prep#mode_tree_free.c
tmux
mode-tree.c
mode_tree_free
14
void mode_tree_free(struct mode_tree_data *mtd) { struct window_pane *wp = mtd->wp; if (mtd->zoomed == 0) server_unzoom_window(wp->window); mode_tree_free_items(&mtd->children); mode_tree_clear_lines(mtd); screen_free(&mtd->screen); free(mtd->search); free(mtd->filter); mtd->dead = 1; mode_tree_remove_ref(mtd); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 2, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 2, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
mcsim-6.2.0#modo_prep#VerifyEqns.c
mcsim-6.2.0
modo.c
VerifyEqns
8
void VerifyEqns (PVMMAPSTRCT pvmGlo, PVMMAPSTRCT pvmDyn) { BOOL bStatesOK; bStatesOK = (vnStates == ForAllVar(((void *)0), pvmGlo, &AssertExistsEqn, 0x10000, (PVOID) pvmDyn)); if (!bStatesOK) ReportError(((void *)0), 0x8000, ((void *)0), "State equations missing.\n"); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#nist-keywrap_prep#nettle_aes256_keyunwrap.c
nettle-3.9.1
nist-keywrap.c
nettle_aes256_keyunwrap
8
int nettle_aes256_keyunwrap (struct aes256_ctx *ctx, const uint8_t *iv, size_t cleartext_length, uint8_t *cleartext, const uint8_t *ciphertext) { return nettle_nist_keyunwrap16 (ctx, (nettle_cipher_func *) & nettle_aes256_decrypt, iv, cleartext_length, cleartext, ciphertext); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
dap-3.10#dap1_prep#table.c
dap-3.10
dap1.c
table
169
void table(char *fname, char *rowvars, char *colvars, char *format, char *marks) { static int tabinit = 0; static char *prevmem; static char **prev; int r; int s; int c; int v; static int *markv; int nmark; int more; static char *nstring; if (!tabinit) { tabinit = 1; valsetmem = (int *) dap_malloc(dap_maxrows * dap_maxcols * sizeof(int), ""); valset = (int **) dap_malloc(dap_maxrows * sizeof(int *), ""); for (r = 0; r < dap_maxrows; r++) valset[r] = valsetmem + dap_maxcols * r; tabvalmem = (double *) dap_malloc(dap_maxrows * dap_maxcols * sizeof(double), ""); tableval = (double **) dap_malloc(dap_maxrows * sizeof(double *), ""); for (r = 0; r < dap_maxrows; r++) tableval[r] = tabvalmem + dap_maxcols * r; collabel = (labnode *) dap_malloc(dap_maxclab * sizeof(labnode), ""); for (c = 0; c < dap_maxclab; c++) collabel[c].lab = dap_malloc(dap_lablen + 1, ""); rowvar = (int *) dap_malloc(sizeof(int) * dap_maxvar, ""); colvar = (int *) dap_malloc(sizeof(int) * dap_maxvar, ""); rlabmem = dap_malloc(dap_maxrows * dap_maxrowv * (dap_lablen + 1), ""); rlptrmem = (char **) dap_malloc(sizeof(char *) * dap_maxrows * dap_maxrowv, ""); rowlabel = (char ***) dap_malloc(sizeof(char **) * dap_maxrows, ""); for (r = 0; r < dap_maxrows; r++) { rowlabel[r] = rlptrmem + r * dap_maxrowv; for (v = 0; v < dap_maxrowv; v++) rowlabel[r][v] = rlabmem + r * (dap_maxrowv * (dap_lablen + 1)) + v * (dap_lablen + 1); } prevmem = dap_malloc(dap_maxrowv * (dap_lablen + 1), ""); prev = (char **) dap_malloc(sizeof(char *) * dap_maxrowv, ""); for (v = 0; v < dap_maxrowv; v++) prev[v] = prevmem + v * (dap_lablen + 1); markv = (int *) dap_malloc(sizeof(int) * dap_maxvar, ""); nstring = dap_malloc(dap_strlen + 1, "dap_strlen"); } if (!fname) { fputs("(table) no dataset name given\n", dap_err); exit(1); } inset(fname); tabform[0] = '\0'; rtitlesp = 8; if (!rowvars || !colvars) { fputs("(table) no row and/or column variables specified\n", dap_err); exit(1); } if (!format) { fputs("(table) no format given\n", dap_err); exit(1); } specparse(rowvars, colvars, format); nmark = dap_list(marks, markv, dap_maxvar); nextclab = 0; labroot = -1; ncols = 0; for (r = 0; r < nrowvar; r++) { prev[r][0] = '\0'; if (dap_obs[0].do_len[rowvar[r]] <= 0) { if (dap_obs[0].do_str[rowvar[r]]) dap_free(dap_obs[0].do_str[rowvar[r]], ""); dap_obs[0].do_str[rowvar[r]] = dap_malloc(rtitlesp + 1, ""); } } for (c = 0; c < ncolvar - 1; c++) { if (dap_obs[0].do_len[colvar[c]] <= 0) { if (dap_obs[0].do_str[colvar[c]]) dap_free(dap_obs[0].do_str[colvar[c]], ""); dap_obs[0].do_str[colvar[c]] = dap_malloc(rtitlesp + 1, ""); } } for (r = 0; r < dap_maxrows; r++) for (c = 0; c < dap_maxcols; c++) valset[r][c] = 0; for (nrows = -1, more = 1; more; ) { more = step(); if (dap_newpart(markv, nmark)) { dap_swap(); dap_head(markv, nmark); tablehead(); tableprint(); dap_swap(); nextclab = 0; labroot = -1; ncols = 0; for (r = 0; r < nrowvar; r++) prev[r][0] = '\0'; for (r = 0; r < dap_maxrows; r++) for (c = 0; c < dap_maxcols; c++) valset[r][c] = 0; nrows = -1; } for (r = 0; r < nrowvar; r++) { if (dap_obs[0].do_len[rowvar[r]] == 0) { sprintf(nstring, "%d", dap_obs[0].do_int[rowvar[r]]); strncpy(dap_obs[0].do_str[rowvar[r]], nstring, rtitlesp); dap_obs[0].do_str[rowvar[r]][rtitlesp] = '\0'; } else if (dap_obs[0].do_len[rowvar[r]] == (-1)) { sprintf(nstring, "%g", dap_obs[0].do_dbl[rowvar[r]]); strncpy(dap_obs[0].do_str[rowvar[r]], nstring, rtitlesp); dap_obs[0].do_str[rowvar[r]][rtitlesp] = '\0'; } } for (r = 0; r < nrowvar; r++) { if (strcmp(dap_obs[0].do_str[rowvar[r]], prev[r])) break; } if (r < nrowvar) { nrows++; for (s = 0; s < r; s++) rowlabel[nrows][s][0] = '\0'; for ( ; r < nrowvar; r++) { strcpy(prev[r], dap_obs[0].do_str[rowvar[r]]); strcpy(rowlabel[nrows][r], dap_obs[0].do_str[rowvar[r]]); } } if (nrows < 0) { fputs("(table) No rows.\n", dap_err); exit(1); } for (c = 0; c < ncolvar - 1; c++) { if (dap_obs[0].do_len[colvar[c]] == 0) { sprintf(nstring, "%d", dap_obs[0].do_int[colvar[c]]); strncpy(dap_obs[0].do_str[colvar[c]], nstring, rtitlesp); dap_obs[0].do_str[colvar[c]][rtitlesp] = '\0'; } else if (dap_obs[0].do_len[colvar[c]] == (-1)) { sprintf(nstring, "%g", dap_obs[0].do_dbl[colvar[c]]); strncpy(dap_obs[0].do_str[colvar[c]], nstring, rtitlesp); dap_obs[0].do_str[colvar[c]][rtitlesp] = '\0'; } } c = findcol(); tableval[nrows][c] = dap_obs[0].do_dbl[colvar[ncolvar - 1]]; valset[nrows][c] = 1; } }
{ "array_type": 9, "break_continue_statement": 1, "enum_type": 0, "for_loop": 19, "function_pointer": 0, "goto_statement": 0, "if_statement": 16, "memory_management": 0, "memory_operation": 0, "pointer_type": 4, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 9, "union_type": 0, "while_loop": 0 }
transcoder-set#K_TH_DIGIT_RAISED_POWER_B_prep#sort.c
transcoder-set
K_TH_DIGIT_RAISED_POWER_B.c
sort
1
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#FIND_A_ROTATION_WITH_MAXIMUM_HAMMING_DISTANCE_prep#min.c
transcoder-set
FIND_A_ROTATION_WITH_MAXIMUM_HAMMING_DISTANCE.c
min
1
int min(int x, int y) { return (x < y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
screen-4.9.0#misc_prep#SaveStr.c
screen-4.9.0
misc.c
SaveStr
11
char * SaveStr(str) register const char *str; { register char *cp; if ((cp = malloc(strlen(str) + 1)) == ((void *)0)) Panic(0, "%s", strnomem); else strcpy(cp, str); return cp; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libosip2-5.3.1#nict_fsm_prep#osip_nict_timeout_k_event.c
libosip2-5.3.1
nict_fsm.c
osip_nict_timeout_k_event
6
void osip_nict_timeout_k_event(osip_transaction_t *nict, osip_event_t *evt) { nict->nict_context->timer_k_length = -1; nict->nict_context->timer_k_start.tv_sec = -1; __osip_transaction_set_state(nict, NICT_TERMINATED); __osip_kill_transaction_callback(OSIP_NICT_KILL_TRANSACTION, nict); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#LONGEST_COMMON_SUBSTRING_SPACE_OPTIMIZED_DP_SOLUTION_prep#main.c
transcoder-set
LONGEST_COMMON_SUBSTRING_SPACE_OPTIMIZED_DP_SOLUTION.c
main
15
int main(void) { int n_success = 0; char param0[][100] = {"GeeksforGeeks","333940","1000","Facebook","2684247","111","abcdxyz","625330958530","01011000001111","KXm"}; char param1[][100] = {"GeeksQuiz","390","0","nice book","1","10","xyzabcd","412511","1001010001","gF"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } break; } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "array_type": 2, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#types_prep#libxml_intWrap.c
libxml2
types.c
libxml_intWrap
7
PyObject * libxml_intWrap(int val) { PyObject *ret; ret = PyLong_FromLong((long) val); return (ret); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tulipindicators-0.9.1#decay_prep#ti_decay_start.c
tulipindicators-0.9.1
decay.c
ti_decay_start
4
int ti_decay_start(double const *options) { (void)options; return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tar-1.34#names_prep#name_add_name.c
tar-1.34
names.c
name_add_name
18
void name_add_name (const char *name) { struct name_elt *ep = name_elt_alloc (); ep->type = NELT_NAME; ep->v.name = name; switch (filename_args) { case FILES_NONE: filename_args = FILES_ONE; break; case FILES_ONE: filename_args = FILES_MANY; break; default: break; } }
{ "array_type": 0, "break_continue_statement": 3, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 1, "switch_statement": 1, "type_casting": 0, "union_type": 0, "while_loop": 0 }
heman#lighting_prep#heman_lighting_set_occlusion_scale.c
heman
lighting.c
heman_lighting_set_occlusion_scale
4
void heman_lighting_set_occlusion_scale(float s) { _occlusion_scale = s; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY_1_prep#main.c
transcoder-set
COUNT_INVERSIONS_OF_SIZE_THREE_IN_A_GIVE_ARRAY_1.c
main
25
int main(void) { int n_success = 0; int param0_0[] = {4,75,89}; int param0_1[] = {84,-66,-52,34,-28,-6,20,22,-78,-26,14,24,-92,-18,32,-94,-64,-38,56,4,-10,58,-66,-58,-10,-8,-62,-60,-26}; int param0_2[] = {0,0,0,1,1,1,1,1}; int param0_3[] = {18,7,43,57,94,37,38,41,59,64,97,29,51,37,64,91,42,83,13,22,68}; int param0_4[] = {-94,-86,-84,-84,-82,-66,-62,-58,-52,-48,-44,-40,-38,-32,-22,-22,-22,-14,-8,-6,-6,0,2,20,20,26,32,32,52,56,66,74,76,80,80,86,88,94}; int param0_5[] = {0,1,1,0,0,0,0,0,1,0,0}; int param0_6[] = {4,8,15,19,24,31,33,36,38,45,45,52,54,65,73,75,83,84,90,92,93}; int param0_7[] = {80,-30,-44,76,-96,2,22,-30,36,-6,88,-60,-90,-52,78,90,-52}; int param0_8[] = {0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_9[] = {74,71,28,45,14,31,17,10,82,27,45,73,93,87,57,58}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {1,26,7,17,34,9,19,10,7,10}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } break; } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "array_type": 2, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
patch-2.7.6#dup-safer-flag_prep#dup_safer_flag.c
patch-2.7.6
dup-safer-flag.c
dup_safer_flag
6
int dup_safer_flag (int fd, int flag) { return rpl_fcntl (fd, (flag & 02000000) ? 1030 : 0, 2 + 1); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#nist-keywrap_prep#nettle_aes128_keyunwrap.c
nettle-3.9.1
nist-keywrap.c
nettle_aes128_keyunwrap
8
int nettle_aes128_keyunwrap (struct aes128_ctx *ctx, const uint8_t *iv, size_t cleartext_length, uint8_t *cleartext, const uint8_t *ciphertext) { return nettle_nist_keyunwrap16 (ctx, (nettle_cipher_func *) & nettle_aes128_decrypt, iv, cleartext_length, cleartext, ciphertext); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#MINIMUM_SUM_PRODUCT_TWO_ARRAYS_prep#len.c
transcoder-set
MINIMUM_SUM_PRODUCT_TWO_ARRAYS.c
len
1
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
optipng-0.7.8#pngwrite_prep#png_create_write_struct.c
optipng-0.7.8
pngwrite.c
png_create_write_struct
17
__attribute__((__malloc__)) png_structp png_create_write_struct (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn) { png_structrp png_ptr = png_create_png_struct(user_png_ver, error_ptr, error_fn, warn_fn, ((void *)0), ((void *)0), ((void *)0)); if (png_ptr != ((void *)0)) { png_ptr->zbuffer_size = 8192; png_ptr->zlib_strategy = 1; png_ptr->zlib_level = (-1); png_ptr->zlib_mem_level = 8; png_ptr->zlib_window_bits = 15; png_ptr->zlib_method = 8; png_ptr->flags |= 0x200000U; png_set_write_fn(png_ptr, ((void *)0), ((void *)0), ((void *)0)); } return png_ptr; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
gawk-5.2.2#dfa_prep#xpalloc.c
gawk-5.2.2
dfa.c
xpalloc
31
void * xpalloc (void *pa, idx_t *nitems, idx_t nitems_incr_min, ptrdiff_t nitems_max, idx_t item_size) { idx_t n0 = *nitems; enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 }; idx_t n, nbytes; if (__builtin_add_overflow (n0, n0 >> 1, &n)) n = (9223372036854775807L); if (0 <= nitems_max && nitems_max < n) n = nitems_max; idx_t adjusted_nbytes = ((__builtin_mul_overflow (n, item_size, &nbytes) || (18446744073709551615UL) < nbytes) ? (((9223372036854775807L)) < ((18446744073709551615UL)) ? ((9223372036854775807L)) : ((18446744073709551615UL))) : nbytes < DEFAULT_MXFAST ? DEFAULT_MXFAST : 0); if (adjusted_nbytes) { n = adjusted_nbytes / item_size; nbytes = adjusted_nbytes - adjusted_nbytes % item_size; } if (! pa) *nitems = 0; if (n - n0 < nitems_incr_min && (__builtin_add_overflow (n0, nitems_incr_min, &n) || (0 <= nitems_max && nitems_max < n) || __builtin_mul_overflow (n, item_size, &nbytes))) xalloc_die (); pa = xrealloc (pa, nbytes); *nitems = n; return pa; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tmux#control_prep#control_write_buffer.c
tmux
control.c
control_write_buffer
7
void control_write_buffer(struct client *c, struct evbuffer *buffer) { evbuffer_add_buffer(c->stdout_data, buffer); evbuffer_add(c->stdout_data, "\n", 1); server_client_push_stdout(c); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
cpio-2.14#util_prep#delay_set_stat.c
cpio-2.14
util.c
delay_set_stat
9
void delay_set_stat (char const *file_name, struct stat *st, mode_t invert_permissions) { struct cpio_file_stat fs; stat_to_cpio (&fs, st); fs.c_name = (char*) file_name; delay_cpio_set_stat (&fs, invert_permissions); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
dap-3.10#dap0_prep#extractWords.c
dap-3.10
dap0.c
extractWords
40
CharList extractWords(char * buffer, long size,char *delimiter) { char * bufferWord= (char*) malloc (sizeof(char)*size+1); memset (bufferWord,'\0',size+1); CharList list; list.word=((void *)0); list.next=((void *)0); CharList *current=&list; long i=0l; long sSize=0l; long sIndex=0l; for(i=0l;i<size;i++) { if (buffer[i]=='\r' || buffer[i]=='\t') continue; if (buffer[i]==delimiter[0]) { current->word= (char*) malloc (sizeof(char)*sIndex+5); strcpy(current->word,bufferWord); current->next= (char*) malloc (sizeof(CharList)); current=current->next; sSize=sIndex; sIndex=0; memset (bufferWord,'\0',size+1); } else { bufferWord[sIndex]=buffer[i]; sIndex++; } } if (sIndex>0) { current->word= (char*) malloc ((sizeof(char)*strlen(bufferWord))+1); strcpy(current->word,bufferWord); current->next= ((void *)0); } free(bufferWord); return list; }
{ "array_type": 3, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 5, "memory_operation": 2, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 7, "union_type": 0, "while_loop": 0 }
gawk-5.2.2#mpfr_prep#do_mpfr_rand.c
gawk-5.2.2
mpfr.c
do_mpfr_rand
18
NODE * do_mpfr_rand(int nargs __attribute__ ((__unused__))) { NODE *res; int tval; check_exact_args(nargs, "rand", 0); if (firstrand) { __gmp_randinit_mt(state); __gmpz_init(seed); __gmpz_set_ui(seed, 1); __gmp_randseed(state, seed); firstrand = 0; } res = mpg_node(MPFN); tval = mpfr_urandomb(res->sub.val.nm.mpnum, state); (void) (do_ieee_fmt && format_ieee(res->sub.val.nm.mpnum, tval)); return res; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tar-1.34#wordsplit_prep#wordsplit_get_words.c
tar-1.34
wordsplit.c
wordsplit_get_words
14
int wordsplit_get_words (struct wordsplit *ws, size_t *wordc, char ***wordv) { char **p = realloc (ws->ws_wordv, (ws->ws_wordc + 1) * sizeof (ws->ws_wordv[0])); if (!p) return -1; *wordv = p; *wordc = ws->ws_wordc; ws->ws_wordv = ((void *)0); ws->ws_wordc = 0; ws->ws_wordn = 0; return 0; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#SUM_SERIES_ALTERNATE_SIGNED_SQUARES_AP_prep#max.c
transcoder-set
SUM_SERIES_ALTERNATE_SIGNED_SQUARES_AP.c
max
1
int max(int x, int y) { return (x > y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#BINARY_SEARCH_prep#sort.c
transcoder-set
BINARY_SEARCH.c
sort
1
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#FIND_MAXIMUM_DOT_PRODUCT_TWO_ARRAYS_INSERTION_0S_prep#f_filled.c
transcoder-set
FIND_MAXIMUM_DOT_PRODUCT_TWO_ARRAYS_INSERTION_0S.c
f_filled
1
long long int f_filled ( int A [ ], int B [ ], int m, int n ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
bc-1.07.1#number_prep#bc_is_neg.c
bc-1.07.1
number.c
bc_is_neg
5
char bc_is_neg (bc_num num) { return num->n_sign == MINUS; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libosip2-5.3.1#sdp_accessor_prep#sdp_message_k_keydata_get.c
libosip2-5.3.1
sdp_accessor.c
sdp_message_k_keydata_get
16
char *sdp_message_k_keydata_get(sdp_message_t *sdp, int pos_media) { sdp_media_t *med; if (sdp == ((void *)0)) return ((void *)0); if (pos_media == -1) { if (sdp->k_key == ((void *)0)) return ((void *)0); return sdp->k_key->k_keydata; } if ((pos_media != -1) && (osip_list_size(&sdp->m_medias) < pos_media + 1)) return ((void *)0); med = (sdp_media_t *) osip_list_get(&sdp->m_medias, pos_media); if (med->k_key == ((void *)0)) return ((void *)0); return med->k_key->k_keydata; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 6, "struct_type": 0, "switch_statement": 0, "type_casting": 7, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#misc_prep#werror.c
nettle-3.9.1
misc.c
werror
8
void werror(const char *format, ...) { va_list args; __builtin_va_start(args,format); vfprintf(stderr, format, args); __builtin_va_end(args); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
make-4.4.1#loadapi_prep#gmk_add_function.c
make-4.4.1
loadapi.c
gmk_add_function
6
void gmk_add_function (const char *name, gmk_func_ptr func, unsigned int min, unsigned int max, unsigned int flags) { define_new_function (reading_file, name, min, max, flags, func); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
json.h#allow_leading_or_trailing_decimal_point_prep#json_parse_ex.c
json.h
allow_leading_or_trailing_decimal_point.c
json_parse_ex
81
struct json_value_s * json_parse_ex(const void *src, size_t src_size, size_t flags_bitset, void *(*alloc_func_ptr)(void *user_data, size_t size), void *user_data, struct json_parse_result_s *result) { struct json_parse_state_s state; void *allocation; struct json_value_s *value; size_t total_size; int input_error; if (result) { result->error = json_parse_error_none; result->error_offset = 0; result->error_line_no = 0; result->error_row_no = 0; } if (0 == src) { return 0; } state.src = (const char *)src; state.size = src_size; state.offset = 0; state.line_no = 1; state.line_offset = 0; state.error = json_parse_error_none; state.dom_size = 0; state.data_size = 0; state.flags_bitset = flags_bitset; input_error = json_get_value_size( &state, (int)(json_parse_flags_allow_global_object & state.flags_bitset)); if (0 == input_error) { json_skip_all_skippables(&state); if (state.offset != state.size) { state.error = json_parse_error_unexpected_trailing_characters; input_error = 1; } } if (input_error) { if (result) { result->error = state.error; result->error_offset = state.offset; result->error_line_no = state.line_no; result->error_row_no = state.offset - state.line_offset; } return 0; } total_size = state.dom_size + state.data_size; if (0 == alloc_func_ptr) { allocation = malloc(total_size); } else { allocation = alloc_func_ptr(user_data, total_size); } if (0 == allocation) { if (result) { result->error = json_parse_error_allocator_failed; result->error_offset = 0; result->error_line_no = 0; result->error_row_no = 0; } return 0; } state.offset = 0; state.line_no = 1; state.line_offset = 0; state.dom = (char *)allocation; state.data = state.dom + state.dom_size; if (json_parse_flags_allow_location_information & state.flags_bitset) { struct json_value_ex_s *value_ex = (struct json_value_ex_s *)state.dom; state.dom += sizeof(struct json_value_ex_s); value_ex->offset = state.offset; value_ex->line_no = state.line_no; value_ex->row_no = state.offset - state.line_offset; value = &(value_ex->value); } else { value = (struct json_value_s *)state.dom; state.dom += sizeof(struct json_value_s); } json_parse_value( &state, (int)(json_parse_flags_allow_global_object & state.flags_bitset), value); return (struct json_value_s *)allocation; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 1, "goto_statement": 0, "if_statement": 10, "memory_management": 1, "memory_operation": 0, "pointer_type": 3, "return_statement": 4, "struct_type": 3, "switch_statement": 0, "type_casting": 8, "union_type": 0, "while_loop": 0 }
screen-4.9.0#fileio_prep#secopen.c
screen-4.9.0
fileio.c
secopen
12
int secopen(char *name, int flags, int mode) { int fd; do {} while (0); xseteuid(real_uid); xsetegid(real_gid); fd = open(name, flags, mode); xseteuid(eff_uid); xsetegid(eff_gid); return fd; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
transcoder-set#SIZE_SUBARRAY_MAXIMUM_SUM_prep#len.c
transcoder-set
SIZE_SUBARRAY_MAXIMUM_SUM.c
len
1
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tmux#window_prep#winlink_stack_remove.c
tmux
window.c
winlink_stack_remove
13
void winlink_stack_remove(struct winlink_stack *stack, struct winlink *wl) { struct winlink *wl2; if (wl == ((void *)0)) return; for((wl2) = ((stack)->tqh_first); (wl2) != ((void *)0); (wl2) = ((wl2)->sentry.tqe_next)) { if (wl2 == wl) { do { if (((wl)->sentry.tqe_next) != ((void *)0)) (wl)->sentry.tqe_next->sentry.tqe_prev = (wl)->sentry.tqe_prev; else (stack)->tqh_last = (wl)->sentry.tqe_prev; *(wl)->sentry.tqe_prev = (wl)->sentry.tqe_next; ; ; } while (0); return; } } }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 2, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 1 }
patch-2.7.6#quotearg_prep#quote_n_mem.c
patch-2.7.6
quotearg.c
quote_n_mem
5
char const * quote_n_mem (int n, char const *arg, size_t argsize) { return quotearg_n_options (n, arg, argsize, &quote_quoting_options); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
less-633#position_prep#sindex_from_sline.c
less-633
position.c
sindex_from_sline
10
int sindex_from_sline(int sline) { if (sline < 0) sline += sc_height; if (sline <= 0) sline = 1; if (sline > sc_height) sline = sc_height; return (sline-1); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tar-1.34#paxerror_prep#chdir_fatal.c
tar-1.34
paxerror.c
chdir_fatal
5
void chdir_fatal (char const *name) { call_arg_fatal ("chdir", name); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#NON_REPEATING_ELEMENT_prep#min.c
transcoder-set
NON_REPEATING_ELEMENT.c
min
1
int min(int x, int y) { return (x < y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
grep-3.11#kwset_prep#kwsincr.c
grep-3.11
kwset.c
kwsincr
117
void kwsincr (kwset_t kwset, char const *text, idx_t len) { ((0 <= len) ? (void) 0 : __builtin_unreachable ()); struct trie *trie = kwset->trie; char const *trans = kwset->trans; _Bool reverse = kwset->kwsexec == bmexec; if (reverse) text += len; while (len--) { unsigned char uc = reverse ? *--text : *text++; unsigned char label = trans ? trans[uc] : uc; struct tree *cur = trie->links; struct tree *links[DEPTH_SIZE]; enum { L, R } dirs[DEPTH_SIZE]; links[0] = (struct tree *) &trie->links; dirs[0] = L; idx_t depth = 1; while (cur && label != cur->label) { links[depth] = cur; if (label < cur->label) dirs[depth++] = L, cur = cur->llink; else dirs[depth++] = R, cur = cur->rlink; } if (!cur) { cur = __extension__ ({ struct obstack *__h = (&kwset->obstack); __extension__ ({ struct obstack *__o = (__h); size_t __len = ((sizeof *cur)); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < __len) _obstack_newchunk (__o, __len); ((void) ((__o)->next_free += (__len))); }); __extension__ ({ struct obstack *__o1 = (__h); void *__value = (void *) __o1->object_base; if (__o1->next_free == __value) __o1->maybe_empty_object = 1; __o1->next_free = ((sizeof (ptrdiff_t) < sizeof (void *) ? (__o1->object_base) : (char *) 0) + (((__o1->next_free) - (sizeof (ptrdiff_t) < sizeof (void *) ? (__o1->object_base) : (char *) 0) + (__o1->alignment_mask)) & ~(__o1->alignment_mask))); if ((size_t) (__o1->next_free - (char *) __o1->chunk) > (size_t) (__o1->chunk_limit - (char *) __o1->chunk)) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; __value; }); }); cur->llink = ((void *)0); cur->rlink = ((void *)0); cur->trie = __extension__ ({ struct obstack *__h = (&kwset->obstack); __extension__ ({ struct obstack *__o = (__h); size_t __len = ((sizeof *cur->trie)); if (__extension__ ({ struct obstack const *__o1 = (__o); (size_t) (__o1->chunk_limit - __o1->next_free); }) < __len) _obstack_newchunk (__o, __len); ((void) ((__o)->next_free += (__len))); }); __extension__ ({ struct obstack *__o1 = (__h); void *__value = (void *) __o1->object_base; if (__o1->next_free == __value) __o1->maybe_empty_object = 1; __o1->next_free = ((sizeof (ptrdiff_t) < sizeof (void *) ? (__o1->object_base) : (char *) 0) + (((__o1->next_free) - (sizeof (ptrdiff_t) < sizeof (void *) ? (__o1->object_base) : (char *) 0) + (__o1->alignment_mask)) & ~(__o1->alignment_mask))); if ((size_t) (__o1->next_free - (char *) __o1->chunk) > (size_t) (__o1->chunk_limit - (char *) __o1->chunk)) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; __value; }); }); cur->trie->accepting = 0; cur->trie->links = ((void *)0); cur->trie->parent = trie; cur->trie->next = ((void *)0); cur->trie->fail = ((void *)0); cur->trie->depth = trie->depth + 1; cur->trie->shift = 0; cur->label = label; cur->balance = 0; if (dirs[--depth] == L) links[depth]->llink = cur; else links[depth]->rlink = cur; while (depth && !links[depth]->balance) { if (dirs[depth] == L) --links[depth]->balance; else ++links[depth]->balance; --depth; } if (depth && ((dirs[depth] == L && --links[depth]->balance) || (dirs[depth] == R && ++links[depth]->balance))) { struct tree *t, *r, *l, *rl, *lr; switch (links[depth]->balance) { case (char) -2: switch (dirs[depth + 1]) { case L: r = links[depth], t = r->llink, rl = t->rlink; t->rlink = r, r->llink = rl; t->balance = r->balance = 0; break; case R: r = links[depth], l = r->llink, t = l->rlink; rl = t->rlink, lr = t->llink; t->llink = l, l->rlink = lr, t->rlink = r, r->llink = rl; l->balance = t->balance != 1 ? 0 : -1; r->balance = t->balance != (char) -1 ? 0 : 1; t->balance = 0; break; default: abort (); } break; case 2: switch (dirs[depth + 1]) { case R: l = links[depth], t = l->rlink, lr = t->llink; t->llink = l, l->rlink = lr; t->balance = l->balance = 0; break; case L: l = links[depth], r = l->rlink, t = r->llink; lr = t->llink, rl = t->rlink; t->llink = l, l->rlink = lr, t->rlink = r, r->llink = rl; l->balance = t->balance != 1 ? 0 : -1; r->balance = t->balance != (char) -1 ? 0 : 1; t->balance = 0; break; default: abort (); } break; default: abort (); } if (dirs[depth - 1] == L) links[depth - 1]->llink = t; else links[depth - 1]->rlink = t; } } trie = cur->trie; } if (!trie->accepting) trie->accepting = 2 * kwset->words + 1; ++kwset->words; if (trie->depth < kwset->mind) kwset->mind = trie->depth; }
{ "array_type": 3, "break_continue_statement": 6, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 11, "memory_management": 0, "memory_operation": 0, "pointer_type": 9, "return_statement": 0, "struct_type": 6, "switch_statement": 3, "type_casting": 12, "union_type": 0, "while_loop": 3 }
libxml2#libxml2-py_prep#libxml_xmlUCSIsSupplementaryPrivateUseAreaB.c
libxml2
libxml2-py.c
libxml_xmlUCSIsSupplementaryPrivateUseAreaB
13
PyObject * libxml_xmlUCSIsSupplementaryPrivateUseAreaB(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsSupplementaryPrivateUseAreaB") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSIsSupplementaryPrivateUseAreaB", &code)) return(((void *)0)); c_retval = xmlUCSIsSupplementaryPrivateUseAreaB(code); py_retval = libxml_intWrap((int) c_retval); return(py_retval); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
wget-1.21.4#http_prep#ensure_extension.c
wget-1.21.4
http.c
ensure_extension
32
void ensure_extension (struct http_stat *hs, const char *ext, int *dt) { char *last_period_in_local_filename = strrchr (hs->local_file, '.'); char shortext[8]; int len; shortext[0] = '\0'; len = strlen (ext); if (len == 5) { memcpy (shortext, ext, len - 1); shortext[len - 1] = '\0'; } if (last_period_in_local_filename == ((void *)0) || !(0 == strcasecmp (last_period_in_local_filename, shortext) || 0 == strcasecmp (last_period_in_local_filename, ext))) { int local_filename_len = strlen (hs->local_file); hs->local_file = xrealloc (hs->local_file, local_filename_len + 24 + len); strcpy (hs->local_file + local_filename_len, ext); if (!(opt.noclobber || opt.always_rest || opt.timestamping || opt.dirstruct || opt.output_document || opt.backups > 0) && file_exists_p (hs->local_file, ((void *)0))) { int ext_num = 1; do sprintf (hs->local_file + local_filename_len, ".%d%s", ext_num++, ext); while (file_exists_p (hs->local_file, ((void *)0))); } *dt |= ADDED_HTML_EXTENSION; } }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 1, "pointer_type": 1, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 1 }
gprolog-1.5.0#g_var_inl_c_prep#Pl_Blt_G_Assign.c
gprolog-1.5.0
g_var_inl_c.c
Pl_Blt_G_Assign
7
void Pl_Blt_G_Assign(WamWord x, WamWord y) { Pl_Set_C_Bip_Name("g_assign", 2); G_Assign(x, y, 0, 1); Pl_Unset_C_Bip_Name(); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#CALCULATE_MAXIMUM_VALUE_USING_SIGN_TWO_NUMBERS_STRING_prep#main.c
transcoder-set
CALCULATE_MAXIMUM_VALUE_USING_SIGN_TWO_NUMBERS_STRING.c
main
14
int main(void) { int n_success = 0; char param0[][100] = {"pR","9518","1","nNMCIXUCpRMmvO","3170487","0100101010","Z rONcUqWb","00419297","00","r"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } break; } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
cflow-1.7#c_prep#yy_scan_bytes.c
cflow-1.7
c.c
yy_scan_bytes
19
YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; yy_size_t i; n = _yybytes_len + 2; buf = (char *) yyalloc(n ); if ( ! buf ) yy_fatal_error( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = 0; b = yy_scan_buffer(buf,n ); if ( ! b ) yy_fatal_error( "bad buffer in yy_scan_bytes()" ); b->yy_is_our_buffer = 1; return b; }
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#MAXIMUM_VALUE_CHOICE_EITHER_DIVIDING_CONSIDERING_prep#f_filled.c
transcoder-set
MAXIMUM_VALUE_CHOICE_EITHER_DIVIDING_CONSIDERING.c
f_filled
1
int f_filled ( int n ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
json.h#allow_location_information_prep#json_write_string.c
json.h
allow_location_information.c
json_write_string
41
char *json_write_string(const struct json_string_s *string, char *data) { size_t i; *data++ = '"'; for (i = 0; i < string->string_size; i++) { switch (string->string[i]) { case '"': *data++ = '\\'; *data++ = '"'; break; case '\\': *data++ = '\\'; *data++ = '\\'; break; case '\b': *data++ = '\\'; *data++ = 'b'; break; case '\f': *data++ = '\\'; *data++ = 'f'; break; case '\n': *data++ = '\\'; *data++ = 'n'; break; case '\r': *data++ = '\\'; *data++ = 'r'; break; case '\t': *data++ = '\\'; *data++ = 't'; break; default: *data++ = string->string[i]; break; } } *data++ = '"'; return data; }
{ "array_type": 1, "break_continue_statement": 8, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 1, "type_casting": 0, "union_type": 0, "while_loop": 0 }
gzip-1.12#strerror_r_prep#rpl_strerror_r.c
gzip-1.12
strerror_r.c
rpl_strerror_r
37
int rpl_strerror_r (int errnum, char *buf, size_t buflen) { if (buflen <= 1) { if (buflen) *buf = '\0'; return 34; } *buf = '\0'; { char const *msg = ((void *)0); if (msg) return safe_copy (buf, buflen, msg); } { int ret; int saved_errno = (*__errno_location ()); { ret = 0; ret = __xpg_strerror_r (errnum, buf, buflen); if (ret < 0) ret = (*__errno_location ()); if (!*buf) { char *errstring = strerror_r (errnum, buf, buflen); ret = errstring ? safe_copy (buf, buflen, errstring) : (*__errno_location ()); } } if (ret == 22 && !*buf) { snprintf (buf, buflen, "Unknown error %d", errnum); } (*__errno_location ()) = saved_errno; return ret; } }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#xmlunicode_prep#xmlUCSIsThaana.c
libxml2
xmlunicode.c
xmlUCSIsThaana
4
int xmlUCSIsThaana(int code) { return(((code >= 0x0780) && (code <= 0x07BF))); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#xpath_prep#xmlXPathCastStringToNumber.c
libxml2
xpath.c
xmlXPathCastStringToNumber
4
double xmlXPathCastStringToNumber(const xmlChar * val) { return(xmlXPathStringEvalNumber(val)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#COUNT_TOTAL_SET_BITS_IN_ALL_NUMBERS_FROM_1_TO_N_prep#main.c
transcoder-set
COUNT_TOTAL_SET_BITS_IN_ALL_NUMBERS_FROM_1_TO_N.c
main
14
int main(void) { int n_success = 0; int param0[] = {90,56,43,31,77,35,43,66,15,95}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } break; } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#COUNT_NUMBER_WAYS_TILE_FLOOR_SIZE_N_X_M_USING_1_X_M_SIZE_TILES_prep#main.c
transcoder-set
COUNT_NUMBER_WAYS_TILE_FLOOR_SIZE_N_X_M_USING_1_X_M_SIZE_TILES.c
main
15
int main(void) { int n_success = 0; int param0[] = {93,17,38,33,78,40,95,12,69,78}; int param1[] = {54,4,39,64,35,61,6,8,60,21}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } break; } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "array_type": 2, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#SUM_FIBONACCI_NUMBERS_prep#main.c
transcoder-set
SUM_FIBONACCI_NUMBERS.c
main
14
int main(void) { int n_success = 0; int param0[] = {9,50,7,21,21,91,11,25,62,4}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } break; } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
optipng-0.7.8#zutil_prep#zlibCompileFlags.c
optipng-0.7.8
zutil.c
zlibCompileFlags
31
uLong zlibCompileFlags(void) { uLong flags; flags = 0; switch ((int)(sizeof(uInt))) { case 2: break; case 4: flags += 1; break; case 8: flags += 2; break; default: flags += 3; } switch ((int)(sizeof(uLong))) { case 2: break; case 4: flags += 1 << 2; break; case 8: flags += 2 << 2; break; default: flags += 3 << 2; } switch ((int)(sizeof(voidpf))) { case 2: break; case 4: flags += 1 << 4; break; case 8: flags += 2 << 4; break; default: flags += 3 << 4; } switch ((int)(sizeof(off_t))) { case 2: break; case 4: flags += 1 << 6; break; case 8: flags += 2 << 6; break; default: flags += 3 << 6; } flags += 1L << 16; flags += 1L << 17; return flags; }
{ "array_type": 0, "break_continue_statement": 12, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 4, "type_casting": 5, "union_type": 0, "while_loop": 0 }
transcoder-set#SUM_SERIES_12_32_52_2N_12_1_prep#main.c
transcoder-set
SUM_SERIES_12_32_52_2N_12_1.c
main
14
int main(void) { int n_success = 0; int param0[] = {84,74,91,34,36,28,70,7,24,47}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } break; } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libosip2-5.3.1#osip_dialog_prep#osip_dialog_update_route_set_as_uas.c
libosip2-5.3.1
osip_dialog.c
osip_dialog_update_route_set_as_uas
21
int osip_dialog_update_route_set_as_uas(osip_dialog_t *dialog, osip_message_t *invite) { osip_contact_t *contact; int i; if (dialog == ((void *)0)) return -2; if (invite == ((void *)0)) return -2; if (osip_list_eol(&invite->contacts, 0)) { osip_trace("osip_dialog.c", 44, TRACE_LEVEL3, ((void *)0), "missing a contact in invite!\n"); } else { if (dialog->remote_contact_uri != ((void *)0)) { osip_contact_free(dialog->remote_contact_uri); } dialog->remote_contact_uri = ((void *)0); contact = osip_list_get(&invite->contacts, 0); i = osip_contact_clone(contact, &(dialog->remote_contact_uri)); if (i != 0) return i; } return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 5, "union_type": 0, "while_loop": 0 }
nano-7.2#global_prep#first_sc_for.c
nano-7.2
global.c
first_sc_for
7
const keystruct *first_sc_for(int menu, void (*function)(void)) { for (keystruct *sc = sclist; sc != ((void *)0); sc = sc->next) if ((sc->menus & menu) && sc->func == function && sc->keystr[0]) return sc; return ((void *)0); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 1, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
transcoder-set#SMALLEST_SUM_CONTIGUOUS_SUBARRAY_prep#max.c
transcoder-set
SMALLEST_SUM_CONTIGUOUS_SUBARRAY.c
max
1
int max(int x, int y) { return (x > y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tar-1.34#hash_prep#hash_free.c
tar-1.34
hash.c
hash_free
33
void hash_free (Hash_table *table) { struct hash_entry *bucket; struct hash_entry *cursor; struct hash_entry *next; if (table->data_freer && table->n_entries) { for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { if (bucket->data) { for (cursor = bucket; cursor; cursor = cursor->next) table->data_freer (cursor->data); } } } for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { for (cursor = bucket->next; cursor; cursor = next) { next = cursor->next; free (cursor); } } for (cursor = table->free_entry_list; cursor; cursor = next) { next = cursor->next; free (cursor); } free (table->bucket); free (table); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 5, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 4, "memory_operation": 0, "pointer_type": 3, "return_statement": 0, "struct_type": 3, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
rcs-5.10.1#b-fb_prep#Oerror.c
rcs-5.10.1
b-fb.c
Oerror
8
void Oerror (void) { if ((top->behavior. Oerrloop)) thank_you_and_goodnight ((top->program-> tyag)); (top->behavior. Oerrloop) = 1; fatal_sys ("output error"); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tar-1.34#hash_prep#hash_get_entries.c
tar-1.34
hash.c
hash_get_entries
21
size_t hash_get_entries (const Hash_table *table, void **buffer, size_t buffer_size) { size_t counter = 0; struct hash_entry const *bucket; struct hash_entry const *cursor; for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { if (bucket->data) { for (cursor = bucket; cursor; cursor = cursor->next) { if (counter >= buffer_size) return counter; buffer[counter++] = cursor->data; } } } return counter; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
less-633#optfunc_prep#opt_intr.c
less-633
optfunc.c
opt_intr
17
void opt_intr(int type, char *s) { PARG p; switch (type) { case 0: case 2: intr_char = *s; if (intr_char == '^' && s[1] != '\0') intr_char = ((s[1])&037); break; case 1: { p.p_string = prchar(intr_char); error("interrupt character is %s", &p); break; } } }
{ "array_type": 1, "break_continue_statement": 2, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 1, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#RECURSIVELY_BREAK_NUMBER_3_PARTS_GET_MAXIMUM_SUM_prep#cmpfunc.c
transcoder-set
RECURSIVELY_BREAK_NUMBER_3_PARTS_GET_MAXIMUM_SUM.c
cmpfunc
1
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#MINIMUM_INSERTIONS_SORT_ARRAY_prep#len.c
transcoder-set
MINIMUM_INSERTIONS_SORT_ARRAY.c
len
1
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#terminal_prep#Pl_LE_Emit_Beep.c
gprolog-1.5.0
terminal.c
Pl_LE_Emit_Beep
5
void Pl_LE_Emit_Beep(void) { Pl_LE_Put_Char('\a'); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
make-4.4.1#file_prep#enter_file.c
make-4.4.1
file.c
enter_file
33
struct file * enter_file (const char *name) { struct file *f; struct file *new; struct file **file_slot; struct file file_key; ((void) (0)); ((void) (0)); file_key.hname = name; file_slot = (struct file **) hash_find_slot (&files, &file_key); f = *file_slot; if (! ((f) == 0 || (void *) (f) == hash_deleted_item) && !f->double_colon) { f->builtin = 0; return f; } new = xcalloc (sizeof (struct file)); new->name = new->hname = name; new->update_status = us_none; if (((f) == 0 || (void *) (f) == hash_deleted_item)) { new->last = new; hash_insert_at (&files, new, file_slot); } else { new->double_colon = f; f->last->prev = new; f->last = new; } return new; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 3, "return_statement": 2, "struct_type": 2, "switch_statement": 0, "type_casting": 5, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Sinh.c
gprolog-1.5.0
arith_inl_c.c
Pl_Fct_Sinh
5
WamWord Pl_Fct_Sinh(WamWord x) { return Make_Tagged_Float(sinh(To_Double(x))); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#c_supp_prep#Pl_Check_For_Un_List.c
gprolog-1.5.0
c_supp.c
Pl_Check_For_Un_List
6
void Pl_Check_For_Un_List(WamWord start_word) { if (!Pl_Blt_List_Or_Partial_List(start_word)) Pl_Err_Type(pl_type_list, start_word); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tinycc#x86_64-gen_prep#gen_addr32.c
tinycc
x86_64-gen.c
gen_addr32
6
void gen_addr32(int r, Sym *sym, int c) { if (r & 0x0200) greloca(cur_text_section, sym, ind, 11, c), c=0; gen_le32(c); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#ccm-aes128_prep#nettle_ccm_aes128_update.c
nettle-3.9.1
ccm-aes128.c
nettle_ccm_aes128_update
7
void nettle_ccm_aes128_update(struct ccm_aes128_ctx *ctx, size_t length, const uint8_t *data) { nettle_ccm_update(&ctx->ccm, &ctx->cipher, (nettle_cipher_func *) nettle_aes128_encrypt, length, data); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR_prep#cmpfunc.c
transcoder-set
NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR.c
cmpfunc
1
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
less-633#decode_prep#lesskey.c
less-633
decode.c
lesskey
41
int lesskey(char *filename, int sysvar) { char *buf; POSITION len; long n; int f; if (secure) return (1); f = open(filename, (00)); if (f < 0) return (1); len = filesize(f); if (len == ((POSITION)(-1)) || len < 3) { close(f); return (-1); } if ((buf = (char *) calloc((int)len, sizeof(char))) == ((void *)0)) { close(f); return (-1); } if (lseek(f, (off_t)0, 0) == ((off_t)-1)) { free(buf); close(f); return (-1); } n = read(f, buf, (unsigned int) len); close(f); if (n != len) { free(buf); return (-1); } if (len < 4 || buf[0] != '\0' || buf[1] != 'M' || buf[2] != '+' || buf[3] != 'G') return (old_lesskey(buf, (int)len)); return (new_lesskey(buf, (int)len, sysvar)); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 7, "memory_management": 3, "memory_operation": 0, "pointer_type": 1, "return_statement": 8, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
transcoder-set#PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM_prep#max.c
transcoder-set
PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM.c
max
1
int max(int x, int y) { return (x > y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_1_prep#f_gold.c
transcoder-set
COUNT_POSSIBLE_PATHS_TOP_LEFT_BOTTOM_RIGHT_NXM_MATRIX_1.c
f_gold
17
int f_gold ( int m, int n ) { int count [ m ] [ n ]; for ( int i = 0; i < m; i ++ ) count [ i ] [ 0 ] = 1; for ( int j = 0; j < n; j ++ ) count [ 0 ] [ j ] = 1; for ( int i = 1; i < m; i ++ ) { for ( int j = 1; j < n; j ++ ) count [ i ] [ j ] = count [ i - 1 ] [ j ] + count [ i ] [ j - 1 ]; } return count [ m - 1 ] [ n - 1 ]; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 4, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
indent-2.2.13#code_io_prep#current_column.c
indent-2.2.13
code_io.c
current_column
36
extern int current_column (void) { char *p; int column; if ((buf_ptr >= save_com.ptr) && (buf_ptr <= save_com.ptr + save_com.len)) { p = save_com.ptr; column = save_com.start_column; } else { p = cur_line; column = 1; } while (p < buf_ptr) { switch (*p) { case '\n': case 014: column = 1; break; case '\t': column += settings.tabsize - (column - 1) % settings.tabsize; break; case '\b': column--; break; default: column++; break; } p++; } return column; }
{ "array_type": 0, "break_continue_statement": 4, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 1, "type_casting": 1, "union_type": 0, "while_loop": 1 }
optipng-0.7.8#pngwutil_prep#png_write_sBIT.c
optipng-0.7.8
pngwutil.c
png_write_sBIT
44
void png_write_sBIT(png_structrp png_ptr, png_const_color_8p sbit, int color_type) { png_byte buf[4]; size_t size; ((void)0); if ((color_type & 2) != 0) { png_byte maxbits; maxbits = (png_byte)(color_type==(2 | 1) ? 8 : png_ptr->usr_bit_depth); if (sbit->red == 0 || sbit->red > maxbits || sbit->green == 0 || sbit->green > maxbits || sbit->blue == 0 || sbit->blue > maxbits) { png_warning(png_ptr, "Invalid sBIT depth specified"); return; } buf[0] = sbit->red; buf[1] = sbit->green; buf[2] = sbit->blue; size = 3; } else { if (sbit->gray == 0 || sbit->gray > png_ptr->usr_bit_depth) { png_warning(png_ptr, "Invalid sBIT depth specified"); return; } buf[0] = sbit->gray; size = 1; } if ((color_type & 4) != 0) { if (sbit->alpha == 0 || sbit->alpha > png_ptr->usr_bit_depth) { png_warning(png_ptr, "Invalid sBIT depth specified"); return; } buf[size++] = sbit->alpha; } png_write_complete_chunk(png_ptr, (((png_uint_32)(115) << (24)) | ((png_uint_32)(66) << (16)) | ((png_uint_32)(73) << (8)) | ((png_uint_32)(84) << (0))), buf, size); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tar-1.34#argmatch_prep#argmatch_valid.c
tar-1.34
argmatch.c
argmatch_valid
20
void argmatch_valid (const char *const *arglist, const void *vallist, size_t valsize) { size_t i; const char *last_val = ((void *)0); fputs_unlocked (gettext ("Valid arguments are:"),stderr); for (i = 0; arglist[i]; i++) if ((i == 0) || memcmp (last_val, (char const *) vallist + valsize * i, valsize)) { fprintf (stderr, "\n - %s", quote (arglist[i])); last_val = (char const *) vallist + valsize * i; } else { fprintf (stderr, ", %s", quote (arglist[i])); } putc_unlocked ('\n',stderr); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlURISetScheme.c
libxml2
libxml2-py.c
libxml_xmlURISetScheme
13
PyObject * libxml_xmlURISetScheme(PyObject *self __attribute__ ((__unused__)), PyObject *args) { xmlURIPtr URI; PyObject *pyobj_URI; char * scheme; if (!_PyArg_ParseTuple_SizeT(args, (char *)"Oz:xmlURISetScheme", &pyobj_URI, &scheme)) return(((void *)0)); URI = (xmlURIPtr) (((pyobj_URI) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyURI_Object *)(pyobj_URI))->obj)); if (URI->scheme != ((void *)0)) xmlFree(URI->scheme); URI->scheme = (char *)xmlStrdup((const xmlChar *)scheme); _Py_INCREF(((PyObject*)((&_Py_NoneStruct)))); return((&_Py_NoneStruct)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 5, "union_type": 0, "while_loop": 0 }
json.h#allow_equals_in_object_prep#json_value_as_string.c
json.h
allow_equals_in_object.c
json_value_as_string
6
struct json_string_s *json_value_as_string(struct json_value_s *const value) { if (value->type != json_type_string) { return 0; } return (struct json_string_s *)value->payload; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_2_prep#f_gold.c
transcoder-set
N_TH_NUMBER_WHOSE_SUM_OF_DIGITS_IS_TEN_2.c
f_gold
6
int f_gold ( int n ) { int nthElement = 19 + ( n - 1 ) * 9; int outliersCount = ( int ) log10 ( nthElement ) - 1; nthElement += 9 * outliersCount; return nthElement; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#NEXT_POWER_OF_2_2_prep#main.c
transcoder-set
NEXT_POWER_OF_2_2.c
main
14
int main(void) { int n_success = 0; int param0[] = {63,78,13,5,34,69,63,78,80,19}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } break; } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#xpath_prep#xmlXPathStringEvalNumber.c
libxml2
xpath.c
xmlXPathStringEvalNumber
72
double xmlXPathStringEvalNumber(const xmlChar *str) { const xmlChar *cur = str; double ret; int ok = 0; int isneg = 0; int exponent = 0; int is_exponent_negative = 0; unsigned long tmp = 0; double temp; if (cur == ((void *)0)) return(0); while ((((*cur) == 0x20) || ((0x9 <= (*cur)) && ((*cur) <= 0xa)) || ((*cur) == 0xd))) cur++; if (*cur == '-') { isneg = 1; cur++; } if ((*cur != '.') && ((*cur < '0') || (*cur > '9'))) { return(xmlXPathNAN); } ret = 0; while ((*cur >= '0') && (*cur <= '9')) { ret = ret * 10; tmp = (*cur - '0'); ok = 1; cur++; temp = (double) tmp; ret = ret + temp; } if (*cur == '.') { int v, frac = 0, max; double fraction = 0; cur++; if (((*cur < '0') || (*cur > '9')) && (!ok)) { return(xmlXPathNAN); } while (*cur == '0') { frac = frac + 1; cur++; } max = frac + 20; while (((*cur >= '0') && (*cur <= '9')) && (frac < max)) { v = (*cur - '0'); fraction = fraction * 10 + v; frac = frac + 1; cur++; } fraction /= pow(10.0, frac); ret = ret + fraction; while ((*cur >= '0') && (*cur <= '9')) cur++; } if ((*cur == 'e') || (*cur == 'E')) { cur++; if (*cur == '-') { is_exponent_negative = 1; cur++; } else if (*cur == '+') { cur++; } while ((*cur >= '0') && (*cur <= '9')) { if (exponent < 1000000) exponent = exponent * 10 + (*cur - '0'); cur++; } } while ((((*cur) == 0x20) || ((0x9 <= (*cur)) && ((*cur) <= 0xa)) || ((*cur) == 0xd))) cur++; if (*cur != 0) return(xmlXPathNAN); if (isneg) ret = -ret; if (is_exponent_negative) exponent = -exponent; ret *= pow(10.0, (double)exponent); return(ret); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 12, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 5, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 7 }
tinycc#tccelf_prep#section_add.c
tinycc
tccelf.c
section_add
12
size_t section_add(Section *sec, Elf64_Addr size, int align) { size_t offset, offset1; offset = (sec->data_offset + align - 1) & -align; offset1 = offset + size; if (sec->sh_type != 8 && offset1 > sec->data_allocated) section_realloc(sec, offset1); sec->data_offset = offset1; if (align > sec->sh_addralign) sec->sh_addralign = align; return offset; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#CHECK_WHETHER_GIVEN_DEGREES_VERTICES_REPRESENT_GRAPH_TREE_prep#f_filled.c
transcoder-set
CHECK_WHETHER_GIVEN_DEGREES_VERTICES_REPRESENT_GRAPH_TREE.c
f_filled
1
_Bool f_filled ( int degree [ ], int n ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tulipindicators-0.9.1#tiamalgamation_prep#ti_ao_start.c
tulipindicators-0.9.1
tiamalgamation.c
ti_ao_start
4
int ti_ao_start(double const *options) { (void)options; return 33; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
json.h#allow_inf_and_nan_prep#utest_should_filter_test.c
json.h
allow_inf_and_nan.c
utest_should_filter_test
42
__attribute__((weak)) int utest_should_filter_test(const char *filter, const char *testcase) { if (filter) { const char *filter_cur = filter; const char *testcase_cur = testcase; const char *filter_wildcard = 0; while (('\0' != *filter_cur) && ('\0' != *testcase_cur)) { if ('*' == *filter_cur) { filter_wildcard = filter_cur; filter_cur++; while (('\0' != *filter_cur) && ('\0' != *testcase_cur)) { if ('*' == *filter_cur) { break; } else if (*filter_cur != *testcase_cur) { filter_cur = filter_wildcard; } testcase_cur++; filter_cur++; } if (('\0' == *filter_cur) && ('\0' == *testcase_cur)) { return 0; } if ('\0' == *testcase_cur) { return 1; } } else { if (*testcase_cur != *filter_cur) { return 1; } else { testcase_cur++; filter_cur++; } } } if (('\0' != *filter_cur) || (('\0' != *testcase_cur) && ((filter == filter_cur) || ('*' != filter_cur[-1])))) { return 1; } } return 0; }
{ "array_type": 0, "break_continue_statement": 1, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 8, "memory_management": 0, "memory_operation": 0, "pointer_type": 3, "return_statement": 5, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 2 }
transcoder-set#MULTIPLY_AN_INTEGER_WITH_3_5_prep#min.c
transcoder-set
MULTIPLY_AN_INTEGER_WITH_3_5.c
min
1
int min(int x, int y) { return (x < y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
bc-1.07.1#util_prep#arg_str.c
bc-1.07.1
util.c
arg_str
9
char * arg_str (arg_list *args) { if (arglist2 != ((void *)0)) free (arglist2); arglist2 = arglist1; arglist1 = make_arg_str (args, 1); return (arglist1); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 1, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#gcm-sm4_prep#nettle_gcm_sm4_update.c
nettle-3.9.1
gcm-sm4.c
nettle_gcm_sm4_update
6
void nettle_gcm_sm4_update(struct gcm_sm4_ctx *ctx, size_t length, const uint8_t *data) { nettle_gcm_update(&(ctx)->gcm, &(ctx)->key, (length), (data)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#SEARCH_AN_ELEMENT_IN_A_SORTED_AND_PIVOTED_ARRAY_prep#f_filled.c
transcoder-set
SEARCH_AN_ELEMENT_IN_A_SORTED_AND_PIVOTED_ARRAY.c
f_filled
1
int f_filled ( int arr [ ], int l, int h, int key ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES_prep#sort.c
transcoder-set
NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES.c
sort
1
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
bc-1.07.1#numeric_prep#dc_num2int.c
bc-1.07.1
numeric.c
dc_num2int
16
int dc_num2int ( dc_num value , dc_discard discard_p ) { long result; result = bc_num2long((value)); if (result == 0 && !bc_is_zero((value))) { fprintf(stderr, "%s: value overflows simple integer; punting...\n", progname); result = -1; } if (discard_p == DC_TOSS) dc_free_num(&value); return (int)result; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#ma2asm_inst_prep#Dico_Long_Stop.c
gprolog-1.5.0
ma2asm_inst.c
Dico_Long_Stop
4
void Dico_Long_Stop(int nb) { }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
heman#vec3_prep#kmVec3GetHorizontalAngle.c
heman
vec3.c
kmVec3GetHorizontalAngle
14
kmVec3* kmVec3GetHorizontalAngle(kmVec3* pOut, const kmVec3 *pIn) { const float z1 = sqrt(pIn->x * pIn->x + pIn->z * pIn->z); pOut->y = kmRadiansToDegrees(atan2(pIn->x, pIn->z)); if (pOut->y < 0) pOut->y += 360; if (pOut->y >= 360) pOut->y -= 360; pOut->x = kmRadiansToDegrees(atan2(z1, pIn->y)) - 90.0; if (pOut->x < 0) pOut->x += 360; if (pOut->x >= 360) pOut->x -= 360; return pOut; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY_1_prep#f_filled.c
transcoder-set
FIND_INDEX_OF_AN_EXTRA_ELEMENT_PRESENT_IN_ONE_SORTED_ARRAY_1.c
f_filled
1
int f_filled ( int arr1 [ ], int arr2 [ ], int n ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }