summaryrefslogtreecommitdiff
path: root/rdoff/rdlib.c
diff options
context:
space:
mode:
authorKeith Kanios <spook@dynatos.net>2007-04-12 02:40:54 +0000
committerKeith Kanios <spook@dynatos.net>2007-04-12 02:40:54 +0000
commitb7a89544d09455d7b2f4621c80b21ca457563f4a (patch)
tree6c89a3318c19c2bf364cbd95859e78fbc2d4e306 /rdoff/rdlib.c
parentaa348dec7d6c5366efd10513ae4ff6fa2bbbd6ed (diff)
downloadnasm-b7a89544d09455d7b2f4621c80b21ca457563f4a.tar.gz
General push for x86-64 support, dubbed 0.99.00.
Diffstat (limited to 'rdoff/rdlib.c')
-rw-r--r--rdoff/rdlib.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/rdoff/rdlib.c b/rdoff/rdlib.c
index 28a2bdf3..8f13d1d5 100644
--- a/rdoff/rdlib.c
+++ b/rdoff/rdlib.c
@@ -16,19 +16,19 @@
int rdl_error = 0;
-char *rdl_errors[5] = {
+int8_t *rdl_errors[5] = {
"no error", "could not open file", "invalid file structure",
"file contains modules of an unsupported RDOFF version",
"module not found"
};
-int rdl_verify(const char *filename)
+int rdl_verify(const int8_t *filename)
{
FILE *fp = fopen(filename, "rb");
- char buf[257];
+ int8_t buf[257];
int i;
- long length;
- static char lastverified[256];
+ int32_t length;
+ static int8_t lastverified[256];
static int lastresult = -1;
if (lastresult != -1 && !strcmp(filename, lastverified))
@@ -51,8 +51,8 @@ int rdl_verify(const char *filename)
/*
* A special module, eg a signature block or a directory.
* Format of such a module is defined to be:
- * six char type identifier
- * long count bytes content
+ * six int8_t type identifier
+ * int32_t count bytes content
* content
* so we can handle it uniformaly with RDOFF2 modules.
*/
@@ -75,7 +75,7 @@ int rdl_verify(const char *filename)
return lastresult = 0; /* library in correct format */
}
-int rdl_open(struct librarynode *lib, const char *name)
+int rdl_open(struct librarynode *lib, const int8_t *name)
{
int i = rdl_verify(name);
if (i)
@@ -95,13 +95,13 @@ void rdl_close(struct librarynode *lib)
free(lib->name);
}
-int rdl_searchlib(struct librarynode *lib, const char *label, rdffile * f)
+int rdl_searchlib(struct librarynode *lib, const int8_t *label, rdffile * f)
{
- char buf[512];
+ int8_t buf[512];
int i, t;
void *hdr;
rdfheaderrec *r;
- long l;
+ int32_t l;
rdl_error = 0;
lib->referenced++;
@@ -182,9 +182,9 @@ int rdl_searchlib(struct librarynode *lib, const char *label, rdffile * f)
int rdl_openmodule(struct librarynode *lib, int moduleno, rdffile * f)
{
- char buf[512];
+ int8_t buf[512];
int i, cmod, t;
- long length;
+ int32_t length;
lib->referenced++;
@@ -251,7 +251,7 @@ int rdl_openmodule(struct librarynode *lib, int moduleno, rdffile * f)
return rdl_error = 4; /* module not found */
}
-void rdl_perror(const char *apname, const char *filename)
+void rdl_perror(const int8_t *apname, const int8_t *filename)
{
if (rdl_error >= 16)
rdfperror(apname, filename);