home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / sgi / 19087 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  18.9 KB

  1. Path: sparky!uunet!spool.mu.edu!agate!doc.ic.ac.uk!sot-ecs!tpm
  2. From: tpm@ecs (TP Monks)
  3. Newsgroups: comp.sys.sgi
  4. Subject: Re: CRISP editor for IRIX 4.0.X
  5. Message-ID: <14276@ecs.soton.ac.uk>
  6. Date: 25 Jan 93 09:50:55 GMT
  7. References: <1993Jan19.190155.21652@ramon.bgu.ac.il>
  8. Sender: news@ecs.soton.ac.uk
  9. Lines: 418
  10. Nntp-Posting-Host: elstar
  11.  
  12. mary@chen.bgu.ac.il (Marina Markus) writes:
  13.  
  14. >Hello !
  15.  
  16. >I seek advice for installing the CRISP editor at our Silicon Graphics
  17. >workstation. I've tried different configurations, but didn't manage
  18. >to compile CRISP source files.
  19.  
  20. >If there is anybody with CRISP successfully working on his SG, please
  21. >tell me which "machihe.h" and "s-machine" files you use.
  22.  
  23. The following used to work pre-IRIX4.0.5.  I haven't tried compiling
  24. since then.  You may need to add -cckr to the CFLAGS somewhere.
  25. My version occasionally crashes, but its infrequent enough to really bug
  26. me since crisp is far-and-away the best editor available (as is Brief
  27. for PSs).
  28.  
  29. On the down side:
  30. I spent quite some effort telling the writers how to get it to compile on 
  31. SGI machines since they said they were releasing a new version, and even
  32. sent them some of *my* disks with code on.  When the new release finally 
  33. appeared it turned out that there was a fairly high price for it.
  34. This pissed me off quite considerably, and so I asked for my disks back
  35. which of course never re-appeared.  To ask for help in this way without 
  36. making it clear that its for a non shareware product was wrong.
  37.  
  38. Needless to say, I bet the new version doesn't crash !
  39.  
  40. Tim
  41.  
  42.          
  43. ******************************************************
  44. s-machine.h
  45. ******************************************************
  46.  
  47. #! /bin/sh
  48. # Machine dependent environment variables to control 
  49. # making of CRISP sources.
  50. #
  51. # This file is for generic System V systems. It has been tested under
  52. # Interactive Unix V.3 rel 2.2. If you have a pre-V.3 system (i.e. without
  53. # shared libraries) then you should comment out the SHLIB= definition
  54. # below.
  55. #
  56. SHLIB="-lc -lbsd -lsun -lgen"
  57. ########
  58. # Uncomment out the following line if you don't want the floating point
  59. # library to be included. This disables the sin(), cos(), tan(), etc
  60. # functions but otherwise doesn't affect crisp (except the floating
  61. # point calculator).
  62. #NO_FLOAT_MATH=-DNO_FLOAT_MATH
  63. ########
  64. #  Select one of following for your system.
  65. # another tpm hack... ld complains about -systype ...
  66. CC="cc"
  67. #CC="cc -systype sysv"
  68. #CC="gcc -ansi -W -Wall -pedantic"
  69. ########
  70. #  Select one of following for your system.
  71. #G=-g; export G
  72. G=-O; export G
  73. ########
  74. DIR=`pwd`
  75. PATH=$DIR:$DIR/crunch:$PATH
  76. export SHLIB CC PATH NO_FLOAT_MATH
  77.  
  78.  
  79. ******************************************************
  80. machine.h
  81. ******************************************************
  82.  
  83. /************************************************************************
  84.  *                                                                      *
  85.  *        CRISP - Custom Reduced Instruction Set Programmers Editor     *
  86.  *                                                                      *
  87.  *        (C) Paul Fox, 1989, 1991                                      *
  88.  *                                                                      * 
  89.  *  File:  machine.h                                                    * 
  90.  *                                                                      * 
  91.  *  This file contains the #defines necessary to configure different    *
  92.  *  machine architectures.                                              *
  93.  *                                                                      *
  94.  ************************************************************************/
  95.  
  96. # define        CR_ACORN        0       /* Acorn running Risc IX        */
  97. # define        CR_AIX_3        0       /* AIX v3 -- not tested.        */
  98. # define        CR_DOS          0       /* MS-DOS C5.1 and OS2          */
  99. # define        CR_SUN_OS3      0       /* Sun running SunOS 3.x        */
  100. # define        CR_SUN_OS40     0       /* Sun running SunOS 4.0        */
  101. # define        CR_SUN_OS41     0       /* Sun running SunOS 4.1        */
  102. # define        CR_SYSV         1       /* Generic System V.            */
  103. # define        CR_SYSV_3_2     0       /* Generic System V.3.2         */
  104. # define        CR_SYSV_32_PTY  0       /* Generic System V.3.2 with PTY*/
  105. # define        CR_VMS          0       /* VMS 4.7 and above.           */
  106. # define        CR_XENIX        0       /* Xenix 2.2 and above.         */
  107.  
  108. /************************************************************************
  109.  *                                                                      *
  110.  *    The  following  describes  the various parameters which control   *
  111.  *    compilation   of   CRISP.   After  the  comments  are  separate   *
  112.  *    sections    for    the   different   machine/operating   system   *
  113.  *    conbinations  already  supported. If you are producing your own   *
  114.  *    description  then  you  should  first  try to determine whether   *
  115.  *    your machine is a mostly System V variant or BSD variant.         *
  116.  *                                                                      *
  117.  *   BSD                This is used to indicate that the system is     *
  118.  *                      more a BSD derivative than a System V. It       *
  119.  *                      affects certain features which may actually     *
  120.  *                      only be true of SunOS.                          *
  121.  *                                                                      *
  122.  *   CANNOT_UNLINK_OPEN_FILES                                           *
  123.  *                      System doesnt support Unix unlink() on an open  *
  124.  *                      file semantic.                                  *
  125.  *                                                                      *
  126.  *   DIRSIZ_DEFINED     This should be define'd if the POSIX directory  *
  127.  *                      access include files are wrong. (Are they wrong *
  128.  *                      or right ? - I'm not sure - basically if you    *
  129.  *                      have problems with this defined try undeffing it. *
  130.  *                                                                      *
  131.  *   EGA43              If this is defined, then code for supporting    *
  132.  *                      the EGA in 43 line mode on a PC is compiled in. *
  133.  *                      This is only supported for Unix V.3.2.          *
  134.  *                                                                      *
  135.  *   HAVE_MOUSE         Define this if you want the mouse code compiled *
  136.  *                      in. (Only do this if the mouse code is          *
  137.  *                      supported for your system).                     *
  138.  *                                                                      *
  139.  *   HAVE_PTY           This is used to compline in the code for        *
  140.  *                      process buffers. If your machine has the        *
  141.  *                      Berkeley /dev/pty driver, then define this.     *
  142.  *                      Otherwise CRISP will try and used pipes.        *
  143.  *                                                                      *
  144.  *   HAVE_SGTTY         System supports old style terminal interface.   *
  145.  *                                                                      *
  146.  *   HAVE_SIGINTERRUPT  System supports Sun compatible siginterrupt()   *
  147.  *                      system call.                                    *
  148.  *                                                                      *
  149.  *   HAVE_SIGSETMASK    The system call sigsetmask is defined. TRUE     *
  150.  *                      under some versions of SunOS. Used for job      *
  151.  *                      control.                                        *
  152.  *                                                                      *
  153.  *   HAVE_TERMIO        System supports old style terminal interface    *
  154.  *                      System V terminal interface.                    *
  155.  *                                                                      *
  156.  *   HAVE_TERMIOS       System supports POSIX style terminal interface. *
  157.  *                                                                      *
  158.  *   HAVE_WAITPID       System has System V (POSIX) waitpid() call with *
  159.  *                      <sys/wait.h> to get the definitions.            *
  160.  *                      On systems which dont have this, CRISP may hang *
  161.  *                      if we get SIGCHLD signals when we're not        *
  162.  *                      expecting them. Please read comment in def.h    *
  163.  *                      about why we don't actually include the         *
  164.  *                      include file.                                   *
  165.  *                                                                      *
  166.  *   LINEFEED_DOES_CR   Defined on systems where \n outputs a \r as well*
  167.  *                                                                      *
  168.  *   MONOCASE_FILENAMES Define this if operating system ignores case    *
  169.  *                      in filenames.                                   *
  170.  *                                                                      *
  171.  *   NO_FLOAT_MATH      Define this if you dont want the floating       *
  172.  *                      point primitives to be included, i.e. sin(),    *
  173.  *                      cos(), etc. (You still have access to raw       *
  174.  *                      floating point). This setting should be machine *
  175.  *                      independent so you shoudl check your s-machine  *
  176.  *                      file first.                                     *
  177.  *                                                                      *
  178.  *   NO_SYS_DIR_H       The file <sys/dir.h> does not exist.            *
  179.  *                                                                      *
  180.  *   ONLY_ONE_EXTENSION System only allows one '.' in filename.         *
  181.  *                                                                      *
  182.  *   MALLOC             This tells the code that there is no            *
  183.  *                      <malloc.h> file and that the malloc() library   *
  184.  *                      may behave in strange ways which may force us   *
  185.  *                      to optimise our usage. It is really only        *
  186.  *                      necessary if your system doesn't support the    *
  187.  *                      SVID mallopt() call.                            *
  188.  *                                                                      *
  189.  *   OPCODE             This is used to control the use of the enum     *
  190.  *                      OPCODE typedef in the list.h. It doesn't matter *
  191.  *                      if you set this to 'int' as below, but if it is *
  192.  *                      undefined then it is easier to debug the CRISP  *
  193.  *                      lisp-code. Older Unix C compilers do not treat  *
  194.  *                      enum's and int's as the same type and will      *
  195.  *                      complain during compilation.                    *
  196.  *                                                                      *
  197.  *   SELECT             SELECT should be defined if we can do a         *
  198.  *                      select() on the keyboard and on the process     *
  199.  *                      pty's/pipes. This will tend to be true on BSD   *
  200.  *                      systems, and Sys V.4. Alas, poll() isn't        *
  201.  *                      generally applicable on V.3 because the         *
  202.  *                      standard pipe and tty drivers are streams       *
  203.  *                      modules.                                        *
  204.  *                                                                      *
  205.  *   SPAWN              System supports a 'spawn' primitive rather      *
  206.  *                      than fork/exec.                                 *
  207.  *                                                                      *
  208.  *   SUN                Operating system is SunOS 3.x or SunOS 4.x.     *
  209.  *                                                                      *
  210.  *   SYSV               Operating is a System V derivative.             *
  211.  *                                                                      *
  212.  *   U_CHAR             CRISP defines a typedef called u_char. Some     *
  213.  *                      Unix systems also define this type in one of    *
  214.  *                      the system header files (<sys/types.h>) which   *
  215.  *                      causes a compilation error. If you have this    *
  216.  *                      typedef in your system header file, then        *
  217.  *                      #define U_CHAR.                                 *
  218.  *                                                                      *
  219.  *   VERSION            Set this to a number representing the operating *
  220.  *                      system version number. Used for major           *
  221.  *                      differences in working, eg Xenix versions.      *
  222.  *                                                                      *
  223.  *   WANT_SYS_SOCKET_H  Interactive Unix wants <sys/socket.h> when      *
  224.  *                      using the select() system call.                 *
  225.  *                                                                      *
  226.  *   WANT_GETCWD        This define causes us to load our own getcwd()  *
  227.  *                      function. The standard Unix/Xenix one works     *
  228.  *                      by forking a '/bin/pwd' process and reading     *
  229.  *                      the output from it. This is not only bloody     *
  230.  *                      awful, but causes problems with process buffers *
  231.  *                      when the sub-process dies. (We get an unwanted  *
  232.  *                      SIGCHLD).                                       *
  233.  *                                                                      *
  234.  *   WINDOW_SIZE_SUPPORTED                                              *
  235.  *                      Define this if system supports TIOCGWINSZ       *
  236.  *                      ioctl to get size of pty window.                *
  237.  *                                                                      *
  238.  *   WORD_SIZE_16       TRUE for 16 bit machines. It simply restricts   *
  239.  *                      the size of chunks read in from input files.    *
  240.  *                                                                      *
  241.  ************************************************************************/
  242.  
  243. # if CR_AIX_3
  244.         /***********************************************/
  245.         /*   This  entry  not  tested  but  based  on  */
  246.         /*   updates  I  received  for  v1.9  & v2 by  */
  247.         /*   Warren Jones                              */
  248.         /***********************************************/
  249. #       define  DIRSIZ_DEFINED
  250. #       define  GOT_STDLIB
  251. #       define  HAVE_PTY
  252. #       define  HAVE_TERMIO
  253. #       define  SELECT 
  254. #       define  SYSV
  255. #       define  U_CHAR
  256. #       define  VERSION 31
  257. #       define  WANT_GETCWD
  258. #       define  WINDOW_SIZE_SUPPORTED
  259. # endif
  260.  
  261. # if    CR_DOS
  262. #       define  CANNOT_UNLINK_OPEN_FILES
  263. #       define  DIRSIZ_DEFINED
  264. #       define  FOPEN_R_BINARY  "rb"
  265. #       define  FOPEN_W_BINARY  "wb"
  266. #       define  LINEFEED_DOES_CR
  267. #       define  MONOCASE_FILENAMES
  268. #       define  OPEN_R_BINARY   O_BINARY
  269. #       define  OPEN_W_BINARY   O_BINARY
  270. #       define  SYSV 
  271. #       define  ONLY_ONE_EXTENSION
  272. #       define  SPAWN
  273. #       define  WORD_SIZE_16
  274. #       define  GOT_STDLIB
  275. # endif  
  276.  
  277. # if    CR_SUN_OS3
  278.         /***********************************************/
  279.         /*   This  entry  has  not been verified, and  */
  280.         /*   is subject to removal.                    */
  281.         /***********************************************/
  282. #       define  SUN
  283. #       define  BSD
  284. #       define  HAVE_SIGINTERRUPT
  285. #       define  DIRSIZ_DEFINED
  286. #       define  OPCODE  int 
  287. /*#     define  HAVE_PTY        *//* Not tried under SunOS 3.x */ 
  288. #       define  WINDOW_SIZE_SUPPORTED
  289. #       define  SELECT 
  290. #       define  U_CHAR
  291. #       define  WANT_GETCWD
  292. #       define  HAVE_SGTTY
  293. # endif 
  294.  
  295. # if    CR_ACORN
  296. #       define  BSD
  297. #       define  HAVE_PTY
  298. #       define  HAVE_SGTTY
  299. #       define  HAVE_SIGSETMASK
  300. #       define  NO_SYS_DIR_H
  301. #       define  SELECT 
  302. #       define  SUN
  303. #       define  WANT_GETCWD
  304. #       define  WINDOW_SIZE_SUPPORTED
  305. #       define  U_CHAR
  306. # endif 
  307. # if    CR_SUN_OS40
  308. #       define  BSD
  309. #       define  DIRSIZ_DEFINED
  310. #       define  HAVE_PTY
  311. #       define  HAVE_SIGINTERRUPT
  312. #       define  HAVE_SIGSETMASK
  313. #       define  HAVE_TERMIO
  314. #       define  SELECT 
  315. #       define  SUN
  316. #       define  U_CHAR
  317. #       define  WANT_GETCWD
  318. #       define  WINDOW_SIZE_SUPPORTED
  319. # endif 
  320.  
  321. # if    CR_SUN_OS41
  322. #       define  BSD
  323. #       define  DIRSIZ_DEFINED
  324. #       define  GOT_STDLIB
  325. #       define  HAVE_PTY
  326. #       define  HAVE_SIGINTERRUPT
  327. #       define  HAVE_SIGSETMASK
  328. #       define  SELECT 
  329. #       define  SUN
  330. #       define  WINDOW_SIZE_SUPPORTED
  331. #       define  WANT_GETCWD
  332. #       define  HAVE_TERMIO
  333. #       define  HAVE_WAITPID
  334. #       define  U_CHAR
  335. # endif 
  336.  
  337. # if    CR_SYSV
  338. #       define  SYSV 
  339. #       define  HAVE_TERMIO
  340. #       define  WANT_GETCWD
  341. #       define  GOT_STDLIB
  342. /* the following are mods - tpm 8/91 */
  343. #       define  HAVE_MOUSE
  344. #       define  HAVE_WAITPID
  345. #       define  SELECT
  346. #       define  U_CHAR
  347. #       define  DIRSIZ_DEFINED
  348. # endif 
  349.  
  350. # if    CR_SYSV_3_2
  351. #       define  SYSV
  352. #       define  WANT_GETCWD
  353. #       define  HAVE_TERMIO
  354. #       define  EGA43
  355. #       define  GOT_STDLIB
  356. # endif 
  357.  
  358. /**********************************************************************/
  359. /*   Following  entry  works  for  Interactive  Unix  V.3.2 with TCP  */
  360. /*   support.                                                         */
  361. /**********************************************************************/
  362. # if    CR_SYSV_32_PTY
  363. #       define  EGA43
  364. #       define  GOT_STDLIB
  365. #       define  HAVE_MOUSE
  366. #       define  SELECT
  367. #       define  SYSV
  368. #       define  WANT_GETCWD
  369. #       define  HAVE_PTY
  370. #       define  HAVE_TERMIO
  371. #       define  HAVE_WAITPID
  372. #       define  WANT_SYS_SOCKET_H
  373. #       define  U_CHAR
  374. # endif
  375.  
  376. # if    CR_VMS
  377. #       define  VMS
  378. #       define  DIRSIZ_DEFINED
  379. #       define  MALLOC
  380. #       define  CANNOT_UNLINK_OPEN_FILES
  381. # endif
  382.  
  383. # if    CR_XENIX
  384. #       define  WANT_GETCWD
  385. #       define  SYSV
  386. #       define  OPCODE  int 
  387. #       define  HAVE_TERMIO
  388. #       define  VERSION 23
  389. #       if      VERSION < 23
  390. #               define  DIRSIZ_DEFINED
  391. #       else
  392. #               define  SELECT
  393. #               define  PTY
  394. #       endif
  395. # endif 
  396.  
  397. /**********************************************************************/ 
  398. /*   This section gives some default values to various definitions.   */
  399. /**********************************************************************/
  400.  
  401. # if    !defined(OPEN_W_BINARY)
  402. #       define  OPEN_W_BINARY   0
  403. #       define  OPEN_R_BINARY   0
  404. # endif
  405. # if    !defined(FOPEN_W_BINARY)
  406. #       define  FOPEN_W_BINARY  "w"
  407. #       define  FOPEN_R_BINARY  "r"
  408. # endif
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425. --
  426. -----------------------------------------------------------------------------
  427. Tim Monks                                Vision, Speech and Signal Processing
  428. tpm@ecs.soton.ac.uk                                    Southampton University
  429. Tel: +44 (703) 592774                                   Fax: +44 (703) 592895
  430.