From 2d87ba07f24840f55a50a6cf4525f6f0be41b7dd Mon Sep 17 00:00:00 2001 From: Date: Thu, 12 Apr 2012 15:44:01 +0000 Subject: [PATCH] Add -geos switch to command line and help --- .../webcodepro/applecommander/ui/UiBundle.properties | 2 +- src/com/webcodepro/applecommander/ui/ac.java | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/com/webcodepro/applecommander/ui/UiBundle.properties b/src/com/webcodepro/applecommander/ui/UiBundle.properties index 02e5f8e..e5dc3b4 100644 --- a/src/com/webcodepro/applecommander/ui/UiBundle.properties +++ b/src/com/webcodepro/applecommander/ui/UiBundle.properties @@ -102,7 +102,7 @@ CreateDirectoryMenuItem=Create Directory... CommandLineErrorMessage = Error: {0} CommandLineNoMatchMessage = {0}: No match. CommandLineStatus = {0} format; {1} bytes free; {2} bytes used. -CommandLineHelp = AppleCommander command line options [{0}]:\n-i [] display information about image(s).\n-ls [] list brief directory of image(s).\n-l [] list directory of image(s).\n-ll [] list detailed directory of image(s).\n-e export file from image to stdout.\n-x [] extract all files from image to directory.\n-g get raw file from image to stdout.\n-p [[$|0x]] put stdin\n in filename on image, using file type and address [0x2000].\n-d delete file from image.\n-k lock file on image.\n-u unlock file on image.\n-n change volume name (ProDOS or Pascal).\n-cc65 put stdin with cc65 header\n in filename on image, using file type and address from header.\n-dos140 create a 140K DOS 3.3 image.\n-pro140 create a 140K ProDOS image.\n-pro800 create an 800K ProDOS image.\n-pas140 create a 140K Pascal image.\n-pas800 create an 800K Pascal image. +CommandLineHelp = AppleCommander command line options [{0}]:\n-i [] display information about image(s).\n-ls [] list brief directory of image(s).\n-l [] list directory of image(s).\n-ll [] list detailed directory of image(s).\n-e export file from image to stdout.\n-x [] extract all files from image to directory.\n-g get raw file from image to stdout.\n-p [[$|0x]] put stdin\n in filename on image, using file type and address [0x2000].\n-d delete file from image.\n-k lock file on image.\n-u unlock file on image.\n-n change volume name (ProDOS or Pascal).\n-cc65 put stdin with cc65 header\n in filename on image, using file type and address from header.\n-geos interpret stdin as a GEOS conversion file and\n place it on image (ProDOS only).\n-dos140 create a 140K DOS 3.3 image.\n-pro140 create a 140K ProDOS image.\n-pro800 create an 800K ProDOS image.\n-pas140 create a 140K Pascal image.\n-pas800 create an 800K Pascal image. # UserPreferences UserPreferencesComment = AppleCommander user preferences diff --git a/src/com/webcodepro/applecommander/ui/ac.java b/src/com/webcodepro/applecommander/ui/ac.java index cd8aa3a..01e924b 100644 --- a/src/com/webcodepro/applecommander/ui/ac.java +++ b/src/com/webcodepro/applecommander/ui/ac.java @@ -69,6 +69,7 @@ import com.webcodepro.applecommander.util.TextBundle; * -n <imagename> <volname> change volume name (ProDOS or Pascal). * -cc65 <imagename> <filename> <type> put stdin with cc65 header * in filename on image, using file type and address from header. + * -geos <imagename> interpret stdin as a ProDOS GEOS transfer file and place on image * -dos140 <imagename> create a 140K DOS 3.3 image. * -pro140 <imagename> <volname> create a 140K ProDOS image. * -pro800 <imagename> <volname> create an 800K ProDOS image. @@ -112,6 +113,8 @@ public class ac { setDiskName(args[1], args[2]); } else if ("-cc65".equalsIgnoreCase(args[0])) { //$NON-NLS-1$ putCC65(args[1], new Name(args[2]), args[3]); + } else if ("-geos".equalsIgnoreCase(args[0])) { //$NON-NLS-1$ + putGEOS(args[1]); } else if ("-dos140".equalsIgnoreCase(args[0])) { //$NON-NLS-1$ createDosDisk(args[1], Disk.APPLE_140KB_DISK); } else if ("-pas140".equalsIgnoreCase(args[0])) { //$NON-NLS-1$ @@ -175,6 +178,15 @@ public class ac { } } + /** + * Interpret <stdin> as a GEOS file and place it on the disk named imageName. + * This would only make sense for a ProDOS-formatted disk. + */ + static void putGEOS(String imageName) + throws IOException, DiskFullException { + putFile(imageName, new Name("GEOS-Should Be ProDOS"), "GEO", "0"); //$NON-NLS-2$ $NON-NLS-3$ + } + /** * Delete the file named fileName from the disk named imageName. */