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
libxml2#parser_prep#xmlCtxtReadMemory.c
libxml2
parser.c
xmlCtxtReadMemory
13
xmlDocPtr xmlCtxtReadMemory(xmlParserCtxtPtr ctxt, const char *buffer, int size, const char *URL, const char *encoding, int options) { xmlParserInputPtr input; if ((ctxt == ((void *)0)) || (size < 0)) return(((void *)0)); xmlCtxtReset(ctxt); xmlCtxtUseOptions(ctxt, options); input = xmlCtxtNewInputFromMemory(ctxt, URL, buffer, size, encoding, (1 << 1)); return(xmlCtxtParseDocument(ctxt, input)); }
{ "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": 2, "union_type": 0, "while_loop": 0 }
transcoder-set#HOW_TO_PRINT_MAXIMUM_NUMBER_OF_A_USING_GIVEN_FOUR_KEYS_prep#max.c
transcoder-set
HOW_TO_PRINT_MAXIMUM_NUMBER_OF_A_USING_GIVEN_FOUR_KEYS.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_FIBONACCI_NUMBERS_GIVEN_RANGE_LOG_TIME_prep#cmpfunc.c
transcoder-set
COUNT_FIBONACCI_NUMBERS_GIVEN_RANGE_LOG_TIME.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 }
optipng-0.7.8#pngget_prep#png_get_image_width.c
optipng-0.7.8
pngget.c
png_get_image_width
7
png_uint_32 png_get_image_width(png_const_structrp png_ptr, png_const_inforp info_ptr) { if (png_ptr != ((void *)0) && info_ptr != ((void *)0)) return info_ptr->width; 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 }
transcoder-set#COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW_prep#min.c
transcoder-set
COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW.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 }
transcoder-set#PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE_prep#min.c
transcoder-set
PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE.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 }
transcoder-set#COUNT_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_1_prep#sort.c
transcoder-set
COUNT_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_1.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 }
libosip2-5.3.1#osip_body_prep#osip_message_set_body.c
libosip2-5.3.1
osip_body.c
osip_message_set_body
15
int osip_message_set_body(osip_message_t *sip, const char *buf, size_t length) { osip_body_t *body; int i; i = osip_body_init(&body); if (i != 0) return i; i = osip_body_parse(body, buf, length); if (i != 0) { osip_body_free(body); return i; } sip->message_property = 2; osip_list_add(&sip->bodies, body, -1); return 0; }
{ "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": 0, "union_type": 0, "while_loop": 0 }
json.h#allow_leading_or_trailing_decimal_point_prep#json_write_minified_get_array_size.c
json.h
allow_leading_or_trailing_decimal_point.c
json_write_minified_get_array_size
14
int json_write_minified_get_array_size(const struct json_array_s *array, size_t *size) { struct json_array_element_s *element; *size += 2; if (1 < array->length) { *size += array->length - 1; } for (element = array->start; 0 != element; element = element->next) { if (json_write_minified_get_value_size(element->value, size)) { return 1; } } return 0; }
{ "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": 2, "struct_type": 2, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#c_supp_prep#Pl_Check_For_Un_In_Byte.c
gprolog-1.5.0
c_supp.c
Pl_Check_For_Un_In_Byte
5
void Pl_Check_For_Un_In_Byte(WamWord start_word) { WamWord word, tag_mask; PlLong c; 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); c = ((PlLong) ((word) << 0) >> 3); if (tag_mask != (PlULong)0 && (tag_mask != (PlULong)0x7 || (c != -1 && !((PlULong) (c) < 256)))) Pl_Err_Type(pl_type_in_byte, word); }
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
transcoder-set#PERFECT_REVERSIBLE_STRING_prep#max.c
transcoder-set
PERFECT_REVERSIBLE_STRING.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 }
libxml2#libxml2-py_prep#libxml_xmlInitializeCatalog.c
libxml2
libxml2-py.c
libxml_xmlInitializeCatalog
6
PyObject * libxml_xmlInitializeCatalog(PyObject *self __attribute__ ((__unused__)), PyObject *args __attribute__ ((__unused__))) { xmlInitializeCatalog(); _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": 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#names_prep#uname_to_uid.c
tar-1.34
names.c
uname_to_uid
26
int uname_to_uid (char const *uname, uid_t *uidp) { struct passwd *passwd; if (cached_no_such_uname && strcmp (uname, cached_no_such_uname) == 0) return 0; if (!cached_uname || uname[0] != cached_uname[0] || strcmp (uname, cached_uname) != 0) { passwd = getpwnam (uname); if (passwd) { cached_uid = passwd->pw_uid; assign_string (&cached_uname, passwd->pw_name); } else { assign_string (&cached_no_such_uname, uname); return 0; } } *uidp = cached_uid; return 1; }
{ "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": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#pbkdf2_prep#nettle_pbkdf2.c
nettle-3.9.1
pbkdf2.c
nettle_pbkdf2
41
void nettle_pbkdf2 (void *mac_ctx, nettle_hash_update_func *update, nettle_hash_digest_func *digest, size_t digest_size, unsigned iterations, size_t salt_length, const uint8_t *salt, size_t length, uint8_t *dst) { uint8_t *U; uint8_t *T; unsigned i; ((void) sizeof ((iterations > 0) ? 1 : 0), __extension__ ({ if (iterations > 0) ; else __assert_fail ("iterations > 0", "pbkdf2.c", 61, __extension__ __PRETTY_FUNCTION__); })); if (length == 0) return; (U = __builtin_alloca (sizeof (*U) * (digest_size))); (T = __builtin_alloca (sizeof (*T) * (digest_size))); for (i = 1;; i++, dst += digest_size, length -= digest_size) { uint8_t tmp[4]; uint8_t *prev; unsigned u; do { (tmp)[0] = ((i) >> 24) & 0xff; (tmp)[1] = ((i) >> 16) & 0xff; (tmp)[2] = ((i) >> 8) & 0xff; (tmp)[3] = (i) & 0xff; } while(0); update (mac_ctx, salt_length, salt); update (mac_ctx, sizeof(tmp), tmp); digest (mac_ctx, digest_size, T); prev = T; for (u = 1; u < iterations; u++, prev = U) { update (mac_ctx, digest_size, prev); digest (mac_ctx, digest_size, U); nettle_memxor (T, U, digest_size); } if (length <= digest_size) { memcpy (dst, T, length); return; } memcpy (dst, T, digest_size); } }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 2, "pointer_type": 3, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 1 }
gprolog-1.5.0#os_interf_c_prep#Pl_Unlink_1.c
gprolog-1.5.0
os_interf_c.c
Pl_Unlink_1
7
void Pl_Unlink_1(WamWord path_name_word) { char *path_name; path_name = Get_Path_Name(path_name_word); unlink(path_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": 1, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#xpath_prep#xmlXPathFreeCompExpr.c
libxml2
xpath.c
xmlXPathFreeCompExpr
37
void xmlXPathFreeCompExpr(xmlXPathCompExprPtr comp) { xmlXPathStepOpPtr op; int i; if (comp == ((void *)0)) return; if (comp->dict == ((void *)0)) { for (i = 0; i < comp->nbStep; i++) { op = &comp->steps[i]; if (op->value4 != ((void *)0)) { if (op->op == XPATH_OP_VALUE) xmlXPathFreeObject(op->value4); else xmlFree(op->value4); } if (op->value5 != ((void *)0)) xmlFree(op->value5); } } else { for (i = 0; i < comp->nbStep; i++) { op = &comp->steps[i]; if (op->value4 != ((void *)0)) { if (op->op == XPATH_OP_VALUE) xmlXPathFreeObject(op->value4); } } xmlDictFree(comp->dict); } if (comp->steps != ((void *)0)) { xmlFree(comp->steps); } if (comp->expr != ((void *)0)) { xmlFree(comp->expr); } xmlFree(comp); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 9, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 7, "union_type": 0, "while_loop": 0 }
transcoder-set#FINDING_POWER_PRIME_NUMBER_P_N_1_prep#min.c
transcoder-set
FINDING_POWER_PRIME_NUMBER_P_N_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 }
tulipindicators-0.9.1#tiamalgamation_prep#ti_abs_start.c
tulipindicators-0.9.1
tiamalgamation.c
ti_abs_start
1
int ti_abs_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 }
libxml2#list_prep#xmlListSort.c
libxml2
list.c
xmlListSort
15
void xmlListSort(xmlListPtr l) { xmlListPtr lTemp; if (l == ((void *)0)) return; if(xmlListEmpty(l)) return; lTemp = xmlListDup(l); if (lTemp == ((void *)0)) return; xmlListClear(l); xmlListMerge(l, lTemp); xmlListDelete(lTemp); }
{ "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": 2, "union_type": 0, "while_loop": 0 }
libxml2#buf_prep#xmlBufBackToBuffer.c
libxml2
buf.c
xmlBufBackToBuffer
25
int xmlBufBackToBuffer(xmlBufPtr buf, xmlBufferPtr ret) { if ((buf == ((void *)0)) || (ret == ((void *)0))) return(-1); if ((((buf)->flags & ((1u << 0) | (1u << 1)))) || (((buf)->flags & (1u << 2))) || (buf->use >= 0x7fffffff)) { xmlBufFree(buf); ret->content = ((void *)0); ret->contentIO = ((void *)0); ret->use = 0; ret->size = 0; return(-1); } ret->use = buf->use; if (buf->size >= 0x7fffffff) { ret->size = 0x7fffffff; } else { ret->size = buf->size + 1; } ret->alloc = XML_BUFFER_ALLOC_IO; ret->content = buf->content; ret->contentIO = buf->mem; xmlFree(buf); return(0); }
{ "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": 3, "union_type": 0, "while_loop": 0 }
transcoder-set#FIND_THE_MAXIMUM_ELEMENT_IN_AN_ARRAY_WHICH_IS_FIRST_INCREASING_AND_THEN_DECREASING_prep#sort.c
transcoder-set
FIND_THE_MAXIMUM_ELEMENT_IN_AN_ARRAY_WHICH_IS_FIRST_INCREASING_AND_THEN_DECREASING.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 }
libxml2#xlink_prep#xlinkGetDefaultDetect.c
libxml2
xlink.c
xlinkGetDefaultDetect
4
xlinkNodeDetectFunc xlinkGetDefaultDetect (void) { return(xlinkDefaultDetect); }
{ "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 }
libxml2#libxml2-py_prep#libxml_xmlRegexpIsDeterminist.c
libxml2
libxml2-py.c
libxml_xmlRegexpIsDeterminist
13
PyObject * libxml_xmlRegexpIsDeterminist(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; xmlRegexpPtr comp; PyObject *pyobj_comp; if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlRegexpIsDeterminist", &pyobj_comp)) return(((void *)0)); comp = (xmlRegexpPtr) (((pyobj_comp) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlReg_Object *)(pyobj_comp))->obj)); c_retval = xmlRegexpIsDeterminist(comp); 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 }
transcoder-set#FIND_POSITION_GIVEN_NUMBER_AMONG_NUMBERS_MADE_4_7_prep#main.c
transcoder-set
FIND_POSITION_GIVEN_NUMBER_AMONG_NUMBERS_MADE_4_7.c
main
13
int main(void) { int n_success = 0; char param0[][100] = {"7","305745689","444","4","2074","27","447","255","10000111111011","fAKcSDRTNz"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "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": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
json.h#allow_equals_in_object_prep#json_write_minified_array.c
json.h
allow_equals_in_object.c
json_write_minified_array
15
char *json_write_minified_array(const struct json_array_s *array, char *data) { struct json_array_element_s *element = 0; *data++ = '['; for (element = array->start; 0 != element; element = element->next) { if (element != array->start) { *data++ = ','; } data = json_write_minified_value(element->value, data); if (0 == data) { return 0; } } *data++ = ']'; return data; }
{ "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": 2, "struct_type": 2, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#ma2asm_inst_prep#C_Ret.c
gprolog-1.5.0
ma2asm_inst.c
C_Ret
7
void C_Ret(void) { Inst_Printf("addq", "$%d, %%rsp", 32 * 8); Inst_Printf("popq", "%%rbx"); Inst_Printf("ret", "%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": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#FRIENDS_PAIRING_PROBLEM_prep#f_gold.c
transcoder-set
FRIENDS_PAIRING_PROBLEM.c
f_gold
10
int f_gold ( int n ) { int dp [ n + 1 ]; for ( int i = 0; i <= n; i ++ ) { if ( i <= 2 ) dp [ i ] = i; else dp [ i ] = dp [ i - 1 ] + ( i - 1 ) * dp [ i - 2 ]; } return dp [ n ]; }
{ "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": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#LONGEST_SUBSEQUENCE_SUCH_THAT_DIFFERENCE_BETWEEN_ADJACENTS_IS_ONE_prep#f_filled.c
transcoder-set
LONGEST_SUBSEQUENCE_SUCH_THAT_DIFFERENCE_BETWEEN_ADJACENTS_IS_ONE.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 }
brotli-1.0.9#decode_prep#BrotliDecoderVersion.c
brotli-1.0.9
decode.c
BrotliDecoderVersion
3
uint32_t BrotliDecoderVersion() { return 0x1000009; }
{ "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_xmlAddDtdEntity.c
libxml2
libxml2-py.c
libxml_xmlAddDtdEntity
18
PyObject * libxml_xmlAddDtdEntity(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; xmlEntityPtr c_retval; xmlDocPtr doc; PyObject *pyobj_doc; xmlChar * name; int type; xmlChar * ExternalID; xmlChar * SystemID; xmlChar * content; if (!_PyArg_ParseTuple_SizeT(args, (char *)"Ozizzz:xmlAddDtdEntity", &pyobj_doc, &name, &type, &ExternalID, &SystemID, &content)) return(((void *)0)); doc = (xmlDocPtr) (((pyobj_doc) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_doc))->obj)); c_retval = xmlAddDtdEntity(doc, name, type, ExternalID, SystemID, content); py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) 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": 3, "union_type": 0, "while_loop": 0 }
libosip2-5.3.1#osip_authorization_prep#osip_authorization_set_crand.c
libosip2-5.3.1
osip_authorization.c
osip_authorization_set_crand
3
void osip_authorization_set_crand(osip_authorization_t *authorization, char *crand) { authorization->crand = (char *) crand; }
{ "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#ANALYSIS_OF_ALGORITHMS_SET_2_ASYMPTOTIC_ANALYSIS_prep#f_filled.c
transcoder-set
ANALYSIS_OF_ALGORITHMS_SET_2_ASYMPTOTIC_ANALYSIS.c
f_filled
1
int f_filled ( int arr [ ], int n, int 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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tulipindicators-0.9.1#mul_prep#ti_mul.c
tulipindicators-0.9.1
mul.c
ti_mul
1
int ti_mul(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *in1 = inputs[0]; const double *in2 = inputs[1]; (void)options; double *output = outputs[0]; int i; for (i = 0; i < size; ++i) { output[i] = (in1[i] * in2[i]); } return 0; }
{ "array_type": 5, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 4, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
rcs-5.10.1#rcsfnms_prep#rcsreadopen.c
rcs-5.10.1
rcsfnms.c
rcsreadopen
5
struct fro * rcsreadopen (struct maybe *m) { return fro_open (m->tentative.string, "r", m->status); }
{ "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 }
bc-1.07.1#number_prep#bc_free_num.c
bc-1.07.1
number.c
bc_free_num
13
void bc_free_num (bc_num *num) { if (*num == ((void *)0)) return; (*num)->n_refs--; if ((*num)->n_refs == 0) { if ((*num)->n_ptr) free ((*num)->n_ptr); (*num)->n_next = _bc_Free_list; _bc_Free_list = *num; } *num = ((void *)0); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 1, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
tmux#options_prep#options_get_string.c
tmux
options.c
options_get_string
11
const char * options_get_string(struct options *oo, const char *name) { struct options_entry *o; o = options_get(oo, name); if (o == ((void *)0)) fatalx("missing option %s", name); if (!((o)->tableentry == ((void *)0) || (o)->tableentry->type == OPTIONS_TABLE_STRING)) fatalx("option %s is not a string", name); return (o->string); }
{ "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": 2, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
transcoder-set#CALCULATE_ANGLE_HOUR_HAND_MINUTE_HAND_prep#f_gold.c
transcoder-set
CALCULATE_ANGLE_HOUR_HAND_MINUTE_HAND.c
f_gold
10
int f_gold ( double h, double m ) { if ( h < 0 || m < 0 || h > 12 || m > 60 ) printf ( "Wrong input" ); if ( h == 12 ) h = 0; if ( m == 60 ) m = 0; int hour_angle = 0.5 * ( h * 60 + m ); int minute_angle = 6 * m; int angle = abs ( hour_angle - minute_angle ); angle = min ( 360 - angle, angle ); return angle; }
{ "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 }
nettle-3.9.1#hmac-sha512_prep#nettle_hmac_sha512_digest.c
nettle-3.9.1
hmac-sha512.c
nettle_hmac_sha512_digest
6
void nettle_hmac_sha512_digest(struct hmac_sha512_ctx *ctx, size_t length, uint8_t *digest) { nettle_hmac_digest( &(ctx)->outer, &(ctx)->inner, &(ctx)->state, (&nettle_sha512), (length), (digest) ); }
{ "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 }
mtools-4.0.43#config_prep#check_number_parse_errno.c
mtools-4.0.43
config.c
check_number_parse_errno
11
void check_number_parse_errno(char c, const char *oarg, char *endptr) { if(endptr && *endptr) { fprintf(stderr, "Bad number %s\n", oarg); exit(1); } if((*__errno_location ())) { fprintf(stderr, "Bad number %s for -%c (%s)\n", oarg, c, strerror((*__errno_location ()))); exit(1); } }
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlUCSIsCatSc.c
libxml2
libxml2-py.c
libxml_xmlUCSIsCatSc
13
PyObject * libxml_xmlUCSIsCatSc(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsCatSc") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSIsCatSc", &code)) return(((void *)0)); c_retval = xmlUCSIsCatSc(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 }
tinycc#tccelf_prep#tccelf_delete.c
tinycc
tccelf.c
tccelf_delete
18
void tccelf_delete(TCCState *s1) { int i; for(i = 1; i < s1->nb_sections; i++) free_section(s1->sections[i]); dynarray_reset(&s1->sections, &s1->nb_sections); for(i = 0; i < s1->nb_priv_sections; i++) free_section(s1->priv_sections[i]); dynarray_reset(&s1->priv_sections, &s1->nb_priv_sections); for ( i = 0; i < s1->nb_loaded_dlls; i++) { DLLReference *ref = s1->loaded_dlls[i]; if ( ref->handle ) dlclose(ref->handle); } dynarray_reset(&s1->loaded_dlls, &s1->nb_loaded_dlls); tcc_free(s1->sym_attrs); symtab_section = ((void *)0); }
{ "array_type": 3, "break_continue_statement": 0, "enum_type": 0, "for_loop": 3, "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 }
libosip2-5.3.1#osip_content_type_prep#osip_content_type_init.c
libosip2-5.3.1
osip_content_type.c
osip_content_type_init
9
int osip_content_type_init(osip_content_type_t **content_type) { *content_type = (osip_content_type_t *) (osip_malloc_func ? osip_malloc_func(sizeof(osip_content_type_t)) : malloc(sizeof(osip_content_type_t))); if (*content_type == ((void *)0)) return -4; (*content_type)->type = ((void *)0); (*content_type)->subtype = ((void *)0); osip_list_init(&(*content_type)->gen_params); 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": 1, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#sha512_prep#nettle_sha512_update.c
nettle-3.9.1
sha512.c
nettle_sha512_update
6
void nettle_sha512_update(struct sha512_ctx *ctx, size_t length, const uint8_t *data) { do { if ((ctx)->index) { unsigned __md_left = sizeof((ctx)->block) - (ctx)->index; if ((length) < __md_left) { memcpy((ctx)->block + (ctx)->index, (data), (length)); (ctx)->index += (length); goto __md_done; } else { memcpy((ctx)->block + (ctx)->index, (data), __md_left); (nettle_sha512_compress(((ctx))->state, ((ctx)->block))); (((ctx)->count_high += !++(ctx)->count_low)); (data) += __md_left; (length) -= __md_left; } } while ((length) >= sizeof((ctx)->block)) { (nettle_sha512_compress(((ctx))->state, ((data)))); (((ctx)->count_high += !++(ctx)->count_low)); (data) += sizeof((ctx)->block); (length) -= sizeof((ctx)->block); } memcpy ((ctx)->block, (data), (length)); (ctx)->index = (length); __md_done: ; } while (0); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 1, "if_statement": 1, "memory_management": 0, "memory_operation": 1, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
patch-2.7.6#fcntl_prep#rpl_fcntl.c
patch-2.7.6
fcntl.c
rpl_fcntl
52
int rpl_fcntl (int fd, int action, ...) { va_list arg; int result = -1; __builtin_va_start(arg,action); switch (action) { case 1030: { int target = __builtin_va_arg(arg,int); static int have_dupfd_cloexec = 0 ? -1 : 0; if (0 <= have_dupfd_cloexec) { result = fcntl (fd, action, target); if (0 <= result || (*__errno_location ()) != 22) { have_dupfd_cloexec = 1; } else { result = rpl_fcntl (fd, 0, target); if (result < 0) break; have_dupfd_cloexec = -1; } } else result = rpl_fcntl (fd, 0, target); if (0 <= result && have_dupfd_cloexec == -1) { int flags = fcntl (result, 1); if (flags < 0 || fcntl (result, 2, flags | 1) == -1) { int saved_errno = (*__errno_location ()); close (result); (*__errno_location ()) = saved_errno; result = -1; } } break; } default: { void *p = __builtin_va_arg(arg,void *); result = fcntl (fd, action, p); break; } } __builtin_va_end(arg); return result; }
{ "array_type": 0, "break_continue_statement": 3, "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": 1, "struct_type": 0, "switch_statement": 1, "type_casting": 0, "union_type": 0, "while_loop": 0 }
less-633#output_prep#inttoa.c
less-633
output.c
inttoa
1
void inttoa(int num, char *buf, int radix) { int neg = (num < 0); char tbuf[((sizeof(num) * 8 - 1) * 302 / 1000 + 1 + 1)+2]; char *s = tbuf + sizeof(tbuf); if (neg) num = -num; *--s = '\0'; do { *--s = "0123456789ABCDEF"[num % radix]; } while ((num /= radix) != 0); if (neg) *--s = '-'; strcpy(buf, s); }
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
less-633#ch_prep#ch_seek.c
less-633
ch.c
ch_seek
27
int ch_seek(POSITION pos) { BLOCKNUM new_block; POSITION len; if (thisfile == ((void *)0)) return (0); len = ch_length(); if (pos < ((POSITION)0) || (len != ((POSITION)(-1)) && pos > len)) return (1); new_block = pos / 8192; if (!(thisfile->flags & 001) && pos != thisfile->fpos && !buffered(new_block)) { if (thisfile->fpos > pos) return (1); while (thisfile->fpos < pos) { if (ch_forw_get() == (-1)) return (1); if ((sigs & (01|02))) return (1); } return (0); } thisfile->block = new_block; thisfile->offset = pos % 8192; return (0); }
{ "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": 0, "return_statement": 7, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 1 }
libosip2-5.3.1#sdp_message_prep#sdp_time_descr_free.c
libosip2-5.3.1
sdp_message.c
sdp_time_descr_free
8
void sdp_time_descr_free(sdp_time_descr_t *td) { if (td == ((void *)0)) return; { if (td->t_start_time != ((void *)0)) { if (osip_free_func) osip_free_func(td->t_start_time); else free(td->t_start_time); } }; { if (td->t_stop_time != ((void *)0)) { if (osip_free_func) osip_free_func(td->t_stop_time); else free(td->t_stop_time); } }; osip_list_ofchar_free(&td->r_repeats); { if (td != ((void *)0)) { if (osip_free_func) osip_free_func(td); else free(td); } }; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 3, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
tar-1.34#quotearg_prep#quotearg_colon_mem.c
tar-1.34
quotearg.c
quotearg_colon_mem
5
char * quotearg_colon_mem (char const *arg, size_t argsize) { return quotearg_char_mem (arg, argsize, ':'); }
{ "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#NEXT_POWER_OF_2_prep#len.c
transcoder-set
NEXT_POWER_OF_2.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 }
mtools-4.0.43#direntry_prep#fprintShortPwd.c
mtools-4.0.43
direntry.c
fprintShortPwd
4
void fprintShortPwd(FILE *f, direntry_t *entry) { _fprintShortPwd(f, entry, 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 }
transcoder-set#CALCULATING_FACTORIALS_USING_STIRLING_APPROXIMATION_prep#len.c
transcoder-set
CALCULATING_FACTORIALS_USING_STIRLING_APPROXIMATION.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 }
libxml2#libxml2-py_prep#libxml_xmlUCSIsIPAExtensions.c
libxml2
libxml2-py.c
libxml_xmlUCSIsIPAExtensions
13
PyObject * libxml_xmlUCSIsIPAExtensions(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsIPAExtensions") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSIsIPAExtensions", &code)) return(((void *)0)); c_retval = xmlUCSIsIPAExtensions(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 }
transcoder-set#SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_2_prep#min.c
transcoder-set
SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_2.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 }
less-633#ch_prep#ch_end_seek.c
less-633
ch.c
ch_end_seek
15
int ch_end_seek(void) { POSITION len; if (thisfile == ((void *)0)) return (0); if (thisfile->flags & 001) thisfile->fsize = filesize(thisfile->file); len = ch_length(); if (len != ((POSITION)(-1))) return (ch_seek(len)); while (ch_forw_get() != (-1)) if ((sigs & (01|02))) return (1); return (0); }
{ "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": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 1 }
libxml2#xpath_prep#xmlXPathNewValueTree.c
libxml2
xpath.c
xmlXPathNewValueTree
9
xmlXPathObjectPtr xmlXPathNewValueTree(xmlNodePtr val) { xmlXPathObjectPtr ret; ret = xmlXPathNewNodeSet(val); if (ret == ((void *)0)) return(((void *)0)); ret->type = XPATH_XSLT_TREE; return(ret); }
{ "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": 2, "union_type": 0, "while_loop": 0 }
tulipindicators-0.9.1#max_prep#ti_max.c
tulipindicators-0.9.1
max.c
ti_max
31
int ti_max(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *input = inputs[0]; const int period = (int)options[0]; double *output = outputs[0]; if (period < 1) return 1; if (size <= ti_max_start(options)) return 0; int trail = 0, maxi = -1; double max = input[0]; int i, j; for (i = period-1; i < size; ++i, ++trail) { double bar = input[i]; if (maxi < trail) { maxi = trail; max = input[maxi]; j = trail; while(++j <= i) { bar = input[j]; if (bar >= max) { max = bar; maxi = j; } } } else if (bar >= max) { maxi = i; max = bar; } *output++ = max; } ((void) sizeof ((output - outputs[0] == size - ti_max_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_max_start(options)) ; else __assert_fail ("output - outputs[0] == size - ti_max_start(options)", "indicators/max.c", 67, __extension__ __PRETTY_FUNCTION__); })); return 0; }
{ "array_type": 4, "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": 2, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 1 }
libxml2#xmlunicode_prep#xmlUCSIsGreekandCoptic.c
libxml2
xmlunicode.c
xmlUCSIsGreekandCoptic
4
int xmlUCSIsGreekandCoptic(int code) { return(((code >= 0x0370) && (code <= 0x03FF))); }
{ "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#pch_prep#pch_name.c
patch-2.7.6
pch.c
pch_name
5
const char * pch_name (enum nametype type) { return type == NONE ? ((void *)0) : p_name[type]; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 1, "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#pngwutil_prep#png_write_finish_row.c
optipng-0.7.8
pngwutil.c
png_write_finish_row
47
void png_write_finish_row(png_structrp png_ptr) { static const png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; static const png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; static const png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; static const png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; ((void)0); png_ptr->row_number++; if (png_ptr->row_number < png_ptr->num_rows) return; if (png_ptr->interlaced != 0) { png_ptr->row_number = 0; if ((png_ptr->transformations & 0x0002U) != 0) { png_ptr->pass++; } else { do { png_ptr->pass++; if (png_ptr->pass >= 7) break; png_ptr->usr_width = (png_ptr->width + png_pass_inc[png_ptr->pass] - 1 - png_pass_start[png_ptr->pass]) / png_pass_inc[png_ptr->pass]; png_ptr->num_rows = (png_ptr->height + png_pass_yinc[png_ptr->pass] - 1 - png_pass_ystart[png_ptr->pass]) / png_pass_yinc[png_ptr->pass]; if ((png_ptr->transformations & 0x0002U) != 0) break; } while (png_ptr->usr_width == 0 || png_ptr->num_rows == 0); } if (png_ptr->pass < 7) { if (png_ptr->prev_row != ((void *)0)) memset(png_ptr->prev_row, 0, ((png_ptr->usr_channels * png_ptr->usr_bit_depth) >= 8 ? ((size_t)(png_ptr->width) * (((size_t)(png_ptr->usr_channels * png_ptr->usr_bit_depth)) >> 3)) : (( ((size_t)(png_ptr->width) * ((size_t)(png_ptr->usr_channels * png_ptr->usr_bit_depth))) + 7) >> 3) ) + 1); return; } } png_compress_IDAT(png_ptr, ((void *)0), 0, 4); }
{ "array_type": 4, "break_continue_statement": 2, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 7, "memory_management": 0, "memory_operation": 1, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 1 }
libxml2#libxml2-py_prep#libxml_xmlURISetOpaque.c
libxml2
libxml2-py.c
libxml_xmlURISetOpaque
13
PyObject * libxml_xmlURISetOpaque(PyObject *self __attribute__ ((__unused__)), PyObject *args) { xmlURIPtr URI; PyObject *pyobj_URI; char * opaque; if (!_PyArg_ParseTuple_SizeT(args, (char *)"Oz:xmlURISetOpaque", &pyobj_URI, &opaque)) return(((void *)0)); URI = (xmlURIPtr) (((pyobj_URI) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyURI_Object *)(pyobj_URI))->obj)); if (URI->opaque != ((void *)0)) xmlFree(URI->opaque); URI->opaque = (char *)xmlStrdup((const xmlChar *)opaque); _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 }
libxml2#xmlunicode_prep#xmlUCSIsCatMc.c
libxml2
xmlunicode.c
xmlUCSIsCatMc
4
int xmlUCSIsCatMc(int code) { return(xmlCharInRange((unsigned int)code, &xmlMcG)); }
{ "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#SUM_BINOMIAL_COEFFICIENTS_1_prep#cmpfunc.c
transcoder-set
SUM_BINOMIAL_COEFFICIENTS_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 }
tar-1.34#misc_prep#stat_diag.c
tar-1.34
misc.c
stat_diag
11
void stat_diag (char const *name) { if (ignore_failed_read_option) { if ((warning_option & (0x00800000))) stat_warn (name); } else stat_error (name); }
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tar-1.34#misc_prep#tar_dirname.c
tar-1.34
misc.c
tar_dirname
5
const char * tar_dirname (void) { return wd[chdir_current].name; }
{ "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#globals_prep#xmlThrDefDeregisterNodeDefault.c
libxml2
globals.c
xmlThrDefDeregisterNodeDefault
11
xmlDeregisterNodeFunc xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func) { xmlDeregisterNodeFunc old; xmlMutexLock(&xmlThrDefMutex); old = xmlDeregisterNodeDefaultValueThrDef; xmlRegisterCallbacks = 1; xmlDeregisterNodeDefaultValueThrDef = func; xmlMutexUnlock(&xmlThrDefMutex); return(old); }
{ "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#search_prep#to_prev_anchor.c
nano-7.2
search.c
to_prev_anchor
7
void to_prev_anchor(void) { linestruct *line = openfile->current; do { line = (line->prev) ? line->prev : openfile->filebot; } while (!line->has_anchor && line != openfile->current); go_to_and_confirm(line); }
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 1 }
tulipindicators-0.9.1#benchmark_prep#rvi_option_setter.c
tulipindicators-0.9.1
benchmark.c
rvi_option_setter
5
void rvi_option_setter(double period, double *options, int ti) { (void)ti; options[0] = period; options[1] = 10; }
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY_prep#f_filled.c
transcoder-set
FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY.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 }
libosip2-5.3.1#nict_prep#__osip_nict_need_timer_k_event.c
libosip2-5.3.1
nict.c
__osip_nict_need_timer_k_event
3
osip_event_t *__osip_nict_need_timer_k_event(osip_nict_t *nict, state_t state, int transactionid) { return __osip_transaction_need_timer_x_event(nict, &nict->timer_k_start, state == NICT_COMPLETED, transactionid, TIMEOUT_K); }
{ "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 }
json.h#allow_location_information_prep#json_hexadecimal_value.c
json.h
allow_location_information.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 }
tulipindicators-0.9.1#sma_prep#ti_sma_stream_free.c
tulipindicators-0.9.1
sma.c
ti_sma_stream_free
3
void ti_sma_stream_free(ti_stream *stream) { free(stream); }
{ "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": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
less-633#optfunc_prep#opt_status_col_width.c
less-633
optfunc.c
opt_status_col_width
18
void opt_status_col_width(int type, char *s) { PARG parg; switch (type) { case 0: case 2: if (status_col_width > 4) { parg.p_int = 4; error("Status column width must not be larger than %d", &parg); status_col_width = 2; } break; case 1: break; } }
{ "array_type": 0, "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 }
less-633#line_prep#pshift_all.c
less-633
line.c
pshift_all
9
void pshift_all(void) { int i; for (i = linebuf.print; i < linebuf.end; i++) if (linebuf.attr[i] == (1 << 4)) xbuf_add_byte(&shifted_ansi, (unsigned char) linebuf.buf[i]); linebuf.end = linebuf.print; end_column = linebuf.pfx_end; }
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
pth-2.0.7#pth_sync_prep#pth_mutex_init.c
pth-2.0.7
pth_sync.c
pth_mutex_init
9
int pth_mutex_init(pth_mutex_t *mutex) { if (mutex == ((void *)0)) return ((*__errno_location ()) = (22), ((0))); mutex->mx_state = (1<<(0)); mutex->mx_owner = ((void *)0); mutex->mx_count = 0; 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": 2, "union_type": 0, "while_loop": 0 }
transcoder-set#FLOOR_IN_A_SORTED_ARRAY_1_prep#sort.c
transcoder-set
FLOOR_IN_A_SORTED_ARRAY_1.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 }
screen-4.9.0#encoding_prep#recode_mchar.c
screen-4.9.0
encoding.c
recode_mchar
32
struct mchar * recode_mchar(mc, from, to) struct mchar *mc; int from, to; { static struct mchar rmc; int c; do {} while (0); if (from == to || (from != 8 && to != 8)) return mc; rmc = *mc; if (rmc.font == 0 && from != 8) rmc.font = encodings[from].deffont; if (rmc.font == 0) return mc; c = rmc.image | (rmc.font << 8); if (from == 8) c |= rmc.fontx << 16; if (rmc.mbcs) { int c2 = rmc.mbcs; c = recode_char_dw_to_encoding(c, &c2, to); rmc.mbcs = c2; } else c = recode_char_to_encoding(c, to); rmc.image = c & 255; rmc.font = c >> 8 & 255; if (to == 8) rmc.fontx = c >> 16 & 255; return &rmc; }
{ "array_type": 1, "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": 0, "return_statement": 3, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
screen-4.9.0#display_prep#freetty.c
screen-4.9.0
display.c
freetty
17
void freetty() { if (display->d_userfd >= 0) close(display->d_userfd); do {} while (0); display->d_userfd = -1; display->d_obufp = 0; display->d_obuffree = 0; if (display->d_obuf) free(display->d_obuf); display->d_obuf = 0; display->d_obuflen = 0; display->d_obuflenmax = -display->d_obufmax; display->d_blocked = 0; display->d_blocked_fuzz = 0; }
{ "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": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
transcoder-set#CHECK_LARGE_NUMBER_DIVISIBLE_11_NOT_prep#min.c
transcoder-set
CHECK_LARGE_NUMBER_DIVISIBLE_11_NOT.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 }
binn-3.0#binn_prep#binn_list_double.c
binn-3.0
binn.c
binn_list_double
5
double binn_list_double(void *list, int pos) { double value; binn_list_get(list, pos, 0x82, &value, ((void *)0)); return value; }
{ "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#CIRCLE_LATTICE_POINTS_prep#sort.c
transcoder-set
CIRCLE_LATTICE_POINTS.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 }
tulipindicators-0.9.1#smoke_prep#compare_arrays.c
tulipindicators-0.9.1
smoke.c
compare_arrays
17
void compare_arrays(double *a, double *b, int size_a, int size_b) { int i; do { ++ltests; if ((size_a) != (size_b)) { ++lfails; printf("%s:%d (%d != %d)\n", "smoke.c", 42, (size_a), (size_b)); }} while (0); if (size_a != size_b) { printf("Size mismatch.\n"); } const int f = lfails; for (i = 0; i < size_a; ++i) { do { ++ltests; if (fabs((double)(a[i])-(double)(b[i])) > 0.001) { ++lfails; printf("%s:%d (%f != %f)\n", "smoke.c", 50, (double)(a[i]), (double)(b[i])); }} while (0); } if (lfails != f) { printf("Expected Got\n"); for (i = 0; i < size_a; ++i) { printf("%8.3f %8.3f\n", a[i], b[i]); } } }
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "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": 2 }
cflow-1.7#hash_prep#hash_get_first.c
cflow-1.7
hash.c
hash_get_first
12
void * hash_get_first (const Hash_table *table) { struct hash_entry const *bucket; if (table->n_entries == 0) return ((void *)0); for (bucket = table->bucket; ; bucket++) if (! (bucket < table->bucket_limit)) abort (); else if (bucket->data) return bucket->data; }
{ "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": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
hello-2.12.1#version-etc_prep#version_etc_va.c
hello-2.12.1
version-etc.c
version_etc_va
15
void version_etc_va (FILE *stream, const char *command_name, const char *package, const char *version, va_list authors) { size_t n_authors; const char *authtab[10]; for (n_authors = 0; n_authors < 10 && (authtab[n_authors] = __builtin_va_arg(authors,const char *)) != ((void *)0); n_authors++) ; version_etc_arn (stream, command_name, package, version, authtab, n_authors); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "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#parser_prep#xmlHasFeature.c
libxml2
parser.c
xmlHasFeature
71
int xmlHasFeature(xmlFeature feature) { switch (feature) { case XML_WITH_THREAD: return(1); case XML_WITH_TREE: return(1); case XML_WITH_OUTPUT: return(1); case XML_WITH_PUSH: return(1); case XML_WITH_READER: return(1); case XML_WITH_PATTERN: return(1); case XML_WITH_WRITER: return(1); case XML_WITH_SAX1: return(1); case XML_WITH_HTTP: return(0); case XML_WITH_VALID: return(1); case XML_WITH_HTML: return(1); case XML_WITH_LEGACY: return(0); case XML_WITH_C14N: return(1); case XML_WITH_CATALOG: return(1); case XML_WITH_XPATH: return(1); case XML_WITH_XPTR: return(1); case XML_WITH_XINCLUDE: return(1); case XML_WITH_ICONV: return(1); case XML_WITH_ISO8859X: return(1); case XML_WITH_UNICODE: return(1); case XML_WITH_REGEXP: return(1); case XML_WITH_AUTOMATA: return(1); case XML_WITH_EXPR: return(0); case XML_WITH_SCHEMAS: return(1); case XML_WITH_SCHEMATRON: return(1); case XML_WITH_MODULES: return(1); case XML_WITH_DEBUG: return(1); case XML_WITH_DEBUG_MEM: return(0); case XML_WITH_ZLIB: return(0); case XML_WITH_LZMA: return(0); case XML_WITH_ICU: return(0); default: break; } return(0); }
{ "array_type": 0, "break_continue_statement": 1, "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": 32, "struct_type": 0, "switch_statement": 1, "type_casting": 0, "union_type": 0, "while_loop": 0 }
heman#vec3_prep#kmVec3Zero.c
heman
vec3.c
kmVec3Zero
6
kmVec3* kmVec3Zero(kmVec3* pOut) { pOut->x = 0.0f; pOut->y = 0.0f; pOut->z = 0.0f; return pOut; }
{ "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#display_prep#AddStr.c
screen-4.9.0
display.c
AddStr
15
void AddStr(str) char *str; { register char c; do {} while (0); if (display->d_encoding == 8) { while ((c = *str++)) AddUtf8((unsigned char)c); return; } while ((c = *str++)) do { if (--display->d_obuffree <= 0) Resize_obuf(); *display->d_obufp++ = (c); } while (0); }
{ "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": 4 }
transcoder-set#COMPUTE_NCR_P_SET_1_INTRODUCTION_AND_DYNAMIC_PROGRAMMING_SOLUTION_prep#main.c
transcoder-set
COMPUTE_NCR_P_SET_1_INTRODUCTION_AND_DYNAMIC_PROGRAMMING_SOLUTION.c
main
16
int main(void) { int n_success = 0; int param0[] = {82,45,44,88,90,98,80,60,52,71}; int param1[] = {5,24,68,24,75,55,54,75,73,26}; int param2[] = {94,95,61,43,57,43,88,65,86,45}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i])) { n_success+=1; } break; } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "array_type": 3, "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 }
uucp-1.07#xqtsub_prep#fsysdep_unlock_uuxqt_file.c
uucp-1.07
xqtsub.c
fsysdep_unlock_uuxqt_file
16
boolean fsysdep_unlock_uuxqt_file (zfile) const char *zfile; { char *zcopy, *z; boolean fret; zcopy = zbufcpy (zfile); z = strrchr (zcopy, '/'); if (z == ((void *)0)) *zcopy = 'L'; else *(z + 1) = 'L'; fret = fsdo_unlock (zcopy, (1)); ubuffree (zcopy); return fret; }
{ "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": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tar-1.34#argp-help_prep#argp_failure.c
tar-1.34
argp-help.c
argp_failure
40
void argp_failure (const struct argp_state *state, int status, int errnum, const char *fmt, ...) { if (!state || !(state->flags & 0x02)) { FILE *stream = state ? state->err_stream : stderr; if (stream) { flockfile (stream); fputs_unlocked (state ? state->name : (program_invocation_short_name), stream); if (fmt) { va_list ap; __builtin_va_start(ap,fmt); putc_unlocked (':', stream); putc_unlocked (' ', stream); vfprintf (stream, fmt, ap); __builtin_va_end(ap); } if (errnum) { char buf[200]; char const *s = ((void *)0); putc_unlocked (':', stream); putc_unlocked (' ', stream); s = strerror_r (errnum, buf, sizeof buf); if (! s && ! (s = strerror (errnum))) s = dgettext (state->root_argp->argp_domain, "Unknown system error"); fputs_unlocked (s, stream); } putc_unlocked ('\n', stream); funlockfile (stream); if (status && (!state || !(state->flags & 0x20))) exit (status); } } }
{ "array_type": 1, "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": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
bc-1.07.1#warranty_prep#welcome.c
bc-1.07.1
warranty.c
welcome
6
void welcome() { printf ("This is free software with ABSOLUTELY NO WARRANTY.\n"); printf ("For details type `warranty'. \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 }
nettle-3.9.1#rsa-pkcs1-verify_prep#nettle_rsa_pkcs1_verify.c
nettle-3.9.1
rsa-pkcs1-verify.c
nettle_rsa_pkcs1_verify
13
int nettle_rsa_pkcs1_verify(const struct rsa_public_key *key, size_t length, const uint8_t *digest_info, const mpz_t s) { int res; mpz_t m; __gmpz_init (m); res = (nettle_pkcs1_rsa_digest_encode (m, key->size, length, digest_info) && _nettle_rsa_verify (key, m, s)); __gmpz_clear(m); return res; }
{ "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 }
gawk-5.2.2#awkgram_prep#is_alpha.c
gawk-5.2.2
awkgram.c
is_alpha
18
_Bool is_alpha(int c) { switch (c) { case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': return 1; } 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": 2, "struct_type": 0, "switch_statement": 1, "type_casting": 0, "union_type": 0, "while_loop": 0 }
json.h#allow_unquoted_keys_prep#json_write_get_number_size.c
json.h
allow_unquoted_keys.c
json_write_get_number_size
81
int json_write_get_number_size(const struct json_number_s *number, size_t *size) { uintmax_t parsed_number; size_t i; if (number->number_size >= 2) { switch (number->number[1]) { default: break; case 'x': case 'X': parsed_number = strtoumax(number->number, 0, 0); i = 0; while (0 != parsed_number) { parsed_number /= 10; i++; } *size += i; return 0; } } i = 0; if ((i < number->number_size) && (('+' == number->number[i]) || ('-' == number->number[i]))) { i++; } if ((i < number->number_size) && ('I' == number->number[i])) { const char *inf = "Infinity"; size_t k; for (k = i; k < number->number_size; k++) { const char c = *inf++; if ('\0' == c) { break; } else if (c != number->number[k]) { break; } } if ('\0' == *inf) { *size += 22; if ('-' == number->number[0]) { *size += 1; } } return 0; } if ((i < number->number_size) && ('N' == number->number[i])) { const char *nan = "NaN"; size_t k; for (k = i; k < number->number_size; k++) { const char c = *nan++; if ('\0' == c) { break; } else if (c != number->number[k]) { break; } } if ('\0' == *nan) { *size += 1; return 0; } } if ((i < number->number_size) && ('.' == number->number[i])) { *size += 1; goto cleanup; } for (; i < number->number_size; i++) { const char c = number->number[i]; if (!('0' <= c && c <= '9')) { break; } } if ((i + 1 == number->number_size) && ('.' == number->number[i])) { *size += 1; goto cleanup; } cleanup: *size += number->number_size; if ('+' == number->number[0]) { *size -= 1; } return 0; }
{ "array_type": 1, "break_continue_statement": 6, "enum_type": 0, "for_loop": 3, "function_pointer": 0, "goto_statement": 2, "if_statement": 15, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 4, "struct_type": 1, "switch_statement": 1, "type_casting": 0, "union_type": 0, "while_loop": 1 }
cpio-2.14#rmt_prep#xalloc_die.c
cpio-2.14
rmt.c
xalloc_die
6
void xalloc_die (void) { rmt_error (12); exit (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": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_1_prep#main.c
transcoder-set
CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_1.c
main
15
int main(void) { int n_success = 0; int param0[] = {57,3,10,10,6,2,2,20,96,25}; int param1[] = {1,9,101,10000,46656,2048,40,79,98,5}; 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 }
tulipindicators-0.9.1#tiamalgamation_prep#ti_cmo.c
tulipindicators-0.9.1
tiamalgamation.c
ti_cmo
23
int ti_cmo(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *input = inputs[0]; double *output = outputs[0]; const int period = (int)options[0]; if (period < 1) return 1; if (size <= ti_cmo_start(options)) return 0; double up_sum = 0, down_sum = 0; int i; for (i = 1; i <= period; ++i) { up_sum += (input[(i)] > input[(i)-1] ? input[(i)] - input[(i)-1] : 0); down_sum += (input[(i)] < input[(i)-1] ? input[(i)-1] - input[(i)] : 0); } *output++ = 100 * (up_sum - down_sum) / (up_sum + down_sum); for (i = period+1; i < size; ++i) { up_sum -= (input[(i-period)] > input[(i-period)-1] ? input[(i-period)] - input[(i-period)-1] : 0); down_sum -= (input[(i-period)] < input[(i-period)-1] ? input[(i-period)-1] - input[(i-period)] : 0); up_sum += (input[(i)] > input[(i)-1] ? input[(i)] - input[(i)-1] : 0); down_sum += (input[(i)] < input[(i)-1] ? input[(i)-1] - input[(i)] : 0); *output++ = 100 * (up_sum - down_sum) / (up_sum + down_sum); } ((void) sizeof ((output - outputs[0] == size - ti_cmo_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_cmo_start(options)) ; else __assert_fail ("output - outputs[0] == size - ti_cmo_start(options)", "tiamalgamation.c", 2137, __extension__ __PRETTY_FUNCTION__); })); return 0; }
{ "array_type": 3, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
libxml2#entities_prep#xmlCopyEntitiesTable.c
libxml2
entities.c
xmlCopyEntitiesTable
4
xmlEntitiesTablePtr xmlCopyEntitiesTable(xmlEntitiesTablePtr table) { return(xmlHashCopySafe(table, xmlCopyEntity, xmlFreeEntityWrapper)); }
{ "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 }
wget-1.21.4#utils_prep#fnmatch_nocase.c
wget-1.21.4
utils.c
fnmatch_nocase
5
int fnmatch_nocase (const char *pattern, const char *string, int flags) { return fnmatch (pattern, string, flags | (1 << 4)); }
{ "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 }
optipng-0.7.8#deflate_prep#deflateResetKeep.c
optipng-0.7.8
deflate.c
deflateResetKeep
22
int deflateResetKeep(z_streamp strm) { deflate_state *s; if (deflateStateCheck(strm)) { return (-2); } strm->total_in = strm->total_out = 0; strm->msg = 0; strm->data_type = 2; s = (deflate_state *)strm->state; s->pending = 0; s->pending_out = s->pending_buf; if (s->wrap < 0) { s->wrap = -s->wrap; } s->status = 42; strm->adler = adler32(0L, 0, 0); s->last_flush = -2; _tr_init(s); return 0; }
{ "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": 0, "union_type": 0, "while_loop": 0 }
libxml2#HTMLtree_prep#htmlNodeDumpOutput.c
libxml2
HTMLtree.c
htmlNodeDumpOutput
5
void htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, const char *encoding __attribute__((unused))) { htmlNodeDumpFormatOutput(buf, doc, cur, ((void *)0), 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": 1, "union_type": 0, "while_loop": 0 }