id
stringlengths
21
132
codebase
stringclasses
57 values
c_file
stringlengths
3
108
function
stringlengths
3
74
sloc
stringclasses
134 values
c_code
stringlengths
25
52.1k
c_constructs
dict
libosip2-5.3.1#osip_header_prep#osip_header_to_str.c
libosip2-5.3.1
osip_header.c
osip_header_to_str
20
int osip_header_to_str(const osip_header_t *header, char **dest) { size_t len, hlen; *dest = ((void *)0); if ((header == ((void *)0)) || (header->hname == ((void *)0))) return -2; len = 0; hlen = strlen(header->hname); if (header->hvalue != ((void *)0)) len = strlen(header->hvalue); *dest = (char *) (osip_malloc_func ? osip_malloc_func(hlen + len + 3) : malloc(hlen + len + 3)); if (*dest == ((void *)0)) return -4; if (header->hvalue != ((void *)0)) snprintf(*dest, hlen + len + 3, "%s: %s", header->hname, header->hvalue); else snprintf(*dest, hlen + len + 3, "%s: ", header->hname); if (*dest[0] >= 'a' && *dest[0] <= 'z') *dest[0] = (*dest[0] - 32); return 0; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 1, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 6, "union_type": 0, "while_loop": 0 }
transcoder-set#MAXIMUM_SUBSEQUENCE_SUM_SUCH_THAT_NO_THREE_ARE_CONSECUTIVE_prep#max.c
transcoder-set
MAXIMUM_SUBSEQUENCE_SUM_SUCH_THAT_NO_THREE_ARE_CONSECUTIVE.c
max
1
int max(int x, int y) { return (x > y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
json-c#json_object_prep#json_object_set_string_len.c
json-c
json_object.c
json_object_set_string_len
4
int json_object_set_string_len(json_object *jso, const char *s, int len) { return _json_object_set_string_len(jso, s, len); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#MINIMUM_INSERTIONS_SORT_ARRAY_prep#cmpfunc.c
transcoder-set
MINIMUM_INSERTIONS_SORT_ARRAY.c
cmpfunc
1
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#parserInternals_prep#xmlIsLetter.c
libxml2
parserInternals.c
xmlIsLetter
4
int xmlIsLetter(int c) { return((((c) < 0x100) ? (((0x41 <= ((c))) && (((c)) <= 0x5a)) || ((0x61 <= ((c))) && (((c)) <= 0x7a)) || ((0xc0 <= ((c))) && (((c)) <= 0xd6)) || ((0xd8 <= ((c))) && (((c)) <= 0xf6)) || (0xf8 <= ((c)))) : xmlCharInRange((c), &xmlIsBaseCharGroup)) || (((c) < 0x100) ? 0 : (((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || ((c) == 0x3007) || ((0x3021 <= (c)) && ((c) <= 0x3029))))); }
{ "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 }
ed-1.19#signal_prep#set_signals.c
ed-1.19
signal.c
set_signals
8
void set_signals( void ) { sigwinch_handler( 28 ); if( isatty( 0 ) ) set_signal( 28, sigwinch_handler ); set_signal( 1, sighup_handler ); set_signal( 3, ((__sighandler_t) 1) ); set_signal( 2, sigint_handler ); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
brotli-1.0.9#metablock_prep#BrotliOptimizeHistograms.c
brotli-1.0.9
metablock.c
BrotliOptimizeHistograms
19
void BrotliOptimizeHistograms(uint32_t num_distance_codes, MetaBlockSplit* mb) { uint8_t good_for_rle[704]; size_t i; for (i = 0; i < mb->literal_histograms_size; ++i) { BrotliOptimizeHuffmanCountsForRle(256, mb->literal_histograms[i].data_, good_for_rle); } for (i = 0; i < mb->command_histograms_size; ++i) { BrotliOptimizeHuffmanCountsForRle(704, mb->command_histograms[i].data_, good_for_rle); } for (i = 0; i < mb->distance_histograms_size; ++i) { BrotliOptimizeHuffmanCountsForRle(num_distance_codes, mb->distance_histograms[i].data_, good_for_rle); } }
{ "array_type": 4, "break_continue_statement": 0, "enum_type": 0, "for_loop": 3, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#SPLIT_N_MAXIMUM_COMPOSITE_NUMBERS_prep#max.c
transcoder-set
SPLIT_N_MAXIMUM_COMPOSITE_NUMBERS.c
max
1
int max(int x, int y) { return (x > y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
json.h#allow_multi_line_strings_prep#utest_run_allow_multi_line_strings_read_write_pretty_read.c
json.h
allow_multi_line_strings.c
utest_run_allow_multi_line_strings_read_write_pretty_read
7
void utest_run_allow_multi_line_strings_read_write_pretty_read(int *utest_result, struct allow_multi_line_strings *utest_fixture) { size_t size = 0; void *json = json_write_pretty(utest_fixture->value, " ", "\n", &size); free(utest_fixture->value); utest_fixture->value = json_parse(json, size - 1); free(json); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 2, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
mtools-4.0.43#buffer_prep#buf_init.c
mtools-4.0.43
buffer.c
buf_init
37
Stream_t *buf_init(Stream_t *Next, size_t size, size_t cylinderSize, size_t sectorSize) { Buffer_t *Buffer; ((void) sizeof ((size != 0) ? 1 : 0), __extension__ ({ if (size != 0) ; else __assert_fail ("size != 0", "buffer.c", 364, __extension__ __PRETTY_FUNCTION__); })); ((void) sizeof ((cylinderSize != 0) ? 1 : 0), __extension__ ({ if (cylinderSize != 0) ; else __assert_fail ("cylinderSize != 0", "buffer.c", 365, __extension__ __PRETTY_FUNCTION__); })); ((void) sizeof ((sectorSize != 0) ? 1 : 0), __extension__ ({ if (sectorSize != 0) ; else __assert_fail ("sectorSize != 0", "buffer.c", 366, __extension__ __PRETTY_FUNCTION__); })); ((void) sizeof ((Next != ((void *)0)) ? 1 : 0), __extension__ ({ if (Next != ((void *)0)) ; else __assert_fail ("Next != NULL", "buffer.c", 367, __extension__ __PRETTY_FUNCTION__); })); if(size % cylinderSize != 0) { fprintf(stderr, "size not multiple of cylinder size\n"); exit(1); } if(cylinderSize % sectorSize != 0) { fprintf(stderr, "cylinder size not multiple of sector size\n"); exit(1); } Buffer = ((Buffer_t*)(calloc(1,sizeof(Buffer_t)))); if(!Buffer) return 0; init_head(&Buffer->head, &BufferClass, Next); Buffer->buf = malloc(size); if ( !Buffer->buf){ (free((char *)Buffer)); return 0; } Buffer->size = size; Buffer->dirty = 0; Buffer->cylinderSize = cylinderSize; Buffer->sectorSize = sectorSize; Buffer->ever_dirty = 0; Buffer->dirty_pos = 0; Buffer->dirty_end = 0; Buffer->current = 0L; Buffer->cur_size = 0; return &Buffer->head; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 8, "memory_management": 3, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 5, "union_type": 0, "while_loop": 0 }
libzahl-1.0#zset_prep#zset.c
libzahl-1.0
zset.c
zset
12
void zset(z_t a, z_t b) { if (zzero(b)) { ((a)->sign = (0)); } else { do { if ((a)->alloced < (b->used)) libzahl_realloc(a, (b->used)); } while (0); a->sign = b->sign; a->used = b->used; memcpy(a->chars, b->chars, (b->used) * sizeof(zahl_char_t)); } }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 1, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
libxml2#xmlunicode_prep#xmlUCSIsEthiopic.c
libxml2
xmlunicode.c
xmlUCSIsEthiopic
4
int xmlUCSIsEthiopic(int code) { return(((code >= 0x1200) && (code <= 0x137F))); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tinycc#tcc_prep#tcc_tool_cross.c
tinycc
tcc.c
tcc_tool_cross
13
void tcc_tool_cross(TCCState *s, char **argv, int target) { char program[4096]; char *a0 = argv[0]; int prefix = tcc_basename(a0) - a0; snprintf(program, sizeof program, "%.*s%s" "-tcc" , prefix, a0, target == 64 ? "x86_64" : "i386"); if (strcmp(a0, program)) execvp(argv[0] = program, argv); tcc_error("could not run '%s'", program); }
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
screen-4.9.0#display_prep#SetAttr.c
screen-4.9.0
display.c
SetAttr
47
void SetAttr(new) register int new; { register int i, j, old, typ; if (!display || (old = display->d_rend.attr) == new) return; display->d_col16change = (old ^ new) & ((1<<6) | (1<<7)); new ^= display->d_col16change; if (old == new) return; display->d_rend.attr = new; typ = display->d_atyp; if ((new & old) != old) { if ((typ & (1<<2))) AddCStr((display->d_tcs[53].str)); if ((typ & (1<<1))) AddCStr((display->d_tcs[54].str)); if ((typ & (1<<0))) { AddCStr((display->d_tcs[55].str)); if (display->d_hascolor) ((&display->d_rend)->color = 0, (&display->d_rend)->attr &= ~((1<<7)|(1<<6))); if (!(display->d_tcs[97].flg)) { display->d_rend.font = 0; display->d_realfont = 0; } } old = 0; typ = 0; } old ^= new; for (i = 0, j = 1; old && i < 6; i++, j <<= 1) { if ((old & j) == 0) continue; old ^= j; if (display->d_attrtab[i]) { AddCStr(display->d_attrtab[i]); typ |= display->d_attrtyp[i]; } } display->d_atyp = typ; }
{ "array_type": 3, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 10, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#TRIANGULAR_NUMBERS_1_prep#min.c
transcoder-set
TRIANGULAR_NUMBERS_1.c
min
1
int min(int x, int y) { return (x < y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#PROGRAM_CALCULATE_VOLUME_OCTAHEDRON_prep#min.c
transcoder-set
PROGRAM_CALCULATE_VOLUME_OCTAHEDRON.c
min
1
int min(int x, int y) { return (x < y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlTextReaderGetParserColumnNumber.c
libxml2
libxml2-py.c
libxml_xmlTextReaderGetParserColumnNumber
13
PyObject * libxml_xmlTextReaderGetParserColumnNumber(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; xmlTextReaderPtr reader; PyObject *pyobj_reader; if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlTextReaderGetParserColumnNumber", &pyobj_reader)) return(((void *)0)); reader = (xmlTextReaderPtr) (((pyobj_reader) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlTextReader_Object *)(pyobj_reader))->obj)); c_retval = xmlTextReaderGetParserColumnNumber(reader); py_retval = libxml_intWrap((int) c_retval); return(py_retval); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
tulipindicators-0.9.1#tiamalgamation_prep#ti_vhf.c
tulipindicators-0.9.1
tiamalgamation.c
ti_vhf
62
int ti_vhf(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *in = inputs[0]; const int period = (int)options[0]; double *output = outputs[0]; if (period < 1) return 1; if (size <= ti_vhf_start(options)) return 0; int trail = 1, maxi = -1, mini = -1; double max = in[0], min = in[0]; double bar; double sum = 0; int i, j; double yc = in[0]; double c; for (i = 1; i < period; ++i) { c = in[i]; sum += fabs(c - yc); yc = c; } for (i = period; i < size; ++i, ++trail) { c = in[i]; sum += fabs(c - yc); yc = c; if (i > period) { sum -= fabs(in[i-period] - in[i-period-1]); } bar = c; if (maxi < trail) { maxi = trail; max = in[maxi]; j = trail; while(++j <= i) { bar = in[j]; if (bar >= max) { max = bar; maxi = j; } } } else if (bar >= max) { maxi = i; max = bar; } bar = c; if (mini < trail) { mini = trail; min = in[mini]; j = trail; while(++j <= i) { bar = in[j]; if (bar <= min) { min = bar; mini = j; } } } else if (bar <= min) { mini = i; min = bar; } *output++ = fabs(max - min) / sum; } ((void) sizeof ((output - outputs[0] == size - ti_vhf_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_vhf_start(options)) ; else __assert_fail ("output - outputs[0] == size - ti_vhf_start(options)", "tiamalgamation.c", 3996, __extension__ __PRETTY_FUNCTION__); })); return 0; }
{ "array_type": 4, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 10, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 2 }
json.h#test_prep#json_extract_get_string_size.c
json.h
test.c
json_extract_get_string_size
7
struct json_extract_result_s json_extract_get_string_size(const struct json_string_s *const string) { struct json_extract_result_s result; result.dom_size = sizeof(struct json_string_s); result.data_size = string->string_size + 1; return result; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#HTMLparser_prep#htmlParseChunk.c
libxml2
HTMLparser.c
htmlParseChunk
30
int htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size, int terminate) { if ((ctxt == ((void *)0)) || (ctxt->input == ((void *)0))) return(XML_ERR_ARGUMENT); if (((ctxt)->disableSAX > 1) != 0) return(ctxt->errNo); if ((size > 0) && (chunk != ((void *)0)) && (ctxt->input != ((void *)0)) && (ctxt->input->buf != ((void *)0))) { size_t pos = ctxt->input->cur - ctxt->input->base; int res; res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk); xmlBufUpdateInput(ctxt->input->buf->buffer, ctxt->input, pos); if (res < 0) { htmlParseErr(ctxt, ctxt->input->buf->error, "xmlParserInputBufferPush failed", ((void *)0), ((void *)0)); xmlHaltParser(ctxt); return (ctxt->errNo); } } htmlParseTryOrFinish(ctxt, terminate); if (terminate) { if (ctxt->instate != XML_PARSER_EOF) { if ((ctxt->sax) && (ctxt->sax->endDocument != ((void *)0))) ctxt->sax->endDocument(ctxt->userData); } ctxt->instate = XML_PARSER_EOF; } return((xmlParserErrors) ctxt->errNo); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 7, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 5, "union_type": 0, "while_loop": 0 }
grep-3.11#strerror_r_prep#rpl_strerror_r.c
grep-3.11
strerror_r.c
rpl_strerror_r
36
int rpl_strerror_r (int errnum, char *buf, size_t buflen) { if (buflen <= 1) { if (buflen) *buf = '\0'; return 34; } *buf = '\0'; { char const *msg = ((void *)0); if (msg) return safe_copy (buf, buflen, msg); } { int ret; int saved_errno = (*__errno_location ()); { ret = 0; ret = __xpg_strerror_r (errnum, buf, buflen); if (!*buf) { char stackbuf[80]; char *errstring = strerror_r (errnum, stackbuf, sizeof stackbuf); ret = errstring ? safe_copy (buf, buflen, errstring) : (*__errno_location ()); } } if (ret == 22 && !*buf) { snprintf (buf, buflen, "Unknown error %d", errnum); } (*__errno_location ()) = saved_errno; return ret; } }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#ARRAY_ELEMENT_MOVED_K_USING_SINGLE_MOVES_prep#f_filled.c
transcoder-set
ARRAY_ELEMENT_MOVED_K_USING_SINGLE_MOVES.c
f_filled
1
int f_filled ( int a [ ], int n, int k ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
dap-3.10#sbstrans1_prep#freqtrans.c
dap-3.10
sbstrans1.c
freqtrans
240
void freqtrans(char *step, FILE *dapfile) { int s; char setname[127 + 1]; char outname[127 + 1]; int tablesstart; int optionsstart; int nstats; char stat[127 + 1]; int nofreq; int nopercent; int norow; int nocol; int noprint; int nvars; int newvar; int varn; noprint = 0; if (!getoption(step, "data", setname, 1)) strcpy(setname, sbstmp); fprintf(dapfile, "sort(\"%s\", \"", setname); if ((s = findstatement(step, "tables"))) { tablesstart = s; copylist(step, "by", dapfile); putc(' ', dapfile); while (step[s] && step[s] != '/' && step[s] != ';') { if (step[s] == '*') { putc(' ', dapfile); s++; } else if (step[s] != '\n') putc(step[s], dapfile); s++; } } else { fprintf(stderr, "sbstrans: before %d: missing tables statement in proc freq.\n", sbslineno); exit(1); } fputs("\", \"\");\n", dapfile); if (step[s] == '/') optionsstart = s + 2; else optionsstart = 0; fprintf(dapfile, "freq(\"%s.srt\", \"", setname); for (s = tablesstart, newvar = 1, nvars = 0; step[s] && step[s] != '/' && step[s] != ';'; s++) { if (step[s] == '*') { putc(' ', dapfile); s ++; newvar = 1; } else if (step[s] != '\n') { if (newvar) { newvar = 0; nvars++; } putc(step[s], dapfile); } } if (!nvars) { fprintf(stderr, "sbstrans: before %d: no variables in tables statement in proc freq.\n", sbslineno); exit(1); } if ((s = findstatement(step, "weight"))) { putc('*', dapfile); while (step[s] && step[s] != '\n') { putc(step[s], dapfile); s++; } s++; if (step[s] != ';') { fprintf(stderr, "sbstrans: before %d: only one weight variable allowed in proc freq.\n", sbslineno); exit(1); } } fputs("\", \"", dapfile); outname[0] = '\0'; nofreq = 0; nopercent = 0; norow = 0; nocol = 0; nstats = 4; for (s = optionsstart; step[s] && step[s] != ';'; s++) { if (!linecmp(step + s, "noprint")) { noprint = 1; s += 7; } else if (!linecmp(step + s, "out")) { s += 4; if (linecmp(step + s, "=")) { fprintf(stderr, "sbstrans: before %d: missing = after out option in tables statement in proc freq.\n", sbslineno); exit(1); } s += 2; s += linecpy(outname, step + s); } else { s += linecpy(stat, step + s); upper(stat); if (!linecmp(stat, "NOFREQ")) { nofreq = 1; --nstats; } else if (!linecmp(stat, "NOPERCENT")) { nopercent = 1; --nstats; } else if (!linecmp(stat, "NOROW")) { norow = 1; --nstats; } else if (!linecmp(stat, "NOCOL")) { nocol = 1; --nstats; } else { if (!linecmp(stat, "EXPECTED")) nstats++; else if (!linecmp(stat, "CHISQ")) fputs(" FISHER ", dapfile); else if (!linecmp(stat, "MEASURES")) { fputs(" ODDSRAT ", dapfile); strcpy(stat, "ORDINAL"); } fputs(stat, dapfile); } putc(' ', dapfile); } } if (step[s] != ';') { fprintf(stderr, "sbstrans: before %d: missing ; at end of tables statement in proc freq.\n", sbslineno); exit(1); } if (!noprint) { if (!nofreq) fputs(" COUNT", dapfile); if (!nopercent) fputs(" PERCENT", dapfile); if (!norow) fputs(" ROWPERC", dapfile); if (!nocol) fputs(" COLPERC", dapfile); } fputs("\", \"", dapfile); copylist(step, "by", dapfile); fputs("\");\n", dapfile); if (!noprint && nstats > 0) { if (nvars == 1) fprintf(dapfile, "print(\"%s.srt.frq\", \"\");\n", setname); else { fprintf(dapfile, "sort(\"%s.srt.frq\", \"", setname); copylist(step, "by", dapfile); for (s = tablesstart, varn = 0; varn < nvars - 1; varn++) { while (step[s] && step[s] != '\n') { putc(step[s], dapfile); s++; } putc(' ', dapfile); s += 3; } fputs(" _type_ ", dapfile); while (step[s] && step[s] != '\n') { putc(step[s], dapfile); s++; } fputs("\", \"\");\n", dapfile); fprintf(dapfile, "table(\"%s.srt.frq.srt\", \"", setname); for (s = tablesstart, varn = 0; varn < nvars - 2; varn++) { while (step[s] && step[s] != '\n') s++; s += 3; } while (step[s] && step[s] != '\n') { putc(step[s], dapfile); s++; } if (nstats > 1) fputs(" _type_", dapfile); fputs("\", \"", dapfile); for (s += 3; step[s] && step[s] != '\n'; s++) putc(step[s], dapfile); fputs(" _cell_\", \"s12\", \"", dapfile); copylist(step, "by", dapfile); for (s = tablesstart, varn = 0; varn < nvars - 2; varn++) { while (step[s] && step[s] != '\n') { putc(step[s], dapfile); s++; } putc(' ', dapfile); s += 3; } fputs("\");\n", dapfile); } } if (outname[0]) { fprintf(dapfile, "dataset(\"%s.srt.frq\", \"%s\", \"RENAME\");\n", setname, outname); strcpy(sbstmp, outname); } }
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 6, "function_pointer": 0, "goto_statement": 0, "if_statement": 31, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 7 }
transcoder-set#PROGRAM_AREA_SQUARE_prep#len.c
transcoder-set
PROGRAM_AREA_SQUARE.c
len
1
int len (int arr [ ]) {return ((int) (sizeof (arr) / sizeof (arr)[0]));}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
json.h#allow_equals_in_object_prep#json_write_pretty_get_object_size.c
json.h
allow_equals_in_object.c
json_write_pretty_get_object_size
26
int json_write_pretty_get_object_size(const struct json_object_s *object, size_t depth, size_t indent_size, size_t newline_size, size_t *size) { struct json_object_element_s *element; *size += 1; if (0 < object->length) { *size += newline_size; *size += object->length - 1; for (element = object->start; 0 != element; element = element->next) { *size += (depth + 1) * indent_size; *size += newline_size; if (json_write_get_string_size(element->name, size)) { return 1; } *size += 3; if (json_write_pretty_get_value_size(element->value, depth + 1, indent_size, newline_size, size)) { return 1; } } *size += depth * indent_size; } *size += 1; return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 2, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libosip2-5.3.1#osip_header_prep#osip_header_set_value.c
libosip2-5.3.1
osip_header.c
osip_header_set_value
3
void osip_header_set_value(osip_header_t *header, char *value) { header->hvalue = value; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
gawk-5.2.2#profile_prep#pp_node.c
gawk-5.2.2
profile.c
pp_node
7
char * pp_node(NODE *n) { if ((n->flags & NUMBER) != 0) return pp_number(n); return pp_string(n->sub.val.sp, n->sub.val.slen, '"'); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libosip2-5.3.1#osip_md5c_prep#osip_MD5Update.c
libosip2-5.3.1
osip_md5c.c
osip_MD5Update
20
void osip_MD5Update(osip_MD5_CTX *context, unsigned char *input, unsigned int inputLen ) { unsigned int i, index, partLen; index = (unsigned int) ((context->count[0] >> 3) & 0x3F); if ((context->count[0] += ((UINT4) inputLen << 3)) < ((UINT4) inputLen << 3)) context->count[1]++; context->count[1] += ((UINT4) inputLen >> 29); partLen = 64 - index; if (inputLen >= partLen) { osip_MD5_memcpy((POINTER) &context->buffer[index], (POINTER) input, partLen); osip_MD5Transform(context->state, context->buffer); for (i = partLen; i + 63 < inputLen; i += 64) osip_MD5Transform(context->state, &input[i]); index = 0; } else i = 0; osip_MD5_memcpy((POINTER) &context->buffer[index], (POINTER) &input[i], inputLen - i); }
{ "array_type": 3, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
bc-1.07.1#number_prep#bc_sub.c
bc-1.07.1
number.c
bc_sub
34
void bc_sub (bc_num n1, bc_num n2, bc_num *result, int scale_min) { bc_num diff = ((void *)0); int cmp_res; int res_scale; if (n1->n_sign != n2->n_sign) { diff = _bc_do_add (n1, n2, scale_min); diff->n_sign = n1->n_sign; } else { cmp_res = _bc_do_compare (n1, n2, 0, 0); switch (cmp_res) { case -1: diff = _bc_do_sub (n2, n1, scale_min); diff->n_sign = (n2->n_sign == PLUS ? MINUS : PLUS); break; case 0: res_scale = ((scale_min)>(((n1->n_scale)>(n2->n_scale)?(n1->n_scale):(n2->n_scale)))?(scale_min):(((n1->n_scale)>(n2->n_scale)?(n1->n_scale):(n2->n_scale)))); diff = bc_new_num (1, res_scale); memset (diff->n_value, 0, res_scale+1); break; case 1: diff = _bc_do_sub (n1, n2, scale_min); diff->n_sign = n1->n_sign; break; } } bc_free_num (result); *result = diff; }
{ "array_type": 0, "break_continue_statement": 3, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 1, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 1, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#globals_prep#__xmlDoValidityCheckingDefaultValue.c
libxml2
globals.c
__xmlDoValidityCheckingDefaultValue
1
int *__xmlDoValidityCheckingDefaultValue(void) { return (&xmlGetThreadLocalStorage(0)->gs_xmlDoValidityCheckingDefaultValue); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#HOW_TO_BEGIN_WITH_COMPETITIVE_PROGRAMMING_prep#cmpfunc.c
transcoder-set
HOW_TO_BEGIN_WITH_COMPETITIVE_PROGRAMMING.c
cmpfunc
1
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tmux#session_prep#session_group_synchronize_to.c
tmux
session.c
session_group_synchronize_to
15
void session_group_synchronize_to(struct session *s) { struct session_group *sg; struct session *target; if ((sg = session_group_contains(s)) == ((void *)0)) return; target = ((void *)0); for((target) = ((&sg->sessions)->tqh_first); (target) != ((void *)0); (target) = ((target)->gentry.tqe_next)) { if (target != s) break; } if (target != ((void *)0)) session_group_synchronize1(target, s); }
{ "array_type": 0, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 1, "struct_type": 3, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
transcoder-set#CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER_prep#sort.c
transcoder-set
CHECK_IF_A_NUMBER_IS_POWER_OF_ANOTHER_NUMBER.c
sort
1
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlTextReaderClose.c
libxml2
libxml2-py.c
libxml_xmlTextReaderClose
13
PyObject * libxml_xmlTextReaderClose(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; xmlTextReaderPtr reader; PyObject *pyobj_reader; if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlTextReaderClose", &pyobj_reader)) return(((void *)0)); reader = (xmlTextReaderPtr) (((pyobj_reader) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlTextReader_Object *)(pyobj_reader))->obj)); c_retval = xmlTextReaderClose(reader); py_retval = libxml_intWrap((int) c_retval); return(py_retval); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
tulipindicators-0.9.1#candles_prep#tc_morning_star.c
tulipindicators-0.9.1
candles.c
tc_morning_star
5
int tc_morning_star(int size, TC_REAL const *const *inputs, tc_config const *options, tc_result *output) { const TC_REAL *open = inputs[0]; const TC_REAL *high = inputs[1]; const TC_REAL *low = inputs[2]; const TC_REAL *close = inputs[3]; const int period = options->period; const TC_REAL div = 1.0 / period; TC_REAL avg_body_sum = 0; TC_REAL avg_total_sum = 0; if (period < 1) return 1; if (size < period) return 0; int i; for (i = 0; i < period; ++i) { avg_body_sum += (fabs(open[(i)] - close[(i)])); avg_total_sum += (high[(i)] - low[(i)]); } while(i < size) { const TC_REAL top = (open[(i)] > close[(i)] ? open[(i)] : close[(i)]); const TC_REAL bottom = (open[(i)] < close[(i)] ? open[(i)] : close[(i)]); const TC_REAL body = (fabs(open[(i)] - close[(i)])); const TC_REAL total = (high[(i)] - low[(i)]); const TC_REAL upper = (high[(i)] - top); const TC_REAL lower = (bottom - low[(i)]); const TC_REAL avg_body = avg_body_sum * div; const TC_REAL avg_total = avg_total_sum * div; (void)top;(void)bottom;(void)body;(void)total; (void)upper;(void)lower;(void)avg_body;(void)avg_total; if (i>=2 && (open[i-2]>close[i-2]) && ((fabs(open[(i-2)] - close[(i-2)])) > (options->body_long * avg_body)) && ((open[(i-1)] > close[(i-1)] ? open[(i-1)] : close[(i-1)]) <= (open[((i-1)-1)] < close[((i-1)-1)] ? open[((i-1)-1)] : close[((i-1)-1)])) && ((fabs(open[(i-1)] - close[(i-1)])) < (options->body_short * avg_body)) && (open[i]<close[i]) && ((open[(i)] < close[(i)] ? open[(i)] : close[(i)]) >= (open[((i)-1)] > close[((i)-1)] ? open[((i)-1)] : close[((i)-1)])) && (close[i] >= close[i-2])) { do { const tc_hit hit = {i, (1L<<19)}; const int r = tc_result_add(output, hit); if (r != 0) return r; } while (0); } avg_body_sum += body; avg_body_sum -= (fabs(open[(i-period)] - close[(i-period)])); avg_total_sum += total; avg_total_sum -= (high[(i-period)] - low[(i-period)]); ++i; }; return 0; }
{ "array_type": 3, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 4, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 1 }
transcoder-set#HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP_prep#f_gold.c
transcoder-set
HOW_TO_CHECK_IF_A_GIVEN_ARRAY_REPRESENTS_A_BINARY_HEAP.c
f_gold
5
_Bool f_gold ( int arr [ ], int i, int n ) { if ( i > ( n - 2 ) / 2 ) return 1; if ( arr [ i ] >= arr [ 2 * i + 1 ] && arr [ i ] >= arr [ 2 * i + 2 ] && f_gold ( arr, 2 * i + 1, n ) && f_gold ( arr, 2 * i + 2, n ) ) return 1; return 0; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlIsPubidChar.c
libxml2
libxml2-py.c
libxml_xmlIsPubidChar
11
PyObject * libxml_xmlIsPubidChar(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; unsigned int ch; if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlIsPubidChar", &ch)) return(((void *)0)); c_retval = xmlIsPubidChar(ch); py_retval = libxml_intWrap((int) c_retval); return(py_retval); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
transcoder-set#MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE_prep#main.c
transcoder-set
MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE.c
main
15
int main(void) { int n_success = 0; int param0[] = {40,38,47,52,21,50,8,56,93,21}; int param1[] = {74,35,71,29,9,33,82,80,5,90}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } break; } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "array_type": 2, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#xmlIO_prep#xmlNewInputBufferString.c
libxml2
xmlIO.c
xmlNewInputBufferString
16
xmlParserInputBufferPtr xmlNewInputBufferString(const char *str, int flags) { xmlParserInputBufferPtr ret; ret = xmlMalloc(sizeof(*ret)); if (ret == ((void *)0)) return(((void *)0)); memset(ret, 0, sizeof(xmlParserInputBuffer)); ret->compressed = -1; ret->buffer = xmlBufCreateMem((const xmlChar *) str, strlen(str), (flags & (1 << 1) ? 1 : 0)); if (ret->buffer == ((void *)0)) { xmlFree(ret); return(((void *)0)); } return(ret); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 1, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
transcoder-set#HARDY_RAMANUJAN_THEOREM_prep#max.c
transcoder-set
HARDY_RAMANUJAN_THEOREM.c
max
1
int max(int x, int y) { return (x > y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
mcsim-6.2.0#modiSBML_prep#CountLines.c
mcsim-6.2.0
modiSBML.c
CountLines
13
long CountLines (PFILE pFileIn) { int nLines = 0; char szDummy[2]; fscanf (pFileIn, "%*[^\n]"); getc(pFileIn); while ( !(feof(pFileIn))) { if (fscanf (pFileIn, "%1s", szDummy) > 0) nLines++; fscanf (pFileIn, "%*[^\n]"); getc(pFileIn); } rewind (pFileIn); return (nLines); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
transcoder-set#SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS_prep#sort.c
transcoder-set
SUM_MATRIX_ELEMENT_ABSOLUTE_DIFFERENCE_ROW_COLUMN_NUMBERS.c
sort
1
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tar-1.34#map_prep#owner_map_read.c
tar-1.34
map.c
owner_map_read
5
void owner_map_read (char const *file) { map_read (&owner_map, file, name_to_uid, "UID", ((uid_t) (! (! ((uid_t) 0 < (uid_t) -1)) ? (uid_t) -1 : ((((uid_t) 1 << ((sizeof (uid_t) * 8) - 2)) - 1) * 2 + 1)))); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_ARRAY_prep#f_gold.c
transcoder-set
FIND_THE_MAXIMUM_SUBARRAY_XOR_IN_A_GIVEN_ARRAY.c
f_gold
15
int f_gold ( int arr [ ], int n ) { int ans = (-0x7fffffff - 1); for ( int i = 0; i < n; i ++ ) { int curr_xor = 0; for ( int j = i; j < n; j ++ ) { curr_xor = curr_xor ^ arr [ j ]; ans = max ( ans, curr_xor ); } } return ans; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
ed-1.19#buffer_prep#dec_addr.c
ed-1.19
buffer.c
dec_addr
2
int dec_addr( int addr ) { if( --addr < 0 ) addr = last_addr_; return addr; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#CONVERT_STRICTLY_INCREASING_ARRAY_MINIMUM_CHANGES_prep#main.c
transcoder-set
CONVERT_STRICTLY_INCREASING_ARRAY_MINIMUM_CHANGES.c
main
25
int main(void) { int n_success = 0; int param0_0[] = {1,4,12,14,15,18,20,24,25,25,27,33,34,42,46,48,49,50,50,52,55,56,57,58,64,65,66,69,72,75,78,80,84,90,92,95,99}; int param0_1[] = {-56,6,-74,-30,34,40,-76,-10,-12,-86,-76,36,-72,82,38,68,28,84,98,-84,6,16,-46,8,2,-18,-50,4,-96,88,-84,-38,-82,-54}; int param0_2[] = {0,0,0,0,0,0,1,1,1,1,1,1}; int param0_3[] = {68,79,87,44,3,99,80,6,46,67,72,40,11,18,73,48,18,72,10,38,3,39,26,76,47,15,85,69}; int param0_4[] = {-96,-94,-94,-74,-68,-60,-58,-56,-56,-52,-52,-50,-44,-40,-26,-24,-10,-8,-6,-2,2,2,12,14,20,24,26,30,38,40,52,52,62,62,68,70,74,76,80,82,90,92}; int param0_5[] = {1,1,1,0,1}; int param0_6[] = {1,5,11,20,24,28,29,31,54,58,63,65,66,71,77,80,83,92,93,93}; int param0_7[] = {-50,-46,-44,-90,2,-38,88,-26,60}; int param0_8[] = {1,1}; int param0_9[] = {2,1,19,26,65,47,3,65,9,12,84,59,74,59,30,83,73,67,13,5,64,83,81,92,80,14,58,84,92}; 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[] = {21,22,6,15,31,3,12,7,1,16}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } break; } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "array_type": 2, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1_prep#f_gold.c
transcoder-set
SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1.c
f_gold
16
int f_gold ( int m, int n ) { int T [ m + 1 ] [ n + 1 ]; for ( int i = 0; i < m + 1; i ++ ) { for ( int j = 0; j < n + 1; j ++ ) { if ( i == 0 || j == 0 ) T [ i ] [ j ] = 0; else if ( i < j ) T [ i ] [ j ] = 0; else if ( j == 1 ) T [ i ] [ j ] = i; else T [ i ] [ j ] = T [ i - 1 ] [ j ] + T [ i / 2 ] [ j - 1 ]; } } return T [ m ] [ n ]; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
buffer-0.4.0#buffer_prep#buffer_free.c
buffer-0.4.0
buffer.c
buffer_free
5
void buffer_free(buffer_t *self) { free(self->alloc); free(self); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 2, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
make-4.4.1#main_prep#should_print_dir.c
make-4.4.1
main.c
should_print_dir
7
int should_print_dir (void) { if (print_directory_flag >= 0) return print_directory_flag; return !silent_flag && (makelevel > 0 || directories != ((void *)0)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlUCSIsByzantineMusicalSymbols.c
libxml2
libxml2-py.c
libxml_xmlUCSIsByzantineMusicalSymbols
13
PyObject * libxml_xmlUCSIsByzantineMusicalSymbols(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsByzantineMusicalSymbols") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSIsByzantineMusicalSymbols", &code)) return(((void *)0)); c_retval = xmlUCSIsByzantineMusicalSymbols(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 }
transcoder-set#STEINS_ALGORITHM_FOR_FINDING_GCD_1_prep#sort.c
transcoder-set
STEINS_ALGORITHM_FOR_FINDING_GCD_1.c
sort
1
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
patch-2.7.6#hash_prep#hash_string.c
patch-2.7.6
hash.c
hash_string
9
size_t hash_string (const char *string, size_t n_buckets) { size_t value = 0; unsigned char ch; for (; (ch = *string); string++) value = (value * 31 + ch) % n_buckets; return value; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#COUNT_NUMBER_OF_OCCURRENCES_OR_FREQUENCY_IN_A_SORTED_ARRAY_prep#f_filled.c
transcoder-set
COUNT_NUMBER_OF_OCCURRENCES_OR_FREQUENCY_IN_A_SORTED_ARRAY.c
f_filled
1
int f_filled ( int arr [ ], int n, int x ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
json.h#allow_single_quoted_strings_prep#json_skip_c_style_comments.c
json.h
allow_single_quoted_strings.c
json_skip_c_style_comments
40
int json_skip_c_style_comments(struct json_parse_state_s *state) { if ((state->offset + 2) > state->size) { return 0; } if ('/' == state->src[state->offset]) { if ('/' == state->src[state->offset + 1]) { state->offset++; state->offset++; while (state->offset < state->size) { 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_TRIANGLES_N_MOVES_1_prep#sort.c
transcoder-set
NUMBER_TRIANGLES_N_MOVES_1.c
sort
1
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlEncodeEntitiesReentrant.c
libxml2
libxml2-py.c
libxml_xmlEncodeEntitiesReentrant
14
PyObject * libxml_xmlEncodeEntitiesReentrant(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; xmlChar * c_retval; xmlDocPtr doc; PyObject *pyobj_doc; xmlChar * input; if (!_PyArg_ParseTuple_SizeT(args, (char *)"Oz:xmlEncodeEntitiesReentrant", &pyobj_doc, &input)) return(((void *)0)); doc = (xmlDocPtr) (((pyobj_doc) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlNode_Object *)(pyobj_doc))->obj)); c_retval = xmlEncodeEntitiesReentrant(doc, input); py_retval = libxml_xmlCharPtrWrap((xmlChar *) 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": 2, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
tar-1.34#system_prep#sys_compare_uid.c
tar-1.34
system.c
sys_compare_uid
5
_Bool sys_compare_uid (struct stat *a, struct stat *b) { return a->st_uid == b->st_uid; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tar-1.34#xmalloc_prep#xmalloc.c
tar-1.34
xmalloc.c
xmalloc
8
void * xmalloc (size_t n) { void *p = malloc (n); if (!p && (HAVE_GNU_MALLOC || n)) xalloc_die (); return p; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 1, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#catalog_prep#xmlCatalogCleanup.c
libxml2
catalog.c
xmlCatalogCleanup
16
void xmlCatalogCleanup(void) { xmlRMutexLock(&xmlCatalogMutex); if (xmlDebugCatalogs) xmlCatalogPrintDebug( "Catalogs cleanup\n"); if (xmlCatalogXMLFiles != ((void *)0)) xmlHashFree(xmlCatalogXMLFiles, xmlFreeCatalogHashEntryList); xmlCatalogXMLFiles = ((void *)0); if (xmlDefaultCatalog != ((void *)0)) xmlFreeCatalog(xmlDefaultCatalog); xmlDefaultCatalog = ((void *)0); xmlDebugCatalogs = 0; xmlCatalogInitialized = 0; xmlRMutexUnlock(&xmlCatalogMutex); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 5, "union_type": 0, "while_loop": 0 }
libxml2#xpath_prep#xmlXPathConvertNumber.c
libxml2
xpath.c
xmlXPathConvertNumber
11
xmlXPathObjectPtr xmlXPathConvertNumber(xmlXPathObjectPtr val) { xmlXPathObjectPtr ret; if (val == ((void *)0)) return(xmlXPathNewFloat(0.0)); if (val->type == XPATH_NUMBER) return(val); ret = xmlXPathNewFloat(xmlXPathCastToNumber(val)); xmlXPathFreeObject(val); return(ret); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#PROGRAM_AREA_SQUARE_prep#f_gold.c
transcoder-set
PROGRAM_AREA_SQUARE.c
f_gold
4
int f_gold ( int side ) { int area = side * side; return area; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#xmlunicode_prep#xmlUCSIsMathematicalAlphanumericSymbols.c
libxml2
xmlunicode.c
xmlUCSIsMathematicalAlphanumericSymbols
4
int xmlUCSIsMathematicalAlphanumericSymbols(int code) { return(((code >= 0x1D400) && (code <= 0x1D7FF))); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
bc-1.07.1#main_prep#main.c
bc-1.07.1
main.c
main
60
int main (int argc, char **argv) { char *env_value; char *env_argv[30]; int env_argc; if (isatty(0) && isatty(1)) interactive = 1; (void) setvbuf(stdout, ((void *)0), 1, 0); env_value = getenv ("BC_ENV_ARGS"); if (env_value != ((void *)0)) { env_argc = 1; env_argv[0] = strdup("BC_ENV_ARGS"); while (*env_value != 0) { if (*env_value != ' ') { env_argv[env_argc++] = env_value; while (*env_value != ' ' && *env_value != 0) env_value++; if (*env_value != 0) { *env_value = 0; env_value++; } } else env_value++; } parse_args (env_argc, env_argv); } parse_args (argc, argv); if (getenv ("POSIXLY_CORRECT") != ((void *)0)) std_only = 1; env_value = getenv ("BC_LINE_LENGTH"); if (env_value != ((void *)0)) { line_size = atoi (env_value); if (line_size < 3 && line_size != 0) line_size = 70; } else line_size = 70; init_storage(); init_load(); if (interactive) signal (2, use_quit); init_tree(); init_gen (); is_std_in = 0; first_file = 1; if (!open_new_file ()) bc_exit (1); yyparse (); if (compile_only) printf ("\n"); bc_exit (0); return 0; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 10, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 2 }
tinycc#tccelf_prep#set_elf_sym.c
tinycc
tccelf.c
set_elf_sym
65
int set_elf_sym(Section *s, Elf64_Addr value, unsigned long size, int info, int other, int shndx, const char *name) { Elf64_Sym *esym; int sym_bind, sym_index, sym_type, esym_bind; unsigned char sym_vis, esym_vis, new_vis; sym_bind = (((unsigned char) (info)) >> 4); sym_type = ((info) & 0xf); sym_vis = ((other) & 0x03); if (sym_bind != 0) { sym_index = find_elf_sym(s, name); if (!sym_index) goto do_def; esym = &((Elf64_Sym *)s->data)[sym_index]; if (esym->st_value == value && esym->st_size == size && esym->st_info == info && esym->st_other == other && esym->st_shndx == shndx) return sym_index; if (esym->st_shndx != 0) { esym_bind = (((unsigned char) (esym->st_info)) >> 4); esym_vis = ((esym->st_other) & 0x03); if (esym_vis == 0) { new_vis = sym_vis; } else if (sym_vis == 0) { new_vis = esym_vis; } else { new_vis = (esym_vis < sym_vis) ? esym_vis : sym_vis; } esym->st_other = (esym->st_other & ~((-1) & 0x03)) | new_vis; other = esym->st_other; if (shndx == 0) { } else if (sym_bind == 1 && esym_bind == 2) { goto do_patch; } else if (sym_bind == 2 && esym_bind == 1) { } else if (sym_bind == 2 && esym_bind == 2) { } else if (sym_vis == 2 || sym_vis == 1) { } else if ((esym->st_shndx == 0xfff2 || esym->st_shndx == bss_section->sh_num) && (shndx < 0xff00 && shndx != bss_section->sh_num)) { goto do_patch; } else if (shndx == 0xfff2 || shndx == bss_section->sh_num) { } else if (s->sh_flags & 0x40000000) { } else if (esym->st_other & 0x04) { goto do_patch; } else { tcc_error_noabort("'%s' defined twice", name); } } else { do_patch: esym->st_info = ((((sym_bind)) << 4) + (((sym_type)) & 0xf)); esym->st_shndx = shndx; new_undef_sym = 1; esym->st_value = value; esym->st_size = size; esym->st_other = other; } } else { do_def: sym_index = put_elf_sym(s, value, size, ((((sym_bind)) << 4) + (((sym_type)) & 0xf)), other, shndx, name); } return sym_index; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 4, "if_statement": 15, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS_1_prep#main.c
transcoder-set
SUM_K_TH_GROUP_ODD_POSITIVE_NUMBERS_1.c
main
14
int main(void) { int n_success = 0; int param0[] = {57,96,14,64,24,74,85,27,78,1}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_success+=1; } break; } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#globals_prep#__xmlStructuredError.c
libxml2
globals.c
__xmlStructuredError
1
xmlStructuredErrorFunc *__xmlStructuredError(void) { return (&xmlGetThreadLocalStorage(0)->gs_xmlStructuredError); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
screen-4.9.0#encoding_prep#RecodeBuf.c
screen-4.9.0
encoding.c
RecodeBuf
22
int RecodeBuf(fbuf, flen, fenc, tenc, tbuf) unsigned char *fbuf; int flen; int fenc, tenc; unsigned char *tbuf; { int c, i, j; int decstate = 0, font = 0; for (i = j = 0; i < flen; i++) { c = fbuf[i]; c = DecodeChar(c, fenc, &decstate); if (c == -2) i--; if (c < 0) continue; j += EncodeChar(tbuf ? (char *)tbuf + j : 0, c, tenc, &font); } j += EncodeChar(tbuf ? (char *)tbuf + j : 0, -1, tenc, &font); return j; }
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
tmux#layout_prep#layout_assign_pane.c
tmux
layout.c
layout_assign_pane
6
void layout_assign_pane(struct layout_cell *lc, struct window_pane *wp) { layout_make_leaf(lc, wp); layout_fix_panes(wp->window, wp->window->sx, wp->window->sy); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#BELL_NUMBERS_NUMBER_OF_WAYS_TO_PARTITION_A_SET_prep#cmpfunc.c
transcoder-set
BELL_NUMBERS_NUMBER_OF_WAYS_TO_PARTITION_A_SET.c
cmpfunc
1
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
robotfindskitten#robotfindskitten_prep#finish.c
robotfindskitten
robotfindskitten.c
finish
6
void finish(int sig) { endwin(); printf("%c%c%c",27,'(','B'); exit(0); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlParseURIReference.c
libxml2
libxml2-py.c
libxml_xmlParseURIReference
14
PyObject * libxml_xmlParseURIReference(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; xmlURIPtr uri; PyObject *pyobj_uri; char * str; if (!_PyArg_ParseTuple_SizeT(args, (char *)"Oz:xmlParseURIReference", &pyobj_uri, &str)) return(((void *)0)); uri = (xmlURIPtr) (((pyobj_uri) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyURI_Object *)(pyobj_uri))->obj)); c_retval = xmlParseURIReference(uri, str); py_retval = libxml_intWrap((int) c_retval); return(py_retval); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#eax-aes128_prep#nettle_eax_aes128_update.c
nettle-3.9.1
eax-aes128.c
nettle_eax_aes128_update
5
void nettle_eax_aes128_update(struct eax_aes128_ctx *ctx, size_t length, const uint8_t *data) { (0 ? (nettle_aes128_encrypt) (&(ctx)->cipher, ~(size_t) 0, (uint8_t *) 0, (const uint8_t *) 0) : nettle_eax_update (&(ctx)->eax, &(ctx)->key, &(ctx)->cipher, (nettle_cipher_func *) (nettle_aes128_encrypt), (length), (data))); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tmux#screen-write_prep#screen_write_cursordown.c
tmux
screen-write.c
screen_write_cursordown
19
void screen_write_cursordown(struct screen_write_ctx *ctx, u_int ny) { struct screen *s = ctx->s; if (ny == 0) ny = 1; if (s->cy > s->rlower) { if (ny > ((s)->grid->sy) - 1 - s->cy) ny = ((s)->grid->sy) - 1 - s->cy; } else { if (ny > s->rlower - s->cy) ny = s->rlower - s->cy; } if (s->cx == ((s)->grid->sx)) s->cx--; if (ny == 0) return; s->cy += ny; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 2, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
nettle-3.9.1#umac64_prep#nettle_umac64_set_nonce.c
nettle-3.9.1
umac64.c
nettle_umac64_set_nonce
12
void nettle_umac64_set_nonce (struct umac64_ctx *ctx, size_t nonce_length, const uint8_t *nonce) { ((void) sizeof ((nonce_length > 0) ? 1 : 0), __extension__ ({ if (nonce_length > 0) ; else __assert_fail ("nonce_length > 0", "umac64.c", 63, __extension__ __PRETTY_FUNCTION__); })); ((void) sizeof ((nonce_length <= 16) ? 1 : 0), __extension__ ({ if (nonce_length <= 16) ; else __assert_fail ("nonce_length <= AES_BLOCK_SIZE", "umac64.c", 64, __extension__ __PRETTY_FUNCTION__); })); memcpy (ctx->nonce, nonce, nonce_length); memset (ctx->nonce + nonce_length, 0, 16 - nonce_length); ctx->nonce_low = ctx->nonce[nonce_length - 1] & 1; ctx->nonce[nonce_length - 1] &= ~1; ctx->nonce_length = nonce_length; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 2, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
json.h#allow_inf_and_nan_prep#json_write_minified_object.c
json.h
allow_inf_and_nan.c
json_write_minified_object
21
char *json_write_minified_object(const struct json_object_s *object, char *data) { struct json_object_element_s *element = 0; *data++ = '{'; for (element = object->start; 0 != element; element = element->next) { if (element != object->start) { *data++ = ','; } data = json_write_string(element->name, data); if (0 == data) { return 0; } *data++ = ':'; data = json_write_minified_value(element->value, data); if (0 == data) { return 0; } } *data++ = '}'; return data; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 2, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#xmlstring_prep#xmlStrVPrintf.c
libxml2
xmlstring.c
xmlStrVPrintf
10
int xmlStrVPrintf(xmlChar *buf, int len, const char *msg, va_list ap) { int ret; if((buf == ((void *)0)) || (msg == ((void *)0))) { return(-1); } ret = vsnprintf((char *) buf, len, (const char *) msg, ap); buf[len - 1] = 0; return(ret); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Float_Integ_Part.c
gprolog-1.5.0
arith_inl_c.c
Pl_Fct_Float_Integ_Part
5
WamWord Pl_Fct_Float_Integ_Part(WamWord x) { double d; if ((((PlLong) (x) & ((PlULong)0x7)) == (PlULong)0x7)) { Pl_Err_Type(pl_type_float, x); return x; } else d = Pl_Obtain_Float(((WamWord *) ((x) & (PlULong)0xfffffffffffffff8))); return Make_Tagged_Float((((d) > 0) ? floor(d) : ceil(d))); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#SQUARE_PYRAMIDAL_NUMBER_SUM_SQUARES_prep#f_filled.c
transcoder-set
SQUARE_PYRAMIDAL_NUMBER_SUM_SQUARES.c
f_filled
1
int f_filled ( int s ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tmux#window_prep#winlink_find_by_index.c
tmux
window.c
winlink_find_by_index
9
struct winlink * winlink_find_by_index(struct winlinks *wwl, int idx) { struct winlink wl; if (idx < 0) fatalx("bad index"); wl.idx = idx; return (winlinks_RB_FIND(wwl, &wl)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
cflow-1.7#parser_prep#tokpush.c
cflow-1.7
parser.c
tokpush
12
void tokpush(int type, int line, char *token) { token_stack[tos].type = type; token_stack[tos].token = token; token_stack[tos].line = line; if (++tos == token_stack_length) { token_stack_length += token_stack_increase; token_stack = xrealloc(token_stack, token_stack_length*sizeof(*token_stack)); } }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#SAX2_prep#xmlSAX2ElementDecl.c
libxml2
SAX2.c
xmlSAX2ElementDecl
28
void xmlSAX2ElementDecl(void *ctx, const xmlChar * name, int type, xmlElementContentPtr content) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlElementPtr elem = ((void *)0); (void) elem; if ((ctxt == ((void *)0)) || (ctxt->myDoc == ((void *)0))) return; if (ctxt->inSubset == 1) elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, name, (xmlElementTypeVal) type, content); else if (ctxt->inSubset == 2) elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, name, (xmlElementTypeVal) type, content); else { xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR, "SAX.xmlSAX2ElementDecl(%s) called while not in subset\n", name, ((void *)0)); return; } if (elem == ((void *)0)) ctxt->valid = 0; if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->intSubset) ctxt->valid &= xmlValidateElementDecl(&ctxt->vctxt, ctxt->myDoc, elem); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 5, "union_type": 0, "while_loop": 0 }
transcoder-set#SUM_PAIRWISE_PRODUCTS_2_prep#f_filled.c
transcoder-set
SUM_PAIRWISE_PRODUCTS_2.c
f_filled
1
long long int f_filled(int n) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#types_prep#libxml_xmlValidCtxtPtrWrap.c
libxml2
types.c
libxml_xmlValidCtxtPtrWrap
13
PyObject * libxml_xmlValidCtxtPtrWrap(xmlValidCtxtPtr valid) { PyObject *ret; if (valid == ((void *)0)) { _Py_INCREF(((PyObject*)((&_Py_NoneStruct)))); return ((&_Py_NoneStruct)); } ret = PyCapsule_New((void *) valid, (char *) "xmlValidCtxtPtr", ((void *)0)); return (ret); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
transcoder-set#MAXIMUM_PRODUCT_SUBSET_ARRAY_prep#cmpfunc.c
transcoder-set
MAXIMUM_PRODUCT_SUBSET_ARRAY.c
cmpfunc
1
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES_prep#max.c
transcoder-set
FIND_THE_NUMBER_OCCURRING_ODD_NUMBER_OF_TIMES.c
max
1
int max(int x, int y) { return (x > y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S_prep#f_gold.c
transcoder-set
LARGEST_SUBARRAY_WITH_EQUAL_NUMBER_OF_0S_AND_1S.c
f_gold
21
int f_gold ( int arr [ ], int n ) { int sum = 0; int maxsize = - 1, startindex; for ( int i = 0; i < n - 1; i ++ ) { sum = ( arr [ i ] == 0 ) ? - 1 : 1; for ( int j = i + 1; j < n; j ++ ) { ( arr [ j ] == 0 ) ? ( sum += - 1 ) : ( sum += 1 ); if ( sum == 0 && maxsize < j - i + 1 ) { maxsize = j - i + 1; startindex = i; } } } if ( maxsize == - 1 ) printf("No such subarray"); else printf("No such subarray"); return maxsize; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
findutils-4.9.0#util_prep#is_exec_in_local_dir.c
findutils-4.9.0
util.c
is_exec_in_local_dir
5
_Bool is_exec_in_local_dir (const PRED_FUNC pred_func) { return pred_execdir == pred_func || pred_okdir == pred_func; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#PROGRAM_FIND_SLOPE_LINE_prep#cmpfunc.c
transcoder-set
PROGRAM_FIND_SLOPE_LINE.c
cmpfunc
1
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
dap-3.10#ps_prep#pict_circle.c
dap-3.10
ps.c
pict_circle
7
void pict_circle(pict *p, double cx, double cy, double r) { p->pict_npts = 1; strcpy(p->pict_type, "CIRC"); p->pict_pt = pict_newpoint(cx, cy); p->pict_r = r; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#machine_prep#Pl_M_Is_Absolute_File_Name.c
gprolog-1.5.0
machine.c
Pl_M_Is_Absolute_File_Name
7
Bool Pl_M_Is_Absolute_File_Name(char *path) { if (((*path) == '/' || (*path) == '/')) return 1; return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_ARRAY_prep#max.c
transcoder-set
COUNT_INDEX_PAIRS_EQUAL_ELEMENTS_ARRAY.c
max
1
int max(int x, int y) { return (x > y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#SUBSEQUENCES_SIZE_THREE_ARRAY_WHOSE_SUM_DIVISIBLE_M_prep#f_filled.c
transcoder-set
SUBSEQUENCES_SIZE_THREE_ARRAY_WHOSE_SUM_DIVISIBLE_M.c
f_filled
1
int f_filled ( int A [ ], int N, int M ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#ma2asm_inst_prep#Move_Ret_To_Mem_L.c
gprolog-1.5.0
ma2asm_inst.c
Move_Ret_To_Mem_L
13
void Move_Ret_To_Mem_L(char *name, int index) { if (pic_code) { Inst_Printf("movq", "%s@GOTPCREL(%%rip), " "%%r10", name); Inst_Printf("movq", "%%rax, " "%d(%%r10)", index * 8); } else { Inst_Printf("movq", "%%rax, " "%s+%d(%%rip)", name, index * 8); } }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
nano-7.2#global_prep#flip_pipe.c
nano-7.2
global.c
flip_pipe
1
void flip_pipe(void) {;}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tulipindicators-0.9.1#sma_prep#ti_sma.c
tulipindicators-0.9.1
sma.c
ti_sma
21
int ti_sma(int size, double const *const *inputs, double const *options, double *const *outputs) { const double *input = inputs[0]; const int period = (int)options[0]; double *output = outputs[0]; const double scale = 1.0 / period; if (period < 1) return 1; if (size <= ti_sma_start(options)) return 0; double sum = 0; int i; for (i = 0; i < period; ++i) { sum += input[i]; } *output++ = sum * scale; for (i = period; i < size; ++i) { sum += input[i]; sum -= input[i-period]; *output++ = sum * scale; } ((void) sizeof ((output - outputs[0] == size - ti_sma_start(options)) ? 1 : 0), __extension__ ({ if (output - outputs[0] == size - ti_sma_start(options)) ; else __assert_fail ("output - outputs[0] == size - ti_sma_start(options)", "indicators/sma.c", 58, __extension__ __PRETTY_FUNCTION__); })); return 0; }
{ "array_type": 4, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
transcoder-set#CHECK_WHETHER_GIVEN_DEGREES_VERTICES_REPRESENT_GRAPH_TREE_prep#min.c
transcoder-set
CHECK_WHETHER_GIVEN_DEGREES_VERTICES_REPRESENT_GRAPH_TREE.c
min
1
int min(int x, int y) { return (x < y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
binn-3.0#binn_prep#binn_value.c
binn-3.0
binn.c
binn_value
34
binn * binn_value(int type, void *pvalue, int size, binn_mem_free freefn) { int storage_type; binn *item = binn_alloc_item(); if (item) { item->type = type; binn_get_type_info(type, &storage_type, ((void *)0)); switch (storage_type) { case 0x00: break; case 0xA0: if (size == 0) size = strlen((char*)pvalue) + 1; case 0xC0: case 0xE0: if (freefn == ((binn_mem_free)-1)) { item->ptr = binn_memdup(pvalue, size); if (item->ptr == ((void *)0)) { free_fn(item); return ((void *)0); } item->freefn = free_fn; if (storage_type == 0xA0) size--; } else { item->ptr = pvalue; item->freefn = freefn; } item->size = size; break; default: item->ptr = &item->vint32; copy_raw_value(pvalue, item->ptr, storage_type); } } return item; }
{ "array_type": 0, "break_continue_statement": 2, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 1, "type_casting": 4, "union_type": 0, "while_loop": 0 }
libxml2#xmlreader_prep#xmlTextReaderConstXmlVersion.c
libxml2
xmlreader.c
xmlTextReaderConstXmlVersion
16
const xmlChar * xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader) { xmlDocPtr doc = ((void *)0); if (reader == ((void *)0)) return(((void *)0)); if (reader->doc != ((void *)0)) doc = reader->doc; else if (reader->ctxt != ((void *)0)) doc = reader->ctxt->myDoc; if (doc == ((void *)0)) return(((void *)0)); if (doc->version == ((void *)0)) return(((void *)0)); else return(constString(reader, doc->version)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 9, "union_type": 0, "while_loop": 0 }
transcoder-set#CEILING_IN_A_SORTED_ARRAY_1_prep#f_filled.c
transcoder-set
CEILING_IN_A_SORTED_ARRAY_1.c
f_filled
1
int f_filled ( int arr [ ], int low, int high, int x ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1_prep#cmpfunc.c
transcoder-set
SEQUENCES_GIVEN_LENGTH_EVERY_ELEMENT_EQUAL_TWICE_PREVIOUS_1.c
cmpfunc
1
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }