[wadalabfont-kit] / jis2prim / BitmapFontFile.h  

Diff of /jis2prim/BitmapFontFile.h

Parent Directory | Revision Log

version 1.1, Thu Feb 21 11:57:39 2002 UTC version 1.2, Tue Aug 6 06:30:43 2002 UTC
Line 4 
Line 4 
 #include <hash_map>  #include <hash_map>
 #include <fstream>  #include <fstream>
 #include <cstdlib>  #include <cstdlib>
   #include <iostream>
   
 #include "BitmapFont.h"  #include "BitmapFont.h"
 class BitmapFontFile{  class BitmapFontFile{
  private:   private:
   hash_map<int,BitmapFont> fonts;    std::hash_map<int,BitmapFont> fonts;
  public:   public:
   BitmapFontFile(const string& filename){    BitmapFontFile(const std::string& filename){
     ifstream from(filename.c_str());      std::ifstream from(filename.c_str());
     if(!from) {      if(!from) {
       cerr << "Cannot open input file " << filename << '\n';        std::cerr << "Cannot open input file " << filename << '\n';
       abort();        abort();
     }      }
     long code;      long code;
     string hexdata;      std::string hexdata;
     while(!from.eof()){      while(!from.eof()){
       string line;        std::string line;
       getline(from,line);        getline(from,line);
       string::size_type pos=line.find(' ');        std::string::size_type pos=line.find(' ');
       string key;        std::string key;
       string rest;        std::string rest;
       if(pos!=string::npos){        if(pos!=std::string::npos){
         key=line.substr(0,pos);          key=line.substr(0,pos);
         rest=line.substr(pos+1);          rest=line.substr(pos+1);
       }        }


Generate output suitable for use with a patch program
Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

ktanaka

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help