/* This file is part of dvi2bitmap; see README for copyrights and licence */ #include #include "Bitmap.h" #include "XBMBitmap.h" //#include // debug code writes to cerr #if HAVE_CSTD_INCLUDE # include # include # if CCTYPE_IN_STD using std::isalnum; # endif #else # include # include #endif XBMBitmap::XBMBitmap (const int w, const int h) : BitmapImage (w, h) { } XBMBitmap::~XBMBitmap () { } void XBMBitmap::write (const string filename) { FILE *op; if ((op = fopen (filename.c_str(), "w")) == NULL) throw BitmapError ("can't open XBM file"+filename+" to write"); size_t dotpos = filename.find_last_of('.'); size_t seppos = filename.find_last_of(FSPATH_SEP); if (seppos == string::npos) seppos = 0; if (dotpos == string::npos) dotpos = filename.length(); string fnroot_str = ""; for (unsigned int charno=(unsigned int)seppos; charno(1<(b)); fprintf (op, "\n"); } fprintf (op, "};\n"); fclose (op); }