summaryrefslogtreecommitdiff
path: root/misc/fep/patches/patch-ad
blob: 9c4e06284ec2a887efc3ed5ec5a6b563b0d5fcdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
$NetBSD: patch-ad,v 1.6 2006/01/03 18:16:10 joerg Exp $

--- fep_defs.h.orig	1993-05-10 01:23:33.000000000 -0400
+++ fep_defs.h	2005-12-10 16:59:27.000000000 -0500
@@ -6,6 +6,6 @@
-#endif lint
+#endif /* lint */
 
-#define	MAXCOMLEN		512	/* maximum command length */
+#define	MAXCMDLEN		512	/* maximum command length */
 #define MAXARGS			64	/* maximum number of arguments */
 #define ON			1	/* on switch */
 #define OFF			0	/* off switch */
@@ -31,21 +31,21 @@
 # define isctlchar(c)	(c && !iskanji(c) && (!(c&0140) || c=='\177'))
 # define iswordchar(c)	(c && (iskanji(c) || isalnum(c) || iscntrl(c)))
 # define isWordchar(c)	((c) && !isspace((c)))
-#else KANJI
+#else /* KANJI */
 # define isctlchar(c)	(c && (!(c&0140) || c=='\177'))
 # define iswordchar(c)	(isalnum(c) || iscntrl(c))
 # define isWordchar(c)	((c) && !isspace((c)))
-#endif KANJI
+#endif /* KANJI */
 #define unctl(c)	(((c)=='\177') ? '?' : ((c) >= 040) ? (c) : (c)|0100)
 #define toctrl(c)	((c)&~0100)
 #define ctrl(c)		((c)&037)
 
-#define	INDIRECTED	(1<<(sizeof(char*)*8-1))
+#define	INDIRECTED	(((intptr_t)1)<<(sizeof(char*)*8-1))
 			/* this is actually 0x80000000 on 32 bit machine,
 			that addresses kernel address space */
-#define isIndirect(f)	((u_int)(f)&(u_int)INDIRECTED)
-#define setIndirect(f)	(FUNC)((u_int)(f)|(u_int)INDIRECTED)
-#define	maskIndirect(f)	(FUNC *)((u_int)(f)&~(u_int)INDIRECTED)
+#define isIndirect(f)	((intptr_t)(f)&(intptr_t)INDIRECTED)
+#define setIndirect(f)	(FUNC)((intptr_t)(f)|(intptr_t)INDIRECTED)
+#define	maskIndirect(f)	(FUNC *)((intptr_t)(f)&~(intptr_t)INDIRECTED)
 
 /*
  * Type of character
@@ -53,17 +53,17 @@
 #ifdef KANJI
 # define CHAR		unsigned char
 # define CHARMASK	0377
-#else KANJI
+#else /* KANJI */
 # define CHAR		char
 # define CHARMASK	0177
-#endif KANJI
+#endif /* KANJI */
 
 /*
  * Only one machine I know alloca() works is vax.
  */
 #ifdef vax
 # define ALLOCA
-#endif vax
+#endif /* vax */
 
 /*
  * Typedef's