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,...
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...
{ "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": ...
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,...
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,...
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,...
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,...
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,...
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,...
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 ((...
{ "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,...
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,...
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_ob...
{ "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": 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; ...
{ "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,...
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)->entr...
{ "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,...
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,...
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,...
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+...
{ "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,...
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) (...
{ "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,...
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;...
{ "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,...
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,...
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,...
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. versio...
{ "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,...
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,...
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,...
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,...
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,...
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_s...
{ "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,...
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_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": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
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,...
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 fd...
{ "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,...
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) ? ...
{ "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...
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,...
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,...
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...
{ "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,...
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 *cons...
{ "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,...
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,...
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,...
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,...
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); ...
{ "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,...
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), (ds...
{ "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,...
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,...
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 (...
{ "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,...
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 = ...
{ "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,...
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,...
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,...
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...
{ "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,...
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,...
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:xmlKeepBlanksDefau...
{ "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,...
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-...
{ "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,...
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(xm...
{ "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,...
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 ...
{ "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": ...
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...
{ "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,...
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,...
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, _...
{ "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,...
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,...
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)...
{ "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,...
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,...
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,...
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)-...
{ "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,...
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,...
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)) ...
{ "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,...
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 ()); ...
{ "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,...
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 so...
{ "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,...
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,...
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,...
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,...
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...
{ "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,...
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,...
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,...
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,...
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 ...
{ "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,...
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; ...
{ "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,...
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,...
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,...
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 ...
{ "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,...
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 (maxva...
{ "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,...
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_v...
{ "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,...
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,...
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,...
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,...
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_intWra...
{ "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,...
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,...
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,...
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, ...
{ "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,...
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,...
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,...
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,...
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,...
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,...
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...
{ "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,...
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,...
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,...
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 = fa...
{ "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,...
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,...
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,...
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,...
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) { ...
{ "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,...
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,...
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) || ...
{ "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,...
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,...
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,...