CToken* theToken = (CEntityToken*)gTokenRecycler->CreateTokenOfType(eToken_entity,eHTMLTag_unknown,"nbsp"); if(theToken){ aContext.mStartNode.Init(theToken); int theIndex; for(theIndex=0;theIndex<aCount;theIndex++) result=aSink.AddLeaf(aContext.mStartNode); gTokenRecycler->RecycleToken(theToken); }
CEntityToken theToken("nbsp"); aContext.mStartNode.Init(&theToken); int theIndex; for(theIndex=0;theIndex<aCount;theIndex++) result=aSink.AddLeaf(aContext.mStartNode);
nsresult WriteNBSP(PRInt32 aCount, nsIContentSink& aSink,CSharedVSContext& aContext) {  nsresult result=NS_OK;  //if you're here, we already know gTokenRecyler is valid...  CToken* theToken = (CEntityToken*)gTokenRecycler->CreateTokenOfType(eToken_entity,eHTMLTag_unknown,"nbsp");  if(theToken){    aContext.mStartNode.Init(theToken);    int theIndex;    for(theIndex=0;theIndex<aCount;theIndex++)      result=aSink.AddLeaf(aContext.mStartNode);     gTokenRecycler->RecycleToken(theToken);  }  return NS_OK;}