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 |
|---|---|---|---|---|---|---|
optipng-0.7.8#png_prep#png_user_version_check.c | optipng-0.7.8 | png.c | png_user_version_check | 34 | int
png_user_version_check(png_structrp png_ptr, png_const_charp user_png_ver)
{
if (user_png_ver != ((void *)0))
{
int i = -1;
int found_dots = 0;
do
{
i++;
if (user_png_ver[i] != "1.6.40"[i])
png_ptr->flags |= 0x20000U;
if (user_png_ver[i] == '.')
found_dots++;
} while (found_dots < 2 && user_png_ver[i] != 0 &&
"1.6.40"[i] != 0);
}
else
png_ptr->flags |= 0x20000U;
if ((png_ptr->flags & 0x20000U) != 0)
{
size_t pos = 0;
char m[128];
pos = png_safecat(m, (sizeof m), pos,
"Application built with libpng-");
pos = png_safecat(m, (sizeof m), pos, user_png_ver);
pos = png_safecat(m, (sizeof m), pos, " but running with ");
pos = png_safecat(m, (sizeof m), pos, "1.6.40");
(void)pos;
png_warning(png_ptr, m);
return 0;
}
return 1;
}
| {
"array_type": 2,
"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": 2,
"union_type": 0,
"while_loop": 1
} |
uucp-1.07#protz_prep#fzsendcmd.c | uucp-1.07 | protz.c | fzsendcmd | 27 | boolean
fzsendcmd(qdaemon, z, ilocal, iremote)
struct sdaemon *qdaemon;
const char *z;
int ilocal __attribute__ ((__unused__));
int iremote __attribute__ ((__unused__));
{
size_t n,clen;
long lredo;
char *zbuf;
clen = strlen (z) + 1;
do { if (((iDebug & ((020))) != 0)) ulog (LOG_DEBUG, ("fzsendcmd: sending command %s"), (z)); } while (0);
if (!fzstart_tx ())
return (0);
if ((zbuf = zzgetspace (qdaemon, &n)) == ((void *)0))
return (0);
if (clen > n)
ulog (LOG_FATAL, "fzsendcmd: clen > n");
strcpy (zbuf, z);
do {
if (!fzsend_data (qdaemon, zbuf, clen, (1)))
return (0);
if (!fzfinish_tx (qdaemon, &lredo))
return (0);
} while (lredo >= 0);
return fzprocess (qdaemon);
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 6,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 1,
"return_statement": 5,
"struct_type": 1,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 2
} |
make-4.4.1#remote-stub_prep#remote_kill.c | make-4.4.1 | remote-stub.c | remote_kill | 5 | int
remote_kill (pid_t id __attribute__ ((unused)), int sig __attribute__ ((unused)))
{
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": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
libxml2#uri_prep#xmlCanonicPath.c | libxml2 | uri.c | xmlCanonicPath | 13 | xmlChar *
xmlCanonicPath(const xmlChar *path)
{
xmlChar *ret;
if (path == ((void *)0))
return(((void *)0));
if (xmlStrstr(path, (xmlChar *) "://") != ((void *)0)) {
ret = xmlURIEscapeStr(path, (xmlChar *) ":/?#[]@!$&()*+,;='%");
} else {
ret = xmlStrdup((const xmlChar *) path);
}
return(ret);
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 2,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 1,
"return_statement": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 3,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#COMPUTE_N_UNDER_MODULO_P_prep#f_gold.c | transcoder-set | COMPUTE_N_UNDER_MODULO_P.c | f_gold | 8 | int f_gold ( int n, int p ) {
if ( n >= p ) return 0;
int result = 1;
for ( int i = 1;
i <= n;
i ++ ) result = ( result * i ) % p;
return result;
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 1,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 1,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
libxml2#xpath_prep#xmlXPathCastNodeSetToBoolean.c | libxml2 | xpath.c | xmlXPathCastNodeSetToBoolean | 6 | int
xmlXPathCastNodeSetToBoolean (xmlNodeSetPtr ns) {
if ((ns == ((void *)0)) || (ns->nodeNr == 0))
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,
"union_type": 0,
"while_loop": 0
} |
tulipindicators-0.9.1#tiamalgamation_prep#ti_marketfi.c | tulipindicators-0.9.1 | tiamalgamation.c | ti_marketfi | 14 | int ti_marketfi(int size, double const *const *inputs, double const *options, double *const *outputs) {
const double *high = inputs[0];
const double *low = inputs[1];
const double *volume = inputs[2];
(void)options;
double *output = outputs[0];
if (size <= ti_marketfi_start(options)) return 0;
int i;
for (i = 0; i < size; ++i) {
*output++ = (high[i] - low[i]) / volume[i];
}
((void) sizeof ((output - outputs[0] == size - ti_marketfi_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_marketfi_start(options)) ; else __assert_fail ("output - outputs[0] == size - ti_marketfi_start(options)", "tiamalgamation.c", 2797, __extension__ __PRETTY_FUNCTION__); }));
return 0;
}
| {
"array_type": 5,
"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": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 2,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#COUNTS_PATHS_POINT_REACH_ORIGIN_1_prep#f_filled.c | transcoder-set | COUNTS_PATHS_POINT_REACH_ORIGIN_1.c | f_filled | 1 | int f_filled ( int n, int m ) {}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 0,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#COUNT_STRINGS_WITH_CONSECUTIVE_1S_prep#len.c | transcoder-set | COUNT_STRINGS_WITH_CONSECUTIVE_1S.c | len | 1 | int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
less-633#xbuf_prep#xbuf_add_byte.c | less-633 | xbuf.c | xbuf_add_byte | 17 | void xbuf_add_byte(struct xbuffer *xbuf, unsigned char b)
{
if (xbuf->end >= xbuf->size)
{
unsigned char *data;
if (help_ckd_add(&xbuf->size, xbuf->size, xbuf->size ? xbuf->size : 16, sizeof *(&xbuf->size), ((1 ? 0 : *(&xbuf->size)) - 1 < 0)))
out_of_memory();
data = (unsigned char *) ecalloc(xbuf->size, sizeof(unsigned char));
if (xbuf->data != ((void *)0))
{
memcpy(data, xbuf->data, xbuf->end);
free(xbuf->data);
}
xbuf->data = data;
}
xbuf->data[xbuf->end++] = (unsigned char) b;
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 3,
"memory_management": 1,
"memory_operation": 1,
"pointer_type": 1,
"return_statement": 0,
"struct_type": 1,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
tmux#layout_prep#layout_init.c | tmux | layout.c | layout_init | 9 | void
layout_init(struct window *w, struct window_pane *wp)
{
struct layout_cell *lc;
lc = w->layout_root = layout_create_cell(((void *)0));
layout_set_size(lc, w->sx, w->sy, 0, 0);
layout_make_leaf(lc, wp);
layout_fix_panes(w, w->sx, w->sy);
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 1,
"return_statement": 0,
"struct_type": 2,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#CHECK_IF_X_CAN_GIVE_CHANGE_TO_EVERY_PERSON_IN_THE_QUEUE_prep#main.c | transcoder-set | CHECK_IF_X_CAN_GIVE_CHANGE_TO_EVERY_PERSON_IN_THE_QUEUE.c | main | 25 | int main(void) {
int n_success = 0;
int param0_0[] = {20};
int param0_1[] = {5,5,5,20,10};
int param0_2[] = {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,10,10,10,10,10,10,10,10,10,10,10,10,10};
int param0_3[] = {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,18};
int param0_4[] = {5,5,20};
int param0_5[] = {10,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5};
int param0_6[] = {5,10,20,5,5,5,5,5,5,5,5,5,5,5,5};
int param0_7[] = {-82,-10,-78,-84,68,62,10,20,-86,-98,92,70,40,-12,-20,-36,8,-70,6,8,44,-24,8,-18,76,-54,-14,-94,-68,-62,-24,-36,-74,92,92,-80,48,56,94};
int param0_8[] = {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5};
int param0_9[] = {46,46,93,57,82,34,83,80,77,36,80,85,69,28,9,56,49,27,83,25,1,80,99,14,69,82,79,71,74,34};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {4,5,27,12,2,17,7,31,25,20};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
break;
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
}
| {
"array_type": 2,
"break_continue_statement": 1,
"enum_type": 0,
"for_loop": 1,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 1,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 1,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#CHOCOLATE_DISTRIBUTION_PROBLEM_prep#len.c | transcoder-set | CHOCOLATE_DISTRIBUTION_PROBLEM.c | len | 1 | int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_1_prep#min.c | transcoder-set | FIND_WHETHER_A_GIVEN_NUMBER_IS_A_POWER_OF_4_OR_NOT_1.c | min | 1 | int min(int x, int y) { return (x < y)? x: y; }
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
make-4.4.1#remote-stub_prep#start_remote_job.c | make-4.4.1 | remote-stub.c | start_remote_job | 7 | int
start_remote_job (char **argv __attribute__ ((unused)), char **envp __attribute__ ((unused)), int stdin_fd __attribute__ ((unused)),
int *is_remote __attribute__ ((unused)), pid_t *id_ptr __attribute__ ((unused)),
int *used_stdin __attribute__ ((unused)))
{
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": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
diffutils-3.10#test-localcharset_prep#main.c | diffutils-3.10 | test-localcharset.c | main | 7 | int
main (void)
{
setlocale (6, "");
printf ("%s\n", locale_charset ());
return 0;
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
mcsim-6.2.0#matutil_prep#InitlVector.c | mcsim-6.2.0 | matutil.c | InitlVector | 9 | long *InitlVector (long cVectors)
{
if (cVectors == 0) {
printf ("Error: zero length array allocation in InitlVector - Exiting\n");
exit (0);
}
else
return (long *) malloc (cVectors * sizeof(long));
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 1,
"memory_management": 1,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
libosip2-5.3.1#osip_authentication_info_prep#osip_authentication_info_set_srand.c | libosip2-5.3.1 | osip_authentication_info.c | osip_authentication_info_set_srand | 3 | void osip_authentication_info_set_srand(osip_authentication_info_t *authentication_info, char *srand) {
authentication_info->srand = (char *) srand;
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 0,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY_1_prep#main.c | transcoder-set | MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY_1.c | main | 25 | int main(void) {
int n_success = 0;
int param0_0[] = {19,20,22,23,25,28,33,33,35,35,36,44,44,52,54,54,56,57,57,63,78,78,79,81,89,93,93,93,93,93,93,97};
int param0_1[] = {-20,96,-32,-8,4,14,-26,-58,-68,-68,42,-12,-28,-68,-72,88,-94,-84,20,-58,-50,-78,-4,-22,-54,90,78,2,40,-78,98,52,-48,40,12,6,54,28,-96,-88,98,-34,-66,42,-18,4,-20,-34};
int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1};
int param0_3[] = {21,50,15,2,59,79,52,55,78,55,73,9,1,58,48,13,71,1};
int param0_4[] = {-98,-74,-68,-60,-58,-56,-42,-36,-36,-34,-30,-28,-18,-16,-16,-10,-8,-6,-4,0,2,2,10,16,18,30,34,34,36,38,42,46,60,60,62,76,78,88,96};
int param0_5[] = {1};
int param0_6[] = {6,6,6,9,10,11,14,19,19,21,23,23,24,29,30,43,45,46,55,55,63,69,71,78,80,81,85,86,87,97,98};
int param0_7[] = {86,-14,-64,88,28,40,30,92,-2,-52,-14,-96,-30,-54,-88,-8,-48,32,-60,-68,-62,52,52,-28,58,82,68,30,-24,52,74,-20,-62,-98,26,58,-30,76,48,-14,88,58,-40,-20,-50,-70,-92,-84};
int param0_8[] = {0,0,0,0,0,0,0,0,0,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,1};
int param0_9[] = {36,12,61,15,31,7,76,79,27,60,81,2,3,83,96,29,23,30,78,86,86,25,89,96,67,38,24,58,80,13,51,30,45,65,85,48,51,44,16,87,17,28,66,97,16};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {23,47,13,16,37,0,19,32,29,36};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i]))
{
n_success+=1;
}
break;
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
}
| {
"array_type": 2,
"break_continue_statement": 1,
"enum_type": 0,
"for_loop": 1,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 1,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 1,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#CONVERT_STRICTLY_INCREASING_ARRAY_MINIMUM_CHANGES_prep#len.c | transcoder-set | CONVERT_STRICTLY_INCREASING_ARRAY_MINIMUM_CHANGES.c | len | 1 | int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
nettle-3.9.1#sha3-256_prep#nettle_sha3_256_init.c | nettle-3.9.1 | sha3-256.c | nettle_sha3_256_init | 5 | void
nettle_sha3_256_init (struct sha3_256_ctx *ctx)
{
memset (ctx, 0, __builtin_offsetof (struct sha3_256_ctx, block));
}
| {
"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": 1,
"pointer_type": 0,
"return_statement": 0,
"struct_type": 1,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
libxml2#libxml2-py_prep#libxml_htmlReadFd.c | libxml2 | libxml2-py.c | libxml_htmlReadFd | 14 | PyObject *
libxml_htmlReadFd(PyObject *self __attribute__ ((__unused__)), PyObject *args) {
PyObject *py_retval;
htmlDocPtr c_retval;
int fd;
char * url;
char * encoding;
int options;
if (!_PyArg_ParseTuple_SizeT(args, (char *)"izzi:htmlReadFd", &fd, &url, &encoding, &options))
return(((void *)0));
c_retval = htmlReadFd(fd, url, encoding, options);
py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
return(py_retval);
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 1,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 1,
"return_statement": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 2,
"union_type": 0,
"while_loop": 0
} |
tmux#environ_prep#environ_next.c | tmux | environ.c | environ_next | 5 | struct environ_entry *
environ_next(struct environ_entry *envent)
{
return (environ_RB_NEXT(envent));
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 1,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE_1_prep#sort.c | transcoder-set | PYTHON_PROGRAM_FIND_PERIMETER_CIRCUMFERENCE_SQUARE_RECTANGLE_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,
"union_type": 0,
"while_loop": 0
} |
libxml2#libxml2-py_prep#libxml_xmlInitGlobals.c | libxml2 | libxml2-py.c | libxml_xmlInitGlobals | 8 | PyObject *
libxml_xmlInitGlobals(PyObject *self __attribute__ ((__unused__)), PyObject *args __attribute__ ((__unused__))) {
if (libxml_deprecationWarning("xmlInitGlobals") == -1)
return(((void *)0));
xmlInitGlobals();
_Py_INCREF(((PyObject*)((&_Py_NoneStruct))));
return((&_Py_NoneStruct));
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 1,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
libxml2#globals_prep#__xmlDeregisterNodeDefaultValue.c | libxml2 | globals.c | __xmlDeregisterNodeDefaultValue | 1 | xmlDeregisterNodeFunc *__xmlDeregisterNodeDefaultValue(void) { return (&xmlGetThreadLocalStorage(0)->gs_xmlDeregisterNodeDefaultValue); }
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
avl#avl_prep#leftRotate.c | avl | avl.c | leftRotate | 10 | struct Node *leftRotate(struct Node *x)
{
struct Node *y = x->right;
struct Node *T2 = y->left;
x->right = T2;
x->height = max(height(x->left), height(x->right))+1;
y->left = x;
y->height = max(height(y->left), height(y->right))+1;
return 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": 2,
"return_statement": 1,
"struct_type": 3,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
tulipindicators-0.9.1#tiamalgamation_prep#ti_sma.c | tulipindicators-0.9.1 | tiamalgamation.c | ti_sma | 21 | int ti_sma(int size, double const *const *inputs, double const *options, double *const *outputs) {
const double *input = inputs[0];
const int period = (int)options[0];
double *output = outputs[0];
const double scale = 1.0 / period;
if (period < 1) return 1;
if (size <= ti_sma_start(options)) return 0;
double sum = 0;
int i;
for (i = 0; i < period; ++i) {
sum += input[i];
}
*output++ = sum * scale;
for (i = period; i < size; ++i) {
sum += input[i];
sum -= input[i-period];
*output++ = sum * scale;
}
((void) sizeof ((output - outputs[0] == size - ti_sma_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_sma_start(options)) ; else __assert_fail ("output - outputs[0] == size - ti_sma_start(options)", "tiamalgamation.c", 3371, __extension__ __PRETTY_FUNCTION__); }));
return 0;
}
| {
"array_type": 4,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 2,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 3,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 2,
"return_statement": 3,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 2,
"union_type": 0,
"while_loop": 0
} |
bc-1.07.1#number_prep#bc_init_numbers.c | bc-1.07.1 | number.c | bc_init_numbers | 9 | void
bc_init_numbers (void)
{
_zero_ = bc_new_num (1,0);
_one_ = bc_new_num (1,0);
_one_->n_value[0] = 1;
_two_ = bc_new_num (1,0);
_two_->n_value[0] = 2;
}
| {
"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": 1,
"union_type": 0,
"while_loop": 0
} |
libxml2#libxml2-py_prep#libxml_xmlLoadCatalog.c | libxml2 | libxml2-py.c | libxml_xmlLoadCatalog | 11 | PyObject *
libxml_xmlLoadCatalog(PyObject *self __attribute__ ((__unused__)), PyObject *args) {
PyObject *py_retval;
int c_retval;
char * filename;
if (!_PyArg_ParseTuple_SizeT(args, (char *)"z:xmlLoadCatalog", &filename))
return(((void *)0));
c_retval = xmlLoadCatalog(filename);
py_retval = libxml_intWrap((int) c_retval);
return(py_retval);
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 1,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 1,
"return_statement": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 3,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#COUNT_NUMBERS_THAT_DONT_CONTAIN_3_prep#main.c | transcoder-set | COUNT_NUMBERS_THAT_DONT_CONTAIN_3.c | main | 14 | int main(void) {
int n_success = 0;
int param0[] = {85,86,3,35,59,38,33,15,75,74};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i]) == f_gold(param0[i]))
{
n_success+=1;
}
break;
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
}
| {
"array_type": 1,
"break_continue_statement": 1,
"enum_type": 0,
"for_loop": 1,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 1,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
tar-1.34#hash_prep#hash_table_ok.c | tar-1.34 | hash.c | hash_table_ok | 21 | _Bool
hash_table_ok (const Hash_table *table)
{
struct hash_entry const *bucket;
size_t n_buckets_used = 0;
size_t n_entries = 0;
for (bucket = table->bucket; bucket < table->bucket_limit; bucket++)
{
if (bucket->data)
{
struct hash_entry const *cursor = bucket;
n_buckets_used++;
n_entries++;
while (cursor = cursor->next, cursor)
n_entries++;
}
}
if (n_buckets_used == table->n_buckets_used && n_entries == table->n_entries)
return 1;
return 0;
}
| {
"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": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 1
} |
nano-7.2#history_prep#find_in_history.c | nano-7.2 | history.c | find_in_history | 10 | linestruct *find_in_history(const linestruct *start, const linestruct *end,
const char *text, size_t len)
{
const linestruct *item;
for (item = start; item != end->prev && item != ((void *)0); item = item->prev) {
if (strncmp(item->data, text, len) == 0)
return (linestruct *)item;
}
return ((void *)0);
}
| {
"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": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 2,
"union_type": 0,
"while_loop": 0
} |
wget-1.21.4#hash_prep#hash_table_iterate.c | wget-1.21.4 | hash.c | hash_table_iterate | 6 | void
hash_table_iterate (struct hash_table *ht, hash_table_iterator *iter)
{
iter->pos = ht->cells;
iter->end = ht->cells + ht->size;
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 0,
"struct_type": 1,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
libxml2#list_prep#xmlListPushBack.c | libxml2 | list.c | xmlListPushBack | 17 | int
xmlListPushBack(xmlListPtr l, void *data)
{
xmlLinkPtr lkPlace, lkNew;
if (l == ((void *)0))
return(0);
lkPlace = l->sentinel->prev;
lkNew = (xmlLinkPtr)xmlMalloc(sizeof(xmlLink));
if (lkNew == ((void *)0))
return (0);
lkNew->data = data;
lkNew->next = lkPlace->next;
(lkPlace->next)->prev = lkNew;
lkPlace->next = lkNew;
lkNew->prev = lkPlace;
return 1;
}
| {
"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,
"union_type": 0,
"while_loop": 0
} |
gawk-5.2.2#regex_prep#regexec.c | gawk-5.2.2 | regex.c | regexec | 29 | int
regexec (const regex_t *__restrict preg, const char *__restrict string,
size_t nmatch, regmatch_t pmatch[nmatch], int eflags)
{
reg_errcode_t err;
Idx start, length;
re_dfa_t *dfa = preg->buffer;
if (eflags & ~(1 | (1 << 1) | (1 << 2)))
return _REG_BADPAT;
if (eflags & (1 << 2))
{
start = pmatch[0].rm_so;
length = pmatch[0].rm_eo;
}
else
{
start = 0;
length = strlen (string);
}
((void) dfa);
if (preg->no_sub)
err = re_search_internal (preg, string, length, start, length,
length, 0, ((void *)0), eflags);
else
err = re_search_internal (preg, string, length, start, length,
length, nmatch, pmatch, eflags);
((void) 0);
return err != _REG_NOERROR;
}
| {
"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": 1,
"return_statement": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 3,
"union_type": 0,
"while_loop": 0
} |
diffutils-3.10#ed_prep#pr_forward_ed_script.c | diffutils-3.10 | ed.c | pr_forward_ed_script | 5 | void
pr_forward_ed_script (struct change *script)
{
print_script (script, find_change, pr_forward_ed_hunk);
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 0,
"struct_type": 1,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
patch-2.7.6#hash_prep#hash_get_n_buckets.c | patch-2.7.6 | hash.c | hash_get_n_buckets | 5 | size_t
hash_get_n_buckets (const Hash_table *table)
{
return table->n_buckets;
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#SUM_SERIES_12_32_52_2N_12_prep#f_filled.c | transcoder-set | SUM_SERIES_12_32_52_2N_12.c | f_filled | 1 | int f_filled ( int n ) {}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 0,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#NUMBER_TRIANGLES_N_MOVES_1_prep#f_filled.c | transcoder-set | NUMBER_TRIANGLES_N_MOVES_1.c | f_filled | 1 | int f_filled ( int n ) {}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 0,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
tinycc#tccrun_prep#rt_get_caller_pc.c | tinycc | tccrun.c | rt_get_caller_pc | 18 | int rt_get_caller_pc(Elf64_Addr *paddr, ucontext_t *uc, int level)
{
Elf64_Addr fp;
int i;
if (level == 0) {
*paddr = uc->uc_mcontext.gregs[REG_RIP];
return 0;
} else {
fp = uc->uc_mcontext.gregs[REG_RBP];
for(i=1;i<level;i++) {
if (fp <= 0x1000)
return -1;
fp = ((Elf64_Addr *)fp)[0];
}
*paddr = ((Elf64_Addr *)fp)[1];
return 0;
}
}
| {
"array_type": 1,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 1,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 2,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 3,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
gawk-5.2.2#eval_prep#update_ERRNO_int.c | gawk-5.2.2 | eval.c | update_ERRNO_int | 13 | void
update_ERRNO_int(int errcode)
{
const char *cp;
update_PROCINFO_num("errno", errcode);
if (errcode) {
cp = strerror(errcode);
cp = gettext(cp);
} else
cp = "";
unref(ERRNO_node->sub.nodep.l.lptr);
ERRNO_node->sub.nodep.l.lptr = make_str_node((cp), (strlen(cp)), 0);
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 1,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 1,
"return_statement": 0,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
wget-1.21.4#utils_prep#match_tail.c | wget-1.21.4 | utils.c | match_tail | 11 | _Bool
match_tail (const char *string, const char *tail, _Bool fold_case)
{
int pos = (int) strlen (string) - (int) strlen (tail);
if (pos < 0)
return 0;
if (!fold_case)
return !strcmp (string + pos, tail);
else
return !strcasecmp (string + pos, tail);
}
| {
"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,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#FLOOR_IN_A_SORTED_ARRAY_prep#max.c | transcoder-set | FLOOR_IN_A_SORTED_ARRAY.c | max | 1 | int max(int x, int y) { return (x > y)? x: y; }
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
json.h#allow_multi_line_strings_prep#json_write_minified_array.c | json.h | allow_multi_line_strings.c | json_write_minified_array | 15 | char *json_write_minified_array(const struct json_array_s *array, char *data) {
struct json_array_element_s *element = 0;
*data++ = '[';
for (element = array->start; 0 != element; element = element->next) {
if (element != array->start) {
*data++ = ',';
}
data = json_write_minified_value(element->value, data);
if (0 == data) {
return 0;
}
}
*data++ = ']';
return data;
}
| {
"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": 1,
"return_statement": 2,
"struct_type": 2,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES_prep#f_gold.c | transcoder-set | NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES.c | f_gold | 5 | int f_gold ( int n, int k ) {
int p = 1;
if ( k % 2 ) p = - 1;
return ( pow ( n - 1, k ) + p * ( n - 1 ) ) / 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": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
tinycc#tccpp_prep#parse_comment.c | tinycc | tccpp.c | parse_comment | 69 | uint8_t *parse_comment(uint8_t *p)
{
int c;
p++;
for(;;) {
for(;;) {
c = *p;
if (c == '\n' || c == '*' || c == '\\')
break;
p++;
c = *p;
if (c == '\n' || c == '*' || c == '\\')
break;
p++;
}
if (c == '\n') {
file->line_num++;
p++;
} else if (c == '*') {
p++;
for(;;) {
c = *p;
if (c == '*') {
p++;
} else if (c == '/') {
goto end_of_comment;
} else if (c == '\\') {
file->buf_ptr = p;
c = handle_eob();
p = file->buf_ptr;
if (c == (-1))
tcc_error("unexpected end of file in comment");
if (c == '\\') {
while (c == '\\') {
{ p++; c = *p; if (c == '\\') { file->buf_ptr = p; c = handle_eob(); p = file->buf_ptr; }};
if (c == '\n') {
file->line_num++;
{ p++; c = *p; if (c == '\\') { file->buf_ptr = p; c = handle_eob(); p = file->buf_ptr; }};
} else if (c == '\r') {
{ p++; c = *p; if (c == '\\') { file->buf_ptr = p; c = handle_eob(); p = file->buf_ptr; }};
if (c == '\n') {
file->line_num++;
{ p++; c = *p; if (c == '\\') { file->buf_ptr = p; c = handle_eob(); p = file->buf_ptr; }};
}
} else {
goto after_star;
}
}
}
} else {
break;
}
}
after_star: ;
} else {
file->buf_ptr = p;
c = handle_eob();
p = file->buf_ptr;
if (c == (-1)) {
tcc_error("unexpected end of file in comment");
} else if (c == '\\') {
p++;
}
}
}
end_of_comment:
p++;
return p;
}
| {
"array_type": 0,
"break_continue_statement": 3,
"enum_type": 0,
"for_loop": 3,
"function_pointer": 0,
"goto_statement": 2,
"if_statement": 18,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 1
} |
rcs-5.10.1#b-divvy_prep#brush_off.c | rcs-5.10.1 | b-divvy.c | brush_off | 6 | void
brush_off (struct divvy *divvy, void *ptr)
{
divvy->count--;
__extension__ ({ struct obstack *__o = (&divvy->space); void *__obj = (void *) (ptr); if (__obj > (void *) __o->chunk && __obj < (void *) __o->chunk_limit) __o->next_free = __o->object_base = (char *) __obj; else _obstack_free (__o, __obj); });
}
| {
"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": 2,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE_1_prep#cmpfunc.c | transcoder-set | PROGRAM_CHECK_ARRAY_SORTED_NOT_ITERATIVE_RECURSIVE_1.c | cmpfunc | 1 | int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
libxml2#libxml2-py_prep#libxml_xmlParsePEReference.c | libxml2 | libxml2-py.c | libxml_xmlParsePEReference | 13 | PyObject *
libxml_xmlParsePEReference(PyObject *self __attribute__ ((__unused__)), PyObject *args) {
xmlParserCtxtPtr ctxt;
PyObject *pyobj_ctxt;
if (libxml_deprecationWarning("xmlParsePEReference") == -1)
return(((void *)0));
if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlParsePEReference", &pyobj_ctxt))
return(((void *)0));
ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj));
xmlParsePEReference(ctxt);
_Py_INCREF(((PyObject*)((&_Py_NoneStruct))));
return((&_Py_NoneStruct));
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 2,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 1,
"return_statement": 3,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 4,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_prep#f_gold.c | transcoder-set | PROGRAM_FOR_FACTORIAL_OF_A_NUMBER.c | f_gold | 4 | unsigned int f_gold ( unsigned int n ) {
if ( n == 0 ) return 1;
return n * f_gold ( n - 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,
"union_type": 0,
"while_loop": 0
} |
libxml2#xmlunicode_prep#xmlUCSIsHighPrivateUseSurrogates.c | libxml2 | xmlunicode.c | xmlUCSIsHighPrivateUseSurrogates | 4 | int
xmlUCSIsHighPrivateUseSurrogates(int code) {
return(((code >= 0xDB80) && (code <= 0xDBFF)));
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
libxml2#tree_prep#xmlDOMWrapNewCtxt.c | libxml2 | tree.c | xmlDOMWrapNewCtxt | 10 | xmlDOMWrapCtxtPtr
xmlDOMWrapNewCtxt(void)
{
xmlDOMWrapCtxtPtr ret;
ret = xmlMalloc(sizeof(xmlDOMWrapCtxt));
if (ret == ((void *)0))
return (((void *)0));
memset(ret, 0, sizeof(xmlDOMWrapCtxt));
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": 1,
"pointer_type": 0,
"return_statement": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 3,
"union_type": 0,
"while_loop": 0
} |
less-633#charset_prep#is_composing_char.c | less-633 | charset.c | is_composing_char | 7 | int is_composing_char(LWCHAR ch)
{
if (is_in_table(ch, &user_prt_table)) return 0;
return is_in_table(ch, &user_compose_table) ||
is_in_table(ch, &compose_table) ||
(bs_mode != 2 && is_in_table(ch, &fmt_table));
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 1,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
libxml2#xmlunicode_prep#xmlUCSIsBopomofoExtended.c | libxml2 | xmlunicode.c | xmlUCSIsBopomofoExtended | 4 | int
xmlUCSIsBopomofoExtended(int code) {
return(((code >= 0x31A0) && (code <= 0x31BF)));
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
libosip2-5.3.1#osip_port_prep#osip_build_random_number.c | libosip2-5.3.1 | osip_port.c | osip_build_random_number | 34 | unsigned int osip_build_random_number()
{
if (!random_seed_set) {
unsigned int ticks;
struct timeval tv;
int fd;
gettimeofday(&tv, ((void *)0));
ticks = (unsigned int) (tv.tv_sec + tv.tv_usec);
fd = open("/dev/urandom", 00);
if (fd > 0) {
unsigned int r;
int i;
for (i = 0; i < 512; i++) {
read(fd, &r, sizeof(r));
ticks += r;
}
close(fd);
}
srand48(ticks);
random_seed_set = 1;
}
{
int val = (int) lrand48();
if (val == 0) {
unsigned int ticks;
struct timeval tv;
gettimeofday(&tv, ((void *)0));
ticks = (unsigned int) (tv.tv_sec + tv.tv_usec);
srand48(ticks);
return (unsigned int) lrand48();
}
return val;
}
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 1,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 3,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 3,
"union_type": 0,
"while_loop": 0
} |
libxml2#dict_prep#xmlRandom.c | libxml2 | dict.c | xmlRandom | 4 | unsigned
xmlRandom(void) {
return(xoroshiro64ss(xmlGetLocalRngState()));
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#MAXIMUM_SUM_PAIRS_SPECIFIC_DIFFERENCE_1_prep#f_filled.c | transcoder-set | MAXIMUM_SUM_PAIRS_SPECIFIC_DIFFERENCE_1.c | f_filled | 1 | int f_filled ( int arr [ ], int N, int k ) {}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 0,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
findutils-4.9.0#pred_prep#pred_inum.c | findutils-4.9.0 | pred.c | pred_inum | 21 | _Bool
pred_inum (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr)
{
(void) pathname;
switch (pred_ptr->args.numinfo.kind)
{
case COMP_GT:
if (stat_buf->st_ino > pred_ptr->args.numinfo.l_val)
return (1);
break;
case COMP_LT:
if (stat_buf->st_ino < pred_ptr->args.numinfo.l_val)
return (1);
break;
case COMP_EQ:
if (stat_buf->st_ino == pred_ptr->args.numinfo.l_val)
return (1);
break;
}
return (0);
}
| {
"array_type": 0,
"break_continue_statement": 3,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 3,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 4,
"struct_type": 1,
"switch_statement": 1,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
screen-4.9.0#process_prep#SwitchWindow.c | screen-4.9.0 | process.c | SwitchWindow | 34 | void
SwitchWindow(n)
int n;
{
struct win *p;
do {} while (0);
if (n < 0 || n >= maxwin)
{
ShowWindows(-1);
return;
}
if ((p = wtab[n]) == 0)
{
ShowWindows(n);
return;
}
if (display == 0)
{
fore = p;
return;
}
if (p == display->d_fore)
{
Msg(0, "This IS window %d (%s).", n, p->w_title);
return;
}
if (AclCheckPermWin(display->d_user, 2, p))
{
Msg(0, "Access to window %d denied.", p->w_number);
return;
}
SetForeWindow(p);
Activate(fore->w_norefresh);
}
| {
"array_type": 1,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 5,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 1,
"return_statement": 5,
"struct_type": 1,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 1
} |
libxml2#threads_prep#xmlInitRMutex.c | libxml2 | threads.c | xmlInitRMutex | 8 | void
xmlInitRMutex(xmlRMutexPtr tok) {
(void) tok;
pthread_mutex_init(&tok->lock, ((void *)0));
tok->held = 0;
tok->waiters = 0;
pthread_cond_init(&tok->cv, ((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": 3,
"union_type": 0,
"while_loop": 0
} |
json.h#allow_leading_plus_sign_prep#json_get_key_size.c | json.h | allow_leading_plus_sign.c | json_get_key_size | 31 | int json_get_key_size(struct json_parse_state_s *state) {
const size_t flags_bitset = state->flags_bitset;
if (json_parse_flags_allow_unquoted_keys & flags_bitset) {
size_t offset = state->offset;
const size_t size = state->size;
const char *const src = state->src;
size_t data_size = state->data_size;
if ('"' == src[offset]) {
return json_get_string_size(state, 1);
} else if ((json_parse_flags_allow_single_quoted_strings & flags_bitset) &&
('\'' == src[offset])) {
return json_get_string_size(state, 1);
} else {
while ((offset < size) && is_valid_unquoted_key_char(src[offset])) {
offset++;
data_size++;
}
data_size++;
if (json_parse_flags_allow_location_information & flags_bitset) {
state->dom_size += sizeof(struct json_string_ex_s);
} else {
state->dom_size += sizeof(struct json_string_s);
}
state->offset = offset;
state->data_size = data_size;
return 0;
}
} else {
return json_get_string_size(state, 1);
}
}
| {
"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": 4,
"struct_type": 1,
"switch_statement": 0,
"type_casting": 2,
"union_type": 0,
"while_loop": 1
} |
heman#aabb3_prep#kmAABB3ExpandToContain.c | heman | aabb3.c | kmAABB3ExpandToContain | 11 | kmAABB3* kmAABB3ExpandToContain(kmAABB3* pOut, const kmAABB3* pIn, const kmAABB3* other) {
kmAABB3 result;
result.min.x = (pIn->min.x < other->min.x)?pIn->min.x:other->min.x;
result.max.x = (pIn->max.x > other->max.x)?pIn->max.x:other->max.x;
result.min.y = (pIn->min.y < other->min.y)?pIn->min.y:other->min.y;
result.max.y = (pIn->max.y > other->max.y)?pIn->max.y:other->max.y;
result.min.z = (pIn->min.z < other->min.z)?pIn->min.z:other->min.z;
result.max.z = (pIn->max.z > other->max.z)?pIn->max.z:other->max.z;
kmAABB3Assign(pOut, &result);
return pOut;
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
gprolog-1.5.0#callinf_supp_prep#Pl_Load_Call_Info_Arg_1.c | gprolog-1.5.0 | callinf_supp.c | Pl_Load_Call_Info_Arg_1 | 7 | void
Pl_Load_Call_Info_Arg_1(WamWord arg_no_word)
{
int arg_no;
arg_no = Pl_Rd_Integer(arg_no_word);
(pl_reg_bank[arg_no]) = (((PlULong) (save_call_info) << 3) | (PlULong)0x7);
}
| {
"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,
"union_type": 0,
"while_loop": 0
} |
wget-1.21.4#asnprintf_prep#asnprintf.c | wget-1.21.4 | 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,
"union_type": 0,
"while_loop": 0
} |
tar-1.34#save-cwd_prep#save_cwd.c | tar-1.34 | save-cwd.c | save_cwd | 14 | int
save_cwd (struct saved_cwd *cwd)
{
cwd->name = ((void *)0);
cwd->desc = open_safer (".", 00 | 02000000);
if (!1)
cwd->desc = fd_safer_flag (cwd->desc, 02000000);
if (cwd->desc < 0)
{
cwd->name = getcwd (((void *)0), 0);
return cwd->name ? 0 : -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": 2,
"struct_type": 1,
"switch_statement": 0,
"type_casting": 2,
"union_type": 0,
"while_loop": 0
} |
less-633#forwback_prep#get_one_screen.c | less-633 | forwback.c | get_one_screen | 11 | int get_one_screen(void)
{
int nlines;
POSITION pos = ((POSITION)0);
for (nlines = 0; nlines < sc_height; nlines++)
{
pos = forw_line(pos);
if (pos == ((POSITION)(-1))) break;
}
return (nlines < sc_height);
}
| {
"array_type": 0,
"break_continue_statement": 1,
"enum_type": 0,
"for_loop": 1,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 1,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
nano-7.2#move_prep#do_center.c | nano-7.2 | move.c | do_center | 6 | void do_center(void)
{
adjust_viewport(CENTERING);
draw_all_subwindows();
full_refresh();
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 0,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#DYNAMIC_PROGRAMMING_SUBSET_SUM_PROBLEM_1_prep#min.c | transcoder-set | DYNAMIC_PROGRAMMING_SUBSET_SUM_PROBLEM_1.c | min | 1 | int min(int x, int y) { return (x < y)? x: y; }
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#COUNT_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_1_prep#len.c | transcoder-set | COUNT_NUMBER_OF_WAYS_TO_COVER_A_DISTANCE_1.c | len | 1 | int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#MAXIMUM_TRIPLET_SUM_ARRAY_1_prep#len.c | transcoder-set | MAXIMUM_TRIPLET_SUM_ARRAY_1.c | len | 1 | int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
tmux#tty_prep#tty_region_off.c | tmux | tty.c | tty_region_off | 5 | void
tty_region_off(struct tty *tty)
{
tty_region(tty, 0, tty->sy - 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": 1,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#LONGEST_COMMON_SUBSTRING_SPACE_OPTIMIZED_DP_SOLUTION_prep#sort.c | transcoder-set | LONGEST_COMMON_SUBSTRING_SPACE_OPTIMIZED_DP_SOLUTION.c | sort | 1 | void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 0,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
json.h#allow_hexadecimal_numbers_prep#json_parse_object.c | json.h | allow_hexadecimal_numbers.c | json_parse_object | 89 | void json_parse_object(struct json_parse_state_s *state, int is_global_object,
struct json_object_s *object) {
const size_t flags_bitset = state->flags_bitset;
const size_t size = state->size;
const char *const src = state->src;
size_t elements = 0;
int allow_comma = 0;
struct json_object_element_s *previous = 0;
if (is_global_object) {
if ('{' == src[state->offset]) {
is_global_object = 0;
}
}
if (!is_global_object) {
state->offset++;
}
(void)json_skip_all_skippables(state);
elements = 0;
while (state->offset < size) {
struct json_object_element_s *element = 0;
struct json_string_s *string = 0;
struct json_value_s *value = 0;
if (!is_global_object) {
(void)json_skip_all_skippables(state);
if ('}' == src[state->offset]) {
state->offset++;
break;
}
} else {
if (json_skip_all_skippables(state)) {
break;
}
}
if (allow_comma) {
if (',' == src[state->offset]) {
state->offset++;
allow_comma = 0;
continue;
}
}
element = (struct json_object_element_s *)state->dom;
state->dom += sizeof(struct json_object_element_s);
if (0 == previous) {
object->start = element;
} else {
previous->next = element;
}
previous = element;
if (json_parse_flags_allow_location_information & flags_bitset) {
struct json_string_ex_s *string_ex =
(struct json_string_ex_s *)state->dom;
state->dom += sizeof(struct json_string_ex_s);
string_ex->offset = state->offset;
string_ex->line_no = state->line_no;
string_ex->row_no = state->offset - state->line_offset;
string = &(string_ex->string);
} else {
string = (struct json_string_s *)state->dom;
state->dom += sizeof(struct json_string_s);
}
element->name = string;
(void)json_parse_key(state, string);
(void)json_skip_all_skippables(state);
state->offset++;
(void)json_skip_all_skippables(state);
if (json_parse_flags_allow_location_information & flags_bitset) {
struct json_value_ex_s *value_ex = (struct json_value_ex_s *)state->dom;
state->dom += sizeof(struct json_value_ex_s);
value_ex->offset = state->offset;
value_ex->line_no = state->line_no;
value_ex->row_no = state->offset - state->line_offset;
value = &(value_ex->value);
} else {
value = (struct json_value_s *)state->dom;
state->dom += sizeof(struct json_value_s);
}
element->value = value;
json_parse_value(state, 0, value);
elements++;
allow_comma = 1;
}
if (previous) {
previous->next = 0;
}
if (0 == elements) {
object->start = 0;
}
object->length = elements;
}
| {
"array_type": 0,
"break_continue_statement": 3,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 13,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 6,
"return_statement": 0,
"struct_type": 8,
"switch_statement": 0,
"type_casting": 15,
"union_type": 0,
"while_loop": 1
} |
gawk-5.2.2#gawkfts_prep#gawk_fts_read.c | gawk-5.2.2 | gawkfts.c | gawk_fts_read | 124 | FTSENT *
gawk_fts_read(FTS *sp)
{
FTSENT *p, *tmp;
int instr;
char *t;
int saved_errno;
;
if (sp->fts_cur == ((void *)0) || (sp->fts_options & (0x200)))
return (((void *)0));
p = sp->fts_cur;
instr = p->fts_instr;
p->fts_instr = 3;
if (instr == 1) {
p->fts_info = fts_stat(sp, p, 0);
return (p);
}
if (instr == 2 &&
(p->fts_info == 12 || p->fts_info == 13)) {
p->fts_info = fts_stat(sp, p, 1);
if (p->fts_info == 1 && !(sp->fts_options & (0x004))) {
if ((p->fts_symfd = open(".", 00 | 02000000, 0))
== -1) {
p->fts_errno = (*__errno_location ());
p->fts_info = 7;
} else
p->fts_flags |= 0x02;
}
return (p);
}
if (p->fts_info == 1) {
if (instr == 4 ||
((sp->fts_options & (0x040)) && p->fts_dev != sp->fts_dev)) {
if (p->fts_flags & 0x02)
(void)close(p->fts_symfd);
if (sp->fts_child) {
fts_lfree(sp->fts_child);
sp->fts_child = ((void *)0);
}
p->fts_info = 6;
return (p);
}
if (sp->fts_child && (sp->fts_options & (0x100))) {
(sp->fts_options &= ~(0x100));
fts_lfree(sp->fts_child);
sp->fts_child = ((void *)0);
}
if (sp->fts_child) {
if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) {
p->fts_errno = (*__errno_location ());
p->fts_flags |= 0x01;
for (p = sp->fts_child; p; p = p->fts_link)
p->fts_accpath =
p->fts_parent->fts_accpath;
}
} else if ((sp->fts_child = fts_build(sp, 3)) == ((void *)0)) {
if ((sp->fts_options & (0x200)))
return (((void *)0));
return (p);
}
p = sp->fts_child;
sp->fts_child = ((void *)0);
goto name;
}
next: tmp = p;
if ((p = p->fts_link) != ((void *)0)) {
fts_free(tmp);
if (p->fts_level == 0) {
if ((!(sp->fts_options & (0x004)) && fchdir(sp->fts_rfd))) {
(sp->fts_options |= (0x200));
return (((void *)0));
}
fts_load(sp, p);
return (sp->fts_cur = p);
}
if (p->fts_instr == 4)
goto next;
if (p->fts_instr == 2) {
p->fts_info = fts_stat(sp, p, 1);
if (p->fts_info == 1 && !(sp->fts_options & (0x004))) {
if ((p->fts_symfd =
open(".", 00 | 02000000, 0)) == -1) {
p->fts_errno = (*__errno_location ());
p->fts_info = 7;
} else
p->fts_flags |= 0x02;
}
p->fts_instr = 3;
}
name: t = sp->fts_path + (p->fts_parent->fts_path[p->fts_parent->fts_pathlen - 1] == '/' ? p->fts_parent->fts_pathlen - 1 : p->fts_parent->fts_pathlen);
*t++ = '/';
memmove(t, p->fts_name, (size_t)(p->fts_namelen + 1));
return (sp->fts_cur = p);
}
p = tmp->fts_parent;
fts_free(tmp);
if (p->fts_level == -1) {
fts_free(p);
(*__errno_location ()) = 0;
return (sp->fts_cur = ((void *)0));
}
sp->fts_path[p->fts_pathlen] = '\0';
if (p->fts_level == 0) {
if ((!(sp->fts_options & (0x004)) && fchdir(sp->fts_rfd))) {
(sp->fts_options |= (0x200));
return (((void *)0));
}
} else if (p->fts_flags & 0x02) {
if ((!(sp->fts_options & (0x004)) && fchdir(p->fts_symfd))) {
saved_errno = (*__errno_location ());
(void)close(p->fts_symfd);
(*__errno_location ()) = saved_errno;
(sp->fts_options |= (0x200));
return (((void *)0));
}
(void)close(p->fts_symfd);
} else if (!(p->fts_flags & 0x01) &&
fts_safe_changedir(sp, p->fts_parent, -1, "..")) {
(sp->fts_options |= (0x200));
return (((void *)0));
}
p->fts_info = p->fts_errno ? 7 : 6;
return (sp->fts_cur = p);
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 1,
"function_pointer": 0,
"goto_statement": 2,
"if_statement": 27,
"memory_management": 0,
"memory_operation": 1,
"pointer_type": 3,
"return_statement": 14,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 17,
"union_type": 0,
"while_loop": 0
} |
tulipindicators-0.9.1#candles_prep#tc_marubozu.c | tulipindicators-0.9.1 | candles.c | tc_marubozu | 5 | int tc_marubozu(int size, TC_REAL const *const *inputs, tc_config const *options, tc_result *output) {
const TC_REAL *open = inputs[0]; const TC_REAL *high = inputs[1]; const TC_REAL *low = inputs[2]; const TC_REAL *close = inputs[3]; const int period = options->period; const TC_REAL div = 1.0 / period; TC_REAL avg_body_sum = 0; TC_REAL avg_total_sum = 0; if (period < 1) return 1; if (size < period) return 0; int i; for (i = 0; i < period; ++i) { avg_body_sum += (fabs(open[(i)] - close[(i)])); avg_total_sum += (high[(i)] - low[(i)]); }
while(i < size) { const TC_REAL top = (open[(i)] > close[(i)] ? open[(i)] : close[(i)]); const TC_REAL bottom = (open[(i)] < close[(i)] ? open[(i)] : close[(i)]); const TC_REAL body = (fabs(open[(i)] - close[(i)])); const TC_REAL total = (high[(i)] - low[(i)]); const TC_REAL upper = (high[(i)] - top); const TC_REAL lower = (bottom - low[(i)]); const TC_REAL avg_body = avg_body_sum * div; const TC_REAL avg_total = avg_total_sum * div; (void)top;(void)bottom;(void)body;(void)total; (void)upper;(void)lower;(void)avg_body;(void)avg_total; if (((fabs(open[(i)] - close[(i)])) > (options->body_long * avg_body)) && ((high[(i)] - top) < (options->wick_none * avg_total)) && ((bottom - low[(i)]) < (options->wick_none * avg_total))) { do { const tc_hit hit = {i, (1L<<17)}; const int r = tc_result_add(output, hit); if (r != 0) return r; } while (0); } avg_body_sum += body; avg_body_sum -= (fabs(open[(i-period)] - close[(i-period)])); avg_total_sum += total; avg_total_sum -= (high[(i-period)] - low[(i-period)]); ++i; };
return 0;
}
| {
"array_type": 1,
"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,
"union_type": 0,
"while_loop": 1
} |
libxml2#xinclude_prep#xmlXIncludeSetFlags.c | libxml2 | xinclude.c | xmlXIncludeSetFlags | 7 | int
xmlXIncludeSetFlags(xmlXIncludeCtxtPtr ctxt, int flags) {
if (ctxt == ((void *)0))
return(-1);
ctxt->parseFlags = flags;
return(0);
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 1,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
nettle-3.9.1#dsa-sha256-sign_prep#nettle_dsa_sha256_sign_digest.c | nettle-3.9.1 | dsa-sha256-sign.c | nettle_dsa_sha256_sign_digest | 11 | int
nettle_dsa_sha256_sign_digest(const struct dsa_public_key *pub,
const struct dsa_private_key *key,
void *random_ctx, nettle_random_func *random,
const uint8_t *digest,
struct dsa_signature *signature)
{
return nettle_dsa_sign((const struct dsa_params *) pub, key->x,
random_ctx, random,
32, digest, signature);
}
| {
"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": 3,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS_1_prep#len.c | transcoder-set | TOTAL_NUMBER_OF_NON_DECREASING_NUMBERS_WITH_N_DIGITS_1.c | len | 1 | int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
libxml2#xmlreader_prep#xmlNewTextReaderFilename.c | libxml2 | xmlreader.c | xmlNewTextReaderFilename | 15 | xmlTextReaderPtr
xmlNewTextReaderFilename(const char *URI) {
xmlParserInputBufferPtr input;
xmlTextReaderPtr ret;
input = xmlParserInputBufferCreateFilename(URI, XML_CHAR_ENCODING_NONE);
if (input == ((void *)0))
return(((void *)0));
ret = xmlNewTextReader(input, URI);
if (ret == ((void *)0)) {
xmlFreeParserInputBuffer(input);
return(((void *)0));
}
ret->allocs |= 1;
return(ret);
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 2,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 3,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 4,
"union_type": 0,
"while_loop": 0
} |
gawk-5.2.2#dfa_prep#xmalloc.c | gawk-5.2.2 | dfa.c | xmalloc | 10 | void *
xmalloc(size_t bytes)
{
void *p;
if (bytes == 0)
bytes = 1;
if ((p = pma_malloc(bytes)) == ((void *)0))
xalloc_die ();
return p;
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 2,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 1,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
binn-3.0#binn_prep#binn_list_int16.c | binn-3.0 | binn.c | binn_list_int16 | 5 | short binn_list_int16(void *list, int pos) {
short value;
binn_list_get(list, pos, 0x41, &value, ((void *)0));
return value;
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#FIND_HARMONIC_MEAN_USING_ARITHMETIC_MEAN_GEOMETRIC_MEAN_prep#main.c | transcoder-set | FIND_HARMONIC_MEAN_USING_ARITHMETIC_MEAN_GEOMETRIC_MEAN.c | main | 15 | int main(void) {
int n_success = 0;
int param0[] = {54,42,63,19,41,7,39,11,96,15};
int param1[] = {83,56,12,76,50,26,42,64,81,54};
for(int i = 0; i < len(param0); ++i)
{
if(abs(1 - (0.0000001 + abs(f_gold(param0[i],param1[i])) )/ (abs(f_filled(param0[i],param1[i])) + 0.0000001)) < 0.001)
{
n_success+=1;
}
break;
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
}
| {
"array_type": 2,
"break_continue_statement": 1,
"enum_type": 0,
"for_loop": 1,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 1,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#NEXT_POWER_OF_2_2_prep#len.c | transcoder-set | NEXT_POWER_OF_2_2.c | len | 1 | int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#GIVEN_A_SORTED_AND_ROTATED_ARRAY_FIND_IF_THERE_IS_A_PAIR_WITH_A_GIVEN_SUM_prep#main.c | transcoder-set | GIVEN_A_SORTED_AND_ROTATED_ARRAY_FIND_IF_THERE_IS_A_PAIR_WITH_A_GIVEN_SUM.c | main | 25 | int main(void) {
int n_success = 0;
int param0_0[] = {3,8,10,15,18,19,20,20,21,22,26,30,32,34,43,45,50,50,51,52,53,56,57,58,62,63,65,82,86,91,91,92,92,93,97};
int param0_1[] = {30,-34,86,-30,-26,2,90,8,26,-8,-8,0,-86,68,22,72,-76,48,-24,90,-22,-58,-54,90,-12,-12,88,72,-58,68,84,22,60,66,-52,-38,-90,62,30,-26,88,-36,92,32,-32,-42,-90,-40,-10};
int param0_2[] = {0,0,0,0,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,1};
int param0_3[] = {20,68,40,19,74,69};
int param0_4[] = {-98,-94,-94,-94,-90,-88,-88,-78,-74,-70,-68,-66,-64,-62,-54,-50,-40,-40,-40,-40,-28,-22,-22,-18,-14,-12,0,6,6,8,12,20,22,26,28,36,42,44,48,52,56,60,68,84};
int param0_5[] = {1,1,0};
int param0_6[] = {12,22,38,76,80,86};
int param0_7[] = {-36,-10,-26,34,-50,66,-2,-14,-62,60,-48,94,-70,6,-60,-90,28,-4,-20,-52,40,-76,-92,-14,54,4,-58,38,-74,-96,-88,86,-54,98,48,68,78,-28,-80,-46};
int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1};
int param0_9[] = {69,99,25,52,41,51,7,33,42,91,85,57,91,89,86,11,70,67,30,92,81,23,51,98,85,5,50,44};
int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9};
int param1[] = {17,41,26,4,28,2,4,26,17,21};
int param2[] = {30,10,1,88,-94,60,3,37,20,27};
for(int i = 0; i < len(param0); ++i)
{
if(f_filled(param0[i],param1[i],param2[i]) == f_gold(param0[i],param1[i],param2[i]))
{
n_success+=1;
}
}
printf("#Results:", " ", n_success, ", ", len(param0));
return 0;
}
| {
"array_type": 3,
"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": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE_prep#max.c | transcoder-set | DISTRIBUTING_ITEMS_PERSON_CANNOT_TAKE_TWO_ITEMS_TYPE.c | max | 1 | int max(int x, int y) { return (x > y)? x: y; }
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
tar-1.34#dirname-lgpl_prep#mdir_name.c | tar-1.34 | dirname-lgpl.c | mdir_name | 17 | char *
mdir_name (char const *file)
{
size_t length = dir_len (file);
_Bool append_dot = (length == 0
|| (0
&& length == ((void) (file), 0)
&& file[2] != '\0' && ! ((file[2]) == '/')));
char *dir = malloc (length + append_dot + 1);
if (!dir)
return ((void *)0);
memcpy (dir, file, length);
if (append_dot)
dir[length++] = '.';
dir[length] = '\0';
return dir;
}
| {
"array_type": 2,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 2,
"memory_management": 1,
"memory_operation": 1,
"pointer_type": 1,
"return_statement": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 2,
"union_type": 0,
"while_loop": 0
} |
buffer-0.4.0#buffer_prep#buffer_indexof.c | buffer-0.4.0 | buffer.c | buffer_indexof | 6 | ssize_t
buffer_indexof(buffer_t *self, char *str) {
char *sub = strstr(self->data, str);
if (!sub) return -1;
return sub - self->data;
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 1,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 1,
"return_statement": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
gprolog-1.5.0#stream_supp_prep#Pl_Add_Mirror_To_Stream.c | gprolog-1.5.0 | stream_supp.c | Pl_Add_Mirror_To_Stream | 20 | void
Pl_Add_Mirror_To_Stream(int stm, int m_stm)
{
StmInf *pstm = pl_stm_tbl[stm];
StmInf *m_pstm = pl_stm_tbl[m_stm];
StmLst *m;
if (stm == m_stm)
return;
for(m = pstm->mirror; m ; m = m->next)
if (m->stm == m_stm)
return;
m = (StmLst *) Pl_Malloc_Check(sizeof(StmLst), "stream_supp.c", 619);
m->stm = m_stm;
m->next = pstm->mirror;
pstm->mirror = m;
m = (StmLst *) Pl_Malloc_Check(sizeof(StmLst), "stream_supp.c", 624);
m->stm = stm;
m->next = m_pstm->mirror_of;
m_pstm->mirror_of = m;
}
| {
"array_type": 1,
"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": 3,
"return_statement": 2,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#COUNT_PALINDROMIC_SUBSEQUENCE_GIVEN_STRING_prep#f_filled.c | transcoder-set | COUNT_PALINDROMIC_SUBSEQUENCE_GIVEN_STRING.c | f_filled | 1 | int f_filled ( char 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": 0,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
cflow-1.7#c_prep#yyfree.c | cflow-1.7 | c.c | yyfree | 4 | void yyfree (void * ptr )
{
free( (char *) ptr );
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 1,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 0,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
libxml2#chvalid_prep#xmlIsCombining.c | libxml2 | chvalid.c | xmlIsCombining | 4 | int
xmlIsCombining(unsigned int ch) {
return((((ch) < 0x100) ? 0 : xmlCharInRange((ch), &xmlIsCombiningGroup)));
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
mcsim-6.2.0#mod_prep#AnnounceProgram.c | mcsim-6.2.0 | mod.c | AnnounceProgram | 8 | void AnnounceProgram (void)
{
printf ("\n________________________________________\n");
printf ("\nMod " "v6.2.0" " - Model Generator for MCSim\n\n");
printf ("MCSim and associated software comes with ABSOLUTELY NO WARRANTY;\n"
"This is free software, and you are welcome to redistribute it\n"
"under certain conditions; see the GNU General Public License.\n\n");
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 0,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
tulipindicators-0.9.1#min_prep#ti_min_ref.c | tulipindicators-0.9.1 | min.c | ti_min_ref | 16 | int ti_min_ref(int size, double const *const *inputs, double const *options, double *const *outputs) {
const double *input = inputs[0];
const int period = (int)options[0];
double *output = outputs[0];
if (period < 1) return 1;
if (size <= ti_min_start(options)) return 0;
for (int i = period-1; i < size; ++i) {
double min = input[i-period+1];
for (int j = i-period+2; j <= i; ++j) {
min = ((min) < (input[j]) ? (min) : (input[j]));
}
*output++ = min;
}
((void) sizeof ((output - outputs[0] == size - ti_min_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_min_start(options)) ; else __assert_fail ("output - outputs[0] == size - ti_min_start(options)", "indicators/min.c", 88, __extension__ __PRETTY_FUNCTION__); }));
return 0;
}
| {
"array_type": 4,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 2,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 3,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 2,
"return_statement": 3,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 2,
"union_type": 0,
"while_loop": 0
} |
libxml2#xmlwriter_prep#xmlTextWriterWriteBase64.c | libxml2 | xmlwriter.c | xmlTextWriterWriteBase64 | 31 | int
xmlTextWriterWriteBase64(xmlTextWriterPtr writer, const char *data,
int start, int len)
{
int count;
int sum;
xmlLinkPtr lk;
xmlTextWriterStackEntry *p;
if ((writer == ((void *)0)) || (data == ((void *)0)) || (start < 0) || (len < 0))
return -1;
sum = 0;
lk = xmlListFront(writer->nodes);
if (lk != 0) {
p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
if (p != 0) {
count = xmlTextWriterHandleStateDependencies(writer, p);
if (count < 0)
return -1;
sum += count;
}
}
if (writer->indent)
writer->doindent = 0;
count =
xmlOutputBufferWriteBase64(writer->out, len,
(unsigned char *) data + start);
if (count < 0)
return -1;
sum += count;
return sum;
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 6,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 1,
"return_statement": 4,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#TRIANGULAR_MATCHSTICK_NUMBER_prep#f_gold.c | transcoder-set | TRIANGULAR_MATCHSTICK_NUMBER.c | f_gold | 3 | int f_gold ( int x ) {
return ( 3 * x * ( x + 1 ) ) / 2;
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 0,
"union_type": 0,
"while_loop": 0
} |
libxml2#xmlwriter_prep#xmlTextWriterWriteVFormatElement.c | libxml2 | xmlwriter.c | xmlTextWriterWriteVFormatElement | 16 | int
xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
const xmlChar * name, const char *format,
va_list argptr)
{
int rc;
xmlChar *buf;
if (writer == ((void *)0))
return -1;
buf = xmlTextWriterVSprintf(format, argptr);
if (buf == ((void *)0))
return -1;
rc = xmlTextWriterWriteElement(writer, name, buf);
xmlFree(buf);
return rc;
}
| {
"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": 2,
"union_type": 0,
"while_loop": 0
} |
transcoder-set#MAXIMUM_SUM_ALTERNATING_SUBSEQUENCE_SUM_prep#cmpfunc.c | transcoder-set | MAXIMUM_SUM_ALTERNATING_SUBSEQUENCE_SUM.c | cmpfunc | 1 | int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 0,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
mcsim-6.2.0#matutil_prep#InitiVector.c | mcsim-6.2.0 | matutil.c | InitiVector | 9 | int *InitiVector (long cVectors)
{
if (cVectors == 0) {
printf ("Error: zero length array allocation in InitiVector - Exiting\n");
exit (0);
}
else
return (int *) malloc (cVectors * sizeof(int));
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 1,
"memory_management": 1,
"memory_operation": 0,
"pointer_type": 0,
"return_statement": 1,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 1,
"union_type": 0,
"while_loop": 0
} |
libxml2#libxml2-py_prep#libxml_xmlNextChar.c | libxml2 | libxml2-py.c | libxml_xmlNextChar | 13 | PyObject *
libxml_xmlNextChar(PyObject *self __attribute__ ((__unused__)), PyObject *args) {
xmlParserCtxtPtr ctxt;
PyObject *pyobj_ctxt;
if (libxml_deprecationWarning("xmlNextChar") == -1)
return(((void *)0));
if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlNextChar", &pyobj_ctxt))
return(((void *)0));
ctxt = (xmlParserCtxtPtr) (((pyobj_ctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyparserCtxt_Object *)(pyobj_ctxt))->obj));
xmlNextChar(ctxt);
_Py_INCREF(((PyObject*)((&_Py_NoneStruct))));
return((&_Py_NoneStruct));
}
| {
"array_type": 0,
"break_continue_statement": 0,
"enum_type": 0,
"for_loop": 0,
"function_pointer": 0,
"goto_statement": 0,
"if_statement": 2,
"memory_management": 0,
"memory_operation": 0,
"pointer_type": 1,
"return_statement": 3,
"struct_type": 0,
"switch_statement": 0,
"type_casting": 4,
"union_type": 0,
"while_loop": 0
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.