home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / jove-4.16-src.tgz / tar.out / bsd / jove / README.mac < prev    next >
Text File  |  1996-09-28  |  20KB  |  468 lines

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