annotate oldXMenu/XDestAssoc.c @ 82988:f82e3a6f5ccb

A few more bugfixes and new features. (Sigh.) I obviously need to remember to separate individual changes to multiple commits. src/emacsclient.c: Improved error handling. (decode_options): Changed frame option (again) from -f to -t. (print_help_and_exit): Ditto. (copy_from_to): Check EINTR after write, not EAGAIN. Removed SIGIO hack. (pty_conversation): Handle errors transmitted through the socket. Handle pty errors by not reading from it anymore. (main): Restore correct errno after socket_status failed. Send -tty on -t, not -pty. lisp/server.el (server-process-filter): Watch -tty, not -pty. Use make-frame-on-tty instead of make-terminal-frame. Don't set newframe to t if make-frame-on-tty failed. Don't delete frames here. Print correct message when there are no files to edit, but a new frame was requested. (server-sentinel): Delete the frame after the process. (server-handle-delete-frame): New function for delete-frame-functions. (server-start): Add server-handle-delete-frame to delete-frame-functions. (server-buffer-done): Don't delete frames here. src/alloc.c (mark_ttys): Add prototype. (Fgarbage_collect): Call mark_ttys. src/emacs.c: (shut_down_emacs): Don't flush stdout before reset_sys_modes(). src/process.c (add_keyboard_wait_descriptor_called_flag): Removed. (add_keyboard_wait_descriptor): Removed stdin hack. src/sysdep.c: Unconditionally include sysselect.h. (old_fcntl_flags): Changed to an array. (init_sigio, reset_sigio): Use it. (narrow_foreground_group, widen_foreground_group): Use setpgid, not setpgrp. (old_fcntl_owner): Changed to an array. (init_sys_modes, reset_sys_modes): Use it. Fix fsync() and reset_sigio() calls. src/term.c (Qframe_tty_name, Qframe_tty_type): New variables. (syms_of_term): Initialize them. (Fframe_tty_name, Fframe_tty_type): New functions. (term_init): Call add_keyboard_wait_descriptor(). (Fdelete_tty): New function. (delete_tty): Call delete_keyboard_wait_descriptor(). (get_current_tty): Removed. (mark_ttys): New function. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-28
author Karoly Lorentey <lorentey@elte.hu>
date Wed, 31 Dec 2003 05:09:29 +0000
parents 695cf19ef79e
children e8824c4f5f7e 375f2633d815
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25858
Dave Love <fx@gnu.org>
parents:
diff changeset
1 /* $XConsortium: XDestAssoc.c,v 10.17 91/02/08 13:11:50 rws Exp $ */
Dave Love <fx@gnu.org>
parents:
diff changeset
2 /* Copyright Massachusetts Institute of Technology 1985 */
Dave Love <fx@gnu.org>
parents:
diff changeset
3
Dave Love <fx@gnu.org>
parents:
diff changeset
4 /*
Dave Love <fx@gnu.org>
parents:
diff changeset
5 Permission to use, copy, modify, distribute, and sell this software and its
Dave Love <fx@gnu.org>
parents:
diff changeset
6 documentation for any purpose is hereby granted without fee, provided that
Dave Love <fx@gnu.org>
parents:
diff changeset
7 the above copyright notice appear in all copies and that both that
Dave Love <fx@gnu.org>
parents:
diff changeset
8 copyright notice and this permission notice appear in supporting
Dave Love <fx@gnu.org>
parents:
diff changeset
9 documentation, and that the name of M.I.T. not be used in advertising or
Dave Love <fx@gnu.org>
parents:
diff changeset
10 publicity pertaining to distribution of the software without specific,
Dave Love <fx@gnu.org>
parents:
diff changeset
11 written prior permission. M.I.T. makes no representations about the
Dave Love <fx@gnu.org>
parents:
diff changeset
12 suitability of this software for any purpose. It is provided "as is"
Dave Love <fx@gnu.org>
parents:
diff changeset
13 without express or implied warranty.
Dave Love <fx@gnu.org>
parents:
diff changeset
14 */
Dave Love <fx@gnu.org>
parents:
diff changeset
15
Dave Love <fx@gnu.org>
parents:
diff changeset
16 #include <X11/Xlib.h>
Dave Love <fx@gnu.org>
parents:
diff changeset
17 #include "X10.h"
Dave Love <fx@gnu.org>
parents:
diff changeset
18
Dave Love <fx@gnu.org>
parents:
diff changeset
19 /*
Dave Love <fx@gnu.org>
parents:
diff changeset
20 * XDestroyAssocTable - Destroy (free the memory associated with)
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 25858
diff changeset
21 * an XAssocTable.
25858
Dave Love <fx@gnu.org>
parents:
diff changeset
22 */
Dave Love <fx@gnu.org>
parents:
diff changeset
23 XDestroyAssocTable(table)
Dave Love <fx@gnu.org>
parents:
diff changeset
24 register XAssocTable *table;
Dave Love <fx@gnu.org>
parents:
diff changeset
25 {
Dave Love <fx@gnu.org>
parents:
diff changeset
26 register int i;
Dave Love <fx@gnu.org>
parents:
diff changeset
27 register XAssoc *bucket;
Dave Love <fx@gnu.org>
parents:
diff changeset
28 register XAssoc *Entry, *entry_next;
Dave Love <fx@gnu.org>
parents:
diff changeset
29
Dave Love <fx@gnu.org>
parents:
diff changeset
30 /* Free the buckets. */
Dave Love <fx@gnu.org>
parents:
diff changeset
31 for (i = 0; i < table->size; i++) {
Dave Love <fx@gnu.org>
parents:
diff changeset
32 bucket = &table->buckets[i];
Dave Love <fx@gnu.org>
parents:
diff changeset
33 for (
Dave Love <fx@gnu.org>
parents:
diff changeset
34 Entry = bucket->next;
Dave Love <fx@gnu.org>
parents:
diff changeset
35 Entry != bucket;
Dave Love <fx@gnu.org>
parents:
diff changeset
36 Entry = entry_next
Dave Love <fx@gnu.org>
parents:
diff changeset
37 ) {
Dave Love <fx@gnu.org>
parents:
diff changeset
38 entry_next = Entry->next;
Dave Love <fx@gnu.org>
parents:
diff changeset
39 free((char *)Entry);
Dave Love <fx@gnu.org>
parents:
diff changeset
40 }
Dave Love <fx@gnu.org>
parents:
diff changeset
41 }
Dave Love <fx@gnu.org>
parents:
diff changeset
42
Dave Love <fx@gnu.org>
parents:
diff changeset
43 /* Free the bucket array. */
Dave Love <fx@gnu.org>
parents:
diff changeset
44 free((char *)table->buckets);
Dave Love <fx@gnu.org>
parents:
diff changeset
45
Dave Love <fx@gnu.org>
parents:
diff changeset
46 /* Free the table. */
Dave Love <fx@gnu.org>
parents:
diff changeset
47 free((char *)table);
Dave Love <fx@gnu.org>
parents:
diff changeset
48 }
Dave Love <fx@gnu.org>
parents:
diff changeset
49
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
50 /* arch-tag: a536bf02-8d63-45f2-8c1a-c7f9fd4da2cf
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
51 (do not change this comment) */