⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 faq

📁 早期freebsd实现
💻
📖 第 1 页 / 共 5 页
字号:
  to the sources. Fortunately this has been done already.  Joshua Marantz  <josh@viewlogic.com> did most of the work for Emacs 18.52, and the mods  were ported to 18.55 by Johan Vromans <jv@mh.nl>. Also included is the  handling of DEC's LK201 keyboard.  You need to apply the changes to a  fresh Emacs 18.55 distribution on a Unix system, and then you can copy  the sources to VMS to perform the compile/link/build.    The set of changes have been posted a number of times three times the  last 12 months, so they should be widely available.  48: Why won't src/alloc.c compile on a SPARCstation?    {Could someone send me a better description of the symptoms ...  Does it  really not compile, or does it refuse to link, or does it die when it's  run?}    An object in src/alloc.c is declared as an array of char.  However, on a  SPARCstation, this object must be aligned on a longword boundary.  gcc will align this object not on a longword boundary because it thinks  this is ok because the object is an array of char.    Here is a solution:    (Patch from the Epoch source code.)    >*** dist-18.55.dist/src/alloc.c	Mon Feb 13 05:23:35 1989  >--- dist-18.55/src/alloc.c	Mon Nov 27 23:30:13 1989  >***************  >*** 665,673 ****  >  #define NSTATICS 200  >    >- char staticvec1[NSTATICS * sizeof (Lisp_Object *)] = {0};  >-   >  int staticidx = 0;  >    >  #define staticvec ((Lisp_Object **) staticvec1)  >    >  /* Put an entry in staticvec, pointing at the variable whose address is given */  >--- 665,676 ----  >  #define NSTATICS 200  >    >  int staticidx = 0;  >    >+ #ifdef __GNUC__  >+ Lisp_Object *staticvec[NSTATICS] = {0};  >+ #else  >+ char staticvec1[NSTATICS * sizeof (Lisp_Object *)] = {0};  >  #define staticvec ((Lisp_Object **) staticvec1)  >+ #endif  >    >  /* Put an entry in staticvec, pointing at the variable whose address is given */    {Does anyone understand why one might want to declare staticvec as an  array of char instead of an array of LispObject?}  49: Why do shells started from Emacs suspend themselves under SunOS 4.1?    In SunOS 4.1, when subprocesses are started by an Emacs process started  by "rsh", the process stops with a message like this:      Process shell stopped (tty input)    SunOS 4.1 uses the POSIX standard's specification for job control.  Basically, a process must be a session leader to acquire a new  controlling terminal.    A quick fix is to run Emacs as "/usr/etc/setsid emacs" instead.    To fix it in Emacs, use this patch:    (Patch by Eirik Fuller <eirik@elf.tn.cornell.edu>.)    >*** /tmp/,RCSt1a12635	Fri Jul  6 11:29:10 1990  >--- process.c	Sat Jun 16 14:04:55 1990  >***************  >*** 1031,1036 ****  >--- 1031,1039 ----  >  	    int j = open ("/dev/tty", O_RDWR, 0);  >  	    ioctl (j, TIOCNOTTY, 0);  >  	    close (j);  >+ #ifndef USG  >+ 	    setpgrp (0, 0);  >+ #endif  >  	  }  >  #endif /* TIOCNOTTY */  >    50: Why does Emacs crash from a bus error in XLookupString under OpenLook?    The Sun OpenLook libraries use the XComposeStatus parameter on  XLookupString for composing key sequences.  I'm told this is actually  supposed to be an optional parameter.    (Patch by David J. MacKenzie <djm@eng.umd.edu>.)    >*** dist-18.55.dist/src/x11term.c	Wed Aug  2 21:56:42 1989  >--- dist-18.55/src/x11term.c	Fri Jul 13 19:22:32 1990  >***************  >*** 1213,1216 ****  >--- 1213,1218 ----  >  #endif /* not sun */  >  	  >+ static XComposeStatus status;  >+   >  internal_socket_read(bufp, numchars)  >  	register unsigned char *bufp;  >***************  >*** 1223,1227 ****  >    BLOCK_INPUT_DECLARE ();  >    XEvent event;  >-   XComposeStatus status;  >    KeySym keysym;  >    >--- 1225,1228 ----  >***************  >*** 1330,1334 ****  >        nbytes = XLookupString (&event,  >  			      mapping_buf, 20, &keysym,  >! 			      0);  >        /* Someday this will be unnecessary as we will  >  	 be able to use XRebindKeysym so XLookupString  >--- 1331,1335 ----  >        nbytes = XLookupString (&event,  >  			      mapping_buf, 20, &keysym,  >! 			      &status);  >        /* Someday this will be unnecessary as we will  >  	 be able to use XRebindKeysym so XLookupString  51: Why doesn't "C-c C-c" interrupt subprocesses under HP/UX?    Paul Stravers <stravers@dutentb.tudelft.nl> writes:    In HP/UX we can (must) combine the two distinct calls          1.    ioctl (fildes, TIOCGPGRP, &gid);          2.    kill (-gid, signo);  into the single call          1+2.  ioctl (fildes, TIOCSIGSEND, signo);    This is apparently the case under at least HP/UX versions 6.5 and 7.0.    Here is a set of patches courtesy of Piet van Oostrum <piet@cs.ruu.nl>  that fixes these problems:    1. Signals to child processes work now (like the C-c C-c mentioned above)    2. When running under X11, C-g now correctly interrupts long-running commands    3. When running under X11, the window is redislayed even if emacs is doing  some work (e.g. if your window becomes visible after being behind another  one.    4. A nasty bug in alloca is solved. This bug is very infrequent unless you  apply the other patches.    {I don't know for sure whether all of these patches are applicable only  under HP/UX.  Perhaps someone can tell me.}    >*** alloca.s.~1~	Fri Sep 15 16:35:39 1989  >--- alloca.s	Tue May  1 17:18:08 1990  >***************  >*** 92,103 ****  >  	sub.l	&MAXREG*4,%d1	# space for saving registers  >  	mov.l	%d1,%sp		# save new value of sp  >  	tst.b	PROBE(%sp)	# create pages (sigh)  >  	move.w	&MAXREG-1,%d0  >  copy_regs_loop:			/* save caller's saved registers */  >! 	mov.l	(%a1)+,(%sp)+  >  	dbra	%d0,copy_regs_loop  >! 	mov.l	%sp,%d0		# return value  >! 	mov.l	%d1,%sp  >  	add.l	&-4,%sp		# adjust tos  >  	jmp	(%a0)		# rts  >  #endif /* new hp assembler */  >--- 92,105 ----  >  	sub.l	&MAXREG*4,%d1	# space for saving registers  >  	mov.l	%d1,%sp		# save new value of sp  >  	tst.b	PROBE(%sp)	# create pages (sigh)  >+ 	mov.l	%a2,%d1		# save reg a2  >+ 	mov.l	%sp,%a2  >  	move.w	&MAXREG-1,%d0  >  copy_regs_loop:			/* save caller's saved registers */  >! 	mov.l	(%a1)+,(%a2)+  >  	dbra	%d0,copy_regs_loop  >! 	mov.l	%a2,%d0		# return value  >! 	mov.l	%d1,%a2		# restore a2  >  	add.l	&-4,%sp		# adjust tos  >  	jmp	(%a0)		# rts  >  #endif /* new hp assembler */    >*** keyboard.c.~1~	Wed Apr  4 14:53:49 1990  >--- keyboard.c	Thu Apr 26 14:46:27 1990  >***************  >*** 719,724 ****  >--- 719,773 ----  >    errno = old_errno;  >  }  >    >+ #ifdef HPUX  >+ /* tells if an alarm is outstanding for emptying the socket */  >+ int socket_alarm;  >+   >+ static void  >+ empty_socket_interrupt()  >+ {  >+   int nread;  >+   char buf[256 * BUFFER_SIZE_FACTOR];  >+   register int i;  >+   int old_errno = errno;  >+   >+   if (waiting_for_input) return;  >+   >+   fcntl (fileno (stdin), F_SETFL, O_NDELAY);  >+   >+   /* Read what is waiting.  */  >+   >+     nread = (*read_socket_hook) (0, buf, sizeof buf);  >+   >+ #ifdef EBADSLT  >+   if (nread == -1 && (errno == EAGAIN || errno == EBADSLT))  >+ #else  >+   if (nread == -1 && errno == EAGAIN)  >+ #endif  >+     nread = 0;  >+   >+   fcntl (fileno (stdin), F_SETFL, 0);  >+   >+   /* Scan the chars for C-g and store them in kbd_buffer.  */  >+   kbd_ptr = kbd_buffer;  >+   for (i = 0; i < nread; i++)  >+     {  >+       kbd_buffer_store_char (buf[i]);  >+       /* Don't look at input that follows a C-g too closely.  >+ 	 This reduces lossage due to autorepeat on C-g.  */  >+       if (buf[i] == Ctl ('G'))  >+ 	break;  >+     }  >+   >+   /* reestablish interrupt */  >+   signal (SIGALRM, empty_socket_interrupt);  >+   alarm (1);  >+   >+   errno = old_errno;  >+ }  >+   >+ #endif /* HPUX */  >+   >  /* read a character from the keyboard; call the redisplay if needed */  >  /* commandflag 0 means do not do auto-saving, but do do redisplay.  >     -1 means do not do redisplay, but do do autosaving.  >***************  >*** 733,738 ****  >--- 782,794 ----  >    Lisp_Object tem;  >    extern request_echo ();  >    >+ #ifdef HPUX  >+   if (socket_alarm) {  >+       alarm (0);  >+       socket_alarm = 0;  >+   }        >+ #endif  >+   >    if ((c = unread_command_char) >= 0)  >      {  >        unread_command_char = -1;  >***************  >*** 869,874 ****  >--- 925,938 ----  >  	}  >      }  >    >+ #ifdef HPUX  >+   if (read_socket_hook) {  >+       socket_alarm = 1;  >+       signal (SIGALRM, empty_socket_interrupt);  >+       alarm (1);  >+   }        >+ #endif  >+   >    return c;  >  }  >    >***************  >*** 1094,1119 ****  >    >  #else /* no FIONREAD */  >  #ifdef USG  >    if (kbd_count)  >      abort ();  >    >    fcntl (fileno (stdin), F_SETFL, O_NDELAY);  >!   kbd_ptr = kbd_buffer;  >    if (read_socket_hook)  >!     {  >!       kbd_count = (*read_socket_hook) (0, kbd_buffer, sizeof kbd_buffer);  >!     }  >    else  >!     {  >!       kbd_count = read (fileno (stdin), kbd_buffer, sizeof kbd_buffer);  >!     }  >  #ifdef EBADSLT  >!   if (kbd_count == -1 && (errno == EAGAIN || errno == EBADSLT))  >  #else  >!   if (kbd_count == -1 && errno == EAGAIN)  >  #endif  >!     kbd_count = 0;  >    fcntl (fileno (stdin), F_SETFL, 0);  >  #else /* not USG */  >    you lose  >  #endif /* not USG */  >--- 1158,1209 ----  >    >  #else /* no FIONREAD */  >  #ifdef USG  >+   char buf[256 * BUFFER_SIZE_FACTOR];  >+   register int i;  >+ #ifdef HPUX  >+   int mask;  >+ #endif  >+   >    if (kbd_count)  >      abort ();  >    >+ #ifdef HPUX  >+   if (socket_alarm)  >+       mask = sigblock (sigmask (SIGALRM));  >+ #endif  >+   >    fcntl (fileno (stdin), F_SETFL, O_NDELAY);  >!   >!   /* Read what is waiting.  */  >    if (read_socket_hook)  >!     nread = (*read_socket_hook) (0, buf, sizeof buf);  >    else  >!     nread = read (fileno(stdin), buf, sizeof buf);  >  #ifdef EBADSLT  >!   if (nread == -1 && (errno == EAGAIN || errno == EBADSLT))  >  #else  >!   if (nread == -1 && errno == EAGAIN)  >  #endif  >!     nread = 0;  >!   >    fcntl (fileno (stdin), F_SETFL, 0);  >+   >+   /* Scan the chars for C-g and store them in kbd_buffer.  */  >+   kbd_ptr = kbd_buffer;  >+   for (i = 0; i < nread; i++)  >+     {  >+       kbd_buffer_store_char (buf[i]);  >+       /* Don't look at input that follows a C-g too closely.  >+ 	 This reduces lossage due to autorepeat on C-g.  */  >+       if (buf[i] == Ctl ('G'))  >+ 	break;  >+     }  >+   >+ #ifdef HPUX  >+   if (socket_alarm)  >+       sigsetmask(mask);  >+ #endif  >+   >  #else /* not USG */  >    you lose  >  #endif /* not USG */    >*** x11term.h~	Fri Sep 15 15:20:26 1989

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -