summaryrefslogtreecommitdiffstats
path: root/khexedit/hexerror.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2020-12-08 12:30:30 +0900
committerMichele Calgaro <[email protected]>2020-12-08 13:14:02 +0900
commit4ff709afede2f49e6165ec52699acc98b0c928fc (patch)
tree15f0185f2e9f5334c4e87ca60772f5c0a583e9dd /khexedit/hexerror.cpp
parent30e5a0862d88b5bd524acfe35ced4b8c86c08d2a (diff)
downloadtdeutils-4ff709afede2f49e6165ec52699acc98b0c928fc.tar.gz
tdeutils-4ff709afede2f49e6165ec52699acc98b0c928fc.zip
Renaming of files in preparation for code style tools.
Signed-off-by: Michele Calgaro <[email protected]> (cherry picked from commit 7ec5a57fc3f04526f36477e22066199372beb0ee)
Diffstat (limited to 'khexedit/hexerror.cpp')
-rw-r--r--khexedit/hexerror.cpp69
1 files changed, 69 insertions, 0 deletions
diff --git a/khexedit/hexerror.cpp b/khexedit/hexerror.cpp
new file mode 100644
index 0000000..6549f1d
--- /dev/null
+++ b/khexedit/hexerror.cpp
@@ -0,0 +1,69 @@
+/*
+ * khexedit - Versatile hex editor
+ * Copyright (C) 1999 Espen Sand, [email protected]
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include <tdelocale.h>
+
+#include "hexerror.h"
+
+static TQString message;
+
+
+const TQString &hexError( int index )
+{
+ static TQString messages[ Err_MAXERROR - Err_NoData ] =
+ {
+ i18n("No data"), // Err_NoData
+ i18n("Insufficient memory"), // Err_NoMemory
+ i18n("List is full"), // Err_ListFull
+ i18n("Read operation failed"), // Err_ReadFailed
+ i18n("Write operation failed"), // Err_WriteFailed
+ i18n("Empty argument"), // Err_EmptyArgument
+ i18n("Illegal argument"), // Err_IllegalArgument
+ i18n("Null pointer argument"), // Err_NullArgument
+ i18n("Wrap buffer"), // Err_WrapBuffer
+ i18n("No match"), // Err_NoMatch
+ i18n("No data is selected"), // Err_NoSelection
+ i18n("Empty document"), // Err_EmptyDocument
+ i18n("No active document"), // Err_NoActiveDocument
+ i18n("No data is marked"), // Err_NoMark
+ i18n("Document is write protected"), // Err_WriteProtect
+ i18n("Document is resize protected"), // Err_NoResize
+ i18n("Operation was stopped"), // Err_Stop
+ i18n("Illegal mode"), // Err_IllegalMode
+ i18n("Program is busy, try again later"), // Err_Busy
+ i18n("Value is not within valid range"), // Err_IllegalRange
+ i18n("Operation was aborted"), // Err_OperationAborted
+ i18n("File could not be opened for writing"), // Err_OpenWriteFailed
+ i18n("File could not be opened for reading"), // Err_OpenReadFailed
+ };
+
+
+ if( index < Err_NoData || index >= Err_MAXERROR )
+ {
+ message = i18n("Unknown error");
+ }
+ else
+ {
+ message = messages[ index - Err_NoData ];
+ }
+
+ return( message );
+}
+