CoProcessing/Adaptors/FortranAdaptors/FortranAdaptorAPI.cxx
bool ConvertFortranStringToCString(char* fortranString, int fortranStringLength,
                                   char* cString, int cStringMaxLength)
{
  if(fortranStringLength >= cStringMaxLength)
    {
    return false;
    }

  for(int i=0;i<fortranStringLength;i++)
    {
    cString[i] = fortranString[i];
    }
  cString[fortranStringLength] = '\0';
  return true;
}
// returns true if successful, false otherwise (e.g. if
// CStringMaxLength <= FortranStringLength)
returns true if successful, false otherwise
returns true if successful false otherwise
bool ConvertFortranStringToCString(char* fortranString, int fortranStringLength,
                                   char* cString, int cStringMaxLength)
{
  if(fortranStringLength >= cStringMaxLength)
    {
    return false;
    }
  for(int i=0;i<fortranStringLength;i++)
    {
    cString[i] = fortranString[i];
    }
  cString[fortranStringLength] = '\0';
  return true;
}
bool ConvertFortranStringToCString ( char * fortranString , int fortranStringLength , char * cString , int cStringMaxLength ) { if ( fortranStringLength >= cStringMaxLength ) { return false ; } for ( int i = 0 ; i < fortranStringLength ; i ++ ) { cString [ i ] = fortranString [ i ] ; } cString [ fortranStringLength ] = ' \0 ' ; return true ; }
returns true if successful, false otherwise (e.g.
returns true if successful false otherwise ( e . g .