id
stringlengths
21
132
codebase
stringclasses
57 values
c_file
stringlengths
3
108
function
stringlengths
3
74
sloc
stringclasses
134 values
c_code
stringlengths
25
52.1k
c_constructs
dict
libxml2#error_prep#xmlGetLastError.c
libxml2
error.c
xmlGetLastError
8
const xmlError * xmlGetLastError(void) { const xmlError *error = xmlGetLastErrorInternal(); if (error->code == XML_ERR_OK) return(((void *)0)); return(error); }
{ "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#session_prep#session_groups_RB_FIND.c
tmux
session.c
session_groups_RB_FIND
1
struct session_group * session_groups_RB_FIND(struct session_groups *head, struct session_group *elm) { struct session_group *tmp = (head)->rbh_root; int comp; while (tmp) { comp = session_group_cmp(elm, tmp); if (comp < 0) tmp = (tmp)->entry.rbe_left; else if (comp > 0) tmp = (tmp)->entry.rbe_right; else return (tmp); } return (((void *)0)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 1 }
transcoder-set#SUM_BINOMIAL_COEFFICIENTS_prep#max.c
transcoder-set
SUM_BINOMIAL_COEFFICIENTS.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 }
heman#gaussian_prep#generate_gaussian_row.c
heman
gaussian.c
generate_gaussian_row
20
void generate_gaussian_row(int* target, int fwidth) { ((void) sizeof ((fwidth > 0) ? 1 : 0), __extension__ ({ if (fwidth > 0) ; else __assert_fail ("fwidth > 0", "/home/melih/storage/Transpiler/Dataset/projects/codebases_v2/heman/src/gaussian.c", 9, __extension__ __PRETTY_FUNCTION__); })); int nbytes = fwidth * sizeof(int); int* tmp = malloc(nbytes); target[0] = tmp[0] = 1; for (int col = 1; col < fwidth; col++) { target[col] = 0; tmp[col] = 0; } for (int row = 1; row < fwidth; row++) { for (int col = 1; col <= row; col++) { target[col] = tmp[col] + tmp[col - 1]; } for (int col = 1; col <= row; col++) { tmp[col] = target[col]; } } free(tmp); }
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 4, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 2, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
tar-1.34#xvasprintf_prep#xvasprintf.c
tar-1.34
xvasprintf.c
xvasprintf
28
char * xvasprintf (const char *format, va_list args) { char *result; { size_t argcount = 0; const char *f; for (f = format;;) { if (*f == '\0') return xstrcat (argcount, args); if (*f != '%') break; f++; if (*f != 's') break; f++; argcount++; } } if (vasprintf (&result, format, args) < 0) { if ((*__errno_location ()) == 12) xalloc_die (); return ((void *)0); } return result; }
{ "array_type": 0, "break_continue_statement": 2, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
wget-1.21.4#host_prep#is_valid_ip_address.c
wget-1.21.4
host.c
is_valid_ip_address
11
_Bool is_valid_ip_address (const char *name) { const char *endp; endp = name + strlen(name); if (is_valid_ipv4_address (name, endp)) return 1; if (is_valid_ipv6_address (name, endp)) 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": 1, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#base64-encode_prep#nettle_base64_encode_raw.c
nettle-3.9.1
base64-encode.c
nettle_base64_encode_raw
5
void nettle_base64_encode_raw(char *dst, size_t length, const uint8_t *src) { encode_raw(base64_encode_table, dst, length, src); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
json-c#test_json_pointer_prep#main.c
json-c
test_json_pointer.c
main
9
int main(int argc, char **argv) { test_example_get(); test_recursion_get(); test_wrong_inputs_get(); test_example_set(); test_wrong_inputs_set(); 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": 0, "union_type": 0, "while_loop": 0 }
gawk-5.2.2#io_prep#register_output_wrapper.c
gawk-5.2.2
io.c
register_output_wrapper
13
void register_output_wrapper(awk_output_wrapper_t *wrapper) { if (wrapper == ((void *)0)) (*(set_loc("io.c", 3217), r_fatal))(gettext("register_output_wrapper: received NULL pointer")); wrapper->next = ((void *)0); if (op_head == ((void *)0)) { op_head = op_tail = wrapper; } else { op_tail->next = wrapper; op_tail = op_tail->next; } }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
mtools-4.0.43#dirCache_prep#freeDirCache.c
mtools-4.0.43
dirCache.c
freeDirCache
14
void freeDirCache(Stream_t *Stream) { dirCache_t *cache, **dcp; dcp = getDirCacheP(Stream); cache = *dcp; if(cache) { int n; n=freeDirCacheRange(cache, 0, cache->nr_entries); if(n >= 0) low_level_dir_write_end(Stream, n); free(cache); *dcp = 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": 2, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#COUNT_SUBSTRINGS_WITH_SAME_FIRST_AND_LAST_CHARACTERS_prep#max.c
transcoder-set
COUNT_SUBSTRINGS_WITH_SAME_FIRST_AND_LAST_CHARACTERS.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 }
transcoder-set#SUM_BINOMIAL_COEFFICIENTS_prep#cmpfunc.c
transcoder-set
SUM_BINOMIAL_COEFFICIENTS.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 }
transcoder-set#FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_ARRAY_prep#cmpfunc.c
transcoder-set
FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_ARRAY.c
cmpfunc
1
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
dap-3.10#ps_prep#nland.c
dap-3.10
ps.c
nland
18
void nland(pict *p, int nplots, int nperpage) { int pn; if (nplots % nperpage) { fprintf(dap_err, "(pict_nlandscape) Number of plots %d not a multiple of number per page %d\n", nplots, nperpage); exit(1); } pict_land(nplots / nperpage); for (pn = 0; pn < nplots; pn += nperpage) { pict_page(); pict_show(p + pn); } pict_end(); }
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
screen-4.9.0#layout_prep#RenumberLayout.c
screen-4.9.0
layout.c
RenumberLayout
15
int RenumberLayout(struct layout *layout, int number) { int old; struct layout *lay; old = layout->lay_number; if (number < 0 || number >= 10) return 0; lay = laytab[number]; laytab[number] = layout; layout->lay_number = number; laytab[old] = lay; if (lay) lay->lay_number = old; return 1; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 2, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tulipindicators-0.9.1#tiamalgamation_prep#ti_adxr_start.c
tulipindicators-0.9.1
tiamalgamation.c
ti_adxr_start
3
int ti_adxr_start(double const *options) { return ((int)options[0]-1) * 3; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
optipng-0.7.8#tiffutil_prep#minitiff_init_info.c
optipng-0.7.8
tiffutil.c
minitiff_init_info
5
void minitiff_init_info(struct minitiff_info *info_ptr) { memset(info_ptr, 0, sizeof(*info_ptr)); info_ptr->photometric = (unsigned int)(-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": 1, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#xmlschemastypes_prep#xmlSchemaValidatePredefinedType.c
libxml2
xmlschemastypes.c
xmlSchemaValidatePredefinedType
5
int xmlSchemaValidatePredefinedType(xmlSchemaTypePtr type, const xmlChar *value, xmlSchemaValPtr *val) { return(xmlSchemaValPredefTypeNode(type, value, val, ((void *)0))); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#MAXIMUM_SUM_BITONIC_SUBARRAY_prep#len.c
transcoder-set
MAXIMUM_SUM_BITONIC_SUBARRAY.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#CHECK_IF_A_NUMBER_IS_JUMBLED_OR_NOT_prep#f_gold.c
transcoder-set
CHECK_IF_A_NUMBER_IS_JUMBLED_OR_NOT.c
f_gold
11
_Bool f_gold ( int num ) { if ( num / 10 == 0 ) return 1; while ( num != 0 ) { if ( num / 10 == 0 ) return 1; int digit1 = num % 10; int digit2 = ( num / 10 ) % 10; if ( abs ( digit2 - digit1 ) > 1 ) return 0; num = num / 10; } return 1; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
libxml2#libxml2-py_prep#libxml_xmlUCSIsCJKUnifiedIdeographsExtensionB.c
libxml2
libxml2-py.c
libxml_xmlUCSIsCJKUnifiedIdeographsExtensionB
13
PyObject * libxml_xmlUCSIsCJKUnifiedIdeographsExtensionB(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsCJKUnifiedIdeographsExtensionB") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSIsCJKUnifiedIdeographsExtensionB", &code)) return(((void *)0)); c_retval = xmlUCSIsCJKUnifiedIdeographsExtensionB(code); 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": 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 }
tar-1.34#version-etc_prep#version_etc_ar.c
tar-1.34
version-etc.c
version_etc_ar
10
void version_etc_ar (FILE *stream, const char *command_name, const char *package, const char *version, const char * const * authors) { size_t n_authors; for (n_authors = 0; authors[n_authors]; n_authors++) ; version_etc_arn (stream, command_name, package, version, authors, n_authors); }
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tmux#osdep-linux_prep#osdep_get_name.c
tmux
osdep-linux.c
osdep_get_name
29
char * osdep_get_name(int fd, __attribute__ ((__unused__)) char *tty) { FILE *f; char *path, *buf; size_t len; int ch; pid_t pgrp; if ((pgrp = tcgetpgrp(fd)) == -1) return (((void *)0)); xasprintf(&path, "/proc/%lld/cmdline", (long long) pgrp); if ((f = fopen(path, "r")) == ((void *)0)) { free(path); return (((void *)0)); } free(path); len = 0; buf = ((void *)0); while ((ch = fgetc(f)) != (-1)) { if (ch == '\0') break; buf = xrealloc(buf, len + 2); buf[len++] = ch; } if (buf != ((void *)0)) buf[len] = '\0'; fclose(f); return (buf); }
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 2, "memory_operation": 0, "pointer_type": 3, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 5, "union_type": 0, "while_loop": 1 }
wget-1.21.4#connect_prep#fd_peek.c
wget-1.21.4
connect.c
fd_peek
11
int fd_peek (int fd, char *buf, int bufsize, double timeout) { struct transport_info *info; do { static struct transport_info *last_info; static int last_fd = -1; static unsigned int last_tick; if (!transport_map) info = ((void *)0); else if (last_fd == fd && last_tick == transport_map_modified_tick) info = last_info; else { info = hash_table_get (transport_map, (void *)(intptr_t) fd); last_fd = fd; last_info = info; last_tick = transport_map_modified_tick; } } while (0); if (info && info->imp->peeker) return info->imp->peeker (fd, buf, bufsize, info->ctx, timeout); if (!poll_internal (fd, info, WAIT_FOR_READ, timeout)) return -1; return sock_peek (fd, buf, bufsize); }
{ "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": 3, "struct_type": 2, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 1 }
enscript-1.6.6#strhash_prep#strhash_free.c
enscript-1.6.6
strhash.c
strhash_free
17
void strhash_free (StringHashPtr hash) { HashList *list, *list_next; int i; if (!hash) return; for (i = 0; i < 8192; i++) for (list = hash->hash_table[i]; list; list = list_next) { list_next = list->next; free (list->key); free (list); } free (hash->hash_table); free (hash); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 4, "memory_operation": 0, "pointer_type": 2, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#COUNT_FACTORIAL_NUMBERS_IN_A_GIVEN_RANGE_prep#sort.c
transcoder-set
COUNT_FACTORIAL_NUMBERS_IN_A_GIVEN_RANGE.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 }
transcoder-set#MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME_prep#main.c
transcoder-set
MINIMUM_CHARACTERS_ADDED_FRONT_MAKE_STRING_PALINDROME.c
main
14
int main(void) { int n_success = 0; char param0[][100] = {"aadaa","2674377254","11","0011000","26382426486138","111010111010","abccba","5191","1110101101","abcdecbe"}; 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 }
transcoder-set#PROGRAM_FOR_FACTORIAL_OF_A_NUMBER_prep#f_filled.c
transcoder-set
PROGRAM_FOR_FACTORIAL_OF_A_NUMBER.c
f_filled
1
unsigned int f_filled ( unsigned 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 }
lil#lil_prep#lil_parse_value.c
lil
lil.c
lil_parse_value
5
lil_value_t lil_parse_value(lil_t lil, lil_value_t val, int funclevel) { if (!val || !val->d || !val->l) return alloc_value(((void *)0)); return lil_parse(lil, val->d, val->l, funclevel); }
{ "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 }
transcoder-set#MAXIMUM_SUBSEQUENCE_SUM_SUCH_THAT_NO_THREE_ARE_CONSECUTIVE_prep#main.c
transcoder-set
MAXIMUM_SUBSEQUENCE_SUM_SUCH_THAT_NO_THREE_ARE_CONSECUTIVE.c
main
25
int main(void) { int n_success = 0; int param0_0[] = {5,6,8,9,10,10,16,17,17,20,21,22,23,28,29,32,36,37,40,41,42,43,47,47,48,48,49,49,52,52,53,59,61,64,65,79,79,81,87,91,92,98}; int param0_1[] = {98,76,-80,-30,82,52,-14,28,98,18,82,52,26,-62,-8}; int param0_2[] = {0,0,0,0,0,1,1,1,1}; int param0_3[] = {21,26,85,73,47,10,54,9,11,70,42,95,44,91}; int param0_4[] = {-94,-92,-90,-84,-76,-68,-60,-50,-34,-34,-20,-16,-6,18,50,54,66,70,96}; int param0_5[] = {1,0,1,1,1,0,1,0,0,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1}; int param0_6[] = {2,3,4,4,14,14,18,21,24,26,29,31,32,34,36,37,38,40,42,44,44,54,63,69,77,77,82,82,86,87,90,93,95}; int param0_7[] = {-46,64,-44,88,-74,54,40,-2,-24,94,40,-44,56,-54,-60,-86,-58,48,-90,12,-76,-30,94,-34,14,12,80,-40,60}; int param0_8[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1}; int param0_9[] = {4,32,63,23,44,57,59,69,88,61,66,61,65,33,79,58,71,2,80,41,83,12,20,9,7,40,36,97,10,98,66,78,71,37,53}; 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[] = {35,7,7,12,9,16,31,22,7,26}; 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 }
optipng-0.7.8#deflate_prep#deflateSetHeader.c
optipng-0.7.8
deflate.c
deflateSetHeader
6
int deflateSetHeader(z_streamp strm, gz_headerp head) { if (deflateStateCheck(strm) || strm->state->wrap != 2) return (-2); strm->state->gzhead = head; return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlCreateURLParserCtxt.c
libxml2
libxml2-py.c
libxml_xmlCreateURLParserCtxt
12
PyObject * libxml_xmlCreateURLParserCtxt(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; xmlParserCtxtPtr c_retval; char * filename; int options; if (!_PyArg_ParseTuple_SizeT(args, (char *)"zi:xmlCreateURLParserCtxt", &filename, &options)) return(((void *)0)); c_retval = xmlCreateURLParserCtxt(filename, options); py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) 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 }
libxml2#libxml2-py_prep#libxml_xmlDebugDumpString.c
libxml2
libxml2-py.c
libxml_xmlDebugDumpString
13
PyObject * libxml_xmlDebugDumpString(PyObject *self __attribute__ ((__unused__)), PyObject *args) { FILE * output; PyObject *pyobj_output; xmlChar * str; if (!_PyArg_ParseTuple_SizeT(args, (char *)"Oz:xmlDebugDumpString", &pyobj_output, &str)) return(((void *)0)); output = (FILE *) (((pyobj_output) == (&_Py_NoneStruct)) ? ((void *)0) : libxml_PyFileGet(pyobj_output)); xmlDebugDumpString(output, str); libxml_PyFileRelease(output); _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": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
tulipindicators-0.9.1#asin_prep#ti_asin.c
tulipindicators-0.9.1
asin.c
ti_asin
1
int ti_asin(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *in1 = inputs[0]; (void)options; double *output = outputs[0]; int i; for (i = 0; i < size; ++i) { output[i] = (asin(in1[i])); } return 0; }
{ "array_type": 4, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 3, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#wam2ma_prep#F_unify_atom.c
gprolog-1.5.0
wam2ma.c
F_unify_atom
7
void F_unify_atom(ArgVal arg[]) { ArgVal *top = arg; BTNode *atom; char *str_atom; ((str_atom) = *((char * *) (top)) , (top)++); atom = BT_String_Add(&bt_tagged_atom, str_atom); Inst_Printf("call_c", "Pl_Unify_Atom_Tagged(ta(%d))", atom->no); Inst_Printf("fail_ret", ""); }
{ "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": 3, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
gawk-5.2.2#debug_prep#has_break_or_watch_point.c
gawk-5.2.2
debug.c
has_break_or_watch_point
37
int has_break_or_watch_point(int *pnum, _Bool any) { BREAKPOINT *b = ((void *)0); struct list_item *w = ((void *)0); if (any) { if (breakpoints.next != &breakpoints) b = breakpoints.next; if (watch_list.next != &watch_list) w = watch_list.next; if (! b && ! w) return 0; if (b && ! w) { *pnum = b->number; return D_break; } if (w && ! b) { *pnum = w->number; return D_watch; } if (w->number > b->number) { *pnum = w->number; return D_watch; } *pnum = b->number; return D_break; } for (b = breakpoints.next; b != &breakpoints; b = b->next) { if (b->number == *pnum) return D_break; } for (w = watch_list.next; w != &watch_list; w = w->next) { if (w->number == *pnum) return D_watch; } return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 9, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 8, "struct_type": 1, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
dap-3.10#misc_prep#dap_numdate.c
dap-3.10
misc.c
dap_numdate
37
int dap_numdate(char date[]) { int d; int dday; int dyr; int mon; int day; int yr; int m; int y; int ndays; for (d = 0, mon = 0; d < 2 && '0' <= date[d] && date[d] <= '9'; d++) mon = 10 * mon + date[d] - '0'; if (date[d] == '/') d++; for (dday = d, day = 0; d < dday + 2 && '0' <= date[d] && date[d] <= '9'; d++) day = 10 * day + date[d] - '0'; if (date[d] == '/') d++; for (dyr = d, yr = 0; d < dyr + 4 && '0' <= date[d] && date[d] <= '9'; d++) yr = 10 * yr + date[d] - '0'; if (d < dyr + 4) return -1; for (m = 1, ndays = day; m < mon; m++) ndays += mdays[m]; if ((mon > 2) && !(yr % 4) && (yr % 100)) ndays++; if (yr < 1752) return -1; for (y = 1752; y < yr; y++) { ndays += 365; if (!(y % 4) && ((y % 100) || !(y % 400))) ndays++; } return ndays; }
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 5, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "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 }
transcoder-set#FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS_prep#max.c
transcoder-set
FIND_MAXIMUM_SUM_POSSIBLE_EQUAL_SUM_THREE_STACKS.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 }
libxml2#libxml2-py_prep#libxml_xmlThrDefGetWarningsDefaultValue.c
libxml2
libxml2-py.c
libxml_xmlThrDefGetWarningsDefaultValue
13
PyObject * libxml_xmlThrDefGetWarningsDefaultValue(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int v; if (libxml_deprecationWarning("xmlThrDefGetWarningsDefaultValue") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlThrDefGetWarningsDefaultValue", &v)) return(((void *)0)); c_retval = xmlThrDefGetWarningsDefaultValue(v); 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": 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 }
libxml2#parser_prep#xmlCtxtResetPush.c
libxml2
parser.c
xmlCtxtResetPush
19
int xmlCtxtResetPush(xmlParserCtxtPtr ctxt, const char *chunk, int size, const char *filename, const char *encoding) { xmlParserInputPtr input; if (ctxt == ((void *)0)) return(1); xmlCtxtReset(ctxt); input = xmlNewPushInput(filename, chunk, size); if (input == ((void *)0)) return(1); if (inputPush(ctxt, input) < 0) { xmlFreeInputStream(input); return(1); } if (encoding != ((void *)0)) xmlSwitchEncodingName(ctxt, encoding); 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, "union_type": 0, "while_loop": 0 }
libxml2#HTMLparser_prep#htmlParseDoc.c
libxml2
HTMLparser.c
htmlParseDoc
4
htmlDocPtr htmlParseDoc(const xmlChar *cur, const char *encoding) { return(htmlSAXParseDoc(cur, encoding, ((void *)0), ((void *)0))); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tmux#window_prep#windows_RB_REMOVE_COLOR.c
tmux
window.c
windows_RB_REMOVE_COLOR
1
void windows_RB_REMOVE_COLOR(struct windows *head, struct window *parent, struct window *elm) { struct window *tmp; while ((elm == ((void *)0) || (elm)->entry.rbe_color == 0) && elm != (head)->rbh_root) { if ((parent)->entry.rbe_left == elm) { tmp = (parent)->entry.rbe_right; if ((tmp)->entry.rbe_color == 1) { do { (tmp)->entry.rbe_color = 0; (parent)->entry.rbe_color = 1; } while (0); do { (tmp) = (parent)->entry.rbe_right; if (((parent)->entry.rbe_right = (tmp)->entry.rbe_left)) { ((tmp)->entry.rbe_left)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_left = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_right; } if (((tmp)->entry.rbe_left == ((void *)0) || ((tmp)->entry.rbe_left)->entry.rbe_color == 0) && ((tmp)->entry.rbe_right == ((void *)0) || ((tmp)->entry.rbe_right)->entry.rbe_color == 0)) { (tmp)->entry.rbe_color = 1; elm = parent; parent = (elm)->entry.rbe_parent; } else { if ((tmp)->entry.rbe_right == ((void *)0) || ((tmp)->entry.rbe_right)->entry.rbe_color == 0) { struct window *oleft; if ((oleft = (tmp)->entry.rbe_left)) (oleft)->entry.rbe_color = 0; (tmp)->entry.rbe_color = 1; do { (oleft) = (tmp)->entry.rbe_left; if (((tmp)->entry.rbe_left = (oleft)->entry.rbe_right)) { ((oleft)->entry.rbe_right)->entry.rbe_parent = (tmp); } do {} while (0); if (((oleft)->entry.rbe_parent = (tmp)->entry.rbe_parent)) { if ((tmp) == ((tmp)->entry.rbe_parent)->entry.rbe_left) ((tmp)->entry.rbe_parent)->entry.rbe_left = (oleft); else ((tmp)->entry.rbe_parent)->entry.rbe_right = (oleft); } else (head)->rbh_root = (oleft); (oleft)->entry.rbe_right = (tmp); (tmp)->entry.rbe_parent = (oleft); do {} while (0); if (((oleft)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_right; } (tmp)->entry.rbe_color = (parent)->entry.rbe_color; (parent)->entry.rbe_color = 0; if ((tmp)->entry.rbe_right) ((tmp)->entry.rbe_right)->entry.rbe_color = 0; do { (tmp) = (parent)->entry.rbe_right; if (((parent)->entry.rbe_right = (tmp)->entry.rbe_left)) { ((tmp)->entry.rbe_left)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_left = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); elm = (head)->rbh_root; break; } } else { tmp = (parent)->entry.rbe_left; if ((tmp)->entry.rbe_color == 1) { do { (tmp)->entry.rbe_color = 0; (parent)->entry.rbe_color = 1; } while (0); do { (tmp) = (parent)->entry.rbe_left; if (((parent)->entry.rbe_left = (tmp)->entry.rbe_right)) { ((tmp)->entry.rbe_right)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_right = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_left; } if (((tmp)->entry.rbe_left == ((void *)0) || ((tmp)->entry.rbe_left)->entry.rbe_color == 0) && ((tmp)->entry.rbe_right == ((void *)0) || ((tmp)->entry.rbe_right)->entry.rbe_color == 0)) { (tmp)->entry.rbe_color = 1; elm = parent; parent = (elm)->entry.rbe_parent; } else { if ((tmp)->entry.rbe_left == ((void *)0) || ((tmp)->entry.rbe_left)->entry.rbe_color == 0) { struct window *oright; if ((oright = (tmp)->entry.rbe_right)) (oright)->entry.rbe_color = 0; (tmp)->entry.rbe_color = 1; do { (oright) = (tmp)->entry.rbe_right; if (((tmp)->entry.rbe_right = (oright)->entry.rbe_left)) { ((oright)->entry.rbe_left)->entry.rbe_parent = (tmp); } do {} while (0); if (((oright)->entry.rbe_parent = (tmp)->entry.rbe_parent)) { if ((tmp) == ((tmp)->entry.rbe_parent)->entry.rbe_left) ((tmp)->entry.rbe_parent)->entry.rbe_left = (oright); else ((tmp)->entry.rbe_parent)->entry.rbe_right = (oright); } else (head)->rbh_root = (oright); (oright)->entry.rbe_left = (tmp); (tmp)->entry.rbe_parent = (oright); do {} while (0); if (((oright)->entry.rbe_parent)) do {} while (0); } while (0); tmp = (parent)->entry.rbe_left; } (tmp)->entry.rbe_color = (parent)->entry.rbe_color; (parent)->entry.rbe_color = 0; if ((tmp)->entry.rbe_left) ((tmp)->entry.rbe_left)->entry.rbe_color = 0; do { (tmp) = (parent)->entry.rbe_left; if (((parent)->entry.rbe_left = (tmp)->entry.rbe_right)) { ((tmp)->entry.rbe_right)->entry.rbe_parent = (parent); } do {} while (0); if (((tmp)->entry.rbe_parent = (parent)->entry.rbe_parent)) { if ((parent) == ((parent)->entry.rbe_parent)->entry.rbe_left) ((parent)->entry.rbe_parent)->entry.rbe_left = (tmp); else ((parent)->entry.rbe_parent)->entry.rbe_right = (tmp); } else (head)->rbh_root = (tmp); (tmp)->entry.rbe_right = (parent); (parent)->entry.rbe_parent = (tmp); do {} while (0); if (((tmp)->entry.rbe_parent)) do {} while (0); } while (0); elm = (head)->rbh_root; break; } } } if (elm) (elm)->entry.rbe_color = 0; }
{ "array_type": 0, "break_continue_statement": 1, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 3, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 1 }
transcoder-set#MINIMUM_STEPS_MINIMIZE_N_PER_GIVEN_CONDITION_prep#len.c
transcoder-set
MINIMUM_STEPS_MINIMIZE_N_PER_GIVEN_CONDITION.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#MODULAR_EXPONENTIATION_POWER_IN_MODULAR_ARITHMETIC_prep#cmpfunc.c
transcoder-set
MODULAR_EXPONENTIATION_POWER_IN_MODULAR_ARITHMETIC.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#xmlreader_prep#xmlTextReaderCurrentNode.c
libxml2
xmlreader.c
xmlTextReaderCurrentNode
8
xmlNodePtr xmlTextReaderCurrentNode(xmlTextReaderPtr reader) { if (reader == ((void *)0)) return(((void *)0)); if (reader->curnode != ((void *)0)) return(reader->curnode); return(reader->node); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
less-633#cvt_prep#cvt_length.c
less-633
cvt.c
cvt_length
6
int cvt_length(int len, int ops) { if (utf_mode) len *= 4; return (len + 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": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#streebog_prep#nettle_streebog256_init.c
nettle-3.9.1
streebog.c
nettle_streebog256_init
8
void nettle_streebog256_init(struct streebog512_ctx *ctx) { memset(ctx->state, 1, sizeof(ctx->state)); memset(ctx->count, 0, sizeof(ctx->count)); memset(ctx->sigma, 0, sizeof(ctx->sigma)); ctx->index = 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": 3, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
cflow-1.7#symbol_prep#install_target.c
cflow-1.7
symbol.c
install_target
9
Symbol * install_target(char *name) { Symbol *sp = install(name, 0); sp->flag = symbol_target; if (!data_in_list(sp, target_symbol_list)) linked_list_append(&target_symbol_list, sp); return sp; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
gawk-5.2.2#io_prep#nextfile.c
gawk-5.2.2
io.c
nextfile
93
int nextfile(IOBUF **curfile, _Bool skipping) { static long i = 1; static _Bool files = 0; NODE *arg, *tmp; const char *fname; int fd = (-1); int errcode = 0; IOBUF *iop = *curfile; if (skipping) { errcode = 0; if (iop != ((void *)0)) { errcode = iop->errcode; (void) iop_close(iop); } *curfile = ((void *)0); return (errcode == 0); } if (iop != ((void *)0)) { if ((((iop)->flag & IOP_AT_EOF) != 0)) { ((void) (0)); (void) iop_close(iop); *curfile = ((void *)0); return 1; } else return 0; } for (; i < (!(((ARGC_node->sub.nodep.l.lptr))->flags & (MPFN|MPZN)) ? ((long) (ARGC_node->sub.nodep.l.lptr)->sub.val.nm.fltnum) : ((((ARGC_node->sub.nodep.l.lptr))->flags & MPFN) ? (mpfr_get_si((ARGC_node->sub.nodep.l.lptr)->sub.val.nm.mpnum, ROUND_MODE)) : (__gmpz_get_si((ARGC_node->sub.nodep.l.lptr)->sub.val.nm.mpi)))); i++) { tmp = make_number((double) i); (void) force_string_fmt((tmp), CONVFMT, CONVFMTidx); arg = in_array(ARGV_node, tmp); unref(tmp); if (arg == ((void *)0) || arg->sub.val.slen == 0) continue; arg = force_string_fmt((arg), CONVFMT, CONVFMTidx); if (! (do_flags & DO_TRADITIONAL)) { unref(ARGIND_node->sub.nodep.l.lptr); ARGIND_node->sub.nodep.l.lptr = make_number((double) i); } if (! arg_assign(arg->sub.val.sp, 0)) { files = 1; fname = arg->sub.val.sp; unref(FILENAME_node->sub.nodep.l.lptr); FILENAME_node->sub.nodep.l.lptr = dupnode(arg); if ((((FNR_node->sub.nodep.l.lptr)->flags & (MPZN|MPFN)) != 0)) __gmpz_set_ui(MFNR, 0); FNR = 0; (*__errno_location ()) = 0; fd = devopen(fname, ("r")); if (fd == (-1) && (*__errno_location ()) == 24) { close_one(); close_one(); fd = devopen(fname, ("r")); } errcode = (*__errno_location ()); if (! (do_flags & DO_TRADITIONAL)) update_ERRNO_int((*__errno_location ())); iop = iop_alloc(fd, fname, errcode); *curfile = iop_finish(iop); if (iop->public.fd == (-1)) iop->errcode = errcode; else if (iop->valid) iop->errcode = 0; if (! (do_flags & DO_TRADITIONAL) && iop->errcode != 0) update_ERRNO_int(iop->errcode); return ++i; } } if (files == 0) { files = 1; (*__errno_location ()) = 0; if (! (do_flags & DO_TRADITIONAL)) update_ERRNO_int((*__errno_location ())); unref(FILENAME_node->sub.nodep.l.lptr); FILENAME_node->sub.nodep.l.lptr = make_str_node(("-"), (1), 0); FILENAME_node->sub.nodep.l.lptr->flags |= USER_INPUT; fname = "-"; iop = iop_alloc(fileno(stdin), fname, 0); *curfile = iop_finish(iop); if (iop->public.fd == (-1)) { errcode = (*__errno_location ()); (*__errno_location ()) = 0; update_ERRNO_int((*__errno_location ())); (void) iop_close(iop); *curfile = ((void *)0); (*(set_loc("io.c", 523), r_fatal))(gettext("cannot open file `%s' for reading: %s"), fname, strerror(errcode)); } return ++i; } return -1; }
{ "array_type": 0, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 16, "memory_management": 0, "memory_operation": 0, "pointer_type": 4, "return_statement": 6, "struct_type": 0, "switch_statement": 0, "type_casting": 14, "union_type": 0, "while_loop": 0 }
ed-1.19#buffer_prep#path_max.c
ed-1.19
buffer.c
path_max
10
int path_max( const char * filename ) { long result; if( !filename ) filename = "/"; (*__errno_location ()) = 0; result = pathconf( filename, _PC_PATH_MAX ); if( result < 0 ) { if( (*__errno_location ()) ) result = 256; else result = 1024; } else if( result < 256 ) result = 256; return result; }
{ "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, "union_type": 0, "while_loop": 0 }
json-c#test_parse_prep#main.c
json-c
test_parse.c
main
14
int main(void) { if (0) mc_set_debug(1); static const char separator[] = "=================================="; test_basic_parse(); puts(separator); test_utf8_parse(); puts(separator); test_verbose_parse(); puts(separator); test_incremental_parse(); puts(separator); 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": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
gawk-5.2.2#stack_prep#stack_push.c
gawk-5.2.2
stack.c
stack_push
21
int stack_push(void *object) { void **new_stack; size_t new_size = 2 * size; if (stack == ((void *)0)) { stack = (void **) malloc(20 * sizeof(void *)); if (stack == ((void *)0)) return 0; size = 20; } else if (index + 1 >= size) { if (new_size < size) return 0; new_stack = realloc(stack, new_size * sizeof(void *)); if (new_stack == ((void *)0)) return 0; size = new_size; stack = new_stack; } stack[++index] = object; return 1; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 2, "memory_operation": 0, "pointer_type": 1, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 5, "union_type": 0, "while_loop": 0 }
transcoder-set#AREA_OF_A_HEXAGON_prep#cmpfunc.c
transcoder-set
AREA_OF_A_HEXAGON.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 }
grep-3.11#inttostr_prep#inttostr.c
grep-3.11
inttostr.c
inttostr
20
__attribute__ ((__warn_unused_result__)) char * inttostr (int i, char *buf) { char *p = buf + (((((sizeof (int) * 8) - (! ((__typeof__ (int)) 0 < (__typeof__ (int)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (int)) 0 < (__typeof__ (int)) -1))); *p = 0; if (i < 0) { do *--p = '0' - i % 10; while ((i /= 10) != 0); *--p = '-'; } else { do *--p = '0' + i % 10; while ((i /= 10) != 0); } return p; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 2 }
optipng-0.7.8#pngrutil_prep#png_read_IDAT_data.c
optipng-0.7.8
pngrutil.c
png_read_IDAT_data
80
void png_read_IDAT_data(png_structrp png_ptr, png_bytep output, png_alloc_size_t avail_out) { png_ptr->zstream.next_out = output; png_ptr->zstream.avail_out = 0; if (output == ((void *)0)) avail_out = 0; do { int ret; png_byte tmpbuf[1024]; if (png_ptr->zstream.avail_in == 0) { uInt avail_in; png_bytep buffer; while (png_ptr->idat_size == 0) { png_crc_finish(png_ptr, 0); png_ptr->idat_size = png_read_chunk_header(png_ptr); if (png_ptr->chunk_name != (((png_uint_32)(73) << (24)) | ((png_uint_32)(68) << (16)) | ((png_uint_32)(65) << (8)) | ((png_uint_32)(84) << (0)))) png_error(png_ptr, "Not enough image data"); } avail_in = png_ptr->IDAT_read_size; if (avail_in > png_ptr->idat_size) avail_in = (uInt)png_ptr->idat_size; buffer = png_read_buffer(png_ptr, avail_in, 0 ); png_crc_read(png_ptr, buffer, avail_in); png_ptr->idat_size -= avail_in; png_ptr->zstream.next_in = buffer; png_ptr->zstream.avail_in = avail_in; } if (output != ((void *)0)) { uInt out = ((uInt)-1); if (out > avail_out) out = (uInt)avail_out; avail_out -= out; png_ptr->zstream.avail_out = out; } else { png_ptr->zstream.next_out = tmpbuf; png_ptr->zstream.avail_out = (sizeof tmpbuf); } ret = png_zlib_inflate(png_ptr, 0); if (output != ((void *)0)) avail_out += png_ptr->zstream.avail_out; else avail_out += (sizeof tmpbuf) - png_ptr->zstream.avail_out; png_ptr->zstream.avail_out = 0; if (ret == 1) { png_ptr->zstream.next_out = ((void *)0); png_ptr->mode |= 0x08; png_ptr->flags |= 0x0008U; if (png_ptr->zstream.avail_in > 0 || png_ptr->idat_size > 0) png_chunk_benign_error(png_ptr, "Extra compressed data"); break; } if (ret != 0) { png_zstream_error(png_ptr, ret); if (output != ((void *)0)) png_chunk_error(png_ptr, png_ptr->zstream.msg); else { png_chunk_benign_error(png_ptr, png_ptr->zstream.msg); return; } } } while (avail_out > 0); if (avail_out > 0) { if (output != ((void *)0)) png_error(png_ptr, "Not enough image data"); else png_chunk_benign_error(png_ptr, "Too much image data"); } }
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 13, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 6, "union_type": 0, "while_loop": 2 }
libxml2#xmlschemas_prep#xmlSchemaSetValidErrors.c
libxml2
xmlschemas.c
xmlSchemaSetValidErrors
13
void xmlSchemaSetValidErrors(xmlSchemaValidCtxtPtr ctxt, xmlSchemaValidityErrorFunc err, xmlSchemaValidityWarningFunc warn, void *ctx) { if (ctxt == ((void *)0)) return; ctxt->error = err; ctxt->warning = warn; ctxt->errCtxt = ctx; if (ctxt->pctxt != ((void *)0)) xmlSchemaSetParserErrors(ctxt->pctxt, err, warn, ctx); }
{ "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": 2, "union_type": 0, "while_loop": 0 }
bzip2#bzlib_prep#BZ2_bzReadClose.c
bzip2
bzlib.c
BZ2_bzReadClose
12
void BZ2_bzReadClose ( int *bzerror, BZFILE *b ) { bzFile* bzf = (bzFile*)b; { if (bzerror != ((void *)0)) *bzerror = 0; if (bzf != ((void *)0)) bzf->lastErr = 0; }; if (bzf == ((void *)0)) { { if (bzerror != ((void *)0)) *bzerror = 0; if (bzf != ((void *)0)) bzf->lastErr = 0; }; return; }; if (bzf->writing) { { if (bzerror != ((void *)0)) *bzerror = (-1); if (bzf != ((void *)0)) bzf->lastErr = (-1); }; return; }; if (bzf->initialisedOk) (void)BZ2_bzDecompressEnd ( &(bzf->strm) ); free ( bzf ); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "memory_management": 1, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 5, "union_type": 0, "while_loop": 0 }
json.h#allow_hexadecimal_numbers_prep#json_skip_c_style_comments.c
json.h
allow_hexadecimal_numbers.c
json_skip_c_style_comments
40
int json_skip_c_style_comments(struct json_parse_state_s *state) { if ((state->offset + 2) > state->size) { return 0; } if ('/' == state->src[state->offset]) { if ('/' == state->src[state->offset + 1]) { state->offset++; state->offset++; while (state->offset < state->size) { switch (state->src[state->offset]) { default: state->offset++; break; case '\n': state->offset++; state->line_no++; state->line_offset = state->offset; return 1; } } return 1; } else if ('*' == state->src[state->offset + 1]) { state->offset++; state->offset++; while (state->offset + 1 < state->size) { if (('*' == state->src[state->offset]) && ('/' == state->src[state->offset + 1])) { state->offset += 2; return 1; } else if ('\n' == state->src[state->offset]) { state->line_no++; state->line_offset = state->offset; } state->offset++; } return 1; } } return 0; }
{ "array_type": 0, "break_continue_statement": 1, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 6, "struct_type": 1, "switch_statement": 1, "type_casting": 0, "union_type": 0, "while_loop": 2 }
transcoder-set#NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES_prep#f_filled.c
transcoder-set
NUMBER_WAYS_NODE_MAKE_LOOP_SIZE_K_UNDIRECTED_COMPLETE_CONNECTED_GRAPH_N_NODES.c
f_filled
1
int f_filled ( 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 }
transcoder-set#SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_1_prep#f_filled.c
transcoder-set
SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_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 }
dap-3.10#dapruns_prep#ecopy.c
dap-3.10
dapruns.c
ecopy
15
char *ecopy(char *e) { char *copy; if (e) { if (!(copy = malloc(strlen(e) + 1))) { perror("dap"); exit(1); } strcpy(copy, e); return copy; } return ((void *)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": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#BINARY_SEARCH_prep#f_gold.c
transcoder-set
BINARY_SEARCH.c
f_gold
9
int f_gold ( int arr [ ], int l, int r, int x ) { if ( r >= l ) { int mid = l + ( r - l ) / 2; if ( arr [ mid ] == x ) return mid; if ( arr [ mid ] > x ) return f_gold ( arr, l, mid - 1, x ); return f_gold ( arr, mid + 1, r, x ); } return - 1; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
gawk-5.2.2#regex_prep#re_match_2.c
gawk-5.2.2
regex.c
re_match_2
8
regoff_t re_match_2 (struct re_pattern_buffer *bufp, const char *string1, Idx length1, const char *string2, Idx length2, Idx start, struct re_registers *regs, Idx stop) { return re_search_2_stub (bufp, string1, length1, string2, length2, start, 0, regs, stop, 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, "union_type": 0, "while_loop": 0 }
less-633#edit_prep#edit_prev.c
less-633
edit.c
edit_prev
4
int edit_prev(int n) { return edit_istep(curr_ifile, n, -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 }
heman#aabb2_prep#kmAABB2DiameterY.c
heman
aabb2.c
kmAABB2DiameterY
3
float kmAABB2DiameterY(const kmAABB2* aabb) { return aabb->max.y - aabb->min.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_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X_prep#main.c
transcoder-set
COUNT_PAIRS_TWO_SORTED_ARRAYS_WHOSE_SUM_EQUAL_GIVEN_VALUE_X.c
main
38
int main(void) { int n_success = 0; int param0_0[] = {11,13,16,23,26,28,31,34,37,39,44,48,56,59,79,91,96,98}; int param0_1[] = {50,14,-98,14,90,36,66,44,10,-98,-24,-36,-32,-50}; int param0_2[] = {0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {88,14,29,87,86,58}; int param0_4[] = {-98,-92,-88,-86,-82,-76,-72,-66,-56,-48,-34,-28,-28,-26,-20,-18,-18,-16,-16,-12,-4,0,6,12,16,20,22,30,34,34,36,56,58,62,64,80,82,94}; int param0_5[] = {1,1,1,1,0,1,1,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,0,1,1,1,0,0}; int param0_6[] = {70,70,74}; int param0_7[] = {-20,-12,-50,76,24,64,-22,-4,-68}; int param0_8[] = {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,1}; int param0_9[] = {68,75,51,45,73,95,48,53,70,41,65,47,46,43,79,29,50}; 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_0[] = {1,1,9,14,17,23,26,31,33,36,53,60,71,75,76,84,87,88}; int param1_1[] = {34,-6,-66,0,-6,82,60,-98,-8,60,-2,4,22,76}; int param1_2[] = {0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}; int param1_3[] = {91,95,64,4,63,35}; int param1_4[] = {-94,-90,-88,-84,-82,-78,-76,-72,-70,-58,-58,-46,-42,-40,-40,-32,-22,-20,-18,-12,-8,-6,6,6,18,20,34,46,60,62,66,72,72,76,76,78,92,98}; int param1_5[] = {1,0,1,1,0,0,1,0,1,0,1,0,1,0,0,0,1,1,0,1,1,0,1,1,1,0,1,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,0,1,0,0}; int param1_6[] = {15,55,84}; int param1_7[] = {18,98,-88,86,72,-44,82,94,58}; int param1_8[] = {0,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}; int param1_9[] = {4,6,76,65,16,13,85,43,31,14,81,90,24,87,40,25,88}; int *param1[10] = {param1_0,param1_1,param1_2,param1_3,param1_4,param1_5,param1_6,param1_7,param1_8,param1_9}; int param2[] = {9,11,14,3,34,39,1,5,27,10}; int param3[] = {15,12,9,5,32,26,1,4,26,10}; int param4[] = {11,8,12,5,23,34,1,7,37,9}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i],param2[i],param3[i],param4[i]) == f_gold(param0[i],param1[i],param2[i],param3[i],param4[i])) { n_success+=1; } break; } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "array_type": 5, "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": 2, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
json-c#json_object_prep#json_object_new_double.c
json-c
json_object.c
json_object_new_double
9
struct json_object *json_object_new_double(double d) { struct json_object_double *jso = (struct json_object_double *)json_object_new( json_type_double, sizeof(struct json_object_double), &json_object_double_to_json_string); if (!jso) return ((void *)0); jso->base._to_json_string = &json_object_double_to_json_string_default; jso->c_double = d; return &jso->base; }
{ "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": 2, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
transcoder-set#FIBONACCI_MODULO_P_prep#main.c
transcoder-set
FIBONACCI_MODULO_P.c
main
14
int main(void) { int n_success = 0; int param0[] = {51,40,68,7,8,32,93,75,71,15}; 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 }
screen-4.9.0#tty_prep#SetMode.c
screen-4.9.0
tty.c
SetMode
32
void SetMode(struct mode *op, struct mode *np, int flow, int interrupt) { *np = *op; do {} while (0); np->tio.c_iflag &= ~0000400; np->tio.c_iflag &= ~0000040; np->tio.c_oflag &= ~0000004; np->tio.c_lflag &= ~(0000002 | 0000010); np->tio.c_lflag &= ~0100000; if (interrupt) np->tio.c_lflag |= 0000001; else np->tio.c_lflag &= ~0000001; np->tio.c_cc[6] = 1; np->tio.c_cc[5] = 0; if (!interrupt || !flow) np->tio.c_cc[0] = '\0'; np->tio.c_cc[1] = '\0'; if (flow == 0) { np->tio.c_cc[8] = '\0'; np->tio.c_cc[9] = '\0'; np->tio.c_iflag &= ~0002000; } np->tio.c_cc[13] = '\0'; np->tio.c_cc[15] = '\0'; np->tio.c_cc[10] = '\0'; np->tio.c_cc[2] = 0x7f; np->tio.c_cc[3] = '\0'; np->tio.c_cc[12] = '\0'; np->tio.c_cc[14] = '\0'; }
{ "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": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
pth-2.0.7#pth_fork_prep#pth_fork.c
pth-2.0.7
pth_fork.c
pth_fork
22
pid_t pth_fork(void) { pid_t pid; int i; for (i = pth_atfork_idx-1; i >= 0; i--) if (pth_atfork_list[i].prepare != ((void *)0)) pth_atfork_list[i].prepare(pth_atfork_list[i].arg); if ((pid = fork()) == -1) return (0); if (pid != 0) { for (i = 0; i <= pth_atfork_idx-1; i++) if (pth_atfork_list[i].parent != ((void *)0)) pth_atfork_list[i].parent(pth_atfork_list[i].arg); } else { __pth_scheduler_drop(); for (i = 0; i <= pth_atfork_idx-1; i++) if (pth_atfork_list[i].child != ((void *)0)) pth_atfork_list[i].child(pth_atfork_list[i].arg); } return pid; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 3, "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, "union_type": 0, "while_loop": 0 }
transcoder-set#NUMBER_N_DIGITS_NON_DECREASING_INTEGERS_prep#sort.c
transcoder-set
NUMBER_N_DIGITS_NON_DECREASING_INTEGERS.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_xmlThrDefSaveNoEmptyTags.c
libxml2
libxml2-py.c
libxml_xmlThrDefSaveNoEmptyTags
13
PyObject * libxml_xmlThrDefSaveNoEmptyTags(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int v; if (libxml_deprecationWarning("xmlThrDefSaveNoEmptyTags") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlThrDefSaveNoEmptyTags", &v)) return(((void *)0)); c_retval = xmlThrDefSaveNoEmptyTags(v); 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": 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_CHECK_PLUS_PERFECT_NUMBER_prep#f_gold.c
transcoder-set
PROGRAM_CHECK_PLUS_PERFECT_NUMBER.c
f_gold
15
_Bool f_gold ( int x ) { int temp = x; int n = 0; while ( x != 0 ) { x /= 10; n ++; } x = temp; int sum = 0; while ( x != 0 ) { sum += pow ( x % 10, n ); x /= 10; } return ( sum == temp ); }
{ "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": 2 }
tar-1.34#xheader_prep#xheader_string_add.c
tar-1.34
xheader.c
xheader_string_add
9
void xheader_string_add (struct xheader *xhdr, char const *s) { if (xhdr->buffer) return; xheader_init (xhdr); xhdr->string_length += strlen (s); x_obstack_grow (xhdr, s, strlen (s)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
uucp-1.07#uux_prep#main.c
uucp-1.07
uux.c
main
890
int main (argc, argv) int argc; char **argv; { const char *zrequestor = ((void *)0); boolean fretstdin = (0); boolean fcopy = (0); boolean fdontcopy = (0); const char *zconfig = ((void *)0); boolean fjobid = (0); boolean flink = (0); boolean fno_ack = (0); boolean fread_stdin = (0); boolean fuucico = (1); const char *zstatus_file = ((void *)0); boolean fexpand = (1); boolean ferror_ack = (0); int iopt; pointer puuconf; int iuuconf; const char *zlocalname; int i; size_t clen; char *zargs; char *zarg; char *zcmd; const char *zsys; char *zexclam; boolean fgetcwd; const char *zuser; char *zforward; char **pzargs; int calloc_args; int cargs; const char *zinput_from; const char *zinput_to; const char *zinput_temp; boolean finputcopied; char *zcall_system; boolean fcall_any; struct uuconf_system slocalsys; boolean fneedshell; char *zfullcmd; boolean fpoll; char aboptions[10]; zProgram = argv[0]; ulog_fatal_fn (uxfatal); gnu_opterr = 0; while (1) { while (getopt_long (argc, argv, "+a:bcCg:I:jlnprs:Wvx:z", asXlongopts, (int *) ((void *)0)) != (-1)) ; if (gnu_optind >= argc || strcmp (argv[gnu_optind], "-") != 0) break; argv[gnu_optind] = zbufcpy ("-p"); gnu_optind = 0; } gnu_opterr = 1; gnu_optind = 0; while ((iopt = getopt_long (argc, argv, "+a:bcCg:I:jlnprs:Wvx:z", asXlongopts, (int *) ((void *)0))) != (-1)) { switch (iopt) { case 'a': zrequestor = gnu_optarg; break; case 'b': fretstdin = (1); break; case 'c': fcopy = (0); fdontcopy = (1); break; case 'C': fcopy = (1); break; case 'I': if (fsysdep_other_config (gnu_optarg)) zconfig = gnu_optarg; break; case 'j': fjobid = (1); break; case 'g': bXgrade = gnu_optarg[0]; break; case 'l': flink = (1); break; case 'n': fno_ack = (1); break; case 'p': fread_stdin = (1); break; case 'r': fuucico = (0); break; case 's': zstatus_file = gnu_optarg; break; case 'W': fexpand = (0); break; case 'x': iDebug |= idebug_parse (gnu_optarg); break; case 'z': ferror_ack = (1); break; case 2: if (*gnu_optarg == 't' || *gnu_optarg == 'T' || *gnu_optarg == 'y' || *gnu_optarg == 'Y' || *gnu_optarg == 'e' || *gnu_optarg == 'E') { ferror_ack = (1); fno_ack = (0); } else if (*gnu_optarg == 'f' || *gnu_optarg == 'F' || *gnu_optarg == 'n' || *gnu_optarg == 'N') { ferror_ack = (0); fno_ack = (1); } break; case 'v': printf ("uux (Taylor UUCP) %s\n", "1.07"); printf ("Copyright (C) 1991, 92, 93, 94, 1995, 2002 Ian Lance Taylor\n"); printf ("This program is free software; you may redistribute it under the terms of\n"); printf ("the GNU General Public LIcense. This program has ABSOLUTELY NO WARRANTY.\n"); exit (0); case 1: uxhelp (); exit (0); case 0: break; default: uxusage (); break; } } if (! (((*__ctype_b_loc ())[(int) ((((unsigned char) (bXgrade))))] & (unsigned short int) _ISalnum)) || ((bXgrade < '0' || bXgrade > '9') && (bXgrade < 'a' || bXgrade > 'z') && (bXgrade < 'A' || bXgrade > 'Z'))) { ulog (LOG_ERROR, "Ignoring illegal grade"); bXgrade = ('N'); } if ((zrequestor != ((void *)0) && zrequestor[strcspn (zrequestor, " \t\n")] != '\0') || (zstatus_file != ((void *)0) && zstatus_file[strcspn (zstatus_file, " \t\n")] != '\0')) fXquote = (1); if (gnu_optind == argc) uxusage (); iuuconf = uuconf_init (&puuconf, (const char *) ((void *)0), zconfig); if (iuuconf != (0)) ulog_uuconf (LOG_FATAL, puuconf, iuuconf); { const char *zdebug; iuuconf = uuconf_debuglevel (puuconf, &zdebug); if (iuuconf != (0)) ulog_uuconf (LOG_FATAL, puuconf, iuuconf); if (zdebug != ((void *)0)) iDebug |= idebug_parse (zdebug); } clen = 1; for (i = gnu_optind; i < argc; i++) clen += strlen (argv[i]) + 1; zargs = zbufalc (clen); *zargs = '\0'; for (i = gnu_optind; i < argc; i++) { strcat (zargs, argv[i]); strcat (zargs, " "); } clen = strcspn (zargs, ";&*|<> \t"); zcmd = zbufalc (clen + 1); strncpy (zcmd, zargs, clen); zcmd[clen] = '\0'; zargs += clen; calloc_args = 10; pzargs = (char **) xmalloc (calloc_args * sizeof (char *)); cargs = 0; for (zarg = strtok (zargs, " \t"); zarg != ((void *)0); zarg = strtok ((char *) ((void *)0), " \t")) { while (*zarg != '\0') { if (cargs + 1 >= calloc_args) { calloc_args += 10; pzargs = (char **) xrealloc ((pointer) pzargs, calloc_args * sizeof (char *)); } if (*zarg == '(') clen = strlen (zarg); else clen = strcspn (zarg, ";&*|<> \t"); if (clen > 0) { pzargs[cargs] = zbufalc (clen + 1); memcpy (pzargs[cargs], zarg, clen); pzargs[cargs][clen] = '\0'; ++cargs; zarg += clen; } if (*zarg != '\0') { clen = strspn (zarg, ";&*| \t"); if (clen == 0) clen = 1; pzargs[cargs] = zbufalc (clen + 1); memcpy (pzargs[cargs], zarg, clen); pzargs[cargs][clen] = '\0'; ++cargs; zarg += clen; } } } fgetcwd = (0); for (i = 0; i < cargs; i++) { if (pzargs[i][0] == '(') continue; zexclam = strrchr (pzargs[i], '!'); if (zexclam != ((void *)0) && fsysdep_needs_cwd (zexclam + 1)) { fgetcwd = (1); break; } if ((pzargs[i][0] == '<' || pzargs[i][0] == '>') && i + 1 < cargs && strchr (pzargs[i + 1], '!') == ((void *)0) && fsysdep_needs_cwd (pzargs[i + 1])) { fgetcwd = (1); break; } } usysdep_signal (2); usysdep_signal (1); usysdep_signal (3); usysdep_signal (15); usysdep_signal (13); usysdep_initialize (puuconf, (04) | (fgetcwd ? (01) : 0)); zuser = zsysdep_login_name (); iuuconf = uuconf_localname (puuconf, &zlocalname); if (iuuconf == (1)) { zlocalname = zsysdep_localname (); if (zlocalname == ((void *)0)) exit (78); } else if (iuuconf != (0)) ulog_uuconf (LOG_FATAL, puuconf, iuuconf); iuuconf = uuconf_system_info (puuconf, zlocalname, &slocalsys); if (iuuconf != (0)) { if (iuuconf != (1)) ulog_uuconf (LOG_FATAL, puuconf, iuuconf); iuuconf = uuconf_system_local (puuconf, &slocalsys); if (iuuconf != (0)) ulog_uuconf (LOG_FATAL, puuconf, iuuconf); slocalsys.uuconf_zname = (char *) zlocalname; } zcmd = zremove_local_sys (&slocalsys, zcmd); zexclam = strchr (zcmd, '!'); if (zexclam == ((void *)0)) { zsys = zlocalname; fXxqtlocal = (1); zforward = ((void *)0); } else { *zexclam = '\0'; zsys = zcmd; zcmd = zexclam + 1; fXxqtlocal = (0); zexclam = strrchr (zcmd, '!'); if (zexclam == ((void *)0)) zforward = ((void *)0); else { clen = zexclam - zcmd; zforward = zbufalc (clen + 1); memcpy (zforward, zcmd, clen); zforward[clen] = '\0'; zcmd = zexclam + 1; } } if (fXxqtlocal) sXxqtsys = slocalsys; else { iuuconf = uuconf_system_info (puuconf, zsys, &sXxqtsys); if (iuuconf != (0)) { if (iuuconf != (1)) ulog_uuconf (LOG_FATAL, puuconf, iuuconf); if (! funknown_system (puuconf, zsys, &sXxqtsys)) ulog (LOG_FATAL, "%s: System not found", zsys); } } zXxqtloc = sXxqtsys.uuconf_zlocalname; if (zXxqtloc == ((void *)0)) zXxqtloc = zlocalname; zinput_from = ((void *)0); zinput_to = ((void *)0); zinput_temp = ((void *)0); finputcopied = (0); zcall_system = ((void *)0); fcall_any = (0); for (i = 0; i < cargs; i++) { const char *zsystem; char *zfile; char *zforw; boolean finput, foutput; boolean flocal, fonxqt; if (pzargs[i][0] == '(') { clen = strlen (pzargs[i]); if (pzargs[i][clen - 1] != ')') ulog (LOG_ERROR, "Mismatched parentheses"); else pzargs[i][clen - 1] = '\0'; ++pzargs[i]; continue; } finput = (0); foutput = (0); if (i + 1 < cargs) { if (pzargs[i][0] == '<') finput = (1); else if (pzargs[i][0] == '>') foutput = (1); if (finput || foutput) { pzargs[i] = ((void *)0); i++; } } zexclam = strchr (pzargs[i], '!'); if (zexclam == ((void *)0) && ! finput && ! foutput) continue; if (zexclam != ((void *)0)) { pzargs[i] = zremove_local_sys (&slocalsys, pzargs[i]); zexclam = strchr (pzargs[i], '!'); } if (zexclam == ((void *)0)) { zsystem = zlocalname; zfile = pzargs[i]; flocal = (1); zforw = ((void *)0); } else { *zexclam = '\0'; zsystem = pzargs[i]; zfile = zexclam + 1; flocal = (0); zexclam = strrchr (zfile, '!'); if (zexclam == ((void *)0)) zforw = ((void *)0); else { *zexclam = '\0'; zforw = zfile; zfile = zexclam + 1; } } if (flocal) fonxqt = fXxqtlocal; else if (fXxqtlocal) fonxqt = (0); else if (zforward == ((void *)0) ? zforw != ((void *)0) : zforw == ((void *)0)) fonxqt = (0); else if (zforward != ((void *)0) && zforw != ((void *)0) && strcmp (zforward, zforw) != 0) fonxqt = (0); else if (strcmp (zsystem, sXxqtsys.uuconf_zname) == 0) fonxqt = (1); else if (sXxqtsys.uuconf_pzalias == ((void *)0)) fonxqt = (0); else { char **pzal; fonxqt = (0); for (pzal = sXxqtsys.uuconf_pzalias; *pzal != ((void *)0); pzal++) { if (strcmp (zsystem, *pzal) == 0) { fonxqt = (1); break; } } } if (flocal) zfile = zsysdep_local_file_cwd (zfile, sXxqtsys.uuconf_zpubdir, (boolean *) ((void *)0)); else if (fexpand) zfile = zsysdep_add_cwd (zfile); if (zfile == ((void *)0)) uxabort (71); if (foutput) { if (flocal) { if (! fin_directory_list (zfile, sXxqtsys.uuconf_pzremote_receive, sXxqtsys.uuconf_zpubdir, (1), (0), (const char *) ((void *)0))) ulog (LOG_FATAL, "Not permitted to create %s", zfile); } if (zforward != ((void *)0) || zforw != ((void *)0)) ulog (LOG_FATAL, "May not forward standard output"); if (fonxqt) uxadd_xqt_line ('O', zfile, (const char *) ((void *)0)); else if (flocal) uxadd_xqt_line ('O', zfile, zXxqtloc); else uxadd_xqt_line ('O', zfile, zsystem); pzargs[i] = ((void *)0); continue; } if (finput) { if (fread_stdin) ulog (LOG_FATAL, "Standard input specified twice"); pzargs[i] = ((void *)0); } if (flocal) { char *zuse; char *zdata; char abtname[(15)]; char abdname[(15)]; if (! fsysdep_access (zfile)) uxabort (66); zdata = zsysdep_data_file_name (&sXxqtsys, zXxqtloc, bXgrade, (0), abtname, abdname, (char *) ((void *)0)); if (zdata == ((void *)0)) uxabort (71); if (fcopy || flink || fXxqtlocal) { boolean fdid; uxrecord_file (zdata); fdid = (0); if (flink) { boolean fworked; if (! fsysdep_link (zfile, zdata, &fworked)) uxabort (71); if (fworked) fdid = (1); else if (fdontcopy) ulog (LOG_FATAL, "%s: Can't link to spool directory", zfile); } if (! fdid) { openfile_t efile; efile = esysdep_user_fopen (zfile, (1), (1)); if (! ((efile) != ((void *)0))) uxabort (66); if (! fcopy_open_file (efile, zdata, (0), (1), (1))) uxabort (73); (void) (fclose (efile) == 0); } zuse = abtname; } else { ubuffree (zdata); if (! fsysdep_daemon_access (zfile)) uxabort (66); if (! fin_directory_list (zfile, sXxqtsys.uuconf_pzlocal_send, sXxqtsys.uuconf_zpubdir, (1), (1), zuser)) ulog (LOG_FATAL, "Not permitted to send from %s", zfile); zuse = zfile; } if (fXxqtlocal) { if (finput) uxadd_xqt_line ('I', zuse, (char *) ((void *)0)); else pzargs[i] = zuse; } else { finputcopied = fcopy || flink; if (finput) { zinput_from = zuse; zinput_to = zbufcpy (abdname); zinput_temp = zbufcpy (abtname); } else { char *zbase; uxadd_send_file (zuse, abdname, finputcopied ? "C" : "c", abtname, zforward); zbase = zsysdep_base_name (zfile); if (zbase == ((void *)0)) uxabort (71); uxadd_xqt_line ('F', abdname, zbase); pzargs[i] = zbase; } } } else if (fonxqt) { if (finput) uxadd_xqt_line ('I', zfile, (const char *) ((void *)0)); else pzargs[i] = zfile; } else { struct uuconf_system sfromsys; char abtname[(15)]; struct scmd s; char *zjobid; iuuconf = uuconf_system_info (puuconf, zsystem, &sfromsys); if (iuuconf != (0)) { if (iuuconf != (1)) ulog_uuconf (LOG_FATAL, puuconf, iuuconf); if (! funknown_system (puuconf, zsystem, &sfromsys)) ulog (LOG_FATAL, "%s: System not found", zsystem); } if (fonxqt) { if (finput) uxadd_xqt_line ('I', zfile, (const char *) ((void *)0)); else pzargs[i] = zfile; } else { char *zdata; boolean ftemp; if (! sfromsys.uuconf_fcall_transfer && ! sfromsys.uuconf_fcalled_transfer) ulog (LOG_FATAL, "Not permitted to transfer files to or from %s", sfromsys.uuconf_zname); if (zforw != ((void *)0)) { ulog (LOG_FATAL, "File forwarding not supported"); } zdata = zsysdep_data_file_name (&slocalsys, zXxqtloc, bXgrade, (0), abtname, (char *) ((void *)0), (char *) ((void *)0)); if (zdata == ((void *)0)) uxabort (71); ubuffree (zdata); s.bcmd = 'R'; s.bgrade = bXgrade; s.pseq = ((void *)0); s.zfrom = zfile; s.zto = zbufcpy (abtname); s.zuser = zuser; s.zoptions = "9"; s.ztemp = ""; s.imode = 0600; s.znotify = ""; s.cbytes = -1; s.zcmd = ((void *)0); s.ipos = 0; zjobid = zsysdep_spool_commands (&sfromsys, bXgrade, 1, &s, &ftemp); if (zjobid == ((void *)0)) uxabort (ftemp ? 75 : 65); if (fjobid) printf ("%s\n", zjobid); ubuffree (zjobid); if (fcall_any) { ubuffree (zcall_system); zcall_system = ((void *)0); } else { fcall_any = (1); zcall_system = zbufcpy (sfromsys.uuconf_zname); } if (fXxqtlocal) { if (finput) { uxadd_xqt_line ('F', abtname, (char *) ((void *)0)); uxadd_xqt_line ('I', abtname, (char *) ((void *)0)); } else { char *zbase; zbase = zsysdep_base_name (zfile); if (zbase == ((void *)0)) uxabort (71); uxadd_xqt_line ('F', abtname, zbase); pzargs[i] = zbase; } } else { char abxtname[(15)]; char *zbase; char *zxqt; FILE *e; zdata = zsysdep_data_file_name (&sXxqtsys, zXxqtloc, bXgrade, (1), abxtname, (char *) ((void *)0), (char *) ((void *)0)); if (zdata == ((void *)0)) uxabort (71); ubuffree (zdata); zbase = zsysdep_base_name (zfile); if (zbase == ((void *)0)) uxabort (71); zxqt = zsysdep_xqt_file_name (); if (zxqt == ((void *)0)) uxabort (71); e = esysdep_fopen (zxqt, (0), (0), (1)); if (e == ((void *)0)) uxabort (71); uxrecord_file (zxqt); fprintf (e, "U %s %s\n", zsysdep_login_name (), zlocalname); fprintf (e, "F %s %s\n", abtname, zbase); fprintf (e, "C uucp -C -W -d -g %c %s %s!", bXgrade, zbase, sXxqtsys.uuconf_zname); if (zforward != ((void *)0)) fprintf (e, "%s!", zforward); fprintf (e, "%s\n", abxtname); if (! (fsysdep_sync (e, zxqt))) ulog (LOG_FATAL, "fsync failed"); if (fclose (e) != 0) ulog (LOG_FATAL, "fclose: %s", strerror ((*__errno_location ()))); if (finput) { uxadd_xqt_line ('F', abxtname, (char *) ((void *)0)); uxadd_xqt_line ('I', abxtname, (char *) ((void *)0)); ubuffree (zbase); } else { uxadd_xqt_line ('F', abxtname, zbase); pzargs[i] = zbase; } } } (void) uuconf_system_free (puuconf, &sfromsys); } } if (fread_stdin) { char *zdata; char abtname[(15)]; char abdname[(15)]; FILE *e; zdata = zsysdep_data_file_name (&sXxqtsys, zXxqtloc, bXgrade, (0), abtname, abdname, (char *) ((void *)0)); if (zdata == ((void *)0)) uxabort (71); e = esysdep_fopen (zdata, (0), (0), (1)); if (e == ((void *)0)) uxabort (71); eXclose = e; uxrecord_file (zdata); uxcopy_stdin (e); if (! (fsysdep_sync (e, zdata))) ulog (LOG_FATAL, "fsync failed"); eXclose = ((void *)0); if (fclose (e) != 0) ulog (LOG_FATAL, "fclose: %s", strerror ((*__errno_location ()))); if (fXxqtlocal) uxadd_xqt_line ('I', abtname, (const char *) ((void *)0)); else { zinput_from = zbufcpy (abtname); zinput_to = zbufcpy (abdname); zinput_temp = zinput_from; finputcopied = (1); } } if (fretstdin) uxadd_xqt_line ('B', (const char *) ((void *)0), (const char *) ((void *)0)); if (zstatus_file != ((void *)0)) uxadd_xqt_line ('M', zstatus_file, (const char *) ((void *)0)); fneedshell = (0); if (zcmd[strcspn (zcmd, "\"'`*?[;&()|<>\\$")] != '\0') fneedshell = (1); clen = strlen (zcmd) + 1; for (i = 0; i < cargs; i++) { if (pzargs[i] != ((void *)0)) { clen += strlen (pzargs[i]) + 1; if (pzargs[i][strcspn (pzargs[i], "\"'`*?[;&()|<>\\$")] != '\0') fneedshell = (1); } } zfullcmd = zbufalc (clen); strcpy (zfullcmd, zcmd); for (i = 0; i < cargs; i++) { if (pzargs[i] != ((void *)0)) { strcat (zfullcmd, " "); strcat (zfullcmd, pzargs[i]); } } fpoll = (0); if (eXxqt_file == ((void *)0) && zinput_from != ((void *)0) && zforward == ((void *)0)) { struct scmd s; char *zoptions; s.bcmd = 'E'; s.bgrade = bXgrade; s.pseq = ((void *)0); s.zuser = zuser; s.zfrom = zinput_from; s.zto = zinput_to; s.zoptions = aboptions; zoptions = aboptions; *zoptions++ = finputcopied ? 'C' : 'c'; if (fno_ack) *zoptions++ = 'N'; if (ferror_ack) *zoptions++ = 'Z'; if (zrequestor != ((void *)0)) *zoptions++ = 'R'; if (fneedshell) *zoptions++ = 'e'; *zoptions = '\0'; s.ztemp = zinput_temp; s.imode = 0666; if (zrequestor == ((void *)0)) zrequestor = "\"\""; s.znotify = zrequestor; s.cbytes = -1; s.zcmd = zfullcmd; s.ipos = 0; ++cXcmds; pasXcmds = (struct scmd *) xrealloc ((pointer) pasXcmds, cXcmds * sizeof (struct scmd)); pasXcmds[cXcmds - 1] = s; uxadd_name (zinput_from); } else if (*zfullcmd == '\0' && eXxqt_file == ((void *)0) && zinput_from == ((void *)0) && cXcmds == 0) { fpoll = (1); } else { uxadd_xqt_line ('U', zuser, zXxqtloc); if (zinput_from != ((void *)0)) { uxadd_xqt_line ('F', zinput_to, (char *) ((void *)0)); uxadd_xqt_line ('I', zinput_to, (char *) ((void *)0)); uxadd_send_file (zinput_from, zinput_to, finputcopied ? "C" : "c", zinput_temp, zforward); } if (fno_ack) uxadd_xqt_line ('N', (const char *) ((void *)0), (const char *) ((void *)0)); if (ferror_ack) uxadd_xqt_line ('Z', (const char *) ((void *)0), (const char *) ((void *)0)); if (zrequestor != ((void *)0)) uxadd_xqt_line ('R', zrequestor, (const char *) ((void *)0)); if (fneedshell) uxadd_xqt_line ('e', (const char *) ((void *)0), (const char *) ((void *)0)); uxadd_xqt_line ('C', zfullcmd, (const char *) ((void *)0)); if (! (fsysdep_sync (eXxqt_file, "execution file"))) ulog (LOG_FATAL, "fsync failed"); if (fclose (eXxqt_file) != 0) ulog (LOG_FATAL, "fclose: %s", strerror ((*__errno_location ()))); eXxqt_file = ((void *)0); if (! fXxqtlocal) uxadd_send_file (abXxqt_tname, abXxqt_xname, "C", abXxqt_tname, zforward); } if ((afSignal[(0)] || afSignal[(1)] || afSignal[(2)] || afSignal[(3)] || afSignal[(4)])) uxabort (71); if (cXcmds > 0 || fpoll) { char *zjobid; boolean ftemp; if (! fpoll && ! sXxqtsys.uuconf_fcall_transfer && ! sXxqtsys.uuconf_fcalled_transfer) ulog (LOG_FATAL, "Not permitted to transfer files to or from %s", sXxqtsys.uuconf_zname); zjobid = zsysdep_spool_commands (&sXxqtsys, bXgrade, cXcmds, pasXcmds, &ftemp); if (zjobid == ((void *)0)) { ulog_close (); exit (ftemp ? 75 : 65); } if (fjobid) printf ("%s\n", zjobid); ubuffree (zjobid); if (fcall_any) { ubuffree (zcall_system); zcall_system = ((void *)0); } else { fcall_any = (1); zcall_system = zbufcpy (sXxqtsys.uuconf_zname); } } if (! fpoll) { ulog_to_file (puuconf, (1)); ulog_system (sXxqtsys.uuconf_zname); ulog_user (zuser); if (zXnames == ((void *)0)) ulog (LOG_NORMAL, "Queuing %s", zfullcmd); else ulog (LOG_NORMAL, "Queuing %s (%s)", zfullcmd, zXnames); ulog_close (); } if (! fuucico || (zcall_system == ((void *)0) && ! fcall_any)) { if (fXxqtlocal && fuucico) { char *zconfigarg; if (zconfig == ((void *)0)) zconfigarg = ((void *)0); else { zconfigarg = zbufalc (sizeof "-I" + strlen (zconfig)); sprintf (zconfigarg, "-I%s", zconfig); } (void) fsysdep_run ((0), "uuxqt", zconfigarg, (const char *) ((void *)0)); } } else { const char *zcicoarg; char *zconfigarg; if (zcall_system == ((void *)0)) zcicoarg = "-r1"; else { char *z; z = zbufalc (sizeof "-Cs" + strlen (zcall_system)); sprintf (z, "-Cs%s", zcall_system); zcicoarg = z; } if (zconfig == ((void *)0)) zconfigarg = ((void *)0); else { zconfigarg = zbufalc (sizeof "-I" + strlen (zconfig)); sprintf (zconfigarg, "-I%s", zconfig); } (void) fsysdep_run ((0), "uucico", zcicoarg, zconfigarg); } exit (0); return 0; }
{ "array_type": 6, "break_continue_statement": 26, "enum_type": 0, "for_loop": 8, "function_pointer": 0, "goto_statement": 0, "if_statement": 140, "memory_management": 0, "memory_operation": 3, "pointer_type": 32, "return_statement": 1, "struct_type": 0, "switch_statement": 1, "type_casting": 115, "union_type": 0, "while_loop": 4 }
cflow-1.7#depmap_prep#depmap_set.c
cflow-1.7
depmap.c
depmap_set
6
void depmap_set(cflow_depmap_t dmap, size_t row, size_t col) { unsigned *rptr = depmap_rowptr(dmap, row); ((rptr)[(col)/(sizeof(unsigned)*8)] |= (1<<((col) % (sizeof(unsigned)*8)))); }
{ "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": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
hello-2.12.1#strnlen1_prep#strnlen1.c
hello-2.12.1
strnlen1.c
strnlen1
9
size_t strnlen1 (const char *string, size_t maxlen) { const char *end = (const char *) memchr (string, '\0', maxlen); if (end != ((void *)0)) return end - string + 1; else return maxlen; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N_prep#min.c
transcoder-set
SMALLEST_POWER_OF_2_GREATER_THAN_OR_EQUAL_TO_N.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 }
dap-3.10#dapruns_prep#dappprun.c
dap-3.10
dapruns.c
dappprun
30
int dappprun(int argc, char **argv) { char **arg; int a; int status; pid_t pid; if (!(arg = (char **) malloc(sizeof(char *) * (argc + 1)))) { perror("dap"); exit(1); } arg[0] = dappp; for (a = 1; a < argc && strcmp(argv[a], "-a") && strcmp(argv[a], "--args"); a++) arg[a] = argv[a]; arg[a] = ((void *)0); if (!(pid = fork())) { fputs("Preprocessing...\n", stderr); execv(arg[0], arg); perror(arg[0]); exit(1); } else if (pid == -1) { perror("dap"); exit(1); } waitpid(pid, &status, 0); return status; }
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
transcoder-set#MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING_1_prep#cmpfunc.c
transcoder-set
MAXIMUM_CONSECUTIVE_REPEATING_CHARACTER_STRING_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 }
transcoder-set#NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR_prep#max.c
transcoder-set
NUMBER_OF_TRIANGLES_IN_A_PLANE_IF_NO_MORE_THAN_TWO_POINTS_ARE_COLLINEAR.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 }
libosip2-5.3.1#osip_authentication_info_prep#osip_authentication_info_clone.c
libosip2-5.3.1
osip_authentication_info.c
osip_authentication_info_clone
34
int osip_authentication_info_clone(const osip_authentication_info_t *ainfo, osip_authentication_info_t **dest) { int i; osip_authentication_info_t *wa; *dest = ((void *)0); if (ainfo == ((void *)0)) return -2; i = osip_authentication_info_init(&wa); if (i != 0) return i; if (ainfo->auth_type != ((void *)0)) wa->auth_type = osip_strdup(ainfo->auth_type); if (ainfo->nextnonce != ((void *)0)) wa->nextnonce = osip_strdup(ainfo->nextnonce); if (ainfo->cnonce != ((void *)0)) wa->cnonce = osip_strdup(ainfo->cnonce); if (ainfo->rspauth != ((void *)0)) wa->rspauth = osip_strdup(ainfo->rspauth); if (ainfo->nonce_count != ((void *)0)) wa->nonce_count = osip_strdup(ainfo->nonce_count); if (ainfo->qop_options != ((void *)0)) wa->qop_options = osip_strdup(ainfo->qop_options); if (ainfo->snum != ((void *)0)) wa->snum = osip_strdup(ainfo->snum); if (ainfo->srand != ((void *)0)) wa->srand = osip_strdup(ainfo->srand); if (ainfo->targetname != ((void *)0)) wa->targetname = osip_strdup(ainfo->targetname); if (ainfo->realm != ((void *)0)) wa->realm = osip_strdup(ainfo->realm); if (ainfo->opaque != ((void *)0)) wa->opaque = osip_strdup(ainfo->opaque); *dest = wa; return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 13, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 13, "union_type": 0, "while_loop": 0 }
mcsim-6.2.0#simo_prep#WriteMCHeader.c
mcsim-6.2.0
simo.c
WriteMCHeader
18
void WriteMCHeader (PFILE pfileOut, PANALYSIS panal) { long i, j, k; PMONTECARLO pmc = &panal->mc; OUTSPEC *pos; fprintf (pfileOut, "Iter"); for (i = 0; i < pmc->nParms; i++) fprintf (pfileOut, "\t%s", GetVarName(pmc->rgpMCVar[i]->hvar)); for (i = 0; i < panal->expGlobal.iExp; i++) { pos = &panal->rgpExps[i]->os; for (j = 0; j < pos->nOutputs; j++) { for (k = 0; k < pos->pcOutputTimes[j]; k++) fprintf (pfileOut, "\t%s_%ld.%ld", pos->pszOutputNames[j], i+1, k+1); } } fprintf (pfileOut, "\n"); fflush (pfileOut); }
{ "array_type": 4, "break_continue_statement": 0, "enum_type": 0, "for_loop": 4, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "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 }
transcoder-set#HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP_1_prep#len.c
transcoder-set
HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP_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#COMPUTE_N_UNDER_MODULO_P_prep#cmpfunc.c
transcoder-set
COMPUTE_N_UNDER_MODULO_P.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 }
transcoder-set#CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_1_prep#f_filled.c
transcoder-set
CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_1.c
f_filled
1
_Bool f_filled ( int x, int 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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tmux#xchecks_prep#__c2rust_hash___mbstate_t_struct.c
tmux
xchecks.c
__c2rust_hash___mbstate_t_struct
3
uint64_t __c2rust_hash___mbstate_t_struct(void *l, size_t depth) { return 0xABCD0006; }
{ "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 }
tmux#window_prep#windows_RB_NEXT.c
tmux
window.c
windows_RB_NEXT
1
struct window * windows_RB_NEXT(struct window *elm) { if ((elm)->entry.rbe_right) { elm = (elm)->entry.rbe_right; while ((elm)->entry.rbe_left) elm = (elm)->entry.rbe_left; } else { if ((elm)->entry.rbe_parent && (elm == ((elm)->entry.rbe_parent)->entry.rbe_left)) elm = (elm)->entry.rbe_parent; else { while ((elm)->entry.rbe_parent && (elm == ((elm)->entry.rbe_parent)->entry.rbe_right)) elm = (elm)->entry.rbe_parent; elm = (elm)->entry.rbe_parent; } } return (elm); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
mtools-4.0.43#scsi_prep#scsi_cmd.c
mtools-4.0.43
scsi.c
scsi_cmd
19
int scsi_cmd(int fd, unsigned char *cdb, uint8_t cmdlen, scsi_io_mode_t mode, void *data, uint32_t len, void *extra_data __attribute__ ((unused))) { struct sg_io_hdr my_scsi_cmd; memset(&my_scsi_cmd,0,sizeof(my_scsi_cmd)); my_scsi_cmd.interface_id = 'S'; my_scsi_cmd.dxfer_direction = (mode == SCSI_IO_READ)?(-3):(-2); my_scsi_cmd.cmd_len = cmdlen; my_scsi_cmd.mx_sb_len = 0; my_scsi_cmd.dxfer_len = len; my_scsi_cmd.dxferp = data; my_scsi_cmd.cmdp = cdb; my_scsi_cmd.timeout = ~0u; if (ioctl(fd, 0x2285,&my_scsi_cmd) < 0) { perror("scsi_io"); return -1; } return my_scsi_cmd.status & 0x3e; }
{ "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": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#HARDY_RAMANUJAN_THEOREM_prep#f_filled.c
transcoder-set
HARDY_RAMANUJAN_THEOREM.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 }
ed-1.19#buffer_prep#open_sbuf.c
ed-1.19
buffer.c
open_sbuf
12
bool open_sbuf( void ) { isbinary_ = false; reset_unterminated_line(); sfp = tmpfile(); if( !sfp ) { show_strerror( 0, (*__errno_location ()) ); set_error_msg( "Cannot open temp file" ); return false; } return true; }
{ "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 }
rcs-5.10.1#b-complain_prep#fatal_syntax.c
rcs-5.10.1
b-complain.c
fatal_syntax
10
void fatal_syntax (size_t lno, char const *fmt, ...) { complain ("%s: %s:", (top->program-> name), (top->repository. filename)); if (lno) complain ("%ld:", lno); complain (" "); do { va_list args; __builtin_va_start(args,fmt); vcomplain (fmt, args); __builtin_va_end(args); complain ("\n"); } while (0); die (); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
units-2.22#units_prep#mymalloc.c
units-2.22
units.c
mymalloc
11
void * mymalloc(int bytes,const char *mesg) { void *pointer; pointer = malloc(bytes); if (!pointer){ fprintf(stderr, "%s: memory allocation error %s\n", progname, mesg); exit(1); } return pointer; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#write_c_prep#Pl_Write_Canonical_2.c
gprolog-1.5.0
write_c.c
Pl_Write_Canonical_2
8
void Pl_Write_Canonical_2(WamWord sora_word, WamWord term_word) { (pl_sys_var[0]) = 2 | 1; (pl_sys_var[1]) = -1; (pl_sys_var[2]) = 1200; Pl_Write_Term_2(sora_word, term_word); }
{ "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 }
bc-1.07.1#storage_prep#clear_func.c
bc-1.07.1
storage.c
clear_func
25
void clear_func (int func) { bc_function *f; bc_label_group *lg; f = &functions[func]; f->f_defined = 0; f->f_code_size = 0; if (f->f_autos != ((void *)0)) { free_args (f->f_autos); f->f_autos = ((void *)0); } if (f->f_params != ((void *)0)) { free_args (f->f_params); f->f_params = ((void *)0); } while (f->f_label != ((void *)0)) { lg = f->f_label->l_next; free (f->f_label); f->f_label = lg; } }
{ "array_type": 1, "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": 2, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 5, "union_type": 0, "while_loop": 1 }
libosip2-5.3.1#osip_contact_prep#osip_message_get_contact.c
libosip2-5.3.1
osip_contact.c
osip_message_get_contact
9
int osip_message_get_contact(const osip_message_t *sip, int pos, osip_contact_t **dest) { *dest = ((void *)0); if (sip == ((void *)0)) return -2; if (osip_list_size(&sip->contacts) <= pos) return -1; *dest = (osip_contact_t *) osip_list_get(&sip->contacts, pos); return pos; }
{ "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 }
uucp-1.07#conn_prep#uconn_free.c
uucp-1.07
conn.c
uconn_free
6
void uconn_free (qconn) struct sconnection *qconn; { (*qconn->qcmds->pufree) (qconn); }
{ "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 }
tmux#tty_prep#tty_cmd_clearendofline.c
tmux
tty.c
tty_cmd_clearendofline
9
void tty_cmd_clearendofline(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; u_int nx, py = ctx->yoff + ctx->ocy; tty_default_attributes(tty, wp, ctx->bg); nx = ((wp->screen)->grid->sx) - ctx->ocx; tty_clear_line(tty, wp, py, ctx->xoff + ctx->ocx, nx, ctx->bg); }
{ "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": 0, "union_type": 0, "while_loop": 0 }
mcsim-6.2.0#yourcode_prep#TransformPred.c
mcsim-6.2.0
yourcode.c
TransformPred
4
void TransformPred (PANALYSIS panal, PMCPREDOUT pMCPredOut) { OutspecToLinearArray (panal, pMCPredOut); }
{ "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#MAXIMUM_PRODUCT_SUBARRAY_ADDED_NEGATIVE_PRODUCT_CASE_prep#max.c
transcoder-set
MAXIMUM_PRODUCT_SUBARRAY_ADDED_NEGATIVE_PRODUCT_CASE.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 }