mirror of
https://github.com/ksherlock/profuse.git
synced 2024-06-11 23:29:31 +00:00
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@145 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
parent
0c14721b0d
commit
8d93501d0d
|
@ -10,6 +10,8 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "File.h"
|
#include "File.h"
|
||||||
#include "DateRec.h"
|
#include "DateRec.h"
|
||||||
#include "../BlockDevice.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)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
std::auto_ptr<Pascal::VolumeEntry> volume;
|
std::auto_ptr<Pascal::VolumeEntry> volume;
|
||||||
std::auto_ptr<ProFUSE::BlockDevice> device;
|
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];
|
const char *file = argv[1];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user