Merge branch 'altlinux-4.0'

This commit is contained in:
Дмитрий Левин 2008-04-08 15:32:44 +00:00
commit c56e3cf71d

View File

@ -80,15 +80,16 @@ int rpmReadPackageManifest(FD_t fd, int * argcPtr, const char *** argvPtr)
break;
}
/* Skip comments. */
if ((se = strchr(s, '#')) != NULL) *se = '\0';
/* Skip leading whitespaces. */
s += strspn(s, " \f\n\r\t\v");
/* Skip lines starting with # symbol. */
if (*s == '#') continue;
/* Trim trailing newline characters. */
se = s + strcspn(s, "\n\r");
*se = '\0';
/* Trim white space. */
se = s + strlen(s);
while (se > s && (se[-1] == '\n' || se[-1] == '\r'))
*(--se) = '\0';
while (*s && strchr(" \f\n\r\t\v", *s) != NULL)
s++;
if (*s == '\0') continue;
/* Insure that file contains only ASCII */