Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!UUNET.UU.NET!munnari!sibyl.eleceng.ua.oz.au!ian From: munnari!sibyl.eleceng.ua.oz.au!ian@UUNET.UU.NET Newsgroups: gnu.emacs.bug Subject: function-key-sequence, support for NS Sys V.2.2 etc (part 2 of 2) Message-ID: <8811250244.AA27380@uunet.UU.NET> Date: 24 Nov 88 07:20:23 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 728 In GNU Emacs 18.52.12 of Sun Nov 20 1988 on sibyl (usg-unix-v) This is part two of two. Part one was a shell archive of new files for emacs. The this part contains context differences for the existing files. ------------------Cut Here---------------------------------------- *** ../etc/emacsclient.c.orig Fri Nov 4 01:55:48 1988 --- ../etc/emacsclient.c Fri Nov 4 11:36:23 1988 *************** *** 134,139 #include #include #include main (argc, argv) int argc; --- 134,140 ----- #include #include #include + #include main (argc, argv) int argc; *************** *** 139,147 int argc; char **argv; { ! int s; ! key_t key; ! struct msgbuf * msgp = (struct msgbuf *) malloc (sizeof *msgp + BUFSIZ); struct msqid_ds * msg_st; char *homedir, *getenv (), buf[BUFSIZ]; --- 140,149 ----- int argc; char **argv; { ! int s, i; ! key_t key, ftok(); ! char *malloc(); ! struct msgbuf *msgp = (struct msgbuf *) malloc (sizeof *msgp + BUFSIZ); char *homedir, *getenv (), buf[BUFSIZ]; char *getwd (), *getcwd (), gwdirb[BUFSIZ], *cwd, *val; *************** *** 143,149 key_t key; struct msgbuf * msgp = (struct msgbuf *) malloc (sizeof *msgp + BUFSIZ); - struct msqid_ds * msg_st; char *homedir, *getenv (), buf[BUFSIZ]; char *getwd (), *getcwd (), gwdirb[BUFSIZ], *cwd; if (argc < 2) --- 145,150 ----- char *malloc(); struct msgbuf *msgp = (struct msgbuf *) malloc (sizeof *msgp + BUFSIZ); char *homedir, *getenv (), buf[BUFSIZ]; char *getwd (), *getcwd (), gwdirb[BUFSIZ], *cwd, *val; if (argc < 2) *************** *** 145,151 (struct msgbuf *) malloc (sizeof *msgp + BUFSIZ); struct msqid_ds * msg_st; char *homedir, *getenv (), buf[BUFSIZ]; ! char *getwd (), *getcwd (), gwdirb[BUFSIZ], *cwd; if (argc < 2) { printf ("Usage: %s [filename]\n", argv[0]); --- 146,152 ----- struct msgbuf *msgp = (struct msgbuf *) malloc (sizeof *msgp + BUFSIZ); char *homedir, *getenv (), buf[BUFSIZ]; ! char *getwd (), *getcwd (), gwdirb[BUFSIZ], *cwd, *val; if (argc < 2) { printf ("Usage: %s [filename]\n", argv[0]); *************** *** 171,184 exit (1); } ! msgp->mtext[0] = 0; ! argc--; argv++; ! while (argc) ! { ! if (*argv[0] != '/') ! { ! char *val; ! cwd = gwdirb; *cwd = '\0'; #ifdef BSD val = getwd (gwdirb); #else --- 172,178 ----- exit (1); } ! cwd = gwdirb; *cwd = '\0'; #ifdef BSD val = getwd (gwdirb); #else *************** *** 180,186 char *val; cwd = gwdirb; *cwd = '\0'; #ifdef BSD ! val = getwd (gwdirb); #else val = getcwd (gwdirb, sizeof gwdirb); #endif --- 174,180 ----- cwd = gwdirb; *cwd = '\0'; #ifdef BSD ! val = getwd (gwdirb); #else val = getcwd (gwdirb, sizeof gwdirb); #endif *************** *** 182,188 #ifdef BSD val = getwd (gwdirb); #else ! val = getcwd (gwdirb, sizeof gwdirb); #endif if (val != 0) { --- 176,182 ----- #ifdef BSD val = getwd (gwdirb); #else ! val = getcwd (gwdirb, sizeof gwdirb); #endif if (val = NULL) { *************** *** 184,190 #else val = getcwd (gwdirb, sizeof gwdirb); #endif ! if (val != 0) { strcat (cwd, "/"); } --- 178,197 ----- #else val = getcwd (gwdirb, sizeof gwdirb); #endif ! if (val = NULL) ! { ! perror ("Getpwd"); ! exit(1); ! } ! ! msgp->mtext[0] = '\0'; ! for (i = 1; i < argc; i++) ! { ! if (*argv[i] == '+') ! { ! char *p = argv[i] + 1; ! while (*p >= '0' && *p <= '9') p++; ! if (*p != 0) { strcat (msgp->mtext, cwd); strcat (msgp->mtext, "/"); *************** *** 186,192 #endif if (val != 0) { ! strcat (cwd, "/"); } else { --- 193,200 ----- while (*p >= '0' && *p <= '9') p++; if (*p != 0) { ! strcat (msgp->mtext, cwd); ! strcat (msgp->mtext, "/"); } } else if (*argv[i] != '/') *************** *** 188,194 { strcat (cwd, "/"); } ! else { fprintf (stderr, cwd); *cwd = '\0'; --- 196,203 ----- strcat (msgp->mtext, cwd); strcat (msgp->mtext, "/"); } ! } ! else if (*argv[i] != '/') { strcat (msgp->mtext, cwd); strcat (msgp->mtext, "/"); *************** *** 190,197 } else { ! fprintf (stderr, cwd); ! *cwd = '\0'; } } --- 199,206 ----- } else if (*argv[i] != '/') { ! strcat (msgp->mtext, cwd); ! strcat (msgp->mtext, "/"); } strcat (msgp->mtext, argv[i]); strcat (msgp->mtext, " "); *************** *** 193,202 fprintf (stderr, cwd); *cwd = '\0'; } ! } ! ! strcat (msgp->mtext, cwd); ! strcat (msgp->mtext, argv[0]); strcat (msgp->mtext, " "); argv++; argc--; } --- 202,208 ----- strcat (msgp->mtext, cwd); strcat (msgp->mtext, "/"); } ! strcat (msgp->mtext, argv[i]); strcat (msgp->mtext, " "); } *************** *** 198,204 strcat (msgp->mtext, cwd); strcat (msgp->mtext, argv[0]); strcat (msgp->mtext, " "); - argv++; argc--; } strcat (msgp->mtext, "\n"); msgp->mtype = 1; --- 204,209 ----- } strcat (msgp->mtext, argv[i]); strcat (msgp->mtext, " "); } strcat (msgp->mtext, "\n"); *************** *** 200,205 strcat (msgp->mtext, " "); argv++; argc--; } strcat (msgp->mtext, "\n"); msgp->mtype = 1; if (msgsnd (s, msgp, strlen (msgp->mtext)+1, 1, 0) < 0) --- 205,211 ----- strcat (msgp->mtext, argv[i]); strcat (msgp->mtext, " "); } + strcat (msgp->mtext, "\n"); msgp->mtype = 1; if (msgsnd (s, msgp, strlen (msgp->mtext)+1, 1) < 0) *************** *** 202,208 } strcat (msgp->mtext, "\n"); msgp->mtype = 1; ! if (msgsnd (s, msgp, strlen (msgp->mtext)+1, 1, 0) < 0) { perror ("msgsnd"); exit (1); --- 208,214 ----- strcat (msgp->mtext, "\n"); msgp->mtype = 1; ! if (msgsnd (s, msgp, strlen (msgp->mtext)+1, 1) < 0) { perror ("msgsnd"); exit (1); *** alloca.s.orig Wed Nov 2 13:02:12 1988 --- alloca.s Wed Nov 2 13:04:36 1988 *************** *** 201,206 #define IM #define REGISTER(x) x #else #define IM $ #define REGISTER(x) 0(x) #endif --- 201,210 ----- #define IM #define REGISTER(x) x #else + #ifdef NS5 /* ns SysV assembler */ + #define IM $ + #define REGISTER(x) x + #else #define IM $ #define REGISTER(x) 0(x) #endif *** crt0.c.orig Wed Nov 2 12:25:31 1988 --- crt0.c Wed Nov 2 23:55:42 1988 *************** *** 188,194 #endif /* orion or pyramid or celerity or alliant or clipper */ ! #if defined (ns16000) && !defined (sequent) && !defined (UMAX) _start () { --- 188,194 ----- #endif /* orion or pyramid or celerity or alliant or clipper */ ! #if defined (ns16000) && !defined (sequent) && !defined (UMAX) && !defined (CRT0_DUMMIES) _start () { *************** *** 210,215 exit (main (argc, argv, environ)); } #endif /* ns16000, not sequent and not UMAX */ #ifdef UMAX _start() --- 210,216 ----- exit (main (argc, argv, environ)); } #endif /* ns16000, not sequent and not UMAX */ + #ifdef UMAX _start() *** keymap.c.orig Sun Nov 6 02:01:45 1988 --- keymap.c Sun Nov 20 14:38:36 1988 *************** *** 806,811 i++; } elt = get_keyelt (elt); /* End this iteration if this element does not match --- 806,817 ----- i++; } + #ifndef IWD_FIX /* The following line breaks the case where + * definition is a cons as used by + * function-key-sequence in keypad.el. + * So move this code so it only gets done if + * definition is not a cons + */ elt = get_keyelt (elt); #endif *************** *** 807,812 } elt = get_keyelt (elt); /* End this iteration if this element does not match the target. */ --- 813,819 ----- * definition is not a cons */ elt = get_keyelt (elt); + #endif /* End this iteration if this element does not match the target. */ *************** *** 819,824 continue; } else if (!EQ (elt, definition)) continue; --- 826,838 ----- continue; } else + #ifdef IWD_FIX + { + elt = get_keyelt (elt); + if (!EQ (elt, definition)) + continue; + } + #else if (!EQ (elt, definition)) continue; #endif *************** *** 821,826 else if (!EQ (elt, definition)) continue; /* We have found a match. Construct the key sequence where we found it. */ --- 835,841 ----- #else if (!EQ (elt, definition)) continue; + #endif /* We have found a match. Construct the key sequence where we found it. */ *** m-ns16000.h.orig Sun Mar 15 00:28:11 1987 --- m-ns16000.h Thu Nov 3 01:49:50 1988 *************** *** 46,52 #define NO_UNION_TYPE /* Data type of load average, as read out of kmem. */ ! #define LOAD_AVE_TYPE double /* Convert that into an integer that is 100 for a load average of 1.0 */ --- 46,52 ----- #define NO_UNION_TYPE /* Data type of load average, as read out of kmem. */ ! #ifndef NS5 /* Really depends on operating system rather than on machine */ #define LOAD_AVE_TYPE double /* Convert that into an integer that is 100 for a load average of 1.0 */ *************** *** 52,54 /* Convert that into an integer that is 100 for a load average of 1.0 */ #define LOAD_AVE_CVT(x) ((int) ((x) * 100.0)) --- 52,55 ----- /* Convert that into an integer that is 100 for a load average of 1.0 */ #define LOAD_AVE_CVT(x) ((int) ((x) * 100.0)) + #endif *** malloc.c.orig Wed Nov 2 20:08:33 1988 --- malloc.c Sun Nov 20 14:49:37 1988 *************** *** 714,719 { extern long ulimit (); lim_data = ulimit (3, 0); lim_data -= (long) data_space_start; } --- 714,722 ----- { extern long ulimit (); + #ifdef ULIMIT_BREAK_VALUE + lim_data = ULIMIT_BREAK_VALUE; + #else lim_data = ulimit (3, 0); #endif lim_data -= (long) data_space_start; *************** *** 715,720 extern long ulimit (); lim_data = ulimit (3, 0); lim_data -= (long) data_space_start; } --- 718,724 ----- lim_data = ULIMIT_BREAK_VALUE; #else lim_data = ulimit (3, 0); + #endif lim_data -= (long) data_space_start; } *** sysdep.c.orig Wed Nov 2 16:49:08 1988 --- sysdep.c Sun Nov 20 14:38:30 1988 *************** *** 111,116 #undef TIOCGETP #define TIOCGETP TCGETA #undef TIOCSETN #define TIOCSETN TCSETA #undef TIOCSETP #define TIOCSETP TCSETAF --- 111,124 ----- #undef TIOCGETP #define TIOCGETP TCGETA #undef TIOCSETN + #ifdef IWD_FIX /* Make the driver wait till the output queue + * is empty before changing modes. Otherwise + * the screen can get mangled. This code only + * applies when doing fake-suspends or when + * exiting emacs + */ + #define TIOCSETN TCSETAW + #else #define TIOCSETN TCSETA #endif #undef TIOCSETP *************** *** 112,117 #define TIOCGETP TCGETA #undef TIOCSETN #define TIOCSETN TCSETA #undef TIOCSETP #define TIOCSETP TCSETAF #define TERMINAL struct termio --- 120,126 ----- #define TIOCSETN TCSETAW #else #define TIOCSETN TCSETA + #endif #undef TIOCSETP #define TIOCSETP TCSETAF #define TERMINAL struct termio *************** *** 555,560 #ifdef subprocesses close_process_descs (); /* Close Emacs's pipes/ptys */ #endif execlp (sh, sh, 0); write (1, "Can't execute subshell", 22); _exit (1); --- 564,572 ----- #ifdef subprocesses close_process_descs (); /* Close Emacs's pipes/ptys */ #endif + #ifdef IWD_FIX /* Emacs might be running at HIGHPRI */ + nice(-nice(0)); /* Give the new shell the default piority */ + #endif execlp (sh, sh, 0); write (1, "Can't execute subshell", 22); _exit (1); *************** *** 964,969 clear_end_of_line (screen_width); /* clear_end_of_line may move the cursor */ topos (screen_height - 1, 0); /* Output raw CR so kernel can track the cursor hpos. */ cmputc ('\r'); reset_terminal_modes (); --- 976,982 ----- clear_end_of_line (screen_width); /* clear_end_of_line may move the cursor */ topos (screen_height - 1, 0); + /* Output raw CR so kernel can track the cursor hpos. */ #ifndef IWD_FIX /* This behaviour is objectionable on magic * cookie terminals. The cursor is positioned *************** *** 965,970 /* clear_end_of_line may move the cursor */ topos (screen_height - 1, 0); /* Output raw CR so kernel can track the cursor hpos. */ cmputc ('\r'); reset_terminal_modes (); fflush (stdout); --- 978,990 ----- topos (screen_height - 1, 0); /* Output raw CR so kernel can track the cursor hpos. */ + #ifndef IWD_FIX /* This behaviour is objectionable on magic + * cookie terminals. The cursor is positioned + * so that the first character the system + * sends erases the "return to normal" magic + * cookie. The effect is that the terminal is + * left in standout mode. + */ cmputc ('\r'); #endif reset_terminal_modes (); *************** *** 966,971 topos (screen_height - 1, 0); /* Output raw CR so kernel can track the cursor hpos. */ cmputc ('\r'); reset_terminal_modes (); fflush (stdout); #ifdef BSD --- 986,992 ----- * left in standout mode. */ cmputc ('\r'); + #endif reset_terminal_modes (); fflush (stdout); *************** *** 967,972 /* Output raw CR so kernel can track the cursor hpos. */ cmputc ('\r'); reset_terminal_modes (); fflush (stdout); #ifdef BSD #ifndef BSD4_1 --- 988,994 ----- cmputc ('\r'); #endif reset_terminal_modes (); + fflush (stdout); #ifdef BSD #ifndef BSD4_1 *************** *** 2055,2060 return (-1); } /* VARARGS */ setpriority () { --- 2077,2094 ----- return (-1); } + #ifdef IWD_FIX /* Improved emulation of this function on USG + * systems + */ + setpriority (which, who, prio) + int which, who, prio; + { + int nice(); + + nice(prio - nice(0)); + return (0); + } + #else /* VARARGS */ setpriority () { *************** *** 2060,2066 { return (0); } ! #ifndef HAVE_VFORK /* --- 2094,2100 ----- { return (0); } ! #endif #ifndef HAVE_VFORK /* *** ymakefile.orig Wed Nov 2 11:49:10 1988 --- ymakefile Wed Nov 2 11:48:11 1988 *************** *** 33,38 don't let it interfere with this file. */ #undef register /* Some machines don't find the standard C libraries in the usual place. */ #ifndef LIB_STANDARD #define LIB_STANDARD -lc --- 33,49 ----- don't let it interfere with this file. */ #undef register + /* The NS sysV compiler puts static variables in .data even if they are not + initialised. This is a losage because the dumped emacs moves everthing + in .data to .text. --- IWD + */ + #ifdef NS_STATIC_LOSSAGE + .c.o: move_to_bss + $(CC) -S -g $(CFLAGS) $< + awk -f move_to_bss < $*.s | as -o $*.o + @-rm $*.s + #endif + /* Some machines don't find the standard C libraries in the usual place. */ #ifndef LIB_STANDARD #define LIB_STANDARD -lc