/*
        Module Wimp Utils
*/

#include "Bool.h"
#include <string.h>

/* Gives the path to the given pathname.
   For example, path('adfs::4.$.Toto.Tutu.Tata')='adfs::4.$.Toto.Tutu'
   WARNING: Modifies the supplied string.
   Returns TRUE if there was no '.' char in the given string,
   else returns FALSE (if all goes well).
*/
int path(char *Name) {
 int Long,Ptr;
 
   Long = strlen(Name); Ptr = 0;
   while (Name[Long - Ptr] != '.') {
      Ptr++; if (Ptr>Long) return(TRUE); 
   }
   Name[Long-Ptr]='\0';
   return (FALSE);
}
