ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/FeepingCreaturism/Jargon.cpp
Revision: 265
Committed: 2004-10-27T01:50:34-07:00 (20 years, 7 months ago) by Douglas Thrift
File size: 777 byte(s)
Log Message:
No more pstreams, we have api::Process, fts functions weren't working so just
piped in find.

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 230 Jargon::Jargon(const ext::String& path, const ext::String& jargon, bool include,
11 Douglas Thrift 265 const ext::String& relative) : include(include), args(1, "jargon.xsl")
12 Douglas Thrift 196 {
13 Douglas Thrift 265 args.InsertLast(ios::String() << path << "/" << jargon);
14     args.InsertLast(ios::String() << "$jargon=" << jargon);
15 Douglas Thrift 225
16 Douglas Thrift 265 if (include) args.InsertLast("$include=true()");
17    
18 Douglas Thrift 225 if (!relative.IsEmpty())
19     {
20 Douglas Thrift 265 args.InsertLast(ios::String() << "$relative=" << relative);
21 Douglas Thrift 225 }
22 Douglas Thrift 227 }
23 Douglas Thrift 196
24 Douglas Thrift 227 ios::PrintWriter& operator<<(ios::PrintWriter& pout, const Jargon& jargon)
25     {
26 Douglas Thrift 265 _S<api::Process> xslt("/usr/local/bin/sabcmd", jargon.args);
27 Douglas Thrift 196
28 Douglas Thrift 265 if (jargon.include) ios::ReadLine(*xslt.GetReader());
29 Douglas Thrift 224
30 Douglas Thrift 265 ios::ReadToWrite(*xslt.GetReader(), pout);
31 Douglas Thrift 224
32 Douglas Thrift 227 return pout;
33 Douglas Thrift 196 }

Properties

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