home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / editor / j414src.arc / README.MAC < prev    next >
Text File  |  1989-10-10  |  18KB  |  411 lines

  1. /***************************************************************************
  2.  * This program is Copyright (C) 1986, 1987, 1988 by Jonathan Payne.  JOVE *
  3.  * is provided to you without charge, and with no warranty.  You may give  *
  4.  * away copies of JOVE, including sources, provided that this notice is    *
  5.  * included in all the files.                                              *
  6.  ***************************************************************************/
  7.  
  8. Changes between 4.9 and 4.10:
  9.  
  10.   New features:
  11.     1) Reshapeable windows with zoom boxes.
  12.     2) Filename/directory name completion with macify OFF.
  13.     3) Double click mouse to set the mark.
  14.     4) Control-space and control-@ correctly send NUL on MacII/SE.
  15.     5) Control-` fixed to send backquote char.
  16.     6) Display update code fixed.
  17.     
  18.   Sources:
  19.     1) Compiles under LSC 3.0. (Probably under 2.13 as well, but
  20.        not tested with that version).
  21.     2) Include files redone, with fewer total lines of code.
  22.     3) No need to modify include files, unless NBUF changed.
  23.     4) "keymaps.txt" is now "keys.txt".
  24.     
  25.   Planned:
  26.     1) Recover command as separate application.
  27.     2) Support for MPW compiler vers 2.02.
  28.     
  29.    
  30. Introduction
  31.  
  32. This file contains a brief description of MacJove, along with
  33. information necessary to make MacJove from the source files.
  34. It is assumed that the reader is familiar with Jove from other
  35. systems, and is somewhat familiar with the Macintosh as well. In
  36. the future there may be a separate user's manual for MacJove: 
  37. for the time being, the reader should refer to the Jove manual
  38. for Unix users.
  39.  
  40. Description
  41.  
  42. MacJove is a direct port of Jove to the Macintosh, with the
  43. overall structure, commands and key bindings left intact. In
  44. addition, elements of the Macintosh user interface - menus,
  45. window controls, and the mouse, have been integrated in a manner
  46. consistent with the overall functioning of Jove.
  47.  
  48. While the integration of these tools into the Jove environment
  49. is consistent and, to most users, familiar, Jove departs in
  50. several places from "Macintosh User Interface Guidelines". Most
  51. notably, the mouse is used to position the point only, not to
  52. drag or select text, and the Jove buffer structure is not
  53. integrated with the clipboard. Also, key bindings conform to
  54. Jove/Emacs tradition, and not to Macintosh guidelines: i.e.
  55. control (command)-N is next-line, not "NewFile". The reason for
  56. these departures is that the majority of MacJove users are likely
  57. to be those already familiar with Jove or other Emacs editors
  58. on other systems, and for these users, consistency between machines
  59. and operating systems is more important than fully exploiting
  60. the features of a single system. There are numerous other text
  61. editors which fully follow the Macintosh User Interface Guidelines.
  62.  
  63. MacJove retains most features of other Joves, but certain commands
  64. cannot be implemented because of the Macintosh operating system.
  65. Thus, there is no way to run a sub-process or a shell in a window,
  66. because there are no shells to run on the Macintosh, and a program
  67. (currently) can only transfer control to another program, not run
  68. a child process. For similar reasons, commands dealing with mail,
  69. with running make, and checking errors, are omitted.
  70.  
  71.  
  72.  
  73.                       Running MacJove
  74.  
  75. System Requirements
  76.  
  77. MacJove should run without difficulty on any Macintosh Plus, SE, or
  78. Macintosh II, providing that the hierarchical file system (HFS) is used, and
  79. assuming a reasonably current system file is used. An upgraded 512K Mac
  80. (with 128K rom) should also work if there is enough memory.  MacJove was
  81. developed on a Macintosh Plus and Macintosh II running system 4.2 and Finder
  82. 6.0., and has not been fully tested on earlier systems - however, it is
  83. likely that it will run on system 3.2 and later versions. MacJove has been
  84. used to a limited extent with Switcher and under Multifinder. In both cases,
  85. it is important to reserve enough memory for MacJove, as discussed below.
  86.  
  87. MacJove, as compiled from the sources, uses memory as follows:
  88.  
  89.    Program Code     approx 116K
  90.    Static Data      approx  20K
  91.    Tempfile Cache           64K (heap)
  92.                            ____
  93.                            200K total before stack/heap considerations
  94.  
  95. To this must be added stack and heap space. A bare minimum for this is
  96. probably 100K or so, but the usage will vary as buffers are created.  With
  97. Jove, the file itself takes up space only in the tempfile and its cache, but
  98. the buffer structure requires 3 pointers (12 bytes) for each line in the
  99. file. For a reasonable editing session with files totalling, say 10000 to
  100. 20000 lines, this additional space can add up. For this reason, it is
  101. unrealistic to expect to run Jove on a 512K system, unless a very small
  102. system file is used, few, small files are edited each session, and the
  103. tempfile cache is reduced (see cache size under Making Jove). You can
  104. experiment with various memory allocations under Switcher and Multifinder to
  105. see what works with your editing habits (backup your files first!), but a
  106. realistic minimum is 400K - 500K and more is great.
  107.  
  108. When first using MacJove, and if memory space is questionable, SAVE YOUR
  109. FILES FREQUENTLY. If it is necessary to edit many files, it is often better
  110. to exit MacJove and restart once in a while, especially if there is a
  111. question of limited memory.
  112.  
  113. Operation
  114.  
  115.  
  116. Running MacJove is similar to other Macintosh applications, and should be
  117. intuitive. You start up MacJove by either opening, or double-clicking,
  118. the MacJove icon. If you have previously saved files created with MacJove,
  119. double-clicking on them will also start up the program, and the files will
  120. be put into buffers. Several files can be selected simultaneously by this
  121. method. There is no current way to select command-line options with
  122. MacJove, but this may change in the future.
  123.  
  124. The .joverc file, if used, must be present in the same directory as MacJove,
  125. the "home" directory. The help file, "cmds.doc", must also be in this
  126. directory. The tempfile, ".joveXXX", will be placed in whatever directory is
  127. current when the tempfile is first opened - this may or may not be the home
  128. directory, and may change in the future. The recover file, ".jrecXXX" is
  129. placed in the home directory. While this file is created and updated as on
  130. Unix versions of Jove, there is currently no "recover" program for MacJove.
  131. Hopefully, this will be available soon.
  132.  
  133. MacJove can edit any text file on the Macintosh, whether created with
  134. MacJove or another editor. It cannot be used to edit graphics material, and
  135. graphics material cannot be inserted during operation of MacJove. Files
  136. created with MacJove are of type 'TEXT' and of signature 'JV01'. This
  137. signature is being registered with Apple, and may change if necessary. Note
  138. that once MacJove files have been re-edited with another editor, they likely
  139. will have new signatures, and double-clicking on them will start the other
  140. editor, not MacJove.
  141.  
  142. The standard Macintosh keyboard is inadequate for MacJove (and most anything
  143. else), so that it is necessary to change a couple of keys. The "`" key
  144. becomes the ESCAPE key, since it is in the right place for one: to send a
  145. real "'", hold the command key down while typing it. The command key is used
  146. for a control key - unfortunately, the location of it is horrible for such a
  147. purpose. On Macintosh SE and Macintosh II models, a real escape key exists,
  148. and also a real control key. Note, however, that because of a small bug in
  149. the keyboard encoding in MacJove, you cannot directly send a NUL (control-@)
  150. with the control key. Typing command-@ or command-2 will still do this,
  151. however.
  152.  
  153. During operation, you can use the keyboard as you would when running Jove on
  154. any other system. However, many commands also have menu equivalents:  as
  155. long as MacJove is waiting for a command, you can use either the keyboard or
  156. the menus. Once you begin selecting a command with either the menus or the
  157. keyboard, the other is locked out: thus, once you type control-X, MacJove
  158. expects more characters, and will not let you choose menu items.  Also, if
  159. you are prompted for input on the command line, the menus are locked out.
  160. Regardless of how a command is begun, however, only the prompt line (message
  161. line) is used for input: MacJove does not use dialog boxes, except under the
  162. "About Jove" menu selection.
  163.  
  164. Commands listed in the menus are given exactly as their string name in
  165. the command list, for example "write-file". In addition, variables are
  166. listed under the "Set" menu. Variables are grouped by type. Non-boolean
  167. variables are changed on the message line after being selected. Boolean
  168. variables are marked with a check mark if on, and selecting them toggles
  169. the value of the variable.
  170.  
  171. The "Buffer" menu is a special menu, whose action is different than the
  172. others. The first entries on this menu are the major and minor modes of
  173. operation, with those of the current buffer marked with check marks.
  174. Clicking on a major mode will change the major mode of the current buffer to
  175. that mode, while clicking on a minor mode will toggle that mode's status
  176. (on/off) for the current buffer. Beneath this is a list of buffers, one for
  177. each menu item, with the current buffer marked. Clicking on a buffer selects
  178. that as the current buffer, and the active window will change accordingly.
  179.  
  180. Window controls (scroll bars) work as expected, and are simply bound to
  181. the appropriate MacJove command. Occassionally the position of the
  182. scroll bar may appear inaccurate, particularly with a small buffer.
  183.  
  184. Files and directories may be selected in two ways. The default method
  185. is to use the message line to input filenames, and to change directories
  186. using "cd". If the variable "macify" is set, however, filenames and
  187. directories can also be set using the standard file dialogs familiar to
  188. most Mac users. Filename paths are normally given via Unix conventions,
  189. and not Macintosh conventions: i.e. directories are separated with "/"
  190. and not ":". On the Buffer menu, however, filenames are listed with ":"
  191. as the separation character, since "/" cannot be displayed in menu items.
  192. It is not possible to back up directories beyond the volume level, so
  193. there is not true "root". To change volumes (disks), macify must be on,
  194. and the "Drive" selection used.
  195.  
  196. "Macify" only works for those commands which REQUIRE a file operation, such
  197. as "visit-file", "insert-file", "write-file".  Operations which first look
  198. in buffers for files, such as "window-find" and "find-file" never use the
  199. standard file dialogs.
  200.  
  201. For a list of all commands and bindings, click on "About Jove" in the
  202. Apple menu. In the future this may also support the help file.
  203.  
  204.                       Making MacJove
  205.  
  206. System Requirements
  207.  
  208. To make MacJove from the sources, you need a hard disk based Macintosh, at
  209. least 1 mb of ram, and the LightspeedC compiler, version 2.13 or later.
  210. Earlier versions may work but have not been used recently. Allow for the
  211. MacJove files to take up to 1.5 mb of your hard disk. You will need a copy
  212. of the "BinHex" utility, also.
  213.  
  214. Since LightspeedC does not work with a Makefile, none is supplied. In
  215. general, the compiler itself will figure out dependencies for you, within a
  216. "project". Since there are three separate projects to MacJove, you will
  217. still have to keep track of some changes, particularly for the setmaps
  218. project. Also, since LightspeedC only knows of .c and .h dependencies,
  219. you will have to keep track of setmaps.txt and menumaps.txt yourself.
  220.  
  221. Preliminary Steps
  222.  
  223. 0) CREATE A FOLDER (DIRECTORY) FOR JOVE. If I have to tell you how to do
  224. that, don't go any further! Copy the source files - a few aren't needed
  225. by MacJove, but copy them anyway, so you'll have them in one place. You
  226. do not need anything in the "doc" subdirectory to create MacJove (but
  227. you will eventually need cmds.doc, the help file, if you want the
  228. "describe-command" command to work).
  229.  
  230. 1) CREATE THE RESOURCE FILE: There is only one eight-bit file supplied,
  231. "mjove.rsrc". This is a small file which contains the program icon and a
  232. dialog template. This file must have the same name as the MacJove project,
  233. plus extension ".rsrc". The MacJove project (below), has name "mjove", so
  234. this file is "mjove.rsrc".  IF YOU RENAME THE PROJECT YOU MUST RENAME THIS
  235. FILE, ALSO. Using "BinHex", unload the file "mjovers.Hqx" --> "mjove.rsrc".
  236.  
  237. 2) CREATE THE "MJOVELIB" PROJECT: MacJove does not use many of the library
  238. functions. Despite what the LightspeedC manual states, projects are loaded
  239. as a whole: since we need only a few functions, we will build a "library" of
  240. them in the form of a project. Run LightspeedC and create a new project,
  241. and name it "mjovelib". Add the following files, from the Library Sources,
  242. to the project. They all go in the same segment:
  243.  
  244.      onexit.c
  245.      qsort.c
  246.      stddata_ctype.c
  247.      unixexit.c
  248.      unixid.c
  249.      unixmem.c
  250.      unixtime.c
  251.  
  252. 3) EXAMINE THE FILE UNIXTIME.C and make the following correction, if
  253. necessary. The LightspeedC library function "unixtime.c" returns a string
  254. containing the time for what is supposed to be Greenwich Mean Time, instead
  255. of local time. Using the LightspeedC editor, and with the project open,
  256. examine the file, comment out the definition of "GMTzonedif", and add:
  257.  
  258.      #define GMTzonedif 0
  259.  
  260. 4) MAKE THE "MJOVELIB" PROJECT. Keeping the edited "unixtime.c" open,
  261. run "make" on the project - everything will be compiled, with the altered
  262. version of "unixtime.c". You do not have to permanently save the change
  263. to unixtime.c, but if you do not, the next time you run "make" on the
  264. project, it will tell you that it needs recompiling - simply ignore it.
  265. After the mjovelib project is made, close it. You do not have to convert it
  266. to a library - it is okay to leave it as a project.
  267.  
  268. 6) CREATE THE "MSETMAPS" PROJECT. Create a new project, name it "msetmaps",
  269. and add the following files to it:
  270.  
  271.      setmaps.c
  272.      stdio
  273.      strings           (segment 1)
  274.      unix
  275.      unix main.c
  276.      --------
  277.      MacTraps          (segment 2)
  278.  
  279.  
  280. You should not change anything else at this point - unless you want to
  281. reduce memory requirements (see "Running MacJove", above). If it is
  282. necessary to reduce the memory requirements, then reduce the number of cache
  283. buffers, NBUF, which is defined near the end of the file (each buffer takes
  284. up 1K of space while MacJove is running).
  285.  
  286. #ifdef MAC
  287. # undef F_COMPLETION
  288. # define F_COMPLETION 1
  289. # define rindex strrchr
  290. # define bzero(s,n) setmem(s,n,0)
  291. # define swritef sprintf
  292. # define LINT_ARGS 1
  293. # define NBUF 64 <---- here
  294. # define BUFSIZ 1024
  295. # undef LISP
  296. # define LISP 1
  297. # define ANSICODES 0
  298. # undef ABBREV
  299. # define ABBREV 1
  300. # undef CMT_FMT
  301. # define CMT_FMT 1
  302. #endif
  303.  
  304. 7) MAKE THE "MSETMAPS" PROJECT. Then choose "Build Application",and name it
  305. "setmaps". 
  306.  
  307. 8) RUN "SETMAPS" ON THE KEYMAPS.TXT FILE. You can either run "setmaps" from
  308. LightspeedC, before closing the project, or as the standalone application.
  309. When prompted for the "Unix command line", enter:
  310.  
  311.      < keys.txt > keys.c
  312.  
  313. You will get a few messages from setmaps that it can't find certain
  314. commands. You can ignore these.
  315.  
  316. 9) RUN "SETMAPS" ON THE MENUMAPS.TXT FILE. Just as before, run "setmaps"
  317. and enter the following command line:
  318.  
  319.      < menumaps.txt > menumaps.c
  320.  
  321. You should not get any messages from setmaps. If the "msetmaps" project is
  322. still open, close it.
  323.  
  324. 10) CREATE THE "MJOVE" PROJECT. Create a new project, name it "MJOVE" and
  325. set the Creator (signature) to 'JV01'. Add the following files in the
  326. following segments:
  327.  
  328.      abbrev.c
  329.      argcount.c
  330.      ask.c
  331.      buf.c
  332.      c.c
  333.      case.c        (segment 1)
  334.      ctype.c
  335.      delete.c
  336.      disp.c
  337.      extend.c
  338.      keys.c
  339.      --------
  340.      fmt.c
  341.      fp.c
  342.      funcdefs.c    (segment 2)
  343.      insert.c
  344.      io.c
  345.      jove.c
  346.      keymaps.c
  347.      list.c
  348.      --------
  349.      mac.c
  350.      macros.c
  351.      marks.c
  352.      menumaps.c    (segment 3)
  353.      misc.c
  354.      move.c
  355.      paragraph.c
  356.      --------
  357.      re.c
  358.      re1.c
  359.      rec.c
  360.      screen.c
  361.      term.c       (segment 4)
  362.      util.c
  363.      vars.c
  364.      version.c
  365.      wind.c
  366.      --------
  367.      MacTraps
  368.      mjovelib
  369.      setjmp.Lib    (segment 5)
  370.      storage
  371.      strings
  372.  
  373. 11) MAKE THE MJOVE PROJECT. If you experience any errors, it will most
  374. likely be from #include files not being in the default path - see the
  375. LightspeedC manual on setting up your directories. When you are done,
  376. run the program from the compiler to verify that it is okay, then save it as
  377. "MacJove" using the "Build Application" command.
  378.  
  379. 12) (Optional) CREATE THE HELP FILE, "CMDS.DOC". If you do not have a copy
  380. of "cmds.doc", it must be created using nroff. Assuming you have the Jove
  381. sources on a Unix machine, run "Make doc/cmds.doc" to create this file in
  382. the "doc" subdirectory, then move the file to the Mac. If you obtained the
  383. sources from a non-Unix source, this file may already be supplied. Place the
  384. file in the same directory that MacJove will be in.
  385.  
  386.                       COMMENTS AND QUESTIONS, BUGS
  387.  
  388. Although Jove appears to work well on the Mac, I know there are some
  389. problems. Since Jove cannot effectively use the TextEdit routines, it
  390. does not comply with some aspects of the Macintosh User Interface
  391. Guidelines. As has recently been brought to my attention, Jove accesses
  392. files by pathname only, so that if you have two disks in your machine
  393. with the same volume (disk) name, it will become confused. This has not
  394. been fixed. Support for variant keyboards is not good at present.
  395.  
  396. I try to reply to all inquiries about MacJove, but my schedule is busy,
  397. and it may be several days before you hear from me on the net. Please
  398. reply via email to me, or through usenet if possible: the chances that
  399. I will respond quickly to a written question or suggestion are very
  400. small, and I am difficult to reach by phone. Please do NOT send disks
  401. unless I ask you to.
  402.  
  403.     Ken Mitchum
  404.     Decision Systems Laboratory
  405.     University of Pittsburgh
  406.     1360 Scaife Hall
  407.     Pittsburgh, Pa. 15261
  408.  
  409.     (km@cadre.dsl.pittsburgh.edu)
  410.  
  411.