@@ -1,3 +1,8 @@
+2008-03-20 Ian Jackson <ian@davenant.greenend.org.uk>
+
+ * lib/dpkg.h (cisspace): New prototype.
+ * lib/utils.c (cisspace): New function definition.
2008-03-20 Ian Jackson <ian@davenant.greenend.org.uk>
* src/main.h (pkgadminfile): Move prototype to ...
@@ -362,6 +362,7 @@ extern volatile int onerr_abort;
int cisdigit(int c);
int cisalpha(int c);
+int cisspace(int c);
int fgets_checked(char *buf, size_t bufsz, FILE *f, const char *fn);
int fgets_must(char *buf, size_t bufsz, FILE *f, const char *fn);
@@ -34,6 +34,12 @@ int cisalpha(int c) {
return ((c>='a') && (c<='z')) || ((c>='A') && (c<='Z'));
}
+int
+cisspace(int c)
+{
+ return (c == '\n' || c == '\t' || c == ' ');
+}
int
fgets_checked(char *buf, size_t bufsz, FILE *f, const char *fn)
{