summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS3
-rw-r--r--COPYING (renamed from gpl.txt)0
-rw-r--r--Makefile.in109
-rw-r--r--README5
-rw-r--r--src/box.hpp (renamed from box.hpp)2
-rw-r--r--src/compareDlg.cpp (renamed from compareDlg.cpp)52
-rw-r--r--src/compareDlg.hpp (renamed from compareDlg.hpp)2
-rw-r--r--src/conversionDlg.cpp (renamed from conversionDlg.cpp)2
-rw-r--r--src/conversionDlg.hpp (renamed from conversionDlg.hpp)2
-rwxr-xr-xsrc/cursor.cpp (renamed from cursor.cpp)2
-rwxr-xr-xsrc/cursor.hpp (renamed from cursor.hpp)2
-rwxr-xr-xsrc/delta.cpp (renamed from delta.cpp)2
-rwxr-xr-xsrc/delta.hpp (renamed from delta.hpp)2
-rw-r--r--src/driver.cpp (renamed from driver.cpp)4
-rw-r--r--src/expr.h (renamed from expr.h)4
-rw-r--r--src/expr.l (renamed from expr.l)4
-rw-r--r--src/expr.y (renamed from expr.y)3
-rw-r--r--src/grid.cpp (renamed from grid.cpp)2
-rw-r--r--src/grid.hpp (renamed from grid.hpp)2
-rwxr-xr-xsrc/hexEditor.cpp (renamed from hexEditor.cpp)2
-rwxr-xr-xsrc/hexEditor.hpp (renamed from hexEditor.hpp)2
-rw-r--r--src/hexGui.cpp (renamed from hexGui.cpp)6
-rw-r--r--src/hexGui.hpp (renamed from hexGui.hpp)2
-rw-r--r--src/images.qrc (renamed from images.qrc)0
-rw-r--r--src/img/exit.xbm (renamed from img/exit.xbm)0
-rw-r--r--src/img/first.xbm (renamed from img/first.xbm)0
-rw-r--r--src/img/last.xbm (renamed from img/last.xbm)0
-rw-r--r--src/img/next.xbm (renamed from img/next.xbm)0
-rw-r--r--src/img/prev.xbm (renamed from img/prev.xbm)0
-rwxr-xr-xsrc/lfhexbin0 -> 2849919 bytes
-rw-r--r--src/lfhex.pro (renamed from lfhex.pro)34
-rw-r--r--src/local.h (renamed from local.h)6
-rwxr-xr-xsrc/mappings.h (renamed from mappings.h)2
-rw-r--r--src/offsetConstraint.cpp (renamed from offsetConstraint.cpp)2
-rw-r--r--src/offsetConstraint.hpp (renamed from offsetConstraint.hpp)2
-rw-r--r--src/reader.cpp (renamed from reader.cpp)5
-rw-r--r--src/reader.hpp (renamed from reader.hpp)2
-rw-r--r--src/save.cpp (renamed from save.cpp)2
-rw-r--r--src/save.hpp (renamed from save.hpp)2
-rwxr-xr-xsrc/translate.cpp (renamed from translate.cpp)2
-rwxr-xr-xsrc/translate.hpp (renamed from translate.hpp)2
41 files changed, 103 insertions, 174 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
new file mode 100644
index 0000000..065cf47
--- /dev/null
+++ b/CONTRIBUTORS
@@ -0,0 +1,3 @@
+A special thanks for the following contributors:
+Roy Damman - finished the port from Qt 3.x to 4.x for the comparison dialog
+Guenther Brunthaler - catching a bug in the NDEBUG version of reader.cpp
diff --git a/gpl.txt b/COPYING
index b5ab307..b5ab307 100644
--- a/gpl.txt
+++ b/COPYING
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644
index 61e67cf..0000000
--- a/Makefile.in
+++ /dev/null
@@ -1,109 +0,0 @@
-GREP = @GREP@
-MOC = @MOC@
-CXX = @CXX@
-FLEX = @FLEX@
-BISON = @BISON@
-INSTALL = @INSTALL@
-
-TOPDIR = @top_srcdir@
-PROGRAM = @PROGRAM@
-VERSION = @VERSION@
-PROGRAM_PATH = $(TOPDIR)/bin/$(PROGRAM)
-#
-# allow user specified install path prefix
-#
-EXEC_PREFIX = @exec_prefix@
-ifeq ($(EXEC_PREFIX),)
- EXEC_PREFIX=/usr/local/bin
-endif
-
-CXXFLAGS = @CXXFLAGS@
-INCLUDE_DIRS = @QT_INC_DIR@
-IFLAGS = $(addprefix -I,$(INCLUDE_DIRS))
-LIBRARIES = QtCore Xext X11 m
-LIB_DIRS = @QT_LIB_DIR@ /usr/X11R6/lib
-LFLAGS = $(addprefix -L,$(LIB_DIRS)) $(addprefix -l,$(LIBRARIES))
-
-CPP_SRC = $(wildcard *.cpp) expr.ll.cpp expr.yy.cpp
-HPP_SRC = $(wildcard *.hpp)
-H_SRC = $(wildcard *.h) $(HPP_SRC)
-MOC_HPP = $(shell $(GREP) -l Q_OBJECT $(HPP_SRC))
-
-MOC_SRC = $(addprefix moc_,$(MOC_HPP:.hpp=.cpp))
-CXX_SRC = $(CPP_SRC) $(MOC_SRC)
-
-OBJECTS = $(sort $(CXX_SRC:.cpp=.o))
-
-BUILD_DATE = $(shell @DATE_PROG@)
-BUILD_HOST = $(shell @HOSTNAME_PROG@)
-
-ifeq ($(VERBOSE),)
- QUIET = @
-else
- QUIET =
-endif
-
-.PHONY : clean_moc clean_objects clean moc all build_info.h
-
-#
-# rules
-#
-all : $(PROGRAM_PATH)
-
-$(PROGRAM_PATH) : $(OBJECTS)
- @echo "Linking $(PROGRAM_PATH)"
- $(QUIET) $(CXX) $(OBJECTS) $(LFLAGS) -o $@
-
-app.pro :
- echo "TEMPLATE = app" > $@
- echo "SOURCES = $(CPP_SRC)" >> $@
- echo "HEADERS = $(H_SRC)" >> $@
- echo "TARGET = $(PROGRAM)" >> $@
- echo "CONFIG = qt warn_on debug" >> $@
-
-build_info.h :
- echo #define BUILD_HOST "$(BUILD_HOST)" > $@
- echo #define BIULD_DATE "$(BUILD_DATE)" >> $@
-
-moc : $(MOC_SRC)
-
-clean : clean_moc clean_objects
- @echo "Removing objects and derived sources..."
- $(QUIET) $(RM) core *~ .depend img/*~
-
-clean_moc :
- $(QUIET) $(RM) $(MOC_SRC)
-
-clean_objects :
- $(QUIET) $(RM) $(OBJECTS) $(PROGRAM_PATH)
-
-depend : $(CXX_SRC)
- @echo "Generating .depend file..."
- $(QUIET) $(CXX) $(CXXFLAGS) $(IFLAGS) $^ -M -MG > .depend
-
-objects : $(OBJECTS)
-
-install :
- @echo "Installing $(PROGRAM) in $(EXEC_PREFIX)"
- $(QUIET) $(INSTALL) $(PROGRAM_PATH) $(EXEC_PREFIX)
-
-# pattern rules
-moc_%.cpp : %.hpp
- @echo "Generating $@..."
- $(QUIET) $(MOC) $< -o $@
-
-%.o : %.cpp
- @echo "Compiling $<..."
- $(QUIET) $(CXX) $(CXXFLAGS) $(IFLAGS) -c $< -o $@
-
-# rules for flex/bison
-expr.ll.cpp : expr.l expr.yy.hh
- $(FLEX) -o$@ -Pexpr expr.l
-expr.yy.cpp expr.yy.hh : expr.y
- $(BISON) -d -b expr -p expr -o expr.yy.cpp $^
-
-#
-# Include make dependancies if they have been generated
-#
--include .depend
-
diff --git a/README b/README
index 40d2813..c149211 100644
--- a/README
+++ b/README
@@ -1,5 +1,6 @@
-------------------------- lfhex ------------------------------
lfhex -> large file hex editor
+
Motivation:
Provide a fast/easy to use hex editor for viewing/modifying files which are
too large to hold in system memory.
@@ -18,7 +19,7 @@ Highlights:
it).
- runtime configurable editing mode (hex/octal/binary/ascii).
- runtime configurable bytes per column.
-- binary comparison user interface (temporarily disabled in this version!):
+- binary comparison user interface
o differences can be walked through byte by byte.
o offsets need not match between buffers. e.g: you can start the
comparison from one cursor position in the first file and use
@@ -35,6 +36,8 @@ Limitations:
1sec/Meg and is almost 3x slower if progressbar pops up).
- comparison mode is not allowed if either buffer has unsaved modifications.
+Additional documentation can be found at http://stoopidsimple.com/lfhex/manual
+
License:
This software is licensed under the GPL Version 2.
diff --git a/box.hpp b/src/box.hpp
index ae4973b..3edd733 100644
--- a/box.hpp
+++ b/src/box.hpp
@@ -1,6 +1,6 @@
#ifndef LFHEX_BOX_HPP
#define LFHEX_BOX_HPP
-/* $Id: box.hpp,v 1.1 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: box.hpp,v 1.1 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/compareDlg.cpp b/src/compareDlg.cpp
index f8621f3..3c4e104 100644
--- a/compareDlg.cpp
+++ b/src/compareDlg.cpp
@@ -1,4 +1,4 @@
-/* $Id: compareDlg.cpp,v 1.8 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: compareDlg.cpp,v 1.9 2008-09-11 01:49:00 salem Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
@@ -22,15 +22,14 @@
#include <qlayout.h>
#include <qpushbutton.h>
#include <QToolBar>
-#include <qtoolbutton.h>
#include <QFileDialog>
-#include <qwidget.h>
-#include <qapplication.h>
-#include <qmessagebox.h>
+#include <QMessageBox>
+#include <QApplication>
#include <qcombobox.h>
#include <qtabwidget.h>
#include <QBitmap>
#include <QVBoxLayout>
+#include <QMenuBar>
#include "compareDlg.hpp"
#include "offsetConstraint.hpp"
@@ -60,7 +59,7 @@ CompareDlg::CompareDlg(const char *file0,
optionLayout->setMargin(3);
optionLayout->setSpacing(2);
-
+
// setup alignment entries:
offsetConstraint = new OffsetConstraint(options);
offsetConstraint->setTitle( "Constrain offset to X*n+Y" );
@@ -75,24 +74,27 @@ CompareDlg::CompareDlg(const char *file0,
diffOffsets->setChecked(false);
setAllowDiffOffsets(false);
+ // setup menu
+ QMenu* fileMenu = menuBar()->addMenu("File");
+ fileMenu->addAction( QBitmap::fromData(QSize(exit_width,exit_height),
+ exit_bits),"Exit",qApp,SLOT(quit()));
+
+
// setup toolbar
QToolBar *tools = new QToolBar(this);
-/* FIXME new QToolButton(QBitmap::fromData(QSize(exit_width,exit_height),exit_bits),
- "Exit","",qApp,SLOT(quit()),tools);
- tools->addSeparator();
- new QToolButton(QBitmap(first_width,first_height,first_bits,true),
- "First Difference","",this,SLOT(first()),tools);
- new QToolButton(QBitmap(prev_width,prev_height,prev_bits,true),
- "Previous Difference","?",
- this,SLOT(prev()),tools);
- new QToolButton(QBitmap(next_width,next_height,next_bits,true),
- "Next Difference","foo",
- this,SLOT(next()),tools);
- new QToolButton(QBitmap(last_width,last_height,last_bits,true),
- "Last Difference","",this,SLOT(last()),tools);
-*/
+
+ tools->addAction(QBitmap::fromData(QSize(first_width,first_height),first_bits),
+ "First Difference",this,SLOT(first()));
+ tools->addAction(QBitmap::fromData(QSize(prev_width,prev_height),prev_bits),
+ "Previous Difference", this,SLOT(prev()));
+ tools->addAction(QBitmap::fromData(QSize(next_width,next_height),next_bits),
+ "Next Difference", this,SLOT(next()));
+ tools->addAction(QBitmap::fromData(QSize(last_width,last_height),last_bits),
+ "Last Difference", this,SLOT(last()));
+
// setup compare section
- vbox* view = new vbox(tabLayout);
+ QWidget *view = new QWidget(tabLayout);
+ QVBoxLayout *layout = new QVBoxLayout(view);
hexGui[0] = new HexGui(view);
hexGui[1] = new HexGui(view);
@@ -104,6 +106,12 @@ CompareDlg::CompareDlg(const char *file0,
if( file1 )
hexGui[1]->open(file1);
+ layout->addWidget(hexGui[0]);
+ layout->addWidget(hexGui[1]);
+ hexGui[0]->setWindowFlags(Qt::SubWindow);
+ hexGui[1]->setWindowFlags(Qt::SubWindow);
+
+
tabLayout->addTab(view,"&Compare");
tabLayout->addTab(options,"&Options");
addToolBar(tools);
@@ -130,7 +138,7 @@ bool CompareDlg::enabled()
// public slots
void CompareDlg::setAllowDiffOffsets(int state)
{
- // diffOffsets->setChecked(state);
+ diffOffsets->setChecked(state);
}
bool CompareDlg::first()
diff --git a/compareDlg.hpp b/src/compareDlg.hpp
index ad1f6ab..1a51671 100644
--- a/compareDlg.hpp
+++ b/src/compareDlg.hpp
@@ -1,6 +1,6 @@
#ifndef COMPARE_DLG_HPP
#define COMPARE_DLG_HPP
-/* $Id: compareDlg.hpp,v 1.5 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: compareDlg.hpp,v 1.5 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/conversionDlg.cpp b/src/conversionDlg.cpp
index 29553f9..114ab19 100644
--- a/conversionDlg.cpp
+++ b/src/conversionDlg.cpp
@@ -1,4 +1,4 @@
-/* $Id: conversionDlg.cpp,v 1.7 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: conversionDlg.cpp,v 1.7 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/conversionDlg.hpp b/src/conversionDlg.hpp
index 734a59b..6c61282 100644
--- a/conversionDlg.hpp
+++ b/src/conversionDlg.hpp
@@ -1,4 +1,4 @@
-/* $Id: conversionDlg.hpp,v 1.4 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: conversionDlg.hpp,v 1.4 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/cursor.cpp b/src/cursor.cpp
index cef8c7a..92f4bef 100755
--- a/cursor.cpp
+++ b/src/cursor.cpp
@@ -1,4 +1,4 @@
-/* $Id: cursor.cpp,v 1.3 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: cursor.cpp,v 1.3 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/cursor.hpp b/src/cursor.hpp
index eca4ac0..6b09a24 100755
--- a/cursor.hpp
+++ b/src/cursor.hpp
@@ -1,4 +1,4 @@
-/* $Id: cursor.hpp,v 1.4 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: cursor.hpp,v 1.4 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/delta.cpp b/src/delta.cpp
index eb7e649..de8ed3f 100755
--- a/delta.cpp
+++ b/src/delta.cpp
@@ -1,4 +1,4 @@
-/* $Id: delta.cpp,v 1.4 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: delta.cpp,v 1.4 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/delta.hpp b/src/delta.hpp
index 502419f..1c7d3e2 100755
--- a/delta.hpp
+++ b/src/delta.hpp
@@ -1,4 +1,4 @@
-/* $Id: delta.hpp,v 1.5 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: delta.hpp,v 1.5 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/driver.cpp b/src/driver.cpp
index a52ac0a..da72bf5 100644
--- a/driver.cpp
+++ b/src/driver.cpp
@@ -1,4 +1,4 @@
-/* $Id: driver.cpp,v 1.8 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: driver.cpp,v 1.9 2008-09-11 01:49:00 salem Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
@@ -60,8 +60,6 @@ int main (int argc, char ** argv)
}
}
if( compare ) {
- cerr << "comparison mode is disabled in this version of lfhex" << endl;
- exit(1);
int nopts = argc - optind;
// check to see if files were passed in
if( nopts >= 2 ) {
diff --git a/expr.h b/src/expr.h
index f806052..e90f4f5 100644
--- a/expr.h
+++ b/src/expr.h
@@ -1,6 +1,6 @@
#ifndef EXPR_H
#define EXPR_H
-/* $Id: expr.h,v 1.2 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: expr.h,v 1.2 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
@@ -22,4 +22,6 @@
bool expr_eval( const std::string &str, off_t &value );
+#define YYSTYPE off_t
+
#endif
diff --git a/expr.l b/src/expr.l
index a94cfe3..aa6f538 100644
--- a/expr.l
+++ b/src/expr.l
@@ -1,5 +1,5 @@
%{
-/* $Id: expr.l,v 1.4 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: expr.l,v 1.4 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
@@ -24,8 +24,8 @@
using namespace std;
-#include "expr_yacc.h"
#include "expr.h"
+#include "expr_yacc.h"
int exprparse();
diff --git a/expr.y b/src/expr.y
index 84fe0dc..285ea8d 100644
--- a/expr.y
+++ b/src/expr.y
@@ -1,5 +1,5 @@
%{
-/* $Id: expr.y,v 1.2 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: expr.y,v 1.2 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
@@ -16,7 +16,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#define YYSTYPE off_t
#include <iostream>
#include <math.h>
diff --git a/grid.cpp b/src/grid.cpp
index 643b7d8..3f0dad8 100644
--- a/grid.cpp
+++ b/src/grid.cpp
@@ -1,4 +1,4 @@
-/* $Id: grid.cpp,v 1.1 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: grid.cpp,v 1.1 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/grid.hpp b/src/grid.hpp
index c07c340..d7cc89a 100644
--- a/grid.hpp
+++ b/src/grid.hpp
@@ -1,6 +1,6 @@
#ifndef LFHEX_GRID_HPP
#define LFHEX_GRID_HPP
-/* $Id: grid.hpp,v 1.1 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: grid.hpp,v 1.1 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/hexEditor.cpp b/src/hexEditor.cpp
index 0cae378..48cfe8b 100755
--- a/hexEditor.cpp
+++ b/src/hexEditor.cpp
@@ -1,4 +1,4 @@
-/* $Id: hexEditor.cpp,v 1.14 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: hexEditor.cpp,v 1.14 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/hexEditor.hpp b/src/hexEditor.hpp
index 2cd58b7..be96952 100755
--- a/hexEditor.hpp
+++ b/src/hexEditor.hpp
@@ -1,4 +1,4 @@
-/* $Id: hexEditor.hpp,v 1.7 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: hexEditor.hpp,v 1.7 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/hexGui.cpp b/src/hexGui.cpp
index f429cee..a2cb65e 100644
--- a/hexGui.cpp
+++ b/src/hexGui.cpp
@@ -1,4 +1,4 @@
-/* $Id: hexGui.cpp,v 1.13 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: hexGui.cpp,v 1.13 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
@@ -245,9 +245,9 @@ void HexGui::setOffsetLabel(off_t pos)
QString label;
char buffer[64];
#if _LARGEFILE_SOURCE
- sprintf(buffer,"0x%llx",pos);
-#else
sprintf(buffer,"0x%lx",pos);
+#else
+ sprintf(buffer,"0x%x",pos);
#endif
label = buffer;
offsetLineEdit->setText(label);
diff --git a/hexGui.hpp b/src/hexGui.hpp
index 38b71f0..d90a4c5 100644
--- a/hexGui.hpp
+++ b/src/hexGui.hpp
@@ -1,4 +1,4 @@
-/* $Id: hexGui.hpp,v 1.5 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: hexGui.hpp,v 1.5 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/images.qrc b/src/images.qrc
index 6304052..6304052 100644
--- a/images.qrc
+++ b/src/images.qrc
diff --git a/img/exit.xbm b/src/img/exit.xbm
index 40c6979..40c6979 100644
--- a/img/exit.xbm
+++ b/src/img/exit.xbm
diff --git a/img/first.xbm b/src/img/first.xbm
index 081acc8..081acc8 100644
--- a/img/first.xbm
+++ b/src/img/first.xbm
diff --git a/img/last.xbm b/src/img/last.xbm
index 39907a8..39907a8 100644
--- a/img/last.xbm
+++ b/src/img/last.xbm
diff --git a/img/next.xbm b/src/img/next.xbm
index b7b5646..b7b5646 100644
--- a/img/next.xbm
+++ b/src/img/next.xbm
diff --git a/img/prev.xbm b/src/img/prev.xbm
index 5cb72fc..5cb72fc 100644
--- a/img/prev.xbm
+++ b/src/img/prev.xbm
diff --git a/src/lfhex b/src/lfhex
new file mode 100755
index 0000000..08cf35b
--- /dev/null
+++ b/src/lfhex
Binary files differ
diff --git a/lfhex.pro b/src/lfhex.pro
index d67004e..892df3d 100644
--- a/lfhex.pro
+++ b/src/lfhex.pro
@@ -1,5 +1,7 @@
-# $Id: lfhex.pro,v 1.1 2006/11/05 03:22:13 ganzhorn Exp $
+# $Id: lfhex.pro,v 1.2 2008-09-11 01:49:00 salem Exp $
TARGET = lfhex
+VERSION = 0.42
+TEMPLATE = app
SOURCES = reader.cpp \
save.cpp \
translate.cpp \
@@ -12,11 +14,21 @@ SOURCES = reader.cpp \
delta.cpp \
offsetConstraint.cpp \
driver.cpp
-HEADERS = offsetConstraint.hpp \
- hexGui.hpp \
- hexEditor.hpp \
+HEADERS = box.hpp \
+ compareDlg.hpp \
conversionDlg.hpp \
- compareDlg.hpp
+ cursor.hpp \
+ delta.hpp \
+ grid.hpp \
+ hexEditor.hpp \
+ hexGui.hpp \
+ offsetConstraint.hpp \
+ reader.hpp \
+ save.hpp \
+ translate.hpp \
+ expr.h \
+ local.h \
+ mappings.h
# The following defines are used to select large file offsets.
# If your OS does not support this comment it out.
@@ -33,4 +45,16 @@ LEXSOURCES += expr.l
QMAKE_LEX = flex
QMAKE_YACC = bison
QMAKE_YACCFLAGS = -d -b expr -p expr
+DISTFILES += ../README \
+ ../README.install \
+ ../COPYING \
+ $$YACCSOURCES \
+ $$LEXSOURCES \
+ img/exit.xbm \
+ img/first.xbm \
+ img/last.xbm \
+ img/next.xbm \
+ img/prev.xbm
+# Uncomment this to compile in debug mode
+# CONFIG += debug
diff --git a/local.h b/src/local.h
index 53dbb1a..fd97c75 100644
--- a/local.h
+++ b/src/local.h
@@ -1,6 +1,6 @@
#ifndef _LOCAL_H_
#define _LOCAL_H_
-/* $Id: local.h,v 1.5 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: local.h,v 1.6 2008-09-11 01:49:00 salem Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
@@ -24,7 +24,7 @@ using namespace std;
#define C_STR(x) x.toAscii().constData()
#define PROGRAM "lfhex"
-#define VERSION "0.4"
-#define PROGRAM_STRING "lfhex 0.4"
+#define VERSION "0.42"
+#define PROGRAM_STRING PROGRAM " " VERSION
#endif
diff --git a/mappings.h b/src/mappings.h
index 5d9da1e..73212b1 100755
--- a/mappings.h
+++ b/src/mappings.h
@@ -1,4 +1,4 @@
-/* $Id: mappings.h,v 1.3 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: mappings.h,v 1.3 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/offsetConstraint.cpp b/src/offsetConstraint.cpp
index 3369bf9..72c1652 100644
--- a/offsetConstraint.cpp
+++ b/src/offsetConstraint.cpp
@@ -1,4 +1,4 @@
-/* $Id: offsetConstraint.cpp,v 1.7 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: offsetConstraint.cpp,v 1.7 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/offsetConstraint.hpp b/src/offsetConstraint.hpp
index 3e3b919..2184ce4 100644
--- a/offsetConstraint.hpp
+++ b/src/offsetConstraint.hpp
@@ -1,4 +1,4 @@
-/* $Id: offsetConstraint.hpp,v 1.5 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: offsetConstraint.hpp,v 1.5 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/reader.cpp b/src/reader.cpp
index 07e267e..804f54c 100644
--- a/reader.cpp
+++ b/src/reader.cpp
@@ -1,4 +1,4 @@
-/* $Id: reader.cpp,v 1.10 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: reader.cpp,v 1.11 2008-09-11 01:49:00 salem Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
@@ -285,7 +285,8 @@ uchar Reader::operator[] (off_t offset)
"attempt to access past end of file");
off_t page_idx = offset/_pageSize;
- assert( loadPage( page_idx ) );
+ bool loaded = loadPage( page_idx );
+ assert( loaded );
return _data[page_idx][ offset%_pageSize ];
}
diff --git a/reader.hpp b/src/reader.hpp
index 688dc63..4307c3f 100644
--- a/reader.hpp
+++ b/src/reader.hpp
@@ -1,4 +1,4 @@
-/* $Id: reader.hpp,v 1.6 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: reader.hpp,v 1.6 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/save.cpp b/src/save.cpp
index 928e98d..ba75043 100644
--- a/save.cpp
+++ b/src/save.cpp
@@ -1,4 +1,4 @@
-/* $Id: save.cpp,v 1.4 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: save.cpp,v 1.4 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/save.hpp b/src/save.hpp
index 7af709d..e0c4136 100644
--- a/save.hpp
+++ b/src/save.hpp
@@ -1,5 +1,5 @@
-/* $Id: save.hpp,v 1.3 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: save.hpp,v 1.3 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/translate.cpp b/src/translate.cpp
index 36a2f63..b0a96a3 100755
--- a/translate.cpp
+++ b/src/translate.cpp
@@ -1,4 +1,4 @@
-/* $Id: translate.cpp,v 1.4 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: translate.cpp,v 1.4 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*
diff --git a/translate.hpp b/src/translate.hpp
index 95582eb..6fa9898 100755
--- a/translate.hpp
+++ b/src/translate.hpp
@@ -1,4 +1,4 @@
-/* $Id: translate.hpp,v 1.4 2006/11/05 04:42:43 ganzhorn Exp $
+/* $Id: translate.hpp,v 1.4 2006-11-05 04:42:43 ganzhorn Exp $
* This file is part of lfhex.
* Copyright (C) 2006 Salem Ganzhorn <eyekode@yahoo.com>
*