You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by wh...@apache.org on 2004/10/14 17:46:05 UTC

cvs commit: ws-axis/c/src/common AxisTrace.cpp

whitlock    2004/10/14 08:46:05

  Modified:    c/src/common AxisTrace.cpp
  Log:
  Make the engine pure C++. Replace malloc/free/strdup with new/delete.
  
  Revision  Changes    Path
  1.32      +4 -20     ws-axis/c/src/common/AxisTrace.cpp
  
  Index: AxisTrace.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/AxisTrace.cpp,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- AxisTrace.cpp	12 Oct 2004 15:20:22 -0000	1.31
  +++ AxisTrace.cpp	14 Oct 2004 15:46:05 -0000	1.32
  @@ -203,26 +203,18 @@
       char* arg3, int arg4)
   {
       int iResult = logthis(sLog1, level, arg3, arg4);
  -    char* convToInt = (char*) malloc(4 * sizeof(char));
  +    char convToInt[5];
       if(AXIS_SUCCESS == iResult)
       {
  -	sprintf(convToInt, "%d", nLog2);
  -        /*fputs (convToLong, m_fileTrace);
  -        fputs ("\n", m_fileTrace);
  -        fputs ("-------------------------------------------------", m_fileTrace);
  -        fputs ("\n", m_fileTrace);
  -
  -        fflush (m_fileTrace);*/
  +        sprintf(convToInt, "%d", nLog2);
           m_fileTrace.filePuts (convToInt);
           m_fileTrace.filePuts ("\n");
           m_fileTrace.filePuts ("-------------------------------------------------");
           m_fileTrace.filePuts ("\n");
  -
           m_fileTrace.fileFlush ();
   
           return AXIS_SUCCESS;
       }
  -    free(convToInt);
       return AXIS_FAIL;
   }
   
  @@ -230,26 +222,18 @@
       char* arg3, int arg4)
   {
       int iResult = logthis(sLog1, level, arg3, arg4);
  -    char* convToDouble = (char*) malloc(4 * sizeof(char));
  +    char convToDouble[5];
       if(AXIS_SUCCESS == iResult)
       {
  -	sprintf(convToDouble, "%f", dLog2);
  -        /*fputs (convToDouble, m_fileTrace);
  -        fputs ("\n", m_fileTrace);
  -        fputs ("-------------------------------------------------", m_fileTrace);
  -        fputs ("\n", m_fileTrace);
  -
  -        fflush (m_fileTrace);*/
  +        sprintf(convToDouble, "%f", dLog2);
           m_fileTrace.filePuts (convToDouble);
           m_fileTrace.filePuts ("\n");
           m_fileTrace.filePuts ("-------------------------------------------------");
           m_fileTrace.filePuts ("\n");
  -
           m_fileTrace.fileFlush ();
   
           return AXIS_SUCCESS;
       }
  -    free(convToDouble);
       return AXIS_FAIL;
   }