home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / emacs / src / emacs.dif < prev    next >
Encoding:
Text File  |  1992-09-05  |  15.0 KB  |  498 lines

  1. diff -cb src/doc.cmd src.new/doc.cmd
  2. *** src/doc.cmd    Sun May 03 14:20:16 1992
  3. --- src.new/doc.cmd    Sun Aug 16 19:33:13 1992
  4. ***************
  5. *** 1 ****
  6. ! ..\etc\make-docfile -o ..\etc\DOC dispnew.o scroll.o xdisp.o window.o term.o cm.o emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o filemode.o cmds.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o fns.o print.o lread.o abbrev.o syntax.o unexec.o mocklisp.o bytecode.o process.o callproc.o doprnt.o ..\lisp\simple.elc ..\lisp\help.elc ..\lisp\files.elc ..\lisp\window.elc ..\lisp\indent.elc ..\lisp\loaddefs.el ..\lisp\paths.el ..\lisp\startup.elc ..\lisp\lisp.elc ..\lisp\page.elc ..\lisp\register.elc ..\lisp\paragraphs.elc ..\lisp\lisp-mode.elc ..\lisp\text-mode.elc ..\lisp\fill.elc ..\lisp\c-mode.elc ..\lisp\isearch.elc ..\lisp\replace.elc ..\lisp\abbrev.elc ..\lisp\buff-menu.elc ..\lisp\subr.elc ..\lisp\version.el
  7. --- 1 ----
  8. ! ..\etc\make-docfile -o ..\etc\DOC os2.o dispnew.o scroll.o xdisp.o window.o term.o cm.o emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o filemode.o cmds.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o fns.o print.o lread.o abbrev.o syntax.o unexec.o mocklisp.o bytecode.o process.o callproc.o doprnt.o ..\lisp\simple.elc ..\lisp\help.elc ..\lisp\files.elc ..\lisp\window.elc ..\lisp\indent.elc ..\lisp\loaddefs.el ..\lisp\paths.el ..\lisp\startup.elc ..\lisp\lisp.elc ..\lisp\page.elc ..\lisp\register.elc ..\lisp\paragraphs.elc ..\lisp\lisp-mode.elc ..\lisp\text-mode.elc ..\lisp\fill.elc ..\lisp\c-mode.elc ..\lisp\isearch.elc ..\lisp\replace.elc ..\lisp\abbrev.elc ..\lisp\buff-menu.elc ..\lisp\subr.elc ..\lisp\version.el
  9. diff -cb src/editfns.c src.new/editfns.c
  10. *** src/editfns.c    Fri May 01 17:14:24 1992
  11. --- src.new/editfns.c    Sun Aug 16 19:21:20 1992
  12. ***************
  13. *** 100,105 ****
  14. --- 100,109 ----
  15.     if (NULL (tem))
  16.       pw = (struct passwd *) getpwnam (XSTRING (Vuser_name)->data);
  17.   
  18. +   p = (unsigned char *) getenv("FULLNAME");
  19. +   if (p==0)
  20. +   p = (unsigned char *) getenv("USERFULLNAME");
  21. +   if (p==0)
  22.       p = (unsigned char *) (pw ? USER_FULL_NAME : "unknown");
  23.     q = (unsigned char *) index (p, ',');
  24.     Vuser_full_name = make_string (p, q ? q - p : strlen (p));
  25. diff -cb src/emacs.c src.new/emacs.c
  26. *** src/emacs.c    Sat Apr 25 16:20:10 1992
  27. --- src.new/emacs.c    Sun Aug 16 19:15:02 1992
  28. ***************
  29. *** 124,129 ****
  30. --- 124,133 ----
  31.   
  32.   int noninteractive1;
  33.   
  34. + #ifdef OS2
  35. + void ctrl_break_signal();
  36. + #endif
  37.   /* Signal code for the fatal signal that was received */
  38.   int fatal_error_code;
  39.   
  40. ***************
  41. *** 223,228 ****
  42. --- 227,238 ----
  43.     extern int errno;
  44.     extern void malloc_warning ();
  45.     
  46. + #ifdef OS2
  47. +   char pid[32];
  48. +   sprintf(pid, "EMACS_PID=%d", getpid());
  49. +   putenv(pid);
  50. + #endif
  51. +   
  52.   /* Map in shared memory, if we are using that.  */
  53.   #ifdef HAVE_SHM
  54.     if (argc > 1 && !strcmp (argv[1], "-nl"))
  55. ***************
  56. *** 346,352 ****
  57.   #endif
  58.   
  59.   #ifdef OS2
  60. !   environ = envp;
  61.   /* In batch mode, screen output should be normal, else binary */
  62.     if (! noninteractive)
  63.       setmode(1, O_BINARY);
  64. --- 356,362 ----
  65.   #endif
  66.   
  67.   #ifdef OS2
  68. !   /* environ = envp; */
  69.   /* In batch mode, screen output should be normal, else binary */
  70.     if (! noninteractive)
  71.       setmode(1, O_BINARY);
  72. ***************
  73. *** 387,392 ****
  74. --- 397,406 ----
  75.         signal (SIGXFSZ, fatal_error_signal);
  76.   #endif SIGXFSZ
  77.   
  78. + #ifdef OS2
  79. +       signal (SIGBREAK, ctrl_break_signal);
  80. + #endif /* OS2 */      
  81. +       
  82.   #ifdef AIX
  83.         /* This used to run fatal_error_signal,
  84.        but it isn't fatal.  There's nothing Emacs can usefully do.
  85. diff -cb src/fileio.c src.new/fileio.c
  86. *** src/fileio.c    Sun May 03 14:13:23 1992
  87. --- src.new/fileio.c    Sun Aug 16 19:15:03 1992
  88. ***************
  89. *** 603,608 ****
  90. --- 603,613 ----
  91.       }
  92.     else if (p[0] == '/' || p[0] == '\\' || _fngetdrive (p) != 0)
  93.       {
  94. +       /* Find out about Server paths */
  95. +       if ((p[0] == '/' || p[0] == '\\') &&
  96. +       (p[1] == '/' || p[1] == '\\'))
  97. +     return build_string(p);
  98. +             
  99.         rel = 0;
  100.         if (_fngetdrive (p) == 0)
  101.       {
  102. ***************
  103. *** 986,991 ****
  104. --- 991,997 ----
  105.   
  106.     for (p = nm; p != endp; p++)
  107.       {
  108. + #ifndef OS2      
  109.         if ((p[0] == '~' ||
  110.   #ifdef APOLLO
  111.          /* // at start of file name is meaningful in Apollo system */
  112. ***************
  113. *** 1002,1007 ****
  114. --- 1008,1035 ----
  115.   #ifdef VMS
  116.         )
  117.   #endif /* VMS */
  118. + #else  /* OS2 */
  119. + /* Ok, it seems as if the following needs a little explanation:
  120. +    Line 1+2: Detects an absolute path name:
  121. +              ~ / \ indicate absolute pathnames if the previous character
  122. +          is / or \. : indicates absolute pathnames in the sequence
  123. +          /a: or \a:, where a is a character.
  124. +          In the case of / and \ it must be tested, if the sequence
  125. +          starts at the beginning of the file name, since the means
  126. +          name of the server on network software.
  127. +    Line 3:   If the above characters appear at the very beginning of a file
  128. +              name, nothing is to do, but this condition must be tested to
  129. +          secure line 3.
  130. +    Line 4:   Checks wether the chars from Line 1 really appear in sequences
  131. +              that indicates an absolute path name.
  132. +    Uff !
  133. + */
  134. +     
  135. +       if ( (p[0] == '~' || p[1] == ':' 
  136. +         || (p[0] == '/' && p-1!=nm) || (p[0] == '\\' && p-1!=nm))
  137. +           && p!=nm
  138. +       && (p[-1] == '/' || p[-1] == '\\'))
  139. + #endif /* OS2 */    
  140.       {
  141.         nm = p;
  142.         substituted = 1;
  143. diff -cb src/keyboard.c src.new/keyboard.c
  144. *** src/keyboard.c    Sun Apr 19 18:03:23 1992
  145. --- src.new/keyboard.c    Sun Aug 16 19:15:03 1992
  146. ***************
  147. *** 2047,2054 ****
  148.         /* Perhaps should really fork an inferior shell?
  149.        But that would not provide any way to get back
  150.        to the original shell, ever.  */
  151. !       printf ("No support for stopping a process on this operating system;\n");
  152. !       printf ("you can continue or abort.\n");
  153.   #endif /* not VMS */
  154.   #endif /* not SIGTSTP */
  155.         printf ("Auto-save? (y or n) ");
  156. --- 2047,2054 ----
  157.         /* Perhaps should really fork an inferior shell?
  158.        But that would not provide any way to get back
  159.        to the original shell, ever.  */
  160. !       printf ("No support for stopping a process on this operating system;\n\r");
  161. !       printf ("you can continue or abort.\n\r");
  162.   #endif /* not VMS */
  163.   #endif /* not SIGTSTP */
  164.         printf ("Auto-save? (y or n) ");
  165. ***************
  166. *** 2065,2071 ****
  167.         if (((c = getchar ()) & ~040) == 'Y')
  168.       abort ();
  169.         while (c != '\n') c = getchar ();
  170. !       printf ("Continuing...\n");
  171.         fflush (stdout);
  172.         init_sys_modes ();
  173.       }
  174. --- 2065,2071 ----
  175.         if (((c = getchar ()) & ~040) == 'Y')
  176.       abort ();
  177.         while (c != '\n') c = getchar ();
  178. !       printf ("Continuing...\n\r");
  179.         fflush (stdout);
  180.         init_sys_modes ();
  181.       }
  182. diff -cb src/makefile src.new/makefile
  183. *** src/makefile    Sun May 03 14:14:23 1992
  184. --- src.new/makefile    Sun Aug 16 19:34:09 1992
  185. ***************
  186. *** 203,209 ****
  187.    
  188.   
  189.   
  190.    
  191.   
  192.    
  193. --- 203,208 ----
  194. ***************
  195. *** 282,287 ****
  196. --- 281,287 ----
  197.   
  198.   
  199.   
  200.   # 26 "config.h" 2
  201.   
  202.   
  203. ***************
  204. *** 570,576 ****
  205.   
  206.   
  207.   
  208. ! STARTFILES = /emx/lib/crt0.o 
  209.   
  210.    
  211.   
  212. --- 570,576 ----
  213.   
  214.   
  215.   
  216. ! STARTFILES = 
  217.   
  218.    
  219.   
  220. ***************
  221. *** 601,607 ****
  222.   
  223.   
  224.   
  225. ! LD=ld 
  226.   LDFLAGS =    
  227.   
  228.    
  229. --- 601,607 ----
  230.   
  231.   
  232.   
  233. ! LD=gcc
  234.   LDFLAGS =
  235.   
  236.    
  237. ***************
  238. *** 616,623 ****
  239.   
  240.   
  241.   
  242. ! CFLAGS= -g  -Demacs $(MYCPPFLAG)    
  243. !  
  244.   
  245.   
  246.   
  247. --- 616,622 ----
  248.   
  249.   
  250.   
  251. ! CFLAGS= -O -Demacs $(MYCPPFLAG)    
  252.   
  253.   
  254.   
  255. ***************
  256. *** 712,718 ****
  257.   
  258.    
  259.   
  260. ! otherobj= $(termcapobj) lastfile.o $(mallocobj) 
  261.   
  262.    
  263.   lisp=    ${lispdir}simple.elc ${lispdir}help.elc     ${lispdir}files.elc ${lispdir}window.elc     ${lispdir}indent.elc ${lispdir}loaddefs.el ${lispdir}paths.el     ${lispdir}startup.elc ${lispdir}lisp.elc     ${lispdir}page.elc ${lispdir}register.elc     ${lispdir}paragraphs.elc ${lispdir}lisp-mode.elc     ${lispdir}text-mode.elc ${lispdir}fill.elc     ${lispdir}c-mode.elc #    ${lispdir}isearch.elc #    ${lispdir}replace.elc     ${lispdir}abbrev.elc     ${lispdir}buff-menu.elc ${lispdir}subr.elc
  264. --- 711,717 ----
  265.   
  266.    
  267.   
  268. ! otherobj= $(termcapobj) lastfile.o $(mallocobj) os2.o
  269.   
  270.    
  271.   lisp=    ${lispdir}simple.elc ${lispdir}help.elc     ${lispdir}files.elc ${lispdir}window.elc     ${lispdir}indent.elc ${lispdir}loaddefs.el ${lispdir}paths.el     ${lispdir}startup.elc ${lispdir}lisp.elc     ${lispdir}page.elc ${lispdir}register.elc     ${lispdir}paragraphs.elc ${lispdir}lisp-mode.elc     ${lispdir}text-mode.elc ${lispdir}fill.elc     ${lispdir}c-mode.elc #    ${lispdir}isearch.elc #    ${lispdir}replace.elc     ${lispdir}abbrev.elc     ${lispdir}buff-menu.elc ${lispdir}subr.elc
  272. ***************
  273. *** 742,764 ****
  274.   all: xemacs.exe  
  275.   
  276.   xemacs.exe: temacs.exe DOC ${lisp}
  277. !     echo Version is not incremented !
  278.   #    temacs -batch -l inc-vers
  279. !     temacs -batch -l loadup.el dump
  280. !     emxbind -x temacs.exe a.out
  281. !     emxbind -ccore c:\emx\bin\emxl.exe a.out xemacs.exe
  282. !     del a.out
  283. !     del core
  284.   
  285.   
  286.   
  287. --- 741,749 ----
  288.   all: xemacs.exe  
  289.   
  290.   xemacs.exe: temacs.exe DOC ${lisp}
  291. !     cmd /c echo Version is not incremented !
  292.   #    temacs -batch -l inc-vers
  293. !     cmd /c "dump-emacs.cmd"
  294.   
  295.   
  296.   
  297. ***************
  298. *** 777,783 ****
  299.   
  300.   
  301.   
  302. ! temacs.exe:   $(LOCALCPP) $(SHORT) $(STARTFILES) $(OLDXMENU) ${obj} ${otherobj}    
  303.       $(LD) ${STARTFLAGS} ${LDFLAGS} -o temacs.exe ${STARTFILES} ${obj} ${otherobj}     ${LIBES}
  304.   
  305.    
  306. --- 762,768 ----
  307.   
  308.   
  309.   
  310. ! temacs.exe:   $(LOCALCPP) $(SHORT) $(OLDXMENU) ${obj} ${otherobj}    
  311.       $(LD) ${STARTFLAGS} ${LDFLAGS} -o temacs.exe ${STARTFILES} ${obj} ${otherobj}     ${LIBES}
  312.   
  313.    
  314. diff -cb src/s-os2.h src.new/s-os2.h
  315. *** src/s-os2.h    Sun May 03 14:17:04 1992
  316. --- src.new/s-os2.h    Sun Aug 16 19:15:04 1992
  317. ***************
  318. *** 1,5 ****
  319.   
  320. ! /* Definitions file for GNU Emacs running on AT&T's System V Release 3
  321.      Copyright (C) 1987 Free Software Foundation, Inc.
  322.   
  323.   This file is part of GNU Emacs.
  324. --- 1,5 ----
  325.   
  326. ! /* Definitions file for GNU Emacs running on IBM's OS/2 2.0
  327.      Copyright (C) 1987 Free Software Foundation, Inc.
  328.   
  329.   This file is part of GNU Emacs.
  330. ***************
  331. *** 221,225 ****
  332.   
  333.   #define    PENDING_OUTPUT_COUNT(FILE) ((FILE)->ptr - (FILE)->buffer)
  334.   #define SYSTEM_MALLOC
  335. ! #define PURESIZE 200000
  336.   #define CANNOT_UNEXEC
  337. --- 221,227 ----
  338.   
  339.   #define    PENDING_OUTPUT_COUNT(FILE) ((FILE)->ptr - (FILE)->buffer)
  340.   #define SYSTEM_MALLOC
  341. ! #define PURESIZE 300000
  342.   #define CANNOT_UNEXEC
  343. + #define SYMS_SYSTEM    syms_of_os2()
  344. + #define OBJECTS_SYSTEM os2.o
  345. diff -cb src/ymakefile src.new/ymakefile
  346. *** src/ymakefile    Sun Apr 19 17:47:24 1992
  347. --- src.new/ymakefile    Sun Aug 16 19:15:05 1992
  348. ***************
  349. *** 333,346 ****
  350.       @if exist xemacs.exe del xemacs.exe
  351.       @ren temacs.exe xemacs.exe
  352.   #else
  353. -     echo Version is not incremented !
  354.   #    temacs -batch -l inc-vers
  355. -     temacs -batch -l loadup.el dump
  356.   #ifdef OS2
  357. !     emxbind -x temacs.exe a.out
  358. !     emxbind -ccore c:\emx\bin\emxl.exe a.out xemacs.exe
  359. !     del a.out
  360. !     del core
  361.   #endif /* not OS2 */
  362.   #endif /* not CANNOT_DUMP */
  363.   #endif /* not HAVE_SHM */
  364. --- 333,341 ----
  365.       @if exist xemacs.exe del xemacs.exe
  366.       @ren temacs.exe xemacs.exe
  367.   #else
  368.   #    temacs -batch -l inc-vers
  369.   #ifdef OS2
  370. !     cmd /c "dump-emacs.cmd"
  371.   #endif /* not OS2 */
  372.   #endif /* not CANNOT_DUMP */
  373.   #endif /* not HAVE_SHM */
  374. ***************
  375. *** 360,366 ****
  376.   #endif
  377.   
  378.   temacs.exe: MAKE_PARALLEL $(LOCALCPP) $(SHORT) $(STARTFILES) $(OLDXMENU) ${obj} ${otherobj} OBJECTS_SYSTEM OBJECTS_MACHINE
  379. !     $(LD) ${STARTFLAGS} ${LDFLAGS} -o temacs.exe ${STARTFILES} ${obj} ${otherobj} OBJECTS_SYSTEM OBJECTS_MACHINE ${LIBES}
  380.   
  381.   /* These are needed for C compilation, on the systems that need them */
  382.   #ifdef NEED_CPP
  383. --- 355,361 ----
  384.   #endif
  385.   
  386.   temacs.exe: MAKE_PARALLEL $(LOCALCPP) $(SHORT) $(STARTFILES) $(OLDXMENU) ${obj} ${otherobj} OBJECTS_SYSTEM OBJECTS_MACHINE
  387. !     $(LD) ${STARTFLAGS} ${LDFLAGS} -o temacs.exe ${STARTFILES} ${obj} ${otherobj} _fill.o read.o open.o OBJECTS_SYSTEM OBJECTS_MACHINE ${LIBES}
  388.   
  389.   /* These are needed for C compilation, on the systems that need them */
  390.   #ifdef NEED_CPP
  391. ***************
  392. *** 447,452 ****
  393. --- 442,450 ----
  394.   buffer.o : buffer.c syntax.h buffer.h commands.h window.h config.h 
  395.   callint.o : callint.c window.h commands.h buffer.h config.h 
  396.   callproc.o : callproc.c paths.h buffer.h commands.h config.h 
  397. + #ifdef OS2
  398. + os2.o : os2.c config.h
  399. + #endif
  400.   casefiddle.o : casefiddle.c syntax.h commands.h buffer.h config.h 
  401.   cm.o : cm.c cm.h termhooks.h config.h
  402.   cmds.o : cmds.c syntax.h buffer.h commands.h config.h 
  403. diff -cbN src/os2.c src.new/os2.c
  404. *** src/os2.c
  405. --- src.new/os2.c    Tue Jun 23 11:51:13 1992
  406. ***************
  407. *** 0 ****
  408. --- 1,76 ----
  409. + /* OS/2 specific functions for GNU Emacs for OS/2
  410. +    Copyright (C) 1992 Free Software Foundation, Inc.
  411. + This file is part of GNU Emacs.
  412. + GNU Emacs is free software; you can redistribute it and/or modify
  413. + it under the terms of the GNU General Public License as published by
  414. + the Free Software Foundation; either version 1, or (at your option)
  415. + any later version.
  416. + GNU Emacs is distributed in the hope that it will be useful,
  417. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  418. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  419. + GNU General Public License for more details.
  420. + You should have received a copy of the GNU General Public License
  421. + along with GNU Emacs; see the file COPYING.  If not, write to
  422. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  423. + #include <signal.h>
  424. + #include "lisp.h"
  425. + /* Look at ctrl-break-action for explanation. */
  426. + int Vctrl_break_action;
  427. + void ctrl_break_signal()
  428. + {
  429. +   signal(SIGBREAK, SIG_ACK);
  430. +   switch (Vctrl_break_action)
  431. +     {
  432. +     case 0:
  433. +       break;
  434. +       
  435. +     case 1:
  436. +       Vquit_flag = Qt;
  437. +       raise(SIGINT);
  438. +       break;
  439. +     case 2:
  440. +       exit(1); break;
  441. +     case 3:
  442. +       abort(); break;
  443. +     default:
  444. +       break;
  445. +       
  446. +     }
  447. +   
  448. + }
  449. + syms_of_os2()
  450. + {
  451. +   
  452. +   DEFVAR_INT("ctrl-break-action", &Vctrl_break_action,
  453. +      "Determines the behavior of Emacs after Ctrl-Break has been pressed.\n\
  454. + Available only under OS/2.\n\
  455. + 0 : Do nothing, just return C-@.\n\
  456. + 1 : Like C-g C-g, termination with request.\n\
  457. + 2 : Terminate program immediatly without request.\n\
  458. + 3 : Force an abnormal program termination (dump core) without request.\n\
  459. + The default value is 1.
  460. + It is strongly recommended not to use a value of 2 or higher
  461. + since you may loose data after hitting Ctrl-Break !");
  462. +   Vctrl_break_action = 1;
  463. + }
  464. +      
  465.