Skip to content

Commit

Permalink
Minor refactorization.
Browse files Browse the repository at this point in the history
  • Loading branch information
bengtmartensson committed Dec 17, 2023
1 parent 02e1651 commit 5406fe4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/java/org/harctoolbox/irscrutinizer/IrScrutinizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,20 @@ public static void main(String[] args) {
System.exit(IrpUtils.EXIT_SUCCESS);
}

setupRadixPrefixes();

String applicationHome = Utils.findApplicationHome(commandLineArgs.applicationHome, IrScrutinizer.class, Version.appName);
guiExecute(applicationHome, commandLineArgs.propertiesFilename, commandLineArgs.verbose, commandLineArgs.arguments);
}

Map<String, Integer> map = new LinkedHashMap<>(8);
public static void setupRadixPrefixes() {
Map<String, Integer> map = new LinkedHashMap<>(8);
map.put("0b", 2);
map.put("%", 2);
map.put("0q", 4);
map.put("0", 8);
map.put("0x", 16);
IrCoreUtils.setRadixPrefixes(map);

guiExecute(applicationHome, commandLineArgs.propertiesFilename, commandLineArgs.verbose, commandLineArgs.arguments);
}

private static String nukeProperties(boolean verbose) {
Expand Down Expand Up @@ -210,7 +213,7 @@ private final static class CommandLineArgs {
@Parameter(names = {"-v", "--verbose"}, description = "Have some commands executed verbosely")
private boolean verbose;

@Parameter(description = "Arguments to the program")
@Parameter(description = "Arguments...")
private List<String> arguments = new ArrayList<>(4);
}
}

0 comments on commit 5406fe4

Please sign in to comment.