incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <Far...@kyiv.vdiweb.com>
Subject [PATCH] printf.cpp "%{As}"
Date Fri, 20 Oct 2006 14:39:33 GMT
  To implement the function rw_process_create(const char* path, char*
const argv[])
using the rw_process_create(const char* cmd, ...) I need to concatenate
the argv
array into solid string with using ' ' as delimiter. The "%{As}" format
uses ','
as delimiter.

  Below is a small patch to get ' ' as delimiter using the "%{ As}"
format:

------------------------
Index: C:/stdcxx/tests/src/printf.cpp
===================================================================
--- C:/stdcxx/tests/src/printf.cpp	(revision 465232)
+++ C:/stdcxx/tests/src/printf.cpp	(working copy)
@@ -2255,7 +2255,7 @@
 
         const unsigned pound = spec.fl_pound;
         spec.fl_pound = 0;
-        n = _rw_fmtstr (spec, buf, ",", 1);
+        n = _rw_fmtstr (spec, buf, spec.fl_space ? " " : ",", 1);
         spec.fl_pound = pound;
 
         if (n < 0)
------------------------

Farid.

Mime
View raw message