Add return code to handleComments()

This commit is contained in:
Panu Matilainen 2014-02-18 12:38:41 +02:00
parent 1197c9d3eb
commit 2bcdeae52e
2 changed files with 7 additions and 3 deletions

View File

@ -102,11 +102,14 @@ static int matchTok(const char *token, const char *line)
return rc;
}
void handleComments(char *s)
int handleComments(char *s)
{
SKIPSPACE(s);
if (*s == '#')
if (*s == '#') {
*s = '\0';
return 1;
}
return 0;
}
/* Push a file to spec's file stack, return the newly pushed entry */

View File

@ -12,9 +12,10 @@ extern "C" {
/** \ingroup rpmbuild
* Truncate comment lines.
* @param s skip white space, truncate line at '#'
* @return 1 on comment lines, 0 otherwise
*/
RPM_GNUC_INTERNAL
void handleComments(char * s);
int handleComments(char * s);
/** \ingroup rpmstring
*/