Exemplo n.º 1
0
/* change the filename extension. */
void forceExtension( struct pgpfileBones *filebPtr, char *filename,
        char *extension )
{
    dropExtension( filebPtr, filename ); /* out with the old */
    truncateName( filebPtr, filename, strlen(extension) );
    strcat(filename, extension); /* in with the new */
} /* force_extension */
Exemplo n.º 2
0
MString getFullNameFromIdentifier(std::string in_Identifier)
{
   if(in_Identifier.length() == 0)
      return MString();
   MString mapped = nameMapGet(in_Identifier.c_str());
   if(mapped.length() != 0)
      return mapped;
   MStringArray parts;
   MString(in_Identifier.c_str()).split('/',parts);
   MString lastPart = parts[parts.length()-1];
   if(lastPart.substring(lastPart.length()-3,lastPart.length()-1).toLowerCase() == "xfo")
      return truncateName(lastPart);
   MString trail = removeTrailFromName(lastPart);
   return lastPart+"Shape"+trail;
}