summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2019-08-19 17:58:35 +0100
committerFreeArtMan <dos21h@gmail.com>2019-08-19 17:58:35 +0100
commit363170c432f3c3e34da46abd51ee9bc221806f6f (patch)
tree75ea16a18642172c539e1c2bac62df8a094e73d6
parente7050e232d8e1350620e368b9d01f14a1a82a89b (diff)
downloadihe-363170c432f3c3e34da46abd51ee9bc221806f6f.tar.gz
ihe-363170c432f3c3e34da46abd51ee9bc221806f6f.zip
Added help info
-rw-r--r--cmd/cmd_blk.c6
-rw-r--r--cmd/cmd_cd.c6
-rw-r--r--cmd/cmd_close.c6
-rw-r--r--cmd/cmd_dump.c6
-rw-r--r--cmd/cmd_dumps.c6
-rw-r--r--cmd/cmd_dumpx.c5
-rw-r--r--cmd/cmd_flags.c6
-rw-r--r--cmd/cmd_info.c6
-rw-r--r--cmd/cmd_ls.c6
-rw-r--r--cmd/cmd_open.c4
-rw-r--r--cmd/cmd_pos.c6
-rw-r--r--cmd/cmd_pwd.c6
-rw-r--r--cmd/cmd_read.c8
-rw-r--r--cmd/cmd_resize.c6
-rw-r--r--cmd/cmd_seek.c6
-rw-r--r--cmd/cmd_size.c6
-rw-r--r--cmd/cmd_write.c6
-rw-r--r--cmd/cmd_writes.c6
-rw-r--r--ihe.c34
-rw-r--r--ihe.h17
20 files changed, 140 insertions, 18 deletions
diff --git a/cmd/cmd_blk.c b/cmd/cmd_blk.c
index e497780..07f27f8 100644
--- a/cmd/cmd_blk.c
+++ b/cmd/cmd_blk.c
@@ -30,4 +30,10 @@ int c_blk( cmd_arg_t *arg )
return -1;
}
return 0;
+}
+
+int h_blk( cmd_arg_t *arg )
+{
+ printf("[SIZE] - set block size");
+ return 0;
} \ No newline at end of file
diff --git a/cmd/cmd_cd.c b/cmd/cmd_cd.c
index 652217c..92c22b2 100644
--- a/cmd/cmd_cd.c
+++ b/cmd/cmd_cd.c
@@ -29,4 +29,10 @@ int c_cd( cmd_arg_t *arg )
}
return 0;
+}
+
+int h_cd( cmd_arg_t *arg )
+{
+ printf("[DIR] - change shell directory");
+ return 0;
} \ No newline at end of file
diff --git a/cmd/cmd_close.c b/cmd/cmd_close.c
index a789cd0..d5a03b3 100644
--- a/cmd/cmd_close.c
+++ b/cmd/cmd_close.c
@@ -30,4 +30,10 @@ int c_close( cmd_arg_t *arg )
}
return 0;
+}
+
+int h_close( cmd_arg_t *arg )
+{
+ printf(" - close current file");
+ return 0;
} \ No newline at end of file
diff --git a/cmd/cmd_dump.c b/cmd/cmd_dump.c
index a11a2d0..bf2e5d1 100644
--- a/cmd/cmd_dump.c
+++ b/cmd/cmd_dump.c
@@ -25,4 +25,10 @@ int c_dump( cmd_arg_t *arg )
printf("\n");
return 0;
+}
+
+int h_dump( cmd_arg_t *arg )
+{
+ printf(" - dump data as hex string");
+ return 0;
} \ No newline at end of file
diff --git a/cmd/cmd_dumps.c b/cmd/cmd_dumps.c
index 4f3461c..ecc5143 100644
--- a/cmd/cmd_dumps.c
+++ b/cmd/cmd_dumps.c
@@ -33,4 +33,10 @@ int c_dumps( cmd_arg_t *arg )
printf("\n");
return 0;
+}
+
+int h_dumps( cmd_arg_t *arg )
+{
+ printf(" - dump data as printable string");
+ return 0;
} \ No newline at end of file
diff --git a/cmd/cmd_dumpx.c b/cmd/cmd_dumpx.c
index d6228fd..3e6cdf1 100644
--- a/cmd/cmd_dumpx.c
+++ b/cmd/cmd_dumpx.c
@@ -52,4 +52,9 @@ int c_dumpx( cmd_arg_t *arg )
printf("\n");
return 0;
+}
+int h_dumpx( cmd_arg_t *arg )
+{
+ printf(" - dump as formated hex dump");
+ return 0;
} \ No newline at end of file
diff --git a/cmd/cmd_flags.c b/cmd/cmd_flags.c
index 0c4a8bd..03f6b81 100644
--- a/cmd/cmd_flags.c
+++ b/cmd/cmd_flags.c
@@ -41,4 +41,10 @@ int c_flags( cmd_arg_t *arg )
}
return 0;
+}
+
+int h_flags( cmd_arg_t *arg )
+{
+ printf(" - show current file flags");
+ return 0;
} \ No newline at end of file
diff --git a/cmd/cmd_info.c b/cmd/cmd_info.c
index 8744efe..74324f6 100644
--- a/cmd/cmd_info.c
+++ b/cmd/cmd_info.c
@@ -31,4 +31,10 @@ int c_info( cmd_arg_t *arg )
}
return 0;
+}
+
+int h_info( cmd_arg_t *arg )
+{
+ printf(" - show running file info");
+ return 0;
} \ No newline at end of file
diff --git a/cmd/cmd_ls.c b/cmd/cmd_ls.c
index a3c642e..7e92db6 100644
--- a/cmd/cmd_ls.c
+++ b/cmd/cmd_ls.c
@@ -38,4 +38,10 @@ int c_ls( cmd_arg_t *arg )
free( f_ls );
return 0;
+}
+
+int h_ls( cmd_arg_t *arg )
+{
+ printf(" - list files in current directory");
+ return 0;
} \ No newline at end of file
diff --git a/cmd/cmd_open.c b/cmd/cmd_open.c
index 6ecfa8e..a4740c6 100644
--- a/cmd/cmd_open.c
+++ b/cmd/cmd_open.c
@@ -19,6 +19,8 @@ int c_open( cmd_arg_t *arg )
char *fname = NULL;
int fret = 0;
+ printf("%s\n",argv[0]);
+
if ( argc != 1 )
{
printf("Neeed one argument %d\n",argc);
@@ -27,6 +29,8 @@ int c_open( cmd_arg_t *arg )
fname = argv[0];
+ printf("%s\n",fname);
+
fret = file_open_fn( g_file, fname, g_flags ); //!if failure fields could be non empty inside struct
if ( fret < 0 )
{
diff --git a/cmd/cmd_pos.c b/cmd/cmd_pos.c
index 272ba3f..05264d4 100644
--- a/cmd/cmd_pos.c
+++ b/cmd/cmd_pos.c
@@ -22,4 +22,10 @@ int c_pos( cmd_arg_t *arg )
printf("POS %d\n",fret);
return 0;
+}
+
+int h_pos( cmd_arg_t *arg )
+{
+ printf(" - get position in file");
+ return 0;
} \ No newline at end of file
diff --git a/cmd/cmd_pwd.c b/cmd/cmd_pwd.c
index f14ece7..4e21721 100644
--- a/cmd/cmd_pwd.c
+++ b/cmd/cmd_pwd.c
@@ -33,4 +33,10 @@ int c_pwd( cmd_arg_t *arg )
cur_dir = NULL;
return 0;
+}
+
+int h_pwd( cmd_arg_t *arg )
+{
+ printf(" - path of current shell running instance");
+ return 0;
} \ No newline at end of file
diff --git a/cmd/cmd_read.c b/cmd/cmd_read.c
index 1a4aa89..68dab14 100644
--- a/cmd/cmd_read.c
+++ b/cmd/cmd_read.c
@@ -25,4 +25,10 @@ int c_read( cmd_arg_t *arg )
}
return 0;
-} \ No newline at end of file
+}
+
+int h_read( cmd_arg_t *arg )
+{
+ printf(" - read data from file");
+ return 0;
+}
diff --git a/cmd/cmd_resize.c b/cmd/cmd_resize.c
index 532c43c..1e723cf 100644
--- a/cmd/cmd_resize.c
+++ b/cmd/cmd_resize.c
@@ -37,4 +37,10 @@ int c_resize( cmd_arg_t *arg )
file_resize( g_file, resize );
return 0;
+}
+
+int h_resize( cmd_arg_t *arg )
+{
+ printf("[FILESIZE] - resize current file");
+ return 0;
} \ No newline at end of file
diff --git a/cmd/cmd_seek.c b/cmd/cmd_seek.c
index fd3dcf5..7516811 100644
--- a/cmd/cmd_seek.c
+++ b/cmd/cmd_seek.c
@@ -58,4 +58,10 @@ int c_seek( cmd_arg_t *arg )
}
return 0;
+}
+
+int h_seek( cmd_arg_t *arg )
+{
+ printf("[POS] - move to differnt file offset");
+ return 0;
} \ No newline at end of file
diff --git a/cmd/cmd_size.c b/cmd/cmd_size.c
index 5f27ee1..12723ef 100644
--- a/cmd/cmd_size.c
+++ b/cmd/cmd_size.c
@@ -22,4 +22,10 @@ int c_size( cmd_arg_t *arg )
printf("File size %zu\n", size);
return 0;
+}
+
+int h_size( cmd_arg_t *arg )
+{
+ printf(" - size of current file");
+ return 0;
} \ No newline at end of file
diff --git a/cmd/cmd_write.c b/cmd/cmd_write.c
index 1d4c1e9..d54c0b5 100644
--- a/cmd/cmd_write.c
+++ b/cmd/cmd_write.c
@@ -87,4 +87,10 @@ int c_write( cmd_arg_t *arg)
}
return 0;
+}
+
+int h_write( cmd_arg_t *arg )
+{
+ printf("[HEXBUF] - hex data writen to buf and back to file");
+ return 0;
} \ No newline at end of file
diff --git a/cmd/cmd_writes.c b/cmd/cmd_writes.c
index 6b0d472..7d7eeed 100644
--- a/cmd/cmd_writes.c
+++ b/cmd/cmd_writes.c
@@ -46,3 +46,9 @@ int c_writes( cmd_arg_t *arg )
return 0;
}
+
+int h_writes( cmd_arg_t *arg )
+{
+ printf("[STRING] - data written to buffer and file as string");
+ return 0;
+}
diff --git a/ihe.c b/ihe.c
index a285b17..641b09b 100644
--- a/ihe.c
+++ b/ihe.c
@@ -415,24 +415,24 @@ cmd_table_t tab[] = {
{"help", c_help, NULL, NULL, NULL},
{"?", c_help, NULL, NULL, NULL},
{"open", c_open, h_open, NULL, NULL},
- {"close", c_close, NULL, NULL, NULL},
- {"info", c_info, NULL, NULL, NULL},
- {"seek", c_seek, NULL, NULL, NULL},
- {"pos", c_pos, NULL, NULL, NULL},
- {"size", c_size, NULL, NULL, NULL},
- {"blk", c_blk, NULL, NULL, NULL},
- {"read", c_read, NULL, NULL, NULL},
- {"dump", c_dump, NULL, NULL, NULL},
- {"dumpx", c_dumpx, NULL, NULL, NULL},
- {"dumps", c_dumps, NULL, NULL, NULL},
- {"write", c_write, NULL, NULL, NULL},
- {"writes", c_writes, NULL, NULL, NULL},
- {"resize", c_resize, NULL, NULL, NULL},
- {"flags", c_flags, NULL, NULL, NULL},
+ {"close", c_close, h_close, NULL, NULL},
+ {"info", c_info, h_info, NULL, NULL},
+ {"seek", c_seek, h_seek, NULL, NULL},
+ {"pos", c_pos, h_pos, NULL, NULL},
+ {"size", c_size, h_size, NULL, NULL},
+ {"blk", c_blk, h_blk, NULL, NULL},
+ {"read", c_read, h_read, NULL, NULL},
+ {"dump", c_dump, h_dump, NULL, NULL},
+ {"dumpx", c_dumpx, h_dumpx, NULL, NULL},
+ {"dumps", c_dumps, h_dumps, NULL, NULL},
+ {"write", c_write, h_write, NULL, NULL},
+ {"writes", c_writes, h_writes, NULL, NULL},
+ {"resize", c_resize, h_resize, NULL, NULL},
+ {"flags", c_flags, h_flags, NULL, NULL},
{"manifesto", c_manifesto, NULL, NULL, NULL},
- {"ls", c_ls, NULL, NULL, NULL},
- {"pwd", c_pwd, NULL, NULL, NULL},
- {"cd", c_cd, NULL, NULL, NULL},
+ {"ls", c_ls, h_ls, NULL, NULL},
+ {"pwd", c_pwd, h_pwd, NULL, NULL},
+ {"cd", c_cd, h_cd, NULL, NULL},
//{"create", c_create},
//{"th", c_th},
//{"tw", c_tw},
diff --git a/ihe.h b/ihe.h
index de2950f..621702f 100644
--- a/ihe.h
+++ b/ihe.h
@@ -18,24 +18,41 @@
#include "h64e/core.h"
int c_blk( cmd_arg_t *arg );
+int h_blk( cmd_arg_t *arg );
int c_cd( cmd_arg_t *arg );
+int h_cd( cmd_arg_t *arg );
int c_close( cmd_arg_t *arg );
+int h_close( cmd_arg_t *arg );
int c_dump( cmd_arg_t *arg );
+int h_dump( cmd_arg_t *arg );
int c_dumps( cmd_arg_t *arg );
+int h_dumps( cmd_arg_t *arg );
int c_dumpx( cmd_arg_t *arg );
+int h_dumpx( cmd_arg_t *arg );
int c_flags( cmd_arg_t *arg );
+int h_flags( cmd_arg_t *arg );
int c_info( cmd_arg_t *arg );
+int h_info( cmd_arg_t *arg );
int c_ls( cmd_arg_t *arg );
+int h_ls( cmd_arg_t *arg );
int c_open( cmd_arg_t *arg );
int h_open( cmd_arg_t *arg );
int c_pos( cmd_arg_t *arg );
+int h_pos( cmd_arg_t *arg );
int c_pwd( cmd_arg_t *arg );
+int h_pwd( cmd_arg_t *arg );
int c_read( cmd_arg_t *arg );
+int h_read( cmd_arg_t *arg );
int c_seek( cmd_arg_t *arg );
+int h_seek( cmd_arg_t *arg );
int c_size( cmd_arg_t *arg );
+int h_size( cmd_arg_t *arg );
int c_write( cmd_arg_t *arg );
+int h_write( cmd_arg_t *arg );
int c_writes( cmd_arg_t *arg );
+int h_writes( cmd_arg_t *arg );
int c_resize( cmd_arg_t *arg );
+int h_resize( cmd_arg_t *arg );
#endif \ No newline at end of file