Logo Search packages:      
Sourcecode: inkscape version File versions

bool Pedro::XmppConfig::readFile ( const DOMString &  fileName  )  [virtual]

Parse a configuration file

Definition at line 145 of file pedroconfig.cpp.

References Pedro::XmppEventTarget::error(), and read().

{

    FILE *f = fopen(fileName.c_str(), "rb");
    if (!f)
        {
        error("Could not open configuration file '%s' for reading",
              fileName.c_str());
        return false;
        }

    DOMString buffer;
    while (!feof(f))
        {
        char ch = (char) fgetc(f);
        buffer.push_back(ch);
        }
    fclose(f);

    if (!read(buffer))
        return false;

    return true;
}


Generated by  Doxygen 1.6.0   Back to index