W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1996

Minor buf in 1B3a source

From: Dennis Gallagher <galron@seanet.com>
Date: Thu, 22 Aug 1996 20:33:01 -0700
Message-ID: <01BB9069.428F1620@galron.seanet.com>
To: "'WWW Library discussion group'" <www-lib@w3.org>
I'm building the 1B3a libwww on NT 4.0 beta 2 using VC++ 4.2 and I've found that the HTWWWStr.c module has an apparent typo in it.

The line in question is marked, below.   The 'ap++; should be p++;, I believe. 

-----------------------------

PUBLIC char * HTLocalToWWW (const char * local)
{
    char * result = NULL;
    if (local && *local) {
	StrAllocCopy(result, "file:");	     /* We get an absolute file name */
#ifdef VMS 
	/* convert directory name to Unix-style syntax */
	{
	    char * disk = strchr (local, ':');
	    char * dir = strchr (local, '[');
	    if (disk) {
		*disk = '\0';
		StrAllocCat(result, "/"); /* needs delimiter */
		StrAllocCat(result, local);
	    }
	    if (dir) {
		char *p;
		*dir = '/';	/* Convert leading '[' */
		for (p = dir ; *p != ']'; ++p)
		    if (*p == '.') *p = '/';
		*p = '\0';	/* Cut on final ']' */
		StrAllocCat(result, dir);
	    }
	}
#else  /* not VMS */
#ifdef WIN32
	{
	    char * p = NULL;
	    StrAllocCopy(p, local);
	    /* StrAllocCat(result, "/");  */	/* extra slash removed */
	    while (*p) { 
		if (*p == '\\')		         /* change to one true slash */
		    *p = '/';
		ap++;                           <<<<< TYPO IS HERE>>>>>>
	    }	
	    StrAllocCat(result, p);
	    HT_FREE(p);
	}
#else /* not WIN32 */
	StrAllocCat (result, local);
#endif /* not WIN32 */
#endif /* not VMS */
    }
    return result;
}


Denis Gallagher
galron@seanet.com
Received on Thursday, 22 August 1996 23:34:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:26 GMT