Functions don't need to be declared extern
Report how many bytes were left if a decode error occurs
Remove an obsoleve method from gldbg.h
void tick();
void check_child();
void read_stream();
- long ptrace(int, void *, void *);
virtual void sighandler(int);
};
ret = gldecoder_decode(dec, ptr, end-ptr);
if(ret<0)
{
- fprintf(stderr, "Decode error\n");
+ fprintf(stderr, "Decode error with %d bytes left\n", end-ptr);
break;
}
ptr += ret;
#include <stdlib.h>
#include "tmpalloc.h"
-void *buffer = 0;
-unsigned buf_size = 8192;
-unsigned offset = 0;
+static void *buffer = 0;
+static unsigned buf_size = 8192;
+static unsigned offset = 0;
void *tmpalloc(unsigned size)
{
Allocates a temporary memory region. The returned memory comes from a shared
pool and will get reused eventually.
*/
-extern void *tmpalloc(unsigned);
+void *tmpalloc(unsigned);
/**
Frees the shared pool used by tmpalloc. It will be recreated if tmpalloc is
called again.
*/
-extern void tmpfree();
+void tmpfree();
#endif