- Lisp_Object utf_16_fn
- = make_unibyte_string ((char *)fni->FileName,
- fni->FileNameLength);
- /* Note: mule-conf is preloaded, so utf-16le must
- already be defined at this point. */
- Lisp_Object fname
- = code_convert_string_norecord (utf_16_fn, cs, 0);
- Lisp_Object action = lispy_file_action (fni->Action);
-
- inev.kind = FILE_NOTIFY_EVENT;
- inev.timestamp = GetTickCount ();
- inev.modifiers = 0;
- inev.frame_or_window = callback;
- inev.arg = Fcons (action, fname);
- inev.arg = list3 (make_pointer_integer (notifications_desc),
- action, fname);
- kbd_buffer_store_event_hold (&inev, hold_quit);
-
- if (!fni->NextEntryOffset)
- break;
- p += fni->NextEntryOffset;
- fni = (PFILE_NOTIFY_INFORMATION)p;
- info_size -= fni->NextEntryOffset;
+ Lisp_Object callback = XCDR (obj);
+
+ EVENT_INIT (inev);
+
+ while (info_size >= min_size)
+ {
+ Lisp_Object utf_16_fn
+ = make_unibyte_string ((char *)fni->FileName,
+ fni->FileNameLength);
+ /* Note: mule-conf is preloaded, so utf-16le must
+ already be defined at this point. */
+ Lisp_Object fname
+ = code_convert_string_norecord (utf_16_fn, cs, 0);
+ Lisp_Object action = lispy_file_action (fni->Action);
+
+ inev.kind = FILE_NOTIFY_EVENT;
+ inev.timestamp = GetTickCount ();
+ inev.modifiers = 0;
+ inev.frame_or_window = callback;
+ inev.arg = Fcons (action, fname);
+ inev.arg = list3 (make_pointer_integer (ns->desc),
+ action, fname);
+ kbd_buffer_store_event_hold (&inev, hold_quit);
+ nevents++;
+ if (!fni->NextEntryOffset)
+ break;
+ p += fni->NextEntryOffset;
+ fni = (PFILE_NOTIFY_INFORMATION)p;
+ info_size -= fni->NextEntryOffset;
+ }