projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* .version: changed version to 2.5.4
[fw/sdcc]
/
packihx
/
packihx.c
diff --git
a/packihx/packihx.c
b/packihx/packihx.c
index ad11efd7050f2685fc87b45ac87e1ded67cef884..779966a5190acc7f0fef803aafd771baaf94717e 100644
(file)
--- a/
packihx/packihx.c
+++ b/
packihx/packihx.c
@@
-1,7
+1,7
@@
/*-----------------------------------------------------------------------
* packihx.c:
*
/*-----------------------------------------------------------------------
* packihx.c:
*
- * utility to pack an Inte
r
HEX format file by removing redundant
+ * utility to pack an Inte
l
HEX format file by removing redundant
* extended offset records and accumulating data records up to
* OUTPUT_CHUNK (currently 16) bytes.
*
* extended offset records and accumulating data records up to
* OUTPUT_CHUNK (currently 16) bytes.
*
@@
-14,7
+14,15
@@
#include <ctype.h>
#include <assert.h>
#include <ctype.h>
#include <assert.h>
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+
+typedef unsigned char Uint8 ;
+typedef unsigned Uint16 ;
+
+#else
+
#include "config.h"
#include "config.h"
+#endif
/* A cooked line of input. */
typedef struct _Line
/* A cooked line of input. */
typedef struct _Line
@@
-38,7
+46,7
@@
int outlineno = 0;
/* Convert hex digit to numeric value 0 - 15; assumes input is a
* valid digit (i.e. passes isxdigit()).
*/
/* Convert hex digit to numeric value 0 - 15; assumes input is a
* valid digit (i.e. passes isxdigit()).
*/
-static Uint8 hexDigit(const char c)
+static Uint8 hexDigit(const
unsigned
char c)
{
if (isdigit(c))
{
{
if (isdigit(c))
{
@@
-215,7
+223,7
@@
int validateChecksum(Line *line)
if (checksum != line->checksum)
{
fprintf(stderr, "packihx: invalid checksum %X (want %X) @ line %d\n",
if (checksum != line->checksum)
{
fprintf(stderr, "packihx: invalid checksum %X (want %X) @ line %d\n",
- (unsigned)
checksum, (unsigned)(line->checksum),
+ (unsigned)
(line->checksum), (unsigned)checksum,
lineno);
return -1;
}
lineno);
return -1;
}