zero out usec fields (from Rick Macklem)
[unix-history] / usr / src / sys / ufs / ffs / ffs_tables.c
index 73ca4c0..763f34d 100644 (file)
@@ -1,63 +1,30 @@
-/* Copyright (c) 1981 Regents of the University of California */
-
-/* @(#)ffs_tables.c 2.1 %G% */
-
-#include "../h/param.h"
-
-/*     partab.c        4.2     81/03/08        */
-
 /*
 /*
- * Table giving parity for characters and indicating
- * character classes to tty driver.  In particular,
- * if the low 6 bits are 0, then the character needs
- * no special processing on output.
+ * Copyright (c) 1982, 1986 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *     @(#)ffs_tables.c        7.3 (Berkeley) %G%
  */
 
  */
 
-unsigned char partab[] = {
-       0001,0201,0201,0001,0201,0001,0001,0201,
-       0202,0004,0003,0201,0005,0206,0201,0001,
-       0201,0001,0001,0201,0001,0201,0201,0001,
-       0001,0201,0201,0001,0201,0001,0001,0201,
-       0200,0000,0000,0200,0000,0200,0200,0000,
-       0000,0200,0200,0000,0200,0000,0000,0200,
-       0000,0200,0200,0000,0200,0000,0000,0200,
-       0200,0000,0000,0200,0000,0200,0200,0000,
-       0200,0000,0000,0200,0000,0200,0200,0000,
-       0000,0200,0200,0000,0200,0000,0000,0200,
-       0000,0200,0200,0000,0200,0000,0000,0200,
-       0200,0000,0000,0200,0000,0200,0200,0000,
-       0000,0200,0200,0000,0200,0000,0000,0200,
-       0200,0000,0000,0200,0000,0200,0200,0000,
-       0200,0000,0000,0200,0000,0200,0200,0000,
-       0000,0200,0200,0000,0200,0000,0000,0201,
-
-       /*
-        * 7 bit ascii ends with the last character above,
-        * but we contine through all 256 codes for the sake
-        * of the tty output routines which use special vax
-        * instructions which need a 256 character trt table.
-        */
-
-       0007,0007,0007,0007,0007,0007,0007,0007,
-       0007,0007,0007,0007,0007,0007,0007,0007,
-       0007,0007,0007,0007,0007,0007,0007,0007,
-       0007,0007,0007,0007,0007,0007,0007,0007,
-       0007,0007,0007,0007,0007,0007,0007,0007,
-       0007,0007,0007,0007,0007,0007,0007,0007,
-       0007,0007,0007,0007,0007,0007,0007,0007,
-       0007,0007,0007,0007,0007,0007,0007,0007,
-       0007,0007,0007,0007,0007,0007,0007,0007,
-       0007,0007,0007,0007,0007,0007,0007,0007,
-       0007,0007,0007,0007,0007,0007,0007,0007,
-       0007,0007,0007,0007,0007,0007,0007,0007,
-       0007,0007,0007,0007,0007,0007,0007,0007,
-       0007,0007,0007,0007,0007,0007,0007,0007,
-       0007,0007,0007,0007,0007,0007,0007,0007,
-       0007,0007,0007,0007,0007,0007,0007,0007
-};
+#ifdef KERNEL
+#include "param.h"
+#else
+#include <sys/param.h>
+#endif
 
 /*
 
 /*
- * bit patterns for identifying fragments in the block map
+ * Bit patterns for identifying fragments in the block map
  * used as ((map & around) == inside)
  */
 int around[9] = {
  * used as ((map & around) == inside)
  */
 int around[9] = {
@@ -68,7 +35,7 @@ int inside[9] = {
 };
 
 /*
 };
 
 /*
- * given a block map bit pattern, the frag tables tell whether a
+ * Given a block map bit pattern, the frag tables tell whether a
  * particular size fragment is available. 
  *
  * used as:
  * particular size fragment is available. 
  *
  * used as:
@@ -79,8 +46,7 @@ int inside[9] = {
  * These tables are used by the scanc instruction on the VAX to
  * quickly find an appropriate fragment.
  */
  * These tables are used by the scanc instruction on the VAX to
  * quickly find an appropriate fragment.
  */
-
-unsigned char fragtbl124[256] = {
+u_char fragtbl124[256] = {
        0x00, 0x16, 0x16, 0x2a, 0x16, 0x16, 0x26, 0x4e,
        0x16, 0x16, 0x16, 0x3e, 0x2a, 0x3e, 0x4e, 0x8a,
        0x16, 0x16, 0x16, 0x3e, 0x16, 0x16, 0x36, 0x5e,
        0x00, 0x16, 0x16, 0x2a, 0x16, 0x16, 0x26, 0x4e,
        0x16, 0x16, 0x16, 0x3e, 0x2a, 0x3e, 0x4e, 0x8a,
        0x16, 0x16, 0x16, 0x3e, 0x16, 0x16, 0x36, 0x5e,
@@ -115,7 +81,7 @@ unsigned char fragtbl124[256] = {
        0x9e, 0x9e, 0x9e, 0xbe, 0xaa, 0xbe, 0xce, 0x8a,
 };
 
        0x9e, 0x9e, 0x9e, 0xbe, 0xaa, 0xbe, 0xce, 0x8a,
 };
 
-unsigned char fragtbl8[256] = {
+u_char fragtbl8[256] = {
        0x00, 0x01, 0x01, 0x02, 0x01, 0x01, 0x02, 0x04,
        0x01, 0x01, 0x01, 0x03, 0x02, 0x03, 0x04, 0x08,
        0x01, 0x01, 0x01, 0x03, 0x01, 0x01, 0x03, 0x05,
        0x00, 0x01, 0x01, 0x02, 0x01, 0x01, 0x02, 0x04,
        0x01, 0x01, 0x01, 0x03, 0x02, 0x03, 0x04, 0x08,
        0x01, 0x01, 0x01, 0x03, 0x01, 0x01, 0x03, 0x05,
@@ -151,8 +117,8 @@ unsigned char fragtbl8[256] = {
 };
 
 /*
 };
 
 /*
- * the actual fragtbl array
+ * The actual fragtbl array.
  */
  */
-unsigned char *fragtbl[MAXFRAG + 1] = {
+u_char *fragtbl[MAXFRAG + 1] = {
        0, fragtbl124, fragtbl124, 0, fragtbl124, 0, 0, 0, fragtbl8,
 };
        0, fragtbl124, fragtbl124, 0, fragtbl124, 0, 0, 0, fragtbl8,
 };