Define handlers type

svn path=/trunk/; revision=75909
This commit is contained in:
Pierre Schweitzer 2017-09-20 07:50:48 +00:00
parent 0fa3874c25
commit 2bcf27a7d0
5 changed files with 13 additions and 10 deletions

View file

@ -10,8 +10,8 @@
#include <winioctl.h> #include <winioctl.h>
/* Add handlers here for subcommands */ /* Add handlers here for subcommands */
static int QueryMain(int argc, const TCHAR *argv[]); static HandlerProc QueryMain;
static int SetMain(int argc, const TCHAR *argv[]); static HandlerProc SetMain;
static HandlerItem HandlersList[] = static HandlerItem HandlersList[] =
{ {
/* Proc, name, help */ /* Proc, name, help */

View file

@ -9,9 +9,9 @@
#include "fsutil.h" #include "fsutil.h"
/* Add handlers here for subcommands */ /* Add handlers here for subcommands */
static int DrivesMain(int argc, const TCHAR *argv[]); static HandlerProc DrivesMain;
static int DriveTypeMain(int argc, const TCHAR *argv[]); static HandlerProc DriveTypeMain;
static int VolumeInfoMain(int argc, const TCHAR *argv[]); static HandlerProc VolumeInfoMain;
static HandlerItem HandlersList[] = static HandlerItem HandlersList[] =
{ {
/* Proc, name, help */ /* Proc, name, help */

View file

@ -9,9 +9,9 @@
#include "fsutil.h" #include "fsutil.h"
/* Add handlers here for commands */ /* Add handlers here for commands */
int DirtyMain(int argc, const TCHAR *argv[]); HandlerProc DirtyMain;
int FsInfoMain(int argc, const TCHAR *argv[]); HandlerProc FsInfoMain;
int HardLinkMain(int argc, const TCHAR *argv[]); HandlerProc HardLinkMain;
static HandlerItem HandlersList[] = static HandlerItem HandlersList[] =
{ {
/* Proc, name, help */ /* Proc, name, help */

View file

@ -5,9 +5,12 @@
#include <tchar.h> #include <tchar.h>
#include <stdio.h> #include <stdio.h>
typedef int (HandlerProc)(int argc, const TCHAR *argv[]);
typedef HandlerProc * pHandlerProc;
typedef struct typedef struct
{ {
int (*Handler)(int argc, const TCHAR *argv[]); pHandlerProc Handler;
const TCHAR * Command; const TCHAR * Command;
const TCHAR * Desc; const TCHAR * Desc;
} HandlerItem; } HandlerItem;

View file

@ -9,7 +9,7 @@
#include "fsutil.h" #include "fsutil.h"
/* Add handlers here for subcommands */ /* Add handlers here for subcommands */
static int CreateMain(int argc, const TCHAR *argv[]); static HandlerProc CreateMain;
static HandlerItem HandlersList[] = static HandlerItem HandlersList[] =
{ {
/* Proc, name, help */ /* Proc, name, help */