#include "buf.h" #include "core.h" #include "libcmd/cmd.h" #include "libcmd/cmd_parse.h" extern file_t *g_file; extern Buf *g_buf; extern int g_flags; int c_resize( cmd_arg_t *arg ) { int argc = arg->argc; char **argv = arg->argv; int *type = arg->type; int resize; if ( argc != 1 ) { printf("Needed one argument\n"); return -1; } printf("%d %s\n",type[0],argv[0]); if ((type[0] != CMDT_INT) && (type[0] != CMDT_HEX) ) { printf("Unknown type of argument\n"); return -1; } resize = atoi( argv[0] ); if (resize < 0) return -1; file_resize( g_file, resize ); return 0; } int h_resize( cmd_arg_t *arg ) { printf("[FILESIZE] - resize current file"); return 0; }