id
stringlengths
21
132
codebase
stringclasses
57 values
c_file
stringlengths
3
108
function
stringlengths
3
74
sloc
stringclasses
134 values
c_code
stringlengths
25
52.1k
c_constructs
dict
libxml2#libxml2-py_prep#libxml_xmlUCSIsCatSo.c
libxml2
libxml2-py.c
libxml_xmlUCSIsCatSo
13
PyObject * libxml_xmlUCSIsCatSo(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsCatSo") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSIsCatSo", &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,...
transcoder-set#FIND_HARMONIC_MEAN_USING_ARITHMETIC_MEAN_GEOMETRIC_MEAN_prep#f_gold.c
transcoder-set
FIND_HARMONIC_MEAN_USING_ARITHMETIC_MEAN_GEOMETRIC_MEAN.c
f_gold
7
double f_gold ( int a, int b ) { double AM, GM, HM; AM = ( a + b ) / 2; GM = sqrt ( a * b ); HM = ( GM * GM ) / AM; return HM; }
{ "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#tree_prep#xmlNewPI.c
libxml2
tree.c
xmlNewPI
4
xmlNodePtr xmlNewPI(const xmlChar *name, const xmlChar *content) { return(xmlNewDocPI(((void *)0), name, content)); }
{ "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_inf_and_nan_prep#json_extract_get_value_size.c
json.h
allow_inf_and_nan.c
json_extract_get_value_size
26
struct json_extract_result_s json_extract_get_value_size(const struct json_value_s *const value) { struct json_extract_result_s result = {0, 0}; switch (value->type) { default: break; case json_type_object: result = json_extract_get_object_size( (const struct json_object_s *)value->payload); ...
{ "array_type": 0, "break_continue_statement": 5, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 2, "switch_statement": 1, "type_casting": 1,...
screen-4.9.0#mark_prep#MakePaster.c
screen-4.9.0
mark.c
MakePaster
11
void MakePaster(struct paster *pa, char *buf, int len, int bufiscopy) { FreePaster(pa); pa->pa_pasteptr = buf; pa->pa_pastelen = len; if (bufiscopy) pa->pa_pastebuf = buf; pa->pa_pastelayer = flayer; DoProcess(((struct win *)(flayer)->l_bottom->l_data), &pa->pa_pasteptr, &pa->pa_pastelen, pa); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 1,...
patch-2.7.6#pch_prep#pch_says_nonexistent.c
patch-2.7.6
pch.c
pch_says_nonexistent
5
int pch_says_nonexistent (_Bool which) { return p_says_nonexistent[which]; }
{ "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": 0,...
libxml2#globals_prep#__xmlParserInputBufferCreateFilenameValue.c
libxml2
globals.c
__xmlParserInputBufferCreateFilenameValue
1
xmlParserInputBufferCreateFilenameFunc *__xmlParserInputBufferCreateFilenameValue(void) { return (&xmlGetThreadLocalStorage(0)->gs_xmlParserInputBufferCreateFilenameValue); }
{ "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#NTH_NON_FIBONACCI_NUMBER_prep#sort.c
transcoder-set
NTH_NON_FIBONACCI_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,...
nettle-3.9.1#gcm-aes192_prep#nettle_gcm_aes192_update.c
nettle-3.9.1
gcm-aes192.c
nettle_gcm_aes192_update
6
void nettle_gcm_aes192_update (struct gcm_aes192_ctx *ctx, size_t length, const uint8_t *data) { nettle_gcm_update(&(ctx)->gcm, &(ctx)->key, (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": 0,...
wget-1.21.4#retr_prep#fd_read_line.c
wget-1.21.4
retr.c
fd_read_line
5
char * fd_read_line (int fd) { return fd_read_hunk (fd, line_terminator, 128, 4096); }
{ "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,...
libosip2-5.3.1#osip_from_prep#osip_from_parse.c
libosip2-5.3.1
osip_from.c
osip_from_parse
133
int osip_from_parse(osip_from_t *from, const char *hvalue) { const char *displayname = ((void *)0); const char *url = ((void *)0); const char *url_end = ((void *)0); const char *gen_params; const char *ptr; int i; if (from == ((void *)0) || hvalue == ((void *)0)) return -2; ptr = hvalue; while (pt...
{ "array_type": 2, "break_continue_statement": 12, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 34, "memory_management": 4, "memory_operation": 0, "pointer_type": 8, "return_statement": 16, "struct_type": 0, "switch_statement": 0, "type_casting":...
wget-1.21.4#iri_prep#set_content_encoding.c
wget-1.21.4
iri.c
set_content_encoding
14
void set_content_encoding (struct iri *i, const char *charset) { do { if (__builtin_expect ((opt.debug), 0)) { debug_logprintf ("URI content encoding = %s\n", charset ? quote (charset) : "None"); } } while (0); if (opt.encoding_remote) return; if (i->content_encoding) { if (charset && !c_strcasecmp ...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 1, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 1, "switch_statement": 0, "type_casting": 2,...
libxml2#libxml2-py_prep#libxml_xmlGetDtdQAttrDesc.c
libxml2
libxml2-py.c
libxml_xmlGetDtdQAttrDesc
16
PyObject * libxml_xmlGetDtdQAttrDesc(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; xmlAttributePtr c_retval; xmlDtdPtr dtd; PyObject *pyobj_dtd; xmlChar * elem; xmlChar * name; xmlChar * prefix; if (!_PyArg_ParseTuple_SizeT(args, (char *)"Ozzz:xmlGet...
{ "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,...
libosip2-5.3.1#osip_proxy_authentication_info_prep#osip_message_get_proxy_authentication_info.c
libosip2-5.3.1
osip_proxy_authentication_info.c
osip_message_get_proxy_authentication_info
9
int osip_message_get_proxy_authentication_info(const osip_message_t *sip, int pos, osip_proxy_authentication_info_t **dest) { osip_proxy_authentication_info_t *proxy_authentication_info; *dest = ((void *)0); if (osip_list_size(&sip->proxy_authentication_infos) <= pos) return -1; proxy_authentication_info = ...
{ "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": 1,...
gprolog-1.5.0#pred_c_prep#Pl_Pred_Prop_User_2.c
gprolog-1.5.0
pred_c.c
Pl_Pred_Prop_User_2
8
Bool Pl_Pred_Prop_User_2(WamWord func_word, WamWord arity_word) { int func = Pl_Rd_Atom(func_word); int arity = Pl_Rd_Integer(arity_word); PredInf *pred = Pl_Lookup_Pred(func, arity); return pred != ((void *)0) && (pred->prop & 8) == 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": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES_prep#cmpfunc.c
transcoder-set
FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES.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,...
json.h#allow_inf_and_nan_prep#json_write_minified.c
json.h
allow_inf_and_nan.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,...
gawk-5.2.2#int_array_prep#int_kilobytes.c
gawk-5.2.2
int_array.c
int_kilobytes
17
double int_kilobytes(NODE *symbol) { unsigned long i, bucket_cnt = 0; BUCKET *b; double kb; extern double str_kilobytes(NODE *symbol); for (i = 0; i < symbol->sub.nodep.cnt; i++) { for (b = symbol->sub.nodep.r.bv[i]; b != ((void *)0); b = b->hi.next) bucket_cnt++; } kb = (((double) bucket_cnt) * sizeof (BUC...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
transcoder-set#LONGEST_INCREASING_ODD_EVEN_SUBSEQUENCE_prep#len.c
transcoder-set
LONGEST_INCREASING_ODD_EVEN_SUBSEQUENCE.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#FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS_prep#f_filled.c
transcoder-set
FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS.c
f_filled
1
int f_filled ( int stack1 [ ], int stack2 [ ], int stack3 [ ], int n1, int n2, int n3 ) {}
{ "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,...
pth-2.0.7#pth_high_prep#pth_read.c
pth-2.0.7
pth_high.c
pth_read
4
ssize_t pth_read(int fd, void *buf, size_t nbytes) { return pth_read_ev(fd, buf, nbytes, ((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,...
transcoder-set#FIND_WHETHER_AN_ARRAY_IS_SUBSET_OF_ANOTHER_ARRAY_SET_1_prep#cmpfunc.c
transcoder-set
FIND_WHETHER_AN_ARRAY_IS_SUBSET_OF_ANOTHER_ARRAY_SET_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,...
tmux#screen-write_prep#screen_write_deletecharacter.c
tmux
screen-write.c
screen_write_deletecharacter
20
void screen_write_deletecharacter(struct screen_write_ctx *ctx, u_int nx, u_int bg) { struct screen *s = ctx->s; struct tty_ctx ttyctx; if (nx == 0) nx = 1; if (nx > ((s)->grid->sx) - s->cx) nx = ((s)->grid->sx) - s->cx; if (nx == 0) return; if (s->cx > ((s)->grid->sx) - 1) return; screen_write_initctx(c...
{ "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": 1, "return_statement": 2, "struct_type": 2, "switch_statement": 0, "type_casting": 0,...
tulipindicators-0.9.1#volatility_prep#ti_volatility.c
tulipindicators-0.9.1
volatility.c
ti_volatility
29
int ti_volatility(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *input = inputs[0]; double *output = outputs[0]; const int period = (int)options[0]; const double scale = 1.0 / period; const double annual = sqrt(252); if (period < 1) return 1...
{ "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,...
libosip2-5.3.1#sdp_accessor_prep#sdp_message_i_info_get.c
libosip2-5.3.1
sdp_accessor.c
sdp_message_i_info_get
12
char *sdp_message_i_info_get(sdp_message_t *sdp, int pos_media) { sdp_media_t *med; if (sdp == ((void *)0)) return ((void *)0); if (pos_media == -1) { return sdp->i_info; } med = osip_list_get(&sdp->m_medias, pos_media); if (med == ((void *)0)) return ((void *)0); return med->i_info; }
{ "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": 1, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
transcoder-set#MINIMUM_DIFFERENCE_MAX_MIN_K_SIZE_SUBSETS_prep#max.c
transcoder-set
MINIMUM_DIFFERENCE_MAX_MIN_K_SIZE_SUBSETS.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,...
gprolog-1.5.0#fd_range_prep#Pl_Vector_Mod_Vector.c
gprolog-1.5.0
fd_range.c
Pl_Vector_Mod_Vector
19
void Pl_Vector_Mod_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": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
findutils-4.9.0#printf-args_prep#printf_fetchargs.c
findutils-4.9.0
printf-args.c
printf_fetchargs
95
int printf_fetchargs (va_list args, arguments *a) { size_t i; argument *ap; for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) switch (ap->type) { case TYPE_SCHAR: ap->a.a_schar = __builtin_va_arg(args,int); break; case TYPE_UCHAR: ap->a.a_uchar = __builtin_va_arg(...
{ "array_type": 1, "break_continue_statement": 22, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 1, "type_casting": 3...
gprolog-1.5.0#stream_supp_prep#Del_Aliases_Of_Stream.c
gprolog-1.5.0
stream_supp.c
Del_Aliases_Of_Stream
10
void Del_Aliases_Of_Stream(int stm) { HashScan scan; AliasInf *alias; for (alias = (AliasInf *) Pl_Hash_First(pl_alias_tbl, &scan); alias; alias = (AliasInf *) Pl_Hash_Next(&scan)) if (alias->stm == stm) Pl_Hash_Delete(pl_alias_tbl, alias->atom); }
{ "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": 1, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#SUM_DIVISORS_1_N_1_prep#f_gold.c
transcoder-set
SUM_DIVISORS_1_N_1.c
f_gold
7
int f_gold ( int n ) { int sum = 0; for ( int i = 1; i <= n; ++ i ) sum += ( n / i ) * i; return sum; }
{ "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,...
rcs-5.10.1#b-fro_prep#fro_tello.c
rcs-5.10.1
b-fro.c
fro_tello
16
off_t fro_tello (struct fro *f) { off_t rv = 0; switch (f->rm) { case RM_MMAP: case RM_MEM: rv = f->ptr - f->base; break; case RM_STDIO: rv = ftello (f->stream); break; } return rv; }
{ "array_type": 0, "break_continue_statement": 2, "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": 1, "type_casting": 0,...
json.h#allow_location_information_prep#json_write_minified_object.c
json.h
allow_location_information.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,...
tulipindicators-0.9.1#torad_prep#ti_torad.c
tulipindicators-0.9.1
torad.c
ti_torad
1
int ti_torad(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *in1 = inputs[0]; (void)options; double *output = outputs[0]; int i; for (i = 0; i < size; ++i) { output[i] = ((in1[i] * (3.14159265358979323846 / 180.0))); } return 0; }
{ "array_type": 4, "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": 3, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
json.h#allow_unquoted_keys_prep#json_write_minified_value.c
json.h
allow_unquoted_keys.c
json_write_minified_value
35
char *json_write_minified_value(const struct json_value_s *value, char *data) { switch (value->type) { default: return 0; case json_type_number: return json_write_number((struct json_number_s *)value->payload, data); case json_type_string: return json_write_string((struct json_string_s *)value->payl...
{ "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": 8, "struct_type": 1, "switch_statement": 1, "type_casting": 4,...
json-c#json_object_prep#json_object_get_int.c
json-c
json_object.c
json_object_get_int
48
int32_t json_object_get_int(const struct json_object *jso) { int64_t cint64 = 0; double cdouble; enum json_type o_type; if (!jso) return 0; o_type = jso->o_type; if (o_type == json_type_int) { const struct json_object_int *jsoint = JC_INT_C(jso); if (jsoint->cint_type == json_object_int_type_int64) { ...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 1, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 10, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 10, "struct_type": 2, "switch_statement": 1, "type_casting": ...
units-2.22#units_prep#invfnlookup.c
units-2.22
units.c
invfnlookup
8
struct func * invfnlookup(char *str) { if (*str != '~') return 0; removespaces(str+1); return fnlookup(str+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": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
brotli-1.0.9#encode_prep#BrotliEncoderCompress.c
brotli-1.0.9
encode.c
BrotliEncoderCompress
63
int BrotliEncoderCompress( int quality, int lgwin, BrotliEncoderMode mode, size_t input_size, const uint8_t* input_buffer, size_t* encoded_size, uint8_t* encoded_buffer) { BrotliEncoderState* s; size_t out_size = *encoded_size; const uint8_t* input_start = input_buffer; uint8_t* output_start = encod...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 2, "if_statement": 10, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 8, "struct_type": 0, "switch_statement": 0, "type_casting": 0...
pth-2.0.7#pth_high_prep#pth_writev.c
pth-2.0.7
pth_high.c
pth_writev
4
ssize_t pth_writev(int fd, const struct iovec *iov, int iovcnt) { return pth_writev_ev(fd, iov, iovcnt, ((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": 1, "switch_statement": 0, "type_casting": 1,...
tmux#imsg_prep#imsg_free.c
tmux
imsg.c
imsg_free
5
void imsg_free(struct imsg *imsg) { freezero(imsg->data, imsg->hdr.len - sizeof(struct imsg_hdr)); }
{ "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,...
cpio-2.14#paxerror_prep#write_error_details.c
cpio-2.14
paxerror.c
write_error_details
8
void write_error_details (char const *name, size_t status, size_t size) { if (status == 0) write_error (name); else do { if (error_hook) error_hook (); error (0, 0, ngettext ("%s: Wrote only %zu of %zu byte", "%s: Wrote only %zu of %zu bytes", size), name, status, size); exit_status = 2; } while (0); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
nettle-3.9.1#eddsa-pubkey_prep#_nettle_eddsa_public_key_itch.c
nettle-3.9.1
eddsa-pubkey.c
_nettle_eddsa_public_key_itch
6
mp_size_t _nettle_eddsa_public_key_itch (const struct ecc_curve *ecc) { ((void) sizeof ((ecc->mul_g_itch <= _nettle_eddsa_compress_itch (ecc)) ? 1 : 0), __extension__ ({ if (ecc->mul_g_itch <= _nettle_eddsa_compress_itch (ecc)) ; else __assert_fail ("ecc->mul_g_itch <= _eddsa_compress_itch (ecc)", "eddsa-pubkey.c", 4...
{ "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,...
json.h#allow_leading_plus_sign_prep#json_write_pretty.c
json.h
allow_leading_plus_sign.c
json_write_pretty
42
void *json_write_pretty(const struct json_value_s *value, const char *indent, const char *newline, size_t *out_size) { size_t size = 0; size_t indent_size = 0; size_t newline_size = 0; char *data = 0; char *data_end = 0; if (0 == value) { return 0; } if (0 == indent) { in...
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 7, "memory_management": 2, "memory_operation": 0, "pointer_type": 2, "return_statement": 5, "struct_type": 1, "switch_statement": 0, "type_casting": 1,...
mcsim-6.2.0#mh_prep#NextDown.c
mcsim-6.2.0
mh.c
NextDown
12
double NextDown (double Perk) { int i; static double PTable[21] = {0, 1E-6, 1E-5, 1E-4, 1E-3, 1E-2, 0.1, 0.2, 0.3, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.97, 0.99, 0.999, 0.9999, 0.99999, 1}; i = 0; while (Perk > PTable[i]) { i++; } return (i == 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": 0,...
libxml2#parserInternals_prep#xmlFreeInputStream.c
libxml2
parserInternals.c
xmlFreeInputStream
11
void xmlFreeInputStream(xmlParserInputPtr input) { if (input == ((void *)0)) return; if (input->filename != ((void *)0)) xmlFree((char *) input->filename); if (input->version != ((void *)0)) xmlFree((char *) input->version); if ((input->free != ((void *)0)) && (input->base != ((void *)0))) input...
{ "array_type": 0, "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": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
nano-7.2#utils_prep#is_separate_word.c
nano-7.2
utils.c
is_separate_word
7
_Bool is_separate_word(size_t position, size_t length, const char *text) { const char *before = text + step_left(text, position); const char *after = text + position + length; return ((position == 0 || !is_alpha_char(before)) && (*after == '\0' || !is_alpha_char(after))); }
{ "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": 2, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
less-633#ch_prep#ch_beg_seek.c
less-633
ch.c
ch_beg_seek
18
int ch_beg_seek(void) { struct bufnode *bn; struct bufnode *firstbn; if (ch_seek(((POSITION)0)) == 0) return (0); firstbn = thisfile->buflist.next; if (firstbn == (&thisfile->buflist)) return (1); for (bn = thisfile->buflist.next; bn != (&thisfile->buflist); bn = bn->next) { if (((struct buf *) bn)->block ...
{ "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": 2, "return_statement": 3, "struct_type": 2, "switch_statement": 0, "type_casting": 3,...
json.h#allow_multi_line_strings_prep#json_write_minified_object.c
json.h
allow_multi_line_strings.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,...
tmux#alerts_prep#alerts_reset_all.c
tmux
alerts.c
alerts_reset_all
7
void alerts_reset_all(void) { struct window *w; for ((w) = windows_RB_MINMAX(&windows, -1); (w) != ((void *)0); (w) = windows_RB_NEXT(w)) alerts_reset(w); }
{ "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": 1, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 2,...
gprolog-1.5.0#le_interf_c_prep#Pl_Add_Linedit_Completion_1.c
gprolog-1.5.0
le_interf_c.c
Pl_Add_Linedit_Completion_1
19
Bool Pl_Add_Linedit_Completion_1(WamWord compl_word) { int atom; AtomProp prop; char *p; atom = Pl_Rd_Atom_Check(compl_word); prop = pl_atom_tbl[atom].prop; if (prop.length == 0) return 0; if (prop.type != 0) { for (p = pl_atom_tbl[atom].name; *p; p++) if (!((*__ctype_b_loc ())[(int) ((*p))...
{ "array_type": 1, "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": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#PROGRAM_PRINT_SUM_GIVEN_NTH_TERM_1_prep#main.c
transcoder-set
PROGRAM_PRINT_SUM_GIVEN_NTH_TERM_1.c
main
14
int main(void) { int n_success = 0; long param0[] = {42,40,67,73,18,16,74,33,92,22}; 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...
{ "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,...
transcoder-set#AREA_SQUARE_CIRCUMSCRIBED_CIRCLE_prep#max.c
transcoder-set
AREA_SQUARE_CIRCUMSCRIBED_CIRCLE.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#ROUND_THE_GIVEN_NUMBER_TO_NEAREST_MULTIPLE_OF_10_prep#sort.c
transcoder-set
ROUND_THE_GIVEN_NUMBER_TO_NEAREST_MULTIPLE_OF_10.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#xmlmemory_prep#xmlInitMemory.c
libxml2
xmlmemory.c
xmlInitMemory
5
int xmlInitMemory(void) { xmlInitParser(); 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,...
libxml2#libxml2-py_prep#libxml_xmlValidateDtdFinal.c
libxml2
libxml2-py.c
libxml_xmlValidateDtdFinal
18
PyObject * libxml_xmlValidateDtdFinal(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; xmlValidCtxtPtr ctxt; PyObject *pyobj_ctxt; xmlDocPtr doc; PyObject *pyobj_doc; if (libxml_deprecationWarning("xmlValidateDtdFinal") == -1) return((...
{ "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": 3, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 6,...
tulipindicators-0.9.1#tiamalgamation_prep#ti_cos.c
tulipindicators-0.9.1
tiamalgamation.c
ti_cos
1
int ti_cos(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *in1 = inputs[0]; (void)options; double *output = outputs[0]; int i; for (i = 0; i < size; ++i) { output[i] = (cos(in1[i])); } return 0; }
{ "array_type": 4, "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": 3, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libxml2#libxml2-py_prep#libxml_xmlNewProp.c
libxml2
libxml2-py.c
libxml_xmlNewProp
15
PyObject * libxml_xmlNewProp(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; xmlAttrPtr c_retval; xmlNodePtr node; PyObject *pyobj_node; xmlChar * name; xmlChar * value; if (!_PyArg_ParseTuple_SizeT(args, (char *)"Ozz:xmlNewProp", &pyobj_node, &name, &valu...
{ "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,...
make-4.4.1#read_prep#parse_file_seq.c
make-4.4.1
read.c
parse_file_seq
194
void * parse_file_seq (char **stringp, size_t size, int stopmap, const char *prefix, int flags) { static char *tmpbuf = ((void *)0); int cachep = (! ((((flags))&((0x0010))) != 0)); struct nameseq *new = 0; struct nameseq **newp = &new; char *p; glob_t gl; char *tp; int findmap = stopmap|...
{ "array_type": 4, "break_continue_statement": 11, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 33, "memory_management": 2, "memory_operation": 1, "pointer_type": 17, "return_statement": 1, "struct_type": 5, "switch_statement": 1, "type_casting":...
libxml2#debugXML_prep#xmlDebugDumpAttrList.c
libxml2
debugXML.c
xmlDebugDumpAttrList
11
void xmlDebugDumpAttrList(FILE * output, xmlAttrPtr attr, int depth) { xmlDebugCtxt ctxt; if (output == ((void *)0)) return; xmlCtxtDumpInitCtxt(&ctxt); ctxt.output = output; ctxt.depth = depth; xmlCtxtDumpAttrList(&ctxt, attr); xmlCtxtDumpCleanCtxt(&ctxt); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
json.h#allow_single_quoted_strings_prep#utest_run_allow_single_quoted_strings_read_write_pretty_read.c
json.h
allow_single_quoted_strings.c
utest_run_allow_single_quoted_strings_read_write_pretty_read
7
void utest_run_allow_single_quoted_strings_read_write_pretty_read(int *utest_result, struct allow_single_quoted_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); fre...
{ "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,...
bzip2#bzlib_prep#BZ2_bzdopen.c
bzip2
bzlib.c
BZ2_bzdopen
6
BZFILE * BZ2_bzdopen ( int fd, const char *mode ) { return bzopen_or_bzdopen(((void *)0),fd,mode, 1); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libxml2#xmlcatalog_prep#main.c
libxml2
xmlcatalog.c
main
260
int main(int argc, char **argv) { int i; int ret; int exit_value = 0; if (argc <= 1) { usage(argv[0]); return(1); } xmlCheckVersion(21400); for (i = 1; i < argc ; i++) { if (!strcmp(argv[i], "-")) break; if (argv[i][0] != '-') break; if ((!strcmp(argv[i], "-verbose")) || ...
{ "array_type": 1, "break_continue_statement": 9, "enum_type": 0, "for_loop": 4, "function_pointer": 0, "goto_statement": 0, "if_statement": 54, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 2...
transcoder-set#FIND_MAXIMUM_AVERAGE_SUBARRAY_OF_K_LENGTH_1_prep#main.c
transcoder-set
FIND_MAXIMUM_AVERAGE_SUBARRAY_OF_K_LENGTH_1.c
main
26
int main(void) { int n_success = 0; int param0_0[] = {2,5,11,37,41,49,49,63,98}; int param0_1[] = {84,-72,12,0,86,-32,-18,48,60,42,8,-6,-10,-6,-52,-84,-98,76,-10,-14,-94,-48,94,-10,-20,40,-52,0,94,-68,44,-34,-26,-6,-94,34,-80,-62,-40,56,52,-20,74,-46,-88,-26,22}; int param0_2[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,...
{ "array_type": 3, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
screen-4.9.0#layer_prep#LCursorVisibility.c
screen-4.9.0
layer.c
LCursorVisibility
12
void LCursorVisibility(struct layer *l, int vis) { struct canvas *cv; for (cv = l->l_cvlist; cv; cv = cv->c_lnext) { display = cv->c_display; if (display->d_blocked) continue; if (cv != display->d_forecv) continue; CursorVisibility(vis); } }
{ "array_type": 0, "break_continue_statement": 2, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 2, "switch_statement": 0, "type_casting": 0,...
json.h#allow_global_object_prep#utest_run_allow_global_object_read_write_minified_read.c
json.h
allow_global_object.c
utest_run_allow_global_object_read_write_minified_read
7
void utest_run_allow_global_object_read_write_minified_read(int *utest_result, struct allow_global_object *utest_fixture) { size_t size = 0; void *json = json_write_minified(utest_fixture->value, &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,...
transcoder-set#DIFFERENCE_BETWEEN_HIGHEST_AND_LEAST_FREQUENCIES_IN_AN_ARRAY_prep#sort.c
transcoder-set
DIFFERENCE_BETWEEN_HIGHEST_AND_LEAST_FREQUENCIES_IN_AN_ARRAY.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,...
binn-3.0#binn_prep#binn_map_int32.c
binn-3.0
binn.c
binn_map_int32
5
int binn_map_int32(void *map, int id) { int value; binn_map_get(map, id, 0x61, &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,...
ed-1.19#signal_prep#set_window_lines.c
ed-1.19
signal.c
set_window_lines
1
void set_window_lines( const int lines ) { window_lines_ = lines; }
{ "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-c#json_object_prep#json_object_new_null.c
json-c
json_object.c
json_object_new_null
4
struct json_object *json_object_new_null(void) { return ((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": 1, "switch_statement": 0, "type_casting": 2,...
libxml2#buf_prep#xmlBufGrow.c
libxml2
buf.c
xmlBufGrow
12
int xmlBufGrow(xmlBufPtr buf, size_t len) { if ((buf == ((void *)0)) || (((buf)->flags & ((1u << 0) | (1u << 1)))) || (((buf)->flags & (1u << 2)))) return(-1); if (buf->size != (size_t) buf->compat_size) if (buf->compat_size < 0x7fffffff) buf->size = buf->compat_size; if (buf->use != (size_t) buf->compa...
{ "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": 2,...
units-2.22#parse.tab_prep#makenumunit.c
units-2.22
parse.tab.c
makenumunit
13
struct unittype * makenumunit(double num,int *myerr) { struct unittype *ret; ret=getnewunit(); if (!ret){ *myerr = 14; return 0; } ret->factor = num; *myerr = 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": 1, "switch_statement": 0, "type_casting": 0,...
nano-7.2#history_prep#get_history_completion.c
nano-7.2
history.c
get_history_completion
30
char *get_history_completion(linestruct **here, char *string, size_t len) { linestruct *htop = ((void *)0), *hbot = ((void *)0); linestruct *item; if (*here == search_history) { htop = searchtop; hbot = searchbot; } else if (*here == replace_history) { htop = replacetop; hbot = replacebot; } else if (*here...
{ "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": 3, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
json.h#test_prep#json_extract_value.c
json.h
test.c
json_extract_value
3
struct json_value_s *json_extract_value(const struct json_value_s *value) { return json_extract_value_ex(value, 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,...
uucp-1.07#proti_prep#fisendcmd.c
uucp-1.07
proti.c
fisendcmd
28
boolean fisendcmd (qdaemon, z, ilocal, iremote) struct sdaemon *qdaemon; const char *z; int ilocal; int iremote; { size_t clen; do { if (((iDebug & ((010))) != 0)) ulog (LOG_DEBUG, ("fisendcmd: Sending command \"%s\""), (z)); } while (0); clen = strlen (z); while ((1)) { char *zpac...
{ "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": 2, "pointer_type": 1, "return_statement": 2, "struct_type": 1, "switch_statement": 0, "type_casting": 2,...
tar-1.34#misc_prep#xpipe.c
tar-1.34
misc.c
xpipe
6
void xpipe (int fd[2]) { if (pipe (fd) < 0) call_arg_fatal ("pipe", gettext ("interprocess channel")); }
{ "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,...
patch-2.7.6#asnprintf_prep#asnprintf.c
patch-2.7.6
asnprintf.c
asnprintf
10
char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) { va_list args; char *result; __builtin_va_start(args,format); result = vasnprintf (resultbuf, lengthp, format, args); __builtin_va_end(args); 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": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
screen-4.9.0#display_prep#RedisplayDisplays.c
screen-4.9.0
display.c
RedisplayDisplays
9
void RedisplayDisplays(cur_only) int cur_only; { struct display *olddisplay = display; for (display = displays; display; display = display->d_next) Redisplay(cur_only); display = olddisplay; }
{ "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": 1, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
wget-1.21.4#utils_prep#compile_pcre2_regex.c
wget-1.21.4
utils.c
compile_pcre2_regex
13
void * compile_pcre2_regex (const char *str) { int errornumber; size_t erroroffset; pcre2_code_8 *regex = pcre2_compile_8((PCRE2_SPTR8) str, (~(size_t)0), 0, &errornumber, &erroroffset, ((void *)0)); if (! regex) { fprintf (stderr, gettext("Invalid regular expression %s, PCRE2 error %d\n"), ...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libxml2#xpath_prep#xmlXPathCastBooleanToNumber.c
libxml2
xpath.c
xmlXPathCastBooleanToNumber
6
double xmlXPathCastBooleanToNumber(int val) { if (val) return(1.0); return(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": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libosip2-5.3.1#osip_route_prep#osip_route_parse.c
libosip2-5.3.1
osip_route.c
osip_route_parse
3
int osip_route_parse(osip_route_t *route, const char *hvalue) { return osip_from_parse((osip_from_t *) route, hvalue); }
{ "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,...
gprolog-1.5.0#misc_prep#Pl_Popcount.c
gprolog-1.5.0
misc.c
Pl_Popcount
32
int Pl_Popcount(PlLong x) { static int nb_bits_in_byte[256] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4...
{ "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": 0,...
bc-1.07.1#misc_prep#dc_system.c
bc-1.07.1
misc.c
dc_system
20
const char * dc_system ( const char *s ) { const char *p; char *tmpstr; size_t len; p = strchr(s, '\n'); if (p != ((void *)0)) { len = (size_t) (p - s); tmpstr = dc_malloc(len + 1); strncpy(tmpstr, s, len); tmpstr[len] = '\0'; system(tmpstr); free(tmpstr); return p + 1; } system(s); return s + st...
{ "array_type": 1, "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": 2, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
transcoder-set#HOW_TO_PRINT_MAXIMUM_NUMBER_OF_A_USING_GIVEN_FOUR_KEYS_prep#len.c
transcoder-set
HOW_TO_PRINT_MAXIMUM_NUMBER_OF_A_USING_GIVEN_FOUR_KEYS.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,...
mcsim-6.2.0#modelu_prep#IsOutput.c
mcsim-6.2.0
modelu.c
IsOutput
4
BOOL IsOutput (HVAR hvar) { return (GetVarType(hvar) == 0x30000); }
{ "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,...
units-2.22#units_prep#fgetscont.c
units-2.22
units.c
fgetscont
20
char * fgetscont(char *buf, int size, FILE *file, int *count) { if (!fgets(buf,size,file)) return 0; (*count)++; while(strlen(buf)>=2 && 0==strcmp(buf+strlen(buf)-2,"\\\n")){ (*count)++; buf[strlen(buf)-2] = 0; if (strlen(buf)>=size-1) return buf; if (!fgets(buf+strlen(buf), size - strle...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
mcsim-6.2.0#matutil_prep#InitlMatrix.c
mcsim-6.2.0
matutil.c
InitlMatrix
20
long **InitlMatrix (long cVectors, long cElemsEach) { register long i; long **rgp; if ((cVectors == 0) || (cElemsEach == 0)) { printf ("Error: zero length array allocation in InitlMatrix - Exiting\n"); exit (0); } rgp = (long **) malloc (cVectors * sizeof(long *)); if (rgp) { for (i = 0; i < cVe...
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 2, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
tmux#arguments_prep#args_has.c
tmux
arguments.c
args_has
5
int args_has(struct args *args, u_char ch) { return (args_find(args, ch) != ((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": 1, "switch_statement": 0, "type_casting": 1,...
transcoder-set#FIND_PATTERNS_101_GIVEN_STRING_prep#main.c
transcoder-set
FIND_PATTERNS_101_GIVEN_STRING.c
main
14
int main(void) { int n_success = 0; char param0[][100] = {"fkyso nGZSLfhj","3841","0100001110111","zXZkptcbnQot","4364264685264","10","wDgox","1215572","1","bftZvRTamdUvL"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; ...
{ "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,...
transcoder-set#MINIMUM_TIME_WRITE_CHARACTERS_USING_INSERT_DELETE_COPY_OPERATION_prep#max.c
transcoder-set
MINIMUM_TIME_WRITE_CHARACTERS_USING_INSERT_DELETE_COPY_OPERATION.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,...
tulipindicators-0.9.1#tiamalgamation_prep#ti_atr_ref.c
tulipindicators-0.9.1
tiamalgamation.c
ti_atr_ref
20
int ti_atr_ref(int size, double const *const *inputs, double const *options, double *const *outputs) { const int period = (int)options[0]; if (period < 1) return 1; if (size <= ti_atr_start(options)) return 0; const int tr_start = ti_tr_start(options); const int tr_size = size - tr_start; double...
{ "array_type": 3, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 3, "memory_operation": 0, "pointer_type": 3, "return_statement": 5, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
libxml2#libxml2-py_prep#libxml_xmlSetNs.c
libxml2
libxml2-py.c
libxml_xmlSetNs
14
PyObject * libxml_xmlSetNs(PyObject *self __attribute__ ((__unused__)), PyObject *args) { xmlNodePtr node; PyObject *pyobj_node; xmlNsPtr ns; PyObject *pyobj_ns; if (!_PyArg_ParseTuple_SizeT(args, (char *)"OO:xmlSetNs", &pyobj_node, &pyobj_ns)) return(((void *)0)); node = (xmlNodePtr) ((...
{ "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#fat-x86_64_prep#nettle_aes256_decrypt.c
nettle-3.9.1
fat-x86_64.c
nettle_aes256_decrypt
1
void nettle_aes256_decrypt (const struct aes256_ctx *ctx, size_t length, uint8_t *dst,const uint8_t *src) { return nettle_aes256_decrypt_vec (ctx, length, dst, src); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
gawk-5.2.2#dynarray_finalize_prep#__libc_dynarray_finalize.c
gawk-5.2.2
dynarray_finalize.c
__libc_dynarray_finalize
30
_Bool __libc_dynarray_finalize (struct dynarray_header *list, void *scratch, size_t element_size, struct dynarray_finalize_result *result) { if (__dynarray_error (list)) return 0; size_t used = list->used; if (used == 0) { if (list->array != scratc...
{ "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": 1, "pointer_type": 1, "return_statement": 4, "struct_type": 2, "switch_statement": 0, "type_casting": 4,...
transcoder-set#PROGRAM_CIRCUMFERENCE_PARALLELOGRAM_prep#f_gold.c
transcoder-set
PROGRAM_CIRCUMFERENCE_PARALLELOGRAM.c
f_gold
3
float f_gold ( float a, float b ) { return ( ( 2 * a ) + ( 2 * 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": 0,...
transcoder-set#FLOOR_IN_A_SORTED_ARRAY_prep#sort.c
transcoder-set
FLOOR_IN_A_SORTED_ARRAY.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,...
transcoder-set#FIND_ROTATION_COUNT_ROTATED_SORTED_ARRAY_1_prep#main.c
transcoder-set
FIND_ROTATION_COUNT_ROTATED_SORTED_ARRAY_1.c
main
26
int main(void) { int n_success = 0; int param0_0[] = {4,16,38,39,48,74,79}; int param0_1[] = {-46,72,72,-66,96,92,40,8,94,-84,6,-90,38,-6,48,-20,-86,-76,88,-50,-44,-14,54,-6,-2,72,8,-64,-46,44,-88,50,86,38,42,-56}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[...
{ "array_type": 3, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
nettle-3.9.1#chacha-set-nonce_prep#nettle_chacha_set_counter32.c
nettle-3.9.1
chacha-set-nonce.c
nettle_chacha_set_counter32
5
void nettle_chacha_set_counter32(struct chacha_ctx *ctx, const uint8_t *counter) { ctx->state[12] = ( (((uint32_t) (counter + 0)[3]) << 24) | (((uint32_t) (counter + 0)[2]) << 16) | (((uint32_t) (counter + 0)[1]) << 8) | ((uint32_t) (counter + 0)[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": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
transcoder-set#TAIL_RECURSION_prep#main.c
transcoder-set
TAIL_RECURSION.c
main
14
int main(void) { int n_success = 0; int param0[] = {77,62,42,16,82,37,29,32,82,91}; 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 ...
{ "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,...
transcoder-set#PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR_prep#len.c
transcoder-set
PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR.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,...
tar-1.34#paxerror_prep#rmdir_error.c
tar-1.34
paxerror.c
rmdir_error
5
void rmdir_error (char const *name) { call_arg_error ("rmdir", name); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
gprolog-1.5.0#read_c_prep#Pl_Char_Conversion_2.c
gprolog-1.5.0
read_c.c
Pl_Char_Conversion_2
8
void Pl_Char_Conversion_2(WamWord in_char_word, WamWord out_char_word) { int c_in, c_out; c_in = Pl_Rd_Char_Check(in_char_word); c_out = Pl_Rd_Char_Check(out_char_word); pl_char_conv[c_in] = c_out; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...