PRISM USER'S GUIDE Version 2.0, April 1994 COPYRIGHT (C) 1991-1994 Thinking Machines Corporation. APPENDIX A: COMMANDS-ONLY PRISM ******************************** You can run Prism in a commands-only mode, without the graphical interface. This is useful if you don't have access to a terminal or workstation running X. All Prism functionality is available in commands-only mode except features that require graphics (for example, visualizers). See Section A.1. If you are using an Xterm, you can also run a commands-only version of Prism that lets you redirect the output of certain commands to X windows. This may be preferable to users who are used to a command- line interface for debugging, but want to take advantage of some of Prism's graphical features (for example, visualizers and the performance data display). See Section A.6. For further information on individual commands, read the sections of the main body of this guide dealing with the commands, and read the reference descriptions in the Prism Reference Manual. A.1 SPECIFYING THE COMMANDS-ONLY OPTION ---------------------------------------- To enter commands-only mode, specify the -C option on the prism command line. You can also include other arguments on the command line; for example, you can specify the name of a program so that Prism comes up with that program loaded. X toolkit options are, of course, meaningless. See Section 2.2.2 for more information on command-line options. When you have issued the command, you receive this prompt: (prism) You can issue most Prism commands at this prompt, except for commands that apply specifically to the graphical interface; these include pushbutton, tearoff, and untearoff. A.2 ISSUING COMMANDS --------------------- You operate in commands-only Prism just as you do when issuing commands on the command line in graphical Prism; output appears below the command you type, instead of in the history region above the command line. You cannot redirect output using the on window syntax. You can, however, redirect output to a file using the @ filename syntax. Commands-only Prism supports the editing key combinations supported by graphical Prism, plus some additional combinations. Here is the entire list: Ctrl-a Moves to the beginning of the line. Ctrl-b (or Ctrl-h) Moves back one character. Ctrl-c Interrupts execution. Ctrl-d Deletes the character under the cursor. Ctrl-e Moves to the end of the line. Ctrl-f Moves forward one character. Ctrl-j (or Ctrl-m) Done with input (equivalent to pressing the Return key). Ctrl-k Deletes to the end of the line. Ctrl-l Refreshes the screen. Ctrl-n Displays the next command in the commands buffer. Ctrl-p Displays the previous command in the commands buffer. Ctrl-u Deletes to the beginning of the line. When printing large amounts of output, commands-only Prism displays a more? prompt after every screenful of text. Answer y or simply press the Return key to display another screenful; answer n or q, followed by a carriage return, to stop the display and return to the (prism) prompt. You can adjust the number of lines Prism displays before issuing the more? prompt by issuing the set command with the $page_size variable, specifying the number of lines you want displayed. For example, issue this command to display 10 lines at a time: (prism) set $page_size = 10 Set the $page_size to 0 to turn the feature off; Prism will not display a more? prompt. A.3 USEFUL COMMANDS -------------------- This section describes some commands that are especially useful in commands-only Prism. Use the list command to list source lines from the current file. For example, (prism) list 10, 20 prints lines 10 through 20 of the current file. Use the collection command with no arguments to print out the current status of collection (on or off). Use the show events command to print the events list. Use the delete command to delete events from this list. Use the perf command to display performance data. Use the perfsave command to save the performance data in a format that you can later load into the graphical version of Prism (via the perfload command or the Load Data selection from the File menu in the Performance Data window). Use the perfadvice command to display an analysis of the performance data. A.4 OBTAINING ON-LINE DOCUMENTATION ------------------------------------ Use the doc command to obtain on-line documentation in commands-only Prism. The doc command is not available in graphical Prism. Issuing doc displays a menu of available documents. Choose the number associated with the document you want to view. In most cases, this displays another menu of the chapters within the document. Choose the number associated with the chapter, and the first screenful of text for that chapter is displayed. Answer y in response to the more? prompt or simply press the Return key to display the next screenful. Answer n to return to the menu. If you choose the number associated with bug-update files or release notes from the top-level doc menu, Prism displays a menu of the files or release notes available at your site. From any menu, you can press p to return to the previous menu, q to return to the (prism) prompt, or m to display the text of a UNIX or CMOST manual page. When you press m, you can either enter the name of the man page immediately, or press Return and be prompted for the name of the man page. Use the syntax number @ filename to redirect the text of the document associated with number to the file you specify. Use number @@ filename to add the text to the end of an existing file. A.5 LEAVING COMMANDS-ONLY PRISM -------------------------------- Issue the quit command to leave commands-only Prism and return to your UNIX prompt. A.6 RUNNING COMMANDS-ONLY PRISM FROM AN XTERM: THE -CX OPTION -------------------------------------------------------------- Issue the prism command with the -CX option from an Xterm to start up a commands-only Prism that lets you redirect the output of certain commands to X windows. The information presented earlier in this appendix about commands-only Prism also applies to this version, except that this version lets you redirect output using the on window syntax. You can redirect the following output to X windows: o visualizers (including structure visualizers) print or display command o performance data--perf command o Where graph (Node Prism only) where command o PN Sets window (Node Prism only)--show pnsets command To redirect the output, issue the appropriate command with the on dedicated or on snapshot syntax, just as you would in graphical Prism. For example, this command displays a visualizer for x in a dedicated window: (prism) print x on dedicated This command displays performance data in a snapshot window: (prism) perf on snapshot In addition, you can display help windows from within windows that you pop up in this way. ***************************************************************** The information in this document is subject to change without notice and should not be construed as a commitment by Think- ing Machines Corporation. Thinking Machines reserves the right to make changes to any product described herein. Although the information in this document has been reviewed and is believed to be reliable, Thinking Machines Corporation assumes no liability for errors in this document. Thinking Machines does not assume any liability arising from the application or use of any information or product described herein. ***************************************************************** Connection Machine (r) is a registered trademark of Thinking Machines Corporation. CM, CM-2, CM-200, and CM-5 are trademarks of Thinking Machines Corporation. CMOST, CMAX, and Prism are trademarks of Thinking Machines Corporation. C* (r) is a registered trademark of Thinking Machines Corporation. Paris and CM Fortran are trademarks of Thinking Machines Corporation. CMMD, CMSSL, and CMX11 are trademarks of Thinking Machines Corporation. CMview is a trademark of Thinking Machines Corporation. Thinking Machines (r) is a registered trademark of Thinking Machines Corporation. SPARC and SPARCstation are trademarks of SPARC International, Inc. Sun, Sun-4, and Sun Workstation are trademarks of Sun Microsystems, Inc. UNIX is a trademark of UNIX System Laboratories, Inc. The X Window System is a trademark of the Massachusetts Institute of Technology. OSF and Motif are trademarks of The Open Software Foundation, Inc. Worldview is a trademark of Interleaf, Inc. Copyright (c) 1991-1994 by Thinking Machines Corporation. All rights reserved. This file contains documentation produced by Thinking Machines Corporation. Unauthorized duplication of this documentation is prohibited. Thinking Machines Corporation 245 First Street Cambridge, Massachusetts 02142-1264 (617) 234-1000