diff options
author | Stef Walter <stef@thewalter.net> | 2004-04-07 20:13:04 +0000 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2004-04-07 20:13:04 +0000 |
commit | a367e18f1faa1b3b60249f82f18bfbd85669603f (patch) | |
tree | 39262d368da7f8698bb9315c31ebda12db0fa57a /lib | |
parent | 58523416357dd391c7db7cec6d96a36ce29adece (diff) |
Linux port
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compile.c | 7 | ||||
-rw-r--r-- | lib/ops.h | 2 | ||||
-rw-r--r-- | lib/rlib.h | 5 |
3 files changed, 9 insertions, 5 deletions
diff --git a/lib/compile.c b/lib/compile.c index e92a2f6..b0cd818 100644 --- a/lib/compile.c +++ b/lib/compile.c @@ -399,6 +399,7 @@ static void pushValues(compilecontext* ctx, bool forward, ...) { va_list ap; size_t len; + int temp; #define VAL_BUF 20 byte buff[VAL_BUF]; @@ -416,10 +417,12 @@ static void pushValues(compilecontext* ctx, bool forward, ...) switch(len) { case 1: - buff[cur] = va_arg(ap, byte); + temp = va_arg(ap, unsigned int); + buff[cur] = (byte)temp; break; case 2: - *((unsigned short*)(buff + cur)) = va_arg(ap, unsigned short); + temp = va_arg(ap, unsigned int); + *((unsigned short*)(buff + cur)) = (unsigned short)temp; break; case 4: *((unsigned int*)(buff + cur)) = va_arg(ap, unsigned int); @@ -346,4 +346,4 @@ typedef struct _var_op -#endif /* __OPS_H__20000616 */
\ No newline at end of file +#endif /* __OPS_H__20000616 */ @@ -34,7 +34,7 @@ typedef unsigned int r_uint; /* * r_replace: * Represents a replacement which was found. This structure is passed - * to the r_match matching callback function below. + * to the r_match matching callback function below.R */ typedef struct _r_replace { @@ -97,7 +97,7 @@ typedef struct r_stream r_write fWrite; /* Callback used for output */ r_match fMatch; /* Callback for confirmation or matching */ - r_message fMessage; /* Callback for messages from script */ + r_message fMessage; /* Callback for messagesR from script */ void* arg; /* Optional data for the above functions */ /* -------- Data returned -------------- */ @@ -223,6 +223,7 @@ void rlibClear(r_stream* stream); /* ERROR CODES */ +#undef R_OK /* OK */ #define R_OK 0 |