Subversion Repositories wimsdev

Rev

Rev 5456 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5456 Rev 7076
Line 598... Line 598...
598
            goto partest;
598
            goto partest;
599
        }
599
        }
600
    }
600
    }
601
}
601
}
602
 
602
 
603
        /* change all spaces into ' ', and collapse multiple occurences */
603
/* change all spaces into ' ', and collapse multiple occurences */
604
void singlespace(char *p)
604
void singlespace(char *p)
605
{
605
{
606
    char *pp, *pt, *p2;
606
    char *pp, *pt, *p2;
607
    for(pp=pt=p;*pp;pp++) {
607
    for(pp=pt=p;*pp;pp++) {
608
        if(!myisspace(*pp)) {*pt++=*pp; continue; }
608
        if(!myisspace(*pp)) {*pt++=*pp; continue; }
609
        *pt++=' ';
609
        *pt++=' ';
610
        for(p2=pp+1;myisspace(*p2);p2++); pp=--p2;
610
        for(p2=pp+1;myisspace(*p2);p2++);
-
 
611
        pp=--p2;
611
    }
612
    }
612
    *pt=0;
613
    *pt=0;
613
}
614
}
614
 
615
 
615
        /* collapses all space characters in string. */
616
/* collapses all space characters in string. */
616
void nospace(char *p)
617
void nospace(char *p)
617
{
618
{
618
    char *pp, *pt;
619
    char *pp, *pt;
619
    for(pp=pt=p;*pp;pp++) if(!myisspace(*pp)) *pt++=*pp;
620
    for(pp=pt=p;*pp;pp++) if(!myisspace(*pp)) *pt++=*pp;
620
    *pt=0;
621
    *pt=0;