*/
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.
return 0;
}
+
+
+/*
+ * See if input has any 8-bit bytes.
+ */
+int
+scan_input (int fd, int *eightbit) {
+ int state;
+ char buf[BUFSIZ];
+
+ *eightbit = 0;
+ lseek (fd, (off_t) 0, SEEK_SET);
+
+ while ((state = read (fd, buf, sizeof buf)) > 0) {
+ if (contains8bit (buf, buf + state)) {
+ *eightbit = 1;
+ return OK;
+ }
+ }
+
+ return state == NOTOK ? NOTOK : OK;
+}
static void die (char *, char *, ...);
static void post (char *, int, int, int, char *, int, char *);
static void do_text (char *file, int fd);
-static int scan_input (int, int *);
static void do_an_address (struct mailname *, int);
static void do_addresses (int, int);
static int find_prefix (void);
}
-/*
- * See if input has any 8-bit bytes.
- */
-static int
-scan_input (int fd, int *eightbit) {
- int state;
- char buf[BUFSIZ];
-
- lseek (fd, (off_t) 0, SEEK_SET);
-
- while ((state = read (fd, buf, sizeof buf)) > 0) {
- if (contains8bit (buf, buf + state)) {
- *eightbit = 1;
- return OK;
- }
- }
-
- return state == NOTOK ? NOTOK : OK;
-}
-
-
/*
* SIGNAL HANDLING
*/