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
libosip2-5.3.1#osip_header_prep#osip_header_to_str.c
libosip2-5.3.1
osip_header.c
osip_header_to_str
20
int osip_header_to_str(const osip_header_t *header, char **dest) { size_t len, hlen; *dest = ((void *)0); if ((header == ((void *)0)) || (header->hname == ((void *)0))) return -2; len = 0; hlen = strlen(header->hname); if (header->hvalue != ((void *)0)) len = strlen(header->hvalue); *dest = (char ...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 1, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 6,...
transcoder-set#MAXIMUM_SUBSEQUENCE_SUM_SUCH_THAT_NO_THREE_ARE_CONSECUTIVE_prep#max.c
transcoder-set
MAXIMUM_SUBSEQUENCE_SUM_SUCH_THAT_NO_THREE_ARE_CONSECUTIVE.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,...
json-c#json_object_prep#json_object_set_string_len.c
json-c
json_object.c
json_object_set_string_len
4
int json_object_set_string_len(json_object *jso, const char *s, int len) { return _json_object_set_string_len(jso, s, len); }
{ "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_INSERTIONS_SORT_ARRAY_prep#cmpfunc.c
transcoder-set
MINIMUM_INSERTIONS_SORT_ARRAY.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,...
libxml2#parserInternals_prep#xmlIsLetter.c
libxml2
parserInternals.c
xmlIsLetter
4
int xmlIsLetter(int c) { return((((c) < 0x100) ? (((0x41 <= ((c))) && (((c)) <= 0x5a)) || ((0x61 <= ((c))) && (((c)) <= 0x7a)) || ((0xc0 <= ((c))) && (((c)) <= 0xd6)) || ((0xd8 <= ((c))) && (((c)) <= 0xf6)) || (0xf8 <= ((c)))) : xmlCharInRange((c), &xmlIsBaseCharGroup)) || (((c) < 0x100) ? 0 : (((0x4e00 <= (c)) && ...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
ed-1.19#signal_prep#set_signals.c
ed-1.19
signal.c
set_signals
8
void set_signals( void ) { sigwinch_handler( 28 ); if( isatty( 0 ) ) set_signal( 28, sigwinch_handler ); set_signal( 1, sighup_handler ); set_signal( 3, ((__sighandler_t) 1) ); set_signal( 2, sigint_handler ); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
brotli-1.0.9#metablock_prep#BrotliOptimizeHistograms.c
brotli-1.0.9
metablock.c
BrotliOptimizeHistograms
19
void BrotliOptimizeHistograms(uint32_t num_distance_codes, MetaBlockSplit* mb) { uint8_t good_for_rle[704]; size_t i; for (i = 0; i < mb->literal_histograms_size; ++i) { BrotliOptimizeHuffmanCountsForRle(256, mb->literal_histograms[i].data_, ...
{ "array_type": 4, "break_continue_statement": 0, "enum_type": 0, "for_loop": 3, "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,...
transcoder-set#SPLIT_N_MAXIMUM_COMPOSITE_NUMBERS_prep#max.c
transcoder-set
SPLIT_N_MAXIMUM_COMPOSITE_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,...
json.h#allow_multi_line_strings_prep#utest_run_allow_multi_line_strings_read_write_pretty_read.c
json.h
allow_multi_line_strings.c
utest_run_allow_multi_line_strings_read_write_pretty_read
7
void utest_run_allow_multi_line_strings_read_write_pretty_read(int *utest_result, struct allow_multi_line_strings *utest_fixture) { size_t size = 0; void *json = json_write_pretty(utest_fixture->value, " ", "\n", &size); free(utest_fixture->value); utest_fixture->value = json_parse(json, size - 1); free(json...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 2, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
mtools-4.0.43#buffer_prep#buf_init.c
mtools-4.0.43
buffer.c
buf_init
37
Stream_t *buf_init(Stream_t *Next, size_t size, size_t cylinderSize, size_t sectorSize) { Buffer_t *Buffer; ((void) sizeof ((size != 0) ? 1 : 0), __extension__ ({ if (size != 0) ; else __assert_fail ("size != 0", "buffer.c", 364, __extension__ __PRETTY_FUNCTION__); })); ((void) sizeof ((cylinderSize != 0) ...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 8, "memory_management": 3, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
libzahl-1.0#zset_prep#zset.c
libzahl-1.0
zset.c
zset
12
void zset(z_t a, z_t b) { if (zzero(b)) { ((a)->sign = (0)); } else { do { if ((a)->alloced < (b->used)) libzahl_realloc(a, (b->used)); } while (0); a->sign = b->sign; a->used = b->used; memcpy(a->chars, b->chars, (b->used) * sizeof(zahl_char_t)); } }
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#xmlunicode_prep#xmlUCSIsEthiopic.c
libxml2
xmlunicode.c
xmlUCSIsEthiopic
4
int xmlUCSIsEthiopic(int code) { return(((code >= 0x1200) && (code <= 0x137F))); }
{ "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,...
tinycc#tcc_prep#tcc_tool_cross.c
tinycc
tcc.c
tcc_tool_cross
13
void tcc_tool_cross(TCCState *s, char **argv, int target) { char program[4096]; char *a0 = argv[0]; int prefix = tcc_basename(a0) - a0; snprintf(program, sizeof program, "%.*s%s" "-tcc" , prefix, a0, target == 64 ? "x86_64" : "i386"); if (strcmp(a0, program)) execvp(a...
{ "array_type": 2, "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,...
screen-4.9.0#display_prep#SetAttr.c
screen-4.9.0
display.c
SetAttr
47
void SetAttr(new) register int new; { register int i, j, old, typ; if (!display || (old = display->d_rend.attr) == new) return; display->d_col16change = (old ^ new) & ((1<<6) | (1<<7)); new ^= display->d_col16change; if (old == new) return; display->d_rend.attr = new; typ = display->d_atyp; if (...
{ "array_type": 3, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 10, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0...
transcoder-set#TRIANGULAR_NUMBERS_1_prep#min.c
transcoder-set
TRIANGULAR_NUMBERS_1.c
min
1
int min(int x, int y) { return (x < y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#PROGRAM_CALCULATE_VOLUME_OCTAHEDRON_prep#min.c
transcoder-set
PROGRAM_CALCULATE_VOLUME_OCTAHEDRON.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,...
libxml2#libxml2-py_prep#libxml_xmlTextReaderGetParserColumnNumber.c
libxml2
libxml2-py.c
libxml_xmlTextReaderGetParserColumnNumber
13
PyObject * libxml_xmlTextReaderGetParserColumnNumber(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; xmlTextReaderPtr reader; PyObject *pyobj_reader; if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlTextReaderGetParserColumnNumber", &pyobj_reader)) ...
{ "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,...
tulipindicators-0.9.1#tiamalgamation_prep#ti_vhf.c
tulipindicators-0.9.1
tiamalgamation.c
ti_vhf
62
int ti_vhf(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *in = inputs[0]; const int period = (int)options[0]; double *output = outputs[0]; if (period < 1) return 1; if (size <= ti_vhf_start(options)) return 0; int trail = 1, maxi = -1, mini ...
{ "array_type": 4, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 10, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 2...
json.h#test_prep#json_extract_get_string_size.c
json.h
test.c
json_extract_get_string_size
7
struct json_extract_result_s json_extract_get_string_size(const struct json_string_s *const string) { struct json_extract_result_s result; result.dom_size = sizeof(struct json_string_s); result.data_size = string->string_size + 1; return result; }
{ "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": 1,...
libxml2#HTMLparser_prep#htmlParseChunk.c
libxml2
HTMLparser.c
htmlParseChunk
30
int htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size, int terminate) { if ((ctxt == ((void *)0)) || (ctxt->input == ((void *)0))) return(XML_ERR_ARGUMENT); if (((ctxt)->disableSAX > 1) != 0) return(ctxt->errNo); if ((size > 0) && (chunk != ((void *)0)) && (ctxt->inpu...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 7, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
grep-3.11#strerror_r_prep#rpl_strerror_r.c
grep-3.11
strerror_r.c
rpl_strerror_r
36
int rpl_strerror_r (int errnum, char *buf, size_t buflen) { if (buflen <= 1) { if (buflen) *buf = '\0'; return 34; } *buf = '\0'; { char const *msg = ((void *)0); if (msg) return safe_copy (buf, buflen, msg); } { int ret; int saved_errno = (*__errno_location (...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#ARRAY_ELEMENT_MOVED_K_USING_SINGLE_MOVES_prep#f_filled.c
transcoder-set
ARRAY_ELEMENT_MOVED_K_USING_SINGLE_MOVES.c
f_filled
1
int f_filled ( int a [ ], int n, int k ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
dap-3.10#sbstrans1_prep#freqtrans.c
dap-3.10
sbstrans1.c
freqtrans
240
void freqtrans(char *step, FILE *dapfile) { int s; char setname[127 + 1]; char outname[127 + 1]; int tablesstart; int optionsstart; int nstats; char stat[127 + 1]; int nofreq; int nopercent; int norow; int nocol; int noprint; int nvars; int newvar; int varn; noprint = 0; if (!getoption...
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 6, "function_pointer": 0, "goto_statement": 0, "if_statement": 31, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0...
transcoder-set#PROGRAM_AREA_SQUARE_prep#len.c
transcoder-set
PROGRAM_AREA_SQUARE.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,...
json.h#allow_equals_in_object_prep#json_write_pretty_get_object_size.c
json.h
allow_equals_in_object.c
json_write_pretty_get_object_size
26
int json_write_pretty_get_object_size(const struct json_object_s *object, size_t depth, size_t indent_size, size_t newline_size, size_t *size) { struct json_object_element_s *element; *size += 1; if (0 < object->length) { *size += new...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 2, "switch_statement": 0, "type_casting": 0,...
libosip2-5.3.1#osip_header_prep#osip_header_set_value.c
libosip2-5.3.1
osip_header.c
osip_header_set_value
3
void osip_header_set_value(osip_header_t *header, char *value) { header->hvalue = 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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
gawk-5.2.2#profile_prep#pp_node.c
gawk-5.2.2
profile.c
pp_node
7
char * pp_node(NODE *n) { if ((n->flags & NUMBER) != 0) return pp_number(n); return pp_string(n->sub.val.sp, n->sub.val.slen, '"'); }
{ "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,...
libosip2-5.3.1#osip_md5c_prep#osip_MD5Update.c
libosip2-5.3.1
osip_md5c.c
osip_MD5Update
20
void osip_MD5Update(osip_MD5_CTX *context, unsigned char *input, unsigned int inputLen ) { unsigned int i, index, partLen; index = (unsigned int) ((context->count[0] >> 3) & 0x3F); if ((context->count[0] += ((UINT4) inputLen << 3)) < ((UINT4) inputLen << 3)) context->co...
{ "array_type": 3, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
bc-1.07.1#number_prep#bc_sub.c
bc-1.07.1
number.c
bc_sub
34
void bc_sub (bc_num n1, bc_num n2, bc_num *result, int scale_min) { bc_num diff = ((void *)0); int cmp_res; int res_scale; if (n1->n_sign != n2->n_sign) { diff = _bc_do_add (n1, n2, scale_min); diff->n_sign = n1->n_sign; } else { cmp_res = _bc_do_compare (n1, n2, 0, 0); swi...
{ "array_type": 0, "break_continue_statement": 3, "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": 1, "type_casting": 1,...
libxml2#globals_prep#__xmlDoValidityCheckingDefaultValue.c
libxml2
globals.c
__xmlDoValidityCheckingDefaultValue
1
int *__xmlDoValidityCheckingDefaultValue(void) { return (&xmlGetThreadLocalStorage(0)->gs_xmlDoValidityCheckingDefaultValue); }
{ "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#HOW_TO_BEGIN_WITH_COMPETITIVE_PROGRAMMING_prep#cmpfunc.c
transcoder-set
HOW_TO_BEGIN_WITH_COMPETITIVE_PROGRAMMING.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,...
tmux#session_prep#session_group_synchronize_to.c
tmux
session.c
session_group_synchronize_to
15
void session_group_synchronize_to(struct session *s) { struct session_group *sg; struct session *target; if ((sg = session_group_contains(s)) == ((void *)0)) return; target = ((void *)0); for((target) = ((&sg->sessions)->tqh_first); (target) != ((void *)0); (target) = ((target)->gentry.tqe_next)) { if (target ...
{ "array_type": 0, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 1, "struct_type": 3, "switch_statement": 0, "type_casting": 4,...
transcoder-set#CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_prep#sort.c
transcoder-set
CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER.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,...
libxml2#libxml2-py_prep#libxml_xmlTextReaderClose.c
libxml2
libxml2-py.c
libxml_xmlTextReaderClose
13
PyObject * libxml_xmlTextReaderClose(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; xmlTextReaderPtr reader; PyObject *pyobj_reader; if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlTextReaderClose", &pyobj_reader)) return(((void *)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": 2, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
tulipindicators-0.9.1#candles_prep#tc_morning_star.c
tulipindicators-0.9.1
candles.c
tc_morning_star
5
int tc_morning_star(int size, TC_REAL const *const *inputs, tc_config const *options, tc_result *output) { const TC_REAL *open = inputs[0]; const TC_REAL *high = inputs[1]; const TC_REAL *low = inputs[2]; const TC_REAL *close = inputs[3]; const int period = options->period; const TC_REAL div = 1.0 / period; TC_...
{ "array_type": 3, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 4, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP_prep#f_gold.c
transcoder-set
HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP.c
f_gold
5
_Bool f_gold ( int arr [ ], int i, int n ) { if ( i > ( n - 2 ) / 2 ) return 1; if ( arr [ i ] >= arr [ 2 * i + 1 ] && arr [ i ] >= arr [ 2 * i + 2 ] && f_gold ( arr, 2 * i + 1, n ) && f_gold ( arr, 2 * i + 2, n ) ) return 1; return 0; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#libxml2-py_prep#libxml_xmlIsPubidChar.c
libxml2
libxml2-py.c
libxml_xmlIsPubidChar
11
PyObject * libxml_xmlIsPubidChar(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; unsigned int ch; if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlIsPubidChar", &ch)) return(((void *)0)); c_retval = xmlIsPubidChar(ch); py_retval = libxml_...
{ "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,...
transcoder-set#MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE_prep#main.c
transcoder-set
MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE.c
main
15
int main(void) { int n_success = 0; int param0[] = {40,38,47,52,21,50,8,56,93,21}; int param1[] = {74,35,71,29,9,33,82,80,5,90}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } break; } ...
{ "array_type": 2, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libxml2#xmlIO_prep#xmlNewInputBufferString.c
libxml2
xmlIO.c
xmlNewInputBufferString
16
xmlParserInputBufferPtr xmlNewInputBufferString(const char *str, int flags) { xmlParserInputBufferPtr ret; ret = xmlMalloc(sizeof(*ret)); if (ret == ((void *)0)) return(((void *)0)); memset(ret, 0, sizeof(xmlParserInputBuffer)); ret->compressed = -1; ret->buffer = xmlBufCreateMem((const xmlChar...
{ "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": 4,...
transcoder-set#HARDY_RAMANUJAN_THEOREM_prep#max.c
transcoder-set
HARDY_RAMANUJAN_THEOREM.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,...
mcsim-6.2.0#modiSBML_prep#CountLines.c
mcsim-6.2.0
modiSBML.c
CountLines
13
long CountLines (PFILE pFileIn) { int nLines = 0; char szDummy[2]; fscanf (pFileIn, "%*[^\n]"); getc(pFileIn); while ( !(feof(pFileIn))) { if (fscanf (pFileIn, "%1s", szDummy) > 0) nLines++; fscanf (pFileIn, "%*[^\n]"); getc(pFileIn); } rewind (pFileIn); return (nLines); }
{ "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": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_prep#sort.c
transcoder-set
SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS.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,...
tar-1.34#map_prep#owner_map_read.c
tar-1.34
map.c
owner_map_read
5
void owner_map_read (char const *file) { map_read (&owner_map, file, name_to_uid, "UID", ((uid_t) (! (! ((uid_t) 0 < (uid_t) -1)) ? (uid_t) -1 : ((((uid_t) 1 << ((sizeof (uid_t) * 8) - 2)) - 1) * 2 + 1)))); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_ARRAY_prep#f_gold.c
transcoder-set
FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_ARRAY.c
f_gold
15
int f_gold ( int arr [ ], int n ) { int ans = (-0x7fffffff - 1); for ( int i = 0; i < n; i ++ ) { int curr_xor = 0; for ( int j = i; j < n; j ++ ) { curr_xor = curr_xor ^ arr [ j ]; ans = max ( ans, curr_xor ); } } return ans; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "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#buffer_prep#dec_addr.c
ed-1.19
buffer.c
dec_addr
2
int dec_addr( int addr ) { if( --addr < 0 ) addr = last_addr_; return addr; }
{ "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": 0,...
transcoder-set#CONVERT_STRICTLY_INCREASING_ARRAY_MINIMUM_CHANGES_prep#main.c
transcoder-set
CONVERT_STRICTLY_INCREASING_ARRAY_MINIMUM_CHANGES.c
main
25
int main(void) { int n_success = 0; int param0_0[] = {1,4,12,14,15,18,20,24,25,25,27,33,34,42,46,48,49,50,50,52,55,56,57,58,64,65,66,69,72,75,78,80,84,90,92,95,99}; int param0_1[] = {-56,6,-74,-30,34,40,-76,-10,-12,-86,-76,36,-72,82,38,68,28,84,98,-84,6,16,-46,8,2,-18,-50,4,-96,88,-84,-38,-82,-54}; int param0_2...
{ "array_type": 2, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1_prep#f_gold.c
transcoder-set
SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1.c
f_gold
16
int f_gold ( int m, int n ) { int T [ m + 1 ] [ n + 1 ]; for ( int i = 0; i < m + 1; i ++ ) { for ( int j = 0; j < n + 1; j ++ ) { if ( i == 0 || j == 0 ) T [ i ] [ j ] = 0; else if ( i < j ) T [ i ] [ j ] = 0; else if ( j == 1 ) T [ i ] [ j ] = i; else T [ i ] [ j ] = T [ 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": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
buffer-0.4.0#buffer_prep#buffer_free.c
buffer-0.4.0
buffer.c
buffer_free
5
void buffer_free(buffer_t *self) { free(self->alloc); free(self); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 2, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
make-4.4.1#main_prep#should_print_dir.c
make-4.4.1
main.c
should_print_dir
7
int should_print_dir (void) { if (print_directory_flag >= 0) return print_directory_flag; return !silent_flag && (makelevel > 0 || directories != ((void *)0)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
libxml2#libxml2-py_prep#libxml_xmlUCSIsByzantineMusicalSymbols.c
libxml2
libxml2-py.c
libxml_xmlUCSIsByzantineMusicalSymbols
13
PyObject * libxml_xmlUCSIsByzantineMusicalSymbols(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsByzantineMusicalSymbols") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char ...
{ "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,...
transcoder-set#STEINS_ALGORITHM_FOR_FINDING_GCD_1_prep#sort.c
transcoder-set
STEINS_ALGORITHM_FOR_FINDING_GCD_1.c
sort
1
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
patch-2.7.6#hash_prep#hash_string.c
patch-2.7.6
hash.c
hash_string
9
size_t hash_string (const char *string, size_t n_buckets) { size_t value = 0; unsigned char ch; for (; (ch = *string); string++) value = (value * 31 + ch) % n_buckets; return value; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#COUNT_NUMBER_OF_OCCURRENCES_OR_FREQUENCY_IN_A_SORTED_ARRAY_prep#f_filled.c
transcoder-set
COUNT_NUMBER_OF_OCCURRENCES_OR_FREQUENCY_IN_A_SORTED_ARRAY.c
f_filled
1
int f_filled ( int arr [ ], int n, int x ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
json.h#allow_single_quoted_strings_prep#json_skip_c_style_comments.c
json.h
allow_single_quoted_strings.c
json_skip_c_style_comments
40
int json_skip_c_style_comments(struct json_parse_state_s *state) { if ((state->offset + 2) > state->size) { return 0; } if ('/' == state->src[state->offset]) { if ('/' == state->src[state->offset + 1]) { state->offset++; state->offset++; while (state->offset < state->size) { swit...
{ "array_type": 0, "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": 6, "struct_type": 1, "switch_statement": 1, "type_casting": 0,...
transcoder-set#NUMBER_TRIANGLES_N_MOVES_1_prep#sort.c
transcoder-set
NUMBER_TRIANGLES_N_MOVES_1.c
sort
1
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libxml2#libxml2-py_prep#libxml_xmlEncodeEntitiesReentrant.c
libxml2
libxml2-py.c
libxml_xmlEncodeEntitiesReentrant
14
PyObject * libxml_xmlEncodeEntitiesReentrant(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; xmlChar * c_retval; xmlDocPtr doc; PyObject *pyobj_doc; xmlChar * input; if (!_PyArg_ParseTuple_SizeT(args, (char *)"Oz:xmlEncodeEntitiesReentrant", &pyobj_doc, &input...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
tar-1.34#system_prep#sys_compare_uid.c
tar-1.34
system.c
sys_compare_uid
5
_Bool sys_compare_uid (struct stat *a, struct stat *b) { return a->st_uid == b->st_uid; }
{ "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#xmalloc_prep#xmalloc.c
tar-1.34
xmalloc.c
xmalloc
8
void * xmalloc (size_t n) { void *p = malloc (n); if (!p && (HAVE_GNU_MALLOC || n)) xalloc_die (); return p; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#catalog_prep#xmlCatalogCleanup.c
libxml2
catalog.c
xmlCatalogCleanup
16
void xmlCatalogCleanup(void) { xmlRMutexLock(&xmlCatalogMutex); if (xmlDebugCatalogs) xmlCatalogPrintDebug( "Catalogs cleanup\n"); if (xmlCatalogXMLFiles != ((void *)0)) xmlHashFree(xmlCatalogXMLFiles, xmlFreeCatalogHashEntryList); xmlCatalogXMLFiles = ((void *)0); if (xmlDefaultCatalog != ((voi...
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
libxml2#xpath_prep#xmlXPathConvertNumber.c
libxml2
xpath.c
xmlXPathConvertNumber
11
xmlXPathObjectPtr xmlXPathConvertNumber(xmlXPathObjectPtr val) { xmlXPathObjectPtr ret; if (val == ((void *)0)) return(xmlXPathNewFloat(0.0)); if (val->type == XPATH_NUMBER) return(val); ret = xmlXPathNewFloat(xmlXPathCastToNumber(val)); xmlXPathFreeObject(val); return(ret); }
{ "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": 1,...
transcoder-set#PROGRAM_AREA_SQUARE_prep#f_gold.c
transcoder-set
PROGRAM_AREA_SQUARE.c
f_gold
4
int f_gold ( int side ) { int area = side * side; return area; }
{ "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#xmlunicode_prep#xmlUCSIsMathematicalAlphanumericSymbols.c
libxml2
xmlunicode.c
xmlUCSIsMathematicalAlphanumericSymbols
4
int xmlUCSIsMathematicalAlphanumericSymbols(int code) { return(((code >= 0x1D400) && (code <= 0x1D7FF))); }
{ "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,...
bc-1.07.1#main_prep#main.c
bc-1.07.1
main.c
main
60
int main (int argc, char **argv) { char *env_value; char *env_argv[30]; int env_argc; if (isatty(0) && isatty(1)) interactive = 1; (void) setvbuf(stdout, ((void *)0), 1, 0); env_value = getenv ("BC_ENV_ARGS"); if (env_value != ((void *)0)) { env_argc = 1; env_argv[0] = strdup("BC_ENV_A...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 10, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 4...
tinycc#tccelf_prep#set_elf_sym.c
tinycc
tccelf.c
set_elf_sym
65
int set_elf_sym(Section *s, Elf64_Addr value, unsigned long size, int info, int other, int shndx, const char *name) { Elf64_Sym *esym; int sym_bind, sym_index, sym_type, esym_bind; unsigned char sym_vis, esym_vis, new_vis; sym_bind = (((unsigned char) (info)) >> 4); sym_type =...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 4, "if_statement": 15, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0...
transcoder-set#SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS_1_prep#main.c
transcoder-set
SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS_1.c
main
14
int main(void) { int n_success = 0; int param0[] = {57,96,14,64,24,74,85,27,78,1}; 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,...
libxml2#globals_prep#__xmlStructuredError.c
libxml2
globals.c
__xmlStructuredError
1
xmlStructuredErrorFunc *__xmlStructuredError(void) { return (&xmlGetThreadLocalStorage(0)->gs_xmlStructuredError); }
{ "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,...
screen-4.9.0#encoding_prep#RecodeBuf.c
screen-4.9.0
encoding.c
RecodeBuf
22
int RecodeBuf(fbuf, flen, fenc, tenc, tbuf) unsigned char *fbuf; int flen; int fenc, tenc; unsigned char *tbuf; { int c, i, j; int decstate = 0, font = 0; for (i = j = 0; i < flen; i++) { c = fbuf[i]; c = DecodeChar(c, fenc, &decstate); if (c == -2) i--; if (c < 0) continue; j ...
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "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": 2,...
tmux#layout_prep#layout_assign_pane.c
tmux
layout.c
layout_assign_pane
6
void layout_assign_pane(struct layout_cell *lc, struct window_pane *wp) { layout_make_leaf(lc, wp); layout_fix_panes(wp->window, wp->window->sx, wp->window->sy); }
{ "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,...
transcoder-set#BELL_NUMBERS_NUMBER_OF_WAYS_TO_PARTITION_A_SET_prep#cmpfunc.c
transcoder-set
BELL_NUMBERS_NUMBER_OF_WAYS_TO_PARTITION_A_SET.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,...
robotfindskitten#robotfindskitten_prep#finish.c
robotfindskitten
robotfindskitten.c
finish
6
void finish(int sig) { endwin(); printf("%c%c%c",27,'(','B'); exit(0); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#libxml2-py_prep#libxml_xmlParseURIReference.c
libxml2
libxml2-py.c
libxml_xmlParseURIReference
14
PyObject * libxml_xmlParseURIReference(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; xmlURIPtr uri; PyObject *pyobj_uri; char * str; if (!_PyArg_ParseTuple_SizeT(args, (char *)"Oz:xmlParseURIReference", &pyobj_uri, &str)) return(((void ...
{ "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,...
nettle-3.9.1#eax-aes128_prep#nettle_eax_aes128_update.c
nettle-3.9.1
eax-aes128.c
nettle_eax_aes128_update
5
void nettle_eax_aes128_update(struct eax_aes128_ctx *ctx, size_t length, const uint8_t *data) { (0 ? (nettle_aes128_encrypt) (&(ctx)->cipher, ~(size_t) 0, (uint8_t *) 0, (const uint8_t *) 0) : nettle_eax_update (&(ctx)->eax, &(ctx)->key, &(ctx)->cipher, (nettle_cipher_func *) (nettle_aes128_encrypt), (length), (data)...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 1,...
tmux#screen-write_prep#screen_write_cursordown.c
tmux
screen-write.c
screen_write_cursordown
19
void screen_write_cursordown(struct screen_write_ctx *ctx, u_int ny) { struct screen *s = ctx->s; if (ny == 0) ny = 1; if (s->cy > s->rlower) { if (ny > ((s)->grid->sy) - 1 - s->cy) ny = ((s)->grid->sy) - 1 - s->cy; } else { if (ny > s->rlower - s->cy) ny = s->rlower - s->cy; } if (s->cx == ((s)->grid...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 2, "switch_statement": 0, "type_casting": 0,...
nettle-3.9.1#umac64_prep#nettle_umac64_set_nonce.c
nettle-3.9.1
umac64.c
nettle_umac64_set_nonce
12
void nettle_umac64_set_nonce (struct umac64_ctx *ctx, size_t nonce_length, const uint8_t *nonce) { ((void) sizeof ((nonce_length > 0) ? 1 : 0), __extension__ ({ if (nonce_length > 0) ; else __assert_fail ("nonce_length > 0", "umac64.c", 63, __extension__ __PRETTY_FUNCTION__); })); ((void) sizeof ((nonce_length ...
{ "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": 2, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 2,...
json.h#allow_inf_and_nan_prep#json_write_minified_object.c
json.h
allow_inf_and_nan.c
json_write_minified_object
21
char *json_write_minified_object(const struct json_object_s *object, char *data) { struct json_object_element_s *element = 0; *data++ = '{'; for (element = object->start; 0 != element; element = element->next) { if (element != object->start) { *data++ = ','; } da...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 2, "switch_statement": 0, "type_casting": 0,...
libxml2#xmlstring_prep#xmlStrVPrintf.c
libxml2
xmlstring.c
xmlStrVPrintf
10
int xmlStrVPrintf(xmlChar *buf, int len, const char *msg, va_list ap) { int ret; if((buf == ((void *)0)) || (msg == ((void *)0))) { return(-1); } ret = vsnprintf((char *) buf, len, (const char *) msg, ap); buf[len - 1] = 0; return(ret); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Float_Integ_Part.c
gprolog-1.5.0
arith_inl_c.c
Pl_Fct_Float_Integ_Part
5
WamWord Pl_Fct_Float_Integ_Part(WamWord x) { double d; if ((((PlLong) (x) & ((PlULong)0x7)) == (PlULong)0x7)) { Pl_Err_Type(pl_type_float, x); return x; } else d = Pl_Obtain_Float(((WamWord *) ((x) & (PlULong)0xfffffffffffffff8))); return Make_Tagged_Float((((d) > 0) ? floor(d) : ceil(d))); }
{ "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": 0,...
transcoder-set#SQUARE_PYRAMIDAL_NUMBER_SUM_SQUARES_prep#f_filled.c
transcoder-set
SQUARE_PYRAMIDAL_NUMBER_SUM_SQUARES.c
f_filled
1
int f_filled ( int s ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
tmux#window_prep#winlink_find_by_index.c
tmux
window.c
winlink_find_by_index
9
struct winlink * winlink_find_by_index(struct winlinks *wwl, int idx) { struct winlink wl; if (idx < 0) fatalx("bad index"); wl.idx = idx; return (winlinks_RB_FIND(wwl, &wl)); }
{ "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,...
cflow-1.7#parser_prep#tokpush.c
cflow-1.7
parser.c
tokpush
12
void tokpush(int type, int line, char *token) { token_stack[tos].type = type; token_stack[tos].token = token; token_stack[tos].line = line; if (++tos == token_stack_length) { token_stack_length += token_stack_increase; token_stack = xrealloc(token_stack, token_stack_length*sizeof(*token_s...
{ "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": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#SAX2_prep#xmlSAX2ElementDecl.c
libxml2
SAX2.c
xmlSAX2ElementDecl
28
void xmlSAX2ElementDecl(void *ctx, const xmlChar * name, int type, xmlElementContentPtr content) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlElementPtr elem = ((void *)0); (void) elem; if ((ctxt == ((void *)0)) || (ctxt->myDoc == ((void *)0))) return; if (ctxt->inSubset ...
{ "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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
transcoder-set#SUM_PAIRWISE_PRODUCTS_2_prep#f_filled.c
transcoder-set
SUM_PAIRWISE_PRODUCTS_2.c
f_filled
1
long long int f_filled(int n) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#types_prep#libxml_xmlValidCtxtPtrWrap.c
libxml2
types.c
libxml_xmlValidCtxtPtrWrap
13
PyObject * libxml_xmlValidCtxtPtrWrap(xmlValidCtxtPtr valid) { PyObject *ret; if (valid == ((void *)0)) { _Py_INCREF(((PyObject*)((&_Py_NoneStruct)))); return ((&_Py_NoneStruct)); } ret = PyCapsule_New((void *) valid, (char *) "xmlValidCtxtPtr", ((void *)0)); return (ret); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
transcoder-set#MAXIMUM_PRODUCT_SUBSET_ARRAY_prep#cmpfunc.c
transcoder-set
MAXIMUM_PRODUCT_SUBSET_ARRAY.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#FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES_prep#max.c
transcoder-set
FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES.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#LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S_prep#f_gold.c
transcoder-set
LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S.c
f_gold
21
int f_gold ( int arr [ ], int n ) { int sum = 0; int maxsize = - 1, startindex; for ( int i = 0; i < n - 1; i ++ ) { sum = ( arr [ i ] == 0 ) ? - 1 : 1; for ( int j = i + 1; j < n; j ++ ) { ( arr [ j ] == 0 ) ? ( sum += - 1 ) : ( sum += 1 ); if ( sum == 0 && maxsize < j - i + 1 ) {...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
findutils-4.9.0#util_prep#is_exec_in_local_dir.c
findutils-4.9.0
util.c
is_exec_in_local_dir
5
_Bool is_exec_in_local_dir (const PRED_FUNC pred_func) { return pred_execdir == pred_func || pred_okdir == pred_func; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#PROGRAM_FIND_SLOPE_LINE_prep#cmpfunc.c
transcoder-set
PROGRAM_FIND_SLOPE_LINE.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,...
dap-3.10#ps_prep#pict_circle.c
dap-3.10
ps.c
pict_circle
7
void pict_circle(pict *p, double cx, double cy, double r) { p->pict_npts = 1; strcpy(p->pict_type, "CIRC"); p->pict_pt = pict_newpoint(cx, cy); p->pict_r = r; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
gprolog-1.5.0#machine_prep#Pl_M_Is_Absolute_File_Name.c
gprolog-1.5.0
machine.c
Pl_M_Is_Absolute_File_Name
7
Bool Pl_M_Is_Absolute_File_Name(char *path) { if (((*path) == '/' || (*path) == '/')) return 1; return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_ARRAY_prep#max.c
transcoder-set
COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_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,...
transcoder-set#SUBSEQUENCES_SIZE_THREE_ARRAY_WHOSE_SUM_DIVISIBLE_M_prep#f_filled.c
transcoder-set
SUBSEQUENCES_SIZE_THREE_ARRAY_WHOSE_SUM_DIVISIBLE_M.c
f_filled
1
int f_filled ( int A [ ], int N, int M ) {}
{ "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,...
gprolog-1.5.0#ma2asm_inst_prep#Move_Ret_To_Mem_L.c
gprolog-1.5.0
ma2asm_inst.c
Move_Ret_To_Mem_L
13
void Move_Ret_To_Mem_L(char *name, int index) { if (pic_code) { Inst_Printf("movq", "%s@GOTPCREL(%%rip), " "%%r10", name); Inst_Printf("movq", "%%rax, " "%d(%%r10)", index * 8); } else { Inst_Printf("movq", "%%rax, " "%s+%d(%%rip)", name, index * 8); } }
{ "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,...
nano-7.2#global_prep#flip_pipe.c
nano-7.2
global.c
flip_pipe
1
void flip_pipe(void) {;}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
tulipindicators-0.9.1#sma_prep#ti_sma.c
tulipindicators-0.9.1
sma.c
ti_sma
21
int ti_sma(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]; const double scale = 1.0 / period; if (period < 1) return 1; if (size <= ti_sma_start(options)) ret...
{ "array_type": 4, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
transcoder-set#CHECK_WHETHER_GIVEN_DEGREES_VERTICES_REPRESENT_GRAPH_TREE_prep#min.c
transcoder-set
CHECK_WHETHER_GIVEN_DEGREES_VERTICES_REPRESENT_GRAPH_TREE.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,...
binn-3.0#binn_prep#binn_value.c
binn-3.0
binn.c
binn_value
34
binn * binn_value(int type, void *pvalue, int size, binn_mem_free freefn) { int storage_type; binn *item = binn_alloc_item(); if (item) { item->type = type; binn_get_type_info(type, &storage_type, ((void *)0)); switch (storage_type) { case 0x00: break; case 0xA0: if (size == 0) siz...
{ "array_type": 0, "break_continue_statement": 2, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 1, "type_casting": 4,...
libxml2#xmlreader_prep#xmlTextReaderConstXmlVersion.c
libxml2
xmlreader.c
xmlTextReaderConstXmlVersion
16
const xmlChar * xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader) { xmlDocPtr doc = ((void *)0); if (reader == ((void *)0)) return(((void *)0)); if (reader->doc != ((void *)0)) doc = reader->doc; else if (reader->ctxt != ((void *)0)) doc = reader->ctxt->myDoc; if (doc == ((void *)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": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 9,...
transcoder-set#CEILING_IN_A_SORTED_ARRAY_1_prep#f_filled.c
transcoder-set
CEILING_IN_A_SORTED_ARRAY_1.c
f_filled
1
int f_filled ( int arr [ ], int low, int high, 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,...
transcoder-set#SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1_prep#cmpfunc.c
transcoder-set
SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_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,...