-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlemacubun1.cc
70 lines (56 loc) · 1.69 KB
/
lemacubun1.cc
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
62
63
64
65
66
67
68
69
70
/*************************************************************************\
* Copyright (C) Jimmy Pulido, 2016. *
* *
* This program is free software. You may use, modify, and redistribute it *
* under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 or (at your option) *
* any later version. This program is distributed without any warranty. *
* See the files COPYING.lgpl-v3 and COPYING.gpl-v3 for details. *
\*************************************************************************/
/* lemacubun1.cc
*/
#include "libraries.h" //## local library
#include <iostream>
#include <string>
#include <stdio.h>
#include <queue>
#include <fstream>
#include <ctype.h>
using namespace std;
int main(int argc, char const *argv[]) {
ifstream input1(argv[1]);
ifstream input2(argv[2]);
string line;
string final;
while(getline(input1,line)){
line = sup(line);
getEnter(line);
{
if(globQ.back().first != "$"){
pair<string,string> p;
p.first = "$"; // space between word
cout<<"$"<<endl;
globQ.push(p);
}
}
//////////////////////////////////////////////////////
}
while(getline(input2,line)){
final = "";
if(line == "")
continue;
if(isupper(line[0]))
final.append("\n# ");
if(!globQ.empty() || !tmpQ.empty()){
final.append(match(line,0,""));
//final.append("\n");
cout<<final;
}
else{
final.append(line);
final.append("\n");
cout<<final;
}
}
return 0;
}