示例#1
0
HTMLGenerator::HTMLGenerator(WordTree* inwords, string inout) {
  outdir = inout;
  if(outdir.find("/") == -1) outdir.append("/");
  words = inwords;
  ofstream outindex((outdir + "index.html").c_str());
  outindex << "<html><head><title>" << endl
	   << "Ged Crimsonclaw's page of Letters" << endl
	   << "</title></head><body>" << endl
	   << "Here Ged has compiled, for your enjoyment "
	   << "a list of the first letters of all the "
	   << "words you may wish to discover. <br>" << endl
	   << "Please enjoy browsing the various links "
	   << "found on these pages. <br><br>" << endl;
  Word* temp = words->pop();
  for(char i = 'a'; i <= 'z'; i++) {
    outindex << "<a href=" << i << ".html>" << (char)toupper(i)
	     << "</a><br>" << endl;
    ofstream outword((outdir + i + ".html").c_str());
    outword << "<html><head><title>" << endl
	    << "Ged Crimsonclaw's " << (char)toupper(i) << " page"
	    << endl << "</title></head><body>" << endl
	    << "Here Ged has compiled, for your enjoyment "
	    << "a list of all the words starting with the "
	    << "letter " << (char)toupper(i) << ".<br>" << endl
	    << "Please enjoy browsing the various " << endl
	    << "links found on these pages.<br><br>" <<endl;
    while(temp != 0 && temp->word[0] == i) {
      addWord(temp, outword);
      delete temp;
      temp = words->pop();
    }//while
    outword << "</body></html>" << endl;
  }//for
  outindex << "</body></html>" << endl;
}
示例#2
0
文件: dfww.c 项目: timburrow/ovj3
static int imagdisp(int local_color, int do_ww)
/****************/
{
    int erase;
    int vmin = 1;
    int vmax = mnumypnts - 3;
    getVLimit(&vmin, &vmax);

    erase = 0;
    fid_ybars(spectrum+(fpnt * 2)+1,(double) (vs * scale),dfpnt,dnpnt,npnt,
              dfpnt2 + (int)(dispcalib * (vpi + wc2/2.0)),spec_index,dotflag);
    if (do_ww)
        whitewash(outindex(spec_index),dfpnt,dnpnt);
    displayspec(dfpnt,dnpnt,0,&spec_index,&spec_index,&erase,vmax,vmin,local_color);
    return(COMPLETE);
}
示例#3
0
文件: dfww.c 项目: timburrow/ovj3
static int fiddisp(int local_color, int do_ww)
/****************/
{
    int erase;
    int vmin = 1;
    int vmax = mnumypnts - 3;
    getVLimit(&vmin, &vmax);

    if (debug1)
    {
        Wscrprintf("starting fid display\n");
        Wscrprintf("fpnt=%d, npnt=%d, mnumxpnts=%d, dispcalib=%g\n",
                   fpnt,npnt,mnumxpnts,dispcalib);
    }
    erase = 0;
    fid_ybars(spectrum+(fpnt * 2),(double) (vs * scale),dfpnt,dnpnt,npnt,
              dfpnt2 + (int)(dispcalib * (vp + wc2/2.0)),spec_index,dotflag);
    if (do_ww)
        whitewash(outindex(spec_index),dfpnt,dnpnt);
    displayspec(dfpnt,dnpnt,0,&spec_index,&spec_index,&erase,vmax,vmin,local_color);
    return(COMPLETE);
}