input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
bool c_isxdigit(int c) {
return c > 47 && c <= 57 ||
(int)(c & 0xFFFFFFDF) > 64 && (int)(c & 0xFFFFFFDF) <= 70;
} | bool c_isxdigit(int c) {
#if C_CTYPE_CONSECUTIVE_DIGITS && C_CTYPE_CONSECUTIVE_UPPERCASE && \
C_CTYPE_CONSECUTIVE_LOWERCASE
#if C_CTYPE_ASCII
return ((c >= '0' && c <= '9') || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'F'));
#else
return ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') ||
(c ... | c_isxdigit | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
int c_strcasecmp(const char *s1, const char *s2) {
const char *v2;
const char *v3;
unsigned char c1;
unsigned char c2;
v2 = s1;
v3 = s2;
if (s1 == s2)
return 0;
do {
c1 = c_tolower(*(unsigned char *)v2);
c2 = c_tolower(*(unsigned char *)v3);
if (!c1)
break;
++v2;
++v3;
}... | int c_strcasecmp(const char *s1, const char *s2) {
register const unsigned char *p1 = (const unsigned char *)s1;
register const unsigned char *p2 = (const unsigned char *)s2;
unsigned char c1, c2;
if (p1 == p2)
return 0;
do {
c1 = c_tolower(*p1);
c2 = c_tolower(*p2);
if (c1 == '\0')
b... | c_strcasecmp | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
int c_tolower(int c) {
if (c <= 64 || c > 90)
return c;
else
return c + 32;
} | int c_tolower(int c) {
#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c);
#else
switch (c) {
case 'A':
return 'a';
case 'B':
return 'b';
case 'C':
return 'c';
case 'D':
return 'd';
case 'E':
return 'e';
case 'F':
... | c_tolower | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
int c_toupper(int c) {
if (c <= 96 || c > 122)
return c;
else
return c - 32;
} | int c_toupper(int c) {
#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
return (c >= 'a' && c <= 'z' ? c - 'a' + 'A' : c);
#else
switch (c) {
case 'a':
return 'A';
case 'b':
return 'B';
case 'c':
return 'C';
case 'd':
return 'D';
case 'e':
return 'E';
case 'f':
... | c_toupper | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void change_files(const char *restore_name, off_t *remaining_size) {
char *v2;
char *v3;
int v4;
const char *v5;
const char *argString;
size_t sz;
char *bf;
const char *nm;
off_t len;
char *bf_0;
fwrite_unlocked(" :\n", 1u, 3u, output);
echo_status("test $? -ne 0", shar_msg_table[20], 0, restor... | void change_files(const char *restore_name, off_t *remaining_size) {
DEBUG_PRINT("New file, remaining %s, ", *remaining_size);
DEBUG_PRINT("Limit still %s\n", OPT_VALUE_WHOLE_SIZE_LIMIT);
fputs(" :\n", output);
echo_status("test $? -ne 0", SM_restore_failed, NULL, restore_name, 0);
{
size_t sz = strlen... | change_files | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
int check_accessibility(const char *local_name, const char *restore_name) {
char *v2;
int *v3;
if (!access(local_name, 4))
return 0;
v2 = aoGetsText("Cannot access %s");
v3 = __errno_location();
error(0, *v3, v2, local_name);
return 2;
} | static int check_accessibility(const char *local_name,
const char *restore_name) {
if (access(local_name, 4)) {
error(0, errno, _("Cannot access %s"), local_name);
return SHAR_EXIT_FILE_NOT_FOUND;
}
return SHAR_EXIT_SUCCESS;
} | check_accessibility | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void check_intermixing(tOptions *opts, tOptDesc *od) {
const char *pz_Name;
char *v3;
if (initialization_done && (sharOptions.pOptDesc[1].fOptState & 0xF) == 0) {
pz_Name = od->pz_Name;
v3 = aoGetsText("The '%s' option may not be intermixed with file names\n"
"unless the --intermix-ty... | void check_intermixing(tOptions *opts, tOptDesc *od) {
(void)opts;
(void)od;
if (initialization_done && !HAVE_OPT(INTERMIX_TYPE))
usage_message(_("The '%s' option may not be intermixed with file names\n\
unless the --intermix-type option has been specified."),
od->pz_Name);
} | check_intermixing | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void clear_mkdir_already() {
char **v0;
int ct;
char **pp;
pp = mkdir_already;
ct = mkdir_already_ct;
mkdir_already_ct = 0;
while (--ct >= 0) {
free(*pp);
v0 = pp++;
*v0 = 0;
}
} | static void clear_mkdir_already(void) {
char **pp = mkdir_already;
int ct = mkdir_already_ct;
mkdir_already_ct = 0;
while (--ct >= 0) {
free(*pp);
*(pp++) = NULL;
}
} | clear_mkdir_already | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
quoting_options *clone_quoting_options(quoting_options *o) {
quoting_options *v1;
int e;
quoting_options *p;
e = *__errno_location();
if (o)
v1 = o;
else
v1 = &default_quoting_options;
p = (quoting_options *)xmemdup(v1, 0x38u);
*__errno_location() = e;
return p;
} | struct quoting_options *clone_quoting_options(struct quoting_options *o) {
int e = errno;
struct quoting_options *p =
xmemdup(o ? o : &default_quoting_options, sizeof *o);
errno = e;
return p;
} | clone_quoting_options | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void close_output(int part) {
const char *v1;
char *v2;
if (part > 0)
fprintf(output, "echo %d > ${lock_dir}/seq\n", part);
fwrite_unlocked("exit 0\n", 1u, 7u, output);
if (fclose(output)) {
v1 = output_filename;
v2 = aoGetsText("Closing");
fserr(4, v2, v1);
}
} | static void close_output(int part) {
if (part > 0)
fprintf(output, "echo %d > ${lock_dir}/seq\n", part);
fputs("exit 0\n", output);
if (fclose(output) != 0)
fserr(SHAR_EXIT_FAILED, _("Closing"), output_filename);
} | close_output | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void configure_shar(int *argc_p, char ***argv_p) {
int v2;
int v3;
char *v4;
int *v5;
int v6;
char *v7;
char *v8;
int max_argc;
char **list;
char *get_buf;
char *pz;
const char *pza;
if (*sharOptions.pOptDesc[29].optArg.argString == 88)
v2 = 89;
else
v2 = 88;
line_prefix = v2;
h... | static void configure_shar(int *argc_p, char ***argv_p) {
line_prefix = (OPT_ARG(HERE_DELIMITER)[0] == DEFAULT_LINE_PREFIX_1
? DEFAULT_LINE_PREFIX_2
: DEFAULT_LINE_PREFIX_1);
here_delimiter_length = strlen(OPT_ARG(HERE_DELIMITER));
gzip_compaction.cmpr_level = xz_compact... | configure_shar | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void echo_status(const char *test, const char *ok_fmt, const char *bad_fmt,
const char *what, int die_on_failure) {
const char *v5;
char *v6;
const char *good_quot;
const char *bad_quot;
good_quot = format_report(ok_fmt, what);
bad_quot = format_report(bad_fmt, what);
if (die_on_failure)... | static void echo_status(const char *test, const char *ok_fmt,
const char *bad_fmt, const char *what,
int die_on_failure) {
char const *good_quot;
char const *bad_quot;
char const *die_str;
good_quot = format_report(ok_fmt, what);
bad_quot = format_report(bad_fm... | echo_status | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void echo_text(const char *format_pz, const char *arg_pz, bool cascade) {
size_t v3;
unsigned int len;
size_t sz;
char *bf;
v3 = strlen(format_pz);
sz = v3 + strlen(arg_pz) + 5;
bf = (char *)scribble_get(sz);
len = snprintf(bf, sz, format_pz, arg_pz);
if (cascade)
strcpy(&bf[len], " &&\n");
fpr... | static void echo_text(const char *format_pz, const char *arg_pz, bool cascade) {
static char const continue_z[] = " &&\n";
size_t sz = strlen(format_pz) + strlen(arg_pz) + sizeof(continue_z);
char *bf = scribble_get(sz);
unsigned int len = (unsigned)snprintf(bf, sz, format_pz, arg_pz);
if (cascade)
memcp... | echo_text | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void emit_char_ct_validation(const char *local_name, const char *quoted_name,
const char *restore_name, int did_md5) {
void *v4;
char *v5;
size_t v6;
char v7[4];
int did_md5a;
const char *restore_namea;
const char *quoted_namea;
const char *local_namea;
char *command;
FI... | static void emit_char_ct_validation(char const *local_name,
char const *quoted_name,
char const *restore_name, int did_md5) {
char wc[1 + LOG10_MAX_INT * 2];
char *command;
#ifndef __MINGW32__
static char const cct_cmd[] = "LC_ALL=C wc -c <... | emit_char_ct_validation | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void encode_file_to_pipe(int out_fd, const char *local_name,
const char *q_local_name, const char *restore_name) {
void *v4;
const char *restore_namea;
const char *q_local_namea;
const char *local_namea;
int out_fda;
FILE *in_fp;
const char *open_txt;
const char *open_fmt;
cha... | static void encode_file_to_pipe(int out_fd, const char *local_name,
const char *q_local_name,
const char *restore_name) {
FILE *in_fp;
FILE *out_fp;
char *cmdline = alloca(strlen(q_local_name) + 64);
char const *open_txt = cmdline;
char const *o... | encode_file_to_pipe | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
do_uue_t file_needs_encoding(const char *fname) {
int optActualValue;
char *v3;
int *v4;
int line_length;
int ch_0;
const char *p;
FILE *infp;
if (cmpr_state)
return doue_true;
optActualValue = sharOptions.pOptDesc[10].optActualValue;
if (optActualValue == 66)
return doue_true;
if (optAct... | static do_uue_t file_needs_encoding(char const *fname) {
#ifdef __CHAR_UNSIGNED__
#define BYTE_IS_BINARY(_ch) (byte_is_binary[_ch])
#else
#define BYTE_IS_BINARY(_ch) (byte_is_binary[(_ch) & 0xFF])
#endif
FILE *infp;
int line_length;
if (cmpr_state != NULL)
return true;
switch (WHICH_OPT_MIXED_UUENCODE) {... | file_needs_encoding | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void finish_sharing_file(const char *lname, const char *lname_q,
const char *rname, const char *rname_q) {
int did_md5;
FILE *fp;
size_t cnt;
struct tm *restore_time;
unsigned char md5buffer[24];
unsigned long v11;
v11 = __readfsqword(0x28u);
if ((sharOptions.pOptDesc[35].fOptS... | static void finish_sharing_file(const char *lname, const char *lname_q,
const char *rname, const char *rname_q) {
if (!HAVE_OPT(NO_TIMESTAMP)) {
struct tm *restore_time;
restore_time = localtime(&struct_stat.st_mtime);
fprintf(output, shar_touch_z, (restore_time->tm_year +... | finish_sharing_file | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
const char *format_report(const char *fmt, const char *what) {
size_t v3;
char *v4;
int len;
size_t sz;
char *res;
if (!fmt)
return 0;
v3 = strlen(fmt);
sz = v3 + strlen(what) + 2;
res = (char *)scribble_get(sz);
len = snprintf(res, sz, fmt, what);
if (sz > (unsigned int)len)
return res;
... | static char const *format_report(char const *fmt, char const *what) {
if (fmt == NULL)
return NULL;
{
size_t sz = strlen(fmt) + strlen(what) + 2;
char *res = scribble_get(sz);
int len = snprintf(res, sz, fmt, what);
if ((unsigned)len < sz)
return res;
if (len < 0)
die(SHAR_EXIT_... | format_report | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void generate_configure() {
if ((sharOptions.pOptDesc[27].fOptState & 0xF) == 0)
fprintf(output,
"MD5SUM=${MD5SUM-md5sum}\n"
"f=`${MD5SUM} --version | egrep '^md5sum .*(core|text)utils'`\n"
"test -n \"${f}\" && md5check=true || md5check=false\n"
"${md5check} || \\\n... | static void generate_configure(void) {
if (!HAVE_OPT(NO_MD5_DIGEST))
fprintf(output, md5check_z, SM_not_verifying_sums);
fputs(clobber_check_z, output);
if (!HAVE_OPT(NO_I18N)) {
fputs(i18n_z, output);
}
if (!HAVE_OPT(QUIET_UNSHAR)) {
if (HAVE_OPT(VANILLA_OPERATION))
fputs(dev_tty_nocheck... | generate_configure | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void generate_full_header(int argc, char *const *argv) {
int v2;
const char *v3;
bool has_slash;
int counter;
int countera;
int part;
stat sb;
unsigned long v9;
v9 = __readfsqword(0x28u);
for (counter = 0; counter < argc; ++counter) {
if (!stat(argv[counter], &sb) &&
walktree((walker_t)... | static void generate_full_header(int argc, char *const *argv) {
int counter;
for (counter = 0; counter < argc; counter++) {
struct stat sb;
if (stat(argv[counter], &sb) != 0)
continue;
if (walktree(check_accessibility, argv[counter]))
exit(SHAR_EXIT_FAILED);
}
if (HAVE_OPT(NET_HEADER... | generate_full_header | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void generate_mkdir(const char *path) {
const char **v1;
char *v2;
char **v3;
int ct;
char **pp;
char *quoted_path;
ct = mkdir_already_ct;
pp = mkdir_already;
while (--ct > 0) {
v1 = (const char **)pp++;
if (!strcmp(*v1, path))
return;
}
if (++mkdir_already_ct > mkdir_alloc_ct) {
... | static void generate_mkdir(const char *path) {
const char *quoted_path;
{
int ct = mkdir_already_ct;
char **pp = mkdir_already;
while (--ct > 0) {
if (strcmp(*(pp++), path) == 0)
return;
}
}
if (++mkdir_already_ct > mkdir_alloc_ct) {
mkdir_alloc_ct += 16 + (mkdir_alloc_ct /... | generate_mkdir | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void generate_mkdir_script(const char *path) {
char *cursor;
for (cursor = strchr(path, 47); cursor; cursor = strchr(cursor + 1, 47)) {
if (cursor != path && *(cursor - 1) != 47 &&
(*(cursor - 1) != 46 || cursor != path + 1 && *(cursor - 2) != 47)) {
*cursor = 0;
generate_mkdir(path);
... | static void generate_mkdir_script(const char *path) {
char *cursor;
for (cursor = strchr(path, '/'); cursor; cursor = strchr(cursor + 1, '/')) {
if (cursor == path || *(cursor - 1) == '/')
continue;
if (cursor[-1] == '.' && (cursor == path + 1 || cursor[-2] == '/'))
continue;
*cursor = 0... | generate_mkdir_script | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
int generate_one_header_line(const char *local_name, const char *restore_name) {
char *v2;
char *v3;
char buf[24];
unsigned long v6;
v6 = __readfsqword(0x28u);
v2 = mode_string(struct_stat.st_mode);
v3 = offtostr(struct_stat.st_size, buf);
fprintf(output, "# %6s %s %s\n", v3, v2, restore_name);
retur... | static int generate_one_header_line(const char *local_name,
const char *restore_name) {
char buf[INT_BUFSIZE_BOUND(off_t)];
fprintf(output, "# %6s %s %s\n", offtostr(struct_stat.st_size, buf),
mode_string(struct_stat.st_mode), restore_name);
return 0;
} | generate_one_header_line | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
const char *get_charset_aliases() {
_BOOL4 v0;
size_t v1;
int add_slash;
int fd;
int c;
int ca;
const char *volatile cp;
char *dir;
char *res_ptr;
size_t res_size;
size_t dir_len;
size_t base_len;
char *file_name;
FILE *fp;
size_t l1;
size_t l2;
char *old_res_ptr;
char buf1[64];
ch... | static const char *get_charset_aliases(void) {
const char *cp;
cp = charset_aliases;
if (cp == NULL) {
#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || \
defined __CYGWIN__ || defined OS2)
const char *dir;
const char *base = "charset.alias";
char *file_name;
d... | get_charset_aliases | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
quoting_style get_quoting_style(quoting_options *o) {
quoting_options *v1;
if (o)
v1 = o;
else
v1 = &default_quoting_options;
return v1->style;
} | enum quoting_style get_quoting_style(struct quoting_options *o) {
return (o ? o : &default_quoting_options)->style;
} | get_quoting_style | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
gid_t *getgidbyname(const char *group) {
size_t v2;
userid *tail;
userid *taila;
userid *tailb;
struct group *grent;
for (tail = group_alist; tail; tail = tail->next) {
if (tail->name[0] == *group && !strcmp(tail->name, group))
return &tail->id.u;
}
for (taila = nogroup_alist; taila; taila = ... | gid_t *getgidbyname(const char *group) {
struct userid *tail;
struct group *grent;
for (tail = group_alist; tail; tail = tail->next)
if (*tail->name == *group && !strcmp(tail->name, group))
return &tail->id.g;
for (tail = nogroup_alist; tail; tail = tail->next)
if (*tail->name == *group && !st... | getgidbyname | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *getgroup(gid_t gid) {
const char *gr_name;
size_t v2;
userid *tail;
userid *match;
struct group *grent;
const char *name;
match = 0;
for (tail = group_alist; tail; tail = tail->next) {
if (gid == tail->id.u) {
match = tail;
break;
}
}
if (!match) {
grent = getgrgid(gid... | char *getgroup(gid_t gid) {
struct userid *tail;
struct userid *match = NULL;
for (tail = group_alist; tail; tail = tail->next) {
if (tail->id.g == gid) {
match = tail;
break;
}
}
if (match == NULL) {
struct group *grent = getgrgid(gid);
char const *name = grent ? grent->gr_name ... | getgroup | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
const char *gettext_quote(const char *msgid, quoting_style s) {
char *translation;
const char *locale_code;
translation = gettext(msgid);
if (translation != msgid)
return translation;
locale_code = locale_charset();
if (c_strcasecmp(locale_code, "UTF-8")) {
if (c_strcasecmp(locale_code, "GB18030"))... | static char const *gettext_quote(char const *msgid, enum quoting_style s) {
char const *translation = _(msgid);
char const *locale_code;
if (translation != msgid)
return translation;
locale_code = locale_charset();
if (STRCASEEQ(locale_code, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
return msgi... | gettext_quote | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
uid_t *getuidbyname(const char *user) {
size_t v2;
userid *tail;
userid *taila;
userid *tailb;
struct passwd *pwent;
for (tail = user_alist; tail; tail = tail->next) {
if (tail->name[0] == *user && !strcmp(tail->name, user))
return &tail->id.u;
}
for (taila = nouser_alist; taila; taila = tail... | uid_t *getuidbyname(const char *user) {
struct userid *tail;
struct passwd *pwent;
for (tail = user_alist; tail; tail = tail->next)
if (*tail->name == *user && !strcmp(tail->name, user))
return &tail->id.u;
for (tail = nouser_alist; tail; tail = tail->next)
if (*tail->name == *user && !strcmp(... | getuidbyname | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *getuser(uid_t uid) {
const char *pw_name;
size_t v2;
userid *tail;
userid *match;
struct passwd *pwent;
const char *name;
match = 0;
for (tail = user_alist; tail; tail = tail->next) {
if (uid == tail->id.u) {
match = tail;
break;
}
}
if (!match) {
pwent = getpwuid(uid)... | char *getuser(uid_t uid) {
struct userid *tail;
struct userid *match = NULL;
for (tail = user_alist; tail; tail = tail->next) {
if (tail->id.u == uid) {
match = tail;
break;
}
}
if (match == NULL) {
struct passwd *pwent = getpwuid(uid);
char const *name = pwent ? pwent->pw_name :... | getuser | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void init_shar_msg() {
msg_xform_t v0;
int ix;
int ixa;
char *pz;
quoting_options *alwaysq;
quoting_options *doubleq;
if (translate_script) {
for (ix = 0; ix <= 48; ++ix)
shar_msg_table[ix] = gettext(shar_msg_table[ix]);
}
alwaysq = clone_quoting_options(0);
set_quoting_style(alwaysq, quo... | static void init_shar_msg(void) {
int ix;
struct quoting_options *alwaysq, *doubleq;
if (translate_script) {
for (ix = 0; ix < SHAR_MSG_CT; ix++)
shar_msg_table[ix] = gettext(shar_msg_table[ix]);
}
alwaysq = clone_quoting_options(NULL);
set_quoting_style(alwaysq, shell_always_quoting_style);
... | init_shar_msg | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void initialize(int *argcp, char ***argvp) {
char *v2;
sharpid = getpid();
setlocale(6, &locale);
bindtextdomain("sharutils", "/usr/share/locale");
textdomain("sharutils");
scribble_init();
opt_idx = optionProcess(&sharOptions, *argcp, *argvp);
if (*argcp == opt_idx) {
if ((sharOptions.pOptDesc[17]... | static void initialize(int *argcp, char ***argvp) {
sharpid = (int)getpid();
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
scribble_init();
opt_idx = optionProcess(&sharOptions, *argcp, *argvp);
if (opt_idx == *argcp) {
if (!HAVE_OPT(INPUT_FILE_LIST))
SET_OPT_... | initialize | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *last_component(const char *name) {
bool saw_slash;
const char *p;
saw_slash = 0;
while (*name == 47)
++name;
for (p = name; *p; ++p) {
if (*p == 47) {
saw_slash = 1;
} else if (saw_slash) {
name = p;
saw_slash = 0;
}
}
return (char *)name;
} | char *last_component(char const *name) {
char const *base = name + FILE_SYSTEM_PREFIX_LEN(name);
char const *p;
bool saw_slash = false;
while (ISSLASH(*base))
base++;
for (p = base; *p; p++) {
if (ISSLASH(*p))
saw_slash = true;
else if (saw_slash) {
base = p;
saw_slash = false;... | last_component | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
const char *locale_charset() {
char *codeset;
const char *aliases;
const char *aliasesa;
codeset = nl_langinfo(14);
if (!codeset)
codeset = (char *)&unk_2C039;
for (aliases = get_charset_aliases(); *aliases;
aliases = &aliasesa[strlen(aliasesa) + 1]) {
if (!strcmp(codeset, aliases) || *alias... | STATIC
#endif
const char *locale_charset(void) {
const char *codeset;
const char *aliases;
#if !(defined WINDOWS_NATIVE || defined OS2)
#if HAVE_LANGINFO_CODESET
codeset = nl_langinfo(CODESET);
#ifdef __CYGWIN__
if (codeset != NULL && strcmp(codeset, "US-ASCII") == 0) {
const char *locale;
static c... | locale_charset | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
int v3;
int *v4;
unsigned int v5;
char *v6;
char **argva;
int argca;
shar_exit_code_t status;
shar_exit_code_t s;
char *arg;
stat sb;
unsigned long v13;
argca = argc;
argva = (char **)argv;
v13 = __readfsqword(0x28u);
status = SHA... | int main(int argc, char **argv) {
shar_exit_code_t status = SHAR_EXIT_SUCCESS;
initialize(&argc, &argv);
while (opt_idx < argc) {
char *arg = argv[opt_idx++];
struct stat sb;
if (stat(arg, &sb) != 0) {
if (HAVE_OPT(INTERMIX_TYPE) && (*arg == '-')) {
while (*++arg == '-')
;
... | main | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *mode_string(unsigned int mode) {
int ix;
int msk;
ix = 1;
msk = 256;
strcpy(result_7, "----------");
do {
if ((mode & msk) != 0)
result_7[ix] = modes_6[ix];
++ix;
msk >>= 1;
} while (msk);
if ((mode & 0x800) != 0)
result_7[3] = 115;
if ((mode & 0x400) != 0)
result_7[6]... | static char *mode_string(unsigned mode) {
static char const modes[] = "-rwxrwxrwx";
static char result[12];
int ix = 1;
int msk = 0400;
strcpy(result, "----------");
do {
if (mode & msk)
result[ix] = modes[ix];
ix++;
msk >>= 1;
} while (msk != 0);
if (mode & 04000)
result[3] = '... | mode_string | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
scrib_buf_t *new_scribble_block(size_t min_size) {
scrib_buf_t *res;
res = (scrib_buf_t *)malloc(((_DWORD)min_size + 8215) & 0xFFFFE000);
*next_buf = res;
if (!*next_buf)
return 0;
next_buf = &res->sb_next;
res->sb_next = 0;
res->sb_off = 0;
res->sb_size = (((_DWORD)min_size + 8215) & 0xFFFFE000) -... | static scrib_buf_t *new_scribble_block(size_t min_size) {
scrib_buf_t *res = NULL;
min_size = ROUND_SCRIBBLE(min_size + hdr_sz, 0x2000U);
*next_buf = res = malloc(min_size);
if (*next_buf == NULL)
return NULL;
next_buf = &(res->sb_next);
res->sb_next = NULL;
res->sb_off = 0;
{
size_t *psz = ... | new_scribble_block | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void open_output() {
const char *v0;
char *v1;
if ((sharOptions.pOptDesc[14].fOptState & 0xF) != 0) {
if (!output_filename)
parse_output_base_name(sharOptions.pOptDesc[14].optArg.argString);
sprintf(output_filename, sharOptions.pOptDesc[14].optArg.argString,
(unsigned int)++part_number)... | static void open_output(void) {
if (!HAVE_OPT(OUTPUT_PREFIX)) {
output = stdout;
#ifdef __MINGW32__
_setmode(fileno(stdout), _O_BINARY);
#endif
return;
}
if (output_filename == NULL)
parse_output_base_name(OPT_ARG(OUTPUT_PREFIX));
sprintf(output_filename, OPT_ARG(OUTPUT_PREFIX), ++part_number);... | open_output | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
FILE *open_shar_input(const char *local_name, const char *q_local_name,
const char *restore_name, const char *q_restore_name,
const char **file_type_p, const char **file_type_remote_p,
int *pipe_p) {
FILE *infp;
uuencode_file = file_needs_encoding(l... | static FILE *open_shar_input(const char *local_name, const char *q_local_name,
const char *restore_name,
const char *q_restore_name,
const char **file_type_p,
const char **file_type_remote_p, int *pipe_p)... | open_shar_input | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void parse_output_base_name(const char *arg) {
const char *v1;
char *v2;
const char *v3;
char *v4;
char *v5;
const char *v6;
const char *v7;
char *v8;
const char *v9;
bool svd;
int c;
int hadarg;
int base_name_len;
const char *skp;
const char *p;
char *bad_fmt;
size_t len;
char *fmt;... | static void parse_output_base_name(char const *arg) {
char *bad_fmt = _("Invalid format for output file names (%s): %s");
int c;
int hadarg = 0;
char const *p;
int base_name_len = 128;
for (p = arg; (c = *p++) != 0;) {
base_name_len++;
if (c != '%')
continue;
c = *p++;
if (c == '%')
... | parse_output_base_name | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void print_caution_notes(FILE *fp) {
if ((sharOptions.pOptDesc[33].fOptState & 0xF) != 0) {
if ((sharOptions.pOptDesc[34].fOptState & 0xF) != 0)
fprintf(
fp, "#\n# Existing files %s.\n",
"MAY be overwritten.\n# The unsharer will be INTERACTIVELY queried");
else
fprintf(fp, "#\n... | static void print_caution_notes(FILE *fp) {
{
char const *msg;
if (!HAVE_OPT(NO_CHECK_EXISTING))
msg = exist_keep_z;
else if (HAVE_OPT(QUERY_USER))
msg = exist_ask_z;
else
msg = exist_kill_z;
fprintf(fp, exist_note_z, msg);
}
if (HAVE_OPT(WHOLE_SIZE_LIMIT)) {
int len =... | print_caution_notes | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void print_header_stamp(FILE *fp) {
const char *argString;
const char *v2;
char *v3;
int *v4;
time_t now;
size_t l;
const char *pz;
const char *ch_0;
tm *local_time;
char *c_dir;
char buffer[88];
unsigned long v12;
v12 = __readfsqword(0x28u);
if ((sharOptions.pOptDesc[20].fOptState & 0xF) !... | static void print_header_stamp(FILE *fp) {
{
char const *pz = HAVE_OPT(ARCHIVE_NAME) ? OPT_ARG(ARCHIVE_NAME) : "";
char const *ch = HAVE_OPT(ARCHIVE_NAME) ? ", a shell" : "a shell";
fprintf(fp, file_leader_z, pz, ch, PACKAGE, VERSION, sharpid);
}
{
static char ftime_fmt[] = "%Y-%m-%d %H:%M %Z";
... | print_header_stamp | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void print_query_user(const char *rname) {
size_t rname_len;
size_t sz;
size_t sza;
size_t szb;
char *str_a;
char *str_b;
char *str_ba;
rname_len = strlen(rname);
sz = rname_len + strlen(shar_msg_table[37]);
str_a = (char *)scribble_get(sz);
snprintf(str_a, sz, shar_msg_table[37], rname);
sza =... | static void print_query_user(char const *rname) {
size_t rname_len = strlen(rname);
size_t sz = strlen(SM_overwriting) + rname_len;
char *str_a, *str_b;
str_a = scribble_get(sz);
snprintf(str_a, sz, SM_overwriting, rname);
sz = strlen(SM_overwrite) + rname_len;
str_b = scribble_get(sz);
snprintf(str_b... | print_query_user | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void process_shar_input(FILE *input, off_t *size_left, int *split_flag,
const char *restore, const char *q_restore) {
const unsigned short *v5;
const unsigned short *v6;
const unsigned short *v7;
off_t v8;
char *e;
char *inbf;
const char *p;
inbf = (char *)scribble_get(0x2000);
... | static void process_shar_input(FILE *input, off_t *size_left, int *split_flag,
char const *restore, char const *q_restore) {
char *inbf = scribble_get(BUFSIZ);
if (uuencode_file && (cmpr_state != NULL)) {
char *p = fgets(inbf, BUFSIZ, input);
char *e;
if ((p == NULL) || (... | process_shar_input | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
const char *quote(const char *arg) { return quote_n(0, arg); } | char const *quote(char const *arg) { return quote_n(0, arg); } | quote | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
const char *quote_mem(const char *arg, size_t argsize) {
return quote_n_mem(0, arg, argsize);
} | char const *quote_mem(char const *arg, size_t argsize) {
return quote_n_mem(0, arg, argsize);
} | quote_mem | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
const char *quote_n(int n, const char *arg) {
return quote_n_mem(n, arg, 0xFFFFFFFFFFFFFFFFLL);
} | char const *quote_n(int n, char const *arg) {
return quote_n_mem(n, arg, SIZE_MAX);
} | quote_n | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
const char *quote_n_mem(int n, const char *arg, size_t argsize) {
return quotearg_n_options(n, arg, argsize, "e_quoting_options);
} | char const *quote_n_mem(int n, char const *arg, size_t argsize) {
return quotearg_n_options(n, arg, argsize, "e_quoting_options);
} | quote_n_mem | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg(const char *arg) { return quotearg_n(0, arg); } | char *quotearg(char const *arg) { return quotearg_n(0, arg); } | quotearg | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_alloc(const char *arg, size_t argsize,
const quoting_options *o) {
return quotearg_alloc_mem(arg, argsize, 0, o);
} | char *quotearg_alloc(char const *arg, size_t argsize,
struct quoting_options const *o) {
return quotearg_alloc_mem(arg, argsize, NULL, o);
} | quotearg_alloc | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_alloc_mem(const char *arg, size_t argsize, size_t *size,
const quoting_options *o) {
const quoting_options *v4;
int e;
int flags;
const quoting_options *p;
size_t bufsize;
char *buf;
if (o)
v4 = o;
else
v4 = &default_quoting_options;
p = v4;
e = *__er... | char *quotearg_alloc_mem(char const *arg, size_t argsize, size_t *size,
struct quoting_options const *o) {
struct quoting_options const *p = o ? o : &default_quoting_options;
int e = errno;
int flags = p->flags | (size ? 0 : QA_ELIDE_NULL_BYTES);
size_t bufsize = quotearg_buffer_restyl... | quotearg_alloc_mem | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
size_t quotearg_buffer(char *buffer, size_t buffersize, const char *arg,
size_t argsize, const quoting_options *o) {
const quoting_options *v5;
int e;
const quoting_options *p;
size_t r;
if (o)
v5 = o;
else
v5 = &default_quoting_options;
p = v5;
e = *__errno_location();
... | 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;
size_t r = quotearg_buffer_restyled(buffer, buffersize, arg, argsize,
... | quotearg_buffer | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
size_t quotearg_buffer_restyled(char *buffer, size_t buffersize,
const char *arg, size_t argsize,
quoting_style quoting_style, int flags,
const unsigned int *quote_these_too,
const char *left_... | static size_t
quotearg_buffer_restyled(char *buffer, size_t buffersize, char const *arg,
size_t argsize, enum quoting_style quoting_style,
int flags, unsigned int const *quote_these_too,
char const *left_quote, char const *right_quote) {
size_... | quotearg_buffer_restyled | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_char(const char *arg, char ch_0) {
return quotearg_char_mem(arg, 0xFFFFFFFFFFFFFFFFLL, ch_0);
} | char *quotearg_char(char const *arg, char ch) {
return quotearg_char_mem(arg, SIZE_MAX, ch);
} | quotearg_char | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_char_mem(const char *arg, size_t argsize, char ch_0) {
quoting_options options;
unsigned long v5;
v5 = __readfsqword(0x28u);
options = default_quoting_options;
set_char_quoting(&options, ch_0, 1);
return quotearg_n_options(0, arg, argsize, &options);
} | char *quotearg_char_mem(char const *arg, size_t argsize, char ch) {
struct quoting_options options;
options = default_quoting_options;
set_char_quoting(&options, ch, 1);
return quotearg_n_options(0, arg, argsize, &options);
} | quotearg_char_mem | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_colon(const char *arg) { return quotearg_char(arg, 58); } | char *quotearg_colon(char const *arg) { return quotearg_char(arg, ':'); } | quotearg_colon | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_colon_mem(const char *arg, size_t argsize) {
return quotearg_char_mem(arg, argsize, 58);
} | char *quotearg_colon_mem(char const *arg, size_t argsize) {
return quotearg_char_mem(arg, argsize, ':');
} | quotearg_colon_mem | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_custom(const char *left_quote, const char *right_quote,
const char *arg) {
return quotearg_n_custom(0, left_quote, right_quote, arg);
} | char *quotearg_custom(char const *left_quote, char const *right_quote,
char const *arg) {
return quotearg_n_custom(0, left_quote, right_quote, arg);
} | quotearg_custom | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_custom_mem(const char *left_quote, const char *right_quote,
const char *arg, size_t argsize) {
return quotearg_n_custom_mem(0, left_quote, right_quote, arg, argsize);
} | char *quotearg_custom_mem(char const *left_quote, char const *right_quote,
char const *arg, size_t argsize) {
return quotearg_n_custom_mem(0, left_quote, right_quote, arg, argsize);
} | quotearg_custom_mem | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void quotearg_free() {
unsigned int i;
slotvec *sv;
sv = slotvec_0;
for (i = 1; i < nslots; ++i)
free(sv[i].val);
if (sv->val != slot0) {
free(sv->val);
slotvec0.size = 256;
slotvec0.val = slot0;
}
if (sv != &slotvec0) {
free(sv);
slotvec_0 = &slotvec0;
}
nslots = 1;
} | void quotearg_free(void) {
struct slotvec *sv = slotvec;
unsigned int i;
for (i = 1; i < nslots; i++)
free(sv[i].val);
if (sv[0].val != slot0) {
free(sv[0].val);
slotvec0.size = sizeof slot0;
slotvec0.val = slot0;
}
if (sv != &slotvec0) {
free(sv);
slotvec = &slotvec0;
}
nslots =... | quotearg_free | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_mem(const char *arg, size_t argsize) {
return quotearg_n_mem(0, arg, argsize);
} | char *quotearg_mem(char const *arg, size_t argsize) {
return quotearg_n_mem(0, arg, argsize);
} | quotearg_mem | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_n(int n, const char *arg) {
return quotearg_n_options(n, arg, 0xFFFFFFFFFFFFFFFFLL,
&default_quoting_options);
} | char *quotearg_n(int n, char const *arg) {
return quotearg_n_options(n, arg, SIZE_MAX, &default_quoting_options);
} | quotearg_n | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_n_custom(int n, const char *left_quote, const char *right_quote,
const char *arg) {
return quotearg_n_custom_mem(n, left_quote, right_quote, arg,
0xFFFFFFFFFFFFFFFFLL);
} | char *quotearg_n_custom(int n, char const *left_quote, char const *right_quote,
char const *arg) {
return quotearg_n_custom_mem(n, left_quote, right_quote, arg, SIZE_MAX);
} | quotearg_n_custom | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_n_custom_mem(int n, const char *left_quote,
const char *right_quote, const char *arg,
size_t argsize) {
quoting_options o;
unsigned long v9;
v9 = __readfsqword(0x28u);
o = default_quoting_options;
set_custom_quoting(&o, left_quote, right_... | char *quotearg_n_custom_mem(int n, char const *left_quote,
char const *right_quote, char const *arg,
size_t argsize) {
struct quoting_options o = default_quoting_options;
set_custom_quoting(&o, left_quote, right_quote);
return quotearg_n_options(n, arg, args... | quotearg_n_custom_mem | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_n_mem(int n, const char *arg, size_t argsize) {
return quotearg_n_options(n, arg, argsize, &default_quoting_options);
} | char *quotearg_n_mem(int n, char const *arg, size_t argsize) {
return quotearg_n_options(n, arg, argsize, &default_quoting_options);
} | quotearg_n_mem | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_n_options(int n, const char *arg, size_t argsize,
const quoting_options *options) {
slotvec *v4;
char *v5;
bool preallocated;
int e;
int flags;
slotvec *sv;
char *val;
size_t n1;
size_t sizea;
size_t size;
size_t qsize;
e = *__errno_location();
sv = slo... | static char *quotearg_n_options(int n, char const *arg, size_t argsize,
struct quoting_options const *options) {
int e = errno;
unsigned int n0 = n;
struct slotvec *sv = slotvec;
if (n < 0)
abort();
if (nslots <= n0) {
size_t n1 = n0 + 1;
bool preallocated = (sv... | quotearg_n_options | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_n_style(int n, quoting_style s, const char *arg) {
quoting_options o;
unsigned long v6;
v6 = __readfsqword(0x28u);
quoting_options_from_style(&o, s);
return quotearg_n_options(n, arg, 0xFFFFFFFFFFFFFFFFLL, &o);
} | char *quotearg_n_style(int n, enum quoting_style s, char const *arg) {
struct quoting_options const o = quoting_options_from_style(s);
return quotearg_n_options(n, arg, SIZE_MAX, &o);
} | quotearg_n_style | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_n_style_mem(int n, quoting_style s, const char *arg,
size_t argsize) {
quoting_options o;
unsigned long v8;
v8 = __readfsqword(0x28u);
quoting_options_from_style(&o, s);
return quotearg_n_options(n, arg, argsize, &o);
} | char *quotearg_n_style_mem(int n, enum quoting_style s, char const *arg,
size_t argsize) {
struct quoting_options const o = quoting_options_from_style(s);
return quotearg_n_options(n, arg, argsize, &o);
} | quotearg_n_style_mem | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_style(quoting_style s, const char *arg) {
return quotearg_n_style(0, s, arg);
} | char *quotearg_style(enum quoting_style s, char const *arg) {
return quotearg_n_style(0, s, arg);
} | quotearg_style | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *quotearg_style_mem(quoting_style s, const char *arg, size_t argsize) {
return quotearg_n_style_mem(0, s, arg, argsize);
} | char *quotearg_style_mem(enum quoting_style s, char const *arg,
size_t argsize) {
return quotearg_n_style_mem(0, s, arg, argsize);
} | quotearg_style_mem | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
quoting_options *
quoting_options_from_style(quoting_options *__return_ptr retstr,
quoting_style style) {
if (style == quoting_style_custom_quoting_style)
abort();
*(_QWORD *)&retstr->style = (unsigned int)style;
*(_QWORD *)retstr->quote_these_too = 0;
*(_QWORD *)&retstr->quote_th... | static struct quoting_options
quoting_options_from_style(enum quoting_style style) {
struct quoting_options o = {literal_quoting_style, 0, {0}, NULL, NULL};
if (style == custom_quoting_style)
abort();
o.style = style;
return o;
} | quoting_options_from_style | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void read_byte_size(char *wc, size_t wc_sz, FILE *pfp) {
char *v3;
int ch_0;
int ch_1;
char *pz;
do {
ch_0 = getc_unlocked(pfp);
if (ch_0 == -1) {
bogus_number:
*wc = 48;
wc[1] = 0;
return;
}
} while (((*__ctype_b_loc())[ch_0] & 0x800) == 0);
pz = wc + 1;
*wc = ch_0;
... | static void read_byte_size(char *wc, size_t wc_sz, FILE *pfp) {
char *pz = wc;
for (;;) {
int ch = getc(pfp);
if (ch == EOF)
goto bogus_number;
if (isdigit(ch)) {
*(pz++) = ch;
break;
}
}
for (;;) {
int ch = getc(pfp);
if (!isdigit(ch))
break;
*(pz++) = ch;... | read_byte_size | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void scribble_deinit() {
scrib_buf_t *sb;
scrib_buf_t *nxt;
sb = bufs;
scribble_init();
while (sb) {
nxt = sb->sb_next;
free(sb);
sb = nxt;
}
} | void scribble_deinit(void) {
scrib_buf_t *sb = bufs;
scribble_init();
while (sb != NULL) {
scrib_buf_t *nxt = sb->sb_next;
free(sb);
sb = nxt;
}
} | scribble_deinit | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void scribble_free() {
scrib_buf_t *sb;
for (sb = bufs; sb; sb = sb->sb_next)
sb->sb_off = 0;
} | void scribble_free(void) {
scrib_buf_t *sb = bufs;
while (sb != NULL) {
sb->sb_off = 0;
sb = sb->sb_next;
}
} | scribble_free | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void *scribble_get(ssize_t size) {
ssize_t sizea;
scrib_buf_t *sb;
char *buf;
sb = bufs;
sizea = (size + 8) & 0xFFFFFFFFFFFFFFF8LL;
while (sb) {
if (sizea <= sb->sb_size - sb->sb_off)
goto LABEL_7;
sb = sb->sb_next;
}
sb = new_scribble_block(sizea);
if (!sb)
return 0;
LABEL_7:
buf... | void *scribble_get(ssize_t size) {
scrib_buf_t *sb = bufs;
char *buf;
size = ROUND_SCRIBBLE(size + 1, (ssize_t)sizeof(void *));
for (;;) {
if (sb == NULL) {
sb = new_scribble_block((size_t)size);
if (sb == NULL)
return NULL;
break;
}
if ((sb->sb_size - sb->sb_off) >= siz... | scribble_get | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void scribble_init() {
bufs = 0;
next_buf = &bufs;
} | void scribble_init(void) {
bufs = NULL;
next_buf = &bufs;
} | scribble_init | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
int set_char_quoting(quoting_options *o, char c, int i) {
quoting_options *v3;
int r;
if (o)
v3 = o;
else
v3 = &default_quoting_options;
r = (v3->quote_these_too[(unsigned char)c >> 5] >> (c & 0x1F)) & 1;
v3->quote_these_too[(unsigned char)c >> 5] ^= (r ^ i & 1) << (c & 0x1F);
return r;
} | int set_char_quoting(struct quoting_options *o, char c, int i) {
unsigned char uc = c;
unsigned int *p =
(o ? o : &default_quoting_options)->quote_these_too + uc / INT_BITS;
int shift = uc % INT_BITS;
int r = (*p >> shift) & 1;
*p ^= ((i & 1) ^ r) << shift;
return r;
} | set_char_quoting | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void set_compaction(tOptions *opts, tOptDesc *od) {
char *v2;
int ix;
int ixa;
const char *c_type;
c_type = od->optArg.argString;
ix = 0;
check_intermixing(opts, od);
if (!strcmp(c_type, "none")) {
cmpr_state = 0;
} else {
while (strcmp(c_type, compaction[ix]->cmpr_name)) {
if (++ix >= ... | void set_compaction(tOptions *opts, tOptDesc *od) {
char const *c_type = od->optArg.argString;
int ix = 0;
(void)opts;
(void)od;
check_intermixing(opts, od);
if (strcmp(c_type, "none") == 0) {
cmpr_state = NULL;
return;
}
for (;;) {
if (strcmp(c_type, compaction[ix]->cmpr_name) == 0)
... | set_compaction | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void set_custom_quoting(quoting_options *o, const char *left_quote,
const char *right_quote) {
quoting_options *oa;
oa = o;
if (!o)
oa = &default_quoting_options;
oa->style = quoting_style_custom_quoting_style;
if (!left_quote || !right_quote)
abort();
oa->left_quote = left_... | void set_custom_quoting(struct quoting_options *o, char const *left_quote,
char const *right_quote) {
if (!o)
o = &default_quoting_options;
o->style = custom_quoting_style;
if (!left_quote || !right_quote)
abort();
o->left_quote = left_quote;
o->right_quote = right_quote;
} | set_custom_quoting | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
int set_quoting_flags(quoting_options *o, int i) {
quoting_options *oa;
int r;
oa = o;
if (!o)
oa = &default_quoting_options;
r = oa->flags;
oa->flags = i;
return r;
} | int set_quoting_flags(struct quoting_options *o, int i) {
int r;
if (!o)
o = &default_quoting_options;
r = o->flags;
o->flags = i;
return r;
} | set_quoting_flags | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void set_quoting_style(quoting_options *o, quoting_style s) {
quoting_options *v2;
if (o)
v2 = o;
else
v2 = &default_quoting_options;
v2->style = s;
} | void set_quoting_style(struct quoting_options *o, enum quoting_style s) {
(o ? o : &default_quoting_options)->style = s;
} | set_quoting_style | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void set_submitter() {
uid_t v0;
const char *uname;
size_t len;
char *buffer;
v0 = getuid();
uname = getuser(v0);
len = strlen(uname);
if (!uname)
fserr(4, "getpwuid", "getuid()");
buffer = (char *)xmalloc(len + 66);
memcpy(buffer, uname, len);
buffer[len] = 64;
gethostname(&buffer[len + 1]... | static void set_submitter(void) {
char *buffer;
char *uname = getuser(getuid());
size_t len = strlen(uname);
if (uname == NULL)
fserr(SHAR_EXIT_FAILED, "getpwuid", "getuid()");
buffer = xmalloc(len + 2 + HOST_NAME_MAX);
memcpy(buffer, uname, len);
buffer[len++] = '@';
gethostname(buffer + len, HOST_... | set_submitter | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
int shar(const char *lname, const char *rname) {
int split_flag;
int pipe_p;
FILE *input;
off_t size_left;
const char *lname_q;
const char *rname_q[2];
rname_q[1] = (const char *)__readfsqword(0x28u);
split_flag = 0;
lname_q = lname;
rname_q[0] = rname;
scribble_free();
if (!start_sharing_file(... | static int shar(const char *lname, const char *rname) {
FILE *input;
off_t size_left;
int split_flag = 0;
char const *lname_q = lname;
char const *rname_q = rname;
int pipe_p;
scribble_free();
if (!start_sharing_file(&lname_q, &rname_q, &input, &size_left, &pipe_p))
return SHAR_EXIT_FAILED;
if ... | shar | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void split_shar_ed_file(const char *restore, off_t *size_left,
int *split_flag) {
const char *argString;
size_t v4;
size_t v5;
int v6;
const char *v7;
int v8;
const char *v9;
int v10;
char *v11;
char *v12;
char *v13;
const char *v14;
opt_arg_union_t v15;
size_t sz1;
... | static void split_shar_ed_file(char const *restore, off_t *size_left,
int *split_flag) {
DEBUG_PRINT("New file, remaining %s, ", (*size_left));
DEBUG_PRINT("Limit still %s\n", OPT_VALUE_WHOLE_SIZE_LIMIT);
fprintf(output, "%s\n", OPT_ARG(HERE_DELIMITER));
fputs(" :\n", output);
... | split_shar_ed_file | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
int start_sharing_file(const char **lnameq_p, const char **rnameq_p, FILE **fpp,
off_t *size_left_p, int *pipe_p) {
char *v5;
char *v7;
off_t v8;
const char *v9;
char *v10;
size_t v11;
size_t v12;
const char *file_type;
const char *file_type_remote;
const char *lname;
const ... | static int start_sharing_file(char const **lnameq_p, char const **rnameq_p,
FILE **fpp, off_t *size_left_p, int *pipe_p) {
char const *lname = *lnameq_p;
char const *rname = *rnameq_p;
char const *file_type;
char const *file_type_remote;
if (!S_ISREG(struct_stat.st_mode & S_IFMT... | start_sharing_file | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void validate_opt_context(tOptions *opts, tOptDesc *od) {
const char *pz_Name;
char *v3;
if (initialization_done) {
pz_Name = od->pz_Name;
v3 = aoGetsText("The '%s' option must appear before any file names");
usage_message(v3, pz_Name);
}
} | void validate_opt_context(tOptions *opts, tOptDesc *od) {
(void)opts;
(void)od;
if (initialization_done)
usage_message(_("The '%s' option must appear before any file names"),
od->pz_Name);
} | validate_opt_context | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
int walkdown(walker_t routine, const char *local_name,
const char *restore_name) {
int *v3;
int *v5;
size_t v6;
size_t v7;
int status;
int restore_offset;
int space_need;
char *local_name_copy;
unsigned long sizeof_local_name;
char *restore_name_copy;
unsigned long sizeof_restore_name... | static int walkdown(walker_t routine, const char *local_name,
const char *restore_name) {
DIR *directory;
int status;
char *local_name_copy;
size_t local_name_length;
size_t sizeof_local_name;
char *restore_name_copy;
int restore_offset;
size_t restore_name_length;
size_t sizeof_... | walkdown | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
int walktree(walker_t routine, const char *local_name) {
void *v2;
char *v3;
const char *local_namea;
walker_t routinea;
int len;
const char *restore_name;
char *cursor;
char *local_name_copy;
unsigned long v11;
routinea = routine;
local_namea = local_name;
v11 = __readfsqword(0x28u);
len = s... | static int walktree(walker_t routine, const char *local_name) {
const char *restore_name;
char *local_name_copy;
{
int len = strlen(local_name);
char *cursor;
local_name_copy = (char *)alloca(len + 1);
memcpy(local_name_copy, local_name, len + 1);
cursor = local_name_copy + len - 1;
whi... | walktree | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *xgetcwd() {
char *cwd;
cwd = getcwd(0, 0);
if (!cwd && *__errno_location() == 12)
xalloc_die();
return cwd;
} | char *xgetcwd(void) {
char *cwd = getcwd(NULL, 0);
if (!cwd && errno == ENOMEM)
xalloc_die();
return cwd;
} | xgetcwd | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
void *xscribble_get(ssize_t sz) {
void *p;
p = scribble_get(sz);
if (!p) {
fprintf(stderr, "could not allocate %u bytes of scribble space", sz);
exit(1);
}
return p;
} | void *xscribble_get(ssize_t sz) {
void *p = scribble_get(sz);
if (p == NULL) {
fprintf(stderr, _("could not allocate %u bytes of scribble space"),
(unsigned int)sz);
exit(EXIT_FAILURE);
}
return p;
} | xscribble_get | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
char *xstrndup(const char *string, size_t n) {
char *s;
s = strndup(string, n);
if (!s)
xalloc_die();
return s;
} | char *xstrndup(const char *string, size_t n) {
char *s = strndup(string, n);
if (!s)
xalloc_die();
return s;
} | xstrndup | sharutils-4.15.2-r2 | app-arch | O0/app-arch/sharutils-4.15.2-r2/shar | ida | O0 |
bool check_multiple_hosts() {
std_vector<Result> _reference v0;
std_vector<Result> _reference v1;
long v2;
std__Rb_tree_const_iterator<std_string> _reference v3;
long v4;
bool v5;
std_set<std_string> _const_iterator hi;
std__Rb_tree_const_iterator<std_string> __Self __y;
size_t i;
std_set<std_string... | bool check_multiple_hosts() {
std::set<std::string> hostnames;
g_hostname = g_results[0].host;
for (size_t i = 0; i < g_results.size(); ++i) {
hostnames.insert(g_results[i].host);
}
if (hostnames.size() > 1) {
ERRX("Multiple different hostnames found in results:");
for (std::set<std::string>::co... | check_multiple_hosts | pmbw-0.6.3 | app-benchmarks | O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot | ida | O0 |
bool filter_sequential(const Result *r) { return r->nthreads == 1; } | bool filter_sequential(const Result &r) { return (r.nthreads == 1); } | filter_sequential | pmbw-0.6.3 | app-benchmarks | O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot | ida | O0 |
bool filter_sequential_64bit_reads(const Result *r) {
return r->nthreads == 1 && std_string_find(&r->funcname, "Read64", 0) == -1;
} | bool filter_sequential_64bit_reads(const Result &r) {
return (r.nthreads == 1) && (r.funcname.find("Read64") == std::string::npos);
} | filter_sequential_64bit_reads | pmbw-0.6.3 | app-benchmarks | O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot | ida | O0 |
bool filter_sequential_nonpermutation(const Result *r) {
return r->nthreads == 1 && std_string_find(&r->funcname, "Perm", 0) == -1;
} | bool filter_sequential_nonpermutation(const Result &r) {
return (r.nthreads == 1) && (r.funcname.find("Perm") == std::string::npos);
} | filter_sequential_nonpermutation | pmbw-0.6.3 | app-benchmarks | O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot | ida | O0 |
bool find_funcname(const std_string *funcname, size_t *funcname_id) {
const std_string *v3;
long v4;
long v5;
std_vector<std_string> _const_iterator it;
__gnu_cxx___normal_iterator<std_string *, std_vector<std_string>> __i;
size_t i;
unsigned long v9;
v9 = __readfsqword(0x28u);
for (i = 0; funclist[i... | static inline bool find_funcname(const std::string &funcname,
size_t &funcname_id) {
size_t i;
for (i = 0; funclist[i]; ++i) {
if (funcname == funclist[i]) {
funcname_id = i;
return true;
}
}
for (std::vector<std::string>::const_iterator it = g_unknown_funcli... | find_funcname | pmbw-0.6.3 | app-benchmarks | O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot | ida | O0 |
void join_plotlines(std_ostream *os, const std_vector<std_string> *plotlines,
const std_ostringstream *datass) {
long v3;
std_vector<std_string> _const_reference v4;
long v5;
long v6;
size_t i;
_BYTE v9[40];
unsigned long v10;
v10 = __readfsqword(0x28u);
if (std_vector<std_string>... | while (0)
void join_plotlines(std::ostream &os,
const std::vector<std::string> &plotlines,
const std::ostringstream &datass) {
if (plotlines.size() == 0)
return;
P("plot \\");
for (size_t i = 0; i < plotlines.size(); ++i) {
os << plotlines[i];
... | join_plotlines | pmbw-0.6.3 | app-benchmarks | O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
long v3;
long v4;
long v5;
long v6;
long v7;
long v8;
long v9;
long v10;
long v11;
long v12;
int v13;
long v14;
long v15;
std_vector<Result> _size_type v16;
long v17;
long v18;
long v19;
Result *M_current;
std_vector<Result... | int main(int argc, char *argv[]) {
std::string opt_hostname_override;
std::string opt_gnuplot_output_override;
if (argc == 1) {
process_stream(std::cin);
} else {
int opt;
while ((opt = getopt(argc, argv, "vh:o:")) != -1) {
switch (opt) {
case 'h':
opt_hostname_override = opta... | main | pmbw-0.6.3 | app-benchmarks | O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot | ida | O0 |
void output_gnuplot(std_ostream *os) {
long v1;
long v2;
long v3;
long v4;
long v5;
long v6;
long v7;
long v8;
long v9;
long v10;
long v11;
long v12;
long v13;
long v14;
long v15;
long v16;
long v17;
long v18;
long v19;
v1 = std_operator < < <std_char_traits<char>>(
... | void output_gnuplot(std::ostream &os) {
P("set terminal pdf size 28cm,19.6cm linewidth 2.0 font \"Arial,18\" "
"enhanced");
P("set output '" << g_gnuplot_output << "'");
P("");
P("set pointsize 0.7");
P("set style line 6 lc rgb '#f0b000'");
P("set style line 15 lc rgb '#f0b000'");
P("set style line 24... | output_gnuplot | pmbw-0.6.3 | app-benchmarks | O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot | ida | O0 |
bool parse_double(const std_string *value, double *out) {
const char *v2;
char *endp[2];
endp[1] = (char *)__readfsqword(0x28u);
v2 = (const char *)std_string_c_str(value);
*out = strtod(v2, endp);
return endp[0] && !*endp[0];
} | static inline bool parse_double(const std::string &value, double &out) {
char *endp;
out = strtod(value.c_str(), &endp);
return (endp && *endp == 0);
} | parse_double | pmbw-0.6.3 | app-benchmarks | O0/app-benchmarks/pmbw-0.6.3/stats2gnuplot | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.