fix ctrl macro for ANSI C
[unix-history] / usr / src / usr.bin / window / char.h
index 55a52cc..64f752f 100644 (file)
@@ -1,5 +1,11 @@
 /*
 /*
- * @(#)char.h  3.2 %G%
+ * @(#)char.h  3.4 %G%
+ */
+
+/*
+ * Copyright (c) 1983 Regents of the University of California,
+ * All rights reserved.  Redistribution permitted subject to
+ * the terms of the Berkeley Software License Agreement.
  */
 
 /*
  */
 
 /*
@@ -17,7 +23,7 @@
 
 char *_unctrl[];
 char _cmap[];
 
 char *_unctrl[];
 char _cmap[];
-#define ctrl(c)                ('c' & 0x1f)
+#define ctrl(c)                (c & 0x1f)
 #define unctrl(c)      (_unctrl[(unsigned char) (c)])
 #define _C             0x01
 #define _P             0x02
 #define unctrl(c)      (_unctrl[(unsigned char) (c)])
 #define _C             0x01
 #define _P             0x02