summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-12-06 08:56:34 -0500
committermidipix <writeonce@midipix.org>2016-11-10 23:35:31 -0500
commitb5c6e6b6969328711658c248d0725f543573939e (patch)
treeb4ba9239f9bb1a301fe7889a2a4e15e0df85a44b /src
parent85119ef1e354b05d1c8fdc7876bc83c8c1375082 (diff)
downloadperk-b5c6e6b6969328711658c248d0725f543573939e.tar.bz2
perk-b5c6e6b6969328711658c248d0725f543573939e.tar.xz
API redesign 9/10: struct pe_image_summary: elegance.
Diffstat (limited to 'src')
-rw-r--r--src/logic/pe_get_image_meta.c8
-rw-r--r--src/output/pe_output_import_libraries.c4
-rw-r--r--src/perk.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c
index acf377f..78b8b91 100644
--- a/src/logic/pe_get_image_meta.c
+++ b/src/logic/pe_get_image_meta.c
@@ -11,7 +11,7 @@ static int pe_free_image_meta_impl(struct pe_image_meta * meta, int status)
unsigned i;
if (meta) {
- for (i=0; i<meta->summary.num_of_implibs; i++)
+ for (i=0; i<meta->summary.nimplibs; i++)
free(meta->idata[i].items);
free(meta->idata);
@@ -124,13 +124,13 @@ int pe_get_image_meta(const struct pe_raw_image * image, struct pe_image_meta **
if (m->aidata) {
/* num of implibs */
- for (pidata=m->aidata; pidata->name_rva[0]; pidata++,m->summary.num_of_implibs++);
+ for (pidata=m->aidata; pidata->name_rva[0]; pidata++,m->summary.nimplibs++);
/* import headers */
- if (!(m->idata = calloc(m->summary.num_of_implibs,sizeof(*(m->idata)))))
+ if (!(m->idata = calloc(m->summary.nimplibs,sizeof(*(m->idata)))))
return pe_free_image_meta_impl(m,status);
- for (i=0; i<m->summary.num_of_implibs; i++) {
+ for (i=0; i<m->summary.nimplibs; i++) {
pe_read_import_header(&m->aidata[i],&m->idata[i]);
m->idata[i].name = base + m->hidata->ptr_to_raw_data
diff --git a/src/output/pe_output_import_libraries.c b/src/output/pe_output_import_libraries.c
index 9a83780..be46d1f 100644
--- a/src/output/pe_output_import_libraries.c
+++ b/src/output/pe_output_import_libraries.c
@@ -43,7 +43,7 @@ int pe_output_import_libraries(
FILE * ftmp;
int i,j;
- if (!m->summary.num_of_implibs)
+ if (!m->summary.nimplibs)
return 0;
if (!(fout = pe_output_prolog(cctx,fout,&ftmp)))
@@ -52,7 +52,7 @@ int pe_output_import_libraries(
if ((pretty_header(cctx,fout)) < 0)
return pe_output_epilog(-1,ftmp);
- for (i=0; i<m->summary.num_of_implibs; i++) {
+ for (i=0; i<m->summary.nimplibs; i++) {
if ((pretty_implib_header(cctx,m->idata[i].name,fout)) < 0)
return pe_output_epilog(-1,ftmp);
diff --git a/src/perk.c b/src/perk.c
index 993478c..00a44b1 100644
--- a/src/perk.c
+++ b/src/perk.c
@@ -43,14 +43,14 @@ static void perk_perform_unit_actions(struct pe_unit_ctx * uctx)
if (flags & PERK_OUTPUT_EXPORT_SYMS) {
uctx->status = pe_output_export_symbols(uctx->meta,uctx->cctx,0);
uctx->nerrors += !!uctx->status;
- fpara += uctx->meta->summary.num_of_export_syms;
+ fpara += uctx->meta->summary.nexpsyms;
}
if ((flags & PERK_OUTPUT_IMPORT_LIBS) || (flags & PERK_OUTPUT_IMPORT_SYMS)) {
perk_paragraph_break(uctx,&fpara);
uctx->status = pe_output_import_libraries(uctx->meta,uctx->cctx,0);
uctx->nerrors += !!uctx->status;
- fpara += (uctx->meta->summary.num_of_implibs > 0);
+ fpara += (uctx->meta->summary.nimplibs > 0);
}
}