2 * Copyright (c) 1999 Olaf Flebbe o.flebbe@gmx.de
4 * You may distribute under the terms of either the GNU General Public
5 * License or the Artistic License, as specified in the README file.
9 /* This is C++ Code !! */
20 epoc_spawn( char *cmd, char *cmdline) {
22 TRequestStatus status;
25 rc = p.Create( _L( cmd), _L( cmdline));
33 User::WaitForRequest( status);
35 if (status!=KErrNone) {
42 epoc_spawn( char *cmd, char *cmdline) {
43 int len = strlen(cmd) + strlen(cmdline) + 4;
44 char *n = (char *) malloc( len);
55 /* Workaround for defect strtoul(). Values with leading + are zero */
57 unsigned long int epoc_strtoul(const char *nptr, char **endptr,
59 if (nptr && *nptr == '+')
61 return strtoul( nptr, endptr, base);
64 /* Workaround for defect atof(), see java defect list for epoc */
65 double epoc_atof( char* str) {
68 while (TChar( *str).IsSpace()) {
73 TInt err = lex.Val( aRes, TChar( '.'));
77 void epoc_gcvt( double x, int digits, unsigned char *buf) {
80 trel.iPlaces = digits;
81 trel.iPoint = TChar( '.');
83 TPtr result( buf, 80);
86 result.Append( TChar( 0));
91 void epoc_spawn_posix_server() {
92 SpawnPosixServerThread();