Logo Search packages:      
Sourcecode: pan version File versions  Download package

char * pan::file::normalize_inplace ( char *  filename  ) 

Removes extra '/' characters from the specified filename

Parameters:
filename 
Returns:
the filename pointer.

Definition at line 196 of file file-util.cc.

Referenced by get_unique_fname().

{
  register char *in, *out;
  pan_return_val_if_fail (filename && *filename, filename);

  for (in=out=filename; *in; )
    if (in[0]==G_DIR_SEPARATOR && in[1]==G_DIR_SEPARATOR)
      ++in;
    else
      *out++ = *in++;
  *out = '\0';

  return filename;
}


Generated by  Doxygen 1.6.0   Back to index