Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <007901c227cd$17a87490$2300a8c0@LAPTOP> From: "Robert Collins" To: Cc: "Randall R Schulz" , "Thomas Baker" Subject: Re: running mks toolkit and cygwin on same machine Date: Wed, 10 Jul 2002 14:48:52 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Why not just roll-your own 'rev'? Included is a trivial 'rev.cc' that will handle any size argument list that cygwin is able to pass it. It should include to support gcc 3.1, but for some reason it couldn't process templates when I included that. Sigh. Compile with g++ -o rev.exe rev.cc Rob ==== // Licenced under the GNU General Public Licence version 2.0 or greater, a copy of which can be obtained // from http://www.gnu.org // // Copyright (c) 2002 Robert Collins. #include #include #include template struct print : public unary_function { print(ostream& out) : os(out) {} void operator() (T x) { os << x << ' '; } ostream& os; }; int main (int argc, char **argv) { vector args; // assumes argv[0] is this process. This can be incorrect with some uses // of exec, but should be fine for shell scripts for (int n=1; n < argc; ++n) args.push_back (argv[n]); for_each (args.rbegin() ,args.rend (), print(cout)); } === -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/