Mercurial > hg > xemacs-beta
comparison src/device.c @ 5117:3742ea8250b5 ben-lisp-object ben-lisp-object-final-ws-year-2005
Checking in final CVS version of workspace 'ben-lisp-object'
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 26 Dec 2009 00:20:27 -0600 |
parents | facf3239ba30 |
children | e0db3c197671 |
comparison
equal
deleted
inserted
replaced
5116:e56f73345619 | 5117:3742ea8250b5 |
---|---|
153 if (DEVICE_LIVE_P (d) && !NILP (DEVICE_CONNECTION (d))) | 153 if (DEVICE_LIVE_P (d) && !NILP (DEVICE_CONNECTION (d))) |
154 write_fmt_string_lisp (printcharfun, " on %S", 1, DEVICE_CONNECTION (d)); | 154 write_fmt_string_lisp (printcharfun, " on %S", 1, DEVICE_CONNECTION (d)); |
155 write_fmt_string (printcharfun, " 0x%x>", d->header.uid); | 155 write_fmt_string (printcharfun, " 0x%x>", d->header.uid); |
156 } | 156 } |
157 | 157 |
158 DEFINE_LRECORD_IMPLEMENTATION ("device", device, | 158 DEFINE_NONDUMPABLE_LISP_OBJECT ("device", device, |
159 0, /*dumpable-flag*/ | 159 mark_device, print_device, 0, 0, 0, |
160 mark_device, print_device, 0, 0, 0, | 160 device_description, |
161 device_description, | 161 struct device); |
162 struct device); | |
163 | 162 |
164 int | 163 int |
165 valid_device_class_p (Lisp_Object class_) | 164 valid_device_class_p (Lisp_Object class_) |
166 { | 165 { |
167 return !NILP (memq_no_quit (class_, Vdevice_class_list)); | 166 return !NILP (memq_no_quit (class_, Vdevice_class_list)); |
194 } | 193 } |
195 | 194 |
196 static struct device * | 195 static struct device * |
197 allocate_device (Lisp_Object console) | 196 allocate_device (Lisp_Object console) |
198 { | 197 { |
199 Lisp_Object device; | 198 Lisp_Object obj = ALLOC_LISP_OBJECT (device); |
200 struct device *d = ALLOC_LCRECORD_TYPE (struct device, &lrecord_device); | 199 struct device *d = XDEVICE (obj); |
201 struct gcpro gcpro1; | 200 struct gcpro gcpro1; |
202 | 201 |
203 device = wrap_device (d); | 202 GCPRO1 (obj); |
204 GCPRO1 (device); | |
205 | 203 |
206 nuke_all_device_slots (d, Qnil); | 204 nuke_all_device_slots (d, Qnil); |
207 | 205 |
208 d->console = console; | 206 d->console = console; |
209 d->infd = d->outfd = -1; | 207 d->infd = d->outfd = -1; |
1382 /************************************************************************/ | 1380 /************************************************************************/ |
1383 | 1381 |
1384 void | 1382 void |
1385 syms_of_device (void) | 1383 syms_of_device (void) |
1386 { | 1384 { |
1387 INIT_LRECORD_IMPLEMENTATION (device); | 1385 INIT_LISP_OBJECT (device); |
1388 | 1386 |
1389 DEFSUBR (Fvalid_device_class_p); | 1387 DEFSUBR (Fvalid_device_class_p); |
1390 DEFSUBR (Fdevice_class_list); | 1388 DEFSUBR (Fdevice_class_list); |
1391 | 1389 |
1392 DEFSUBR (Fdfw_device); | 1390 DEFSUBR (Fdfw_device); |