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 |
|---|---|---|---|---|---|---|---|
void ag_get_key_word(int ag_k) {
const unsigned char *v1;
const unsigned char *v2;
int save_index;
unsigned int ag_ch;
unsigned int ag_cha;
unsigned int ag_chb;
const unsigned char *sp_0;
const unsigned char *sp_0a;
save_index = config_pcb.rx;
while (2) {
switch (ag_key_act[ag_k]) {
case 0u... | static void ag_get_key_word(int ag_k) {
int save_index = (PCB).rx;
const unsigned char *sp;
unsigned ag_ch;
while (1) {
switch (ag_key_act[ag_k]) {
case ag_cf_end_key:
sp = ag_key_ends + ag_key_jmp[ag_k];
do {
if ((ag_ch = *sp++) == 0) {
int ag_k1 = ag_key_parm[ag_k];
... | ag_get_key_word | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
unsigned int ag_look_ahead() {
int v0;
if (config_pcb.rx >= config_pcb.fx) {
config_pcb.input_code = fgetc(cfgin);
++config_pcb.fx;
v0 = config_pcb.rx++;
config_pcb.lab[v0] = config_pcb.input_code;
} else {
v0 = config_pcb.rx++;
}
return config_pcb.lab[v0];
} | static unsigned ag_look_ahead(void) {
if ((PCB).rx < (PCB).fx) {
return (unsigned)CONVERT_CASE((PCB).lab[(PCB).rx++]);
}
GET_INPUT;
(PCB).fx++;
return (unsigned)CONVERT_CASE((PCB).lab[(PCB).rx++] = (PCB).input_code);
} | ag_look_ahead | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_prot() {
int ag_k;
++config_pcb.btsx;
ag_k = 32 - config_pcb.btsx;
if (32 - config_pcb.btsx > config_pcb.ssx) {
config_pcb.bts[config_pcb.btsx] = config_pcb.sn;
config_pcb.bts[ag_k] = config_pcb.ssx;
config_pcb.vs[ag_k].alignment = config_pcb.vs[config_pcb.ssx].alignment;
config_pcb.ss[... | static void ag_prot(void) {
int ag_k = 32 - ++(PCB).btsx;
if (ag_k <= (PCB).ssx) {
(PCB).exit_flag = AG_STACK_ERROR_CODE;
PARSER_STACK_OVERFLOW;
return;
}
(PCB).bts[(PCB).btsx] = (PCB).sn;
(PCB).bts[ag_k] = (PCB).ssx;
(PCB).vs[ag_k] = (PCB).vs[(PCB).ssx];
(PCB).ss[ag_k] = (PCB).ss[(PCB).ssx];
... | ag_prot | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_ra() {
switch (ag_ap) {
case 14:
ag_rp_1();
break;
case 15:
ag_rp_2();
break;
case 16:
ag_rp_3();
break;
case 17:
ag_rp_4();
break;
case 18:
ag_rp_5();
break;
case 19:
ag_rp_6();
break;
case 20:
ag_rp_7(config_pcb.vs[config_pcb.ssx + 2].alignme... | static void ag_ra(void) {
switch (ag_rpx[ag_ap]) {
case 1:
ag_rp_1();
break;
case 2:
ag_rp_2();
break;
case 3:
ag_rp_3();
break;
case 4:
ag_rp_4();
break;
case 5:
ag_rp_5();
break;
case 6:
ag_rp_6();
break;
case 7:
ag_rp_7(V(2, int));
break;
case... | ag_ra | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_1() {
const char *str;
struct passwd *pwd;
immuneuid *u;
str = PopString(Stk);
if (!userfile) {
pwd = getpwnam(str);
if (pwd) {
u = (immuneuid *)calloc(0x28u, 1u);
u->uid = pwd->pw_uid;
AddTail(&iuidlist, &u->Node);
}
}
} | static void ag_rp_1(void) {
char *str;
struct immuneuid *u;
struct passwd *pwd;
str = PopString(Stk);
if (!userfile) {
pwd = getpwnam(str);
if (pwd) {
u = calloc(sizeof(struct immuneuid), 1);
u->uid = pwd->pw_uid;
AddTail(&iuidlist, (struct Node *)u);
}
}
} | ag_rp_1 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_10(int i) {
if (!userfile)
killproc = i;
} | static void ag_rp_10(int i) {
if (!userfile)
killproc = i;
} | ag_rp_10 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_11(double r) {
if (!userfile)
badkarmarate = r;
} | static void ag_rp_11(double r) {
if (!userfile)
badkarmarate = r;
} | ag_rp_11 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_12(double r) {
if (!userfile)
karmarestorationrate = r;
} | static void ag_rp_12(double r) {
if (!userfile)
karmarestorationrate = r;
} | ag_rp_12 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_13(int i) {
if (!userfile)
periodicity = i;
} | static void ag_rp_13(int i) {
if (!userfile)
periodicity = i;
} | ag_rp_13 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_14(int i) {
if (!userfile)
rereadcfgperiodicity = i;
} | static void ag_rp_14(int i) {
if (!userfile)
rereadcfgperiodicity = i;
} | ag_rp_14 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_15(int c) {
InitString(Stk);
AddChar(Stk, c);
} | static void ag_rp_15(int c) {
InitString(Stk);
AddChar(Stk, c);
} | ag_rp_15 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_16(int c) { AddChar(Stk, c); } | static void ag_rp_16(int c) { AddChar(Stk, c); } | ag_rp_16 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_17(int c) {
InitString(Stk);
AddChar(Stk, c);
} | static void ag_rp_17(int c) {
InitString(Stk);
AddChar(Stk, c);
} | ag_rp_17 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_18(char c) {
InitString(Stk);
AddChar(Stk, c);
} | static void ag_rp_18(char c) {
InitString(Stk);
AddChar(Stk, c);
} | ag_rp_18 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_2() {
const char *str;
immuneexe *exe;
str = PopString(Stk);
exe = (immuneexe *)calloc(0x30u, 1u);
exe->exename = strdup(str);
exe->alluid = userfile == 0;
exe->uid = uid;
AddTail(&iexelist, &exe->Node);
} | static void ag_rp_2(void) {
struct immuneexe *exe;
char *str;
str = PopString(Stk);
exe = calloc(sizeof(struct immuneexe), 1);
exe->exename = strdup(str);
exe->alluid = !userfile;
exe->uid = uid;
AddTail(&iexelist, (struct Node *)exe);
} | ag_rp_2 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_3() {
const char *str;
badexe *exe;
str = PopString(Stk);
exe = (badexe *)calloc(0x30u, 1u);
exe->exename = strdup(str);
exe->alluid = userfile == 0;
exe->uid = uid;
AddTail(&bexelist, &exe->Node);
} | static void ag_rp_3(void) {
struct badexe *exe;
char *str;
str = PopString(Stk);
exe = calloc(sizeof(struct badexe), 1);
exe->exename = strdup(str);
exe->alluid = !userfile;
exe->uid = uid;
AddTail(&bexelist, (struct Node *)exe);
} | ag_rp_3 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_4() {
const char *str;
goodexe *exe;
str = PopString(Stk);
exe = (goodexe *)calloc(0x30u, 1u);
exe->exename = strdup(str);
exe->alluid = userfile == 0;
exe->uid = uid;
AddTail(&gexelist, &exe->Node);
} | static void ag_rp_4(void) {
struct goodexe *exe;
char *str;
str = PopString(Stk);
exe = calloc(sizeof(struct goodexe), 1);
exe->exename = strdup(str);
exe->alluid = !userfile;
exe->uid = uid;
AddTail(&gexelist, (struct Node *)exe);
} | ag_rp_4 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_5() {
const char *str;
runawayexe *exe;
str = PopString(Stk);
exe = (runawayexe *)calloc(0x30u, 1u);
exe->exename = strdup(str);
exe->alluid = userfile == 0;
exe->uid = uid;
AddTail(&runawaylist, &exe->Node);
} | static void ag_rp_5(void) {
struct runawayexe *exe;
char *str;
str = PopString(Stk);
exe = calloc(sizeof(struct runawayexe), 1);
exe->exename = strdup(str);
exe->alluid = !userfile;
exe->uid = uid;
AddTail(&runawaylist, (struct Node *)exe);
} | ag_rp_5 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_6() {
const char *str;
hungryexe *exe;
str = PopString(Stk);
exe = (hungryexe *)calloc(0x30u, 1u);
exe->exename = strdup(str);
exe->alluid = userfile == 0;
exe->uid = uid;
AddTail(&hungrylist, &exe->Node);
} | static void ag_rp_6(void) {
struct hungryexe *exe;
char *str;
str = PopString(Stk);
exe = calloc(sizeof(struct hungryexe), 1);
exe->exename = strdup(str);
exe->alluid = !userfile;
exe->uid = uid;
AddTail(&hungrylist, (struct Node *)exe);
} | ag_rp_6 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_7(int i) {
if (!userfile)
notnice = i;
} | static void ag_rp_7(int i) {
if (!userfile)
notnice = i;
} | ag_rp_7 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_8(int i) {
if (!userfile)
batchjob = i;
} | static void ag_rp_8(int i) {
if (!userfile)
batchjob = i;
} | ag_rp_8 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_rp_9(int i) {
if (!userfile)
runaway = i;
} | static void ag_rp_9(int i) {
if (!userfile)
runaway = i;
} | ag_rp_9 | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_track() {
int v0;
int v1;
int v2;
int ag_k;
int ag_ka;
int ag_ch;
ag_k = 0;
while (ag_k < config_pcb.rx) {
v0 = ag_k++;
ag_ch = config_pcb.lab[v0];
if (ag_ch > 13)
goto LABEL_8;
if (ag_ch < 12) {
if (ag_ch == 9) {
config_pcb.column += 8 - (config_pcb.column -... | static void ag_track(void) {
int ag_k = 0;
while (ag_k < (PCB).rx) {
int ag_ch = (PCB).lab[ag_k++];
switch (ag_ch) {
case '\n':
(PCB).column = 1, (PCB).line++;
case '\r':
case '\f':
break;
case '\t':
(PCB).column += (TAB_SPACING) - ((PCB).column - 1) % (TAB_SPACING);
... | ag_track | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void ag_undo() {
int v0;
int ag_k;
if (config_pcb.drt != -1) {
while (config_pcb.btsx) {
ag_k = 32 - config_pcb.btsx;
v0 = config_pcb.btsx--;
config_pcb.sn = config_pcb.bts[v0];
config_pcb.ssx = config_pcb.bts[ag_k];
config_pcb.vs[config_pcb.ssx].alignment = config_pcb.vs[ag_k].... | static void ag_undo(void) {
if ((PCB).drt == -1)
return;
while ((PCB).btsx) {
int ag_k = 32 - (PCB).btsx;
(PCB).sn = (PCB).bts[(PCB).btsx--];
(PCB).ssx = (PCB).bts[ag_k];
(PCB).vs[(PCB).ssx] = (PCB).vs[ag_k];
(PCB).ss[(PCB).ssx] = (PCB).ss[ag_k];
}
(PCB).token_number = (config_token_type... | ag_undo | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void config() {
int v0;
config_token_type v1;
int v2;
config_token_type v3;
unsigned int ag_t1;
unsigned int ag_t2;
unsigned int ag_k;
init_config();
config_pcb.exit_flag = 0;
while (!config_pcb.exit_flag) {
ag_t1 = ag_sbt[config_pcb.sn];
if (ag_tstt[ag_sbt[config_pcb.sn]]) {
ag_t2 = ... | void config(void) {
init_config();
(PCB).exit_flag = AG_RUNNING_CODE;
while ((PCB).exit_flag == AG_RUNNING_CODE) {
unsigned ag_t1 = ag_sbt[(PCB).sn];
if (ag_tstt[ag_t1]) {
unsigned ag_t2 = ag_sbe[(PCB).sn] - 1;
if ((PCB).rx < (PCB).fx) {
(PCB).input_code = (PCB).lab[(PCB).rx++];
... | config | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void dumphandler(int signum) { dumpflag = 1; } | void dumphandler(int signum) {
dumpflag = 1;
#ifdef TARGET_solaris
signal(signum, dumphandler);
#endif
} | dumphandler | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
knownuid *finduid(uid_t uid) {
knownuid *k;
for (k = (knownuid *)uidlist.lh_Head; k->Node.ln_Succ;
k = (knownuid *)k->Node.ln_Succ) {
if (uid == k->uid)
return k;
}
return 0;
} | struct knownuid *finduid(uid_t uid)
{
struct knownuid *k;
for (k = (struct knownuid *)uidlist.lh_Head; k->Node.ln_Succ;
k = (struct knownuid *)k->Node.ln_Succ) {
if (k->uid == uid) {
return k;
}
}
return NULL;
} | finduid | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void huphandler(int signum) { hupflag = 1; } | void huphandler(int signum) {
hupflag = 1;
#ifdef TARGET_solaris
signal(signum, huphandler);
#endif
} | huphandler | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void init_config() {
config_pcb.fx = 0;
config_pcb.rx = 0;
config_pcb.ssx = 0;
config_pcb.sn = 0;
config_pcb.ss[0] = 0;
config_pcb.exit_flag = 0;
config_pcb.line = 1;
config_pcb.column = 1;
config_pcb.btsx = 0;
config_pcb.drt = -1;
} | void init_config(void) {
(PCB).rx = (PCB).fx = 0;
(PCB).ss[0] = (PCB).sn = (PCB).ssx = 0;
(PCB).exit_flag = AG_RUNNING_CODE;
(PCB).line = FIRST_LINE;
(PCB).column = FIRST_COLUMN;
(PCB).btsx = 0, (PCB).drt = -1;
} | init_config | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void killhandler(int signum) { killflag = signum; } | void killhandler(int signum) { killflag = signum; } | killhandler | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
int v3;
double v4;
int Cnt;
int Cnta;
pid_t mypid;
char *daemonpidfile;
FILE *pidfile;
timeval start;
timeval end;
timeval lastmeas;
unsigned long v14;
v14 = __readfsqword(0x28u);
daemonpidfile = 0;
for (Cnt = 0; Cnt < argc; ++Cnt) ... | int main(int argc, char *argv[]) {
int Cnt;
struct timeval start, end, lastmeas;
char *daemonpidfile = NULL;
pid_t mypid;
FILE *pidfile;
for (Cnt = 0; Cnt < argc; Cnt++) {
if (!strcmp("-v", argv[Cnt])) {
printf("%s", versionstring);
exit(0);
} else if (!strcmp("-d", argv[Cnt])) {
... | main | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void performdump() {
const char *v0;
const char *v1;
const char *v2;
const char *v3;
const char *v4;
procent *proc;
for (proc = (procent *)proclist.lh_Head; proc->Node.ln_Succ;
proc = (procent *)proc->Node.ln_Succ) {
if (proc->hungryflag)
v0 = "hungry";
else
v0 = (const char *)... | void performdump(void) {
struct procent *proc;
for (proc = (struct procent *)proclist.lh_Head; proc->Node.ln_Succ;
proc = (struct procent *)proc->Node.ln_Succ) {
syslog(
LOG_INFO,
"%s: pid %ld, nice %ld+%ld, parent %ld, at %g secs CPU (current %g), "
"badkarma %g, uid %ld %s %s ... | performdump | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
procent *procfindbypid(List *plist, pid_t pid) {
procent *proc;
for (proc = (procent *)plist->lh_Head; proc->Node.ln_Succ;
proc = (procent *)proc->Node.ln_Succ) {
if (pid == proc->pid)
return proc;
}
return 0;
} | struct procent *procfindbypid(struct List *plist, pid_t pid) {
struct procent *proc;
for (proc = (struct procent *)plist->lh_Head; proc->Node.ln_Succ;
proc = (struct procent *)proc->Node.ln_Succ) {
if (proc->pid == pid)
return proc;
}
return NULL;
} | procfindbypid | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void procinsert(List *list, procent *proc) {
procent *node;
for (node = (procent *)list->lh_Head; node;
node = (procent *)node->Node.ln_Succ) {
if (node->Node.ln_Succ && node->pid > proc->pid) {
Insert(list, &proc->Node, node->Node.ln_Pred);
return;
}
if (!node->Node.ln_Succ)
A... | void procinsert(struct List *list, struct procent *proc)
{
struct procent *node;
for (node = (struct procent *)list->lh_Head; node;
node = (struct procent *)node->Node.ln_Succ) {
if (node->Node.ln_Succ && node->pid > proc->pid) {
Insert(list, (struct Node *)proc, node->Node.ln_Pred);
break;... | procinsert | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void reconfighandler(int signum) { reconfigflag = 1; } | void reconfighandler(int signum) {
reconfigflag = 1;
#ifdef TARGET_solaris
signal(signum, reconfighandler);
#endif
} | reconfighandler | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
double timediff(timeval *starttime, timeval *endtime) {
int deltasec;
int deltausec;
deltasec = endtime->tv_sec - starttime->tv_sec;
deltausec = endtime->tv_usec - starttime->tv_usec;
if (deltausec < 0) {
deltausec += 1000000;
--deltasec;
}
return 0.000001 * (double)deltausec + (double)deltasec;
... | double timediff(struct timeval *starttime, struct timeval *endtime) {
int deltasec;
int deltausec;
deltasec = endtime->tv_sec - starttime->tv_sec;
deltausec = endtime->tv_usec - starttime->tv_usec;
if (deltausec < 0) {
deltausec += 1000000;
deltasec--;
}
return ((double)deltasec) + 1.e-6 * delt... | timediff | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
void updatecpuusage() {
procent *proc;
procent *nproc;
procent *nproca;
proc = (procent *)proclist.lh_Head;
nproc = (procent *)newproclist.lh_Head;
while (proc->Node.ln_Succ || nproc->Node.ln_Succ) {
if (nproc->Node.ln_Succ &&
(!proc->Node.ln_Succ || nproc->pid <= proc->pid)) {
if (proc->... | void updatecpuusage(void) {
struct procent *proc, *nproc;
for (proc = (struct procent *)proclist.lh_Head,
nproc = (struct procent *)newproclist.lh_Head;
proc->Node.ln_Succ || nproc->Node.ln_Succ;) {
if ((!nproc->Node.ln_Succ ||
(proc->Node.ln_Succ && (nproc->pid > proc->pid)))) {
... | updatecpuusage | verynice-1.1-r3 | app-admin | O0/app-admin/verynice-1.1-r3/verynice | ida | O0 |
gboolean check_arguments(SqliterepoCmdOptions *options, GError **err) {
gchar *compress_type;
unsigned int v3;
gchar *chcksum_type;
unsigned int v6;
cr_ChecksumType type;
if (options->compress_type) {
options->compression_type = cr_compression_type(options->compress_type);
if (options->compression_... | static gboolean check_arguments(SqliterepoCmdOptions *options, GError **err) {
if (options->compress_type) {
options->compression_type = cr_compression_type(options->compress_type);
if (options->compression_type == CR_CW_UNKNOWN_COMPRESSION) {
g_set_error(err, CREATEREPO_C_ERROR, CRE_ERROR,
... | check_arguments | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
gboolean compress_sqlite_dbs(
const gchar *tmp_out_repo, const gchar *pri_db_filename,
cr_RepomdRecord **in_pri_db_rec, const gchar *fil_db_filename,
cr_RepomdRecord **in_fil_db_rec, const gchar *oth_db_filename,
cr_RepomdRecord **in_oth_db_rec, cr_CompressionType compression_type,
cr_ChecksumType c... | static gboolean compress_sqlite_dbs(
const gchar *tmp_out_repo, const gchar *pri_db_filename,
cr_RepomdRecord **in_pri_db_rec, const gchar *fil_db_filename,
cr_RepomdRecord **in_fil_db_rec, const gchar *oth_db_filename,
cr_RepomdRecord **in_oth_db_rec, cr_CompressionType compression_type,
cr_Checksu... | compress_sqlite_dbs | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
gboolean filelists_to_sqlite(const gchar *fil_xml_path, cr_SqliteDb *fil_db,
GError **err) {
return cr_xml_parse_filelists(fil_xml_path, 0, 0, pkgcb, fil_db, warningcb,
fil_xml_path, err) == 0;
} | static gboolean filelists_to_sqlite(const gchar *fil_xml_path,
cr_SqliteDb *fil_db, GError **err) {
int rc;
rc = cr_xml_parse_filelists(fil_xml_path, NULL, NULL, pkgcb, (void *)fil_db,
warningcb, (void *)fil_xml_path, err);
if (rc != CRE_OK)
re... | filelists_to_sqlite | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
gboolean gen_new_repomd(const gchar *tmp_out_repo, cr_Repomd *in_repomd,
cr_RepomdRecord *in_pri_db_rec,
cr_RepomdRecord *in_fil_db_rec,
cr_RepomdRecord *in_oth_db_rec, GError **err) {
gboolean v6;
int *v7;
const char *v8;
gchar *v9;
unsi... | static gboolean gen_new_repomd(const gchar *tmp_out_repo, cr_Repomd *in_repomd,
cr_RepomdRecord *in_pri_db_rec,
cr_RepomdRecord *in_fil_db_rec,
cr_RepomdRecord *in_oth_db_rec, GError **err) {
cr_Repomd *repomd = NULL;
cr_Re... | gen_new_repomd | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
gboolean generate_sqlite_from_xml(const gchar *path,
cr_CompressionType compression_type,
cr_ChecksumType checksum_type,
gboolean local_sqlite, gboolean force,
gboolean keep_old, GErro... | static gboolean generate_sqlite_from_xml(const gchar *path,
cr_CompressionType compression_type,
cr_ChecksumType checksum_type,
gboolean local_sqlite, gboolean force,
... | generate_sqlite_from_xml | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
const char *v3;
const char *v4;
char **argva;
int argca;
gboolean ret;
SqliterepoCmdOptions *options;
GError *tmp_err[2];
argca = argc;
argva = (char **)argv;
tmp_err[1] = (GError *)__readfsqword(0x28u);
ret = 1;
tmp_err[0] = 0;
optio... | int main(int argc, char **argv) {
gboolean ret = TRUE;
_cleanup_sqliterepocmdoptions_free_ SqliterepoCmdOptions *options = NULL;
_cleanup_error_free_ GError *tmp_err = NULL;
options = sqliterepocmdoptions_new();
if (!parse_sqliterepo_arguments(&argc, &argv, options, &tmp_err)) {
g_printerr("%s\n", tmp_er... | main | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
gboolean move_results(const gchar *tmp_out_repo, const gchar *in_repo,
GError **err) {
gboolean v3;
gchar *message;
unsigned int v5;
int v6;
int *v7;
const char *v8;
gchar *v9;
gchar *v10;
unsigned int v11;
int v12;
int *v13;
const char *v14;
gchar *v15;
gchar *v16;
u... | static gboolean move_results(const gchar *tmp_out_repo, const gchar *in_repo,
GError **err) {
_cleanup_dir_close_ GDir *dirp = NULL;
_cleanup_error_free_ GError *tmp_err = NULL;
dirp = g_dir_open(tmp_out_repo, 0, &tmp_err);
if (!dirp) {
g_set_error(err, CREATEREPO_C_ERROR, CRE_... | move_results | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
gboolean other_to_sqlite(const gchar *oth_xml_path, cr_SqliteDb *oth_db,
GError **err) {
return cr_xml_parse_other(oth_xml_path, 0, 0, pkgcb, oth_db, warningcb,
oth_xml_path, err) == 0;
} | static gboolean other_to_sqlite(const gchar *oth_xml_path, cr_SqliteDb *oth_db,
GError **err) {
int rc;
rc = cr_xml_parse_other(oth_xml_path, NULL, NULL, pkgcb, (void *)oth_db,
warningcb, (void *)oth_xml_path, err);
if (rc != CRE_OK)
return FALSE;
re... | other_to_sqlite | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
gboolean parse_sqliterepo_arguments(int *argc, char ***argv,
SqliterepoCmdOptions *options,
GError **err) {
gboolean ret;
GOptionContext *context;
GOptionEntry cmd_entries[10];
unsigned long v9;
v9 = __readfsqword(0x28u);
cmd_entries[0... | CR_DEFINE_CLEANUP_FUNCTION0(SqliterepoCmdOptions *,
cr_local_sqliterepocmdoptions_free,
sqliterepocmdoptions_free)
#define _cleanup_sqliterepocmdoptions_free_ \
__attribute__((cleanup(cr_local_sqliterepocmdoptions_free)))
stat... | parse_sqliterepo_arguments | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
int pkgcb(cr_Package *pkg, void *cbdata, GError **err) {
int rc;
rc = cr_db_add_pkg(cbdata, pkg, err);
cr_package_free(pkg);
return rc != 0;
} | static int pkgcb(cr_Package *pkg, void *cbdata, GError **err) {
int rc;
rc = cr_db_add_pkg((cr_SqliteDb *)cbdata, pkg, err);
cr_package_free(pkg);
if (rc != CRE_OK)
return CR_CB_RET_ERR;
return CR_CB_RET_OK;
} | pkgcb | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
gboolean primary_to_sqlite(const gchar *pri_xml_path, cr_SqliteDb *pri_db,
GError **err) {
return cr_xml_parse_primary(pri_xml_path, 0, 0, pkgcb, pri_db, warningcb,
pri_xml_path, 1, err) == 0;
} | static gboolean primary_to_sqlite(const gchar *pri_xml_path,
cr_SqliteDb *pri_db, GError **err) {
int rc;
rc = cr_xml_parse_primary(pri_xml_path, NULL, NULL, pkgcb, (void *)pri_db,
warningcb, (void *)pri_xml_path, TRUE, err);
if (rc != CRE_OK)
retu... | primary_to_sqlite | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
gboolean remove_old_if_different(const gchar *repo_path,
cr_RepomdRecord *old_rec,
cr_RepomdRecord *new_rec, GError **err) {
gboolean v4;
int *v5;
const char *v6;
gchar *v7;
unsigned int v8;
gboolean identical;
int rc;
gchar *old_fn;
gc... | static gboolean remove_old_if_different(const gchar *repo_path,
cr_RepomdRecord *old_rec,
cr_RepomdRecord *new_rec,
GError **err) {
int rc;
_cleanup_free_ gchar *old_fn = NULL;
_cleanup_free_ gc... | remove_old_if_different | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
gboolean sqlite_dbinfo_update(cr_Repomd *repomd, cr_SqliteDb *pri_db,
cr_SqliteDb *fil_db, cr_SqliteDb *oth_db,
GError **err) {
cr_RepomdRecord *rec;
cr_RepomdRecord *reca;
cr_RepomdRecord *recb;
if (pri_db) {
rec = (cr_RepomdRecord *)cr_repomd_ge... | static gboolean sqlite_dbinfo_update(cr_Repomd *repomd, cr_SqliteDb *pri_db,
cr_SqliteDb *fil_db, cr_SqliteDb *oth_db,
GError **err) {
cr_RepomdRecord *rec = NULL;
if (pri_db) {
rec = cr_repomd_get_record(repomd, "primary");
if (rec ... | sqlite_dbinfo_update | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
void sqliterepocmdoptions_free(SqliterepoCmdOptions *options) {
g_free(options->compress_type);
g_free(options);
} | static void sqliterepocmdoptions_free(SqliterepoCmdOptions *options) {
g_free(options->compress_type);
g_free(options);
} | sqliterepocmdoptions_free | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
SqliterepoCmdOptions *sqliterepocmdoptions_new() {
SqliterepoCmdOptions *result;
result = (SqliterepoCmdOptions *)g_malloc_n(1, 56);
result->version = 0;
result->quiet = 0;
result->verbose = 0;
result->force = 0;
result->keep_old = 0;
result->xz_compression = 0;
result->compress_type = 0;
result->c... | static SqliterepoCmdOptions *sqliterepocmdoptions_new(void) {
SqliterepoCmdOptions *options;
options = g_new(SqliterepoCmdOptions, 1);
options->version = FALSE;
options->quiet = FALSE;
options->verbose = FALSE;
options->force = FALSE;
options->keep_old = FALSE;
options->xz_compression = FALSE;
option... | sqliterepocmdoptions_new | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
gboolean uses_simple_md_filename(cr_Repomd *repomd, gboolean *simple_md,
GError **err) {
unsigned int v3;
gboolean v4;
unsigned int v5;
gchar *basename;
cr_RepomdRecord *rec;
unsigned long v10;
v10 = __readfsqword(0x28u);
rec = (cr_RepomdRecord *)cr_repomd_get_record(re... | static gboolean uses_simple_md_filename(cr_Repomd *repomd, gboolean *simple_md,
GError **err) {
cr_RepomdRecord *rec = NULL;
rec = cr_repomd_get_record(repomd, "primary");
if (!rec) {
g_set_error(err, CREATEREPO_C_ERROR, CRE_ERROR,
"Repomd doen't contai... | uses_simple_md_filename | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
int warningcb(cr_XmlParserWarningType type, char *msg, void *cbdata,
GError **err) {
g_log(0, 16, "XML parser warning (%s): %s\n", (const char *)cbdata, msg);
return 0;
} | static int warningcb(G_GNUC_UNUSED cr_XmlParserWarningType type, char *msg,
void *cbdata, G_GNUC_UNUSED GError **err) {
g_warning("XML parser warning (%s): %s\n", (gchar *)cbdata, msg);
return CR_CB_RET_OK;
} | warningcb | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
gboolean xml_to_sqlite(const gchar *pri_xml_path, const gchar *fil_xml_path,
const gchar *oth_xml_path, cr_SqliteDb *pri_db,
cr_SqliteDb *fil_db, cr_SqliteDb *oth_db, GError **err) {
if (pri_xml_path && pri_db) {
if (!primary_to_sqlite(pri_xml_path, pri_db, err))
... | static gboolean xml_to_sqlite(const gchar *pri_xml_path,
const gchar *fil_xml_path,
const gchar *oth_xml_path, cr_SqliteDb *pri_db,
cr_SqliteDb *fil_db, cr_SqliteDb *oth_db,
GError **err) {
gboolean... | xml_to_sqlite | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/sqliterepo_c | ida | O0 |
char *cab_error(mscab_decompressor *cd) {
char *result;
int *v2;
switch (cd->last_error(cd)) {
case 2:
if (*__errno_location())
goto LABEL_10;
result = "file open error";
break;
case 3:
if (*__errno_location())
goto LABEL_10;
result = "file read error";
break;
case 4:
... | static char *cab_error(struct mscab_decompressor *cd) {
switch (cd->last_error(cd)) {
case MSPACK_ERR_OPEN:
return errno ? strerror(errno) : "file open error";
case MSPACK_ERR_READ:
return errno ? strerror(errno) : "file read error";
case MSPACK_ERR_WRITE:
return errno ? strerror(errno) : "file writ... | cab_error | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void *cabx_alloc(mspack_system *this, size_t bytes) { return malloc(bytes); } | static void *cabx_alloc(struct mspack_system *this, size_t bytes) {
return malloc(bytes);
} | cabx_alloc | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void cabx_close(mspack_file *file) {
if (file) {
if (*(const char **)&file[2].dummy == TEST_FNAME) {
md5_finish_ctx(&md5_context, md5_result);
} else if (LOBYTE(file[4].dummy)) {
fclose(*(FILE **)&file->dummy);
}
free(file);
}
} | static void cabx_close(struct mspack_file *file) {
struct mspack_file_p *this = (struct mspack_file_p *)file;
if (this) {
if (this->name == TEST_FNAME) {
md5_finish_ctx(&md5_context, (void *)&md5_result);
} else if (this->regular_file) {
fclose(this->fh);
}
free(this);
}
} | cabx_close | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void cabx_copy(void *src, void *dest, size_t bytes) {
memcpy(dest, src, bytes);
} | static void cabx_copy(void *src, void *dest, size_t bytes) {
memcpy(dest, src, bytes);
} | cabx_copy | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void cabx_free(void *buffer) { free(buffer); } | static void cabx_free(void *buffer) { free(buffer); } | cabx_free | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void cabx_msg(mspack_file *file, const char *format, ...) {
long v2;
long v3;
long v4;
long v5;
va_list ap;
unsigned long v7;
long v8;
long v9;
long v10;
long v11;
va_start(ap, format);
v2 = va_arg(ap, _QWORD);
v3 = va_arg(ap, _QWORD);
v4 = va_arg(ap, _QWORD);
v5 = va_arg(ap, _QWORD);
v... | static void cabx_msg(struct mspack_file *file, const char *format, ...) {
va_list ap;
if (file) {
fprintf(stderr, "%s: ", ((struct mspack_file_p *)file)->name);
}
va_start(ap, format);
vfprintf(stderr, format, ap);
va_end(ap);
fputc((int)'\n', stderr);
fflush(stderr);
} | cabx_msg | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
mspack_file *cabx_open(mspack_system *this, const char *filename, int mode) {
const char *fmode;
mspack_file_p *fh;
if ((filename == STDOUT_FNAME || filename == TEST_FNAME) && mode != 1)
return 0;
if (mode == 3) {
fmode = (const char *)&unk_7B0A;
} else {
if (mode > 3)
return 0;
if (mod... | static struct mspack_file *cabx_open(struct mspack_system *this,
const char *filename, int mode) {
struct mspack_file_p *fh;
const char *fmode;
if (filename == STDOUT_FNAME || filename == TEST_FNAME) {
if (mode != MSPACK_SYS_OPEN_WRITE) {
return NULL;
}
}
... | cabx_open | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
int cabx_read(mspack_file *file, void *buffer, int bytes) {
int count;
if (file && LOBYTE(file[4].dummy) && buffer && bytes >= 0 &&
(count = fread(buffer, 1u, bytes, *(FILE **)&file->dummy),
!ferror(*(FILE **)&file->dummy))) {
return count;
} else {
return -1;
}
} | static int cabx_read(struct mspack_file *file, void *buffer, int bytes) {
struct mspack_file_p *this = (struct mspack_file_p *)file;
if (this && this->regular_file && buffer && bytes >= 0) {
size_t count = fread(buffer, 1, (size_t)bytes, this->fh);
if (!ferror(this->fh))
return (int)count;
}
retur... | cabx_read | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
int cabx_seek(mspack_file *file, off_t offset, int mode) {
int modea;
if (!file || !LOBYTE(file[4].dummy))
return -1;
if (mode == 2) {
modea = 2;
} else {
if (mode > 2)
return -1;
if (mode) {
if (mode != 1)
return -1;
modea = 1;
} else {
modea = 0;
}
}
... | static int cabx_seek(struct mspack_file *file, off_t offset, int mode) {
struct mspack_file_p *this = (struct mspack_file_p *)file;
if (this && this->regular_file) {
switch (mode) {
case MSPACK_SYS_SEEK_START:
mode = SEEK_SET;
break;
case MSPACK_SYS_SEEK_CUR:
mode = SEEK_CUR;
bre... | cabx_seek | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
off_t cabx_tell(mspack_file *file) {
if (file && LOBYTE(file[4].dummy))
return ftello(*(FILE **)&file->dummy);
else
return 0;
} | static off_t cabx_tell(struct mspack_file *file) {
struct mspack_file_p *this = (struct mspack_file_p *)file;
#if HAVE_FSEEKO
return (this && this->regular_file) ? (off_t)ftello(this->fh) : 0;
#else
return (this && this->regular_file) ? (off_t)ftell(this->fh) : 0;
#endif
} | cabx_tell | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
int cabx_write(mspack_file *file, void *buffer, int bytes) {
int count;
if (!file || !buffer || bytes < 0)
return -1;
if (*(const char **)&file[2].dummy == TEST_FNAME) {
md5_process_bytes(buffer, bytes, &md5_context);
return bytes;
}
count = fwrite(buffer, 1u, bytes, *(FILE **)&file->dummy);
if... | static int cabx_write(struct mspack_file *file, void *buffer, int bytes) {
struct mspack_file_p *this = (struct mspack_file_p *)file;
if (this && buffer && bytes >= 0) {
if (this->name == TEST_FNAME) {
md5_process_bytes(buffer, (size_t)bytes, &md5_context);
return bytes;
} else {
size_t c... | cabx_write | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
char *convert_filename(char *name) {
char *v2;
char *v3;
char *v4;
int *v5;
char *v6;
size_t ilen;
size_t olen;
char *i;
char *o;
char *newname;
unsigned long v12;
v12 = __readfsqword(0x28u);
ilen = strlen(name) + 1;
olen = 4 * ilen;
i = name;
newname = (char *)malloc(4 * ilen);
o = n... | static char *convert_filename(char *name) {
size_t ilen = strlen(name) + 1, olen = ilen * 4;
ICONV_CONST char *i = name;
char *newname = malloc(olen), *o = newname;
if (!newname) {
fprintf(stderr, "WARNING: out of memory converting filename\n");
return NULL;
}
iconv(converter, NULL, NULL, NULL, N... | convert_filename | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void convert_filenames(mscabd_file *files) {
int attribs;
char *newname;
while (files) {
if ((files->attribs & 0x80) == 0) {
newname = convert_filename(files->filename);
if (newname) {
free(files->filename);
files->filename = newname;
attribs = files->attribs;
LOBY... | static void convert_filenames(struct mscabd_file *files) {
struct mscabd_file *fi;
for (fi = files; fi; fi = fi->next) {
if (!(fi->attribs & MSCAB_ATTRIB_UTF_NAME)) {
char *newname = convert_filename(fi->filename);
if (newname) {
free(fi->filename);
fi->filename = newname;
f... | convert_filenames | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
char *create_output_name(const char *fname, const char *dir, int lower,
int isunix, int utf8) {
char v5;
char v6;
size_t v7;
unsigned char *v9;
unsigned char *v10;
_BYTE *v11;
_BYTE *v12;
unsigned char *v13;
_BYTE *v14;
_BYTE *v15;
_BYTE *v16;
_BYTE *v17;
unsigned char... | static char *create_output_name(const char *fname, const char *dir, int lower,
int isunix, int utf8) {
char sep = (isunix) ? '/' : '\\';
char slash = (isunix) ? '\\' : '/';
size_t dirlen = dir ? strlen(dir) + 1 : 0;
size_t filelen = strlen(fname);
char *name = malloc(dirlen +... | create_output_name | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
int ensure_filepath(char *path) {
_BOOL4 v1;
_BOOL4 ok;
char *p;
stat st_buf;
unsigned long v6;
v6 = __readfsqword(0x28u);
for (p = path + 1; *p; ++p) {
if (*p == 47) {
*p = 0;
v1 = !stat(path, &st_buf) && (st_buf.st_mode & 0xF000) == 0x4000;
ok = v1;
if (!v1)
ok = mkd... | static int ensure_filepath(char *path) {
struct stat st_buf;
char *p;
int ok;
for (p = &path[1]; *p; p++) {
if (*p != '/')
continue;
*p = '\0';
ok = (stat(path, &st_buf) == 0) && S_ISDIR(st_buf.st_mode);
if (!ok)
ok = (mkdir(path, 0777 & ~user_umask) == 0);
*p = '/';
if (!ok... | ensure_filepath | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
char *find_cabinet_file(char *origcab, char *cabname) {
char *v3;
long v4;
size_t v5;
_BOOL4 found;
int len;
char *cab;
char *tail;
DIR *dir;
struct dirent *entry;
stat st_buf;
unsigned long v13;
v13 = __readfsqword(0x28u);
found = 0;
if (!cabname || !*cabname)
return 0;
if (origcab)
... | static char *find_cabinet_file(char *origcab, char *cabname) {
struct dirent *entry;
struct stat st_buf;
int found = 0, len;
char *tail, *cab;
DIR *dir;
if (!cabname || !cabname[0])
return NULL;
tail = origcab ? strrchr(origcab, '/') : NULL;
len = (tail - origcab) + 1;
if (!(cab = malloc((tail ... | find_cabinet_file | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void forget_files(file_mem **fml) {
file_mem *fm;
file_mem *next;
for (fm = *fml; fm; fm = next) {
next = fm->next;
free(fm->from);
free(fm);
}
*fml = 0;
} | static void forget_files(struct file_mem **fml) {
struct file_mem *fm, *next;
for (fm = *fml; fm; fm = next) {
next = fm->next;
free(fm->from);
free(fm);
}
*fml = NULL;
} | forget_files | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void load_spanning_cabinets(mscabd_cabinet *basecab, char *basename) {
char *v2;
char *v3;
mscabd_cabinet *cab;
mscabd_cabinet *caba;
char *name;
char *namea;
mscabd_cabinet *cab2;
mscabd_cabinet *cab2a;
for (cab = basecab; (cab->flags & 1) != 0; cab = cab->prevcab) {
name = find_cabinet_file(bas... | static void load_spanning_cabinets(struct mscabd_cabinet *basecab,
char *basename) {
struct mscabd_cabinet *cab, *cab2;
char *name;
for (cab = basecab; cab->flags & MSCAB_HDR_PREVCAB; cab = cab->prevcab) {
if (!(name = find_cabinet_file(basename, cab->prevname))) {
fp... | load_spanning_cabinets | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
unsigned int i;
int ia;
int ib;
unsigned int ic;
int id;
int err;
int erra;
char *utf8_names[3];
char *locales[6];
unsigned long v13;
v13 = __readfsqword(0x28u);
utf8_names[0] = "UTF-8";
utf8_names[1] = "UTF8";
utf8_names[2] = "UTF_... | int main(int argc, char *argv[]) {
int i, err;
char *utf8_names[] = {
"UTF-8",
"UTF8",
"UTF_8",
};
char *locales[] = {"C.UTF-8", "en_US.UTF-8", "en_GB.UTF8",
"de_DE.UTF-8", "UTF-8", "UTF8"};
for (i = 0; i < (sizeof(locales) / sizeof(*locales)); i++) {
if ... | main | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void *md5_buffer(const char *buffer, size_t len, void *resblock) {
md5_ctx ctx;
unsigned long v6;
v6 = __readfsqword(0x28u);
md5_init_ctx(&ctx);
md5_process_bytes(buffer, len, &ctx);
return md5_finish_ctx(&ctx, resblock);
} | void *md5_buffer(const char *buffer, size_t len, void *resblock) {
struct md5_ctx ctx;
md5_init_ctx(&ctx);
md5_process_bytes(buffer, len, &ctx);
return md5_finish_ctx(&ctx, resblock);
} | md5_buffer | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void *md5_finish_ctx(md5_ctx *ctx, void *resbuf) {
size_t v2;
md5_uint32 bytes;
size_t pad;
bytes = ctx->buflen;
ctx->total[0] += bytes;
if (bytes > ctx->total[0])
++ctx->total[1];
if (bytes <= 0x37)
v2 = 56 - bytes;
else
v2 = 120 - bytes;
pad = v2;
memcpy(&ctx->buffer[bytes], fillbuf, ... | void *md5_finish_ctx(struct md5_ctx *ctx, void *resbuf) {
md5_uint32 bytes = ctx->buflen;
size_t pad;
ctx->total[0] += bytes;
if (ctx->total[0] < bytes)
++ctx->total[1];
pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes;
memcpy(&ctx->buffer[bytes], fillbuf, pad);
*(md5_uint32 *)&ctx->buffer[bytes +... | md5_finish_ctx | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void md5_init_ctx(md5_ctx *ctx) {
ctx->A = 1732584193;
ctx->B = -271733879;
ctx->C = -1732584194;
ctx->D = 271733878;
ctx->total[1] = 0;
ctx->total[0] = ctx->total[1];
ctx->buflen = 0;
} | void md5_init_ctx(struct md5_ctx *ctx) {
ctx->A = 0x67452301;
ctx->B = 0xefcdab89;
ctx->C = 0x98badcfe;
ctx->D = 0x10325476;
ctx->total[0] = ctx->total[1] = 0;
ctx->buflen = 0;
} | md5_init_ctx | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void md5_process_block(const void *buffer, size_t len, md5_ctx *ctx) {
int v3;
int v4;
int v5;
int v6;
int v7;
int v8;
int v9;
int v10;
int v11;
int v12;
int v13;
int v14;
int v15;
int v16;
int v17;
int v18;
int v19;
int v20;
int v21;
int v22;
int v23;
int v24;
int v25;
i... | void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ctx) {
md5_uint32 correct_words[16];
const md5_uint32 *words = (const md5_uint32 *)buffer;
size_t nwords = len / sizeof(md5_uint32);
const md5_uint32 *endp = words + nwords;
md5_uint32 A = ctx->A;
md5_uint32 B = ctx->B;
md5_uint32 C = ... | md5_process_block | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void md5_process_bytes(const void *buffer, size_t len, md5_ctx *ctx) {
size_t v3;
size_t lena;
char *buffera;
size_t left_over_0a;
size_t left_over_0;
size_t left_over;
size_t add;
buffera = (char *)buffer;
lena = len;
if (ctx->buflen) {
left_over = ctx->buflen;
v3 = 128 - left_over;
if... | void md5_process_bytes(const void *buffer, size_t len, struct md5_ctx *ctx) {
if (ctx->buflen != 0) {
size_t left_over = ctx->buflen;
size_t add = 128 - left_over > len ? len : 128 - left_over;
memcpy(&ctx->buffer[left_over], buffer, add);
ctx->buflen += add;
if (ctx->buflen > 64) {
md5_p... | md5_process_bytes | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void *md5_read_ctx(const md5_ctx *ctx, void *resbuf) {
*(_DWORD *)resbuf = ctx->A;
*((_DWORD *)resbuf + 1) = ctx->B;
*((_DWORD *)resbuf + 2) = ctx->C;
*((_DWORD *)resbuf + 3) = ctx->D;
return resbuf;
} | void *md5_read_ctx(const struct md5_ctx *ctx, void *resbuf) {
((md5_uint32 *)resbuf)[0] = SWAP(ctx->A);
((md5_uint32 *)resbuf)[1] = SWAP(ctx->B);
((md5_uint32 *)resbuf)[2] = SWAP(ctx->C);
((md5_uint32 *)resbuf)[3] = SWAP(ctx->D);
return resbuf;
} | md5_read_ctx | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
int md5_stream(FILE *stream, void *resblock) {
size_t sum;
size_t n;
md5_ctx ctx;
char buffer[4168];
unsigned long v7;
v7 = __readfsqword(0x28u);
md5_init_ctx(&ctx);
LABEL_2:
sum = 0;
while (1) {
n = fread(&buffer[sum], 1u, 4096 - sum, stream);
sum += n;
if (sum == 4096) {
md5_proce... | int md5_stream(FILE *stream, void *resblock) {
struct md5_ctx ctx;
char buffer[BLOCKSIZE + 72];
size_t sum;
md5_init_ctx(&ctx);
while (1) {
size_t n;
sum = 0;
while (1) {
n = fread(buffer + sum, 1, BLOCKSIZE - sum, stream);
sum += n;
if (sum == BLOCKSIZE)
break;
... | md5_stream | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void memorise_file(file_mem **fml, char *name, char *from) {
size_t v3;
char *v4;
file_mem *fm;
stat st_buf;
unsigned long v8;
v8 = __readfsqword(0x28u);
if (!stat(name, &st_buf)) {
fm = (file_mem *)malloc(0x20u);
if (fm) {
fm->st_dev = st_buf.st_dev;
fm->st_ino = st_buf.st_ino;
... | static void memorise_file(struct file_mem **fml, char *name, char *from) {
struct file_mem *fm;
struct stat st_buf;
if (stat(name, &st_buf) != 0)
return;
if (!(fm = malloc(sizeof(struct file_mem))))
return;
fm->st_dev = st_buf.st_dev;
fm->st_ino = st_buf.st_ino;
fm->from = (from) ? malloc(strlen(f... | memorise_file | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
int process_cabinet(char *basename) {
char *v2;
const char *v3;
int v4;
char *v5;
int v6;
char *v7;
char *v8;
int viewhdr;
int errors;
int spaces;
int isunix;
int fname_offset;
char *from;
mscabd_cabinet *cab;
mscabd_cabinet *cab2;
mscabd_file *file;
mscabd_cabinet *basecab;
char *na... | static int process_cabinet(char *basename) {
struct mscabd_cabinet *basecab, *cab, *cab2;
struct mscabd_file *file;
int isunix, fname_offset, viewhdr = 0;
char *from, *name;
int errors = 0;
if (recall_file(cab_seen, basename, &from) ||
recall_file(cab_exts, basename, &from)) {
if (!args.quiet) {
... | process_cabinet | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
int recall_file(file_mem *fml, char *name, char **from) {
stat st_buf;
unsigned long v7;
v7 = __readfsqword(0x28u);
if (stat(name, &st_buf))
return 0;
while (1) {
if (!fml)
return 0;
if (st_buf.st_ino == fml->st_ino && st_buf.st_dev == fml->st_dev)
break;
fml = fml->next;
}
if... | static int recall_file(struct file_mem *fml, char *name, char **from) {
struct file_mem *fm;
struct stat st_buf;
if (stat(name, &st_buf) != 0)
return 0;
for (fm = fml; fm; fm = fm->next) {
if ((st_buf.st_ino == fm->st_ino) && (st_buf.st_dev == fm->st_dev)) {
if (from)
*from = fm->from;
... | recall_file | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
void set_date_and_perm(mscabd_file *file, char *filename) {
mode_t mode;
utimbuf utb;
tm tm;
unsigned long v5;
v5 = __readfsqword(0x28u);
tm.tm_sec = file->time_s;
tm.tm_min = file->time_m;
tm.tm_hour = file->time_h;
tm.tm_mday = file->date_d;
tm.tm_mon = file->date_m - 1;
tm.tm_year = file->date... | static void set_date_and_perm(struct mscabd_file *file, char *filename) {
mode_t mode;
struct tm tm;
#if HAVE_UTIME
struct utimbuf utb;
#elif HAVE_UTIMES
struct timeval tv[2];
#endif
tm.tm_sec = file->time_s;
tm.tm_min = file->time_m;
tm.tm_hour = file->time_h;
tm.tm_mday = file->date_d;
tm.tm_mon = ... | set_date_and_perm | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
int unix_path_seperators(mscabd_file *files) {
char *v2;
char slash;
char backslash;
char c;
int oldlen;
int len;
int lena;
mscabd_file *fi;
mscabd_file *fia;
char *oldname;
char *p;
char *p_0;
char *name;
slash = 0;
backslash = 0;
for (fi = files; fi; fi = fi->next) {
for (p = fi->... | static int unix_path_seperators(struct mscabd_file *files) {
struct mscabd_file *fi;
char slash = 0, backslash = 0, *oldname;
int oldlen;
for (fi = files; fi; fi = fi->next) {
char *p;
for (p = fi->filename; *p; p++) {
if (*p == '/')
slash = 1;
if (*p == '\\')
backslash = 1;... | unix_path_seperators | cabextract-1.9.1 | app-arch | O0/app-arch/cabextract-1.9.1/cabextract | ida | O0 |
int add_package(cr_Package *pkg, gchar *repopath, GHashTable *merged,
GSList *arch_list, MergeMethod merge_method,
KojiMergedReposStuff *koji_stuff, gboolean omit_baseurl,
int repoid) {
long v9;
char *release;
char *version;
char *epoch;
char *v13;
char *v14;
... | static int add_package(cr_Package *pkg, gchar *repopath, GHashTable *merged,
GSList *arch_list, MergeMethod merge_method,
struct KojiMergedReposStuff *koji_stuff,
gboolean omit_baseurl, int repoid) {
GSList *list, *element;
int ret = 1;
if (omi... | add_package | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/mergerepo_c | ida | O0 |
GSList *append_arch(GSList *list, gchar *arch, gboolean expand) {
long v4;
GSList *v5;
GSList *v6;
GSList *v7;
GSList *v8;
GSList *v9;
GSList *v10;
GSList *v11;
GSList *v12;
GSList *v13;
GSList *v14;
GSList *v15;
GSList *v16;
GSList *v17;
GSList *v18;
GSList *v19;
GSList *v20;
GSList... | GSList *append_arch(GSList *list, gchar *arch, gboolean expand) {
for (GSList *elem = list; elem; elem = g_slist_next(elem)) {
if (!g_strcmp0(elem->data, arch))
return list;
}
list = g_slist_prepend(list, g_strdup(arch));
if (expand) {
if (!g_strcmp0(arch, "i386")) {
list = append_arch(l... | append_arch | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/mergerepo_c | ida | O0 |
GSList *append_multilib_arch(GSList *list, gchar *arch) {
GSList *lista;
lista = list;
if (!(unsigned int)g_strcmp0(arch, "x86_64"))
return append_arch(list, (gchar *)"i386", 1);
if (!(unsigned int)g_strcmp0(arch, "ppc64"))
return append_arch(list, (gchar *)"ppc", 1);
if (!(unsigned int)g_strcmp0(arc... | GSList *append_multilib_arch(GSList *list, gchar *arch) {
if (!g_strcmp0(arch, "x86_64"))
list = append_arch(list, "i386", TRUE);
else if (!g_strcmp0(arch, "ppc64"))
list = append_arch(list, "ppc", TRUE);
else if (!g_strcmp0(arch, "s390x"))
list = append_arch(list, "s390", TRUE);
return list;
} | append_multilib_arch | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/mergerepo_c | ida | O0 |
gboolean check_arguments(CmdOptions *options) {
gboolean v1;
int x;
int xa;
gboolean ret;
cr_CompressionType type;
char *normalized;
gchar **arch_set;
gchar *arch;
ret = 1;
if (options->outputdir)
options->out_dir = (char *)cr_normalize_dir_path(options->outputdir);
else
options->out_dir ... | gboolean check_arguments(struct CmdOptions *options) {
int x;
gboolean ret = TRUE;
if (options->outputdir) {
options->out_dir = cr_normalize_dir_path(options->outputdir);
} else {
options->out_dir = g_strdup(DEFAULT_OUTPUTDIR);
}
options->out_repo = g_strconcat(options->out_dir, "repodata/", NULL)... | check_arguments | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/mergerepo_c | ida | O0 |
void destroy_merged_metadata_hashtable(GHashTable *hashtable) {
if (hashtable)
g_hash_table_destroy(hashtable);
} | void destroy_merged_metadata_hashtable(GHashTable *hashtable) {
if (hashtable) {
g_hash_table_destroy(hashtable);
}
} | destroy_merged_metadata_hashtable | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/mergerepo_c | ida | O0 |
int dump_merged_metadata(GHashTable *merged_hashtable, long packages,
gchar *groupfile, CmdOptions *cmd_options) {
size_t v5;
size_t v6;
GSList *next;
GList *v8;
GError *tmp_err;
gchar *pri_dict;
gchar *fil_dict;
gchar *oth_dict;
size_t pri_dict_size;
size_t fil_dict_size;
... | int dump_merged_metadata(GHashTable *merged_hashtable, long packages,
gchar *groupfile,
#ifdef WITH_LIBMODULEMD
ModulemdModuleIndex *module_index,
#endif
struct CmdOptions *cmd_options) {
GError *tmp_err = NULL;
cr_ContentStat *pri_stat = c... | dump_merged_metadata | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/mergerepo_c | ida | O0 |
void free_merged_values(gpointer data) {
GSList *element;
for (element = (GSList *)data; element; element = element->next)
cr_package_free(element->data);
g_slist_free(data);
} | void free_merged_values(gpointer data) {
GSList *element = (GSList *)data;
for (; element; element = g_slist_next(element)) {
cr_Package *pkg = (cr_Package *)element->data;
cr_package_free(pkg);
}
g_slist_free((GSList *)data);
} | free_merged_values | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/mergerepo_c | ida | O0 |
void free_options(CmdOptions *options) {
GSList *element;
GSList *elementa;
g_free(options->outputdir);
g_free(options->archlist);
g_free(options->compress_type);
g_free(options->merge_method_str);
g_free(options->noarch_repo_url);
g_free(options->groupfile);
g_free(options->blocked);
g_strfreev(op... | void free_options(struct CmdOptions *options) {
g_free(options->outputdir);
g_free(options->archlist);
g_free(options->compress_type);
g_free(options->merge_method_str);
g_free(options->noarch_repo_url);
g_free(options->groupfile);
g_free(options->blocked);
g_strfreev(options->repos);
g_free(options... | free_options | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/mergerepo_c | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
int v3;
const char *v4;
const char *v5;
const char *v6;
const char *v7;
int *v8;
const char *v9;
GSList *next;
GSList *v11;
long v12;
GSList *v13;
long filename;
size_t v15;
long v16;
char *v17;
char *repo_prefix_replace;
char ... | int main(int argc, char **argv) {
_cleanup_error_free_ GError *tmp_err = NULL;
struct CmdOptions *cmd_options;
cmd_options = parse_arguments(&argc, &argv);
if (!cmd_options) {
return 1;
}
cr_setup_logging(FALSE, cmd_options->verbose);
if (!check_arguments(cmd_options)) {
free_options(cmd_option... | main | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/mergerepo_c | ida | O0 |
long merge_repos(GHashTable *merged, GSList *repo_list, GSList *arch_list,
MergeMethod merge_method, GHashTable *noarch_hashtable,
KojiMergedReposStuff *koji_stuff, gboolean omit_baseurl,
gchar *repo_prefix_search, gchar *repo_prefix_replace) {
size_t v9;
size_t v1... | long merge_repos(GHashTable *merged,
#ifdef WITH_LIBMODULEMD
ModulemdModuleIndex **module_index,
#endif
GSList *repo_list, GSList *arch_list, MergeMethod merge_method,
GHashTable *noarch_hashtable,
struct KojiMergedReposStuff *koji_stuff, gboolean omit... | merge_repos | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/mergerepo_c | ida | O0 |
GHashTable *new_merged_metadata_hashtable() {
return (GHashTable *)g_hash_table_new_full(&g_str_hash, &g_str_equal, &g_free,
free_merged_values);
} | GHashTable *new_merged_metadata_hashtable() {
GHashTable *hashtable = g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
free_merged_values);
return hashtable;
} | new_merged_metadata_hashtable | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/mergerepo_c | ida | O0 |
int package_cmp(gconstpointer a_p, gconstpointer b_p) {
int ret;
ret = g_strcmp0(*((_QWORD *)a_p + 23), *((_QWORD *)b_p + 23));
if (ret)
return ret;
else
return g_strcmp0(*((_QWORD *)a_p + 24), *((_QWORD *)b_p + 24));
} | int package_cmp(gconstpointer a_p, gconstpointer b_p) {
int ret;
const cr_Package *pkg_a = a_p;
const cr_Package *pkg_b = b_p;
ret = g_strcmp0(pkg_a->location_href, pkg_b->location_href);
if (ret)
return ret;
return g_strcmp0(pkg_a->location_base, pkg_b->location_base);
} | package_cmp | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/mergerepo_c | ida | O0 |
CmdOptions *parse_arguments(int *argc, char ***argv) {
const char *help;
GError *error;
GOptionContext *context;
unsigned long v6;
v6 = __readfsqword(0x28u);
error = 0;
context = (GOptionContext *)g_option_context_new("--repo=url --repo=url");
g_option_context_set_summary(
context,
"Take on... | struct CmdOptions *parse_arguments(int *argc, char ***argv) {
GError *error = NULL;
GOptionContext *context;
context = g_option_context_new("--repo=url --repo=url");
g_option_context_set_summary(context, "Take one or more repositories and "
"merge their metadata into a n... | parse_arguments | createrepo_c-0.16.2 | app-arch | O0/app-arch/createrepo_c-0.16.2/mergerepo_c | ida | O0 |
void add_to_hash(netconn_t *c, int inode) {
int v2;
v2 = hash(inode);
list_add_2(&c->n_hash, &tcp_hashtable[v2]);
} | static inline void add_to_hash(struct netconn_t *c, int inode) {
list_add(&c->n_hash, tcp_hashtable + hash(inode));
} | add_to_hash | whowatch-1.8.6 | app-admin | O0/app-admin/whowatch-1.8.6/whowatch | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.