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
transcoder-set#PROGRAM_FOR_SURFACE_AREA_OF_OCTAHEDRON_prep#max.c
transcoder-set
PROGRAM_FOR_SURFACE_AREA_OF_OCTAHEDRON.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,...
optipng-0.7.8#png_prep#png_init_io.c
optipng-0.7.8
png.c
png_init_io
8
void png_init_io(png_structrp png_ptr, png_FILE_p fp) { ((void)0); if (png_ptr == ((void *)0)) return; png_ptr->io_ptr = (png_voidp)fp; }
{ "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": 2,...
libxml2#xmlunicode_prep#xmlUCSIsTibetan.c
libxml2
xmlunicode.c
xmlUCSIsTibetan
4
int xmlUCSIsTibetan(int code) { return(((code >= 0x0F00) && (code <= 0x0FFF))); }
{ "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,...
screen-4.9.0#logfile_prep#logfflush.c
screen-4.9.0
logfile.c
logfflush
19
int logfflush(struct logfile *l) { int r = 0; if (!l) for (l = logroot; l; l = l->next) { if (stolen_logfile(l) && lf_reopen_fn(l->name, fileno(l->fp), l)) return -1; r |= fflush(l->fp); l->flushcount++; changed_logfile(l); } else { if (stolen_logfile(l) && lf_reopen_fn...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
transcoder-set#SUM_NODES_K_TH_LEVEL_TREE_REPRESENTED_STRING_prep#f_gold.c
transcoder-set
SUM_NODES_K_TH_LEVEL_TREE_REPRESENTED_STRING.c
f_gold
15
int f_gold ( char tree [], int k ) { int level = - 1; int sum = 0; int n = strlen(tree); for ( int i = 0; i < n; i ++ ) { if ( tree [ i ] == '(' ) level ++; else if ( tree [ i ] == ')' ) level --; else { if ( level == k ) sum += ( tree [ i ] - '0' ); } } return sum; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#error_prep#xmlParserValidityWarning.c
libxml2
error.c
xmlParserValidityWarning
8
void xmlParserValidityWarning(void *ctx, const char *msg __attribute__((unused)), ...) { va_list ap; __builtin_va_start(ap,msg); xmlVFormatLegacyError(ctx, "validity warning", msg, ap); __builtin_va_end(ap); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#CHECK_IF_X_CAN_GIVE_CHANGE_TO_EVERY_PERSON_IN_THE_QUEUE_prep#f_filled.c
transcoder-set
CHECK_IF_X_CAN_GIVE_CHANGE_TO_EVERY_PERSON_IN_THE_QUEUE.c
f_filled
1
int f_filled ( int notes [ ], 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,...
nettle-3.9.1#gosthash94_prep#nettle_gosthash94cp_update.c
nettle-3.9.1
gosthash94.c
nettle_gosthash94cp_update
7
void nettle_gosthash94cp_update (struct gosthash94_ctx *ctx, size_t length, const uint8_t *msg) { gosthash94_update_int (ctx, length, msg, _nettle_gost28147_param_CryptoPro_3411.sbox); }
{ "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,...
optipng-0.7.8#pngwutil_prep#png_save_uint_16.c
optipng-0.7.8
pngwutil.c
png_save_uint_16
6
void png_save_uint_16(png_bytep buf, unsigned int i) { buf[0] = (png_byte)((i >> 8) & 0xffU); buf[1] = (png_byte)( i & 0xffU); }
{ "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,...
rcs-5.10.1#partime_prep#partime.c
rcs-5.10.1
partime.c
partime
19
char const* partime (char const *s, struct partime *t) { struct partime p; undefine (t); while (*s) { int i = 0; char const *s1; do { if (!(s1 = parse_prefix (s, &p, &i))) return s; } while ((0 > (merge_partime (t, &p)))); s = s1; } ret...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
gawk-5.2.2#awkgram_prep#yyparse.c
gawk-5.2.2
awkgram.c
yyparse
1947
int yyparse (void) { yy_state_fast_t yystate = 0; int yyerrstatus = 0; long int yystacksize = 200; yy_state_t yyssa[200]; yy_state_t *yyss = yyssa; yy_state_t *yyssp = yyss; INSTRUCTION * yyvsa[200]; INSTRUCTION * *yyvs = yyvsa; INSTRUCTION * *yyvsp = yyvs; int yyn; int yyresult;...
{ "array_type": 17, "break_continue_statement": 203, "enum_type": 0, "for_loop": 3, "function_pointer": 0, "goto_statement": 35, "if_statement": 193, "memory_management": 0, "memory_operation": 1, "pointer_type": 36, "return_statement": 2, "struct_type": 0, "switch_statement": 1, "type_casti...
transcoder-set#WAYS_REMOVE_ONE_ELEMENT_BINARY_STRING_XOR_BECOMES_ZERO_prep#main.c
transcoder-set
WAYS_REMOVE_ONE_ELEMENT_BINARY_STRING_XOR_BECOMES_ZERO.c
main
14
int main(void) { int n_success = 0; char param0[][100] = {"KfcTJNP","05312505872","100111","tDEEhKxrQ","50824233019","10001110010","T SEZaNm MYQ","838415739","01110100","WYQiAey H"}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i]) == f_gold(param0[i])) { n_succe...
{ "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,...
gprolog-1.5.0#obj_chain_prep#Pl_Find_Linked_Objects.c
gprolog-1.5.0
obj_chain.c
Pl_Find_Linked_Objects
23
void Pl_Find_Linked_Objects(void) { int i; for(i = nb_obj; --i >= 0; ) { if (obj_tbl[i].fct_obj_init != ((void *)0)) { (*(obj_tbl[i].fct_obj_init)) (); } } for(i = 0; i < nb_obj; i++) { if (obj_tbl[i].fct_exec_system != ((void *)0)) { (*(obj_tbl[i].fct_exec_system)) (); } ...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 3, "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": 4,...
binn-3.0#binn_prep#binn_map_blob.c
binn-3.0
binn.c
binn_map_blob
5
void * binn_map_blob(void *map, int id, int *psize) { void *value; binn_map_get(map, id, 0xC0, &value, psize); return value; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
tmux#server-fn_prep#server_check_unattached.c
tmux
server-fn.c
server_check_unattached
11
void server_check_unattached(void) { struct session *s; for ((s) = sessions_RB_MINMAX(&sessions, -1); (s) != ((void *)0); (s) = sessions_RB_NEXT(s)) { if (!(s->flags & 0x1)) continue; if (options_get_number (s->options, "destroy-unattached")) session_destroy(s, __func__); } }
{ "array_type": 0, "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": 1, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 2,...
json.h#allow_leading_plus_sign_prep#json_hexadecimal_digit.c
json.h
allow_leading_plus_sign.c
json_hexadecimal_digit
12
int json_hexadecimal_digit(const char c) { if ('0' <= c && c <= '9') { return c - '0'; } if ('a' <= c && c <= 'f') { return c - 'a' + 10; } if ('A' <= c && c <= 'F') { return c - 'A' + 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,...
libxml2#HTMLparser_prep#htmlElementAllowedHere.c
libxml2
HTMLparser.c
htmlElementAllowedHere
10
int htmlElementAllowedHere(const htmlElemDesc* parent, const xmlChar* elt) { const char** p ; if ( ! elt || ! parent || ! parent->subelts ) return 0 ; for ( p = parent->subelts; *p; ++p ) if ( !xmlStrcmp((const xmlChar *)*p, elt) ) return 1 ; return 0 ; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#CHECK_NUMBER_POWER_K_USING_BASE_CHANGING_METHOD_prep#f_gold.c
transcoder-set
CHECK_NUMBER_POWER_K_USING_BASE_CHANGING_METHOD.c
f_gold
13
_Bool f_gold ( unsigned int n, unsigned int k ) { _Bool oneSeen = 0; while ( n > 0 ) { int digit = n % k; if ( digit > 1 ) return 0; if ( digit == 1 ) { if ( oneSeen ) return 0; oneSeen = 1; } n /= k; } 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": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#libxml2-py_prep#libxml_xmlUCSIsLetterlikeSymbols.c
libxml2
libxml2-py.c
libxml_xmlUCSIsLetterlikeSymbols
13
PyObject * libxml_xmlUCSIsLetterlikeSymbols(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsLetterlikeSymbols") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSI...
{ "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,...
tulipindicators-0.9.1#smoke_prep#test.c
tulipindicators-0.9.1
smoke.c
test
22
void test(const char *fname, int count) { printf("%s:\n", fname); FILE *fp = fopen(fname, "r"); if (!fp) { do { ++ltests; if (!(0)) { ++lfails; printf("%s:%d error \n", "smoke.c", 315); }} while (0); return; } char *line; while ((line = next_line(fp))) { if (line[0] < 'a'...
{ "array_type": 1, "break_continue_statement": 1, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 3, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 2,...
transcoder-set#SUM_MATRIX_ELEMENT_ELEMENT_INTEGER_DIVISION_ROW_COLUMN_1_prep#len.c
transcoder-set
SUM_MATRIX_ELEMENT_ELEMENT_INTEGER_DIVISION_ROW_COLUMN_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,...
tar-1.34#misc_prep#must_be_dot_or_slash.c
tar-1.34
misc.c
must_be_dot_or_slash
26
_Bool must_be_dot_or_slash (char const *file_name) { file_name += ((void) (file_name), 0); if (((file_name[0]) == '/')) { for (;;) if (((file_name[1]) == '/')) file_name++; else if (file_name[1] == '.' && ((file_name[2 + (file_name[2] == '.')]) == '/')) file_name += 2 + (file_name...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
tinycc#tccpp_prep#define_push.c
tinycc
tccpp.c
define_push
11
void define_push(int v, int macro_type, int *str, Sym *first_arg) { Sym *s, *o; o = define_find(v); s = sym_push2(&define_stack, v, macro_type, 0); s->d = str; s->next = first_arg; table_ident[v - 256]->sym_define = s; if (o && !macro_is_equal(o->d, s->d)) tcc_warning("%s redefined", get_to...
{ "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#CHECK_IF_X_CAN_GIVE_CHANGE_TO_EVERY_PERSON_IN_THE_QUEUE_prep#sort.c
transcoder-set
CHECK_IF_X_CAN_GIVE_CHANGE_TO_EVERY_PERSON_IN_THE_QUEUE.c
sort
1
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
nano-7.2#search_prep#tidy_up_after_search.c
nano-7.2
search.c
tidy_up_after_search
10
void tidy_up_after_search(void) { if (have_compiled_regexp) { regfree(&search_regexp); have_compiled_regexp = 0; } if (openfile->mark) refresh_needed = 1; recook |= perturbed; }
{ "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": 1,...
libxml2#xinclude_prep#xmlXIncludeSetStreamingMode.c
libxml2
xinclude.c
xmlXIncludeSetStreamingMode
7
int xmlXIncludeSetStreamingMode(xmlXIncludeCtxtPtr ctxt, int mode) { if (ctxt == ((void *)0)) return(-1); ctxt->isStream = !!mode; return(0); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#MULTIPLY_AN_INTEGER_WITH_3_5_prep#len.c
transcoder-set
MULTIPLY_AN_INTEGER_WITH_3_5.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,...
heman#vec4_prep#kmVec4Scale.c
heman
vec4.c
kmVec4Scale
8
kmVec4* kmVec4Scale(kmVec4* pOut, const kmVec4* pIn, const float s) { kmVec4Normalize(pOut, pIn); pOut->x *= s; pOut->y *= s; pOut->z *= s; pOut->w *= s; return pOut; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
nano-7.2#cut_prep#do_delete.c
nano-7.2
cut.c
do_delete
12
void do_delete(void) { if (openfile->mark && ((flags[((LET_THEM_ZAP) / (sizeof(unsigned) * 8))] & ((unsigned)1 << ((LET_THEM_ZAP) % (sizeof(unsigned) * 8)))) != 0)) zap_text(); else { do_deletion(DEL); while (openfile->current->data[openfile->current_x] != '\0' && is_zerowidth(openfile->current->data + ope...
{ "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": 2,...
libosip2-5.3.1#osip_authorization_prep#osip_authorization_get_opaque.c
libosip2-5.3.1
osip_authorization.c
osip_authorization_get_opaque
3
char *osip_authorization_get_opaque(osip_authorization_t *authorization) { return authorization->opaque; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#COUNT_SET_BITS_IN_AN_INTEGER_prep#max.c
transcoder-set
COUNT_SET_BITS_IN_AN_INTEGER.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,...
binn-3.0#binn_prep#binn_map_read_pair.c
binn-3.0
binn.c
binn_map_read_pair
7
void * binn_map_read_pair(void *ptr, int pos, int *pid, int *ptype, int *psize) { binn value; if (binn_map_get_pair(ptr, pos, pid, &value) == 0) return ((void *)0); if (ptype) *ptype = value.type; if (psize) *psize = value.size; return store_value(&value); }
{ "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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libxml2#tree_prep#xmlAddSibling.c
libxml2
tree.c
xmlAddSibling
17
xmlNodePtr xmlAddSibling(xmlNodePtr node, xmlNodePtr cur) { if ((node == ((void *)0)) || (node->type == XML_NAMESPACE_DECL) || (cur == ((void *)0)) || (cur->type == XML_NAMESPACE_DECL) || (cur == node)) return(((void *)0)); if ((node->type != XML_ATTRIBUTE_NODE) && (node->parent != ((void *)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": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 7,...
dap-3.10#ps_prep#pict_bhrect.c
dap-3.10
ps.c
pict_bhrect
45
void pict_bhrect(pict *p, double spacing, double x0, double y0, double xside, double yside) { int vlines, hlines; int linen; int ptn; double xl, xr, yb, yt; int even; vlines = (int) floor(yside / spacing); hlines = (int) floor(xside / spacing); pict_point(p, x0, y0); pict_point(p, x0 + xside, y0); p...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
enscript-1.6.6#main_prep#main.c
enscript-1.6.6
main.c
main
575
int main (int argc, char *argv[]) { InputStream is; time_t tim; struct tm *tm; int i, j, found; unsigned int ui; MediaEntry *mentry; AFMError afm_error; char *cp, *cp2; int retval = 0; Buffer buffer; buffer_init (&buffer); program = strrchr (argv[0], '/'); if (program == ((void *)0)) progr...
{ "array_type": 9, "break_continue_statement": 12, "enum_type": 0, "for_loop": 9, "function_pointer": 0, "goto_statement": 1, "if_statement": 94, "memory_management": 2, "memory_operation": 4, "pointer_type": 6, "return_statement": 1, "struct_type": 1, "switch_statement": 2, "type_casting": ...
nano-7.2#files_prep#close_buffer.c
nano-7.2
files.c
close_buffer
20
void close_buffer(void) { openfilestruct *orphan = openfile; if (orphan == startfile) startfile = startfile->next; orphan->prev->next = orphan->next; orphan->next->prev = orphan->prev; free(orphan->filename); free_lines(orphan->filetop); free(orphan->statinfo); free(orphan->lock_filename); discard_until(((vo...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 5, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 3,...
json.h#allow_single_quoted_strings_prep#json_parse_string.c
json.h
allow_single_quoted_strings.c
json_parse_string
102
void json_parse_string(struct json_parse_state_s *state, struct json_string_s *string) { size_t offset = state->offset; size_t bytes_written = 0; const char *const src = state->src; const char quote_to_use = '\'' == src[offset] ? '\'' : '"'; char *data = state->data; unsigned long hig...
{ "array_type": 1, "break_continue_statement": 12, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 7, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 2, "switch_statement": 1, "type_casting": 1...
nettle-3.9.1#rsa-decrypt_prep#rsa_session_set_decrypt_key.c
nettle-3.9.1
rsa-decrypt.c
rsa_session_set_decrypt_key
11
void rsa_session_set_decrypt_key(struct rsa_session *ctx, const struct rsa_session_info *key) { const uint8_t *aes_key = ((key)->key + 4); const uint8_t *iv = ((key)->key + 4 + 32); const uint8_t *hmac_key = ((key)->key + 4 + 32 + 16); nettle_aes256_set_decrypt_key(&ctx->aes.ctx, aes_key); memcpy((&ctx...
{ "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": 3, "return_statement": 0, "struct_type": 2, "switch_statement": 0, "type_casting": 0,...
xzoom#xzoom_prep#timeout_func.c
xzoom
xzoom.c
timeout_func
5
void timeout_func(int signum) { set_title = 1; signum = signum; }
{ "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,...
patch-2.7.6#utimens_prep#utimens.c
patch-2.7.6
utimens.c
utimens
5
int utimens (char const *file, struct timespec const timespec[2]) { return fdutimens (-1, file, timespec); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#FIND_PATTERNS_101_GIVEN_STRING_prep#cmpfunc.c
transcoder-set
FIND_PATTERNS_101_GIVEN_STRING.c
cmpfunc
1
int cmpfunc (const void * a, const void * b) {return ( *(int*)a - *(int*)b );}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
json.h#allow_global_object_prep#json_value_is_null.c
json.h
allow_global_object.c
json_value_is_null
3
int json_value_is_null(const struct json_value_s *const value) { return value->type == json_type_null; }
{ "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,...
pth-2.0.7#pth_fork_prep#pth_atfork_pop.c
pth-2.0.7
pth_fork.c
pth_atfork_pop
7
int pth_atfork_pop(void) { if (pth_atfork_idx <= 0) return (0); pth_atfork_idx--; return (!(0)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#PAINTING_FENCE_ALGORITHM_prep#main.c
transcoder-set
PAINTING_FENCE_ALGORITHM.c
main
15
int main(void) { int n_success = 0; int param0[] = {6,23,89,63,23,44,81,43,9,41}; int param1[] = {30,87,31,36,68,66,18,73,42,98}; 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; } ...
{ "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,...
libxml2#libxml2-py_prep#libxml_xmlCatalogDump.c
libxml2
libxml2-py.c
libxml_xmlCatalogDump
12
PyObject * libxml_xmlCatalogDump(PyObject *self __attribute__ ((__unused__)), PyObject *args) { FILE * out; PyObject *pyobj_out; if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlCatalogDump", &pyobj_out)) return(((void *)0)); out = (FILE *) (((pyobj_out) == (&_Py_NoneStruct)) ? ((void *)0) : lib...
{ "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,...
libxml2#xmlmemory_prep#xmlCleanupMemory.c
libxml2
xmlmemory.c
xmlCleanupMemory
3
void xmlCleanupMemory(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,...
tinycc#tccgen_prep#sym_pop.c
tinycc
tccgen.c
sym_pop
24
void sym_pop(Sym **ptop, Sym *b, int keep) { Sym *s, *ss, **ps; TokenSym *ts; int v; s = *ptop; while(s != b) { ss = s->prev; v = s->v; if (!(v & 0x20000000) && (v & ~0x40000000) < 0x10000000) { ts = table_ident[(v & ~0x40000000) - 256]; if (v & 0x4000...
{ "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": 4, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libosip2-5.3.1#osip_uri_prep#osip_uri_set_port.c
libosip2-5.3.1
osip_uri.c
osip_uri_set_port
5
void osip_uri_set_port(osip_uri_t *url, char *port) { if (url == ((void *)0)) return; url->port = port; }
{ "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,...
uucp-1.07#fsusg_prep#get_fs_usage.c
uucp-1.07
fsusg.c
get_fs_usage
15
int get_fs_usage (path, disk, fsp) char *path, *disk __attribute__ ((__unused__)); struct fs_usage *fsp; { struct statvfs fsd; if (statvfs (path, &fsd) < 0) return -1; fsp->fsu_blocks = adjust_blocks ((fsd.f_blocks), fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize, 512); fsp->fsu_bfree = adjust_blocks (...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
libxml2#relaxng_prep#xmlRelaxNGNewDocParserCtxt.c
libxml2
relaxng.c
xmlRelaxNGNewDocParserCtxt
23
xmlRelaxNGParserCtxtPtr xmlRelaxNGNewDocParserCtxt(xmlDocPtr doc) { xmlRelaxNGParserCtxtPtr ret; xmlDocPtr copy; if (doc == ((void *)0)) return (((void *)0)); copy = xmlCopyDoc(doc, 1); if (copy == ((void *)0)) return (((void *)0)); ret = (xmlRelaxNGParserCtxtPtr) xmlMall...
{ "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": 1, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 7,...
libosip2-5.3.1#sdp_accessor_prep#sdp_message_c_addrtype_get.c
libosip2-5.3.1
sdp_accessor.c
sdp_message_c_addrtype_get
6
char *sdp_message_c_addrtype_get(sdp_message_t *sdp, int pos_media, int pos) { sdp_connection_t *conn = sdp_message_connection_get(sdp, pos_media, pos); if (conn == ((void *)0)) return ((void *)0); return conn->c_addrtype; }
{ "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,...
nettle-3.9.1#rsa-sha256-sign_prep#nettle_rsa_sha256_sign_digest.c
nettle-3.9.1
rsa-sha256-sign.c
nettle_rsa_sha256_sign_digest
16
int nettle_rsa_sha256_sign_digest(const struct rsa_private_key *key, const uint8_t *digest, mpz_t s) { if (nettle_pkcs1_rsa_sha256_encode_digest(s, key->size, digest)) { nettle_rsa_compute_root(key, s, s); return 1; } else { __gmpz_set_ui(s, 0); 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": 1, "switch_statement": 0, "type_casting": 0,...
transcoder-set#MINIMUM_STEPS_TO_DELETE_A_STRING_AFTER_REPEATED_DELETION_OF_PALINDROME_SUBSTRINGS_prep#f_filled.c
transcoder-set
MINIMUM_STEPS_TO_DELETE_A_STRING_AFTER_REPEATED_DELETION_OF_PALINDROME_SUBSTRINGS.c
f_filled
1
int f_filled ( char str [] ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
json.h#allow_inf_and_nan_prep#json_skip_whitespace.c
json.h
allow_inf_and_nan.c
json_skip_whitespace
35
int json_skip_whitespace(struct json_parse_state_s *state) { size_t offset = state->offset; const size_t size = state->size; const char *const src = state->src; if (offset >= state->size) { return 0; } switch (src[offset]) { default: return 0; case ' ': case '\r': case '\t': case '\n': ...
{ "array_type": 1, "break_continue_statement": 3, "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": 4, "struct_type": 1, "switch_statement": 2, "type_casting": 0,...
mcsim-6.2.0#matutil_prep#ColumnMeans.c
mcsim-6.2.0
matutil.c
ColumnMeans
8
void ColumnMeans (long cRows, long cCols, double **x, double *x_bar) { register long i, l; for (l = 0; l < cCols; l++) x_bar[l] = 0.0; for (i = 0; i < cRows; i++) for (l = 0; l < cCols; l++) x_bar[l] += x[i][l]; for (l = 0; l < cCols; l++) x_bar[l] /= cRows; }
{ "array_type": 2, "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": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4_prep#sort.c
transcoder-set
COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4.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,...
patch-2.7.6#hard-locale_prep#hard_locale.c
patch-2.7.6
hard-locale.c
hard_locale
29
_Bool hard_locale (int category) { _Bool hard = 1; char const *p = setlocale (category, ((void *)0)); if (p) { if (2 <= 2) { if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0) hard = 0; } else { char *locale = strdup (p); if (loc...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 1, "memory_operation": 0, "pointer_type": 2, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
heman#mat3_prep#kmMat3Translation.c
heman
mat3.c
kmMat3Translation
7
kmMat3* kmMat3Translation(kmMat3* pOut, const float x, const float y) { kmMat3Identity(pOut); pOut->mat[6] = x; pOut->mat[7] = y; return pOut; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
gprolog-1.5.0#ma2asm_inst_prep#Pl_Ret.c
gprolog-1.5.0
ma2asm_inst.c
Pl_Ret
5
void Pl_Ret(void) { Inst_Printf("jmp", "*%s", asm_reg_cp); }
{ "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,...
mtools-4.0.43#file_prep#getDirCacheP.c
mtools-4.0.43
file.c
getDirCacheP
4
struct dirCache_t **getDirCacheP(Stream_t *Stream) { return &getUnbufferedFile(Stream)->dcp; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#DYNAMIC_PROGRAMMING_HIGH_EFFORT_VS_LOW_EFFORT_TASKS_PROBLEM_prep#f_filled.c
transcoder-set
DYNAMIC_PROGRAMMING_HIGH_EFFORT_VS_LOW_EFFORT_TASKS_PROBLEM.c
f_filled
1
int f_filled ( int high [ ], int low [ ], 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,...
gprolog-1.5.0#linedit_prep#Pl_LE_Compl_Del_Word.c
gprolog-1.5.0
linedit.c
Pl_LE_Compl_Del_Word
19
char * Pl_LE_Compl_Del_Word(char *word) { CompNode **p; CompNode *q; int cmp; for (p = &comp_start; *p; p = &(*p)->next) { cmp = strcmp((*p)->word, word); if (cmp == 0) break; if (cmp > 0) return ((void *)0); } q = *p; *p = q->next; free(q); return word; }
{ "array_type": 0, "break_continue_statement": 1, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 1, "memory_operation": 0, "pointer_type": 2, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
transcoder-set#COMPOSITE_NUMBER_prep#len.c
transcoder-set
COMPOSITE_NUMBER.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,...
gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Fast_Div.c
gprolog-1.5.0
arith_inl_c.c
Pl_Fct_Fast_Div
9
WamWord Pl_Fct_Fast_Div(WamWord x, WamWord y) { PlLong vx = ((PlLong) ((x) << 0) >> 3); PlLong vy = ((PlLong) ((y) << 0) >> 3); if (vy == 0) Pl_Err_Evaluation(pl_evaluation_zero_divisor); return (((PlULong) (vx / vy) << 3) | (PlULong)0x7); }
{ "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,...
transcoder-set#COUNT_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_1_prep#len.c
transcoder-set
COUNT_STRINGS_CAN_FORMED_USING_B_C_GIVEN_CONSTRAINTS_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,...
transcoder-set#FIND_PATTERNS_101_GIVEN_STRING_prep#f_filled.c
transcoder-set
FIND_PATTERNS_101_GIVEN_STRING.c
f_filled
1
int f_filled ( char str [] ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
bc-1.07.1#load_prep#def_label.c
bc-1.07.1
load.c
def_label
26
void def_label (unsigned long lab) { bc_label_group *temp; unsigned long group, offset, func; group = lab >> 6; offset = lab % 64; func = load_adr.pc_func; if (functions[func].f_label == ((void *)0)) { functions[func].f_label = bc_malloc (sizeof(bc_label_group)); functions[func].f_label->l_n...
{ "array_type": 2, "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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 4,...
screen-4.9.0#socket_prep#SendErrorMsg.c
screen-4.9.0
socket.c
SendErrorMsg
23
int SendErrorMsg(tty, buf) char *tty, *buf; { int s; struct msg m; _Bool is_socket; do {} while (0); strncpy(m.m.message, buf, sizeof(m.m.message) - 1); m.m.message[sizeof(m.m.message) - 1] = 0; is_socket = IsSocket(SockPath); s = MakeClientSocket(0, is_socket); if (s < 0) return -1; m.type = 1;...
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
findutils-4.9.0#ioctl_prep#rpl_ioctl.c
findutils-4.9.0
ioctl.c
rpl_ioctl
10
int rpl_ioctl (int fd, int request, ... ) { void *buf; va_list args; __builtin_va_start(args,request); buf = __builtin_va_arg(args,void *); __builtin_va_end(args); return ioctl (fd, (unsigned int) request, buf); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#parserInternals_prep#xmlCtxtNewInputFromString.c
libxml2
parserInternals.c
xmlCtxtNewInputFromString
15
xmlParserInputPtr xmlCtxtNewInputFromString(xmlParserCtxtPtr ctxt, const char *url, const char *str, const char *encoding, int flags) { xmlParserInputPtr input; if ((ctxt == ((void *)0)) || (str == ((void *)0))) return(((void *)0)); input = xmlNewInputFromString(url, str, flags); ...
{ "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": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
libxml2#xmlunicode_prep#xmlUCSIsKangxiRadicals.c
libxml2
xmlunicode.c
xmlUCSIsKangxiRadicals
4
int xmlUCSIsKangxiRadicals(int code) { return(((code >= 0x2F00) && (code <= 0x2FDF))); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
tulipindicators-0.9.1#typprice_prep#ti_typprice_start.c
tulipindicators-0.9.1
typprice.c
ti_typprice_start
4
int ti_typprice_start(double const *options) { (void)options; return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Abs.c
gprolog-1.5.0
arith_inl_c.c
Pl_Fct_Abs
5
WamWord Pl_Fct_Abs(WamWord x) { return ((((PlLong) (x) & ((PlULong)0x7)) == (PlULong)0x7)) ? Pl_Fct_Fast_Abs(x) : Make_Tagged_Float(fabs(To_Double(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": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
wget-1.21.4#css__prep#yy_flush_buffer.c
wget-1.21.4
css_.c
yy_flush_buffer
13
void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; b->yy_ch_buf[0] = 0; b->yy_ch_buf[1] = 0; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = 0; if ( b == ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : ((void *)0)) ) yy_load_buffe...
{ "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": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
ed-1.19#main_prep#traditional.c
ed-1.19
main.c
traditional
1
bool traditional( void ) { return traditional_; }
{ "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,...
less-633#option_prep#getnum.c
less-633
option.c
getnum
23
int getnum(char **sp, char *printopt, int *errp) { char *s; int n; int neg; s = skipsp(*sp); neg = 0; if (*s == '-') { neg = 1; s++; } if (*s < '0' || *s > '9') return (num_error(printopt, errp, 0)); n = lstrtoi(s, sp, 10); if (n < 0) return (num_error(printopt, errp, 1)); if (errp != ((void *)0)) ...
{ "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": 1, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
wget-1.21.4#css__prep#yyset_debug.c
wget-1.21.4
css_.c
yyset_debug
4
void yyset_debug (int _bdebug ) { yy_flex_debug = _bdebug ; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
transcoder-set#FIND_ONE_EXTRA_CHARACTER_STRING_1_prep#main.c
transcoder-set
FIND_ONE_EXTRA_CHARACTER_STRING_1.c
main
15
int main(void) { int n_success = 0; char param0[][100] = {"obfLA mmMYvghH","2941","0111111","oWvbFstI","4937516500","101110100","hYZscJQFBE","58443","1100","ZUdYuIBVNaeeb"}; char param1[][100] = {"obfLA mmMYvghH","23941","01011111","oWvsbFstI","49376516500","1011210100","hYZscJQQFBE","584443","11000","ZUdY...
{ "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,...
transcoder-set#SUM_OF_ALL_ELEMENTS_UP_TO_NTH_ROW_IN_A_PASCALS_TRIANGLE_prep#min.c
transcoder-set
SUM_OF_ALL_ELEMENTS_UP_TO_NTH_ROW_IN_A_PASCALS_TRIANGLE.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,...
optipng-0.7.8#pngrio_prep#png_default_read_data.c
optipng-0.7.8
pngrio.c
png_default_read_data
10
void png_default_read_data(png_structp png_ptr, png_bytep data, size_t length) { size_t check; if (png_ptr == ((void *)0)) return; check = fread(data, 1, length, (png_ptr->io_ptr)); if (check != length) png_error(png_ptr, "Read Error"); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
json.h#allow_leading_plus_sign_prep#utest_main.c
json.h
allow_leading_plus_sign.c
utest_main
118
__attribute__((weak)) int utest_main(int argc, const char *const argv[]) { utest_uint64_t failed = 0; size_t index = 0; size_t *failed_testcases = 0; size_t failed_testcases_length = 0; const char *filter = 0; utest_uint64_t ran_tests = 0; enum colours { RESET, GREEN, RED }; const int use_colours = (isa...
{ "array_type": 5, "break_continue_statement": 2, "enum_type": 0, "for_loop": 7, "function_pointer": 0, "goto_statement": 1, "if_statement": 15, "memory_management": 4, "memory_operation": 0, "pointer_type": 3, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 6...
patch-2.7.6#quotearg_prep#quote.c
patch-2.7.6
quotearg.c
quote
5
char const * quote (char const *arg) { return quote_n (0, arg); }
{ "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,...
uucp-1.07#getopt_prep#gnu_getopt.c
uucp-1.07
getopt.c
gnu_getopt
11
int gnu_getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
gprolog-1.5.0#machine_prep#Pl_M_Set_Working_Dir.c
gprolog-1.5.0
machine.c
Pl_M_Set_Working_Dir
6
Bool Pl_M_Set_Working_Dir(char *path) { char *new_path = Pl_M_Absolute_Path_Name(path); return (new_path != ((void *)0) && chdir(new_path) == 0); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1,...
libxml2#libxml2-py_prep#libxml_xmlUCSIsNumberForms.c
libxml2
libxml2-py.c
libxml_xmlUCSIsNumberForms
13
PyObject * libxml_xmlUCSIsNumberForms(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsNumberForms") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSIsNumberForms...
{ "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,...
tar-1.34#xheader_prep#xheader_xhdr_name.c
tar-1.34
xheader.c
xheader_xhdr_name
7
char * xheader_xhdr_name (struct tar_stat_info *st) { if (!exthdr_name) assign_string (&exthdr_name, header_template[pax_file_header][posixly_correct]); return xheader_format_name (st, exthdr_name, 0); }
{ "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": 1, "switch_statement": 0, "type_casting": 0,...
mtools-4.0.43#init_prep#GetFs.c
mtools-4.0.43
init.c
GetFs
6
Stream_t *GetFs(Stream_t *Fs) { while(Fs && Fs->Class != &FsClass) Fs = Fs->Next; return Fs; }
{ "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,...
json.h#allow_location_information_prep#json_parse_array.c
json.h
allow_location_information.c
json_parse_array
57
void json_parse_array(struct json_parse_state_s *state, struct json_array_s *array) { const char *const src = state->src; const size_t size = state->size; size_t elements = 0; int allow_comma = 0; struct json_array_element_s *previous = 0; state->offset++; (void)json_skip_all_skippab...
{ "array_type": 0, "break_continue_statement": 2, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 7, "memory_management": 0, "memory_operation": 0, "pointer_type": 4, "return_statement": 0, "struct_type": 6, "switch_statement": 0, "type_casting": 8,...
transcoder-set#COUNT_PAIRS_DIFFERENCE_EQUAL_K_prep#f_gold.c
transcoder-set
COUNT_PAIRS_DIFFERENCE_EQUAL_K.c
f_gold
11
int f_gold ( int arr [ ], int n, int k ) { int count = 0; for ( int i = 0; i < n; i ++ ) { for ( int j = i + 1; j < n; j ++ ) if ( arr [ i ] - arr [ j ] == k || arr [ j ] - arr [ i ] == k ) count ++; } return count; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#parser_prep#xmlCheckLanguageID.c
libxml2
parser.c
xmlCheckLanguageID
105
int xmlCheckLanguageID(const xmlChar * lang) { const xmlChar *cur = lang, *nxt; if (cur == ((void *)0)) return (0); if (((cur[0] == 'i') && (cur[1] == '-')) || ((cur[0] == 'I') && (cur[1] == '-')) || ((cur[0] == 'x') && (cur[1] == '-')) || ((cur[0] == 'X') && (cur[1] == '-'))...
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 10, "if_statement": 29, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 21, "struct_type": 0, "switch_statement": 0, "type_casting":...
gzip-1.12#printf-args_prep#printf_fetchargs.c
gzip-1.12
printf-args.c
printf_fetchargs
95
int printf_fetchargs (va_list args, arguments *a) { size_t i; argument *ap; for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) switch (ap->type) { case TYPE_SCHAR: ap->a.a_schar = __builtin_va_arg(args,int); break; case TYPE_UCHAR: ap->a.a_uchar = __builtin_va_arg(...
{ "array_type": 1, "break_continue_statement": 22, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 1, "type_casting": 3...
libxml2#libxml2-py_prep#libxml_htmlParseCharRef.c
libxml2
libxml2-py.c
libxml_htmlParseCharRef
15
PyObject * libxml_htmlParseCharRef(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; htmlParserCtxtPtr ctxt; PyObject *pyobj_ctxt; if (libxml_deprecationWarning("htmlParseCharRef") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(ar...
{ "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": 2, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 5,...
json.h#allow_simplified_json_prep#json_value_is_false.c
json.h
allow_simplified_json.c
json_value_is_false
3
int json_value_is_false(const struct json_value_s *const value) { return value->type == json_type_false; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0,...
transcoder-set#BIRTHDAY_PARADOX_prep#len.c
transcoder-set
BIRTHDAY_PARADOX.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,...
json.h#allow_global_object_prep#json_parse_key.c
json.h
allow_global_object.c
json_parse_key
23
void json_parse_key(struct json_parse_state_s *state, struct json_string_s *string) { if (json_parse_flags_allow_unquoted_keys & state->flags_bitset) { const char *const src = state->src; char *const data = state->data; size_t offset = state->offset; if (('"' == src[offset]) || ('\...
{ "array_type": 2, "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": 2, "switch_statement": 0, "type_casting": 0,...
wget-1.21.4#ptimer_prep#ptimer_destroy.c
wget-1.21.4
ptimer.c
ptimer_destroy
5
void ptimer_destroy (struct ptimer *pt) { do { free ((void *) (pt)); pt = ((void *)0); } while (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": 1, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 1,...
bc-1.07.1#execute_prep#byte.c
bc-1.07.1
execute.c
byte
5
unsigned char byte ( program_counter *p ) { return (functions[p->pc_func].f_body[p->pc_addr++]); }
{ "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,...
optipng-0.7.8#infback_prep#inflateBackInit_.c
optipng-0.7.8
infback.c
inflateBackInit_
30
int inflateBackInit_(z_streamp strm, int windowBits, unsigned char *window, const char *version, int stream_size) { struct inflate_state *state; if (version == 0 || version[0] != "1.3-optipng"[0] || stream_size != (int)(sizeof(z_stream))) ...
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 4, "struct_type": 1, "switch_statement": 0, "type_casting": 3,...
transcoder-set#HOW_TO_TURN_OFF_A_PARTICULAR_BIT_IN_A_NUMBER_prep#max.c
transcoder-set
HOW_TO_TURN_OFF_A_PARTICULAR_BIT_IN_A_NUMBER.c
max
1
int max(int x, int y) { return (x > y)? x: y; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0,...
libxml2#xpath_prep#xmlInitXPathInternal.c
libxml2
xpath.c
xmlInitXPathInternal
7
__attribute__((no_sanitize("float-divide-by-zero"))) void xmlInitXPathInternal(void) { xmlXPathNAN = (__builtin_nanf ("")); xmlXPathPINF = (__builtin_inff ()); xmlXPathNINF = -(__builtin_inff ()); }
{ "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,...