Mercurial > hg > xemacs-beta
comparison src/debug.c @ 20:859a2309aef8 r19-15b93
Import from CVS: tag r19-15b93
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:50:05 +0200 |
parents | 376386a54a3c |
children | 3d6bfa290dbd |
comparison
equal
deleted
inserted
replaced
19:ac1f612d5250 | 20:859a2309aef8 |
---|---|
92 | 92 |
93 return retval; | 93 return retval; |
94 #undef FROB | 94 #undef FROB |
95 } | 95 } |
96 | 96 |
97 DEFUN ("add-debug-class-to-check", Fadd_debug_class_to_check, | 97 DEFUN ("add-debug-class-to-check", Fadd_debug_class_to_check, 1, 1, 0, /* |
98 Sadd_debug_class_to_check, 1, 1, 0 /* | |
99 Add a debug class to the list of active classes. | 98 Add a debug class to the list of active classes. |
100 */ ) | 99 */ |
101 (class) | 100 (class)) |
102 Lisp_Object class; | |
103 { | 101 { |
104 if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil))) | 102 if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil))) |
105 error ("No such debug class exists"); | 103 error ("No such debug class exists"); |
106 else | 104 else |
107 xemacs_debug_loop (ADD, class, Qnil); | 105 xemacs_debug_loop (ADD, class, Qnil); |
108 | 106 |
109 return (xemacs_debug_loop (ACTIVE, Qnil, Qnil)); | 107 return (xemacs_debug_loop (ACTIVE, Qnil, Qnil)); |
110 } | 108 } |
111 | 109 |
112 DEFUN ("delete-debug-class-to-check", Fdelete_debug_class_to_check, | 110 DEFUN ("delete-debug-class-to-check", Fdelete_debug_class_to_check, 1, 1, 0, /* |
113 Sdelete_debug_class_to_check, 1, 1, 0 /* | |
114 Delete a debug class from the list of active classes. | 111 Delete a debug class from the list of active classes. |
115 */ ) | 112 */ |
116 (class) | 113 (class)) |
117 Lisp_Object class; | |
118 { | 114 { |
119 if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil))) | 115 if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil))) |
120 error ("No such debug class exists"); | 116 error ("No such debug class exists"); |
121 else | 117 else |
122 xemacs_debug_loop (DELETE, class, Qnil); | 118 xemacs_debug_loop (DELETE, class, Qnil); |
123 | 119 |
124 return (xemacs_debug_loop (ACTIVE, Qnil, Qnil)); | 120 return (xemacs_debug_loop (ACTIVE, Qnil, Qnil)); |
125 } | 121 } |
126 | 122 |
127 DEFUN ("debug-classes-being-checked", Fdebug_classes_being_checked, | 123 DEFUN ("debug-classes-being-checked", Fdebug_classes_being_checked, 0, 0, 0, /* |
128 Sdebug_classes_being_checked, 0, 0, 0 /* | |
129 Return a list of active debug classes. | 124 Return a list of active debug classes. |
130 */ ) | 125 */ |
131 () | 126 ()) |
132 { | 127 { |
133 return (xemacs_debug_loop (ACTIVE, Qnil, Qnil)); | 128 return (xemacs_debug_loop (ACTIVE, Qnil, Qnil)); |
134 } | 129 } |
135 | 130 |
136 DEFUN ("debug-classes-list", Fdebug_classes_list, Sdebug_classes_list, 0, 0, 0 /* | 131 DEFUN ("debug-classes-list", Fdebug_classes_list, 0, 0, 0, /* |
137 Return a list of all defined debug classes. | 132 Return a list of all defined debug classes. |
138 */ ) | 133 */ |
139 () | 134 ()) |
140 { | 135 { |
141 return (xemacs_debug_loop (LIST, Qnil, Qnil)); | 136 return (xemacs_debug_loop (LIST, Qnil, Qnil)); |
142 } | 137 } |
143 | 138 |
144 DEFUN ("set-debug-classes-to-check", Fset_debug_classes_to_check, | 139 DEFUN ("set-debug-classes-to-check", Fset_debug_classes_to_check, 1, 1, 0, /* |
145 Sset_debug_classes_to_check, 1, 1, 0 /* | |
146 Set which classes of debug statements should be active. | 140 Set which classes of debug statements should be active. |
147 CLASSES should be a list of debug classes. | 141 CLASSES should be a list of debug classes. |
148 */ ) | 142 */ |
149 (classes) | 143 (classes)) |
150 Lisp_Object classes; | |
151 { | 144 { |
152 Lisp_Object rest; | 145 Lisp_Object rest; |
153 | 146 |
154 CHECK_LIST (classes); | 147 CHECK_LIST (classes); |
155 | 148 |
165 Fadd_debug_class_to_check (XCAR (rest)); | 158 Fadd_debug_class_to_check (XCAR (rest)); |
166 | 159 |
167 return (xemacs_debug_loop (ACTIVE, Qnil, Qnil)); | 160 return (xemacs_debug_loop (ACTIVE, Qnil, Qnil)); |
168 } | 161 } |
169 | 162 |
170 DEFUN ("set-debug-class-types-to-check", Fset_debug_class_types_to_check, | 163 DEFUN ("set-debug-class-types-to-check", Fset_debug_class_types_to_check, 2, 2, 0, /* |
171 Sset_debug_class_types_to_check, 2, 2, 0 /* | |
172 For the given debug CLASS, set which TYPES are actually interesting. | 164 For the given debug CLASS, set which TYPES are actually interesting. |
173 TYPES should be an integer representing the or'd value of all desired types. | 165 TYPES should be an integer representing the or'd value of all desired types. |
174 Lists of defined types and their values are located in the source code. | 166 Lists of defined types and their values are located in the source code. |
175 */ ) | 167 */ |
176 (class, type) | 168 (class, type)) |
177 Lisp_Object class, type; | |
178 { | 169 { |
179 CHECK_INT (type); | 170 CHECK_INT (type); |
180 if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil))) | 171 if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil))) |
181 error ("Invalid debug class"); | 172 error ("Invalid debug class"); |
182 | 173 |
183 xemacs_debug_loop (SETTYPE, class, type); | 174 xemacs_debug_loop (SETTYPE, class, type); |
184 | 175 |
185 return (xemacs_debug_loop (TYPE, class, Qnil)); | 176 return (xemacs_debug_loop (TYPE, class, Qnil)); |
186 } | 177 } |
187 | 178 |
188 DEFUN ("debug-types-being-checked", Fdebug_types_being_checked, | 179 DEFUN ("debug-types-being-checked", Fdebug_types_being_checked, 1, 1, 0, /* |
189 Sdebug_types_being_checked, 1, 1, 0 /* | |
190 For the given CLASS, return the associated type value. | 180 For the given CLASS, return the associated type value. |
191 */ ) | 181 */ |
192 (class) | 182 (class)) |
193 Lisp_Object class; | |
194 { | 183 { |
195 if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil))) | 184 if (NILP (xemacs_debug_loop (VALIDATE, class, Qnil))) |
196 error ("Invalid debug class"); | 185 error ("Invalid debug class"); |
197 | 186 |
198 return (xemacs_debug_loop (TYPE, class, Qnil)); | 187 return (xemacs_debug_loop (TYPE, class, Qnil)); |
207 defsymbol (&Qwindows, "windows"); | 196 defsymbol (&Qwindows, "windows"); |
208 defsymbol (&Qframes, "frames"); | 197 defsymbol (&Qframes, "frames"); |
209 defsymbol (&Qdevices, "devices"); | 198 defsymbol (&Qdevices, "devices"); |
210 /* defsymbol (&Qbyte_code, "byte-code"); in bytecode.c */ | 199 /* defsymbol (&Qbyte_code, "byte-code"); in bytecode.c */ |
211 | 200 |
212 defsubr (&Sadd_debug_class_to_check); | 201 DEFSUBR (Fadd_debug_class_to_check); |
213 defsubr (&Sdelete_debug_class_to_check); | 202 DEFSUBR (Fdelete_debug_class_to_check); |
214 defsubr (&Sdebug_classes_being_checked); | 203 DEFSUBR (Fdebug_classes_being_checked); |
215 defsubr (&Sdebug_classes_list); | 204 DEFSUBR (Fdebug_classes_list); |
216 defsubr (&Sset_debug_classes_to_check); | 205 DEFSUBR (Fset_debug_classes_to_check); |
217 defsubr (&Sset_debug_class_types_to_check); | 206 DEFSUBR (Fset_debug_class_types_to_check); |
218 defsubr (&Sdebug_types_being_checked); | 207 DEFSUBR (Fdebug_types_being_checked); |
219 } | 208 } |
220 | 209 |
221 void | 210 void |
222 vars_of_debug (void) | 211 vars_of_debug (void) |
223 { | 212 { |