From b403b3a4e97987d164195a309aab0fc4aaddf6c3 Mon Sep 17 00:00:00 2001 From: "John B. Matthews" Date: Sun, 18 May 2008 21:03:25 +0000 Subject: [PATCH] Normalize parameter order; accept 0xnnnn for start address. --- .../applecommander/ui/UiBundle.properties | 2 +- src/com/webcodepro/applecommander/ui/ac.java | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/com/webcodepro/applecommander/ui/UiBundle.properties b/src/com/webcodepro/applecommander/ui/UiBundle.properties index 914bd39..5779869 100644 --- a/src/com/webcodepro/applecommander/ui/UiBundle.properties +++ b/src/com/webcodepro/applecommander/ui/UiBundle.properties @@ -100,7 +100,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.\n-ls list brief directory of image.\n-l list directory of image.\n-ll list detailed directory of image.\n-e export file from image to stdout.\n-g get raw file from image to stdout.\n-p put stdin\n in destname on image, using file type and address.\n-d delete file from image.\n-cc65 put stdin with cc65\n header in destname on image, using file type.\n-dos140 create a 140K DOS 3.3 image.\n-pro140 create a 140K ProDOS image.\n-pro800 create a 800K ProDOS image.\n-pas140 create a 140K Pascal image. +CommandLineHelp = AppleCommander command line options [{0}]:\n-i display information about image.\n-ls list brief directory of image.\n-l list directory of image.\n-ll list detailed directory of image.\n-e export file from image to stdout.\n-g get raw file from image to stdout.\n-p [$] put stdin\n in filename on image, using file type and address.\n-d delete file from image.\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 a 800K ProDOS image.\n-pas140 create a 140K Pascal image. # UserPreferences diff --git a/src/com/webcodepro/applecommander/ui/ac.java b/src/com/webcodepro/applecommander/ui/ac.java index 8936a45..7304a1b 100644 --- a/src/com/webcodepro/applecommander/ui/ac.java +++ b/src/com/webcodepro/applecommander/ui/ac.java @@ -91,8 +91,7 @@ public class ac { * Put into the file named fileName on the disk named imageName; * Note: only volume level supported; input size unlimited. */ - static void putFile(String fileName, String fileType, - String address, String imageName) + static void putFile(String imageName, String fileName, String fileType, String address) throws IOException, DiskFullException { ByteArrayOutputStream buf = new ByteArrayOutputStream(); @@ -118,19 +117,19 @@ public class ac { * Put into the file named fileName on the disk named imageName; * Assume a cc65 style four-byte header with start address in bytes 0-1. */ - static void putCC65(String fileName, String fileType, String imageName) + static void putCC65(String imageName, String fileName, String fileType) throws IOException, DiskFullException { byte[] header = new byte[4]; int byteCount = System.in.read(header, 0, 4); int address = AppleUtil.getWordValue(header, 0); - putFile(fileName, fileType, Integer.toString(address), imageName); + putFile(imageName, fileName, fileType, Integer.toString(address)); } /** * Delete the file named fileName from the disk named imageName. */ - static void deleteFile(String fileName, String imageName) throws IOException { + static void deleteFile(String imageName, String fileName) throws IOException { Disk disk = new Disk(imageName); FormattedDisk[] formattedDisks = disk.getFormattedDisks(); for (int i=0; i. */ - static void getFile(String fileName, String imageName, boolean filter) throws IOException { + static void getFile(String imageName, String fileName, boolean filter) throws IOException { Disk disk = new Disk(imageName); FormattedDisk[] formattedDisks = disk.getFormattedDisks(); for (int i=0; i