X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/d6b2ae5fa68b9a82ffc006c233aef64c5cdb3bd2..6d986a2aeb2600ae7e576975a2f80f01d6d5dbf4:/h/utils.h?ds=sidebyside diff --git a/h/utils.h b/h/utils.h index cd696784..9e515989 100644 --- a/h/utils.h +++ b/h/utils.h @@ -57,3 +57,25 @@ char *nmh_strcasestr (const char *, const char *); * Returns 1 if the string contains an 8-bit character, 0 if it does not. */ int contains8bit(const char *start, const char *end); + +/* + * See if file has any 8-bit bytes. + * Arguments include: + * + * fd - file descriptor + * eightbit - address of result, will be set to 1 if the file contains + * any 8-bit bytes, 0 otherwise. + * + * Returns OK on success, NOTOK on read failure. + * + */ +int scan_input (int fd, int *eightbit); + + +/* + * Compares prior version of nmh with current version. Returns 1 + * if they compare the be the same, 0 if not. + * + * older - 0 for difference comparison, 1 for only if older + */ +int nmh_version_changed (int older);