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
rcs-5.10.1#rcsutil_prep#chk_set_rev.c
rcs-5.10.1
rcsutil.c
chk_set_rev
9
void chk_set_rev (const char **rev, char *arg) { if (! *arg) return; if (*rev) generic_warn (((void *)0), "redefinition of %s", ks_revno); *rev = arg; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_2_prep#sort.c
transcoder-set
FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_2.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#PYTHAGOREAN_QUADRUPLE_prep#main.c
transcoder-set
PYTHAGOREAN_QUADRUPLE.c
main
17
int main(void) { int n_success = 0; int param0[] = {1,3,0,-1,82,14,6,13,96,70}; int param1[] = {2,2,0,-1,79,57,96,7,65,33}; int param2[] = {2,5,0,-1,6,35,45,3,72,6}; int param3[] = {3,38,0,1,59,29,75,63,93,2}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],par...
{ "array_type": 4, "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,...
libosip2-5.3.1#port_thread_prep#osip_thread_exit.c
libosip2-5.3.1
port_thread.c
osip_thread_exit
3
void osip_thread_exit() { pthread_exit(((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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
mcsim-6.2.0#simi_prep#GetStringArg.c
mcsim-6.2.0
simi.c
GetStringArg
18
BOOL GetStringArg (PINPUTBUF pibIn, PSTR *pszArg, PSTR szLex, BOOL bDelim) { BOOL bErr; ((void) sizeof ((szLex) ? 1 : 0), __extension__ ({ if (szLex) ; else __assert_fail ("szLex", "simi.c", 1155, __extension__ __PRETTY_FUNCTION__); })); if (bDelim) GetOptPunct(pibIn, szLex, ','); bErr = ENextLex(pibIn, szL...
{ "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": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
tmux#screen-write_prep#screen_write_insertline.c
tmux
screen-write.c
screen_write_insertline
35
void screen_write_insertline(struct screen_write_ctx *ctx, u_int ny, u_int bg) { struct screen *s = ctx->s; struct grid *gd = s->grid; struct tty_ctx ttyctx; if (ny == 0) ny = 1; if (s->cy < s->rupper || s->cy > s->rlower) { if (ny > ((s)->grid->sy) - s->cy) ny = ((s)->grid->sy) - s->cy; if (ny == 0) r...
{ "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": 2, "return_statement": 3, "struct_type": 3, "switch_statement": 0, "type_casting": 0,...
libxml2#libxml2-py_prep#libxml_xmlURIGetFragment.c
libxml2
libxml2-py.c
libxml_xmlURIGetFragment
13
PyObject * libxml_xmlURIGetFragment(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; const char * c_retval; xmlURIPtr URI; PyObject *pyobj_URI; if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlURIGetFragment", &pyobj_URI)) return(((void *)0)); URI = (xm...
{ "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,...
tmux#screen-write_prep#screen_write_setselection.c
tmux
screen-write.c
screen_write_setselection
9
void screen_write_setselection(struct screen_write_ctx *ctx, u_char *str, u_int len) { struct tty_ctx ttyctx; screen_write_initctx(ctx, &ttyctx); ttyctx.ptr = str; ttyctx.num = len; tty_write(tty_cmd_setselection, &ttyctx); }
{ "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,...
findutils-4.9.0#printquoted_prep#print_quoted.c
findutils-4.9.0
printquoted.c
print_quoted
35
int print_quoted (FILE *fp, const struct quoting_options *qopts, _Bool dest_is_tty, const char *format, const char *s) { int rv; if (dest_is_tty) { char smallbuf[8192]; size_t len = quotearg_buffer (smallbuf, sizeof smallbuf, s, -1, qopts); char *buf; if (len ...
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 1,...
brotli-1.0.9#utf8_util_prep#BrotliIsMostlyUTF8.c
brotli-1.0.9
utf8_util.c
BrotliIsMostlyUTF8
14
int BrotliIsMostlyUTF8( const uint8_t* data, const size_t pos, const size_t mask, const size_t length, const double min_fraction) { size_t size_utf8 = 0; size_t i = 0; while (i < length) { int symbol; size_t bytes_read = BrotliParseAsUTF8(&symbol, &data[(pos + i) & mask], length - i); ...
{ "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,...
tar-1.34#paxerror_prep#truncate_warn.c
tar-1.34
paxerror.c
truncate_warn
5
void truncate_warn (char const *name) { call_arg_warn ("truncate", 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,...
libxml2#xmlsave_prep#xmlSaveFile.c
libxml2
xmlsave.c
xmlSaveFile
4
int xmlSaveFile(const char *filename, xmlDocPtr cur) { return(xmlSaveFormatFileEnc(filename, cur, ((void *)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": 0, "switch_statement": 0, "type_casting": 1,...
tar-1.34#basename_prep#base_name.c
tar-1.34
basename.c
base_name
21
char * base_name (char const *name) { char const *base = last_component (name); size_t length; if (! *base) return xstrndup (name, base_len (name)); length = base_len (base); if (((base[length]) == '/')) length++; if (((void) (base), 0)) { char *p = xmalloc (length + 3); p[0] = '.'; ...
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 1, "pointer_type": 2, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
json.h#test_prep#json_extract_value_ex.c
json.h
test.c
json_extract_value_ex
23
struct json_value_s *json_extract_value_ex(const struct json_value_s *value, void *(*alloc_func_ptr)(void *, size_t), void *user_data) { void *allocation; struct j...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 1, "goto_statement": 0, "if_statement": 2, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 1, "switch_statement": 0, "type_casting": 2,...
transcoder-set#TEMPLE_OFFERINGS_prep#sort.c
transcoder-set
TEMPLE_OFFERINGS.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,...
nano-7.2#asnprintf_prep#asnprintf.c
nano-7.2
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,...
libxml2#uri_prep#xmlParseURISafe.c
libxml2
uri.c
xmlParseURISafe
20
int xmlParseURISafe(const char *str, xmlURIPtr *uriOut) { xmlURIPtr uri; int ret; if (uriOut == ((void *)0)) return(1); *uriOut = ((void *)0); if (str == ((void *)0)) return(1); uri = xmlCreateURI(); if (uri == ((void *)0)) return(-1); ret = xmlParse3986URIReference(uri,...
{ "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": 5, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
gprolog-1.5.0#c_supp_prep#Pl_Rd_In_Code.c
gprolog-1.5.0
c_supp.c
Pl_Rd_In_Code
5
int Pl_Rd_In_Code(WamWord start_word) { return Pl_Rd_Integer(start_word); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#COUNT_DISTINCT_OCCURRENCES_AS_A_SUBSEQUENCE_prep#min.c
transcoder-set
COUNT_DISTINCT_OCCURRENCES_AS_A_SUBSEQUENCE.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,...
tar-1.34#xmalloc_prep#x2realloc.c
tar-1.34
xmalloc.c
x2realloc
5
void * x2realloc (void *p, size_t *pn) { return x2nrealloc (p, pn, 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": 0,...
heman#mat3_prep#kmMat3Scaling.c
heman
mat3.c
kmMat3Scaling
7
kmMat3* kmMat3Scaling(kmMat3* pOut, const float x, const float y) { kmMat3Identity(pOut); pOut->mat[0] = x; pOut->mat[4] = y; return pOut; }
{ "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,...
transcoder-set#DICE_THROW_PROBLEM_prep#sort.c
transcoder-set
DICE_THROW_PROBLEM.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,...
gprolog-1.5.0#linedit_prep#Pl_LE_Get_Current_Position.c
gprolog-1.5.0
linedit.c
Pl_LE_Get_Current_Position
5
int Pl_LE_Get_Current_Position(void) { return global_pos - global_str; }
{ "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_UNIT_DIGIT_X_RAISED_POWER_Y_prep#len.c
transcoder-set
FIND_UNIT_DIGIT_X_RAISED_POWER_Y.c
len
1
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libxml2#xmlschemastypes_prep#xmlSchemaValueGetAsBoolean.c
libxml2
xmlschemastypes.c
xmlSchemaValueGetAsBoolean
7
int xmlSchemaValueGetAsBoolean(xmlSchemaValPtr val) { if ((val == ((void *)0)) || (val->type != XML_SCHEMAS_BOOLEAN)) return (0); return (val->value.b); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
patch-2.7.6#util_prep#savestr.c
patch-2.7.6
util.c
savestr
5
char * savestr (char const *s) { return savebuf (s, strlen (s) + 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": 0,...
libxml2#chvalid_prep#xmlIsChar.c
libxml2
chvalid.c
xmlIsChar
4
int xmlIsChar(unsigned int ch) { return((((ch) < 0x100) ? (((0x9 <= ((ch))) && (((ch)) <= 0xa)) || (((ch)) == 0xd) || (0x20 <= ((ch)))) : (((0x100 <= (ch)) && ((ch) <= 0xd7ff)) || ((0xe000 <= (ch)) && ((ch) <= 0xfffd)) || ((0x10000 <= (ch)) && ((ch) <= 0x10ffff))))); }
{ "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#scan_prep#yy_scan_buffer.c
bc-1.07.1
scan.c
yy_scan_buffer
22
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != 0 || base[size-1] != 0 ) return 0; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) yy_fatal_error( "out of dynamic memory in yy_scan_buffer()" ); b->yy_bu...
{ "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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libosip2-5.3.1#port_condv_prep#osip_cond_timedwait.c
libosip2-5.3.1
port_condv.c
osip_cond_timedwait
5
int osip_cond_timedwait(struct osip_cond *_cond, struct osip_mutex *_mut, const struct timespec *abstime) { if (!_cond) return -2; return pthread_cond_timedwait(&_cond->cv, (pthread_mutex_t *) _mut, (const struct timespec *) abstime); }
{ "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": 1, "switch_statement": 0, "type_casting": 0,...
transcoder-set#DIVISIBILITY_9_USING_BITWISE_OPERATORS_prep#max.c
transcoder-set
DIVISIBILITY_9_USING_BITWISE_OPERATORS.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,...
libxml2#testparser_prep#main.c
libxml2
testparser.c
main
22
int main(void) { int err = 0; err |= testNewDocNode(); err |= testStandaloneWithEncoding(); err |= testUnsupportedEncoding(); err |= testNodeGetContent(); err |= testCFileIO(); err |= testCtxtParseContent(); err |= testBalancedChunk(); err |= testHugePush(); err |= testHugeEncode...
{ "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,...
heman#color_prep#heman_color_from_cpcf.c
heman
color.c
heman_color_from_cpcf
25
heman_image* heman_color_from_cpcf(heman_image* cfield, heman_image* texture) { if (!texture) { return heman_internal_rg(cfield); } ((void) sizeof ((cfield->nbands == 2) ? 1 : 0), __extension__ ({ if (cfield->nbands == 2) ; else __assert_fail ("cfield->nbands == 2", "/home/melih/storage/Transpiler/D...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
nettle-3.9.1#base16-decode_prep#nettle_base16_decode_single.c
nettle-3.9.1
base16-decode.c
nettle_base16_decode_single
33
int nettle_base16_decode_single(struct base16_decode_ctx *ctx, uint8_t *dst, char src) { unsigned char usrc = src; int digit; if (usrc >= 0x80) return -1; digit = hex_decode_table[usrc]; switch (digit) { case -1: return -1; case -2: return 0; default: ((void...
{ "array_type": 1, "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": 5, "struct_type": 1, "switch_statement": 1, "type_casting": 2,...
libxml2#globals_prep#__xmlGenericError.c
libxml2
globals.c
__xmlGenericError
1
xmlGenericErrorFunc *__xmlGenericError(void) { return (&xmlGetThreadLocalStorage(0)->gs_xmlGenericError); }
{ "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#xmlCtxtSetResourceLoader.c
libxml2
parserInternals.c
xmlCtxtSetResourceLoader
8
void xmlCtxtSetResourceLoader(xmlParserCtxtPtr ctxt, xmlResourceLoader loader, void *vctxt) { if (ctxt == ((void *)0)) return; ctxt->resourceLoader = loader; ctxt->resourceCtxt = vctxt; }
{ "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,...
libosip2-5.3.1#osip_prep#osip_timers_ist_execute.c
libosip2-5.3.1
osip.c
osip_timers_ist_execute
24
void osip_timers_ist_execute(osip_t *osip) { osip_transaction_t *tr; osip_list_iterator_t iterator; osip_mutex_lock(osip->ist_fastmutex); tr = (osip_transaction_t *) osip_list_get_first(&osip->osip_ist_transactions, &iterator); while ((0 != (iterator).actual && (iterator).pos < (iterator).li->nb_elt)) { o...
{ "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": 2, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
transcoder-set#FIND_WHETHER_GIVEN_INTEGER_POWER_3_NOT_prep#f_gold.c
transcoder-set
FIND_WHETHER_GIVEN_INTEGER_POWER_3_NOT.c
f_gold
3
_Bool f_gold ( int n ) { return 1162261467 % n == 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libosip2-5.3.1#osip_authorization_prep#osip_authorization_get_version.c
libosip2-5.3.1
osip_authorization.c
osip_authorization_get_version
3
char *osip_authorization_get_version(osip_authorization_t *authorization) { return authorization->version; }
{ "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_xmlTextReaderGetParserLineNumber.c
libxml2
libxml2-py.c
libxml_xmlTextReaderGetParserLineNumber
13
PyObject * libxml_xmlTextReaderGetParserLineNumber(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; xmlTextReaderPtr reader; PyObject *pyobj_reader; if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlTextReaderGetParserLineNumber", &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,...
heman#distance_prep#heman_distance_from_cpcf.c
heman
distance.c
heman_distance_from_cpcf
17
heman_image* heman_distance_from_cpcf(heman_image* cf) { ((void) sizeof ((cf->nbands == 2 && "Coordinate field input must have 2 bands.") ? 1 : 0), __extension__ ({ if (cf->nbands == 2 && "Coordinate field input must have 2 bands.") ; else __assert_fail ("cf->nbands == 2 && \"Coordinate field input must have 2 band...
{ "array_type": 0, "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": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
urlparser#gen_char_category_table_prep#fill.c
urlparser
gen_char_category_table.c
fill
11
void fill(unsigned value, const char* alnum, const char* special) { for(;*alnum;++alnum) { char_cat[ (unsigned char)(*alnum) ] |= value; } for(;*special;++special) { char_cat[ (unsigned char)(*special) ] |= value; } }
{ "array_type": 0, "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
buffer-0.4.0#buffer_prep#buffer_append_n.c
buffer-0.4.0
buffer.c
buffer_append_n
13
int buffer_append_n(buffer_t *self, const char *str, size_t len) { size_t prev = strlen(self->data); size_t needed = len + prev; if (self->len > needed) { strncat(self->data, str, len); return 0; } int ret = buffer_resize(self, needed); if (-1 == ret) return -1; strncat(self->data, str, len); re...
{ "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": 0,...
uucp-1.07#statsb_prep#fsysdep_touch_file.c
uucp-1.07
statsb.c
fsysdep_touch_file
11
boolean fsysdep_touch_file (zfile) const char *zfile; { if (issettime (zfile, time ((time_t *) ((void *)0))) != 0) { ulog (LOG_ERROR, "utime (%s): %s", zfile, strerror ((*__errno_location ()))); return (0); } return (1); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
json.h#allow_inf_and_nan_prep#json_write_pretty.c
json.h
allow_inf_and_nan.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,...
enscript-1.6.6#afm_prep#afm_error.c
enscript-1.6.6
afm.c
afm_error
5
void afm_error (AFMHandle handle, char *message) { fprintf (stderr, "AFM Error: %s\n", message); }
{ "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,...
tar-1.34#unlink_prep#queue_deferred_unlink.c
tar-1.34
unlink.c
queue_deferred_unlink
28
void queue_deferred_unlink (const char *name, _Bool is_dir) { struct deferred_unlink *p; if (dunlink_head && records_written > dunlink_head->records_written + deferred_unlink_delay) flush_deferred_unlinks (0); p = dunlink_alloc (); p->next = ((void *)0); p->dir_idx = chdir_current; p->file_name = ...
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 3, "return_statement": 0, "struct_type": 2, "switch_statement": 0, "type_casting": 2,...
cflow-1.7#getopt_prep#rpl_getopt.c
cflow-1.7
getopt.c
rpl_getopt
1
int rpl_getopt (int argc, char *const *argv, const char *optstring) { return rpl_getopt_internal (argc, (char **)argv, optstring, 0, 0, 0, 1); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#NUMBER_SUBSEQUENCES_AB_STRING_REPEATED_K_TIMES_prep#min.c
transcoder-set
NUMBER_SUBSEQUENCES_AB_STRING_REPEATED_K_TIMES.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,...
gprolog-1.5.0#wam2ma_prep#BT_String_List_Rec.c
gprolog-1.5.0
wam2ma.c
BT_String_List_Rec
9
void BT_String_List_Rec(BTNode *bt_node, BTStrLstFct fct) { if (bt_node == ((void *)0)) return; BT_String_List_Rec(bt_node->left, fct); (*fct) (bt_node->no, bt_node->str, (void *) bt_node->info); BT_String_List_Rec(bt_node->right, fct); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 1, "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": 2,...
transcoder-set#POSITION_ELEMENT_STABLE_SORT_prep#main.c
transcoder-set
POSITION_ELEMENT_STABLE_SORT.c
main
26
int main(void) { int n_success = 0; int param0_0[] = {4,8,9,12,15,16,18,28,28,31,33,36,36,37,40,41,44,44,46,50,50,50,52,52,54,55,60,61,65,68,71,75,75,78,81,84,87,89,90,92,94,97,97,98,98,99}; int param0_1[] = {-16,86,94,-86,-38,64,96,-64,94,10,-10,-62,-50,-46,-62,-32,-4,72,14,36,74,-66,46,82,-44,-22,-26,16,-8,0,...
{ "array_type": 3, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
json.h#test_prep#json_extract_get_array_size.c
json.h
test.c
json_extract_get_array_size
17
struct json_extract_result_s json_extract_get_array_size(const struct json_array_s *const array) { struct json_extract_result_s result; size_t i; const struct json_array_element_s *element = array->start; result.dom_size = sizeof(struct json_array_s) + (sizeof(struct json_array_element_s) * ...
{ "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": 1, "struct_type": 2, "switch_statement": 0, "type_casting": 2,...
xzoom#xzoom_prep#main.c
xzoom
xzoom.c
main
375
int main(int argc, char **argv) { XSetWindowAttributes xswa; XEvent event; XTextProperty str; XSizeHints *sizeh = ((void *)0); XClassHint *ch; int buttonpressed = 0; int visible = 0; int scroll = 1; char title[80]; XGCValues gcv; char *dpyname = ((void *)0); int source_geom_mask = 0x0000, dest_geom_mas...
{ "array_type": 6, "break_continue_statement": 35, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 60, "memory_management": 0, "memory_operation": 0, "pointer_type": 3, "return_statement": 0, "struct_type": 0, "switch_statement": 3, "type_casting": ...
transcoder-set#PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE_prep#main.c
transcoder-set
PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE.c
main
14
int main(void) { int n_success = 0; int param0[] = {98,9,18,38,84,8,39,6,60,47}; 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,...
patch-2.7.6#hash_prep#hash_get_max_bucket_length.c
patch-2.7.6
hash.c
hash_get_max_bucket_length
19
size_t hash_get_max_bucket_length (const Hash_table *table) { struct hash_entry const *bucket; size_t max_bucket_length = 0; for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) { if (bucket->data) { struct hash_entry const *cursor = bucket; size_t bucket_leng...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
screen-4.9.0#socket_prep#ReceiveRaw.c
screen-4.9.0
socket.c
ReceiveRaw
31
void ReceiveRaw(s) int s; { char rd[256]; int len = 0; struct sockaddr_un a; _Bool is_socket; is_socket = IsSocket(SockPath); if (!is_socket) { if (fcntl(s, 4, 0) < 0) Panic((*__errno_location ()), "BLOCK fcntl"); } else { len = sizeof(a); s = accept(s, (struct sockad...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
gprolog-1.5.0#stream_c_prep#Pl_Add_Stream_Mirror_2.c
gprolog-1.5.0
stream_c.c
Pl_Add_Stream_Mirror_2
9
void Pl_Add_Stream_Mirror_2(WamWord sora_word, WamWord mirror_word) { int stm; int m_stm; stm = Pl_Get_Stream_Or_Alias(sora_word, 1); m_stm = Pl_Get_Stream_Or_Alias(mirror_word, 3); Pl_Add_Mirror_To_Stream(stm, m_stm); }
{ "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,...
screen-4.9.0#screen_prep#Hangup.c
screen-4.9.0
screen.c
Hangup
14
void Hangup() { if (display == 0) return; do {} while (0); if (display->d_userfd >= 0) { close(display->d_userfd); display->d_userfd = -1; } if (auto_detach || displays->d_next) Detach(6); else Finit(0); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#FIND_PERIMETER_CYLINDER_prep#max.c
transcoder-set
FIND_PERIMETER_CYLINDER.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,...
tinycc#tccrun_prep#tcc_run.c
tinycc
tccrun.c
tcc_run
38
int tcc_run(TCCState *s1, int argc, char **argv) { int (*prog_main)(int, char **); s1->runtime_main = "main"; if ((s1->dflag & 16) && !find_elf_sym(s1->symtab, s1->runtime_main)) return 0; if (tcc_relocate(s1, (void*)1) < 0) return -1; prog_main = tcc_get_symbol_err(s1, s1->runtime_m...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 7, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 5, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
tmux#paste_prep#paste_buffer_name.c
tmux
paste.c
paste_buffer_name
5
const char * paste_buffer_name(struct paste_buffer *pb) { return (pb->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": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
libcsv#libcsv_prep#csv_strerror.c
libcsv
libcsv.c
csv_strerror
8
const char * csv_strerror(int status) { if (status >= 4 || status < 0) return csv_errors[4]; else return csv_errors[status]; }
{ "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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libosip2-5.3.1#osip_contact_prep#osip_contact_to_str.c
libosip2-5.3.1
osip_contact.c
osip_contact_to_str
13
int osip_contact_to_str(const osip_contact_t *contact, char **dest) { if (contact == ((void *)0)) return -2; if (contact->displayname != ((void *)0)) { if (strncmp(contact->displayname, "*", 1) == 0) { *dest = osip_strdup("*"); if (*dest == ((void *)0)) return -4; return 0; } ...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
libxml2#xmlstring_prep#xmlEscapeFormatString.c
libxml2
xmlstring.c
xmlEscapeFormatString
37
xmlChar * xmlEscapeFormatString(xmlChar **msg) { xmlChar *msgPtr = ((void *)0); xmlChar *result = ((void *)0); xmlChar *resultPtr = ((void *)0); size_t count = 0; size_t msgLen = 0; size_t resultLen = 0; if (!msg || !*msg) return(((void *)0)); for (msgPtr = *msg; *msgPtr != '\0';...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "memory_management": 0, "memory_operation": 0, "pointer_type": 3, "return_statement": 5, "struct_type": 0, "switch_statement": 0, "type_casting": 8,...
libxml2#testapi_prep#main.c
libxml2
testapi.c
main
34
int main(int argc, char **argv) { int ret; int blocks, mem; memset(chartab, 0, sizeof(chartab)); strncpy((char *) chartab, " chartab\n", 20); memset(inttab, 0, sizeof(inttab)); memset(longtab, 0, sizeof(longtab)); xmlInitParser(); xmlInitializeCatalog(); xmlRelaxNGInitTypes(); x...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 3, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
transcoder-set#SUBSET_SUM_DIVISIBLE_M_prep#max.c
transcoder-set
SUBSET_SUM_DIVISIBLE_M.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#CHECK_LARGE_NUMBER_DIVISIBLE_9_NOT_prep#f_gold.c
transcoder-set
CHECK_LARGE_NUMBER_DIVISIBLE_9_NOT.c
f_gold
8
int f_gold ( char str [] ) { int n = strlen(str); int digitSum = 0; for ( int i = 0; i < n; i ++ ) digitSum += ( str [ i ] - '0' ); return ( digitSum % 9 == 0 ); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#xmlstring_prep#xmlUTF8Size.c
libxml2
xmlstring.c
xmlUTF8Size
18
int xmlUTF8Size(const xmlChar *utf) { xmlChar mask; int len; if (utf == ((void *)0)) return -1; if (*utf < 0x80) return 1; if (!(*utf & 0x40)) return -1; len = 2; for (mask=0x20; mask != 0; mask>>=1) { if (!(*utf & mask)) return len; len++;...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 5, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
diffutils-3.10#util_prep#translate_range.c
diffutils-3.10
util.c
translate_range
8
void translate_range (struct file_data const *file, lin a, lin b, lin *aptr, lin *bptr) { *aptr = translate_line_number (file, a - 1) + 1; *bptr = translate_line_number (file, b + 1) - 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#CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED_1_prep#sort.c
transcoder-set
CHECK_REVERSING_SUB_ARRAY_MAKE_ARRAY_SORTED_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,...
libosip2-5.3.1#port_sema_prep#osip_sem_destroy.c
libosip2-5.3.1
port_sema.c
osip_sem_destroy
8
int osip_sem_destroy(struct osip_sem *_sem) { osip_sem_t *sem = (osip_sem_t *) _sem; if (sem == ((void *)0)) return 0; sem_destroy(sem); { if (sem != ((void *)0)) { if (osip_free_func) osip_free_func(sem); else free(sem); } }; return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 1, "switch_statement": 0, "type_casting": 2,...
libxml2#libxml2-py_prep#libxml_xmlParseChunk.c
libxml2
libxml2-py.c
libxml_xmlParseChunk
17
PyObject * libxml_xmlParseChunk(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; xmlParserCtxtPtr ctxt; PyObject *pyobj_ctxt; char * chunk; Py_ssize_t py_buffsize0; int size; int terminate; if (!_PyArg_ParseTuple_SizeT(args, (char *)"O...
{ "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,...
transcoder-set#SUM_PAIRWISE_PRODUCTS_1_prep#len.c
transcoder-set
SUM_PAIRWISE_PRODUCTS_1.c
len
1
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
which-2.21#bash_prep#file_status.c
which-2.21
bash.c
file_status
16
int file_status (char const* name) { struct stat finfo; int r; if (stat (name, &finfo) < 0) return (0); if (((((finfo.st_mode)) & 0170000) == (0040000))) return (0x1|0x10); r = 0x1; if (eaccess (name, 1) == 0) r |= 0x2; if (eaccess (name, 4) == 0) r |= 0x40; return r; }
{ "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": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
uucp-1.07#trans_prep#fqueue_local.c
uucp-1.07
trans.c
fqueue_local
9
boolean fqueue_local (qdaemon, qtrans) struct sdaemon *qdaemon __attribute__ ((__unused__)); struct stransfer *qtrans; { utdequeue (qtrans); utqueue (&qTlocal, qtrans, (0)); return (1); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 2, "switch_statement": 0, "type_casting": 0,...
transcoder-set#SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1_prep#f_gold.c
transcoder-set
SEARCH_AN_ELEMENT_IN_AN_ARRAY_WHERE_DIFFERENCE_BETWEEN_ADJACENT_ELEMENTS_IS_1.c
f_gold
9
int f_gold ( int arr [ ], int n, int x ) { int i = 0; while ( i < n ) { if ( arr [ i ] == x ) return i; i = i + abs ( arr [ i ] - x ); } printf("number is not present!"); return - 1; }
{ "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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
nettle-3.9.1#sexp2dsa_prep#nettle_dsa_sha256_keypair_from_sexp.c
nettle-3.9.1
sexp2dsa.c
nettle_dsa_sha256_keypair_from_sexp
14
int nettle_dsa_sha256_keypair_from_sexp(struct dsa_params *params, mpz_t pub, mpz_t priv, unsigned p_max_bits, size_t length, const uint8_t *expr) { struct sexp_iterator i; return nettle_sexp_iterator_first(&i, length, expr) && nettle_sexp_iterator_check_type(&i, priv ? "private-...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
transcoder-set#DICE_THROW_PROBLEM_prep#main.c
transcoder-set
DICE_THROW_PROBLEM.c
main
16
int main(void) { int n_success = 0; int param0[] = {94,7,20,90,50,32,46,82,43,6}; int param1[] = {4,12,44,94,58,90,25,50,82,83}; int param2[] = {69,33,24,88,27,29,6,87,70,19}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],...
{ "array_type": 3, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#SUM_SERIES_ALTERNATE_SIGNED_SQUARES_AP_prep#f_filled.c
transcoder-set
SUM_SERIES_ALTERNATE_SIGNED_SQUARES_AP.c
f_filled
1
int f_filled ( int n, int a [ ] ) {}
{ "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#xmlreader_prep#xmlTextReaderIsNamespaceDecl.c
libxml2
xmlreader.c
xmlTextReaderIsNamespaceDecl
16
int xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader) { xmlNodePtr node; if (reader == ((void *)0)) return(-1); if (reader->node == ((void *)0)) return(-1); if (reader->curnode != ((void *)0)) node = reader->curnode; else node = reader->node; if (XML_NAMESPACE_DECL == node->type) return...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
json.h#allow_no_commas_prep#json_write_pretty_value.c
json.h
allow_no_commas.c
json_write_pretty_value
37
char *json_write_pretty_value(const struct json_value_s *value, size_t depth, const char *indent, const char *newline, char *data) { switch (value->type) { default: return 0; case json_type_number: return json_write_number((struct json_number_s *...
{ "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,...
tinycc#tccgen_prep#put_extern_sym.c
tinycc
tccgen.c
put_extern_sym
6
void put_extern_sym(Sym *sym, Section *section, Elf64_Addr value, unsigned long size) { int sh_num = section ? section->sh_num : 0; put_extern_sym2(sym, sh_num, value, size, 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#CONVERTING_ONE_STRING_USING_APPEND_DELETE_LAST_OPERATIONS_prep#min.c
transcoder-set
CONVERTING_ONE_STRING_USING_APPEND_DELETE_LAST_OPERATIONS.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,...
tmux#key-bindings_prep#key_bindings_RB_INSERT.c
tmux
key-bindings.c
key_bindings_RB_INSERT
1
struct key_binding * key_bindings_RB_INSERT(struct key_bindings *head, struct key_binding *elm) { struct key_binding *tmp; struct key_binding *parent = ((void *)0); int comp = 0; tmp = (head)->rbh_root; while (tmp) { parent = tmp; comp = (key_bindings_cmp)(elm, parent); if (comp < 0) tmp = (tmp)->entry.rbe_left; else i...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 1,...
libxml2#libxml2-py_prep#libxml_xmlDocSetRootElement.c
libxml2
libxml2-py.c
libxml_xmlDocSetRootElement
16
PyObject * libxml_xmlDocSetRootElement(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; xmlNodePtr c_retval; xmlDocPtr doc; PyObject *pyobj_doc; xmlNodePtr root; PyObject *pyobj_root; if (!_PyArg_ParseTuple_SizeT(args, (char *)"OO:xmlDocSetRootElement", &py...
{ "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": 3, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
libosip2-5.3.1#osip_list_prep#osip_list_get_next.c
libosip2-5.3.1
osip_list.c
osip_list_get_next
13
void *osip_list_get_next(osip_list_iterator_t *iterator) { if (iterator->actual == ((void *)0)) { return 0; } iterator->prev = &(iterator->actual->next); iterator->actual = iterator->actual->next; ++(iterator->pos); if ((0 != (*iterator).actual && (*iterator).pos < (*iterator).li->nb_elt)) { 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": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libxml2#parser_prep#xmlCtxtSetMaxAmplification.c
libxml2
parser.c
xmlCtxtSetMaxAmplification
5
void xmlCtxtSetMaxAmplification(xmlParserCtxtPtr ctxt, unsigned maxAmpl) { ctxt->maxAmpl = maxAmpl; }
{ "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_no_commas_prep#json_write_pretty_array.c
json.h
allow_no_commas.c
json_write_pretty_array
41
char *json_write_pretty_array(const struct json_array_s *array, size_t depth, const char *indent, const char *newline, char *data) { size_t k, m; struct json_array_element_s *element; *data++ = '['; if (0 < array->length) { for (k = 0; '\0' != newl...
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 8, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 2, "switch_statement": 0, "type_casting": 0,...
libxml2#xmlregexp_prep#xmlAutomataNewCountTrans.c
libxml2
xmlregexp.c
xmlAutomataNewCountTrans
49
xmlAutomataStatePtr xmlAutomataNewCountTrans(xmlAutomataPtr am, xmlAutomataStatePtr from, xmlAutomataStatePtr to, const xmlChar *token, int min, int max, void *data) { xmlRegAtomPtr atom; int counter; if ((am == ((void *)0)) || (from == ((void *)0)) || (token == ((void *)0))) return(((void *)0)); ...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 4, "if_statement": 13, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 7, "struct_type": 0, "switch_statement": 0, "type_casting": 1...
gprolog-1.5.0#oper_supp_prep#Pl_Nth_Root_Exact.c
gprolog-1.5.0
oper_supp.c
Pl_Nth_Root_Exact
11
unsigned Pl_Nth_Root_Exact(unsigned y, unsigned n) { unsigned x; if (y == 0) return 0; x = Pl_Nth_Root_Dn(y, n); if (Pl_Power(x, n) != y) return (unsigned) -1; return x; }
{ "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,...
libxml2#relaxng_prep#xmlRelaxNGGetValidErrors.c
libxml2
relaxng.c
xmlRelaxNGGetValidErrors
15
int xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGValidityErrorFunc * err, xmlRelaxNGValidityWarningFunc * warn, void **ctx) { if (ctxt == ((void *)0)) return (-1); if (err != ((void *)0)) *err = ctxt->error; if (warn != ((v...
{ "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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
heman#vec4_prep#kmVec4LengthSq.c
heman
vec4.c
kmVec4LengthSq
3
float kmVec4LengthSq(const kmVec4* pIn) { return kmSQR(pIn->x) + kmSQR(pIn->y) + kmSQR(pIn->z) + kmSQR(pIn->w); }
{ "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#list_prep#xmlListRemoveFirst.c
libxml2
list.c
xmlListRemoveFirst
13
int xmlListRemoveFirst(xmlListPtr l, void *data) { xmlLinkPtr lk; if (l == ((void *)0)) return(0); lk = xmlListLinkSearch(l, data); if (lk != ((void *)0)) { xmlLinkDeallocator(l, lk); 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": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
json.h#allow_global_object_prep#json_value_as_string.c
json.h
allow_global_object.c
json_value_as_string
6
struct json_string_s *json_value_as_string(struct json_value_s *const value) { if (value->type != json_type_string) { return 0; } return (struct json_string_s *)value->payload; }
{ "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": 1, "switch_statement": 0, "type_casting": 1,...
optipng-0.7.8#pngset_prep#png_set_chunk_malloc_max.c
optipng-0.7.8
pngset.c
png_set_chunk_malloc_max
7
void png_set_chunk_malloc_max(png_structrp png_ptr, png_alloc_size_t user_chunk_malloc_max) { if (png_ptr != ((void *)0)) png_ptr->user_chunk_malloc_max = user_chunk_malloc_max; }
{ "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,...
libosip2-5.3.1#osip_authorization_prep#osip_authorization_set_uri.c
libosip2-5.3.1
osip_authorization.c
osip_authorization_set_uri
3
void osip_authorization_set_uri(osip_authorization_t *authorization, char *uri) { authorization->uri = (char *) uri; }
{ "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,...
cflow-1.7#argp-help_prep#argp_state_help.c
cflow-1.7
argp-help.c
argp_state_help
18
void argp_state_help (const struct argp_state *state, FILE *stream, unsigned flags) { if ((!state || ! (state->flags & 0x02)) && stream) { if (state && (state->flags & 0x40)) flags |= 0x80; _help (state ? state->root_argp : 0, state, stream, flags, state ? state->name : (program_i...
{ "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": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
tulipindicators-0.9.1#candles_prep#tc_big_white_candle.c
tulipindicators-0.9.1
candles.c
tc_big_white_candle
5
int tc_big_white_candle(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;...
{ "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,...
gprolog-1.5.0#type_inl_c_prep#Pl_Blt_Non_Fd_Var.c
gprolog-1.5.0
type_inl_c.c
Pl_Blt_Non_Fd_Var
5
Bool Pl_Blt_Non_Fd_Var(WamWord x) { WamWord word, tag_mask; do { WamWord deref_last_word; word = x; ; do { ; deref_last_word = word; tag_mask = ((PlLong) (word) & ((PlULong)0x7)); if (tag_mask != (PlULong)0) break; word = *(((WamWord *) (word))); } while (word != deref_last_word); } while (0); return (!(tag_mask == (...
{ "array_type": 0, "break_continue_statement": 1, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#LENGTH_OF_THE_LONGEST_ARITHMATIC_PROGRESSION_IN_A_SORTED_ARRAY_prep#sort.c
transcoder-set
LENGTH_OF_THE_LONGEST_ARITHMATIC_PROGRESSION_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#COUNT_PAIRS_DIFFERENCE_EQUAL_K_prep#max.c
transcoder-set
COUNT_PAIRS_DIFFERENCE_EQUAL_K.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,...