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
gprolog-1.5.0#wam2ma_prep#F_call_c.c
gprolog-1.5.0
wam2ma.c
F_call_c
139
void F_call_c(ArgVal arg[]) { int ret = 0; Bool fast_call = 0; Bool tagged = 0; Bool set_cp = 0; char *str; Bool adr_of; PlLong ret_xy = 0; char ret_c = 0; int i; char *c_option; PlLong arg_type; BTNode *atom; char *str_atom; char *aux_functor; PlLong aux_arity; PlLong n; double n1; PlLong xy; char c; ArgVal *top = arg; char *fct_name; PlLong nb_elem; ((fct_name) = *((char * *) (top)) , (top)++); ((nb_elem) = *((PlLong *) (top)) , (top)++); for (i = 0; i < nb_elem; i++) { ((arg_type) = *((PlLong *) (top)) , (top)++); if (arg_type == X_Y) { ((xy) = *((PlLong *) (top)) , (top)++); if (xy < 5000) c = 'X'; else xy -= 5000, c='Y'; ret = 3; ret_xy = xy; ret_c = c; continue; } ((c_option) = *((char * *) (top)) , (top)++); if (strcmp(c_option, "boolean") == 0) ret = 1; else if (strcmp(c_option, "jump") == 0) ret = 2; else if (strcmp(c_option, "fast_call") == 0) fast_call = 1; else if (strcmp(c_option, "tagged") == 0) tagged = 1; else if (strcmp(c_option, "set_cp") == 0) set_cp = 1; } ((nb_elem) = *((PlLong *) (top)) , (top)++); if (set_cp) Inst_Printf("prep_cp", ""); Inst_Printf("call_c", ((void *)0)); if (fast_call) fputs( "", file_out); fprintf(file_out, "%s(", fct_name); i = 0; adr_of = 0; goto write_a_arg; while(i < nb_elem) { fputc(',', file_out); write_a_arg: ((arg_type) = *((PlLong *) (top)) , (top)++); switch(arg_type) { case ATOM: str = *((char **) top); if (*str == '&' && str[1] == '\0') { if ((i < nb_elem - 1 && *(PlLong *) (top+1) == X_Y) || (i < nb_elem - 2 && *(PlLong *) (top+1) == ATOM && *(PlLong *) (top+3) == INTEGER)) { adr_of = 1; i++; top++; goto write_a_arg; } } if (adr_of) { ((aux_functor) = *((char * *) (top)) , (top)++); i++; top++; ((aux_arity) = *((PlLong *) (top)) , (top)++); Encode_Hexa(((void *)0), aux_functor, aux_arity, buff_hexa); fprintf(file_out, "&%s", buff_hexa); adr_of = 0; } else if (tagged) { ((str_atom) = *((char * *) (top)) , (top)++); atom = BT_String_Add(&bt_tagged_atom, str_atom); fprintf(file_out, "ta(%d)", atom->no); } else { ((str_atom) = *((char * *) (top)) , (top)++); atom = BT_String_Add(&bt_atom, str_atom); fprintf(file_out, "at(%d)", atom->no); } break; case INTEGER: ((n) = *((PlLong *) (top)) , (top)++); fprintf(file_out, "%" "l" "d", (tagged) ? (((PlULong) (n) << 3) | (PlULong)0x7) : n); break; case FLOAT: ((n1) = *((double *) (top)) , (top)++); fprintf(file_out, "%1.20e", n1); break; case X_Y: ((xy) = *((PlLong *) (top)) , (top)++); if (xy < 5000) c = 'X'; else xy -= 5000, c='Y'; if (adr_of) { fprintf(file_out, "&"); adr_of = 0; } fprintf(file_out, "%c(%" "l" "d" ")", c, xy); break; case F_N: if (tagged) { char *str_atom; PlLong n; int f_n_no; ((str_atom) = *((char * *) (top)) , (top)++); ((n) = *((PlLong *) (top)) , (top)++); f_n_no = Add_F_N_Tagged(str_atom, n); fprintf(file_out, "fn(%d)", f_n_no); } else { BTNode *atom; char *str_atom; PlLong n; ((str_atom) = *((char * *) (top)) , (top)++); atom = BT_String_Add(&bt_atom, str_atom); ((n) = *((PlLong *) (top)) , (top)++); fprintf(file_out, "at(%d),%" "l" "d" "", atom->no, n); } break; } i++; } fprintf(file_out, ")\n"); if (ret == 1) Inst_Printf("fail_ret", ""); else if (ret == 2) Inst_Printf("jump_ret", ""); else if (ret == 3) Inst_Printf("move_ret", "%c(%" "l" "d" ")", ret_c, ret_xy); if (set_cp) Inst_Printf("here_cp", ""); }
{ "array_type": 1, "break_continue_statement": 6, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 2, "if_statement": 20, "memory_management": 0, "memory_operation": 0, "pointer_type": 7, "return_statement": 0, "struct_type": 0, "switch_statement": 1, "type_casting": 3, "union_type": 0, "while_loop": 1 }
tar-1.34#dirname-lgpl_prep#dir_len.c
tar-1.34
dirname-lgpl.c
dir_len
19
size_t dir_len (char const *file) { size_t prefix_length = ((void) (file), 0); size_t length; prefix_length += (prefix_length != 0 ? (0 && ((file[prefix_length]) == '/')) : (((file[0]) == '/') ? ((0 && ((file[1]) == '/') && ! ((file[2]) == '/') ? 2 : 1)) : 0)); for (length = last_component (file) - file; prefix_length < length; length--) if (! ((file[length - 1]) == '/')) break; return length; }
{ "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 }
pexec-1.0rc8#str_prep#strkcpy.c
pexec-1.0rc8
str.c
strkcpy
6
char * strkcpy(char *out,char *in,int size) { strncpy(out,in,size); out[size-1]=0; return(out); }
{ "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 }
ed-1.19#regex_prep#set_subst_regex.c
ed-1.19
regex.c
set_subst_regex
14
bool set_subst_regex( const char * const pat, const bool ignore_case ) { if( !pat ) return false; if( !*pat && ignore_case ) { set_error_msg( inv_i_suf ); return false; } disable_interrupts(); regex_t * exp = *pat ? compile_regex( pat, ignore_case ) : last_regexp; if( exp && exp != subst_regexp ) { if( subst_regexp ) regfree( subst_regexp ); subst_regexp = exp; } enable_interrupts(); return ( exp ? true : false ); }
{ "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": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#CONVERTING_ONE_STRING_USING_APPEND_DELETE_LAST_OPERATIONS_prep#len.c
transcoder-set
CONVERTING_ONE_STRING_USING_APPEND_DELETE_LAST_OPERATIONS.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 }
json.h#allow_single_quoted_strings_prep#json_value_as_object.c
json.h
allow_single_quoted_strings.c
json_value_as_object
6
struct json_object_s *json_value_as_object(struct json_value_s *const value) { if (value->type != json_type_object) { return 0; } return (struct json_object_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 }
libxml2#uri_prep#xmlNormalizeURIPath.c
libxml2
uri.c
xmlNormalizeURIPath
4
int xmlNormalizeURIPath(char *path) { return(xmlNormalizePath(path, 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": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#FIND_MINIMUM_DIFFERENCE_PAIR_prep#f_filled.c
transcoder-set
FIND_MINIMUM_DIFFERENCE_PAIR.c
f_filled
1
int f_filled ( int arr [ ], 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 }
mtools-4.0.43#fat_prep#getStart.c
mtools-4.0.43
fat.c
getStart
10
uint32_t getStart(Stream_t *Dir, struct directory *dir) { Stream_t *Stream = GetFs(Dir); uint32_t first; first = (((uint16_t)((unsigned char)((dir)->start)[0] + (((unsigned char)((dir)->start)[1]) << 8)))); if(fat32RootCluster(Stream)) { first |= (uint32_t) (((uint16_t)((unsigned char)((dir)->startHi)[0] + (((unsigned char)((dir)->startHi)[1]) << 8)))) << 16; } return first; }
{ "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": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#threads_prep#xmlInitParser.c
libxml2
threads.c
xmlInitParser
4
void xmlInitParser(void) { pthread_once(&onceControl, xmlInitParserInternal); }
{ "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 }
libxml2#chvalid_prep#xmlIsExtender.c
libxml2
chvalid.c
xmlIsExtender
4
int xmlIsExtender(unsigned int ch) { return((((ch) < 0x100) ? ((((ch)) == 0xb7)) : xmlCharInRange((ch), &xmlIsExtenderGroup))); }
{ "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 }
gawk-5.2.2#builtin_prep#check_exact_args.c
gawk-5.2.2
builtin.c
check_exact_args
6
void check_exact_args(int nargs, const char *fname, int count) { if (nargs != count) (*(set_loc("builtin.c", 98), r_fatal))(gettext("%s: called with %d arguments"), fname, nargs); }
{ "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#arctwo_prep#nettle_arctwo40_set_key.c
nettle-3.9.1
arctwo.c
nettle_arctwo40_set_key
5
void nettle_arctwo40_set_key (struct arctwo_ctx *ctx, const uint8_t *key) { nettle_arctwo_set_key_ekb (ctx, 5, key, 40); }
{ "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 }
libosip2-5.3.1#port_sema_prep#osip_sem_wait.c
libosip2-5.3.1
port_sema.c
osip_sem_wait
6
int osip_sem_wait(struct osip_sem *_sem) { osip_sem_t *sem = (osip_sem_t *) _sem; if (sem == ((void *)0)) return -2; return sem_wait(sem); }
{ "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": 2, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#format_c_prep#Pl_Format_2.c
gprolog-1.5.0
format_c.c
Pl_Format_2
5
void Pl_Format_2(WamWord format_word, WamWord args_word) { Pl_Format_3(((PlLong) (0) + ((PlULong)0)), format_word, args_word); }
{ "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-c#linkhash_prep#lh_kchar_table_new.c
json-c
linkhash.c
lh_kchar_table_new
4
struct lh_table *lh_kchar_table_new(int size, lh_entry_free_fn *free_fn) { return lh_table_new(size, free_fn, char_hash_fn, lh_char_equal); }
{ "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#SUM_SERIES_12_32_52_2N_12_prep#min.c
transcoder-set
SUM_SERIES_12_32_52_2N_12.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 }
make-4.4.1#misc_prep#concat.c
make-4.4.1
misc.c
concat
31
const char * concat (unsigned int num, ...) { static size_t rlen = 0; static char *result = ((void *)0); size_t ri = 0; va_list args; __builtin_va_start(args,num); while (num-- > 0) { const char *s = __builtin_va_arg(args,const char *); size_t l = ((s)==((void *)0) ? 0 : strlen (s)); if (l == 0) continue; if (ri + l > rlen) { rlen = ((rlen ? rlen : 60) + l) * 2; result = xrealloc (result, rlen); } memcpy (result + ri, s, l); ri += l; } __builtin_va_end(args); if (ri == rlen) { rlen = (rlen ? rlen : 60) * 2; result = xrealloc (result, rlen); } result[ri] = '\0'; return result; }
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 1, "pointer_type": 2, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 1 }
grep-3.11#printf-args_prep#printf_fetchargs.c
grep-3.11
printf-args.c
printf_fetchargs
167
int printf_fetchargs (va_list args, arguments *a) { size_t i; argument *ap; for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) switch (ap->type) { case TYPE_SCHAR: ap->a.a_schar = __builtin_va_arg(args,int); break; case TYPE_UCHAR: ap->a.a_uchar = __builtin_va_arg(args,int); break; case TYPE_SHORT: ap->a.a_short = __builtin_va_arg(args,int); break; case TYPE_USHORT: ap->a.a_ushort = __builtin_va_arg(args,int); break; case TYPE_INT: ap->a.a_int = __builtin_va_arg(args,int); break; case TYPE_UINT: ap->a.a_uint = __builtin_va_arg(args,unsigned int); break; case TYPE_LONGINT: ap->a.a_longint = __builtin_va_arg(args,long int); break; case TYPE_ULONGINT: ap->a.a_ulongint = __builtin_va_arg(args,unsigned long int); break; case TYPE_LONGLONGINT: ap->a.a_longlongint = __builtin_va_arg(args,long long int); break; case TYPE_ULONGLONGINT: ap->a.a_ulonglongint = __builtin_va_arg(args,unsigned long long int); break; case TYPE_INT8_T: ap->a.a_int8_t = __builtin_va_arg(args,int); break; case TYPE_UINT8_T: ap->a.a_uint8_t = __builtin_va_arg(args,int); break; case TYPE_INT16_T: ap->a.a_int16_t = __builtin_va_arg(args,int); break; case TYPE_UINT16_T: ap->a.a_uint16_t = __builtin_va_arg(args,int); break; case TYPE_INT32_T: ap->a.a_int32_t = __builtin_va_arg(args,int32_t); break; case TYPE_UINT32_T: ap->a.a_uint32_t = __builtin_va_arg(args,uint32_t); break; case TYPE_INT64_T: ap->a.a_int64_t = __builtin_va_arg(args,int64_t); break; case TYPE_UINT64_T: ap->a.a_uint64_t = __builtin_va_arg(args,uint64_t); break; case TYPE_INT_FAST8_T: ap->a.a_int_fast8_t = __builtin_va_arg(args,int); break; case TYPE_UINT_FAST8_T: ap->a.a_uint_fast8_t = __builtin_va_arg(args,int); break; case TYPE_INT_FAST16_T: ap->a.a_int_fast16_t = __builtin_va_arg(args,int_fast16_t); break; case TYPE_UINT_FAST16_T: ap->a.a_uint_fast16_t = __builtin_va_arg(args,uint_fast16_t); break; case TYPE_INT_FAST32_T: ap->a.a_int_fast32_t = __builtin_va_arg(args,int_fast32_t); break; case TYPE_UINT_FAST32_T: ap->a.a_uint_fast32_t = __builtin_va_arg(args,uint_fast32_t); break; case TYPE_INT_FAST64_T: ap->a.a_int_fast64_t = __builtin_va_arg(args,int_fast64_t); break; case TYPE_UINT_FAST64_T: ap->a.a_uint_fast64_t = __builtin_va_arg(args,uint_fast64_t); break; case TYPE_DOUBLE: ap->a.a_double = __builtin_va_arg(args,double); break; case TYPE_LONGDOUBLE: ap->a.a_longdouble = __builtin_va_arg(args,long double); break; case TYPE_CHAR: ap->a.a_char = __builtin_va_arg(args,int); break; case TYPE_WIDE_CHAR: ap->a.a_wide_char = (sizeof (wint_t) < sizeof (int) ? (wint_t) __builtin_va_arg(args,int) : __builtin_va_arg(args,wint_t)); break; case TYPE_STRING: ap->a.a_string = __builtin_va_arg(args,const char *); if (ap->a.a_string == ((void *)0)) ap->a.a_string = "(NULL)"; break; case TYPE_WIDE_STRING: ap->a.a_wide_string = __builtin_va_arg(args,const wchar_t *); if (ap->a.a_wide_string == ((void *)0)) { static const wchar_t wide_null_string[] = { (wchar_t)'(', (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L', (wchar_t)')', (wchar_t)0 }; ap->a.a_wide_string = wide_null_string; } break; case TYPE_POINTER: ap->a.a_pointer = __builtin_va_arg(args,void *); break; case TYPE_COUNT_SCHAR_POINTER: ap->a.a_count_schar_pointer = __builtin_va_arg(args,signed char *); break; case TYPE_COUNT_SHORT_POINTER: ap->a.a_count_short_pointer = __builtin_va_arg(args,short *); break; case TYPE_COUNT_INT_POINTER: ap->a.a_count_int_pointer = __builtin_va_arg(args,int *); break; case TYPE_COUNT_LONGINT_POINTER: ap->a.a_count_longint_pointer = __builtin_va_arg(args,long int *); break; case TYPE_COUNT_LONGLONGINT_POINTER: ap->a.a_count_longlongint_pointer = __builtin_va_arg(args,long long int *); break; case TYPE_COUNT_INT8_T_POINTER: ap->a.a_count_int8_t_pointer = __builtin_va_arg(args,int8_t *); break; case TYPE_COUNT_INT16_T_POINTER: ap->a.a_count_int16_t_pointer = __builtin_va_arg(args,int16_t *); break; case TYPE_COUNT_INT32_T_POINTER: ap->a.a_count_int32_t_pointer = __builtin_va_arg(args,int32_t *); break; case TYPE_COUNT_INT64_T_POINTER: ap->a.a_count_int64_t_pointer = __builtin_va_arg(args,int64_t *); break; case TYPE_COUNT_INT_FAST8_T_POINTER: ap->a.a_count_int_fast8_t_pointer = __builtin_va_arg(args,int_fast8_t *); break; case TYPE_COUNT_INT_FAST16_T_POINTER: ap->a.a_count_int_fast16_t_pointer = __builtin_va_arg(args,int_fast16_t *); break; case TYPE_COUNT_INT_FAST32_T_POINTER: ap->a.a_count_int_fast32_t_pointer = __builtin_va_arg(args,int_fast32_t *); break; case TYPE_COUNT_INT_FAST64_T_POINTER: ap->a.a_count_int_fast64_t_pointer = __builtin_va_arg(args,int_fast64_t *); break; default: return -1; } return 0; }
{ "array_type": 1, "break_continue_statement": 46, "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": 2, "struct_type": 0, "switch_statement": 1, "type_casting": 3, "union_type": 0, "while_loop": 0 }
units-2.22#units_prep#showunitlistdef.c
units-2.22
units.c
showunitlistdef
8
void showunitlistdef(struct wantalias *alias) { logprintf("%sunit list, ",deftext); tightprint(stdout,alias->definition); if (logfile) tightprint(logfile,alias->definition); logputchar('\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": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#FIND_N_TH_ELEMENT_FROM_STERNS_DIATOMIC_SERIES_prep#main.c
transcoder-set
FIND_N_TH_ELEMENT_FROM_STERNS_DIATOMIC_SERIES.c
main
14
int main(void) { int n_success = 0; int param0[] = {37,24,13,56,26,67,82,60,64,65}; 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 }
json.h#test_prep#json_hexadecimal_value.c
json.h
test.c
json_hexadecimal_value
18
int json_hexadecimal_value(const char *c, const unsigned long size, unsigned long *result) { const char *p; int digit; if (size > sizeof(unsigned long) * 2) { return 0; } *result = 0; for (p = c; (unsigned long)(p - c) < size; ++p) { *result <<= 4; digit = json_hexadecimal_digit(*p); if (digit < 0 || digit > 15) { return 0; } *result |= (unsigned char)digit; } return 1; }
{ "array_type": 0, "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": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#wam_inst_prep#Pl_Defeasible_Undo.c
gprolog-1.5.0
wam_inst.c
Pl_Defeasible_Undo
5
void Pl_Defeasible_Undo() { Pl_Update_Choice_Point0(((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 }
tinycc#tccelf_prep#tccelf_bounds_new.c
tinycc
tccelf.c
tccelf_bounds_new
7
void tccelf_bounds_new(TCCState *s) { bounds_section = new_section(s, ".bounds", 1, (1 << 1)); lbounds_section = new_section(s, ".lbounds", 1, (1 << 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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
cflow-1.7#xmalloc_prep#xzalloc.c
cflow-1.7
xmalloc.c
xzalloc
5
void * xzalloc (size_t n) { return xcalloc (n, 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 }
transcoder-set#DECIMAL_REPRESENTATION_GIVEN_BINARY_STRING_DIVISIBLE_10_NOT_prep#main.c
transcoder-set
DECIMAL_REPRESENTATION_GIVEN_BINARY_STRING_DIVISIBLE_10_NOT.c
main
14
int main(void) { int n_success = 0; char param0[][100] = {"101000","39613456759141","11","PoiHjo","2","0000101","T s dZKeDX gK","3944713969","1000","ifYUgdpmt"}; 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#xmlIO_prep#xmlPopOutputCallbacks.c
libxml2
xmlIO.c
xmlPopOutputCallbacks
9
int xmlPopOutputCallbacks(void) { xmlInitParser(); if (xmlOutputCallbackNr <= 0) return(-1); xmlOutputCallbackNr--; return(xmlOutputCallbackNr); }
{ "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": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tulipindicators-0.9.1#tiamalgamation_prep#ti_vhf_start.c
tulipindicators-0.9.1
tiamalgamation.c
ti_vhf_start
3
int ti_vhf_start(double const *options) { return (int)options[0]; }
{ "array_type": 1, "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 }
libxml2#libxml2-py_prep#libxml_xmlParseMarkupDecl.c
libxml2
libxml2-py.c
libxml_xmlParseMarkupDecl
13
PyObject * libxml_xmlParseMarkupDecl(PyObject *self __attribute__ ((__unused__)), PyObject *args) { xmlParserCtxtPtr ctxt; PyObject *pyobj_ctxt; if (libxml_deprecationWarning("xmlParseMarkupDecl") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlParseMarkupDecl", &pyobj_ctxt)) return(((void *)0)); ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj)); xmlParseMarkupDecl(ctxt); _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": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
tmux#control-notify_prep#control_notify_session_window_changed.c
tmux
control-notify.c
control_notify_session_window_changed
11
void control_notify_session_window_changed(struct session *s) { struct client *c; for((c) = ((&clients)->tqh_first); (c) != ((void *)0); (c) = ((c)->entry.tqe_next)) { if (!((c) != ((void *)0) && ((c)->flags & 0x2000))) continue; control_write(c, "%%session-window-changed $%u @%u", s->id, s->curw->window->id); } }
{ "array_type": 0, "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": 0, "struct_type": 2, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
bc-1.07.1#scan_prep#yylex.c
bc-1.07.1
scan.c
yylex
352
int yylex (void) { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; if ( !(yy_init) ) { (yy_init) = 1; if ( ! (yy_start) ) (yy_start) = 1; if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)) ) { yyensure_buffer_stack (); (yy_buffer_stack)[(yy_buffer_stack_top)] = yy_create_buffer(yyin,16384 ); } yy_load_buffer_state( ); } while ( 1 ) { yy_cp = (yy_c_buf_p); *yy_cp = (yy_hold_char); yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[((unsigned int) (unsigned char) *yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 316 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 554 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } (yytext) = yy_bp; yyleng = (size_t) (yy_cp - yy_bp); (yy_hold_char) = *yy_cp; *yy_cp = '\0'; (yy_c_buf_p) = yy_cp;; do_action: switch ( yy_act ) { case 0: *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: { if (!std_only) (yy_start) = 1 + 2 *(1); else yyerror ("illegal character: #"); } break; case 2: { (yy_start) = 1 + 2 *(0); } break; case 3: { line_no++; (yy_start) = 1 + 2 *(0); return(258); } break; case 4: return(268); break; case 5: return(269); break; case 6: return(270); break; case 7: return(271); break; case 8: return(272); break; case 9: return(273); break; case 10: return(274); break; case 11: return(275); break; case 12: return(276); break; case 13: return(278); break; case 14: return(279); break; case 15: return(280); break; case 16: return(281); break; case 17: return(277); break; case 18: return(282); break; case 19: return(283); break; case 20: return(285); break; case 21: return(286); break; case 22: return(292); break; case 23: { yylval.s_value = strcopyof(yytext); return(263); } break; case 24: return(284); break; case 25: return(287); break; case 26: return(288); break; case 27: return(289); break; case 28: { return(286); } break; case 29: { yylval.c_value = yytext[0]; return((int)yytext[0]); } break; case 30: { return(259); } break; case 31: { return(260); } break; case 32: { return(261); } break; case 33: { yylval.c_value = yytext[0]; return((int)yytext[0]); } break; case 34: { yylval.c_value = yytext[0]; return(265); } break; case 35: { yylval.c_value = '='; do { int yyless_macro_arg = (1); ; *yy_cp = (yy_hold_char); (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - 0; (yytext) = yy_bp; yyleng = (size_t) (yy_cp - yy_bp); (yy_hold_char) = *yy_cp; *yy_cp = '\0'; (yy_c_buf_p) = yy_cp;; } while ( 0 ); return(265); } break; case 36: { yylval.s_value = strcopyof(yytext); return(266); } break; case 37: { yylval.c_value = yytext[0]; return(267); } break; case 38: { line_no++; return(258); } break; case 39: { line_no++; } break; case 40: { } break; case 41: { int c; for (;;) { while ( ((c=input()) != '*') && (c != (-1))) if (c == '\n') line_no++; if (c == '*') { while ( (c=input()) == '*') ; if (c == '/') break; if (c == '\n') line_no++; } if (c == (-1)) { fprintf (stderr,"EOF encountered in a comment.\n"); break; } } } break; case 42: { yylval.s_value = strcopyof(yytext); return(263); } break; case 43: { const char *look; int count = 0; yylval.s_value = strcopyof(yytext); for (look = yytext; *look != 0; look++) { if (*look == '\n') line_no++; if (*look == '"') count++; } if (count != 2) yyerror ("NUL character in string."); return(262); } break; case 44: { char *src, *dst; int len; len = strlen(yytext); if (yytext[len-1] == '.') yytext[len-1] = 0; src = yytext; dst = yytext; while (*src == '0') src++; if (*src == 0) src--; while (*src != 0) { if (*src == '\\') { src++; src++; line_no++; } if (*src == ',') { src++; ct_warn("Commas in numbers"); } else *dst++ = *src++; } *dst = 0; yylval.s_value = strcopyof(yytext); return(264); } break; case 45: { if (yytext[0] < ' ') yyerror ("illegal character: ^%c",yytext[0] + '@'); else if (yytext[0] > '~') yyerror ("illegal character: \\%03o", (int) yytext[0]); else yyerror ("illegal character: %s",yytext); } break; case 46: fwrite( yytext, yyleng, 1, yyout ); break; case (47 + 0 + 1): case (47 + 1 + 1): return 0; case 47: { int yy_amount_of_matched_text = (int) (yy_cp - (yytext)) - 1; *yy_cp = (yy_hold_char); if ( (yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buffer_status == 0 ) { (yy_n_chars) = (yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars; (yy_buffer_stack)[(yy_buffer_stack_top)]->yy_input_file = yyin; (yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buffer_status = 1; } if ( (yy_c_buf_p) <= &(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars)] ) { yy_state_type yy_next_state; (yy_c_buf_p) = (yytext) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext) + 0; if ( yy_next_state ) { yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case 1: { (yy_did_buffer_switch_on_eof) = 0; if ( yywrap( ) ) { (yy_c_buf_p) = (yytext) + 0; yy_act = (47 + (((yy_start) - 1) / 2) + 1); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) yyrestart(yyin ); } break; } case 0: (yy_c_buf_p) = (yytext) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext) + 0; goto yy_match; case 2: (yy_c_buf_p) = &(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext) + 0; goto yy_find_action; } break; } default: yy_fatal_error( "fatal flex scanner internal error--no action found" ); } } }
{ "array_type": 4, "break_continue_statement": 50, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 6, "if_statement": 28, "memory_management": 0, "memory_operation": 0, "pointer_type": 5, "return_statement": 40, "struct_type": 0, "switch_statement": 2, "type_casting": 9, "union_type": 0, "while_loop": 8 }
hello-2.12.1#basename_prep#base_name.c
hello-2.12.1
basename.c
base_name
21
char * base_name (char const *name) { char const *base = last_component (name); size_t length; if (! *base) return xstrndup (name, base_len (name)); length = base_len (base); if (((base[length]) == '/')) length++; if (((void) (base), 0)) { char *p = xmalloc (length + 3); p[0] = '.'; p[1] = '/'; memcpy (p + 2, base, length); p[length + 2] = '\0'; return p; } return xstrndup (base, length); }
{ "array_type": 2, "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": 2, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#parser_prep#xmlParseCharData.c
libxml2
parser.c
xmlParseCharData
4
void xmlParseCharData(xmlParserCtxtPtr ctxt, __attribute__((unused)) int cdata) { xmlParseCharDataInternal(ctxt, 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": 0, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlCatalogConvert.c
libxml2
libxml2-py.c
libxml_xmlCatalogConvert
8
PyObject * libxml_xmlCatalogConvert(PyObject *self __attribute__ ((__unused__)), PyObject *args __attribute__ ((__unused__))) { PyObject *py_retval; int c_retval; c_retval = xmlCatalogConvert(); 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": 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 }
make-4.4.1#hash_prep#hash_delete_at.c
make-4.4.1
hash.c
hash_delete_at
13
void * hash_delete_at (struct hash_table *ht, const void *slot) { void *item = *(void **) slot; if (!((item) == 0 || (void *) (item) == hash_deleted_item)) { *(void const **) slot = hash_deleted_item; ht->ht_fill--; return item; } else return 0; }
{ "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": 2, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#CALCULATE_VOLUME_DODECAHEDRON_prep#cmpfunc.c
transcoder-set
CALCULATE_VOLUME_DODECAHEDRON.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#DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE_prep#f_gold.c
transcoder-set
DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE.c
f_gold
15
_Bool f_gold ( int arr [ ], int n, int k ) { int count; for ( int i = 0; i < n; i ++ ) { count = 0; for ( int j = 0; j < n; j ++ ) { if ( arr [ j ] == arr [ i ] ) count ++; if ( count > 2 * k ) return 0; } } return 1; }
{ "array_type": 1, "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": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
pexec-1.0rc8#numhash_prep#numhash_free.c
pexec-1.0rc8
numhash.c
numhash_free
6
int numhash_free(numhashtable *nt) { numhash_local_free(&nt->table,0,nt->depth,nt->bitsize); numhash_init(nt,nt->bitsize,nt->depth); 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": 0, "union_type": 0, "while_loop": 0 }
nano-7.2#global_prep#shown_entries_for.c
nano-7.2
global.c
shown_entries_for
15
size_t shown_entries_for(int menu) { funcstruct *item = allfuncs; size_t maximum = ((COLS + 40) / 20) * 2; size_t count = 0; while (count < maximum && item != ((void *)0)) { if (item->menus & menu) count++; item = item->next; } if (menu == (1<<5) && item == ((void *)0) && first_sc_for(menu, discard_buffer) == ((void *)0)) count--; return count; }
{ "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": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 1 }
transcoder-set#EQUILIBRIUM_INDEX_OF_AN_ARRAY_1_prep#min.c
transcoder-set
EQUILIBRIUM_INDEX_OF_AN_ARRAY_1.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 }
libxml2#libxml2-py_prep#libxml_xmlSaveFile.c
libxml2
libxml2-py.c
libxml_xmlSaveFile
14
PyObject * libxml_xmlSaveFile(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; char * filename; xmlDocPtr cur; PyObject *pyobj_cur; if (!_PyArg_ParseTuple_SizeT(args, (char *)"zO:xmlSaveFile", &filename, &pyobj_cur)) return(((void *)0)); cur = (xmlDocPtr) (((pyobj_cur) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_cur))->obj)); c_retval = xmlSaveFile(filename, cur); 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": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
uucp-1.07#cusub_prep#fsysdep_terminal_puts.c
uucp-1.07
cusub.c
fsysdep_terminal_puts
41
boolean fsysdep_terminal_puts (zline) const char *zline; { char *zalc, *zprint; size_t clen; if (zline == ((void *)0)) { zalc = zbufalc (2); clen = 0; } else { clen = strlen (zline); zalc = zbufalc (clen + 2); memcpy (zalc, zline, clen); } if (fSterm) { zalc[clen] = '\r'; ++clen; } zalc[clen] = '\n'; ++clen; zprint = zalc; while (clen > 0) { int c; c = write (1, zprint, clen); if (c <= 0) { ubuffree (zalc); ulog (LOG_ERROR, "write: %s", strerror ((*__errno_location ()))); return (0); } clen -= c; zprint += c; } ubuffree (zalc); return (1); }
{ "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": 2, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 1 }
libxml2#xpath_prep#xmlXPathCastToNumber.c
libxml2
xpath.c
xmlXPathCastToNumber
4
double xmlXPathCastToNumber(xmlXPathObjectPtr val) { return(xmlXPathCastToNumberInternal(((void *)0), 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": 1, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#error_supp_prep#Pl_Os_Error.c
gprolog-1.5.0
error_supp.c
Pl_Os_Error
12
void Pl_Os_Error(int ret_val) { char *err_str = Pl_M_Sys_Err_String(ret_val); if (((pl_flag_os_error)->value) == 0) Pl_Err_System(Pl_Create_Allocate_Atom(err_str)); Update_Cur_From_C_Bip(); if (((pl_flag_os_error)->value) == 1) Pl_Stream_Printf(pl_stm_tbl[pl_stm_top_level_output], "warning: OS error: %s (from %s)\n", err_str, Context_Error_String()); }
{ "array_type": 1, "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
screen-4.9.0#layer_prep#LayerCleanupMemory.c
screen-4.9.0
layer.c
LayerCleanupMemory
7
void LayerCleanupMemory(struct layer *layer) { if (layer->l_pause.left) free(layer->l_pause.left); if (layer->l_pause.right) free(layer->l_pause.right); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 2, "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_INSERT_AND_DELETE_IN_A_SORTED_ARRAY_1_prep#len.c
transcoder-set
SEARCH_INSERT_AND_DELETE_IN_A_SORTED_ARRAY_1.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 }
tulipindicators-0.9.1#tiamalgamation_prep#tc_result_new.c
tulipindicators-0.9.1
tiamalgamation.c
tc_result_new
6
tc_result *tc_result_new() { tc_result *k = malloc(sizeof(tc_result)); if (!k) return 0; memset(k, 0, sizeof(tc_result)); return k; }
{ "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": 1, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#LONGEST_COMMON_INCREASING_SUBSEQUENCE_LCS_LIS_prep#max.c
transcoder-set
LONGEST_COMMON_INCREASING_SUBSEQUENCE_LCS_LIS.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 }
patch-2.7.6#quotearg_prep#quotearg_custom.c
patch-2.7.6
quotearg.c
quotearg_custom
6
char * quotearg_custom (char const *left_quote, char const *right_quote, char const *arg) { return quotearg_n_custom (0, left_quote, right_quote, arg); }
{ "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#SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1_prep#min.c
transcoder-set
SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1.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 }
libosip2-5.3.1#osip_transaction_prep#osip_transaction_set_your_instance.c
libosip2-5.3.1
osip_transaction.c
osip_transaction_set_your_instance
6
int osip_transaction_set_your_instance(osip_transaction_t *transaction, void *ptr) { if (transaction == ((void *)0)) return -2; transaction->reserved1 = ptr; return 0; }
{ "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": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
hello-2.12.1#quotearg_prep#set_char_quoting.c
hello-2.12.1
quotearg.c
set_char_quoting
11
int set_char_quoting (struct quoting_options *o, char c, int i) { unsigned char uc = c; unsigned int *p = (o ? o : &default_quoting_options)->quote_these_too + uc / (sizeof (int) * 8); int shift = uc % (sizeof (int) * 8); int r = (*p >> shift) & 1; *p ^= ((i & 1) ^ r) << shift; return r; }
{ "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": 1, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
transcoder-set#TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS_1_prep#max.c
transcoder-set
TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS_1.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 }
findutils-4.9.0#sharefile_prep#sharefile_destroy.c
findutils-4.9.0
sharefile.c
sharefile_destroy
7
void sharefile_destroy (sharefile_handle pv) { struct sharefile *p = pv; free (p->mode); hash_free (p->table); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#debugXML_prep#xmlDebugDumpAttr.c
libxml2
debugXML.c
xmlDebugDumpAttr
10
void xmlDebugDumpAttr(FILE *output, xmlAttrPtr attr, int depth) { xmlDebugCtxt ctxt; if (output == ((void *)0)) return; xmlCtxtDumpInitCtxt(&ctxt); ctxt.output = output; ctxt.depth = depth; xmlCtxtDumpAttr(&ctxt, attr); xmlCtxtDumpCleanCtxt(&ctxt); }
{ "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": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#COUNT_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_1_prep#cmpfunc.c
transcoder-set
COUNT_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_1.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 }
tmux#format_prep#format_entry_tree_RB_NFIND.c
tmux
format.c
format_entry_tree_RB_NFIND
1
struct format_entry * format_entry_tree_RB_NFIND(struct format_entry_tree *head, struct format_entry *elm) { struct format_entry *tmp = (head)->rbh_root; struct format_entry *res = ((void *)0); int comp; while (tmp) { comp = format_entry_cmp(elm, tmp); if (comp < 0) { res = tmp; tmp = (tmp)->entry.rbe_left; } else if (comp > 0) tmp = (tmp)->entry.rbe_right; else return (tmp); } 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": 2, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 1 }
patch-2.7.6#cloexec_prep#dup_cloexec.c
patch-2.7.6
cloexec.c
dup_cloexec
5
int dup_cloexec (int fd) { return rpl_fcntl (fd, 1030, 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": 0, "union_type": 0, "while_loop": 0 }
tmux#screen_prep#screen_resize.c
tmux
screen.c
screen_resize
17
void screen_resize(struct screen *s, u_int sx, u_int sy, int reflow) { if (sx < 1) sx = 1; if (sy < 1) sy = 1; if (sx != ((s)->grid->sx)) { screen_resize_x(s, sx); screen_reset_tabs(s); } else reflow = 0; if (sy != ((s)->grid->sy)) screen_resize_y(s, sy); if (reflow) screen_reflow(s, sx); }
{ "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": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#bignum_prep#nettle_mpz_init_set_str_256_s.c
nettle-3.9.1
bignum.c
nettle_mpz_init_set_str_256_s
7
void nettle_mpz_init_set_str_256_s(mpz_t x, size_t length, const uint8_t *s) { __gmpz_init(x); nettle_mpz_set_str_256_s(x, length, 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 }
heman#plane_prep#kmPlaneFill.c
heman
plane.c
kmPlaneFill
7
kmPlane* kmPlaneFill(kmPlane* plane, float a, float b, float c, float d) { plane->a = a; plane->b = b; plane->c = c; plane->d = d; return plane; }
{ "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#parser_prep#nodePop.c
libxml2
parser.c
nodePop
16
xmlNodePtr nodePop(xmlParserCtxtPtr ctxt) { xmlNodePtr ret; if (ctxt == ((void *)0)) return(((void *)0)); if (ctxt->nodeNr <= 0) return (((void *)0)); ctxt->nodeNr--; if (ctxt->nodeNr > 0) ctxt->node = ctxt->nodeTab[ctxt->nodeNr - 1]; else ctxt->node = ((void *)0); ret = ctxt->nodeTab[ctxt->nodeNr]; ctxt->nodeTab[ctxt->nodeNr] = ((void *)0); return (ret); }
{ "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": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
lodepng#lodepng_prep#lodepng_add_itext.c
lodepng
lodepng.c
lodepng_add_itext
4
unsigned lodepng_add_itext(LodePNGInfo* info, const char* key, const char* langtag, const char* transkey, const char* str) { return lodepng_add_itext_sized(info, key, langtag, transkey, str, lodepng_strlen(str)); }
{ "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#PYTHAGOREAN_QUADRUPLE_prep#f_gold.c
transcoder-set
PYTHAGOREAN_QUADRUPLE.c
f_gold
5
_Bool f_gold ( int a, int b, int c, int d ) { int sum = a * a + b * b + c * c; if ( d * d == sum ) return 1; else return 0; }
{ "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": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
less-633#pattern_prep#match_pattern.c
less-633
pattern.c
match_pattern
11
int match_pattern(regex_t * pattern, char *tpattern, char *line, int line_len, char **sp, char **ep, int nsp, int notbol, int search_type) { int matched = match_pattern1(pattern, tpattern, line, line_len, sp, ep, nsp, notbol, search_type); int i; for (i = 1; i <= (16 -10-1); i++) { if ((search_type & (1 << (16+(i)))) && ep[i] == sp[i]) matched = 0; } return matched; }
{ "array_type": 2, "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": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
wget-1.21.4#connect_prep#socket_family.c
wget-1.21.4
connect.c
socket_family
18
int socket_family (int sock, int endpoint) { struct sockaddr_storage storage; struct sockaddr *sockaddr = (struct sockaddr *) &storage; socklen_t addrlen = sizeof (storage); int ret; memset (sockaddr, 0, addrlen); if (endpoint == ENDPOINT_LOCAL) ret = getsockname (sock, sockaddr, &addrlen); else if (endpoint == ENDPOINT_PEER) ret = getpeername (sock, sockaddr, &addrlen); else abort (); if (ret < 0) return -1; return sockaddr->sa_family; }
{ "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": 1, "pointer_type": 1, "return_statement": 2, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
less-633#optfunc_prep#opt__P.c
less-633
optfunc.c
opt__P
27
void opt__P(int type, char *s) { char **proto; PARG parg; switch (type) { case 0: case 2: switch (*s) { case 's': proto = &prproto[0]; s++; break; case 'm': proto = &prproto[1]; s++; break; case 'M': proto = &prproto[2]; s++; break; case '=': proto = &eqproto; s++; break; case 'h': proto = &hproto; s++; break; case 'w': proto = &wproto; s++; break; default: proto = &prproto[0]; break; } free(*proto); *proto = save(s); break; case 1: parg.p_string = prproto[pr_type]; error("%s", &parg); break; } }
{ "array_type": 1, "break_continue_statement": 9, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 0, "switch_statement": 2, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#SPLIT_N_MAXIMUM_COMPOSITE_NUMBERS_prep#f_filled.c
transcoder-set
SPLIT_N_MAXIMUM_COMPOSITE_NUMBERS.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 }
gprolog-1.5.0#c_supp_prep#Pl_Rd_Boolean.c
gprolog-1.5.0
c_supp.c
Pl_Rd_Boolean
9
int Pl_Rd_Boolean(WamWord start_word) { WamWord word, tag_mask; int atom; do { WamWord deref_last_word; word = start_word; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0); atom = ((PlULong) (word) >> 3); return atom != pl_atom_false; }
{ "array_type": 0, "break_continue_statement": 1, "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": 0, "union_type": 0, "while_loop": 1 }
mcsim-6.2.0#mh_prep#PrintExpt.c
mcsim-6.2.0
mh.c
PrintExpt
51
int PrintExpt (PLEVEL plevel, char **args) { PANALYSIS panal = (PANALYSIS)args[0]; PFILE pOutFile = (PFILE)args[1]; long k, l, m, n; PEXPERIMENT pExpt = plevel->pexpt; POUTSPEC pos; static long printed_head = 0; if (!printed_head) { fprintf (pOutFile, "Level\tSimulation\tOutput_Var\tTime\tData\tPrediction\n"); printed_head = 1; } panal->pCurrentLevel[plevel->iDepth] = plevel; panal->iInstance[plevel->iDepth] = plevel->iSequence; if (pExpt != ((void *)0)) { InitModel (); for (n = 0; n <= plevel->iDepth; n++) { SetModelVars (panal->pCurrentLevel[n]); SetFixedVars (panal->pCurrentLevel[n]); } if (!DoOneExperiment (pExpt)) { printf ("Warning: DoOneExperiment failed\n"); return 0; } else { pos = &pExpt->os; for (m = 0; m < pos->nOutputs; m++) { for (k = 0; k < pos->nData; k++) if (!strcmp(pos->pszDataNames[k], pos->pszOutputNames[m])) break; for (l = 0; l < pos->pcOutputTimes[m]; l++) { for (n = 1; n < plevel->iDepth; n++) fprintf (pOutFile, "%d_", panal->iInstance[n]); fprintf (pOutFile, "%d\t", panal->iInstance[plevel->iDepth]); if (k != pos->nData) fprintf (pOutFile, "%d\t%s\t%g\t%g\t%g\n", pExpt->iExp, pos->pszOutputNames[m], pos->prgdOutputTimes[m][l], pos->prgdDataVals[k][l], pos->prgdOutputVals[m][l]); else fprintf (pOutFile, "%d\t%s\t%g\t\t%g\n", pExpt->iExp, pos->pszOutputNames[m], pos->prgdOutputTimes[m][l], pos->prgdOutputVals[m][l]); } fprintf (pOutFile, "\n"); } fprintf (pOutFile, "\n"); } } return (1); }
{ "array_type": 9, "break_continue_statement": 1, "enum_type": 0, "for_loop": 5, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
mtools-4.0.43#strtonum_prep#strtoui.c
mtools-4.0.43
strtonum.c
strtoui
3
unsigned int strtoui(const char *nptr, char **endptr, int base) { return (unsigned int) strtoul_with_range(nptr, endptr, base, (0x7fffffff * 2U + 1U)); }
{ "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#libxml2-py_prep#libxml_xmlParseDocTypeDecl.c
libxml2
libxml2-py.c
libxml_xmlParseDocTypeDecl
13
PyObject * libxml_xmlParseDocTypeDecl(PyObject *self __attribute__ ((__unused__)), PyObject *args) { xmlParserCtxtPtr ctxt; PyObject *pyobj_ctxt; if (libxml_deprecationWarning("xmlParseDocTypeDecl") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlParseDocTypeDecl", &pyobj_ctxt)) return(((void *)0)); ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj)); xmlParseDocTypeDecl(ctxt); _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": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
tinycc#tccelf_prep#fill_got_entry.c
tinycc
tccelf.c
fill_got_entry
11
void fill_got_entry(TCCState *s1, Elf64_Rela *rel) { int sym_index = ((rel->r_info) >> 32); Elf64_Sym *sym = &((Elf64_Sym *) symtab_section->data)[sym_index]; struct sym_attr *attr = get_sym_attr(s1, sym_index, 0); unsigned offset = attr->got_offset; if (0 == offset) return; section_reserve(s1->got, offset + 8); write64le(s1->got->data + offset, sym->st_value); }
{ "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": 2, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#parserInternals_prep#xmlNewParserCtxt.c
libxml2
parserInternals.c
xmlNewParserCtxt
5
xmlParserCtxtPtr xmlNewParserCtxt(void) { return(xmlNewSAXParserCtxt(((void *)0), ((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": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
libxml2#xmlunicode_prep#xmlUCSIsYiRadicals.c
libxml2
xmlunicode.c
xmlUCSIsYiRadicals
4
int xmlUCSIsYiRadicals(int code) { return(((code >= 0xA490) && (code <= 0xA4CF))); }
{ "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 }
tulipindicators-0.9.1#tiamalgamation_prep#tc_result_free.c
tulipindicators-0.9.1
tiamalgamation.c
tc_result_free
5
void tc_result_free(tc_result *result) { if (!result) return; free(result->hits); free(result); }
{ "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": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#AREA_OF_A_HEXAGON_prep#main.c
transcoder-set
AREA_OF_A_HEXAGON.c
main
14
int main(void) { int n_success = 0; double param0[] = {1772.6589509256596,-599.737107809315,1074.1765931782,-1182.4087746714795,8083.035797247716,-6126.414356565494,5370.057504189614,-6947.020794285176,2110.5107873533325,-6458.751326919488}; for(int i = 0; i < len(param0); ++i) { if(abs(1 - (0.0000001 + abs(f_gold(param0[i])) )/ (abs(f_filled(param0[i])) + 0.0000001)) < 0.001) { 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_authentication_info_prep#osip_authentication_info_get_auth_type.c
libosip2-5.3.1
osip_authentication_info.c
osip_authentication_info_get_auth_type
3
char *osip_authentication_info_get_auth_type(osip_authentication_info_t *authentication_info) { return authentication_info->auth_type; }
{ "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#xmlmemory_prep#xmlMemoryDump.c
libxml2
xmlmemory.c
xmlMemoryDump
4
void xmlMemoryDump(void) { }
{ "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 }
hello-2.12.1#quotearg_prep#quotearg_buffer.c
hello-2.12.1
quotearg.c
quotearg_buffer
13
size_t quotearg_buffer (char *buffer, size_t buffersize, char const *arg, size_t argsize, struct quoting_options const *o) { struct quoting_options const *p = o ? o : &default_quoting_options; int e = (*__errno_location ()); size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize, p->style, p->flags, p->quote_these_too, p->left_quote, p->right_quote); (*__errno_location ()) = e; return r; }
{ "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": 0, "union_type": 0, "while_loop": 0 }
json.h#allow_multi_line_strings_prep#json_value_as_number.c
json.h
allow_multi_line_strings.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#MINIMUM_OPERATIONS_MAKE_GCD_ARRAY_MULTIPLE_K_prep#max.c
transcoder-set
MINIMUM_OPERATIONS_MAKE_GCD_ARRAY_MULTIPLE_K.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 }
cflow-1.7#malloca_prep#freea.c
cflow-1.7
malloca.c
freea
13
void freea (void *p) { if ((uintptr_t) p & (sa_alignment_max - 1)) { abort (); } if ((uintptr_t) p & sa_alignment_max) { void *mem = (char *) p - ((small_t *) p)[-1]; free (mem); } }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#type_inl_c_prep#Pl_Blt_Non_Generic_Var.c
gprolog-1.5.0
type_inl_c.c
Pl_Blt_Non_Generic_Var
5
Bool Pl_Blt_Non_Generic_Var(WamWord x) { WamWord word, tag_mask; do { WamWord deref_last_word; word = x; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0); return (!((tag_mask == (PlULong)0) || (tag_mask == (PlULong)0x5))); }
{ "array_type": 0, "break_continue_statement": 1, "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": 0, "union_type": 0, "while_loop": 1 }
transcoder-set#PAINTING_FENCE_ALGORITHM_prep#cmpfunc.c
transcoder-set
PAINTING_FENCE_ALGORITHM.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 }
binn-3.0#binn_prep#binn_list_get_value.c
binn-3.0
binn.c
binn_list_get_value
20
BOOL binn_list_get_value(void* ptr, int pos, binn *value) { int i, type, count, size=0, header_size; unsigned char *p, *plimit, *base; ptr = binn_ptr(ptr); if ((ptr == 0) || (value == 0)) return 0; if (IsValidBinnHeader(ptr, &type, &count, &size, &header_size) == 0) return 0; if (type != 0xE0) return 0; if (count == 0) return 0; if ((pos <= 0) | (pos > count)) return 0; pos--; p = (unsigned char *) ptr; base = p; plimit = p + size; p += header_size; for (i = 0; i < pos; i++) { p = AdvanceDataPos(p, plimit); if ((p == 0) || (p < base)) return 0; } return GetValue(p, value); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "memory_management": 0, "memory_operation": 0, "pointer_type": 3, "return_statement": 7, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
mtools-4.0.43#hash_prep#hash_lookup.c
mtools-4.0.43
hash.c
hash_lookup
5
int hash_lookup(T_HashTable *H,void *E, void **E2, size_t *hint) { return _hash_lookup(H, E, E2, hint, 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": 0, "union_type": 0, "while_loop": 0 }
libxml2#xpath_prep#xmlXPathIsNaN.c
libxml2
xpath.c
xmlXPathIsNaN
4
int xmlXPathIsNaN(double val) { return __builtin_isnan (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 }
mcsim-6.2.0#simmonte_prep#InitSetPoints.c
mcsim-6.2.0
simmonte.c
InitSetPoints
14
BOOL InitSetPoints (PMONTECARLO pMC) { register char c; PFILE pfile; if (!(pfile = fopen(pMC->szSetPointsFilename, "r"))) ReportError (((void *)0), 0x0003 | 0x8000, pMC->szSetPointsFilename, ((void *)0)); pMC->pfileSetPoints = pfile; do { c = getc(pMC->pfileSetPoints); } while (c != '\n'); if (feof(pMC->pfileSetPoints)) ReportError (((void *)0), 0x0208 | 0x8000, pMC->szSetPointsFilename, ((void *)0)); return (!pfile); }
{ "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": 4, "union_type": 0, "while_loop": 1 }
rcs-5.10.1#b-feph_prep#dirtempunlink.c
rcs-5.10.1
b-feph.c
dirtempunlink
5
void dirtempunlink (void) { reap ((0 + 2), (top->behavior. sff), un_link); }
{ "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#status_prep#status_prompt_load_history.c
tmux
status.c
status_prompt_load_history
34
void status_prompt_load_history(void) { FILE *f; char *history_file, *line, *tmp; size_t length; if ((history_file = status_prompt_find_history_file()) == ((void *)0)) return; log_debug("loading history from %s", history_file); f = fopen(history_file, "r"); if (f == ((void *)0)) { log_debug("%s: %s", history_file, strerror((*__errno_location ()))); free(history_file); return; } free(history_file); for (;;) { if ((line = fgetln(f, &length)) == ((void *)0)) break; if (length > 0) { if (line[length - 1] == '\n') { line[length - 1] = '\0'; status_prompt_add_history(line); } else { tmp = xmalloc(length + 1); memcpy(tmp, line, length); tmp[length] = '\0'; status_prompt_add_history(tmp); free(tmp); } } } fclose(f); }
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 3, "memory_operation": 1, "pointer_type": 4, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
gawk-5.2.2#getopt1_prep#_getopt_long_only_r.c
gawk-5.2.2
getopt1.c
_getopt_long_only_r
8
int _getopt_long_only_r (int argc, char *const *argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 1, d, 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": 2, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
dap-3.10#ps_prep#pict_scale.c
dap-3.10
ps.c
pict_scale
27
void pict_scale(pict *p, double cx, double cy, double sx, double sy) { int ptn; int t; while (p) { if (sx >= sy) p->pict_r *= sy; else p->pict_r *= sx; for (t = 0; t < p->pict_ntxt; t++) { p->pict_tpt[t][0] = cx + sx * (p->pict_tpt[t][0] - cx); p->pict_tpt[t][1] = cy + sy * (p->pict_tpt[t][1] - cy); } for (ptn = 0; ptn < p->pict_npts; ptn++) { p->pict_pt[ptn][0] = cx + sx * (p->pict_pt[ptn][0] - cx); p->pict_pt[ptn][1] = cy + sy * (p->pict_pt[ptn][1] - cy); } p->pict_minx = cx + sx * (p->pict_minx - cx); p->pict_maxx = cx + sx * (p->pict_maxx - cx); p->pict_miny = cx + sx * (p->pict_miny - cx); p->pict_maxy = cx + sx * (p->pict_maxy - cx); p = p->pict_next; } }
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "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": 1 }
gawk-5.2.2#node_prep#r_free_wstr.c
gawk-5.2.2
node.c
r_free_wstr
12
void r_free_wstr(NODE *n) { ((void) (0)); if ((n->flags & WSTRCUR) != 0) { ((void) (0)); pma_free(n->sub.val.wsp); } n->sub.val.wsp = ((void *)0); n->sub.val.wslen = 0; n->flags &= ~WSTRCUR; }
{ "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": 3, "union_type": 0, "while_loop": 0 }
libxml2#schematron_prep#xmlSchematronNewMemParserCtxt.c
libxml2
schematron.c
xmlSchematronNewMemParserCtxt
25
xmlSchematronParserCtxtPtr xmlSchematronNewMemParserCtxt(const char *buffer, int size) { xmlSchematronParserCtxtPtr ret; if ((buffer == ((void *)0)) || (size <= 0)) return (((void *)0)); ret = (xmlSchematronParserCtxtPtr) xmlMalloc(sizeof(xmlSchematronParserCtxt)); if (ret == ((void *)0)) { xmlSchematronPErrMemory(((void *)0)); return (((void *)0)); } memset(ret, 0, sizeof(xmlSchematronParserCtxt)); ret->buffer = buffer; ret->size = size; ret->dict = xmlDictCreate(); ret->xctxt = xmlXPathNewContext(((void *)0)); if (ret->xctxt == ((void *)0)) { xmlSchematronPErrMemory(((void *)0)); xmlSchematronFreeParserCtxt(ret); return (((void *)0)); } return (ret); }
{ "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": 1, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 9, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#dsa-verify_prep#nettle_dsa_verify.c
nettle-3.9.1
dsa-verify.c
nettle_dsa_verify
39
int nettle_dsa_verify(const struct dsa_params *params, const mpz_t y, size_t digest_size, const uint8_t *digest, const struct dsa_signature *signature) { mpz_t w; mpz_t tmp; mpz_t v; int res; if (((signature->r)->_mp_size < 0 ? -1 : (signature->r)->_mp_size > 0) <= 0 || __gmpz_cmp(signature->r, params->q) >= 0) return 0; if (((signature->s)->_mp_size < 0 ? -1 : (signature->s)->_mp_size > 0) <= 0 || __gmpz_cmp(signature->s, params->q) >= 0) return 0; __gmpz_init(w); if (!__gmpz_invert(w, signature->s, params->q)) { __gmpz_clear(w); return 0; } __gmpz_init(tmp); __gmpz_init(v); _nettle_dsa_hash (tmp, __gmpz_sizeinbase (params->q, 2), digest_size, digest); __gmpz_mul(tmp, tmp, w); __gmpz_fdiv_r(tmp, tmp, params->q); __gmpz_powm(v, params->g, tmp, params->p); __gmpz_mul(tmp, signature->r, w); __gmpz_fdiv_r(tmp, tmp, params->q); __gmpz_powm(tmp, y, tmp, params->p); __gmpz_mul(v, v, tmp); __gmpz_fdiv_r(v, v, params->p); __gmpz_fdiv_r(v, v, params->q); res = !__gmpz_cmp(v, signature->r); __gmpz_clear(w); __gmpz_clear(tmp); __gmpz_clear(v); return res; }
{ "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": 4, "struct_type": 2, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
screen-4.9.0#fileio_prep#ReadFile.c
screen-4.9.0
fileio.c
ReadFile
41
char * ReadFile(char *fn, int *lenp) { int i, l, size; char c, *bp, *buf; struct stat stb; do {} while (0); do {} while (0); if ((i = secopen(fn, 00, 0)) < 0) { Msg((*__errno_location ()), "no %s -- no slurp", fn); return ((void *)0); } if (fstat(i, &stb)) { Msg((*__errno_location ()), "no good %s -- no slurp", fn); close(i); return ((void *)0); } size = stb.st_size; if ((buf = malloc(size)) == ((void *)0)) { close(i); Msg(0, "%s", strnomem); return ((void *)0); } (*__errno_location ()) = 0; if ((l = read(i, buf, size)) != size) { if (l < 0) l = 0; Msg((*__errno_location ()), "Got only %d bytes from %s", l, fn); } else { if (read(i, &c, 1) > 0) Msg(0, "Slurped only %d characters (of %d) into buffer - try again", l, size); else Msg(0, "Slurped %d characters into buffer", l); } close(i); *lenp = l; for (bp = buf; l-- > 0; bp++) if (*bp == '\n' && (bp == buf || bp[-1] != '\r')) *bp = '\r'; return buf; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 7, "memory_management": 1, "memory_operation": 0, "pointer_type": 2, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 2 }
transcoder-set#FIND_REPETITIVE_ELEMENT_1_N_1_2_prep#max.c
transcoder-set
FIND_REPETITIVE_ELEMENT_1_N_1_2.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 }
make-4.4.1#hash_prep#hash_print_stats.c
make-4.4.1
hash.c
hash_print_stats
11
void hash_print_stats (struct hash_table *ht, FILE *out_FILE) { fprintf (out_FILE, gettext ("Load=%lu/%lu=%.0f%%, "), ht->ht_fill, ht->ht_size, 100.0 * (double) ht->ht_fill / (double) ht->ht_size); fprintf (out_FILE, gettext ("Rehash=%u, "), ht->ht_rehashes); fprintf (out_FILE, gettext ("Collisions=%lu/%lu=%.0f%%"), ht->ht_collisions, ht->ht_lookups, (ht->ht_lookups ? (100.0 * (double) ht->ht_collisions / (double) ht->ht_lookups) : 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": 1, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
libxml2#xlink_prep#xlinkSetDefaultHandler.c
libxml2
xlink.c
xlinkSetDefaultHandler
4
void xlinkSetDefaultHandler(xlinkHandlerPtr handler) { xlinkDefaultHandler = handler; }
{ "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 }