tmp = globalStream.ToNewCString();
tmp = ToNewCString(globalStream);
static NS_METHOD streamParse (nsIInputStream* in,                              void* closure,                              const char* fromRawSegment,                              PRUint32 toOffset,                              PRUint32 count,                              PRUint32 *writeCount) {  char parseBuf[2048], loc[2048], lineBuf[2048];  char *loc_t, *loc_t2;  int i = 0;  char *tmp;  if(globalStream.Length() > 0) {    globalStream.AppendWithConversion(fromRawSegment);    tmp = globalStream.ToNewCString();    //printf("\n>>NOW:\n^^^^^\n%s\n^^^^^^^^^^^^^^", tmp);  } else {    tmp = (char *)fromRawSegment;  }    while(i < (int)count) {    i = getStrLine(tmp, lineBuf, i, count);    if(i < 0) {      *writeCount = count;      return NS_OK;    }    parseBuf[0]='\0';    if((loc_t=PL_strcasestr(lineBuf, "img"))!= NULL        || (loc_t=PL_strcasestr(lineBuf, "script"))!=NULL) {      loc_t2=PL_strcasestr(loc_t, "src");      if(loc_t2!=NULL) {        loc_t2+=3;        strcpy(loc, loc_t2);        sscanf(loc, "=\"%[^\"]", parseBuf);        if(parseBuf[0]=='\0')          sscanf(loc, "=%s", parseBuf);                 if(parseBuf[0]!='\0'){          numFound++;          auxLoad(parseBuf);        }           }    }    /***NEED BETTER CHECK FOR STYLESHEETS    if((loc_t=PL_strcasestr(lineBuf, "link"))!= NULL) {        loc_t2=PL_strcasestr(loc_t, "href");      if(loc_t2!=NULL) {        loc_t2+=4;        strcpy(loc, loc_t2);        //printf("%s\n", loc);        sscanf(loc, "=\"%[^\"]", parseBuf);        if(parseBuf[0]!='\0'){          //printf("%s\n", parseBuf);          numFound++;          auxLoad(parseBuf);        }           }    }    */    if((loc_t=PL_strcasestr(lineBuf, "background"))!=NULL) {      loc_t+=10;      strcpy(loc, loc_t);      sscanf(loc, "=\"%[^\"]", parseBuf);      if(parseBuf[0]!='\0') {        numFound++;        auxLoad(parseBuf);      }    }    i++;      }  *writeCount = count;  return NS_OK;}