ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/FeepingCreaturism/Jargon.cpp
Revision: 225
Committed: 2004-09-06T04:03:48-07:00 (20 years, 9 months ago) by Douglas Thrift
File size: 779 byte(s)
Log Message:
Even better!

File Contents

# User Rev Content
1 Douglas Thrift 196 // Feeping Creaturism
2     //
3     // Douglas Thrift
4     //
5     // $Id$
6    
7     #include "Jargon.hpp"
8 Douglas Thrift 224 #include "Matcher.hpp"
9 Douglas Thrift 196
10 Douglas Thrift 225 Jargon::Jargon(const ext::String& path, bool include, const ext::String& relative)
11 Douglas Thrift 196 {
12 Douglas Thrift 201 std::vector<std::string> args(1, FeepingCreaturism::program);
13 Douglas Thrift 196
14 Douglas Thrift 223 args.push_back("-p");
15     args.push_back("include");
16     args.push_back(lexical_cast<ext::String>(include) + "()");
17 Douglas Thrift 225
18     if (!relative.IsEmpty())
19     {
20     args.push_back("-p");
21     args.push_back("relative");
22     args.push_back("\"" + relative + "\"");
23     }
24    
25 Douglas Thrift 196 args.push_back(path);
26 Douglas Thrift 201 args.push_back("jargon.xsl");
27 Douglas Thrift 196
28 Douglas Thrift 223 redi::ipstream pin("/usr/local/bin/Xalan", args);
29 Douglas Thrift 196
30 Douglas Thrift 224 if (include)
31     {
32     std::string ignore;
33    
34     std::getline(pin, ignore);
35     }
36    
37 Douglas Thrift 223 do
38 Douglas Thrift 208 {
39 Douglas Thrift 223 std::string line;
40 Douglas Thrift 208
41 Douglas Thrift 223 std::getline(pin, line);
42 Douglas Thrift 208
43 Douglas Thrift 223 buffer << line << '\n';
44 Douglas Thrift 203 }
45 Douglas Thrift 223 while (pin.good());
46 Douglas Thrift 196 }

Properties

Name Value
svn:eol-style native
svn:keywords Id