mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-06-27 08:29:31 +00:00
tidying
This commit is contained in:
parent
678c49f540
commit
9fdbdf740c
|
@ -40,10 +40,10 @@ public class ApplesoftBasicProgram extends BasicProgram
|
|||
int prevOffset = 0;
|
||||
|
||||
int max = buffer.length - 4; // need at least 4 bytes to make a SourceLine
|
||||
while (ptr < max)
|
||||
while (ptr <= max)
|
||||
{
|
||||
int offset = Utility.unsignedShort (buffer, ptr);
|
||||
if (offset <= prevOffset)
|
||||
if (offset <= prevOffset) // usually zero
|
||||
break;
|
||||
|
||||
SourceLine line = new SourceLine (ptr);
|
||||
|
@ -133,7 +133,6 @@ public class ApplesoftBasicProgram extends BasicProgram
|
|||
// (see SEA BATTLE on DISK283.DSK)
|
||||
if (subline.is (TOKEN_REM) && lineText.length () > basicPreferences.wrapRemAt + 4)
|
||||
{
|
||||
// System.out.println (lineText.length ());
|
||||
String copy = lineText.substring (4);
|
||||
text.append ("REM ");
|
||||
int inset = text.length () + 1;
|
||||
|
@ -213,7 +212,7 @@ public class ApplesoftBasicProgram extends BasicProgram
|
|||
}
|
||||
}
|
||||
|
||||
// Reset alignment value if we just left an IF - the indentation will be different now.
|
||||
// Reset alignment value if we just left an IF - the indentation will be different now
|
||||
if (ifIndent > 0)
|
||||
alignPos = 0;
|
||||
}
|
||||
|
@ -356,7 +355,7 @@ public class ApplesoftBasicProgram extends BasicProgram
|
|||
if (subline.assignEqualPos > 0) // does the line have an equals sign?
|
||||
{
|
||||
if (currentAlignPosition == 0)
|
||||
currentAlignPosition = findHighest (subline); // examine following sublines for alignment
|
||||
currentAlignPosition = findHighest (subline); // examine following sublines
|
||||
return currentAlignPosition;
|
||||
}
|
||||
return 0; // reset it
|
||||
|
@ -459,7 +458,7 @@ public class ApplesoftBasicProgram extends BasicProgram
|
|||
int programLoadAddress = 0;
|
||||
if (buffer.length > 1)
|
||||
{
|
||||
int offset = Utility.intValue (buffer[0], buffer[1]);
|
||||
int offset = Utility.unsignedShort (buffer, 0);
|
||||
programLoadAddress = offset - getLineLength (0);
|
||||
}
|
||||
return programLoadAddress;
|
||||
|
@ -777,6 +776,9 @@ public class ApplesoftBasicProgram extends BasicProgram
|
|||
if (buffer[max] == 0)
|
||||
--max;
|
||||
|
||||
if (isImpliedGoto () && !basicPreferences.showThen)
|
||||
line.append ("GOTO ");
|
||||
|
||||
for (int p = startPtr; p <= max; p++)
|
||||
{
|
||||
byte b = buffer[p];
|
||||
|
|
|
@ -11,7 +11,7 @@ public class BasicPreferences
|
|||
public boolean onlyShowTargetLineNumbers = true;
|
||||
public boolean showCaret = false;
|
||||
public boolean showThen = true;
|
||||
public int wrapPrintAt = 40;
|
||||
public int wrapPrintAt = 0;
|
||||
public int wrapRemAt = 60;
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
|
@ -21,7 +21,7 @@ public class BasicPreferences
|
|||
{
|
||||
StringBuilder text = new StringBuilder ();
|
||||
|
||||
text.append (String.format ("Split remark .......... %s%n", splitRem));
|
||||
text.append (String.format ("Split REM ............. %s%n", splitRem));
|
||||
text.append (String.format ("Align assign .......... %s%n", alignAssign));
|
||||
text.append (String.format ("Show targets .......... %s%n", showTargets));
|
||||
text.append (
|
||||
|
|
|
@ -267,9 +267,11 @@ public class DiskBrowser extends JFrame implements DiskSelectionListener, QuitLi
|
|||
private static void setLookAndFeel ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
// FlatLightLaf.install ();
|
||||
try
|
||||
{
|
||||
UIManager.setLookAndFeel (UIManager.getSystemLookAndFeelClassName ());
|
||||
// UIManager.setLookAndFeel (new FlatLightLaf ());
|
||||
if (MAC)
|
||||
System.setProperty ("apple.laf.useScreenMenuBar", "true");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user