summaryrefslogtreecommitdiff
path: root/src/file.cpp
blob: cbe9222921f4f0aeb824cdeef2d8adc8ccb83707 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "file.hpp"

#include <string.h>


/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Texo File Exporter
 */
TexoFile::TexoFile(FILE *file): file(file)
{}


bool TexoFile::Put(char c)
{
    fputc(c, file);
    return !ferror(file);
}

bool TexoFile::Put(const char *str)
{
    fwrite(str, 1, strlen(str), file);
    return !ferror(file);
}