diff options
-rw-r--r-- | common/compat.h | 4 | ||||
-rw-r--r-- | common/usuals.h | 2 | ||||
-rw-r--r-- | common/xstring.h | 2 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | lib/compile.c | 7 | ||||
-rw-r--r-- | lib/ops.h | 2 | ||||
-rw-r--r-- | lib/rlib.h | 5 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/file.h | 2 | ||||
-rw-r--r-- | src/rep.c | 2 |
10 files changed, 18 insertions, 14 deletions
diff --git a/common/compat.h b/common/compat.h index 09934db..2d16cc4 100644 --- a/common/compat.h +++ b/common/compat.h @@ -66,7 +66,7 @@ #endif #ifndef HAVE_TOLOWER -int tolower(int c); +int tolower(int ch); #endif #ifndef HAVE_STRDUP @@ -174,4 +174,4 @@ void vwarnx(const char *fmt, va_list ap); void* reallocf(void* ptr, size_t size); #endif -#endif
\ No newline at end of file +#endif diff --git a/common/usuals.h b/common/usuals.h index 7317f99..e263e74 100644 --- a/common/usuals.h +++ b/common/usuals.h @@ -58,4 +58,4 @@ #endif -#endif //__USUALS_H__20000613
\ No newline at end of file +#endif //__USUALS_H__20000613 diff --git a/common/xstring.h b/common/xstring.h index 3be4116..aff2d1f 100644 --- a/common/xstring.h +++ b/common/xstring.h @@ -67,4 +67,4 @@ const char* starnext(const char* prev); -#endif //__XSTRING_H__
\ No newline at end of file +#endif //__XSTRING_H__ diff --git a/configure.in b/configure.in index 4411b55..40e92de 100644 --- a/configure.in +++ b/configure.in @@ -50,7 +50,7 @@ AC_FUNC_VPRINTF # Required Functions AC_CHECK_FUNCS([bzero chdir getcwd memmove memset strchr strcspn strerror strrchr strspn malloc realloc stat], , [echo "ERROR: Required function missing"; exit 1]) -AC_CHECK_FUNCS([strcasestr strlcpy strncpy strcpy strlcat strncat strcat strdup strndup stricmp strnicmp strcasecmp strncasecmp]) +AC_CHECK_FUNCS([strcasestr strlcpy strncpy strcpy strlcat strncat strcat strdup strndup stricmp strnicmp strcasecmp strncasecmp tolower]) AC_CHECK_FUNCS([getopt vasprintf vsnprintf reallocf]) AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile common/Makefile doc/Makefile 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 diff --git a/src/Makefile.am b/src/Makefile.am index 59b1a23..16dcc25 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,11 +3,11 @@ bin_PROGRAMS = rep repc rep_SOURCES = rep.c file.c file.h ../common/compat.c ../common/xstring.c ../common/repfile.c rep_LDADD = -lrlib -lpcre rep_CFLAGS = -O0 -I${top_srcdir} -I/usr/local/include -rep_LDFLAGS = -L${top_srcdir}/lib/.libs -L${top_srcdir}/lib -L/usr/local/lib +rep_LDFLAGS = -L${top_srcdir}/lib -L/usr/local/lib repc_SOURCES = repc.c ../common/compat.c ../common/xstring.c ../common/binfile.c ../common/repfile.c repc_LDADD = -lrlib -lpcre repc_CFLAGS = -O0 -I${top_srcdir} -I/usr/local/include -repc_LDFLAGS = -L${top_srcdir}/lib/.libs -L${top_srcdir}/lib -L/usr/local/lib +repc_LDFLAGS = -L${top_srcdir}/lib -L/usr/local/lib EXTRA_DIST = rep.dsp repc.dsp @@ -82,4 +82,4 @@ const char* getExtension(const char* szPath); int isDots(const char* szPath); int isDirectory(const char* szPath); -#endif
\ No newline at end of file +#endif @@ -383,7 +383,7 @@ int replaceFolder(r_context* ctx, char* folder) * Change directory back to where we saved it * the reason we do this is that in some cases (sub-folders) */ - _chdir(old); + chdir(old); } #ifdef _WIN32 |