Ignore:
Timestamp:
May 19, 2001, 3:47:20 PM (24 years ago)
Author:
umoeller
Message:

New folder sorting. Updated folder refresh. Misc other changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/stringh.c

    r56 r69  
    11151115 *@@ strhBeautifyTitle:
    11161116 *      replaces all line breaks (0xd, 0xa) with spaces.
     1117 *
     1118 *@@changed V0.9.12 (2001-05-17) [pr]: multiple line break chars. end up as only 1 space
    11171119 */
    11181120
     
    11201122{
    11211123    BOOL rc = FALSE;
    1122     CHAR *p;
    1123     while ((p = strchr(psz, 0xa)))
    1124     {
    1125         *p = ' ';
    1126         rc = TRUE;
    1127     }
    1128     while ((p = strchr(psz, 0xd)))
    1129     {
    1130         *p = ' ';
    1131         rc = TRUE;
    1132     }
     1124    CHAR *p = psz;
     1125
     1126    while(*p)
     1127        if (   (*p == '\r')
     1128            || (*p == '\n')
     1129           )
     1130        {
     1131            rc = TRUE;
     1132            if (   (p != psz)
     1133                && (p[-1] == ' ')
     1134               )
     1135                memmove(p, p + 1, strlen(p));
     1136            else
     1137                *p++ = ' ';
     1138        }
     1139        else
     1140            p++;
     1141
    11331142    return (rc);
    11341143}
Note: See TracChangeset for help on using the changeset viewer.