delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/05/09:00:40

From: "Alberto Chessa" <achessa AT fiar DOT finmeccanica DOT it>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: HTGET.C
Date: 5 Aug 1998 07:12:09 GMT
Organization: TIN
Lines: 43
Message-ID: <01bdc040$c8f3c220$92c809c0@chessa>
References: <199808050018 DOT RAA10223 AT mail DOT pris DOT bc DOT ca>
NNTP-Posting-Host: a-mi38-49.tin.it
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019