summaryrefslogtreecommitdiff
path: root/H64E-2/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'H64E-2/main.c')
-rw-r--r--H64E-2/main.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/H64E-2/main.c b/H64E-2/main.c
index 818f165..29184b7 100644
--- a/H64E-2/main.c
+++ b/H64E-2/main.c
@@ -140,10 +140,12 @@ void helper( char *progname )
" -o - file offset\n"
" -i - output hex\n"
" -l - length of output\n"
- " -c - column size in byts\n"
+ " -c - column size in bytes\n"
" -g - datatype output: byte,word,dword,qword\n"
- " -e - interp data: u8,i8,u16,i16,u32,i32,u64,i64"
- "\nVersion: 2.0.0 \n"
+ " -e - interp data: u8,i8,u16,i16,u32,i32,u64,i64\n"
+ " -s - disable space between columns\n"
+ " -t - extra output ascii output\n"
+ "Version: 2.0.2 \n"
"\n"
, progname);
}
@@ -194,18 +196,20 @@ int main(int argc, const char * argv[]) {
{
case 'a':
h64e.fmt.group = H64E_G_BYTE;
- h64e.fmt.flag_output = 1;
+ h64e.fmt.flag_output_types = 1;
h64e.fmt.output_type = H64E_O_STRING;
break;
case 'b':
h64e.fmt.flag_offset = 1;
break;
case 'o':
- param_offset = atoi( optarg );
+ //param_offset = atoi( optarg );
+ h64e.fmt.flag_offset = 1;
+ h64e.fmt.offset_addr = atoi(optarg);
break;
case 'i':
h64e.fmt.group = H64E_G_BYTE;
- h64e.fmt.flag_output = 0;
+ h64e.fmt.flag_output_types = 0;
h64e.fmt.flag_offset = 1;
break;
case 'l':
@@ -218,12 +222,15 @@ int main(int argc, const char * argv[]) {
h64e.fmt.group = group_name2int(optarg);
break;
case 'e':
- h64e.fmt.flag_output = 1;
+ h64e.fmt.flag_output_types = 1;
h64e.fmt.output_type = output_name2int(optarg);
break;
case 's':
h64e.fmt.flag_space = 1;
break;
+ case 't':
+ h64e.fmt.flag_ascii = 1;
+ break;
case 'v':
version();
exit(1);
@@ -263,6 +270,8 @@ int main(int argc, const char * argv[]) {
int8_fmt.column_size = h64e.fmt.column_size;
int8_fmt.group_fmt = h64e.fmt.group;
int8_fmt.output_fmt = h64e.fmt.output_type;
+ int8_fmt.f_offset = h64e.fmt.flag_offset;
+ int8_fmt.start_offset = h64e.fmt.offset_addr;
@@ -342,7 +351,8 @@ int main(int argc, const char * argv[]) {
//deinit all structures
h64e_destroy(&h64e);
file_close(fd);
-
- printf("Ending Execution\n");
+
+ printf("\nEnding Execution\n");
+
return 0;
}