File dhex-fixes.patch of Package dhex
--- search.h.orig 2011-01-09 01:45:44.000000000 +0100
+++ search.h 2011-01-09 01:45:49.000000000 +0100
@@ -18,6 +18,6 @@
} tSearch;
void clearsearch(tSearch* search);
-tInt8 searchfor(tSearch* search,tBuffer* buf,tUInt64* cursorpos,tBool nextnotprev);
+void searchfor(tSearch* search,tBuffer* buf,tUInt64* cursorpos,tBool nextnotprev);
#endif
--- configfile.c.orig 2011-01-09 01:47:20.000000000 +0100
+++ configfile.c 2011-01-09 01:47:59.000000000 +0100
@@ -65,7 +65,7 @@
{"DIM", 3,0,A_DIM},
{"BOLD", 4,0,A_BOLD}};
-int getcolors(tOutput* output,char* line)
+void getcolors(tOutput* output,char* line)
{
int i;
int l;
@@ -78,7 +78,7 @@
int attrs1;
int attrs2;
int attrsret;
- short fg,bg;
+ short fg = 0,bg = 0;
l=strlen(line);
memset(token,0,sizeof(token));
--- search.c.orig 2011-01-09 01:45:26.000000000 +0100
+++ search.c 2011-01-09 01:46:14.000000000 +0100
@@ -11,13 +11,13 @@
memset(search,0,sizeof(tSearch));
search->forwardnotbackward=1;
}
-tInt8 searchfor(tSearch* search,tBuffer* buf,tUInt64* cursorpos,tBool nextnotprev)
+void searchfor(tSearch* search,tBuffer* buf,tUInt64* cursorpos,tBool nextnotprev)
{
tInt64 actcursorpos=*cursorpos;
tInt64 oldcursorpos=*cursorpos;
tBool forward;
tBool done;
- tBool found;
+ tBool found = 0;
tFptr fwlog;
tFptr frlog;
char line[64];
--- main.c.orig 2011-01-09 01:44:08.000000000 +0100
+++ main.c 2011-01-09 01:44:16.000000000 +0100
@@ -16,6 +16,8 @@
#include "search.h"
#include "gpl.h"
+extern void initcolors();
+
char configfile[512];
void welcomescreen(char* argv0)
{
--- input.c.orig 2011-01-09 01:42:36.000000000 +0100
+++ input.c 2011-01-09 01:49:24.000000000 +0100
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <string.h>
#include <strings.h>
+#include <unistd.h>
#include "machine_type.h"
#include "input.h"
#include "output.h"
@@ -165,7 +166,7 @@
tBool done=0;
tInt16 newusedlen;
tBool nibble=0;
- tUInt8 newchar;
+ tUInt8 newchar = 0;
int i;
buf=malloc(len);
@@ -310,7 +311,7 @@
}
return retval;
}
-int writeconfigfile(tOutput* output,char* configfilename)
+void writeconfigfile(tOutput* output,char* configfilename)
{
tFptr f;
char tmpbuf[65536];
--- gpl.c.orig 2011-01-09 01:46:30.000000000 +0100
+++ gpl.c 2011-01-09 01:47:15.000000000 +0100
@@ -375,8 +375,8 @@
0x19,0x1b,0x01,0x91,0x06,0xb1,0x25,0x7a,0xc3
};
int i;
- char c;
- int newlinecnt;
+ char c = 0;
+ int newlinecnt = 0;
for (i=0;i<sizeof(gpltxt);i++)
{
if (codebook[gpltxt[i]])