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
transcoder-set#NON_REPEATING_ELEMENT_prep#len.c
transcoder-set
NON_REPEATING_ELEMENT.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 }
uucp-1.07#trans_prep#floop.c
uucp-1.07
trans.c
floop
205
boolean floop (qdaemon) struct sdaemon *qdaemon; { boolean fret; fret = (1); while (! qdaemon->fhangup) { register struct stransfer *q; if (iDebug != 0) { ulog_close (); ustats_close (); } if (qdaemon->fmaster) { boolean fhangup; qdaemon->frequest_hangup = (0); fhangup = (0); if (qdaemon->fhangup_requested && qTsend == ((void *)0) && (qTreceive == ((void *)0) || qdaemon->cchans > 1)) { do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, ("floop: Transferring control at remote request")); } while (0); fhangup = (1); } else if (qTremote == ((void *)0) && qTlocal == ((void *)0) && qTsend == ((void *)0) && qTreceive == ((void *)0)) { if (! fqueue (qdaemon, (boolean *) ((void *)0))) { fret = (0); break; } if (qTlocal == ((void *)0)) { do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, ("floop: No work for master")); } while (0); fhangup = (1); } } if (fhangup) { if (! (*qdaemon->qproto->pfsendcmd) (qdaemon, "H", 0, 0)) { fret = (0); break; } qdaemon->fmaster = (0); } } if (! qdaemon->fmaster) qdaemon->fhangup_requested = (0); while (qTremote != ((void *)0)) { q = qTremote; utdequeue (q); utqueue (&qTsend, q, (1)); } if (qdaemon->fmaster || qdaemon->cchans > 1) { while (qTlocal != ((void *)0) && cTchans < qdaemon->cchans) { q = qTlocal; if (! fqueue_send (qdaemon, q)) { fret = (0); break; } utchanalc (qdaemon, q); } if (! fret) break; } q = qTsend; if (q == ((void *)0)) { ulog_user ((const char *) ((void *)0)); do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, ("floop: Waiting for data")); } while (0); if (! (*qdaemon->qproto->pfwait) (qdaemon)) { fret = (0); break; } } else { ulog_user (q->s.zuser); if (! q->fsendfile) { if (! (*q->psendfn) (q, qdaemon)) { fret = (0); break; } } else { long isecs, imicros; boolean fcharged; long cmax_time; long istart = 0; long inextsecs = 0, inextmicros; if (! fttime (qdaemon, &isecs, &imicros)) { fret = (0); break; } fcharged = (0); if (q->zlog != ((void *)0)) { ulog (LOG_NORMAL, "%s", q->zlog); ubuffree (q->zlog); q->zlog = ((void *)0); } cmax_time = qdaemon->qsys->uuconf_cmax_file_time; if (qdaemon->cchans <= 1) cmax_time = 0; if (cmax_time > 0) istart = ixsysdep_time (((void *)0)); while (q == qTsend && q->fsendfile && qTremote == ((void *)0)) { char *zdata; size_t cdata; long ipos; zdata = (*qdaemon->qproto->pzgetspace) (qdaemon, &cdata); if (zdata == ((void *)0)) { fret = (0); break; } if (feof (q->e)) cdata = 0; else { cdata = fread ((zdata), 1, (cdata), (q->e)); if (ferror (q->e)) { ulog (LOG_ERROR, "read: %s", strerror ((*__errno_location ()))); fret = (0); break; } } ipos = q->ipos; q->ipos += cdata; q->cbytes += cdata; if (! (*qdaemon->qproto->pfsenddata) (qdaemon, zdata, cdata, q->ilocal, q->iremote, ipos)) { fret = (0); break; } if (cdata == 0) { inextsecs = ixsysdep_process_time (&inextmicros); do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, ("floop: Charging %ld to %c %s %s"), (((inextsecs - isecs) * 1000000 + inextmicros - imicros)), (q->s.bcmd), (q->s.zfrom), (q->s.zto)); } while (0); q->isecs += inextsecs - isecs; q->imicros += inextmicros - imicros; fcharged = (1); q->fsendfile = (0); if (! (*q->psendfn) (q, qdaemon)) fret = (0); break; } if (cmax_time > 0 && q->qnext != q && ixsysdep_time (((void *)0)) - istart >= cmax_time) { do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, ("floop: Switch file")); } while (0); utdequeue (q); utqueue (&qTsend, q, (0)); } } if (! fret) break; if (! fcharged) { inextsecs = ixsysdep_process_time (&inextmicros); do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, ("floop: Charging %ld to %c %s %s"), (((inextsecs - isecs) * 1000000 + inextmicros - imicros)), (q->s.bcmd), (q->s.zfrom), (q->s.zto)); } while (0); q->isecs += inextsecs - isecs; q->imicros += inextmicros - imicros; } if (inextsecs - iTchecktime >= (600)) { if (! fcheck_queue (qdaemon)) { fret = (0); break; } } } } } ulog_user ((const char *) ((void *)0)); (void) (*qdaemon->qproto->pfshutdown) (qdaemon); if (fret) uwindow_acked (qdaemon, (1)); else ufailed (qdaemon); return fret; }
{ "array_type": 0, "break_continue_statement": 13, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 38, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 1, "struct_type": 2, "switch_statement": 0, "type_casting": 20, "union_type": 0, "while_loop": 10 }
json.h#allow_hexadecimal_numbers_prep#json_value_is_false.c
json.h
allow_hexadecimal_numbers.c
json_value_is_false
3
int json_value_is_false(const struct json_value_s *const value) { return value->type == json_type_false; }
{ "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#TRIANGULAR_MATCHSTICK_NUMBER_prep#main.c
transcoder-set
TRIANGULAR_MATCHSTICK_NUMBER.c
main
14
int main(void) { int n_success = 0; int param0[] = {6,25,15,30,17,80,27,13,12,67}; 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 }
tulipindicators-0.9.1#tiamalgamation_prep#ti_nvi_start.c
tulipindicators-0.9.1
tiamalgamation.c
ti_nvi_start
4
int ti_nvi_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 }
tulipindicators-0.9.1#tiamalgamation_prep#ti_log10_start.c
tulipindicators-0.9.1
tiamalgamation.c
ti_log10_start
1
int ti_log10_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 }
less-633#output_prep#postoa.c
less-633
output.c
postoa
1
void postoa(POSITION 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 }
pth-2.0.7#pth_tcb_prep#__pth_tcb_free.c
pth-2.0.7
pth_tcb.c
__pth_tcb_free
13
void __pth_tcb_free(pth_t t) { if (t == ((void *)0)) return; if (t->stack != ((void *)0) && !t->stackloan) free(t->stack); if (t->data_value != ((void *)0)) free(t->data_value); if (t->cleanups != ((void *)0)) __pth_cleanup_popall(t, (0)); free(t); return; }
{ "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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
tmux#format_prep#format_entry_tree_RB_REMOVE_COLOR.c
tmux
format.c
format_entry_tree_RB_REMOVE_COLOR
1
void format_entry_tree_RB_REMOVE_COLOR(struct format_entry_tree *head, struct format_entry *parent, struct format_entry *elm) { struct format_entry *tmp; while ((elm == ((void *)0) || (elm)->entry.rbe_color == 0) && elm != (head)->rbh_root) { if ((parent)->entry.rbe_left == elm) { tmp = (parent)->entry.rbe_right; if ((tmp)->entry.rbe_color == 1) { do { (tmp)->entry.rbe_color = 0; (parent)->entry.rbe_color = 1; } while (0); do { (tmp) = (parent)->entry.rbe_right; if (((parent)->entry.rbe_right = (tmp)->entry.rbe_left)) { ((tmp)->entry.rbe_left)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_left = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_right; } if (((tmp)->entry.rbe_left == ((void *)0) || ((tmp)->entry.rbe_left)->entry.rbe_color == 0) && ((tmp)->entry.rbe_right == ((void *)0) || ((tmp)->entry.rbe_right)->entry.rbe_color == 0)) { (tmp)->entry.rbe_color = 1; elm = parent; parent = (elm)->entry.rbe_parent; } else { if ((tmp)->entry.rbe_right == ((void *)0) || ((tmp)->entry.rbe_right)->entry.rbe_color == 0) { struct format_entry *oleft; if ((oleft = (tmp)->entry.rbe_left)) (oleft)->entry.rbe_color = 0; (tmp)->entry.rbe_color = 1; do { (oleft) = (tmp)->entry.rbe_left; if (((tmp)->entry.rbe_left = (oleft)->entry.rbe_right)) { ((oleft)->entry.rbe_right)->entry.rbe_parent = (tmp); } do {} while (0); if (((oleft)->entry.rbe_parent = (tmp)->entry.rbe_parent)) { if ((tmp) == ((tmp)->entry.rbe_parent)->entry.rbe_left) ((tmp)->entry.rbe_parent)->entry.rbe_left = (oleft); else ((tmp)->entry.rbe_parent)->entry.rbe_right = (oleft); } else (head)->rbh_root = (oleft); (oleft)->entry.rbe_right = (tmp); (tmp)->entry.rbe_parent = (oleft); do {} while (0); if (((oleft)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_right; } (tmp)->entry.rbe_color = (parent)->entry.rbe_color; (parent)->entry.rbe_color = 0; if ((tmp)->entry.rbe_right) ((tmp)->entry.rbe_right)->entry.rbe_color = 0; do { (tmp) = (parent)->entry.rbe_right; if (((parent)->entry.rbe_right = (tmp)->entry.rbe_left)) { ((tmp)->entry.rbe_left)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_left = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); elm = (head)->rbh_root; break; } } else { tmp = (parent)->entry.rbe_left; if ((tmp)->entry.rbe_color == 1) { do { (tmp)->entry.rbe_color = 0; (parent)->entry.rbe_color = 1; } while (0); do { (tmp) = (parent)->entry.rbe_left; if (((parent)->entry.rbe_left = (tmp)->entry.rbe_right)) { ((tmp)->entry.rbe_right)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_right = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_left; } if (((tmp)->entry.rbe_left == ((void *)0) || ((tmp)->entry.rbe_left)->entry.rbe_color == 0) && ((tmp)->entry.rbe_right == ((void *)0) || ((tmp)->entry.rbe_right)->entry.rbe_color == 0)) { (tmp)->entry.rbe_color = 1; elm = parent; parent = (elm)->entry.rbe_parent; } else { if ((tmp)->entry.rbe_left == ((void *)0) || ((tmp)->entry.rbe_left)->entry.rbe_color == 0) { struct format_entry *oright; if ((oright = (tmp)->entry.rbe_right)) (oright)->entry.rbe_color = 0; (tmp)->entry.rbe_color = 1; do { (oright) = (tmp)->entry.rbe_right; if (((tmp)->entry.rbe_right = (oright)->entry.rbe_left)) { ((oright)->entry.rbe_left)->entry.rbe_parent = (tmp); } do {} while (0); if (((oright)->entry.rbe_parent = (tmp)->entry.rbe_parent)) { if ((tmp) == ((tmp)->entry.rbe_parent)->entry.rbe_left) ((tmp)->entry.rbe_parent)->entry.rbe_left = (oright); else ((tmp)->entry.rbe_parent)->entry.rbe_right = (oright); } else (head)->rbh_root = (oright); (oright)->entry.rbe_left = (tmp); (tmp)->entry.rbe_parent = (oright); do {} while (0); if (((oright)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_left; } (tmp)->entry.rbe_color = (parent)->entry.rbe_color; (parent)->entry.rbe_color = 0; if ((tmp)->entry.rbe_left) ((tmp)->entry.rbe_left)->entry.rbe_color = 0; do { (tmp) = (parent)->entry.rbe_left; if (((parent)->entry.rbe_left = (tmp)->entry.rbe_right)) { ((tmp)->entry.rbe_right)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_right = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); elm = (head)->rbh_root; break; } } } if (elm) (elm)->entry.rbe_color = 0; }
{ "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": 3, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 1 }
less-633#line_prep#pflushmbc.c
less-633
line.c
pflushmbc
10
int pflushmbc(void) { int r = 0; if (mbc_buf_len > 0) { r = flush_mbc_buf(mbc_pos); mbc_buf_len = 0; } return r; }
{ "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 }
json.h#allow_simplified_json_prep#json_parse_object.c
json.h
allow_simplified_json.c
json_parse_object
89
void json_parse_object(struct json_parse_state_s *state, int is_global_object, struct json_object_s *object) { const size_t flags_bitset = state->flags_bitset; const size_t size = state->size; const char *const src = state->src; size_t elements = 0; int allow_comma = 0; struct json_object_element_s *previous = 0; if (is_global_object) { if ('{' == src[state->offset]) { is_global_object = 0; } } if (!is_global_object) { state->offset++; } (void)json_skip_all_skippables(state); elements = 0; while (state->offset < size) { struct json_object_element_s *element = 0; struct json_string_s *string = 0; struct json_value_s *value = 0; if (!is_global_object) { (void)json_skip_all_skippables(state); if ('}' == src[state->offset]) { state->offset++; break; } } else { if (json_skip_all_skippables(state)) { break; } } if (allow_comma) { if (',' == src[state->offset]) { state->offset++; allow_comma = 0; continue; } } element = (struct json_object_element_s *)state->dom; state->dom += sizeof(struct json_object_element_s); if (0 == previous) { object->start = element; } else { previous->next = element; } previous = element; if (json_parse_flags_allow_location_information & flags_bitset) { struct json_string_ex_s *string_ex = (struct json_string_ex_s *)state->dom; state->dom += sizeof(struct json_string_ex_s); string_ex->offset = state->offset; string_ex->line_no = state->line_no; string_ex->row_no = state->offset - state->line_offset; string = &(string_ex->string); } else { string = (struct json_string_s *)state->dom; state->dom += sizeof(struct json_string_s); } element->name = string; (void)json_parse_key(state, string); (void)json_skip_all_skippables(state); state->offset++; (void)json_skip_all_skippables(state); if (json_parse_flags_allow_location_information & flags_bitset) { struct json_value_ex_s *value_ex = (struct json_value_ex_s *)state->dom; state->dom += sizeof(struct json_value_ex_s); value_ex->offset = state->offset; value_ex->line_no = state->line_no; value_ex->row_no = state->offset - state->line_offset; value = &(value_ex->value); } else { value = (struct json_value_s *)state->dom; state->dom += sizeof(struct json_value_s); } element->value = value; json_parse_value(state, 0, value); elements++; allow_comma = 1; } if (previous) { previous->next = 0; } if (0 == elements) { object->start = 0; } object->length = elements; }
{ "array_type": 0, "break_continue_statement": 3, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 13, "memory_management": 0, "memory_operation": 0, "pointer_type": 6, "return_statement": 0, "struct_type": 8, "switch_statement": 0, "type_casting": 15, "union_type": 0, "while_loop": 1 }
libxml2#xmlwriter_prep#xmlTextWriterWriteComment.c
libxml2
xmlwriter.c
xmlTextWriterWriteComment
20
int xmlTextWriterWriteComment(xmlTextWriterPtr writer, const xmlChar * content) { int count; int sum; sum = 0; count = xmlTextWriterStartComment(writer); if (count < 0) return -1; sum += count; count = xmlTextWriterWriteString(writer, content); if (count < 0) return -1; sum += count; count = xmlTextWriterEndComment(writer); if (count < 0) return -1; sum += count; return sum; }
{ "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": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tmux#screen_prep#screen_pop_title.c
tmux
screen.c
screen_pop_title
14
void screen_pop_title(struct screen *s) { struct screen_title_entry *title_entry; if (s->titles == ((void *)0)) return; title_entry = ((s->titles)->tqh_first); if (title_entry != ((void *)0)) { screen_set_title(s, title_entry->text); do { if (((title_entry)->entry.tqe_next) != ((void *)0)) (title_entry)->entry.tqe_next->entry.tqe_prev = (title_entry)->entry.tqe_prev; else (s->titles)->tqh_last = (title_entry)->entry.tqe_prev; *(title_entry)->entry.tqe_prev = (title_entry)->entry.tqe_next; ; ; } while (0); free(title_entry->text); free(title_entry); } }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 2, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 2, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 1 }
lodepng#lodepng_prep#lodepng_clear_icc.c
lodepng
lodepng.c
lodepng_clear_icc
7
void lodepng_clear_icc(LodePNGInfo* info) { string_cleanup(&info->iccp_name); lodepng_free(info->iccp_profile); info->iccp_profile = ((void *)0); info->iccp_profile_size = 0; info->iccp_defined = 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 }
nettle-3.9.1#testutils_prep#print_hex.c
nettle-3.9.1
testutils.c
print_hex
21
void print_hex(size_t length, const uint8_t *data) { size_t i; for (i = 0; i < length; i++) { switch (i % 16) { default: break; case 0: printf("\n"); break; case 8: printf(" "); break; } printf("%02x", data[i]); } printf("\n"); }
{ "array_type": 1, "break_continue_statement": 3, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 1, "type_casting": 0, "union_type": 0, "while_loop": 0 }
dap-3.10#machdep_prep#dap_getint.c
dap-3.10
machdep.c
dap_getint
24
int dap_getint(char code[]) { int i, j; int ndig; int sign; if (!strncmp(code, "0", 1)) return 0; sign = (code[0] < '0'); if (sign) ndig = '0' - code[0]; else ndig = code[0] - '0'; if (sign) { for (j = 1, i = 0; j <= ndig; j++) i = ((i << 6) | (0x40 + '!' - code[j])); } else { for (j = 1, i = 0; j <= ndig; j++) i = ((i << 6) | (code[j] - '!')); } return (sign ? -i : i); }
{ "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": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlXPathRegisteredNsCleanup.c
libxml2
libxml2-py.c
libxml_xmlXPathRegisteredNsCleanup
11
PyObject * libxml_xmlXPathRegisteredNsCleanup(PyObject *self __attribute__ ((__unused__)), PyObject *args) { xmlXPathContextPtr ctxt; PyObject *pyobj_ctxt; if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlXPathRegisteredNsCleanup", &pyobj_ctxt)) return(((void *)0)); ctxt = (xmlXPathContextPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlXPathContext_Object *)(pyobj_ctxt))->obj)); xmlXPathRegisteredNsCleanup(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": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
optipng-0.7.8#pngread_prep#png_read_rows.c
optipng-0.7.8
pngread.c
png_read_rows
34
void png_read_rows(png_structrp png_ptr, png_bytepp row, png_bytepp display_row, png_uint_32 num_rows) { png_uint_32 i; png_bytepp rp; png_bytepp dp; ((void)0); if (png_ptr == ((void *)0)) return; rp = row; dp = display_row; if (rp != ((void *)0) && dp != ((void *)0)) for (i = 0; i < num_rows; i++) { png_bytep rptr = *rp++; png_bytep dptr = *dp++; png_read_row(png_ptr, rptr, dptr); } else if (rp != ((void *)0)) for (i = 0; i < num_rows; i++) { png_bytep rptr = *rp; png_read_row(png_ptr, rptr, ((void *)0)); rp++; } else if (dp != ((void *)0)) for (i = 0; i < num_rows; i++) { png_bytep dptr = *dp; png_read_row(png_ptr, ((void *)0), dptr); dp++; } }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 3, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 7, "union_type": 0, "while_loop": 0 }
mcsim-6.2.0#modelu_prep#SetInput.c
mcsim-6.2.0
modelu.c
SetInput
7
BOOL SetInput (HVAR hvar, PIFN pifn) { if (!pifn || !IsInput(hvar)) return (0); memcpy (&vrgInputs[((int) ((hvar) & 0x0FFFF))], pifn, sizeof(IFN)); return (1); }
{ "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": 1, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#buf_prep#xmlBufferFree.c
libxml2
buf.c
xmlBufferFree
10
void xmlBufferFree(xmlBufferPtr buf) { if (buf == ((void *)0)) return; if (buf->alloc == XML_BUFFER_ALLOC_IO) xmlFree(buf->contentIO); else xmlFree(buf->content); xmlFree(buf); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
rcs-5.10.1#rcstime_prep#str2date.c
rcs-5.10.1
rcstime.c
str2date
11
void str2date (char const *source, char target[(6 + 16)]) { time2date (str2time_checked (source, (top->behavior. now.tv_sec), (top->behavior. zone_offset.valid) ? (top->behavior. zone_offset.seconds) : ((top->behavior. version) < ((5) - 5) ? (((long) -24 * 60 * 60) - 1) : 0)), target); }
{ "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#REMAINDER_7_LARGE_NUMBERS_prep#max.c
transcoder-set
REMAINDER_7_LARGE_NUMBERS.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_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_prep#cmpfunc.c
transcoder-set
COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X.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 }
uucp-1.07#bytfre_prep#csysdep_bytes_free.c
uucp-1.07
bytfre.c
csysdep_bytes_free
11
long csysdep_bytes_free (zfile) const char *zfile; { struct fs_usage s; if (get_fs_usage ((char *) zfile, (char *) ((void *)0), &s) < 0) return -1; if (s.fsu_bavail >= 0x7fffffffffffffffL / (long) 512) return 0x7fffffffffffffffL; return s.fsu_bavail * (long) 512; }
{ "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": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
transcoder-set#COUNT_SET_BITS_IN_AN_INTEGER_3_prep#min.c
transcoder-set
COUNT_SET_BITS_IN_AN_INTEGER_3.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 }
ed-1.19#io_prep#get_stdin_line.c
ed-1.19
io.c
get_stdin_line
34
const char * get_stdin_line( int * const sizep ) { static char * buf = 0; static int bufsz = 0; int i = 0; while( true ) { const int c = getchar(); if( !resize_buffer( &buf, &bufsz, i + 2 ) ) { *sizep = 0; return 0; } if( c == (-1) ) { if( ferror( stdin ) ) { show_strerror( "stdin", (*__errno_location ()) ); set_error_msg( "Cannot read stdin" ); clearerr( stdin ); *sizep = 0; return 0; } if( feof( stdin ) ) { set_error_msg( "Unexpected end-of-file" ); clearerr( stdin ); buf[0] = 0; *sizep = 0; if( i > 0 ) ++linenum_; return buf; } } else { buf[i++] = c; if( c == 0 ) set_binary(); if( c != '\n' ) continue; ++linenum_; buf[i] = 0; *sizep = i; return buf; } } }
{ "array_type": 1, "break_continue_statement": 1, "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": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
libxml2#libxml2-py_prep#libxml_xmlParseDTD.c
libxml2
libxml2-py.c
libxml_xmlParseDTD
12
PyObject * libxml_xmlParseDTD(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; xmlDtdPtr c_retval; xmlChar * ExternalID; xmlChar * SystemID; if (!_PyArg_ParseTuple_SizeT(args, (char *)"zz:xmlParseDTD", &ExternalID, &SystemID)) return(((void *)0)); c_retval = xmlParseDTD(ExternalID, SystemID); 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": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
transcoder-set#COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY_prep#len.c
transcoder-set
COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY.c
len
1
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
wget-1.21.4#warc_prep#warc_tempfile.c
wget-1.21.4
warc.c
warc_tempfile
17
FILE * warc_tempfile (void) { char filename[100]; int fd; if (path_search (filename, 100, opt.warc_tempdir, "wget", 1) == -1) return ((void *)0); fd = mkostemp (filename, 0); if (fd < 0) return ((void *)0); if (unlink (filename) < 0) { close(fd); return ((void *)0); } return fdopen (fd, "wb+"); }
{ "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": 0, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
tar-1.34#xattr-at_prep#setxattrat.c
tar-1.34
xattr-at.c
setxattrat
53
int setxattrat (int fd, char const *file , const char *name, const void *value , size_t size, int flags) { ; if (fd == -100 || (((file)[0]) == '/')) return (setxattr (file , name, value, size, flags)); { struct saved_cwd saved_cwd; int saved_errno; int err; { char proc_buf[((4096) < (4096 - 64) ? (4096) : (4096 - 64))]; char *proc_file = openat_proc_name (proc_buf, fd, file); if (proc_file) { int proc_result = (setxattr (proc_file , name, value, size, flags)); int proc_errno = (*__errno_location ()); if (proc_file != proc_buf) free (proc_file); if (-1 != proc_result) return proc_result; if (! ((proc_errno) == 20 || (proc_errno) == 2 || (proc_errno) == 1 || (proc_errno) == 13 || (proc_errno) == 38 || (proc_errno) == 95 )) { (*__errno_location ()) = proc_errno; return proc_result; } } } if (save_cwd (&saved_cwd) != 0) openat_save_fail ((*__errno_location ())); if (0 <= fd && fd == saved_cwd.desc) { free_cwd (&saved_cwd); (*__errno_location ()) = 9; return -1; } if (fchdir (fd) != 0) { saved_errno = (*__errno_location ()); free_cwd (&saved_cwd); (*__errno_location ()) = saved_errno; return -1; } err = (setxattr (file , name, value, size, flags)); saved_errno = (err == -1 ? (*__errno_location ()) : 0); if (restore_cwd (&saved_cwd) != 0) openat_restore_fail ((*__errno_location ())); free_cwd (&saved_cwd); if (saved_errno) (*__errno_location ()) = saved_errno; return err; } }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 10, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 6, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tmux#session_prep#sessions_RB_MINMAX.c
tmux
session.c
sessions_RB_MINMAX
1
struct session * sessions_RB_MINMAX(struct sessions *head, int val) { struct session *tmp = (head)->rbh_root; struct session *parent = ((void *)0); while (tmp) { parent = tmp; if (val < 0) tmp = (tmp)->entry.rbe_left; else tmp = (tmp)->entry.rbe_right; } return (parent); };
{ "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 }
make-4.4.1#main_prep#reset_makeflags.c
make-4.4.1
main.c
reset_makeflags
7
void reset_makeflags (enum variable_origin origin) { decode_env_switches (("MAKEFLAGS"), (sizeof ("MAKEFLAGS")-1), origin); construct_include_path (include_dirs ? include_dirs->list : ((void *)0)); define_makeflags (rebuilding_makefiles); }
{ "array_type": 0, "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#input_prep#sexp_get_char.c
nettle-3.9.1
input.c
sexp_get_char
26
void sexp_get_char(struct sexp_input *input) { if (input->coding) for (;;) { size_t done; sexp_get_raw_char(input); if (input->ctype == SEXP_EOF_CHAR) die("Unexpected end of file in coded data.\n"); if (input->c == input->terminator) { input->ctype = SEXP_END_CHAR; return; } done = 1; if (!input->coding->decode_update(&input->state, &done, &input->c, 1, (const char*) &input->c)) die("Invalid coded data.\n"); if (done) return; } else sexp_get_raw_char(input); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tulipindicators-0.9.1#benchmark_prep#run_ti.c
tulipindicators-0.9.1
benchmark.c
run_ti
23
int run_ti(const ti_indicator_info *info, double *options, int goal) { static double *inputs[] = {0, 0, 0, 0, 0}; static double *outputs[] = {out[0], out[1], out[2], out[3], out[4]}; if (goal == 0) { ind_offset = info->start(options); const int ret = info->indicator(4000, (double const *const *)inputs, options, outputs); if (ret != 0) { printf(" *ERROR* (%d)\n", ret); printf("options:\n"); int i; for (i = 0; i < info->options; ++i) { printf("%d = %f\n", i, options[i]); } return 1; } } else if (goal == 1) { ti_setup(info, inputs); } else if (goal == 2) { } else { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "benchmark.c", 400, __extension__ __PRETTY_FUNCTION__); })); } return 0; }
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#MINIMUM_COST_FOR_ACQUIRING_ALL_COINS_WITH_K_EXTRA_COINS_ALLOWED_WITH_EVERY_COIN_prep#len.c
transcoder-set
MINIMUM_COST_FOR_ACQUIRING_ALL_COINS_WITH_K_EXTRA_COINS_ALLOWED_WITH_EVERY_COIN.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 }
dap-3.10#sbstrans_prep#sbsgetc.c
dap-3.10
sbstrans.c
sbsgetc
8
int sbsgetc(FILE *sbsfile) { int c; c = dgetc(sbsfile, ((void *)0), 0); if (c == '\n') sbslineno++; return c; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#COMPUTE_NCR_P_SET_1_INTRODUCTION_AND_DYNAMIC_PROGRAMMING_SOLUTION_prep#len.c
transcoder-set
COMPUTE_NCR_P_SET_1_INTRODUCTION_AND_DYNAMIC_PROGRAMMING_SOLUTION.c
len
1
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tmux#arguments_prep#args_free.c
tmux
arguments.c
args_free
13
void args_free(struct args *args) { struct args_entry *entry; struct args_entry *entry1; cmd_free_argv(args->argc, args->argv); for ((entry) = args_tree_RB_MINMAX(&args->tree, -1); ((entry) != ((void *)0)) && ((entry1) = args_tree_RB_NEXT(entry), 1); (entry) = (entry1)) { args_tree_RB_REMOVE(&args->tree, entry); free(entry->value); free(entry); } free(args); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 3, "memory_operation": 0, "pointer_type": 2, "return_statement": 0, "struct_type": 3, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#gcm-aes_prep#nettle_gcm_aes_decrypt.c
nettle-3.9.1
gcm-aes.c
nettle_gcm_aes_decrypt
6
void nettle_gcm_aes_decrypt(struct gcm_aes_ctx *ctx, size_t length, uint8_t *dst, const uint8_t *src) { (0 ? (nettle_aes_encrypt)(&(ctx)->cipher, ~(size_t) 0, (uint8_t *) 0, (const uint8_t *) 0) : nettle_gcm_decrypt(&(ctx)->gcm, &(ctx)->key, &(ctx)->cipher, (nettle_cipher_func *) (nettle_aes_encrypt), (length), (dst), (src))); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#PROGRAM_CHECK_INPUT_INTEGER_STRING_prep#f_gold.c
transcoder-set
PROGRAM_CHECK_INPUT_INTEGER_STRING.c
f_gold
6
_Bool f_gold ( char s [] ) { for ( int i = 0; i < strlen(s); i ++ ) if ( isdigit ( s [ i ] ) == 0 ) return 0; return 1; }
{ "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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
screen-4.9.0#layer_prep#KillLayerChain.c
screen-4.9.0
layer.c
KillLayerChain
23
void KillLayerChain(struct layer *lay) { struct canvas *cv, *ncv; struct layer *l, *oldflayer; oldflayer = flayer; do {} while (0); for (l = lay; l; l = l->l_next) { if (l->l_layfn == &WinLf || l->l_layfn == &BlankLf) break; do {} while (0); if (oldflayer == l) oldflayer = 0; for (cv = l->l_cvlist; cv; cv = ncv) { ncv = cv->c_lnext; cv->c_layer = 0; cv->c_lnext = 0; } } flayer = lay; while (flayer != l) ExitOverlayPage(); flayer = oldflayer; }
{ "array_type": 0, "break_continue_statement": 1, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 4, "return_statement": 0, "struct_type": 3, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 3 }
gprolog-1.5.0#dynam_supp_prep#Pl_Delete_Dynamic_Clause.c
gprolog-1.5.0
dynam_supp.c
Pl_Delete_Dynamic_Clause
18
void Pl_Delete_Dynamic_Clause(DynCInf *clause) { DynPInf *dyn; Bool first; dyn = clause->dyn; first = (dyn->first_erased_cl == ((void *)0)); clause->erase_stamp = erase_stamp; clause->next_erased_cl = dyn->first_erased_cl; dyn->first_erased_cl = clause; if (first) { dyn->next_dyn_with_erase = first_dyn_with_erase; first_dyn_with_erase = dyn; } size_of_erased += clause->term_size; Clean_Erased_Clauses(); }
{ "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": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY_prep#len.c
transcoder-set
FIND_A_FIXED_POINT_IN_A_GIVEN_ARRAY.c
len
1
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#SQUARE_ROOT_OF_AN_INTEGER_1_prep#f_filled.c
transcoder-set
SQUARE_ROOT_OF_AN_INTEGER_1.c
f_filled
1
int f_filled ( 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 }
heman#draw_prep#heman_draw_colored_circles.c
heman
draw.c
heman_draw_colored_circles
32
void heman_draw_colored_circles(heman_image* target, heman_points* pts, int radius, const heman_color* colors) { int fwidth = radius * 2 + 1; int radius2 = radius * radius; float* src = pts->data; float inv = 1.0f / 255.0f; int w = target->width; int h = target->height; for (int k = 0; k < pts->width; k++) { float x = src[0]; float y = src[1]; src += pts->nbands; int ii = x * w - radius; int jj = y * h - radius; for (int kj = 0; kj < fwidth; kj++) { for (int ki = 0; ki < fwidth; ki++) { int i = ii + ki; int j = jj + kj; int r2 = ((i - x * w) * (i - x * w)) + ((j - y * h) * (j - y * h)); if (r2 > radius2) { continue; } float* texel = heman_image_texel(target, i, j); heman_color rgb = colors[k]; *texel++ = (float)(rgb >> 16) * inv; *texel++ = (float)((rgb >> 8) & 0xff) * inv; *texel = (float)(rgb & 0xff) * inv; } } } }
{ "array_type": 2, "break_continue_statement": 1, "enum_type": 0, "for_loop": 3, "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 }
nano-7.2#utils_prep#mallocstrcpy.c
nano-7.2
utils.c
mallocstrcpy
7
char *mallocstrcpy(char *dest, const char *src) { size_t count = strlen(src) + 1; dest = nrealloc(dest, count); strncpy(dest, src, count); return dest; }
{ "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_xmlKeepBlanksDefault.c
libxml2
libxml2-py.c
libxml_xmlKeepBlanksDefault
13
PyObject * libxml_xmlKeepBlanksDefault(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int val; if (libxml_deprecationWarning("xmlKeepBlanksDefault") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlKeepBlanksDefault", &val)) return(((void *)0)); c_retval = xmlKeepBlanksDefault(val); 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 }
findutils-4.9.0#pred_prep#pred_links.c
findutils-4.9.0
pred.c
pred_links
21
_Bool pred_links (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) { (void) pathname; switch (pred_ptr->args.numinfo.kind) { case COMP_GT: if (stat_buf->st_nlink > pred_ptr->args.numinfo.l_val) return (1); break; case COMP_LT: if (stat_buf->st_nlink < pred_ptr->args.numinfo.l_val) return (1); break; case COMP_EQ: if (stat_buf->st_nlink == pred_ptr->args.numinfo.l_val) return (1); break; } return (0); }
{ "array_type": 0, "break_continue_statement": 3, "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": 1, "switch_statement": 1, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#xmlschemastypes_prep#xmlSchemaNewStringValue.c
libxml2
xmlschemastypes.c
xmlSchemaNewStringValue
16
xmlSchemaValPtr xmlSchemaNewStringValue(xmlSchemaValType type, const xmlChar *value) { xmlSchemaValPtr val; if (type != XML_SCHEMAS_STRING) return(((void *)0)); val = (xmlSchemaValPtr) xmlMalloc(sizeof(xmlSchemaVal)); if (val == ((void *)0)) { return(((void *)0)); } memset(val, 0, sizeof(xmlSchemaVal)); val->type = type; val->value.str = (xmlChar *) value; return(val); }
{ "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": 1, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
brotli-1.0.9#metablock_prep#BrotliBuildMetaBlock.c
brotli-1.0.9
metablock.c
BrotliBuildMetaBlock
141
void BrotliBuildMetaBlock(MemoryManager* m, const uint8_t* ringbuffer, const size_t pos, const size_t mask, BrotliEncoderParams* params, uint8_t prev_byte, uint8_t prev_byte2, Command* cmds, size_t num_commands, ContextType literal_context_mode, MetaBlockSplit* mb) { static const size_t kMaxNumberOfHistograms = 256; HistogramDistance* distance_histograms; HistogramLiteral* literal_histograms; ContextType* literal_context_modes = ((void *)0); size_t literal_histograms_size; size_t distance_histograms_size; size_t i; size_t literal_context_multiplier = 1; uint32_t npostfix; uint32_t ndirect_msb = 0; int check_orig = 1; double best_dist_cost = 1e99; BrotliEncoderParams orig_params = *params; BrotliEncoderParams new_params = *params; for (npostfix = 0; npostfix <= 3; npostfix++) { for (; ndirect_msb < 16; ndirect_msb++) { uint32_t ndirect = ndirect_msb << npostfix; int skip; double dist_cost; BrotliInitDistanceParams(&new_params, npostfix, ndirect); if (npostfix == orig_params.dist.distance_postfix_bits && ndirect == orig_params.dist.num_direct_distance_codes) { check_orig = 0; } skip = !ComputeDistanceCost( cmds, num_commands, &orig_params.dist, &new_params.dist, &dist_cost); if (skip || (dist_cost > best_dist_cost)) { break; } best_dist_cost = dist_cost; params->dist = new_params.dist; } if (ndirect_msb > 0) ndirect_msb--; ndirect_msb /= 2; } if (check_orig) { double dist_cost; ComputeDistanceCost(cmds, num_commands, &orig_params.dist, &orig_params.dist, &dist_cost); if (dist_cost < best_dist_cost) { params->dist = orig_params.dist; } } RecomputeDistancePrefixes(cmds, num_commands, &orig_params.dist, &params->dist); BrotliSplitBlock(m, cmds, num_commands, ringbuffer, pos, mask, params, &mb->literal_split, &mb->command_split, &mb->distance_split); if ((!!0)) return; if (!params->disable_literal_context_modeling) { literal_context_multiplier = 1 << 6; literal_context_modes = ((mb->literal_split.num_types) > 0 ? ((ContextType*)BrotliAllocate((m), (mb->literal_split.num_types) * sizeof(ContextType))) : ((void *)0)); if ((!!0) || (!!0)) return; for (i = 0; i < mb->literal_split.num_types; ++i) { literal_context_modes[i] = literal_context_mode; } } literal_histograms_size = mb->literal_split.num_types * literal_context_multiplier; literal_histograms = ((literal_histograms_size) > 0 ? ((HistogramLiteral*)BrotliAllocate((m), (literal_histograms_size) * sizeof(HistogramLiteral))) : ((void *)0)); if ((!!0) || (!!0)) return; ClearHistogramsLiteral(literal_histograms, literal_histograms_size); distance_histograms_size = mb->distance_split.num_types << 2; distance_histograms = ((distance_histograms_size) > 0 ? ((HistogramDistance*)BrotliAllocate((m), (distance_histograms_size) * sizeof(HistogramDistance))) : ((void *)0)); if ((!!0) || (!!0)) return; ClearHistogramsDistance(distance_histograms, distance_histograms_size); ; mb->command_histograms_size = mb->command_split.num_types; mb->command_histograms = ((mb->command_histograms_size) > 0 ? ((HistogramCommand*)BrotliAllocate((m), (mb->command_histograms_size) * sizeof(HistogramCommand))) : ((void *)0)); if ((!!0) || (!!0)) return; ClearHistogramsCommand(mb->command_histograms, mb->command_histograms_size); BrotliBuildHistogramsWithContext(cmds, num_commands, &mb->literal_split, &mb->command_split, &mb->distance_split, ringbuffer, pos, mask, prev_byte, prev_byte2, literal_context_modes, literal_histograms, mb->command_histograms, distance_histograms); { BrotliFree((m), (literal_context_modes)); literal_context_modes = ((void *)0); }; ; mb->literal_context_map_size = mb->literal_split.num_types << 6; mb->literal_context_map = ((mb->literal_context_map_size) > 0 ? ((uint32_t*)BrotliAllocate((m), (mb->literal_context_map_size) * sizeof(uint32_t))) : ((void *)0)); if ((!!0) || (!!0)) return; ; mb->literal_histograms_size = mb->literal_context_map_size; mb->literal_histograms = ((mb->literal_histograms_size) > 0 ? ((HistogramLiteral*)BrotliAllocate((m), (mb->literal_histograms_size) * sizeof(HistogramLiteral))) : ((void *)0)); if ((!!0) || (!!0)) return; BrotliClusterHistogramsLiteral(m, literal_histograms, literal_histograms_size, kMaxNumberOfHistograms, mb->literal_histograms, &mb->literal_histograms_size, mb->literal_context_map); if ((!!0)) return; { BrotliFree((m), (literal_histograms)); literal_histograms = ((void *)0); }; if (params->disable_literal_context_modeling) { for (i = mb->literal_split.num_types; i != 0;) { size_t j = 0; i--; for (; j < (1 << 6); j++) { mb->literal_context_map[(i << 6) + j] = mb->literal_context_map[i]; } } } ; mb->distance_context_map_size = mb->distance_split.num_types << 2; mb->distance_context_map = ((mb->distance_context_map_size) > 0 ? ((uint32_t*)BrotliAllocate((m), (mb->distance_context_map_size) * sizeof(uint32_t))) : ((void *)0)); if ((!!0) || (!!0)) return; ; mb->distance_histograms_size = mb->distance_context_map_size; mb->distance_histograms = ((mb->distance_histograms_size) > 0 ? ((HistogramDistance*)BrotliAllocate((m), (mb->distance_histograms_size) * sizeof(HistogramDistance))) : ((void *)0)); if ((!!0) || (!!0)) return; BrotliClusterHistogramsDistance(m, distance_histograms, mb->distance_context_map_size, kMaxNumberOfHistograms, mb->distance_histograms, &mb->distance_histograms_size, mb->distance_context_map); if ((!!0)) return; { BrotliFree((m), (distance_histograms)); distance_histograms = ((void *)0); }; }
{ "array_type": 2, "break_continue_statement": 1, "enum_type": 0, "for_loop": 5, "function_pointer": 0, "goto_statement": 0, "if_statement": 18, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 11, "struct_type": 0, "switch_statement": 0, "type_casting": 12, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#fd_range_prep#Pl_Vector_Div_Value.c
gprolog-1.5.0
fd_range.c
Pl_Vector_Div_Value
19
void Pl_Vector_Div_Value(Vector vec, int n) { Vector aux_vec; int vec_elem; int x; do { aux_vec = (Vector) (((WamWordP *) pl_reg_bank)[256 +3]); (((WamWordP *) pl_reg_bank)[256 +3]) += pl_vec_size; } while (0); Pl_Vector_Copy(aux_vec, vec); Pl_Vector_Empty(vec); if (n == 0) return; { Vector enum_end = aux_vec + pl_vec_size, enum_i = aux_vec; int enum_j; VecWord enum_word; vec_elem = 0; do { enum_word = *enum_i; for (enum_j = 0; enum_j++ < (8 * 8); enum_word >>= 1, vec_elem++) { if (enum_word & 1) {; if (vec_elem % n == 0) { x = vec_elem / n; (vec[((VecWord) (x) >> 6)] |= ((VecWord) 1 << ((x) & (((VecWord) 1 << 6)-1)))); } } } } while (++enum_i < enum_end); }; }
{ "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": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 2 }
libxml2#valid_prep#xmlValidateNamesValue.c
libxml2
valid.c
xmlValidateNamesValue
4
int xmlValidateNamesValue(const xmlChar *value) { return(xmlValidateNamesValueInternal(((void *)0), 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 }
nettle-3.9.1#eddsa-verify_prep#_nettle_eddsa_verify_itch.c
nettle-3.9.1
eddsa-verify.c
_nettle_eddsa_verify_itch
6
mp_size_t _nettle_eddsa_verify_itch (const struct ecc_curve *ecc) { ((void) sizeof ((_nettle_eddsa_decompress_itch (ecc) <= ecc->mul_itch) ? 1 : 0), __extension__ ({ if (_nettle_eddsa_decompress_itch (ecc) <= ecc->mul_itch) ; else __assert_fail ("_eddsa_decompress_itch (ecc) <= ecc->mul_itch", "eddsa-verify.c", 68, __extension__ __PRETTY_FUNCTION__); })); return 8*ecc->p.size + ecc->mul_itch; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW_1_prep#len.c
transcoder-set
COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW_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 }
libxml2#libxml2-py_prep#libxml_xmlUCSIsKatakana.c
libxml2
libxml2-py.c
libxml_xmlUCSIsKatakana
13
PyObject * libxml_xmlUCSIsKatakana(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsKatakana") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSIsKatakana", &code)) return(((void *)0)); c_retval = xmlUCSIsKatakana(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 }
optipng-0.7.8#inflate_prep#inflateCodesUsed.c
optipng-0.7.8
inflate.c
inflateCodesUsed
6
unsigned long inflateCodesUsed(z_streamp strm) { struct inflate_state *state; if (inflateStateCheck(strm)) return (unsigned long)-1; state = (struct inflate_state *)strm->state; return (unsigned long)(state->next - state->codes); }
{ "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 }
units-2.22#units_prep#unitcopy.c
units-2.22
units.c
unitcopy
7
void unitcopy(struct unittype *dest, struct unittype *source) { dest->factor = source->factor; copyproduct(dest->numerator, source->numerator); copyproduct(dest->denominator, source->denominator); }
{ "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 }
tmux#session_prep#sessions_RB_PREV.c
tmux
session.c
sessions_RB_PREV
1
struct session * sessions_RB_PREV(struct session *elm) { if ((elm)->entry.rbe_left) { elm = (elm)->entry.rbe_left; while ((elm)->entry.rbe_right) elm = (elm)->entry.rbe_right; } else { if ((elm)->entry.rbe_parent && (elm == ((elm)->entry.rbe_parent)->entry.rbe_right)) elm = (elm)->entry.rbe_parent; else { while ((elm)->entry.rbe_parent && (elm == ((elm)->entry.rbe_parent)->entry.rbe_left)) elm = (elm)->entry.rbe_parent; elm = (elm)->entry.rbe_parent; } } return (elm); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
tar-1.34#backup-find_prep#xget_version.c
tar-1.34
backup-find.c
xget_version
8
enum backup_type xget_version (char const *context, char const *version) { if (version && *version) return get_version (context, version); else return get_version ("$VERSION_CONTROL", getenv ("VERSION_CONTROL")); }
{ "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 }
libxml2#libxml2-py_prep#libxml_xmlParseEndTag.c
libxml2
libxml2-py.c
libxml_xmlParseEndTag
13
PyObject * libxml_xmlParseEndTag(PyObject *self __attribute__ ((__unused__)), PyObject *args) { xmlParserCtxtPtr ctxt; PyObject *pyobj_ctxt; if (libxml_deprecationWarning("xmlParseEndTag") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlParseEndTag", &pyobj_ctxt)) return(((void *)0)); ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj)); xmlParseEndTag(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 }
tar-1.34#opendir-safer_prep#opendir_safer.c
tar-1.34
opendir-safer.c
opendir_safer
31
DIR * opendir_safer (char const *name) { DIR *dp = opendir (name); if (dp) { int fd = dirfd (dp); if (0 <= fd && fd <= 2) { DIR *newdp; int e; int f = rpl_fcntl (fd, 1030, 2 + 1); if (f < 0) { e = (*__errno_location ()); newdp = ((void *)0); } else { newdp = fdopendir (f); e = (*__errno_location ()); if (! newdp) close (f); } closedir (dp); (*__errno_location ()) = e; dp = newdp; } } return dp; }
{ "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": 2, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
mcsim-6.2.0#sim_prep#AnnounceProgram.c
mcsim-6.2.0
sim.c
AnnounceProgram
14
void AnnounceProgram (int iRank) { if (iRank == 0) { printf ("\n________________________________________\n"); printf ("\nMCSim " "v6.2.0" "\n\n"); printf ("Copyright (c) 1993-2020 Free Software Foundation, Inc." "\n\n"); printf ("MCSim comes with ABSOLUTELY NO WARRANTY;\n" "This is free software, and you are welcome to redistribute it\n" "under certain conditions; " "see the GNU General Public License.\n\n"); printf ("* Using `%s' model in file \"%s\" created by %s\n\n", szModelDescFilename, szModelSourceFilename, szModelGenAndVersion); } }
{ "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 }
binn-3.0#binn_prep#binn_list_blob.c
binn-3.0
binn.c
binn_list_blob
5
void * binn_list_blob(void *list, int pos, int *psize) { void *value; binn_list_get(list, pos, 0xC0, &value, psize); 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": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#GIVEN_LARGE_NUMBER_CHECK_SUBSEQUENCE_DIGITS_DIVISIBLE_8_1_prep#cmpfunc.c
transcoder-set
GIVEN_LARGE_NUMBER_CHECK_SUBSEQUENCE_DIGITS_DIVISIBLE_8_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 }
optipng-0.7.8#pngerror_prep#png_error.c
optipng-0.7.8
pngerror.c
png_error
7
__attribute__((__noreturn__)) void png_error (png_const_structrp png_ptr, png_const_charp error_message) { if (png_ptr != ((void *)0) && png_ptr->error_fn != ((void *)0)) (*(png_ptr->error_fn))(((png_structrp)(void*)(const void*)(png_ptr)), error_message); png_default_error(png_ptr, error_message); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
tulipindicators-0.9.1#tiamalgamation_prep#ti_kama.c
tulipindicators-0.9.1
tiamalgamation.c
ti_kama
33
int ti_kama(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_kama_start(options)) return 0; const double short_per = 2 / (2.0 + 1); const double long_per = 2 / (30.0 + 1); double sum = 0; int i; for (i = 1; i < period; ++i) { sum += fabs(input[i] - input[i-1]); } double kama = input[period-1]; *output++ = kama; double er, sc; for (i = period; i < size; ++i) { sum += fabs(input[i] - input[i-1]); if (i > period) { sum -= fabs(input[i-period] - input[i-period-1]); } if (sum != 0.0) { er = fabs(input[i] - input[i-period]) / sum; } else { er = 1.0; } sc = pow(er * (short_per - long_per) + long_per, 2); kama = kama + sc * (input[i] - kama); *output++ = kama; } ((void) sizeof ((output - outputs[0] == size - ti_kama_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_kama_start(options)) ; else __assert_fail ("output - outputs[0] == size - ti_kama_start(options)", "tiamalgamation.c", 2628, __extension__ __PRETTY_FUNCTION__); })); return 0; }
{ "array_type": 4, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "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 }
transcoder-set#EFFICIENT_WAY_CHECK_WHETHER_N_TH_FIBONACCI_NUMBER_MULTIPLE_10_prep#min.c
transcoder-set
EFFICIENT_WAY_CHECK_WHETHER_N_TH_FIBONACCI_NUMBER_MULTIPLE_10.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 }
json.h#allow_single_quoted_strings_prep#json_parse.c
json.h
allow_single_quoted_strings.c
json_parse
4
struct json_value_s *json_parse(const void *src, size_t src_size) { return json_parse_ex(src, src_size, json_parse_flags_default, 0, 0, 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": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tar-1.34#acl-errno-valid_prep#acl_errno_valid.c
tar-1.34
acl-errno-valid.c
acl_errno_valid
12
_Bool acl_errno_valid (int errnum) { switch (errnum) { case 16: return 0; case 22: return 0; case 38: return 0; case 95: return 0; default: return 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": 5, "struct_type": 0, "switch_statement": 1, "type_casting": 0, "union_type": 0, "while_loop": 0 }
grep-3.11#locale_prep#main.c
grep-3.11
locale.c
main
20
int main (void) { setlocale (6, ""); printf ("LANG=%s\n", defaulted_getenv ("LANG")); print_category (0, "LC_CTYPE"); print_category (1, "LC_NUMERIC"); print_category (2, "LC_TIME"); print_category (3, "LC_COLLATE"); print_category (4, "LC_MONETARY"); print_category (5, "LC_MESSAGES"); print_category (7, "LC_PAPER"); print_category (8, "LC_NAME"); print_category (9, "LC_ADDRESS"); print_category (10, "LC_TELEPHONE"); print_category (11, "LC_MEASUREMENT"); print_category (12, "LC_IDENTIFICATION"); printf ("LC_ALL=%s\n", defaulted_getenv ("LC_ALL")); 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#globals_prep#xmlThrDefOutputBufferCreateFilenameDefault.c
libxml2
globals.c
xmlThrDefOutputBufferCreateFilenameDefault
13
xmlOutputBufferCreateFilenameFunc xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func) { xmlOutputBufferCreateFilenameFunc old; xmlMutexLock(&xmlThrDefMutex); old = xmlOutputBufferCreateFilenameValueThrDef; if (old == ((void *)0)) { old = __xmlOutputBufferCreateFilename; } xmlOutputBufferCreateFilenameValueThrDef = 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": 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#parser_prep#xmlCreateFileParserCtxt.c
libxml2
parser.c
xmlCreateFileParserCtxt
5
xmlParserCtxtPtr xmlCreateFileParserCtxt(const char *filename) { return(xmlCreateURLParserCtxt(filename, 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#MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME_prep#f_gold.c
transcoder-set
MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME.c
f_gold
10
_Bool f_gold ( char s [] ) { int l = strlen(s); int j; for ( int i = 0, j = l - 1; i <= j; i ++, j -- ) { if ( s [ i ] != s [ j ] ) return 0; } return 1; }
{ "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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
gawk-5.2.2#node_prep#wstrstr.c
gawk-5.2.2
node.c
wstrstr
18
const wchar_t * wstrstr(const wchar_t *haystack, size_t hs_len, const wchar_t *needle, size_t needle_len) { size_t i; if (haystack == ((void *)0) || needle == ((void *)0) || needle_len > hs_len) return ((void *)0); for (i = 0; i < hs_len; i++) { if (haystack[i] == needle[0] && i+needle_len-1 < hs_len && haystack[i+needle_len-1] == needle[needle_len-1]) { if (memcmp(haystack+i, needle, sizeof(wchar_t) * needle_len) == 0) { return haystack + i; } } } return ((void *)0); }
{ "array_type": 2, "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": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
optipng-0.7.8#pnmutil_prep#pnm_raw_sample_size.c
optipng-0.7.8
pnmutil.c
pnm_raw_sample_size
19
size_t pnm_raw_sample_size(const pnm_struct *pnm_ptr) { unsigned int maxval = pnm_ptr->maxval; if (maxval == 0) (*__errno_location ()) = 22; if (maxval <= 0xffU) return 1; else if (maxval <= 0xffffU) return 2; else if (maxval <= 0xffffffU) return 3; else if (maxval <= 0xffffffffU) return 4; else { (*__errno_location ()) = 22; return 0; } }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 5, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#fd_range_prep#Pl_Vector_Add_Vector.c
gprolog-1.5.0
fd_range.c
Pl_Vector_Add_Vector
19
void Pl_Vector_Add_Vector(Vector vec, Vector vec1) { Vector aux_vec; int vec_elem, vec_elem1; int x; do { aux_vec = (Vector) (((WamWordP *) pl_reg_bank)[256 +3]); (((WamWordP *) pl_reg_bank)[256 +3]) += pl_vec_size; } while (0); Pl_Vector_Copy(aux_vec, vec); Pl_Vector_Empty(vec); { Vector enum_end = aux_vec + pl_vec_size, enum_i = aux_vec; int enum_j; VecWord enum_word; vec_elem = 0; do { enum_word = *enum_i; for (enum_j = 0; enum_j++ < (8 * 8); enum_word >>= 1, vec_elem++) { if (enum_word & 1) {; { Vector enum_end = vec1 + pl_vec_size, enum_i = vec1; int enum_j; VecWord enum_word; vec_elem1 = 0; do { enum_word = *enum_i; for (enum_j = 0; enum_j++ < (8 * 8); enum_word >>= 1, vec_elem1++) { if (enum_word & 1) {; x = vec_elem + vec_elem1; if (x > pl_vec_max_integer) goto loop1; (vec[((VecWord) (x) >> 6)] |= ((VecWord) 1 << ((x) & (((VecWord) 1 << 6)-1)))); } } } while (++enum_i < enum_end); }; loop1:; } } } while (++enum_i < enum_end); }; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 1, "if_statement": 3, "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": 3 }
lil#lil_prep#lil_arg.c
lil
lil.c
lil_arg
4
lil_value_t lil_arg(lil_value_t* argv, size_t index) { return argv ? argv[index] : ((void *)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 }
tmux#server-client_prep#server_client_suspend.c
tmux
server-client.c
server_client_suspend
10
void server_client_suspend(struct client *c) { struct session *s = c->session; if (s == ((void *)0) || (c->flags & 0x1000)) return; tty_stop_tty(&c->tty); c->flags |= 0x40; proc_send(c->peer, MSG_SUSPEND, -1, ((void *)0), 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": 1, "struct_type": 2, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
transcoder-set#PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM_prep#len.c
transcoder-set
PROGRAM_TO_FIND_THE_VOLUME_OF_A_TRIANGULAR_PRISM.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_xmlXPathIsNaN.c
libxml2
libxml2-py.c
libxml_xmlXPathIsNaN
11
PyObject * libxml_xmlXPathIsNaN(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; double val; if (!_PyArg_ParseTuple_SizeT(args, (char *)"d:xmlXPathIsNaN", &val)) return(((void *)0)); c_retval = xmlXPathIsNaN(val); 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": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
libxml2#parserInternals_prep#xmlCtxtSetErrorHandler.c
libxml2
parserInternals.c
xmlCtxtSetErrorHandler
9
void xmlCtxtSetErrorHandler(xmlParserCtxtPtr ctxt, xmlStructuredErrorFunc handler, void *data) { if (ctxt == ((void *)0)) return; ctxt->errorHandler = handler; ctxt->errorCtxt = data; }
{ "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 }
binn-3.0#binn_prep#binn_object_uint8.c
binn-3.0
binn.c
binn_object_uint8
5
unsigned char binn_object_uint8(void *obj, const char *key) { unsigned char value; binn_object_get(obj, key, 0x20, &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 }
libxml2#libxml2-py_prep#libxml_xmlOutputBufferWrite.c
libxml2
libxml2-py.c
libxml_xmlOutputBufferWrite
15
PyObject * libxml_xmlOutputBufferWrite(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; xmlOutputBufferPtr out; PyObject *pyobj_out; int len; char * buf; if (!_PyArg_ParseTuple_SizeT(args, (char *)"Oiz:xmlOutputBufferWrite", &pyobj_out, &len, &buf)) return(((void *)0)); out = (xmlOutputBufferPtr) (((pyobj_out) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyoutputBuffer_Object *)(pyobj_out))->obj)); c_retval = xmlOutputBufferWrite(out, len, buf); 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 }
libxml2#parser_prep#xmlCtxtGetOptions.c
libxml2
parser.c
xmlCtxtGetOptions
7
int xmlCtxtGetOptions(xmlParserCtxtPtr ctxt) { if (ctxt == ((void *)0)) return(-1); return(ctxt->options); }
{ "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#MAXIMUM_LENGTH_SUBSEQUENCE_DIFFERENCE_ADJACENT_ELEMENTS_EITHER_0_1_prep#cmpfunc.c
transcoder-set
MAXIMUM_LENGTH_SUBSEQUENCE_DIFFERENCE_ADJACENT_ELEMENTS_EITHER_0_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 }
transcoder-set#CHECK_LINE_PASSES_ORIGIN_prep#sort.c
transcoder-set
CHECK_LINE_PASSES_ORIGIN.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 }
pth-2.0.7#test_common_prep#pth_readline.c
pth-2.0.7
test_common.c
pth_readline
4
ssize_t pth_readline(int fd, void *buf, size_t buflen) { return pth_readline_ev(fd, buf, buflen, ((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": 1, "union_type": 0, "while_loop": 0 }
gawk-5.2.2#mpfr_prep#mpfr_unset.c
gawk-5.2.2
mpfr.c
mpfr_unset
8
void mpfr_unset(NODE *n) { if ((((n)->flags & MPFN) != 0)) mpfr_clear(n->sub.val.nm.mpnum); else if ((((n)->flags & MPZN) != 0)) __gmpz_clear(n->sub.val.nm.mpi); }
{ "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 }
nano-7.2#winio_prep#actual_last_column.c
nano-7.2
winio.c
actual_last_column
14
size_t actual_last_column(size_t leftedge, size_t column) { if (((flags[((SOFTWRAP) / (sizeof(unsigned) * 8))] & ((unsigned)1 << ((SOFTWRAP) % (sizeof(unsigned) * 8)))) != 0)) { _Bool kickoff = 1; _Bool last_chunk = 0; size_t end_col = get_softwrap_breakpoint(openfile->current->data, leftedge, &kickoff, &last_chunk) - leftedge; if (!last_chunk) end_col--; if (column > end_col) column = end_col; } return leftedge + column; }
{ "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": 1, "union_type": 0, "while_loop": 0 }
cpio-2.14#util_prep#set_file_times.c
cpio-2.14
util.c
set_file_times
11
void set_file_times (int fd, const char *name, unsigned long atime, unsigned long mtime) { struct timespec ts[2]; memset (&ts, 0, sizeof ts); ts[0].tv_sec = atime; ts[1].tv_sec = mtime; if (fdutimens (fd, name, ts) < 0 && (*__errno_location ()) != 30) utime_error (name); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 1, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY_prep#max.c
transcoder-set
MAXIMUM_SUM_IARRI_AMONG_ROTATIONS_GIVEN_ARRAY.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 }
quadtree-0.1.0#bounds_prep#quadtree_bounds_extend.c
quadtree-0.1.0
bounds.c
quadtree_bounds_extend
9
void quadtree_bounds_extend(quadtree_bounds_t *bounds, double x, double y){ bounds->nw->x = fmin(x, bounds->nw->x); bounds->nw->y = fmax(y, bounds->nw->y); bounds->se->x = fmax(x, bounds->se->x); bounds->se->y = fmin(y, bounds->se->y); bounds->width = fabs(bounds->nw->x - bounds->se->x); bounds->height = fabs(bounds->nw->y - bounds->se->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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlCreateURI.c
libxml2
libxml2-py.c
libxml_xmlCreateURI
8
PyObject * libxml_xmlCreateURI(PyObject *self __attribute__ ((__unused__)), PyObject *args __attribute__ ((__unused__))) { PyObject *py_retval; xmlURIPtr c_retval; c_retval = xmlCreateURI(); py_retval = libxml_xmlURIPtrWrap((xmlURIPtr) 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": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#UNBOUNDED_KNAPSACK_REPETITION_ITEMS_ALLOWED_prep#f_gold.c
transcoder-set
UNBOUNDED_KNAPSACK_REPETITION_ITEMS_ALLOWED.c
f_gold
11
int f_gold ( int W, int n, int val [ ], int wt [ ] ) { int dp [ W + 1 ]; memset ( dp, 0, sizeof dp ); int ans = 0; for ( int i = 0; i <= W; i ++ ) for ( int j = 0; j < n; j ++ ) if ( wt [ j ] <= i ) dp [ i ] = max ( dp [ i ], dp [ i - wt [ j ] ] + val [ j ] ); return dp [ W ]; }
{ "array_type": 3, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 1, "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_tan_start.c
tulipindicators-0.9.1
tiamalgamation.c
ti_tan_start
1
int ti_tan_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 }
json.h#allow_location_information_prep#json_write_minified.c
json.h
allow_location_information.c
json_write_minified
26
void *json_write_minified(const struct json_value_s *value, size_t *out_size) { size_t size = 0; char *data = 0; char *data_end = 0; if (0 == value) { return 0; } if (json_write_minified_get_value_size(value, &size)) { return 0; } size += 1; data = (char *)malloc(size); if (0 == data) { return 0; } data_end = json_write_minified_value(value, data); if (0 == data_end) { free(data); return 0; } *data_end = '\0'; if (0 != out_size) { *out_size = size; } return data; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 2, "memory_operation": 0, "pointer_type": 2, "return_statement": 5, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
mtools-4.0.43#llong_prep#log_2.c
mtools-4.0.43
llong.c
log_2
9
unsigned int log_2(unsigned int size) { unsigned int i; for(i=0; i<24; i++) { if(1u << i == size) return i; } return 24; }
{ "array_type": 0, "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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#pgp-encode_prep#nettle_pgp_put_header.c
nettle-3.9.1
pgp-encode.c
nettle_pgp_put_header
8
int nettle_pgp_put_header(struct nettle_buffer *buffer, unsigned tag, unsigned length) { ((void) sizeof ((tag < 0x40) ? 1 : 0), __extension__ ({ if (tag < 0x40) ; else __assert_fail ("tag < 0x40", "pgp-encode.c", 137, __extension__ __PRETTY_FUNCTION__); })); return (( (((buffer)->size < (buffer)->alloc) || nettle_buffer_grow((buffer), 1)) && ((buffer)->contents[(buffer)->size++] = (0xC0 | tag), 1) ) && nettle_pgp_put_length(buffer, length)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#CHECK_LINE_PASSES_ORIGIN_prep#cmpfunc.c
transcoder-set
CHECK_LINE_PASSES_ORIGIN.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#DYNAMIC_PROGRAMMING_SET_13_CUTTING_A_ROD_prep#max.c
transcoder-set
DYNAMIC_PROGRAMMING_SET_13_CUTTING_A_ROD.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 }