*
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and
* Julian Hall. All rights reserved. The software is
- * redistributable under the licence given in the file "Licence"
+ * redistributable under the license given in the file "LICENSE"
* distributed in the NASM archive.
*
* Permission to use this file in your own projects is granted, as int32_t
* - support for segment relocations (hard to do in ANSI C)
*/
+#include "compiler.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
extern int rdf_errno;
-rdfmodule *rdfload(const int8_t *filename)
+rdfmodule *rdfload(const char *filename)
{
rdfmodule *f;
int32_t bsslength = 0;
- int8_t *hdr;
+ char *hdr;
rdfheaderrec *r;
f = malloc(sizeof(rdfmodule));
rdfheaderrewind(&f->f);
- f->textrel = (int32_t)f->t;
- f->datarel = (int32_t)f->d;
- f->bssrel = (int32_t)f->b;
+ f->textrel = (int32_t)(size_t)f->t;
+ f->datarel = (int32_t)(size_t)f->d;
+ f->bssrel = (int32_t)(size_t)f->b;
return f;
}
non-portable */
switch (r->r.length) {
case 1:
- seg[r->r.offset] += (int8_t)rel;
+ seg[r->r.offset] += (char)rel;
break;
case 2:
*(uint16_t *) (seg + r->r.offset) += (uint16_t) rel;