All pastes #72411 Raw Edit

Untitled

public text v1 · immutable
#72411 ·published 2006-06-26 20:38 UTC
rendered paste body
void
dtosslash (char *ms)
{
  int   count = 0;
  int   c2 = 0;
  char  *ps = ms;

  while ( ps[0] != 0 )
  {
    if ( ps[0] == '\\' )
    {
      if ( count++ == 0 )
      {
        c2++;
        ps++;
        continue;
      }

      count = 0;
    }

    ms++[0] = ps++[0];
  }

  if ( c2 != 0 )
  {
    ms[0] = '\0';
  }
}