blob: e56515a2c3f30c41c6129658152a65b3e9cbb43f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#include "platform.h"
#include <string.h>
#include <math.h>
#include <iosfwd>
#include <iostream>
#include <ios>
#include <streambuf>
#include <istream>
#include <ostream>
#include <iomanip>
#include <sstream>
#include <cstdlib>
#include <fstream>
#include <zlib.h>
#include "svector.h"
using std::string;
#include "endian.h"
#include "files.h"
#include "enabler.h"
#include "textlines.h"
#include "basics.h"
extern char filecomp_buffer[20000];
extern char filecomp_buffer2[80000];
extern char filecomp_buffer_aux[20000];
extern char filecomp_buffer2_aux[80000];
void textlinesst::load_raw_to_lines(char *filename)
{
clean_lines();
//LOAD THE FILE
std::ifstream fseed(filename);
if(fseed.is_open())
{
string str;
while(std::getline(fseed,str))
{
long end=str.length();
while(end>0)
{
if(isspace(str[end-1]))end--;
else break;
}
str.resize(end);
if(str.length()>0)text.add_string(str);
}
}
fseed.close();
}
|