*/
#ifndef lint
static char *moduleid =
- "@(#)$Id: file.c,v 1.22 1992/09/08 15:36:41 ian Exp $";
+ "@(#)$Id: file.c,v 1.23 1992/09/08 22:32:35 ian Exp $";
#endif /* lint */
#include <stdio.h>
*/
ckfputs("data", stdout);
}
+
+void
+ckfputs(str, fil)
+ const char *str;
+ FILE *fil;
+{
+ if (fputs(str,fil) == EOF)
+ error("write failed.\n");
+}
/*
* file.h - definitions for file(1) program
- * @(#)$Id: file.h,v 1.10 1992/09/08 14:58:34 ian Exp $
+ * @(#)$Id: file.h,v 1.11 1992/09/08 22:33:06 ian Exp $
*
* Copyright (c) Ian F. Darwin, 1987.
* Written by Ian F. Darwin.
#define MAXMAGIS 1000 /* max entries in /etc/magic */
#define MAXDESC 50 /* max leng of text description */
#define MAXstring 32 /* max leng of "string" types */
-#define ckfputs(str,fil) if (fputs(str,fil)==EOF) \
- error("write failed.\n"); \
- else \
- str[0] = str[0]
struct magic {
short flag;
extern int apprentice __P((char *, int));
extern int ascmagic __P((unsigned char *, int));
extern void error __P((const char *, ...));
+extern void ckfputs __P((const char *, FILE *));
struct stat;
extern int fsmagic __P((const char *, struct stat *));
extern int is_compress __P((const unsigned char *, int *));