Skip to content

Commit

Permalink
Bump 0.4.1, remove common module
Browse files Browse the repository at this point in the history
  • Loading branch information
dd86k committed Mar 20, 2022
1 parent 5f29c91 commit a454e25
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 59 deletions.
58 changes: 0 additions & 58 deletions src/ddhx/common.d

This file was deleted.

51 changes: 51 additions & 0 deletions src/ddhx/ddhx.d
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,57 @@ import std.string : split;
import core.stdc.string : memset;
import ddhx;

/// Copyright string
enum COPYRIGHT = "Copyright (c) 2017-2022 dd86k <[email protected]>";

/// App version
enum VERSION = "0.4.1";

/// Version line
enum ABOUT = "ddhx " ~ VERSION ~ " (built: " ~ __TIMESTAMP__~")";

//
// SECTION Input structure
//

// !SECTION

/// Number type to render either for offset or data
enum NumberType {
hexadecimal,
decimal,
octal
}

/// Character translation
enum CharType {
ascii, /// 7-bit US-ASCII
cp437, /// IBM PC CP-437
ebcdic, /// IBM EBCDIC Code Page 37
mac, /// Mac OS Roman
// gsm, /// GSM 03.38
}

//TODO: --no-header: bool
//TODO: --no-offset: bool
//TODO: --no-status: bool
/// Global definitions and default values
// Aren't all of these engine settings anyway?
struct Globals {
// Settings
ushort rowWidth = 16; /// How many bytes are shown per row
NumberType offsetType; /// Current offset view type
NumberType dataType; /// Current data view type
CharType charType; /// Current charset
char defaultChar = '.'; /// Default character to use for non-ascii characters
// int include; /// Include what panels
// Internals
TerminalSize termSize; /// Last known terminal size
}

__gshared Globals globals; /// Single-instance of globals.
__gshared Io io; /// File/stream I/O instance.

int printError() {
stderr.write("error: ");
stderr.writeln(errorMsg);
Expand Down
1 change: 0 additions & 1 deletion src/ddhx/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module ddhx;

public import
ddhx.ddhx,
ddhx.common,
ddhx.command,
ddhx.display,
ddhx.error,
Expand Down

0 comments on commit a454e25

Please sign in to comment.