"$KTH: bits.c,v 1.4 1998/03/28 09:24:30 lha Exp $");
"$KTH: bits.c,v 1.6 1998/12/20 15:55:29 assar Exp $");
int main(int argc, char **argv){    FILE *f;    int flag;    char *fn, *hb;        if(argc < 2){	fn = "bits.h";	hb = "__BITS_H__";	f = stdout;    } else {	char *p;	fn = argv[1];	hb = malloc(strlen(fn) + 5);	sprintf(hb, "__%s__", fn);	for(p = hb; *p; p++){	    if(!isalnum((int)*p))		*p = '_';	}	f = fopen(argv[1], "w");    }    fprintf(f, "/* %s -- this file was generated for %s by\n", fn, HOST);    fprintf(f, "   %*s    %s */\n\n", strlen(fn), "", 	    "$KTH: bits.c,v 1.4 1998/03/28 09:24:30 lha Exp $");    fprintf(f, "#ifndef %s\n", hb);    fprintf(f, "#define %s\n", hb);    fprintf(f, "\n");#ifdef HAVE_SYS_TYPES_H    fprintf(f, "#include <sys/types.h>\n");#endif#ifdef HAVE_INTTYPES_H    fprintf(f, "#include <inttypes.h>\n");#endif#ifdef HAVE_SYS_BITYPES_H    fprintf(f, "#include <sys/bitypes.h>\n");#endif#ifdef HAVE_NETINET_IN6_MACHTYPES_H    fprintf(f, "#include <netinet/in6_machtypes.h>\n");#endif#ifdef HAVE_KTYPES_H    fprintf(f, "#include <ktypes.h>\n");#endif    fprintf(f, "\n");    flag = 0;#ifndef HAVE_INT8_T    flag = print_bt(f, flag);    try_signed (f, 8);#endif /* HAVE_INT8_T */#ifndef HAVE_INT16_T    flag = print_bt(f, flag);    try_signed (f, 16);#endif /* HAVE_INT16_T */#ifndef HAVE_INT32_T    flag = print_bt(f, flag);    try_signed (f, 32);#endif /* HAVE_INT32_T */#if 0#ifndef HAVE_INT64_T    flag = print_bt(f, flag);    try_signed (f, 64);#endif /* HAVE_INT64_T */#endif#ifndef HAVE_U_INT8_T    flag = print_bt(f, flag);    try_unsigned (f, 8);#endif /* HAVE_INT8_T */#ifndef HAVE_U_INT16_T    flag = print_bt(f, flag);    try_unsigned (f, 16);#endif /* HAVE_U_INT16_T */#ifndef HAVE_U_INT32_T    flag = print_bt(f, flag);    try_unsigned (f, 32);#endif /* HAVE_U_INT32_T */#if 0#ifndef HAVE_U_INT64_T    flag = print_bt(f, flag);    try_unsigned (f, 64);#endif /* HAVE_U_INT64_T */#endif    if(flag){	fprintf(f, "\n");	fprintf(f, "#endif /* __BIT_TYPES_DEFINED__ */\n\n");    }    fprintf(f, "#endif /* %s */\n", hb);    return 0;}