summaryrefslogtreecommitdiff
path: root/misc/fep/patches/patch-ak
blob: 3fcdfed72dbd210f07978711a30e1c652cca7368 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
$NetBSD: patch-ak,v 1.3 2003/11/11 10:42:32 wiz Exp $

--- fep_set.c.orig	Wed May 29 07:31:24 1991
+++ fep_set.c
@@ -67,10 +67,10 @@ VAR default_unset_vars [] = {
 #ifdef HASH
 #define HASHNUM	10
 VAR *var_htab[HASHNUM];
-#else HASH
+#else /* HASH */
 VAR var_top = {"top", "top", (char *)0, (VAR *)0};
 VAR *var_list = &var_top;
-#endif HASH
+#endif /* HASH */
 
 /*
  * Functions
@@ -251,12 +251,12 @@ show_varlist ()
 	for (; vp != (VAR *)0; vp = vp->v_next)
 	    printf ("%-16s %s\n", vp->v_name, vp->v_value);
     }
-#else HASH
+#else /* HASH */
     register VAR *vp;
 
     for (vp = var_list->v_next; vp; vp = vp->v_next)
 	printf ("%-16s %s\n", vp->v_name, vp->v_value);
-#endif HASH
+#endif /* HASH */
 }
 
 #ifdef HASH
@@ -273,7 +273,7 @@ static getindex (s)
 
     return (sum % HASHNUM);
 }
-#endif HASH
+#endif /* HASH */
 
 /*
  * Get pointer to VAR.
@@ -288,7 +288,7 @@ getvp (name, alloc, lastvp)
 {
 #ifdef HASH
     register i = getindex (name);
-#endif HASH
+#endif /* HASH */
     VAR *vp, *last = (VAR *)0;
 
 #ifdef HASH
@@ -296,7 +296,7 @@ getvp (name, alloc, lastvp)
 	if (strcmp (name, vp->v_value) == 0)
 	    return (vp);
     }
-#else HASH
+#else /* HASH */
     for (vp = var_list->v_next, last = var_list; vp; last = vp, vp = vp->v_next) {
 	int r;
 
@@ -309,7 +309,7 @@ getvp (name, alloc, lastvp)
 	else if (r < 0)
 	    break;
     }
-#endif HASH
+#endif /* HASH */
 
     if (alloc == 0)
 	return (0);
@@ -327,9 +327,9 @@ getvp (name, alloc, lastvp)
     else {
 	var_htab[i] = vp;
     }
-#else HASH
+#else /* HASH */
     vp->v_next = last->v_next;
     last->v_next = vp;
-#endif HASH
+#endif /* HASH */
     return (vp);
 }