summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rlib.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/lib/rlib.c b/lib/rlib.c
index faca2b8..38e8268 100644
--- a/lib/rlib.c
+++ b/lib/rlib.c
@@ -239,7 +239,7 @@ int rlibRun(r_stream* stream, r_script* script, int done)
* After this the search could start anew
* unless in flush mode or done
*/
- if(done == true)
+ if(done)
RETURN(R_DONE);
else
RETURN(R_IN);
@@ -455,6 +455,28 @@ int repInit(r_context* ctx)
return R_OK;
}
+#ifdef _DEBUG
+static void* memstr(void* mem, size_t sz, const char* str)
+{
+ size_t len = strlen(str);
+ const char* t;
+ const char* e;
+
+ ASSERT(str && mem);
+
+ if(len > sz)
+ return NULL;
+
+ for(t = (const char*)mem, e = t + (sz - len); t < e; t++)
+ {
+ if(memcmp(t, str, len) == 0)
+ return (void*)t;
+ }
+
+ return NULL;
+}
+#endif
+
int repFile(r_context* ctx, FILE* fIn)
{
r_uint batch; /* Current batch size */