10 #include <exec/types.h>
12 // #include <dos/filehandler.h>
13 // #include <workbench/startup.h>
14 // #include <libraries/gadtools.h>
15 // #include <workbench/icon.h>
16 // #include <devices/trackdisk.h>
17 #include <dos/rdargs.h>
19 // Prototypes for system functions
20 #include <proto/exec.h>
21 #include <proto/dos.h>
30 // Get the command-line arguments given by the user, by using ReadArgs()
31 void parseArgs(char *drive
,char *newName
,BOOL
*ffs
,BOOL
*intl
, BOOL
*icons
, char *TrashName
, BOOL
*quick
, BOOL
*verify
)
36 r
=ReadArgs("DRIVE/K/A,NAME/K/A,FFS/S,INTL=INTERNATIONAL/S,NOICONS/S,QUICK/S,NOVERIFY/S/TRASCHCAN/N",args
, NULL
);
38 // If the user didnt specify a drive name, print an error
41 printError("You need to specify a drive to format",NULL
,NULL
);
47 strcpy(drive
,(char *)args
[0]);
49 // Likewise for a name for the newly formatted volume
52 printError("You need to specify a name for the volume",NULL
,NULL
);
56 strcpy(newName
,(char *)args
[1]);
58 // Get the four togglable settings
64 strcpy(TrashName
, "Trashcan");
66 strcpy(TrashName
,(char *)args
[5]);
71 // Were done, so free the ReadArgs result