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