git-svn-id: https://profuse.googlecode.com/svn/branches/v2@145 aa027e90-d47c-11dd-86d7-074df07e0730

This commit is contained in:
ksherlock 2009-12-11 14:47:44 +00:00
parent 0c14721b0d
commit 8d93501d0d
1 changed files with 37 additions and 0 deletions

View File

@ -10,6 +10,8 @@
#include <algorithm>
#include <memory>
#include <unistd.h>
#include "File.h"
#include "DateRec.h"
#include "../BlockDevice.h"
@ -142,11 +144,46 @@ void list(Pascal::VolumeEntry *volume, bool extended)
}
void usage()
{
std::printf(
"Pascal File Manager v 0.0\n\n"
"Usage: fileman [-h] [-f format] action diskimage\n"
"Options:\n"
" -h Show usage information.\n"
" -f format Specify disk format. Valid values are:\n"
" po: ProDOS order disk image\n"
" do: DOS Order disk image\n"
"\n"
"Actions:\n"
" L List files\n"
" E List files (extended)\n"
);
}
int main(int argc, char **argv)
{
std::auto_ptr<Pascal::VolumeEntry> volume;
std::auto_ptr<ProFUSE::BlockDevice> device;
std::string format;
while ((int c = ::getopt(argc, argv, "f:h")) != -1)
{
switch(c)
{
case 'f':
format = optarg;
break;
case 'h':
case '?':
usage();
exit();
}
}
const char *file = argv[1];