comparison src/opaque.c @ 2286:04bc9d2f42c7

[xemacs-hg @ 2004-09-20 19:18:55 by james] Mark all unused parameters as unused. Also eliminate some unneeded local variables.
author james
date Mon, 20 Sep 2004 19:20:08 +0000
parents e0ca0b9b1a35
children de9952d2ed18
comparison
equal deleted inserted replaced
2285:914c5afaac33 2286:04bc9d2f42c7
40 40
41 Lisp_Object Vopaque_ptr_free_list; 41 Lisp_Object Vopaque_ptr_free_list;
42 42
43 /* Should never, ever be called. (except by an external debugger) */ 43 /* Should never, ever be called. (except by an external debugger) */
44 static void 44 static void
45 print_opaque (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) 45 print_opaque (Lisp_Object obj, Lisp_Object printcharfun,
46 int UNUSED (escapeflag))
46 { 47 {
47 const Lisp_Opaque *p = XOPAQUE (obj); 48 const Lisp_Opaque *p = XOPAQUE (obj);
48 49
49 write_fmt_string 50 write_fmt_string
50 (printcharfun, 51 (printcharfun,
88 } 89 }
89 90
90 /* This will not work correctly for opaques with subobjects! */ 91 /* This will not work correctly for opaques with subobjects! */
91 92
92 static int 93 static int
93 equal_opaque (Lisp_Object obj1, Lisp_Object obj2, int depth) 94 equal_opaque (Lisp_Object obj1, Lisp_Object obj2, int UNUSED (depth))
94 { 95 {
95 Bytecount size; 96 Bytecount size;
96 return ((size = XOPAQUE_SIZE (obj1)) == XOPAQUE_SIZE (obj2) && 97 return ((size = XOPAQUE_SIZE (obj1)) == XOPAQUE_SIZE (obj2) &&
97 !memcmp (XOPAQUE_DATA (obj1), XOPAQUE_DATA (obj2), size)); 98 !memcmp (XOPAQUE_DATA (obj1), XOPAQUE_DATA (obj2), size));
98 } 99 }
99 100
100 /* This will not work correctly for opaques with subobjects! */ 101 /* This will not work correctly for opaques with subobjects! */
101 102
102 static unsigned long 103 static unsigned long
103 hash_opaque (Lisp_Object obj, int depth) 104 hash_opaque (Lisp_Object obj, int UNUSED (depth))
104 { 105 {
105 if (XOPAQUE_SIZE (obj) == sizeof (unsigned long)) 106 if (XOPAQUE_SIZE (obj) == sizeof (unsigned long))
106 return *((unsigned long *) XOPAQUE_DATA (obj)); 107 return *((unsigned long *) XOPAQUE_DATA (obj));
107 else 108 else
108 return memory_hash (XOPAQUE_DATA (obj), XOPAQUE_SIZE (obj)); 109 return memory_hash (XOPAQUE_DATA (obj), XOPAQUE_SIZE (obj));
121 122
122 /* stuff to handle opaque pointers */ 123 /* stuff to handle opaque pointers */
123 124
124 /* Should never, ever be called. (except by an external debugger) */ 125 /* Should never, ever be called. (except by an external debugger) */
125 static void 126 static void
126 print_opaque_ptr (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) 127 print_opaque_ptr (Lisp_Object obj, Lisp_Object printcharfun,
128 int UNUSED (escapeflag))
127 { 129 {
128 const Lisp_Opaque_Ptr *p = XOPAQUE_PTR (obj); 130 const Lisp_Opaque_Ptr *p = XOPAQUE_PTR (obj);
129 131
130 write_fmt_string 132 write_fmt_string
131 (printcharfun, 133 (printcharfun,
132 "#<INTERNAL OBJECT (XEmacs bug?) (opaque-ptr, adr=0x%lx) 0x%lx>", 134 "#<INTERNAL OBJECT (XEmacs bug?) (opaque-ptr, adr=0x%lx) 0x%lx>",
133 (long)(p->ptr), (unsigned long) p); 135 (long)(p->ptr), (unsigned long) p);
134 } 136 }
135 137
136 static int 138 static int
137 equal_opaque_ptr (Lisp_Object obj1, Lisp_Object obj2, int depth) 139 equal_opaque_ptr (Lisp_Object obj1, Lisp_Object obj2, int UNUSED (depth))
138 { 140 {
139 return (XOPAQUE_PTR (obj1)->ptr == XOPAQUE_PTR (obj2)->ptr); 141 return (XOPAQUE_PTR (obj1)->ptr == XOPAQUE_PTR (obj2)->ptr);
140 } 142 }
141 143
142 static unsigned long 144 static unsigned long
143 hash_opaque_ptr (Lisp_Object obj, int depth) 145 hash_opaque_ptr (Lisp_Object obj, int UNUSED (depth))
144 { 146 {
145 return (unsigned long) XOPAQUE_PTR (obj)->ptr; 147 return (unsigned long) XOPAQUE_PTR (obj)->ptr;
146 } 148 }
147 149
148 static const struct memory_description opaque_ptr_description[] = { 150 static const struct memory_description opaque_ptr_description[] = {