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#WRITE_A_C_PROGRAM_TO_FIND_THE_PARITY_OF_AN_UNSIGNED_INTEGER_prep#min.c
transcoder-set
WRITE_A_C_PROGRAM_TO_FIND_THE_PARITY_OF_AN_UNSIGNED_INTEGER.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#MINIMUM_NUMBER_PLATFORMS_REQUIRED_RAILWAYBUS_STATION_prep#min.c
transcoder-set
MINIMUM_NUMBER_PLATFORMS_REQUIRED_RAILWAYBUS_STATION.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_xmlUCSIsEnclosedAlphanumerics.c
libxml2
libxml2-py.c
libxml_xmlUCSIsEnclosedAlphanumerics
13
PyObject * libxml_xmlUCSIsEnclosedAlphanumerics(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsEnclosedAlphanumerics") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSIsEnclosedAlphanumerics", &code)) return(((void *)0)); c_retval = xmlUCSIsEnclosedAlphanumerics(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#MAXIMUM_TRIPLET_SUM_ARRAY_prep#f_filled.c
transcoder-set
MAXIMUM_TRIPLET_SUM_ARRAY.c
f_filled
1
int f_filled ( int arr [ ], int n ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
dap-3.10#ps_prep#pict_rectangle.c
dap-3.10
ps.c
pict_rectangle
9
void pict_rectangle(pict *p, double llx, double lly, double sx, double sy) { strcpy(p->pict_type, "LINE"); pict_point(p, llx, lly); pict_point(p, llx + sx, lly); pict_point(p, llx + sx, lly + sy); pict_point(p, llx, lly + sy); pict_point(p, llx, lly); }
{ "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_inf_and_nan_prep#json_get_key_size.c
json.h
allow_inf_and_nan.c
json_get_key_size
31
int json_get_key_size(struct json_parse_state_s *state) { const size_t flags_bitset = state->flags_bitset; if (json_parse_flags_allow_unquoted_keys & flags_bitset) { size_t offset = state->offset; const size_t size = state->size; const char *const src = state->src; size_t data_size = state->data_size; if ('"' == src[offset]) { return json_get_string_size(state, 1); } else if ((json_parse_flags_allow_single_quoted_strings & flags_bitset) && ('\'' == src[offset])) { return json_get_string_size(state, 1); } else { while ((offset < size) && is_valid_unquoted_key_char(src[offset])) { offset++; data_size++; } data_size++; if (json_parse_flags_allow_location_information & flags_bitset) { state->dom_size += sizeof(struct json_string_ex_s); } else { state->dom_size += sizeof(struct json_string_s); } state->offset = offset; state->data_size = data_size; return 0; } } else { return json_get_string_size(state, 1); } }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 4, "struct_type": 1, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 1 }
nettle-3.9.1#hmac-gosthash94_prep#nettle_hmac_gosthash94_update.c
nettle-3.9.1
hmac-gosthash94.c
nettle_hmac_gosthash94_update
6
void nettle_hmac_gosthash94_update(struct hmac_gosthash94_ctx *ctx, size_t length, const uint8_t *data) { nettle_gosthash94_update(&ctx->state, 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": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#PROGRAM_PRINT_SUM_GIVEN_NTH_TERM_prep#min.c
transcoder-set
PROGRAM_PRINT_SUM_GIVEN_NTH_TERM.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 }
json.h#allow_hexadecimal_numbers_prep#json_skip_all_skippables.c
json.h
allow_hexadecimal_numbers.c
json_skip_all_skippables
31
int json_skip_all_skippables(struct json_parse_state_s *state) { int did_consume = 0; const size_t size = state->size; if (json_parse_flags_allow_c_style_comments & state->flags_bitset) { do { if (state->offset == size) { state->error = json_parse_error_premature_end_of_buffer; return 1; } did_consume = json_skip_whitespace(state); if (state->offset >= size) { state->error = json_parse_error_premature_end_of_buffer; return 1; } did_consume |= json_skip_c_style_comments(state); } while (0 != did_consume); } else { do { if (state->offset == size) { state->error = json_parse_error_premature_end_of_buffer; return 1; } did_consume = json_skip_whitespace(state); } while (0 != did_consume); } if (state->offset == size) { state->error = json_parse_error_premature_end_of_buffer; 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": 5, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 5, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 2 }
grep-3.11#grep_prep#main.c
grep-3.11
grep.c
main
441
int main (int argc, char **argv) { char *keys = ((void *)0); idx_t keycc = 0, keyalloc = 0; int matcher = -1; int opt; int prev_optind, last_recursive; intmax_t default_context; FILE *fp; exit_failure = EXIT_TROUBLE; ; int filename_option = 0; eolbyte = '\n'; filename_mask = ~0; max_count = (9223372036854775807L); out_after = out_before = -1; default_context = -1; only_matching = 0; setlocale (6, ""); bindtextdomain ("grep", "/usr/local/share/locale"); textdomain ("grep"); init_localeinfo (&localeinfo); atexit (clean_up_stdout); c_stack_action (((void *)0)); last_recursive = 0; pattern_table = hash_initialize (0, 0, hash_pattern, compare_patterns, 0); if (!pattern_table) xalloc_die (); while (prev_optind = optind, (opt = get_nondigit_option (argc, argv, &default_context)) != -1) switch (opt) { case 'A': context_length_arg (optarg, &out_after); break; case 'B': context_length_arg (optarg, &out_before); break; case 'C': context_length_arg (optarg, &default_context); break; case 'D': if ((strcmp (optarg, "read") == 0)) devices = READ_DEVICES; else if ((strcmp (optarg, "skip") == 0)) devices = SKIP_DEVICES; else ((!!sizeof (struct { _Static_assert (EXIT_TROUBLE, "verify_expr (" "EXIT_TROUBLE" ", " "(error (EXIT_TROUBLE, 0, gettext(\"unknown devices method\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_TROUBLE, 0, gettext("unknown devices method")), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_TROUBLE, 0, gettext("unknown devices method")), ((0) ? (void) 0 : __builtin_unreachable ())))); break; case 'E': matcher = setmatcher ("egrep", matcher); break; case 'F': matcher = setmatcher ("fgrep", matcher); break; case 'P': matcher = setmatcher ("perl", matcher); break; case 'G': matcher = setmatcher ("grep", matcher); break; case 'X': matcher = setmatcher (optarg, matcher); break; case 'H': filename_option = 1; break; case 'I': binary_files = WITHOUT_MATCH_BINARY_FILES; break; case 'T': align_tabs = 1; break; case 'U': if (0) binary = 1; break; case 'u': error (0, 0, gettext("warning: --unix-byte-offsets (-u) is obsolete")); break; case 'V': show_version = 1; break; case 'a': binary_files = TEXT_BINARY_FILES; break; case 'b': out_byte = 1; break; case 'c': count_matches = 1; break; case 'd': directories = ((directories_types) [__xargmatch_internal ("--directories", optarg, directories_args, (void const *) (directories_types), sizeof *(directories_types), argmatch_die, 1)]); if (directories == RECURSE_DIRECTORIES) last_recursive = prev_optind; break; case 'e': { idx_t cc = strlen (optarg); ptrdiff_t shortage = keycc - keyalloc + cc + 1; if (0 < shortage) pattern_array = keys = xpalloc (keys, &keyalloc, shortage, -1, 1); char *keyend = mempcpy (keys + keycc, optarg, cc); *keyend = '\n'; keycc = update_patterns (keys, keycc, keycc + cc + 1, ""); } break; case 'f': { if ((strcmp (optarg, "-") == 0)) { if (binary) xset_binary_mode (0, 0); fp = stdin; } else { fp = rpl_fopen (optarg, binary ? "rb" : "r"); if (!fp) ((!!sizeof (struct { _Static_assert (EXIT_TROUBLE, "verify_expr (" "EXIT_TROUBLE" ", " "(error (EXIT_TROUBLE, (*__errno_location ()), \"%s\", optarg), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_TROUBLE, (*__errno_location ()), "%s", optarg), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_TROUBLE, (*__errno_location ()), "%s", optarg), ((0) ? (void) 0 : __builtin_unreachable ())))); } idx_t newkeycc = keycc, cc; for (;; newkeycc += cc) { ptrdiff_t shortage = newkeycc - keyalloc + 2; if (0 < shortage) pattern_array = keys = xpalloc (keys, &keyalloc, shortage, -1, 1); cc = fread_unlocked (keys + newkeycc,1,keyalloc - (newkeycc + 1),fp); if (cc == 0) break; } int err = (*__errno_location ()); if (!ferror_unlocked (fp)) { err = 0; if (fp == stdin) clearerr_unlocked (fp); else if (fclose (fp) != 0) err = (*__errno_location ()); } if (err) ((!!sizeof (struct { _Static_assert (EXIT_TROUBLE, "verify_expr (" "EXIT_TROUBLE" ", " "(error (EXIT_TROUBLE, err, \"%s\", optarg), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_TROUBLE, err, "%s", optarg), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_TROUBLE, err, "%s", optarg), ((0) ? (void) 0 : __builtin_unreachable ())))); if (newkeycc != keycc && keys[newkeycc - 1] != '\n') keys[newkeycc++] = '\n'; keycc = update_patterns (keys, keycc, newkeycc, optarg); } break; case 'h': filename_option = -1; break; case 'i': case 'y': match_icase = 1; break; case NO_IGNORE_CASE_OPTION: match_icase = 0; break; case 'L': list_files = LISTFILES_NONMATCHING; break; case 'l': list_files = LISTFILES_MATCHING; break; case 'm': switch (xstrtoimax (optarg, 0, 10, &max_count, "")) { case LONGINT_OK: case LONGINT_OVERFLOW: break; default: ((!!sizeof (struct { _Static_assert (EXIT_TROUBLE, "verify_expr (" "EXIT_TROUBLE" ", " "(error (EXIT_TROUBLE, 0, gettext(\"invalid max count\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_TROUBLE, 0, gettext("invalid max count")), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_TROUBLE, 0, gettext("invalid max count")), ((0) ? (void) 0 : __builtin_unreachable ())))); } break; case 'n': out_line = 1; break; case 'o': only_matching = 1; break; case 'q': exit_on_match = 1; exit_failure = 0; break; case 'R': fts_options = basic_fts_options | 0x0002; __attribute__ ((__fallthrough__)); case 'r': directories = RECURSE_DIRECTORIES; last_recursive = prev_optind; break; case 's': suppress_errors = 1; break; case 'v': out_invert = 1; break; case 'w': wordinit (); match_words = 1; break; case 'x': match_lines = 1; break; case 'Z': filename_mask = 0; break; case 'z': eolbyte = '\0'; break; case BINARY_FILES_OPTION: if ((strcmp (optarg, "binary") == 0)) binary_files = BINARY_BINARY_FILES; else if ((strcmp (optarg, "text") == 0)) binary_files = TEXT_BINARY_FILES; else if ((strcmp (optarg, "without-match") == 0)) binary_files = WITHOUT_MATCH_BINARY_FILES; else ((!!sizeof (struct { _Static_assert (EXIT_TROUBLE, "verify_expr (" "EXIT_TROUBLE" ", " "(error (EXIT_TROUBLE, 0, gettext(\"unknown binary-files type\")), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_TROUBLE, 0, gettext("unknown binary-files type")), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_TROUBLE, 0, gettext("unknown binary-files type")), ((0) ? (void) 0 : __builtin_unreachable ())))); break; case COLOR_OPTION: if (optarg) { if (!c_strcasecmp (optarg, "always") || !c_strcasecmp (optarg, "yes") || !c_strcasecmp (optarg, "force")) color_option = 1; else if (!c_strcasecmp (optarg, "never") || !c_strcasecmp (optarg, "no") || !c_strcasecmp (optarg, "none")) color_option = 0; else if (!c_strcasecmp (optarg, "auto") || !c_strcasecmp (optarg, "tty") || !c_strcasecmp (optarg, "if-tty")) color_option = 2; else show_help = 1; } else color_option = 2; break; case EXCLUDE_OPTION: case INCLUDE_OPTION: for (int cmd = 0; cmd < 2; cmd++) { if (!excluded_patterns[cmd]) excluded_patterns[cmd] = new_exclude (); add_exclude (excluded_patterns[cmd], optarg, ((opt == INCLUDE_OPTION ? (1 << 29) : 0) | exclude_options (cmd))); } break; case EXCLUDE_FROM_OPTION: for (int cmd = 0; cmd < 2; cmd++) { if (!excluded_patterns[cmd]) excluded_patterns[cmd] = new_exclude (); if (add_exclude_file (add_exclude, excluded_patterns[cmd], optarg, exclude_options (cmd), '\n') != 0) ((!!sizeof (struct { _Static_assert (EXIT_TROUBLE, "verify_expr (" "EXIT_TROUBLE" ", " "(error (EXIT_TROUBLE, (*__errno_location ()), \"%s\", optarg), assume (false))" ")"); int _gl_dummy; })) ? ((error (EXIT_TROUBLE, (*__errno_location ()), "%s", optarg), ((0) ? (void) 0 : __builtin_unreachable ()))) : ((error (EXIT_TROUBLE, (*__errno_location ()), "%s", optarg), ((0) ? (void) 0 : __builtin_unreachable ())))); } break; case EXCLUDE_DIRECTORY_OPTION: strip_trailing_slashes (optarg); for (int cmd = 0; cmd < 2; cmd++) { if (!excluded_directory_patterns[cmd]) excluded_directory_patterns[cmd] = new_exclude (); add_exclude (excluded_directory_patterns[cmd], optarg, exclude_options (cmd)); } break; case GROUP_SEPARATOR_OPTION: group_separator = optarg; break; case LINE_BUFFERED_OPTION: line_buffered = 1; break; case LABEL_OPTION: label = optarg; break; case 0: break; default: usage (EXIT_TROUBLE); break; } if (show_version) { version_etc (stdout, getprogname (), "GNU grep", "3.11", (char *) ((void *)0)); puts (gettext("Written by Mike Haertel and others; see\n" "<https://git.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>.")); Pprint_version (); return 0; } if (show_help) usage (0); if (keys) { if (keycc == 0) { out_invert ^= 1; match_lines = match_words = 0; keys[keycc++] = '\n'; } } else if (optind < argc) { char const *pat = argv[optind++]; _Bool skip_bs = (matcher != F_MATCHER_INDEX && pat[0] == '\\' && pat[1] == '-'); pattern_array = keys = xstrdup (pat + skip_bs); idx_t patlen = strlen (keys); keys[patlen] = '\n'; keycc = update_patterns (keys, 0, patlen + 1, ""); } else usage (EXIT_TROUBLE); keycc--; hash_free (pattern_table); _Bool possibly_tty = 0; struct stat tmp_stat; if (! exit_on_match && fstat (1, &tmp_stat) == 0) { if (((((tmp_stat.st_mode)) & 0170000) == (0100000))) out_stat = tmp_stat; else if (((((tmp_stat.st_mode)) & 0170000) == (0020000))) { struct stat null_stat; if (stat ("/dev/null", &null_stat) == 0 && ((tmp_stat).st_ino == (null_stat).st_ino && (tmp_stat).st_dev == (null_stat).st_dev)) dev_null_output = 1; else possibly_tty = 1; } } if (exit_on_match | dev_null_output) list_files = LISTFILES_NONE; if ((exit_on_match | dev_null_output) || list_files != LISTFILES_NONE) { count_matches = 0; done_on_match = 1; } out_quiet = count_matches | done_on_match; if (out_after < 0) out_after = default_context; if (out_before < 0) out_before = default_context; if ((max_count == 0 || (keycc == 0 && out_invert && !match_lines && !match_words)) && list_files != LISTFILES_NONMATCHING) return 1; if (color_option == 2) color_option = possibly_tty && should_colorize () && isatty (1); init_colorize (); if (color_option) { char *userval = getenv ("GREP_COLOR"); if (userval != ((void *)0) && *userval != '\0') for (char *q = userval; *q == ';' || c_isdigit (*q); q++) if (!q[1]) { selected_match_color = context_match_color = userval; break; } parse_grep_colors (); if (selected_match_color == userval || context_match_color == userval) error (0, 0, gettext("warning: GREP_COLOR='%s' is deprecated;" " use GREP_COLORS='mt=%s'"), userval, userval); } initialize_unibyte_mask (); if (matcher < 0) matcher = G_MATCHER_INDEX; if (matcher == F_MATCHER_INDEX || matcher == E_MATCHER_INDEX || matcher == G_MATCHER_INDEX) { if (match_icase) setup_ok_fold (); if (matcher == F_MATCHER_INDEX) { if (! localeinfo.multibyte ? n_patterns == 1 && match_words : (contains_encoding_error (keys, keycc) || (match_icase && !fgrep_icase_available (keys, keycc)))) { fgrep_to_grep_pattern (&pattern_array, &keycc); keys = pattern_array; matcher = G_MATCHER_INDEX; } } else if (1 < n_patterns) matcher = try_fgrep_pattern (matcher, keys, &keycc); } execute = matchers[matcher].execute; compiled_pattern = matchers[matcher].compile (keys, keycc, matchers[matcher].syntax, only_matching | color_option); char eolbytes[3] = { 0, eolbyte, 0 }; idx_t match_size; skip_empty_lines = ((execute (compiled_pattern, eolbytes + 1, 1, &match_size, ((void *)0)) == 0) == out_invert); int num_operands = argc - optind; out_file = (filename_option == 0 && num_operands <= 1 ? - (directories == RECURSE_DIRECTORIES) : 0 <= filename_option); if (binary) xset_binary_mode (1, 0); long psize = sysconf (_SC_PAGESIZE); if (! (0 < psize && psize <= ((9223372036854775807L) - uword_size) / 2)) abort (); pagesize = psize; bufalloc = ((uintptr_t) (INITIAL_BUFSIZE) % (pagesize) == 0 ? (INITIAL_BUFSIZE) : (INITIAL_BUFSIZE) + ((pagesize) - (uintptr_t) (INITIAL_BUFSIZE) % (pagesize))) + pagesize + uword_size; buffer = ximalloc (bufalloc); if (fts_options & 0x0002 && devices == READ_COMMAND_LINE_DEVICES) devices = READ_DEVICES; char *const *files; if (0 < num_operands) { files = argv + optind; } else if (directories == RECURSE_DIRECTORIES && 0 < last_recursive) { static char *const cwd_only[] = { (char *) ".", ((void *)0) }; files = cwd_only; omit_dot_slash = 1; } else { static char *const stdin_only[] = { (char *) "-", ((void *)0) }; files = stdin_only; } _Bool status = 1; do status &= grep_command_line_arg (*files++); while (*files != ((void *)0)); return errseen ? EXIT_TROUBLE : status; }
{ "array_type": 7, "break_continue_statement": 50, "enum_type": 0, "for_loop": 5, "function_pointer": 0, "goto_statement": 0, "if_statement": 57, "memory_management": 0, "memory_operation": 0, "pointer_type": 7, "return_statement": 3, "struct_type": 0, "switch_statement": 2, "type_casting": 14, "union_type": 0, "while_loop": 2 }
nano-7.2#files_prep#input_tab.c
nano-7.2
files.c
input_tab
95
char *input_tab(char *morsel, size_t *place, void (*refresh_func)(void), _Bool *listed) { size_t num_matches = 0; char **matches = ((void *)0); if (morsel[*place] != '\0') { beep(); return morsel; } if (morsel[0] == '~' && strchr(morsel, '/') == ((void *)0)) matches = username_completion(morsel, *place, &num_matches); if (matches == ((void *)0)) matches = filename_completion(morsel, &num_matches); if (*listed && num_matches < 2) { refresh_func(); *listed = 0; } if (matches == ((void *)0)) { beep(); return morsel; } const char *lastslash = revstrstr(morsel, "/", morsel + *place); size_t length_of_path = (lastslash == ((void *)0)) ? 0 : lastslash - morsel + 1; size_t match, common_len = 0; char *shared, *glued; char char1[4], char2[4]; int len1, len2; while (1) { len1 = collect_char(matches[0] + common_len, char1); for (match = 1; match < num_matches; match++) { len2 = collect_char(matches[match] + common_len, char2); if (len1 != len2 || strncmp(char1, char2, len2) != 0) break; } if (match < num_matches || matches[0][common_len] == '\0') break; common_len += len1; } shared = nmalloc(length_of_path + common_len + 1); strncpy(shared, morsel, length_of_path); strncpy(shared + length_of_path, matches[0], common_len); common_len += length_of_path; shared[common_len] = '\0'; glued = nmalloc(strlen(present_path) + common_len + 1); sprintf(glued, "%s%s", present_path, shared); if (num_matches == 1 && (is_dir(shared) || is_dir(glued))) shared[common_len++] = '/'; if (common_len != *place) { morsel = nrealloc(morsel, common_len + 1); strncpy(morsel, shared, common_len); morsel[common_len] = '\0'; *place = common_len; } else if (num_matches == 1) beep(); if (num_matches > 1) { int lastrow = editwinrows - 1 - (((flags[((ZERO) / (sizeof(unsigned) * 8))] & ((unsigned)1 << ((ZERO) % (sizeof(unsigned) * 8)))) != 0) && LINES > 1 ? 1 : 0); size_t longest_name = 0; size_t nrows, ncols; int row; if (!*listed) beep(); qsort(matches, num_matches, sizeof(char *), diralphasort); for (match = 0; match < num_matches; match++) { size_t namelen = breadth(matches[match]); if (namelen > longest_name) longest_name = namelen; } if (longest_name > COLS - 1) longest_name = COLS - 1; ncols = (COLS + 1) / (longest_name + 2); nrows = (num_matches + ncols - 1) / ncols; row = (nrows < lastrow) ? lastrow - nrows : 0; blank_edit(); curs_set(0); for (match = 0; match < num_matches; match++) { char *disp; wmove(midwin, row, (longest_name + 2) * (match % ncols)); if (row == lastrow && (match + 1) % ncols == 0 && match + 1 < num_matches) { waddnstr(midwin,gettext("(more)"),-1); break; } disp = display_string(matches[match], 0, longest_name, 0, 0); waddnstr(midwin,disp,-1); free(disp); if ((match + 1) % ncols == 0) row++; } wnoutrefresh(midwin); *listed = 1; } free_chararray(matches, num_matches); free(glued); free(shared); return morsel; }
{ "array_type": 5, "break_continue_statement": 3, "enum_type": 0, "for_loop": 3, "function_pointer": 1, "goto_statement": 0, "if_statement": 16, "memory_management": 3, "memory_operation": 0, "pointer_type": 5, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 8, "union_type": 0, "while_loop": 1 }
transcoder-set#COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW_prep#f_filled.c
transcoder-set
COMPUTE_AVERAGE_TWO_NUMBERS_WITHOUT_OVERFLOW.c
f_filled
1
int f_filled ( 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": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
optipng-0.7.8#pngxrtif_prep#pngx_sig_is_tiff.c
optipng-0.7.8
pngxrtif.c
pngx_sig_is_tiff
16
int pngx_sig_is_tiff(png_bytep sig, size_t sig_size, png_const_charpp fmt_name_ptr, png_const_charpp fmt_long_name_ptr) { if (sig_size < 8) return -1; if (memcmp(sig, minitiff_sig_m, 4) != 0 && memcmp(sig, minitiff_sig_i, 4) != 0) return 0; if (fmt_name_ptr != ((void *)0)) *fmt_name_ptr = tiff_fmt_name; if (fmt_long_name_ptr != ((void *)0)) *fmt_long_name_ptr = tiff_fmt_long_name; return 1; }
{ "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": 2, "union_type": 0, "while_loop": 0 }
dap-3.10#dapruns_prep#parseopts.c
dap-3.10
dapruns.c
parseopts
38
int parseopts(char *opts, char **arg) { static char *optcpy = ((void *)0); static int optlen = 0; int i; int a; if (!opts) return 0; if (strlen(opts) > optlen) { if (optcpy) free(optcpy); optlen = strlen(opts); if (!(optcpy = malloc(optlen + 1))) { perror("dap"); exit(1); } } strcpy(optcpy, opts); for (i = 0; optcpy[i] == ' '; i++) ; for (a = 0; optcpy[i]; a++) { if (arg) arg[a] = optcpy + i; while (optcpy[i] && optcpy[i] != ' ') i++; if (optcpy[i]) { if (arg) optcpy[i] = '\0'; for (i++; optcpy[i] == ' '; i++) ; } } return a; }
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 3, "function_pointer": 0, "goto_statement": 0, "if_statement": 7, "memory_management": 2, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 1 }
dap-3.10#dap1_prep#dap_mnsparse.c
dap-3.10
dap1.c
dap_mnsparse
113
int dap_mnsparse(char *varlist, char *outlist, int *varv, int *wtvar, int stats[]) { int v; int i; int j; int k; char *vname; char *tmplist; int vn; int wn; int nvar; int s; int nonly; if (!varlist) { fputs("(meansparse) Missing variable list.\n", dap_err); exit(1); } vname = dap_malloc(dap_namelen + 6, ""); for (v = 0; varlist[v]; v++) ; for (--v; v >= 0 && varlist[v] == ' '; --v) ; nvar = 0; tmplist = dap_malloc(dap_listlen + 1, ""); tmplist[0] = '\0'; wn = -1; for (nonly = 0; v >= 0; ) { for (i = v; i >= 0 && varlist[i] != ' ' && varlist[i] != '*'; --i) ; for (j = 0; j < v - i; j++) { if (j < dap_namelen) vname[j] = varlist[i + j + 1]; else { vname[j] = '\0'; fprintf(dap_err, "(meansparse) Variable name too long: %s\n", vname); } } vname[j] = '\0'; while (i >= 0 && varlist[i] == ' ') --i; if ((vn = dap_varnum(vname)) >= 0) { if (dap_obs[0].do_len[vn] == (-1)) { if (tmplist[0]) strcat(tmplist, " "); strcat(tmplist, vname); } else { fprintf(dap_err, "(meansparse) Variable must be double: %s\n", vname); exit(1); } } else { for (s = 0; s < (((((((((((((((((((((((((((((((((((((((((((0 +1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+1); s++) { if (s != 0 && stats[s]) { fprintf(dap_err, "(meansparse) Statistics other than N requested for unknown variable %s\n", vname); exit(1); } } strcpy(tmplist, vname); strcat(vname, " -1"); vn = dap_vd(vname, 0); nonly = 1; } v = i; if (v >= 0 && varlist[v] == '*') { wn = vn; for (--v; v >= 0 && varlist[v] == ' '; --v) ; } else { wtvar[nvar] = wn; varv[nvar++] = vn; } } for (i = 0; tmplist[i]; i++) ; for (--i; i >= 0 && tmplist[i] == ' '; --i) ; for (outlist[0] = '\0'; i >= 0; ) { for (j = i; j > 0 && tmplist[j - 1] != ' '; --j) ; for (k = 0; k <= i - j; k++) vname[k] = tmplist[j + k]; vname[k] = '\0'; if (outlist[0]) strcat(outlist, " "); strcat(outlist, vname); for (i = j - 1; i >= 0 && tmplist[i] == ' '; --i) ; } dap_free(vname, ""); dap_free(tmplist, ""); if (nonly) return -nvar; return nvar; }
{ "array_type": 8, "break_continue_statement": 0, "enum_type": 0, "for_loop": 13, "function_pointer": 0, "goto_statement": 0, "if_statement": 9, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
optipng-0.7.8#png_prep#png_info_init_3.c
optipng-0.7.8
png.c
png_info_init_3
17
void png_info_init_3 (png_infopp ptr_ptr, size_t png_info_struct_size) { png_inforp info_ptr = *ptr_ptr; ((void)0); if (info_ptr == ((void *)0)) return; if ((sizeof (png_info)) > png_info_struct_size) { *ptr_ptr = ((void *)0); free(info_ptr); info_ptr = (png_malloc_base(((void *)0), (sizeof *info_ptr))); if (info_ptr == ((void *)0)) return; *ptr_ptr = info_ptr; } memset(info_ptr, 0, (sizeof *info_ptr)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 1, "memory_operation": 1, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 5, "union_type": 0, "while_loop": 0 }
libxml2#parser_prep#xmlParserNsCreate.c
libxml2
parser.c
xmlParserNsCreate
9
xmlParserNsData * xmlParserNsCreate(void) { xmlParserNsData *nsdb = xmlMalloc(sizeof(*nsdb)); if (nsdb == ((void *)0)) return(((void *)0)); memset(nsdb, 0, sizeof(*nsdb)); nsdb->defaultNsIndex = 0x7fffffff; return(nsdb); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 1, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
libxml2#encoding_prep#xmlDelEncodingAlias.c
libxml2
encoding.c
xmlDelEncodingAlias
19
int xmlDelEncodingAlias(const char *alias) { int i; if (alias == ((void *)0)) return(-1); if (xmlCharEncodingAliases == ((void *)0)) return(-1); for (i = 0;i < xmlCharEncodingAliasesNb;i++) { if (!strcmp(xmlCharEncodingAliases[i].alias, alias)) { xmlFree((char *) xmlCharEncodingAliases[i].name); xmlFree((char *) xmlCharEncodingAliases[i].alias); xmlCharEncodingAliasesNb--; memmove(&xmlCharEncodingAliases[i], &xmlCharEncodingAliases[i + 1], sizeof(xmlCharEncodingAlias) * (xmlCharEncodingAliasesNb - i)); return(0); } } return(-1); }
{ "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": 1, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
libxml2#parser_prep#inputPush.c
libxml2
parser.c
inputPush
38
int inputPush(xmlParserCtxtPtr ctxt, xmlParserInputPtr value) { char *directory = ((void *)0); if ((ctxt == ((void *)0)) || (value == ((void *)0))) return(-1); if (ctxt->inputNr >= ctxt->inputMax) { size_t newSize = ctxt->inputMax * 2; xmlParserInputPtr *tmp; tmp = (xmlParserInputPtr *) xmlRealloc(ctxt->inputTab, newSize * sizeof(*tmp)); if (tmp == ((void *)0)) { xmlErrMemory(ctxt); return (-1); } ctxt->inputTab = tmp; ctxt->inputMax = newSize; } if ((ctxt->inputNr == 0) && (value->filename != ((void *)0))) { directory = xmlParserGetDirectory(value->filename); if (directory == ((void *)0)) { xmlErrMemory(ctxt); return(-1); } } if (ctxt->input_id >= 0x7fffffff) { xmlFatalErrMsg(ctxt, XML_ERR_RESOURCE_LIMIT, "Input ID overflow\n"); return(-1); } ctxt->inputTab[ctxt->inputNr] = value; ctxt->input = value; if (ctxt->inputNr == 0) { xmlFree(ctxt->directory); ctxt->directory = directory; } value->id = ctxt->input_id++; return(ctxt->inputNr++); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 7, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 5, "struct_type": 0, "switch_statement": 0, "type_casting": 5, "union_type": 0, "while_loop": 0 }
transcoder-set#LONGEST_PREFIX_ALSO_SUFFIX_1_prep#main.c
transcoder-set
LONGEST_PREFIX_ALSO_SUFFIX_1.c
main
14
int main(void) { int n_success = 0; char param0[][100] = {"aabcdaabc","1372494598","110000100001","abcab","488938","011010101011","aaaa","3356203205","1010","kkXiiTZkGeh"}; 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 }
nettle-3.9.1#ccm_prep#nettle_ccm_encrypt_message.c
nettle-3.9.1
ccm.c
nettle_ccm_encrypt_message
14
void nettle_ccm_encrypt_message(const void *cipher, nettle_cipher_func *f, size_t nlength, const uint8_t *nonce, size_t alength, const uint8_t *adata, size_t tlength, size_t clength, uint8_t *dst, const uint8_t *src) { struct ccm_ctx ctx; uint8_t *tag = dst + (clength-tlength); ((void) sizeof ((clength >= tlength) ? 1 : 0), __extension__ ({ if (clength >= tlength) ; else __assert_fail ("clength >= tlength", "ccm.c", 242, __extension__ __PRETTY_FUNCTION__); })); nettle_ccm_set_nonce(&ctx, cipher, f, nlength, nonce, alength, clength-tlength, tlength); nettle_ccm_update(&ctx, cipher, f, alength, adata); nettle_ccm_encrypt(&ctx, cipher, f, clength-tlength, dst, src); nettle_ccm_digest(&ctx, cipher, f, tlength, tag); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#NUMBER_UNIQUE_RECTANGLES_FORMED_USING_N_UNIT_SQUARES_prep#f_filled.c
transcoder-set
NUMBER_UNIQUE_RECTANGLES_FORMED_USING_N_UNIT_SQUARES.c
f_filled
1
int f_filled ( int n ) {}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlTextReaderReadString.c
libxml2
libxml2-py.c
libxml_xmlTextReaderReadString
13
PyObject * libxml_xmlTextReaderReadString(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; xmlChar * c_retval; xmlTextReaderPtr reader; PyObject *pyobj_reader; if (!_PyArg_ParseTuple_SizeT(args, (char *)"O:xmlTextReaderReadString", &pyobj_reader)) return(((void *)0)); reader = (xmlTextReaderPtr) (((pyobj_reader) == (&_Py_NoneStruct)) ? ((void *)0) : (((PyxmlTextReader_Object *)(pyobj_reader))->obj)); c_retval = xmlTextReaderReadString(reader); 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 }
tinycc#tccgen_prep#free_inline_functions.c
tinycc
tccgen.c
free_inline_functions
10
void free_inline_functions(TCCState *s) { int i; for (i = 0; i < s->nb_inline_fns; ++i) { struct InlineFunc *fn = s->inline_fns[i]; if (fn->sym) tok_str_free(fn->func_str); } dynarray_reset(&s->inline_fns, &s->nb_inline_fns); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
optipng-0.7.8#png_prep#png_get_io_ptr.c
optipng-0.7.8
png.c
png_get_io_ptr
7
png_voidp png_get_io_ptr(png_const_structrp png_ptr) { if (png_ptr == ((void *)0)) return (((void *)0)); return (png_ptr->io_ptr); }
{ "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 }
json.h#allow_leading_or_trailing_decimal_point_prep#json_value_as_number.c
json.h
allow_leading_or_trailing_decimal_point.c
json_value_as_number
6
struct json_number_s *json_value_as_number(struct json_value_s *const value) { if (value->type != json_type_number) { return 0; } return (struct json_number_s *)value->payload; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#list_prep#xmlListAppend.c
libxml2
list.c
xmlListAppend
16
int xmlListAppend(xmlListPtr l, void *data) { xmlLinkPtr lkPlace, lkNew; if (l == ((void *)0)) return(1); lkPlace = xmlListHigherSearch(l, data); lkNew = (xmlLinkPtr) xmlMalloc(sizeof(xmlLink)); if (lkNew == ((void *)0)) return (1); lkNew->data = data; lkNew->next = lkPlace->next; (lkPlace->next)->prev = lkNew; lkPlace->next = lkNew; lkNew->prev = lkPlace; return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
json.h#allow_location_information_prep#json_extract_copy_value.c
json.h
allow_location_information.c
json_extract_copy_value
81
void json_extract_copy_value(struct json_extract_state_s *const state, const struct json_value_s *const value) { struct json_string_s *string; struct json_number_s *number; struct json_object_s *object; struct json_array_s *array; struct json_value_s *new_value; memcpy(state->dom, value, sizeof(struct json_value_s)); new_value = (struct json_value_s *)state->dom; state->dom += sizeof(struct json_value_s); new_value->payload = state->dom; if (json_type_string == value->type) { memcpy(state->dom, value->payload, sizeof(struct json_string_s)); string = (struct json_string_s *)state->dom; state->dom += sizeof(struct json_string_s); memcpy(state->data, string->string, string->string_size + 1); string->string = state->data; state->data += string->string_size + 1; } else if (json_type_number == value->type) { memcpy(state->dom, value->payload, sizeof(struct json_number_s)); number = (struct json_number_s *)state->dom; state->dom += sizeof(struct json_number_s); memcpy(state->data, number->number, number->number_size); number->number = state->data; state->data += number->number_size; } else if (json_type_object == value->type) { struct json_object_element_s *element; size_t i; memcpy(state->dom, value->payload, sizeof(struct json_object_s)); object = (struct json_object_s *)state->dom; state->dom += sizeof(struct json_object_s); element = object->start; object->start = (struct json_object_element_s *)state->dom; for (i = 0; i < object->length; i++) { struct json_value_s *previous_value; struct json_object_element_s *previous_element; memcpy(state->dom, element, sizeof(struct json_object_element_s)); element = (struct json_object_element_s *)state->dom; state->dom += sizeof(struct json_object_element_s); string = element->name; memcpy(state->dom, string, sizeof(struct json_string_s)); string = (struct json_string_s *)state->dom; state->dom += sizeof(struct json_string_s); element->name = string; memcpy(state->data, string->string, string->string_size + 1); string->string = state->data; state->data += string->string_size + 1; previous_value = element->value; element->value = (struct json_value_s *)state->dom; json_extract_copy_value(state, previous_value); previous_element = element; element = element->next; if (element) { previous_element->next = (struct json_object_element_s *)state->dom; } } } else if (json_type_array == value->type) { struct json_array_element_s *element; size_t i; memcpy(state->dom, value->payload, sizeof(struct json_array_s)); array = (struct json_array_s *)state->dom; state->dom += sizeof(struct json_array_s); element = array->start; array->start = (struct json_array_element_s *)state->dom; for (i = 0; i < array->length; i++) { struct json_value_s *previous_value; struct json_array_element_s *previous_element; memcpy(state->dom, element, sizeof(struct json_array_element_s)); element = (struct json_array_element_s *)state->dom; state->dom += sizeof(struct json_array_element_s); previous_value = element->value; element->value = (struct json_value_s *)state->dom; json_extract_copy_value(state, previous_value); previous_element = element; element = element->next; if (element) { previous_element->next = (struct json_array_element_s *)state->dom; } } } }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "memory_management": 0, "memory_operation": 11, "pointer_type": 8, "return_statement": 0, "struct_type": 13, "switch_statement": 0, "type_casting": 30, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#arith_inl_c_prep#Pl_Fct_Fast_Inc.c
gprolog-1.5.0
arith_inl_c.c
Pl_Fct_Fast_Inc
6
WamWord Pl_Fct_Fast_Inc(WamWord x) { PlLong vx = ((PlLong) ((x) << 0) >> 3); return (((PlULong) (vx + 1) << 3) | (PlULong)0x7); }
{ "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 }
uucp-1.07#rec_prep#frec_discard_temp.c
uucp-1.07
rec.c
frec_discard_temp
13
boolean frec_discard_temp (qdaemon, qtrans) struct sdaemon *qdaemon; struct stransfer *qtrans; { struct srecinfo *qinfo = (struct srecinfo *) qtrans->pinfo; if ((qdaemon->ifeatures & (02)) == 0 || qtrans->s.ztemp == ((void *)0) || qtrans->s.ztemp[0] != 'D' || strcmp (qtrans->s.ztemp, "D.0") == 0) (void) remove (qinfo->ztemp); return (1); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 3, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
optipng-0.7.8#pngerror_prep#png_longjmp.c
optipng-0.7.8
pngerror.c
png_longjmp
6
__attribute__((__noreturn__)) void png_longjmp (png_const_structrp png_ptr, int val) { (void)png_ptr; (void)val; abort(); }
{ "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": 2, "union_type": 0, "while_loop": 0 }
screen-4.9.0#socket_prep#ReceiveMsg.c
screen-4.9.0
socket.c
ReceiveMsg
233
void ReceiveMsg() { int left, len; static struct msg m; char *p; int ns = ServerSocket; struct win *wi; int recvfd = -1; struct acluser *user; _Bool is_socket; struct sockaddr_un a; struct msghdr msg; struct iovec iov; char control[1024]; is_socket = IsSocket(SockPath); if (!is_socket) { do {} while (0); if (fcntl(ServerSocket, 4, 0) == -1) Panic((*__errno_location ()), "BLOCK fcntl"); p = (char *)&m; left = sizeof(m); } else { len = sizeof(a); do {} while (0); if ((ns = accept(ns, (struct sockaddr *)&a, (void *)&len)) < 0) { Msg((*__errno_location ()), "accept"); return; } p = (char *)&m; left = sizeof(m); bzero(&msg, sizeof(msg)); iov.iov_base = &m; iov.iov_len = left; msg.msg_iov = &iov; msg.msg_iovlen = 1; msg.msg_controllen = sizeof(control); msg.msg_control = &control; while (left > 0) { len = recvmsg(ns, &msg, 0); if (len < 0 && (*__errno_location ()) == 4) continue; if (len < 0) { close(ns); Msg((*__errno_location ()), "read"); return; } if (msg.msg_controllen) { struct cmsghdr *cmsg; for (cmsg = ((size_t) (&msg)->msg_controllen >= sizeof (struct cmsghdr) ? (struct cmsghdr *) (&msg)->msg_control : (struct cmsghdr *) 0); cmsg; cmsg = __cmsg_nxthdr (&msg, cmsg)) { int cl; char *cp; if (cmsg->cmsg_level != 1 || cmsg->cmsg_type != SCM_RIGHTS) continue; cp = (char *)((cmsg)->__cmsg_data); cl = cmsg->cmsg_len; while (cl >= ((((sizeof (struct cmsghdr)) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) + (sizeof(int)))) { int passedfd; bcopy(cp, &passedfd, sizeof(int)); if (recvfd >= 0 && passedfd != recvfd) close(recvfd); recvfd = passedfd; cl -= ((((sizeof (struct cmsghdr)) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) + (sizeof(int))); } } } p += len; left -= len; break; } } while (left > 0) { len = read(ns, p, left); if (len < 0 && (*__errno_location ()) == 4) continue; if (len <= 0) break; p += len; left -= len; } if (!is_socket) { close(ServerSocket); if ((ServerSocket = secopen(SockPath, 00 | 04000, 0)) < 0) Panic((*__errno_location ()), "reopen fifo %s", SockPath); evdeq(&serv_read); serv_read.fd = ServerSocket; evenq(&serv_read); } else { close(ns); } if (len < 0) { Msg((*__errno_location ()), "read"); if (recvfd != -1) close(recvfd); return; } if (left > 0) { if (left != sizeof(m)) Msg(0, "Message %d of %d bytes too small", left, (int)sizeof(m)); else do {} while (0); return; } if (m.protocol_revision != (('m'<<24) | ('s'<<16) | ('g'<<8) | 5)) { if (recvfd != -1) close(recvfd); Msg(0, "Invalid message (magic 0x%08x).", m.protocol_revision); return; } do {} while (0); if (m.type != 2 && recvfd != -1) { close(recvfd); recvfd = -1; } for (display = displays; display; display = display->d_next) if (strcmp(display->d_usertty, m.m_tty) == 0) break; do {} while (0); wi = 0; if (!display) { for (wi = windows; wi; wi = wi->w_next) if (!strcmp(m.m_tty, wi->w_tty)) { display = wi->w_layer.l_cvlist ? wi->w_layer.l_cvlist->c_display : 0; do {} while (0); break; } } if (display && display->d_status) RemoveStatus(); if (display && !display->d_tcinited && m.type != 7) { if (recvfd != -1) close(recvfd); return; } switch (m.type) { case 6: if (display) CheckScreenSize(1); break; case 0: ExecCreate(&m); break; case 3: if (display && display->d_userpid != 0 && kill(display->d_userpid, 0) == 0) break; do {} while (0); case 2: if (CreateTempDisplay(&m, recvfd, wi)) break; if (display->d_user->u_password && *display->d_user->u_password) AskPassword(&m); else FinishAttach(&m); break; case 1: { int blocked=display->d_blocked; if(display->d_blocked == 4) display->d_blocked=0; Msg(0, "%s", m.m.message); display->d_blocked=blocked; } break; case 7: if (!wi) Hangup(); break; case 4: case 5: user = *FindUserPtr(m.m.detach.duser); if (user && user->u_password && *user->u_password) { if (CreateTempDisplay(&m, recvfd, 0)) break; AskPassword(&m); } else FinishDetach(&m); break; case 9: { char *oldSockPath = SaveStr(SockPath); strcpy(SockPath, m.m.command.writeback); _Bool is_socket = IsSocket(SockPath); int s = MakeClientSocket(0, is_socket); strcpy(SockPath, oldSockPath); {if ((oldSockPath) == 0) abort(); else free((void *)(oldSockPath)); (oldSockPath)=0;}; if (s >= 0) { queryflag = s; DoCommandMsg(&m); close(s); } else queryflag = -1; Kill(m.m.command.apid, (queryflag >= 0) ? 18 : 1); queryflag = -1; } break; case 8: DoCommandMsg(&m); break; default: Msg(0, "Invalid message (type %d).", m.type); } }
{ "array_type": 1, "break_continue_statement": 18, "enum_type": 0, "for_loop": 3, "function_pointer": 0, "goto_statement": 0, "if_statement": 35, "memory_management": 1, "memory_operation": 0, "pointer_type": 6, "return_statement": 6, "struct_type": 3, "switch_statement": 1, "type_casting": 10, "union_type": 0, "while_loop": 10 }
transcoder-set#FIND_ROTATION_COUNT_ROTATED_SORTED_ARRAY_prep#cmpfunc.c
transcoder-set
FIND_ROTATION_COUNT_ROTATED_SORTED_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 }
units-2.22#parse.tab_prep#logunit.c
units-2.22
parse.tab.c
logunit
15
int logunit(struct unittype *theunit, int base) { if ((err=unit2num(theunit))) return err; if (base==2) theunit->factor = log2(theunit->factor); else if (base==10) theunit->factor = log10(theunit->factor); else theunit->factor = log(theunit->factor)/log((double)base); if ((*__errno_location ())) return 8; return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
wget-1.21.4#log_prep#escnonprint_uri.c
wget-1.21.4
log.c
escnonprint_uri
5
const char * escnonprint_uri (const char *str) { return escnonprint_internal (str, '%', 16); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY_prep#main.c
transcoder-set
COUNT_PAIRS_WHOSE_PRODUCTS_EXIST_IN_ARRAY.c
main
24
int main(void) { int n_success = 0; int param0_0[] = {3,7,26,40,46,89,99}; int param0_1[] = {98,42,-24,-60,74,86,6,8,72,-58,38,-20,6,-6,8,48,-34,30,60,66,38,-54,8,-94,-8,0,-64,-94,-94,-72,-84,-36,88,-62,-88,46,-4,88}; int param0_2[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_3[] = {37,97,57,82,29,68,94,38,81,48,13,84,57,5,27,87,11,35,82,53,67,31,15,99,6,93,91,92,3,23,90,27,6,33,78,3,19,19,27}; int param0_4[] = {-80,-74,-72,-72,-66,-66,-62,-50,-44,-44,-28,-24,-24,-22,-16,-10,-6,-4,-2,2,2,4,12,16,16,28,30,32,32,38,38,72,84,86,88,90,96}; int param0_5[] = {0,1,0,0,1,0,1,1,0,1,0,0,0,0,0,0,0,1,1,1,0,1,0,0,0,1,1,1}; int param0_6[] = {25,67}; int param0_7[] = {82,74,-82,22,-28,-78,-22,-86,-74,42,-6,54,-88,-92,-14,-50,68,46,-50,46,-18,66,-76,-30,36,12,66}; int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; int param0_9[] = {50,23,56,9}; 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[] = {5,24,44,36,34,18,1,14,32,3}; for(int i = 0; i < len(param0); ++i) { if(f_filled(param0[i],param1[i]) == f_gold(param0[i],param1[i])) { n_success+=1; } } printf("#Results:", " ", n_success, ", ", len(param0)); return 0; }
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
less-633#search_prep#clr_hilite.c
less-633
search.c
clr_hilite
4
void clr_hilite(void) { clr_hlist(&hilite_anchor); }
{ "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 }
tinycc#libtcc_prep#tcc_set_error_func.c
tinycc
libtcc.c
tcc_set_error_func
6
void tcc_set_error_func(TCCState *s, void *error_opaque, void (*error_func)(void *opaque, const char *msg)) { s->error_opaque = error_opaque; s->error_func = error_func; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 1, "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#xmlIO_prep#xmlParserInputBufferCreateFilenameDefault.c
libxml2
xmlIO.c
xmlParserInputBufferCreateFilenameDefault
13
xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameDefault( xmlParserInputBufferCreateFilenameFunc func) { xmlParserInputBufferCreateFilenameFunc old; old = (*__xmlParserInputBufferCreateFilenameValue()); if (old == ((void *)0)) old = __xmlParserInputBufferCreateFilename; if (func == __xmlParserInputBufferCreateFilename) func = ((void *)0); (*__xmlParserInputBufferCreateFilenameValue()) = func; return(old); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
which-2.21#which_prep#main.c
which-2.21
which.c
main
206
int main(int argc, char *argv[]) { const char *path_list = getenv("PATH"); int short_option, fail_count = 0; static int long_option; struct option longopts[] = { {"help", 0, &long_option, opt_help}, {"version", 0, &long_option, opt_version}, {"skip-dot", 0, &long_option, opt_skip_dot}, {"skip-tilde", 0, &long_option, opt_skip_tilde}, {"show-dot", 0, &long_option, opt_show_dot}, {"show-tilde", 0, &long_option, opt_show_tilde}, {"tty-only", 0, &long_option, opt_tty_only}, {"all", 0, ((void *)0), 'a'}, {"read-alias", 0, ((void *)0), 'i'}, {"skip-alias", 0, &long_option, opt_skip_alias}, {"read-functions", 0, &long_option, opt_read_functions}, {"skip-functions", 0, &long_option, opt_skip_functions}, {((void *)0), 0, ((void *)0), 0} }; progname = argv[0]; while ((short_option = getopt_long(argc, argv, "aivV", longopts, ((void *)0))) != -1) { switch (short_option) { case 0: switch (long_option) { case opt_help: print_usage(stdout); return 0; case opt_version: print_version(); return 0; case opt_skip_dot: skip_dot = !tty_only; break; case opt_skip_tilde: skip_tilde = !tty_only; break; case opt_skip_alias: skip_alias = 1; break; case opt_show_dot: show_dot = !tty_only; break; case opt_show_tilde: show_tilde = (!tty_only && geteuid() != superuser); break; case opt_tty_only: tty_only = !isatty(1); break; case opt_read_functions: read_functions = 1; break; case opt_skip_functions: skip_functions = 1; break; } break; case 'a': show_all = 1; break; case 'i': read_alias = 1; break; case 'v': case 'V': print_version(); return 0; } } uidget(); if (show_dot) get_current_working_directory(); if (show_tilde || skip_tilde) { const char *h; if (!(h = getenv("HOME"))) h = sh_get_home_dir(); strncpy(home, h, sizeof(home)); home[sizeof(home) - 1] = 0; homelen = strlen(home); if (home[homelen - 1] != '/' && homelen < sizeof(home) - 1) { strcat(home, "/"); ++homelen; } } if (skip_alias) read_alias = 0; if (skip_functions) read_functions = 0; argv += optind; argc -= optind; if (argc == 0) { print_usage(stderr); return -1; } int function_start_type = 0; if (read_alias || read_functions) { char buf[1024]; int processing_aliases = read_alias; if (isatty(0)) { fprintf(stderr, "%s: %s: Warning: stdin is a tty.\n", progname, (read_functions ? read_alias ? "--read-functions, --read-alias, -i" : "--read-functions" : "--read-alias, -i")); } while (fgets(buf, sizeof(buf), stdin)) { int looks_like_function_start = 0; int function_start_has_declare; if (read_functions) { char *p = buf + strlen(buf) - 1; while (((*__ctype_b_loc ())[(int) ((*p))] & (unsigned short int) _ISspace) && p > buf + 2) --p; if (*p == ')' && p[-1] == '(' && p[-2] == ' ') { looks_like_function_start = 1; function_start_has_declare = (strncmp("declare -", buf, 9) == 0); } if (p > buf + 4 && *p == '{' && p[-1] == ' ' && p[-2] == ')' && p[-3] == '(' && p[-4] == ' ') { looks_like_function_start = 1; function_start_type = 1; function_start_has_declare = 0; } } if (processing_aliases && !looks_like_function_start) { if (!strncmp("declare -", buf, 9)) continue; if (alias_count == max_alias_count) { max_alias_count += 32; aliases = (char **)xrealloc(aliases, max_alias_count * sizeof(char *)); } aliases[alias_count++] = strcpy((char *)xmalloc(strlen(buf) + 1), buf); } else if (read_functions && looks_like_function_start) { struct function_st *function; int max_line_count; const char *p = buf; int len = 0; processing_aliases = 0; if (function_start_has_declare) { p += 9; while(*p && *p++ != ' '); } while(*p && *p != ' ') ++p, ++len; if (func_count == max_func_count) { max_func_count += 16; functions = (struct function_st *)xrealloc(functions, max_func_count * sizeof(struct function_st)); } function = &functions[func_count++]; function->name = (char *)xmalloc(len + 1); strncpy(function->name, &p[-len], len); function->name[len] = 0; function->len = len; max_line_count = 32; function->lines = (char **)xmalloc(max_line_count * sizeof(char *)); function->line_count = 0; while (fgets(buf, sizeof(buf), stdin)) { size_t blen = strlen(buf); function->lines[function->line_count++] = strcpy((char *)xmalloc(blen + 1), buf); if (!strcmp(buf, "}\n")) break; if (function->line_count == max_line_count) { max_line_count += 32; function->lines = (char **)xrealloc(function->lines, max_line_count * sizeof(char *)); } } } } if (read_alias) { int i; for (i = 0; i < alias_count; ++i) process_alias(aliases[i], argc, argv, path_list, function_start_type); } } for (; argc > 0; --argc, ++argv) { int found_something = 0; if (!*argv) continue; if (read_functions && !strchr(*argv, '/')) found_something = func_search(0, *argv, functions, function_start_type); if ((show_all || !found_something) && !path_search(0, *argv, path_list) && !found_something) { print_fail(absolute_path_given ? strrchr(*argv, '/') + 1 : *argv, absolute_path_given ? abs_path : path_list); ++fail_count; } } return fail_count; }
{ "array_type": 4, "break_continue_statement": 14, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 24, "memory_management": 0, "memory_operation": 0, "pointer_type": 4, "return_statement": 5, "struct_type": 1, "switch_statement": 2, "type_casting": 12, "union_type": 0, "while_loop": 6 }
libosip2-5.3.1#osip_content_length_prep#osip_message_get_content_length.c
libosip2-5.3.1
osip_content_length.c
osip_message_get_content_length
3
osip_content_length_t *osip_message_get_content_length(const osip_message_t *sip) { return sip->content_length; }
{ "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 }
nettle-3.9.1#ccm-aes192_prep#nettle_ccm_aes192_decrypt.c
nettle-3.9.1
ccm-aes192.c
nettle_ccm_aes192_decrypt
7
void nettle_ccm_aes192_decrypt(struct ccm_aes192_ctx *ctx, size_t length, uint8_t *dst, const uint8_t *src) { nettle_ccm_decrypt(&ctx->ccm, &ctx->cipher, (nettle_cipher_func *) nettle_aes192_encrypt, length, dst, src); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tmux#options_prep#options_empty.c
tmux
options.c
options_empty
8
struct options_entry * options_empty(struct options *oo, const struct options_table_entry *oe) { struct options_entry *o; o = options_add(oo, oe->name); o->tableentry = oe; return (o); }
{ "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": 2, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tar-1.34#xattrs_prep#xattrs_xattrs_set.c
tar-1.34
xattrs.c
xattrs_xattrs_set
24
void xattrs_xattrs_set (struct tar_stat_info const *st, char const *file_name, char typeflag, int later_run) { if (xattrs_option > 0) { size_t scan = 0; if (!st->xattr_map_size) return; for (; scan < st->xattr_map_size; ++scan) { char *keyword = st->xattr_map[scan].xkey; keyword += strlen ("SCHILY.xattr."); if (typeflag == '0' && later_run == !!strcmp (keyword, "security.capability")) continue; if (xattrs_masked_out (keyword, 0 )) continue; xattrs__fd_set (st, file_name, typeflag, keyword, st->xattr_map[scan].xval_ptr, st->xattr_map[scan].xval_len); } } }
{ "array_type": 1, "break_continue_statement": 2, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tar-1.34#paxerror_prep#open_warn.c
tar-1.34
paxerror.c
open_warn
5
void open_warn (char const *name) { call_arg_warn ("open", name); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
rcs-5.10.1#rcsgen_prep#yesorno.c
rcs-5.10.1
rcsgen.c
yesorno
25
_Bool yesorno (_Bool default_answer, char const *question, ...) { va_list args; register int c, r; if (!(top->behavior. quiet) && ttystdin ()) { char *ans = default_answer ? "yn" : "ny"; oflush (); __builtin_va_start(args,question); vcomplain (question, args); __builtin_va_end(args); complain ("? [%s](%c): ", ans, ans[0]); r = c = getcstdin (); while (c != '\n' && !feof (stdin)) c = getcstdin (); if (r == 'y' || r == 'Y') return 1; if (r == 'n' || r == 'N') return 0; } return default_answer; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 1 }
libxml2#xmlunicode_prep#xmlUCSIsSinhala.c
libxml2
xmlunicode.c
xmlUCSIsSinhala
4
int xmlUCSIsSinhala(int code) { return(((code >= 0x0D80) && (code <= 0x0DFF))); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
tmux#utf8_prep#utf8_padcstr.c
tmux
utf8.c
utf8_padcstr
17
char * utf8_padcstr(const char *s, u_int width) { size_t slen; char *out; u_int n, i; n = utf8_cstrwidth(s); if (n >= width) return (xstrdup(s)); slen = strlen(s); out = xmalloc(slen + 1 + (width - n)); memcpy(out, s, slen); for (i = n; i < width; i++) out[slen++] = ' '; out[slen] = '\0'; return (out); }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 1, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
transcoder-set#ADD_TWO_NUMBERS_WITHOUT_USING_ARITHMETIC_OPERATORS_prep#sort.c
transcoder-set
ADD_TWO_NUMBERS_WITHOUT_USING_ARITHMETIC_OPERATORS.c
sort
1
void sort (int arr [ ], int n) {qsort (arr, n, sizeof(int), cmpfunc);}
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
json.h#allow_multi_line_strings_prep#json_write_pretty_array.c
json.h
allow_multi_line_strings.c
json_write_pretty_array
41
char *json_write_pretty_array(const struct json_array_s *array, size_t depth, const char *indent, const char *newline, char *data) { size_t k, m; struct json_array_element_s *element; *data++ = '['; if (0 < array->length) { for (k = 0; '\0' != newline[k]; k++) { *data++ = newline[k]; } for (element = array->start; 0 != element; element = element->next) { if (element != array->start) { *data++ = ','; for (k = 0; '\0' != newline[k]; k++) { *data++ = newline[k]; } } for (k = 0; k < depth + 1; k++) { for (m = 0; '\0' != indent[m]; m++) { *data++ = indent[m]; } } data = json_write_pretty_value(element->value, depth + 1, indent, newline, data); if (0 == data) { return 0; } } for (k = 0; '\0' != newline[k]; k++) { *data++ = newline[k]; } for (k = 0; k < depth; k++) { for (m = 0; '\0' != indent[m]; m++) { *data++ = indent[m]; } } } *data++ = ']'; return data; }
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 8, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 2, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#xmlreader_prep#xmlTextReaderConstString.c
libxml2
xmlreader.c
xmlTextReaderConstString
6
const xmlChar * xmlTextReaderConstString(xmlTextReaderPtr reader, const xmlChar *str) { if (reader == ((void *)0)) return(((void *)0)); return(constString(reader, str)); }
{ "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 }
heman#aabb3_prep#kmAABB3IntersectsAABB.c
heman
aabb3.c
kmAABB3IntersectsAABB
3
unsigned char kmAABB3IntersectsAABB(const kmAABB3* box, const kmAABB3* other) { return kmAABB3ContainsAABB(box, other) != (unsigned int)0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
gprolog-1.5.0#stream_c_prep#Pl_Flush_Output_0.c
gprolog-1.5.0
stream_c.c
Pl_Flush_Output_0
5
void Pl_Flush_Output_0(void) { Pl_Flush_Output_1(((PlLong) (0) + ((PlULong)0))); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#xpath_prep#xmlXPathNextAncestorOrSelf.c
libxml2
xpath.c
xmlXPathNextAncestorOrSelf
7
xmlNodePtr xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { if ((ctxt == ((void *)0)) || (ctxt->context == ((void *)0))) return(((void *)0)); if (cur == ((void *)0)) return(ctxt->context->node); return(xmlXPathNextAncestor(ctxt, cur)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 2, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 3, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 0 }
transcoder-set#FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME_prep#cmpfunc.c
transcoder-set
FIND_INDEX_GIVEN_FIBONACCI_NUMBER_CONSTANT_TIME.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 }
nettle-3.9.1#gcm_prep#nettle_gcm_decrypt.c
nettle-3.9.1
gcm.c
nettle_gcm_decrypt
10
void nettle_gcm_decrypt(struct gcm_ctx *ctx, const struct gcm_key *key, const void *cipher, nettle_cipher_func *f, size_t length, uint8_t *dst, const uint8_t *src) { ((void) sizeof ((ctx->data_size % 16 == 0) ? 1 : 0), __extension__ ({ if (ctx->data_size % 16 == 0) ; else __assert_fail ("ctx->data_size % GCM_BLOCK_SIZE == 0", "gcm.c", 223, __extension__ __PRETTY_FUNCTION__); })); gcm_hash(key, &ctx->x, length, src); _nettle_ctr_crypt16(cipher, f, gcm_fill, ctx->ctr.b, length, dst, src); ctx->data_size += length; }
{ "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": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
optipng-0.7.8#example_prep#test_gzio.c
optipng-0.7.8
example.c
test_gzio
3
void test_gzio(const char *fname, Byte *uncompr, uLong uncomprLen) { fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\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 }
patch-2.7.6#hash_prep#hash_get_first.c
patch-2.7.6
hash.c
hash_get_first
12
void * hash_get_first (const Hash_table *table) { struct hash_entry const *bucket; if (table->n_entries == 0) return ((void *)0); for (bucket = table->bucket; ; bucket++) if (! (bucket < table->bucket_limit)) abort (); else if (bucket->data) return bucket->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": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tinycc#tccgen_prep#vpushi.c
tinycc
tccgen.c
vpushi
6
void vpushi(int v) { CValue cval; cval.i = v; vsetc(&int_type, 0x0030, &cval); }
{ "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#c_supp_prep#Pl_Rd_Codes_Check.c
gprolog-1.5.0
c_supp.c
Pl_Rd_Codes_Check
6
char * Pl_Rd_Codes_Check(WamWord start_word) { Pl_Rd_Codes_Str_Check(start_word, pl_glob_buff); return pl_glob_buff; }
{ "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 }
nettle-3.9.1#hmac-md5_prep#nettle_hmac_md5_digest.c
nettle-3.9.1
hmac-md5.c
nettle_hmac_md5_digest
6
void nettle_hmac_md5_digest(struct hmac_md5_ctx *ctx, size_t length, uint8_t *digest) { nettle_hmac_digest( &(ctx)->outer, &(ctx)->inner, &(ctx)->state, (&nettle_md5), (length), (digest) ); }
{ "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 }
tar-1.34#quotearg_prep#quotearg_buffer.c
tar-1.34
quotearg.c
quotearg_buffer
13
size_t quotearg_buffer (char *buffer, size_t buffersize, char const *arg, size_t argsize, struct quoting_options const *o) { struct quoting_options const *p = o ? o : &default_quoting_options; int e = (*__errno_location ()); size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize, p->style, p->flags, p->quote_these_too, p->left_quote, p->right_quote); (*__errno_location ()) = e; return 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": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlUCSIsCyrillic.c
libxml2
libxml2-py.c
libxml_xmlUCSIsCyrillic
13
PyObject * libxml_xmlUCSIsCyrillic(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsCyrillic") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSIsCyrillic", &code)) return(((void *)0)); c_retval = xmlUCSIsCyrillic(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#MINIMUM_OPERATIONS_MAKE_GCD_ARRAY_MULTIPLE_K_prep#cmpfunc.c
transcoder-set
MINIMUM_OPERATIONS_MAKE_GCD_ARRAY_MULTIPLE_K.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#window-copy_prep#window_copy_init_from_pane.c
tmux
window-copy.c
window_copy_init_from_pane
21
void window_copy_init_from_pane(struct window_pane *wp, int scroll_exit) { struct window_copy_mode_data *data = wp->modedata; struct screen *s = &data->screen; struct screen_write_ctx ctx; u_int i; if (wp->mode != &window_copy_mode) fatalx("not in copy mode"); data->backing = &wp->base; data->cx = data->backing->cx; data->cy = data->backing->cy; data->scroll_exit = scroll_exit; s->cx = data->cx; s->cy = data->cy; screen_write_start(&ctx, ((void *)0), s); for (i = 0; i < ((s)->grid->sy); i++) window_copy_write_line(wp, &ctx, i); screen_write_cursormove(&ctx, data->cx, data->cy); screen_write_stop(&ctx); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 0, "struct_type": 3, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tulipindicators-0.9.1#tiamalgamation_prep#ti_edecay.c
tulipindicators-0.9.1
tiamalgamation.c
ti_edecay
13
int ti_edecay(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 - 1.0 / period; *output++ = input[0]; int i; for (i = 1; i < size; ++i) { double d = output[-1] * scale; *output++ = input[i] > d ? input[i] : d; } return 0; }
{ "array_type": 4, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 2, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libosip2-5.3.1#osip_authorization_prep#osip_authorization_clone.c
libosip2-5.3.1
osip_authorization.c
osip_authorization_clone
131
int osip_authorization_clone(const osip_authorization_t *auth, osip_authorization_t **dest) { int i; osip_authorization_t *au; *dest = ((void *)0); if (auth == ((void *)0)) return -2; i = osip_authorization_init(&au); if (i != 0) return i; if (auth->auth_type != ((void *)0)) { au->auth_type = osip_strdup(auth->auth_type); if (au->auth_type == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->username != ((void *)0)) { au->username = osip_strdup(auth->username); if (au->username == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->realm != ((void *)0)) { au->realm = osip_strdup(auth->realm); if (auth->realm == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->nonce != ((void *)0)) { au->nonce = osip_strdup(auth->nonce); if (auth->nonce == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->uri != ((void *)0)) { au->uri = osip_strdup(auth->uri); if (au->uri == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->response != ((void *)0)) { au->response = osip_strdup(auth->response); if (auth->response == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->digest != ((void *)0)) { au->digest = osip_strdup(auth->digest); if (au->digest == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->algorithm != ((void *)0)) { au->algorithm = osip_strdup(auth->algorithm); if (auth->algorithm == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->cnonce != ((void *)0)) { au->cnonce = osip_strdup(auth->cnonce); if (au->cnonce == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->opaque != ((void *)0)) { au->opaque = osip_strdup(auth->opaque); if (auth->opaque == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->message_qop != ((void *)0)) { au->message_qop = osip_strdup(auth->message_qop); if (auth->message_qop == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->nonce_count != ((void *)0)) { au->nonce_count = osip_strdup(auth->nonce_count); if (auth->nonce_count == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->version != ((void *)0)) { au->version = osip_strdup(auth->version); if (auth->version == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->targetname != ((void *)0)) { au->targetname = osip_strdup(auth->targetname); if (auth->targetname == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->gssapi_data != ((void *)0)) { au->gssapi_data = osip_strdup(auth->gssapi_data); if (auth->gssapi_data == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->crand != ((void *)0)) { au->crand = osip_strdup(auth->crand); if (auth->crand == ((void *)0)) { osip_authorization_free(au); return -4; } } if (auth->cnum != ((void *)0)) { au->cnum = osip_strdup(auth->cnum); if (auth->cnum == ((void *)0)) { osip_authorization_free(au); return -4; } } *dest = au; return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 36, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 20, "struct_type": 0, "switch_statement": 0, "type_casting": 36, "union_type": 0, "while_loop": 0 }
transcoder-set#NTH_PENTAGONAL_NUMBER_prep#min.c
transcoder-set
NTH_PENTAGONAL_NUMBER.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 }
mtools-4.0.43#scsi_prep#scsi_max_length.c
mtools-4.0.43
scsi.c
scsi_max_length
4
unsigned int scsi_max_length(void) { return 8; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tar-1.34#get-permissions_prep#get_permissions.c
tar-1.34
get-permissions.c
get_permissions
8
int get_permissions (const char *name, int desc, mode_t mode, struct permission_context *ctx) { memset (ctx, 0, sizeof *ctx); ctx->mode = mode; 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": 1, "pointer_type": 0, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
pth-2.0.7#pth_pqueue_prep#__pth_pqueue_insert.c
pth-2.0.7
pth_pqueue.c
__pth_pqueue_insert
39
void __pth_pqueue_insert(pth_pqueue_t *q, int prio, pth_t t) { pth_t c; int p; if (q == ((void *)0)) return; if (q->q_head == ((void *)0) || q->q_num == 0) { t->q_prev = t; t->q_next = t; t->q_prio = prio; q->q_head = t; } else if (q->q_head->q_prio < prio) { t->q_prev = q->q_head->q_prev; t->q_next = q->q_head; t->q_prev->q_next = t; t->q_next->q_prev = t; t->q_prio = prio; t->q_next->q_prio = prio - t->q_next->q_prio; q->q_head = t; } else { c = q->q_head; p = c->q_prio; while ((p - c->q_next->q_prio) >= prio && c->q_next != q->q_head) { c = c->q_next; p -= c->q_prio; } t->q_prev = c; t->q_next = c->q_next; t->q_prev->q_next = t; t->q_next->q_prev = t; t->q_prio = p - prio; if (t->q_next != q->q_head) t->q_next->q_prio -= t->q_prio; } q->q_num++; return; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 4, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 2, "union_type": 0, "while_loop": 1 }
libxml2#xmlunicode_prep#xmlUCSIsCatPc.c
libxml2
xmlunicode.c
xmlUCSIsCatPc
11
int xmlUCSIsCatPc(int code) { return((code == 0x5f) || ((code >= 0x203f) && (code <= 0x2040)) || (code == 0x2054) || (code == 0x30fb) || ((code >= 0xfe33) && (code <= 0xfe34)) || ((code >= 0xfe4d) && (code <= 0xfe4f)) || (code == 0xff3f) || (code == 0xff65)); }
{ "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 }
optipng-0.7.8#ioutil_prep#opng_path_replace_ext.c
optipng-0.7.8
ioutil.c
opng_path_replace_ext
26
char * opng_path_replace_ext(char *buffer, size_t bufsize, const char *old_path, const char *new_extname) { size_t i, pos; if (new_extname[0] != '.') return ((void *)0); for (i = 0, pos = (size_t)(-1); old_path[i] != '\0'; ++i) { if (i >= bufsize) return ((void *)0); if ((buffer[i] = old_path[i]) == '.') pos = i; } if (i > pos) { i = pos; } for ( ; ; ++i, ++new_extname) { if (i >= bufsize) return ((void *)0); if ((buffer[i] = *new_extname) == '\0') return buffer; } }
{ "array_type": 3, "break_continue_statement": 0, "enum_type": 0, "for_loop": 2, "function_pointer": 0, "goto_statement": 0, "if_statement": 6, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 4, "struct_type": 0, "switch_statement": 0, "type_casting": 4, "union_type": 0, "while_loop": 0 }
transcoder-set#MINIMUM_TIME_TO_FINISH_TASKS_WITHOUT_SKIPPING_TWO_CONSECUTIVE_prep#len.c
transcoder-set
MINIMUM_TIME_TO_FINISH_TASKS_WITHOUT_SKIPPING_TWO_CONSECUTIVE.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 }
units-2.22#units_prep#replacectrlchars.c
units-2.22
units.c
replacectrlchars
7
void replacectrlchars(char *string) { for(;*string;string++) if (((*__ctype_b_loc ())[(int) ((*string))] & (unsigned short int) _IScntrl)) *string = ' '; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#COUNT_DISTINCT_OCCURRENCES_AS_A_SUBSEQUENCE_prep#sort.c
transcoder-set
COUNT_DISTINCT_OCCURRENCES_AS_A_SUBSEQUENCE.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#xmalloc_prep#xrealloc.c
patch-2.7.6
xmalloc.c
xrealloc
13
void * xrealloc (void *p, size_t n) { if (!n && p) { free (p); return ((void *)0); } p = realloc (p, n); if (!p && 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": 2, "memory_management": 2, "memory_operation": 0, "pointer_type": 0, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#SQUARE_ROOT_OF_AN_INTEGER_1_prep#f_gold.c
transcoder-set
SQUARE_ROOT_OF_AN_INTEGER_1.c
f_gold
14
int f_gold ( int x ) { if ( x == 0 || x == 1 ) return x; int start = 1, end = x, ans; while ( start <= end ) { int mid = ( start + end ) / 2; if ( mid * mid == x ) return mid; if ( mid * mid < x ) { start = mid + 1; ans = mid; } else end = mid - 1; } return ans; }
{ "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, "union_type": 0, "while_loop": 1 }
libxml2#xmlwriter_prep#xmlNewTextWriter.c
libxml2
xmlwriter.c
xmlNewTextWriter
43
xmlTextWriterPtr xmlNewTextWriter(xmlOutputBufferPtr out) { xmlTextWriterPtr ret; ret = (xmlTextWriterPtr) xmlMalloc(sizeof(xmlTextWriter)); if (ret == ((void *)0)) { xmlWriterErrMsg(((void *)0), XML_ERR_NO_MEMORY, "xmlNewTextWriter : out of memory!\n"); return ((void *)0); } memset(ret, 0, sizeof(xmlTextWriter)); ret->nodes = xmlListCreate(xmlFreeTextWriterStackEntry, xmlCmpTextWriterStackEntry); if (ret->nodes == ((void *)0)) { xmlWriterErrMsg(((void *)0), XML_ERR_NO_MEMORY, "xmlNewTextWriter : out of memory!\n"); xmlFree(ret); return ((void *)0); } ret->nsstack = xmlListCreate(xmlFreeTextWriterNsStackEntry, xmlCmpTextWriterNsStackEntry); if (ret->nsstack == ((void *)0)) { xmlWriterErrMsg(((void *)0), XML_ERR_NO_MEMORY, "xmlNewTextWriter : out of memory!\n"); xmlListDelete(ret->nodes); xmlFree(ret); return ((void *)0); } ret->out = out; ret->ichar = xmlStrdup((xmlChar *) " "); ret->qchar = '"'; if (!ret->ichar) { xmlListDelete(ret->nodes); xmlListDelete(ret->nsstack); xmlFree(ret); xmlWriterErrMsg(((void *)0), XML_ERR_NO_MEMORY, "xmlNewTextWriter : out of memory!\n"); return ((void *)0); } ret->doc = xmlNewDoc(((void *)0)); ret->no_doc_free = 0; return ret; }
{ "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": 1, "pointer_type": 0, "return_statement": 5, "struct_type": 0, "switch_statement": 0, "type_casting": 12, "union_type": 0, "while_loop": 0 }
pexec-1.0rc8#numhash_prep#numhash_first_wdata.c
pexec-1.0rc8
numhash.c
numhash_first_wdata
7
int numhash_first_wdata(numhashtable *nt,void **dret) { int c; c=numhash_get_terminal_used(nt,+1); if ( c>=0 && dret != ((void *)0) ) numhash_search(nt,c,dret); return(c); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#EULERS_CRITERION_CHECK_IF_SQUARE_ROOT_UNDER_MODULO_P_EXISTS_prep#min.c
transcoder-set
EULERS_CRITERION_CHECK_IF_SQUARE_ROOT_UNDER_MODULO_P_EXISTS.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 }
gprolog-1.5.0#hash_fct_prep#Hash_Buffer.c
gprolog-1.5.0
hash_fct.c
Hash_Buffer
7
uint32_t Hash_Buffer(const void *key, int len, uint32_t seed) { if (((uintptr_t) key & 3) == 0) return Hash_Buffer_Aligned(key, len, seed); return Hash_Buffer_Unaligned(key, len, seed); }
{ "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 }
nettle-3.9.1#sha256_prep#nettle_sha224_init.c
nettle-3.9.1
sha256.c
nettle_sha224_init
12
void nettle_sha224_init(struct sha256_ctx *ctx) { static const uint32_t H0[8] = { 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4, }; memcpy(ctx->state, H0, sizeof(H0)); ctx->count = 0; ctx->index = 0; }
{ "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": 1, "pointer_type": 0, "return_statement": 0, "struct_type": 1, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
libxml2#parserInternals_prep#xmlCtxtGetStatus.c
libxml2
parserInternals.c
xmlCtxtGetStatus
19
int xmlCtxtGetStatus(xmlParserCtxt *ctxt) { int bits = 0; if (xmlCtxtIsCatastrophicError(ctxt)) { bits |= (1 << 3) | (1 << 0) | (1 << 1); if ((ctxt != ((void *)0)) && (ctxt->validate)) bits |= (1 << 2); return(bits); } if (!ctxt->wellFormed) bits |= (1 << 0); if (!ctxt->nsWellFormed) bits |= (1 << 1); if ((ctxt->validate) && (!ctxt->valid)) bits |= (1 << 2); return(bits); }
{ "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": 1, "union_type": 0, "while_loop": 0 }
heman#generate_prep#heman_generate_archipelago_political_3.c
heman
generate.c
heman_generate_archipelago_political_3
40
heman_image* heman_generate_archipelago_political_3(int width, int height, const heman_color* colors, int ncolors, heman_color ocean, int seed, heman_image* political) { heman_image** elevations = malloc(sizeof(heman_image*) * ncolors); for (int cindex = 0; cindex < ncolors; cindex++) { elevations[cindex] = heman_generate_archipelago_political_2( width, height, colors[cindex], seed, political, 1); } heman_image* elevation = heman_image_create(width, height, 1); heman_image_clear(elevation, 0); for (int cindex = 0; cindex < ncolors; cindex++) { int y; #pragma omp parallel for for (y = 0; y < height; ++y) { float* dst = elevation->data + y * width; float* src = elevations[cindex]->data + y * width; for (int x = 0; x < width; ++x, ++dst, ++src) { *dst = (*src > *dst ? *src : *dst); } } heman_image_destroy(elevations[cindex]); } free(elevations); heman_image* ocean_elevation = heman_generate_archipelago_political_2( width, height, ocean, seed, political, 0); int y; #pragma omp parallel for for (y = 0; y < height; ++y) { float* dst = elevation->data + y * width; float* src = ocean_elevation->data + y * width; for (int x = 0; x < width; ++x, ++dst, ++src) { if (*src < 0) { *dst = *src; } } } heman_image_destroy(ocean_elevation); return elevation; }
{ "array_type": 2, "break_continue_statement": 0, "enum_type": 0, "for_loop": 6, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 2, "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#parserInternals_prep#xmlParserInputGrow.c
libxml2
parserInternals.c
xmlParserInputGrow
27
int xmlParserInputGrow(xmlParserInputPtr in, int len) { int ret; size_t indx; if ((in == ((void *)0)) || (len < 0)) return(-1); if (in->buf == ((void *)0)) return(-1); if (in->base == ((void *)0)) return(-1); if (in->cur == ((void *)0)) return(-1); if (in->buf->buffer == ((void *)0)) return(-1); if ((in->buf->encoder == ((void *)0)) && (in->buf->readcallback == ((void *)0))) return(0); indx = in->cur - in->base; if (xmlBufUse(in->buf->buffer) > (unsigned int) indx + 250) { return(0); } ret = xmlParserInputBufferGrow(in->buf, len); in->base = xmlBufContent(in->buf->buffer); if (in->base == ((void *)0)) { in->base = (xmlChar *) ""; in->cur = in->base; in->end = in->base; return(-1); } in->cur = in->base + indx; in->end = xmlBufEnd(in->buf->buffer); return(ret); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 8, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 9, "struct_type": 0, "switch_statement": 0, "type_casting": 7, "union_type": 0, "while_loop": 0 }
binn-3.0#binn_prep#binn_list_map.c
binn-3.0
binn.c
binn_list_map
5
void * binn_list_map(void *list, int pos) { void *value; binn_list_get(list, pos, 0xE1, &value, ((void *)0)); return value; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlSchemaValidateSetFilename.c
libxml2
libxml2-py.c
libxml_xmlSchemaValidateSetFilename
12
PyObject * libxml_xmlSchemaValidateSetFilename(PyObject *self __attribute__ ((__unused__)), PyObject *args) { xmlSchemaValidCtxtPtr vctxt; PyObject *pyobj_vctxt; char * filename; if (!_PyArg_ParseTuple_SizeT(args, (char *)"Oz:xmlSchemaValidateSetFilename", &pyobj_vctxt, &filename)) return(((void *)0)); vctxt = (xmlSchemaValidCtxtPtr) (((pyobj_vctxt) == (&_Py_NoneStruct)) ? ((void *)0) : (((PySchemaValidCtxt_Object *)(pyobj_vctxt))->obj)); xmlSchemaValidateSetFilename(vctxt, filename); _Py_INCREF(((PyObject*)((&_Py_NoneStruct)))); return((&_Py_NoneStruct)); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 1, "memory_management": 0, "memory_operation": 0, "pointer_type": 1, "return_statement": 2, "struct_type": 0, "switch_statement": 0, "type_casting": 3, "union_type": 0, "while_loop": 0 }
tar-1.34#regex_prep#rpl_re_compile_fastmap.c
tar-1.34
regex.c
rpl_re_compile_fastmap
16
int rpl_re_compile_fastmap (struct re_pattern_buffer *bufp) { re_dfa_t *dfa = bufp->buffer; char *fastmap = bufp->fastmap; memset (fastmap, '\0', sizeof (char) * ((0x7f * 2 + 1) + 1)); re_compile_fastmap_iter (bufp, dfa->init_state, fastmap); if (dfa->init_state != dfa->init_state_word) re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap); if (dfa->init_state != dfa->init_state_nl) re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap); if (dfa->init_state != dfa->init_state_begbuf) re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap); bufp->fastmap_accurate = 1; return 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 3, "memory_management": 0, "memory_operation": 1, "pointer_type": 2, "return_statement": 1, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
libxml2#libxml2-py_prep#libxml_xmlUCSIsGeometricShapes.c
libxml2
libxml2-py.c
libxml_xmlUCSIsGeometricShapes
13
PyObject * libxml_xmlUCSIsGeometricShapes(PyObject *self __attribute__ ((__unused__)), PyObject *args) { PyObject *py_retval; int c_retval; int code; if (libxml_deprecationWarning("xmlUCSIsGeometricShapes") == -1) return(((void *)0)); if (!_PyArg_ParseTuple_SizeT(args, (char *)"i:xmlUCSIsGeometricShapes", &code)) return(((void *)0)); c_retval = xmlUCSIsGeometricShapes(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#DYNAMIC_PROGRAMMING_SET_36_CUT_A_ROPE_TO_MAXIMIZE_PRODUCT_1_prep#sort.c
transcoder-set
DYNAMIC_PROGRAMMING_SET_36_CUT_A_ROPE_TO_MAXIMIZE_PRODUCT_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 }
transcoder-set#SUM_FACTORS_NUMBER_prep#main.c
transcoder-set
SUM_FACTORS_NUMBER.c
main
14
int main(void) { int n_success = 0; int param0[] = {76,21,4,49,35,55,43,39,36,5}; 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 }
libosip2-5.3.1#osip_www_authenticate_prep#osip_www_authenticate_get_opaque.c
libosip2-5.3.1
osip_www_authenticate.c
osip_www_authenticate_get_opaque
3
char *osip_www_authenticate_get_opaque(osip_www_authenticate_t *www_authenticate) { return www_authenticate->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, "union_type": 0, "while_loop": 0 }
tmux#window_prep#window_pane_get_palette.c
tmux
window.c
window_pane_get_palette
17
int window_pane_get_palette(const struct window_pane *wp, int c) { int new; if (wp == ((void *)0) || wp->palette == ((void *)0)) return (-1); new = -1; if (c < 8) new = wp->palette[c]; else if (c >= 90 && c <= 97) new = wp->palette[8 + c - 90]; else if (c & 0x01000000) new = wp->palette[c & ~0x01000000]; if (new == 0) return (-1); return (new); }
{ "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": 0, "return_statement": 3, "struct_type": 1, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
tar-1.34#extract_prep#extract_finish.c
tar-1.34
extract.c
extract_finish
7
void extract_finish (void) { apply_nonancestor_delayed_set_stat ("", 0); apply_delayed_links (); apply_nonancestor_delayed_set_stat ("", 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": 1, "union_type": 0, "while_loop": 0 }
nano-7.2#move_prep#to_last_line.c
nano-7.2
move.c
to_last_line
10
void to_last_line(void) { openfile->current = openfile->filebot; openfile->current_x = (inhelp) ? 0 : strlen(openfile->filebot->data); openfile->placewewant = xplustabs(); openfile->current_y = editwinrows - 1; refresh_needed = 1; recook |= perturbed; focusing = 0; }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 0, "struct_type": 0, "switch_statement": 0, "type_casting": 1, "union_type": 0, "while_loop": 0 }
transcoder-set#EQUILIBRIUM_INDEX_OF_AN_ARRAY_1_prep#main.c
transcoder-set
EQUILIBRIUM_INDEX_OF_AN_ARRAY_1.c
main
25
int main(void) { int n_success = 0; int param0_0[] = {24,31,44,52,78,95}; int param0_1[] = {-78,-38,22,58,68,-60,-30,6,58,20,-64,-40,-14,80,-2,-88,-68,-16,-4,78,-38,-74,78,-72,46,-12,82,-76,-98,-28,-32,88,72,72,64,-10,98,-24,-96}; int param0_2[] = {0,0,0,0,0,0,0,0,1,1,1,1}; int param0_3[] = {98,69,41,48,40,90,76,61,17,81,74,92,54,16,11,15,8,16,84,86,34,34,75,92,67,54,93,19,31,62,89,26,96,91,32,78,42,84,66,79,29,48,49,5}; int param0_4[] = {-28,42}; int param0_5[] = {1,1,1,1,0,0,0,0,0,1,0,1,1,0,1,1,0,1,0,1,0,0,0,1,0,1}; int param0_6[] = {18,21,23,24,36,37,39,49,55,68,80,81,88,90}; int param0_7[] = {94,22,42,-42,78,50,96,98,46,74,98,84,-2,-76,48,18,28,-62,78,6,-76,-12,46,62,14,76,44,-26,-92,12,62,-72,-42}; int param0_8[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1}; int param0_9[] = {1,23,18,91,65,2,73,12,91,47,14,48,1,69,95,81,59,36,79,35,9,52,55,73,54,25,8,41,64,96}; int *param0[10] = {param0_0,param0_1,param0_2,param0_3,param0_4,param0_5,param0_6,param0_7,param0_8,param0_9}; int param1[] = {4,19,11,27,1,25,11,32,14,19}; 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 }
mtools-4.0.43#dirCache_prep#addFreeEntry.c
mtools-4.0.43
dirCache.c
addFreeEntry
6
dirCacheEntry_t *addFreeEntry(dirCache_t *cache, unsigned int beginSlot, unsigned int endSlot) { return addFreeEndEntry(cache, beginSlot, endSlot, 0); }
{ "array_type": 0, "break_continue_statement": 0, "enum_type": 0, "for_loop": 0, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }
less-633#forwback_prep#eof_bell.c
less-633
forwback.c
eof_bell
12
void eof_bell(void) { static time_t last_eof_bell = 0; time_t now = get_time(); if (now == last_eof_bell) return; last_eof_bell = now; if (quiet == 0) bell(); else vbell(); }
{ "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, "union_type": 0, "while_loop": 0 }
transcoder-set#COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4_prep#f_gold.c
transcoder-set
COUNT_OFDIFFERENT_WAYS_EXPRESS_N_SUM_1_3_4.c
f_gold
9
int f_gold ( int n ) { int DP [ n + 1 ]; DP [ 0 ] = DP [ 1 ] = DP [ 2 ] = 1; DP [ 3 ] = 2; for ( int i = 4; i <= n; i ++ ) DP [ i ] = DP [ i - 1 ] + DP [ i - 3 ] + DP [ i - 4 ]; return DP [ n ]; }
{ "array_type": 1, "break_continue_statement": 0, "enum_type": 0, "for_loop": 1, "function_pointer": 0, "goto_statement": 0, "if_statement": 0, "memory_management": 0, "memory_operation": 0, "pointer_type": 0, "return_statement": 1, "struct_type": 0, "switch_statement": 0, "type_casting": 0, "union_type": 0, "while_loop": 0 }