dsdm: Change to ANSI function definitions
[oweals/cde.git] / cde / programs / nsgmls / CodingSystem.C
index 6d230a6860289a8e9c4fece447ede2ce9d046a10..b299164398454b60b7540c28ac341b91ad727b6a 100644 (file)
@@ -16,7 +16,7 @@
  * details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with these librararies and programs; if not, write
+ * License along with these libraries and programs; if not, write
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
 #ifdef SP_SHORT_HEADERS
 #include <strstrea.h>
 #else
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
+#include <strstream>
+#else
 #include <strstream.h>
 #endif
+#endif
 #include <string.h>
 #include <sys/param.h>
 
@@ -78,7 +82,11 @@ String<char> OutputCodingSystem::convertOut(const StringC &str) const
   encoder->output(copy.data(), copy.size(), &stream);
   delete encoder;
   char *s = stream.str();
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
+  String<char> result(s, stream.pcount());
+#else
   String<char> result(s, stream.out_waiting());
+#endif
   result += '\0';
   stream.freeze(0);
 #ifdef __lucid