Mail Archives: djgpp/1998/08/05/09:00:40
Mary Ellen Howitt <mhowitt AT mail DOT pris DOT bc DOT ca> wrote in article
<199808050018 DOT RAA10223 AT mail DOT pris DOT bc DOT ca>...
> Hey.
> I'm working on a (loose) port of HTGET.C to DJGPP from Borland C++ 3.1.
> When I try to compile it I get two undefined references:
> undefined reference to 'MsecClock', CDGET.C, line 95
> undefined reference to 'vsscanf', SOCK_PRN.C(libtcp.a)
>
> Does anyone know if MsecClock has an equivalent in DJGPP or if vsscanf is
in
> some c file out on the 'net? It was put in SOCK_PRN.C of the LIBTCP
files.
>
MsecClock: I really do not know what this function does!
vsscanf(): It's not an ANSI C function. I do not know if it's somewhere on
the net. You can easy add your own version:
#include <stdio.h>
#include <stdarg.h>
#include <libc/file.h>
#include <libc/unconst.h>
int vsscanf(const char *str, const char *fmt, va_list ap)
{
int r; /* This code has been cloned from libc/sscanf.c
(DJ) */
FILE _strbuf;
_strbuf._flag = _IOREAD|_IOSTRG;
_strbuf._ptr = _strbuf._base = unconst(str, char *);
_strbuf._cnt = 0;
while (*str++)
_strbuf._cnt++;
_strbuf._bufsiz = _strbuf._cnt;
r = _doscan(&_strbuf, fmt, ap);
return r;
}
Remeber to add the prototype (it is not present in stdio.h).
- Raw text -