Go Back   ZeroC Forums > Patches

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 04-26-2005
acbell acbell is offline
Registered User
 
Name: Andrew Bell
Organization: Iowa State University
Project: National Resources Inventory
 
Join Date: Jan 2005
Location: Ames, IA, USA
Posts: 89
Patch to handle spaces in filenames for slice compilers

Super simple fix for handling embedded spaces in filenames when invoking the slice compilers. You may have a better way of handling this, but this works for us If there are other functions that you pipe stuff to, they probably need to be fixed as well, but I didn't go looking for them.

Cheers,

-- Andrew Bell
andrew.bell.ia@gmail.com

Ice Version: 2.1.0
File :src/Slice/Preprocessor.cpp


--- Preprocessor.cpp Mon Mar 7 08:15:10 2005
+++ Preprocessor.cpp.save Tue Apr 26 13:59:05 2005
@@ -71,7 +71,7 @@
cmd += " -C";
}

- cmd += " " + _args + " " + _fileName;
+ cmd += " " + _args + " \"" + _fileName + "\"";

//
// Open a pipe for reading to redirect icecpp output to _cppHandle.
@@ -99,7 +99,7 @@
return;
}

- cmd += " -M " + _args + " " + _fileName;
+ cmd += " -M " + _args + " \"" + _fileName + "\"";

#ifdef _WIN32
FILE* cppHandle = _popen(cmd.c_str(), "r");";

Last edited by acbell : 04-26-2005 at 03:07 PM. Reason: Mention Version #
Reply With Quote
  #2 (permalink)  
Old 04-26-2005
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 889
Hi Andrew, thanks for the patch! I'll have a look at integrating this.

Cheers,

Michil.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Slice compilers unable to parse demo .ice files? asynchronos Help Center 14 07-17-2008 07:41 AM
Use spaces instead of tabs Edward Bishop Comments 5 01-24-2007 05:42 PM
Patch #8 for Ice 3.1.0: support for paths with spaces in -I option benoit Patches 2 01-05-2007 04:50 AM
How do YOU handle redundant generated slice code? ctennis Help Center 1 11-10-2006 03:02 PM
Pre-Build needs no spaces! Wayetender Bug Reports 6 08-17-2004 06:40 PM


All times are GMT -4. The time now is 03:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.