home *** CD-ROM | disk | FTP | other *** search
- .// Source of !ClickJGPC in !jgcopy
- .sp 0 Comment out this line (.//) for paged output
- .hd
- /.col
- |JGPCopy and Handler v1.20|Fri,03 Jul 1992
-
- /
- .ft
- /
-
- .col
- |-\p-
- /
- .marg 2 79
- .ht 15
-
- .\ \Q
- .col
- |JGPCopy
- .col
- |================
- .usel base
-
- This Document and all files in !jgp and !jgpcopy are (C) JGLaski, 1993. A Free
- license is given for this document and all files in !jgpcopy on condition that
- every reasonable effort is made to pass it on and bring it into use, and that no
- modifications are made to any file, other than bracketted and acknowledged
- extensions and corrections.
-
- This document is not a specification of the programmes it describes, and no
- warranty is given that they work as described herein, nor any responsibility
- assumed for any consequence of their use.
-
- It is, of course, my practice to develop the code both for reasons of discovered
- bugs and worthwhile new ideas, and also to take reasonable care to make sure
- that the code is free from non\-trivial bugs.
-
- .col
- |-oOo-
-
- The tool JGPCopy is supplied both as part of the the !jgp suite, and on its own
- within the !jgpcopy application. Its purpose, roughly, is to type any file
- either to the screen or dump it, paging as it goes, or pass it to the printer.
- It releases the processor, when it does not need it, to any other programs that
- are running in the desktop. To Screen, it engages the whole screen for its
- display and seeks to purge a file of any printer codes. Its run may always be
- cancelled part way through, as documented on the screen. It can also dump the
- file to screen, and, if required, spool that dump to a file.
-
- If printer codes are included in the file to move the printhead, JGPCopy cannot,
- in general, understand them when copying to screen; however, if it believes a
- code to be a horizontal motion, it will insert a space. The effect, in practice,
- is to separate words by a space, and move margins, tabs and colled fields to the
- left. Of course, if the JGPCopy file has been JGPrinted with a screen
- configuration such as Default, JGPCopy will reproduce the original effects.
-
- .col
- |-oOo-
-
- The application !jgpcopy provides a handler to users of the tool JGPCopy,
- the final program available in the suite !jgp. JGPCopy will be applied, under
- either handler, to a file of type JGPCopy when double clicked. (Currently (9/91)
- JGPCopy is &205, but I expect a change shortly. It should be sufficient to
- edit the numbers in the !jgpcopy.!boot file, the !sprites file and the Templates
- file; I do not believe any code will require change.) Any file, of whatever
- type, dragged to a JGPCopy icon on the icon bar will also have JGPCopy applied
- to it.
-
- !jgpcopy will only register its icon if !jgp has not been encountered, and
- double clicking on !jgp will cause the icon from !jgp to supersede it; any
- JGPCopy runs will continue unaffected under the new management. Under !jgp,
- both means of applying JGPCopy remain available, but, to get a JGCopy icon on
- the bar, you must first choose jgpcopy in the icon bar's menu; the icon
- mutates back to a JGEd icon after use.
-
- (To test !jgpcopy, if you have also got !jgp, quit in the !jgp icon in the
- icon bar and also UNSET jgp$dir. Then double-click on !jgpcopy. You will have
- lost access to JGEd, JGPrint and JGConfig. Double clicking on !jgp will restore
- !jgp without !jgpcopy. There is a bug, and you should exit !jgpcopy before
- double clicking on !jgp)
-
- .col
- |-oOo-
-
- Through its menus, JGPCopy is virtually self\-documenting. For each file
- submitted to JGPCopy (whether by double clicking a JGPCopy file or by dragging
- any file to the JGPCopy icon bar icon) an icon with that file's name will be
- entered on the icon bar, and clicking menu on this icon opens the main menu
- controlling what happens to it. If you are using JGPCopy within !jgp, selecting
- jgpcopy from JGEd's icon bar icon menu mutates the JGEd icon until a file is
- dragged to it. Double clicking on a JGPCopy file opens the menu near your
- pointer.
-
- To Screen, To Dump, and To Printer are the principal choices, and Options
- provides a submenu to control how this is done.
-
- +Quit and +Delete file are two options that apply to both choices; if you stop
- printing or quit copying before the end, they will not apply. <nl> -> <cr>,
- default ticked, enables C type files to be correctly handled. If you want <10>
- to be interpreted as a downtab without carriage return, untick it.
-
- For To Screen, the most important option is Mode. Clicking on the blue arrow in
- the mode window cycles 16 colour modes; I find 12, 20 and 16 the most useful.
- The other option is concerned with how to treat printer codes found in text.
- There is a choice between assuming Epson style, assuming HP style and printing
- characters from codes. Bytes 0-31 are interpreted if their function is to move
- the screen cursor, otherwise replaced by a space.
-
- The text is paged to the screen; a special line at the bottom of the page tells
- you how to continue or quit.
-
- For further details of how codes are scythed from the text see below.
-
- .col
- |-oOo-
-
- The JGPCopy files produced by JGPrint are closely analogous to the Printout
- files(FF4) produced by !Printers, and, with care, can be used interchangeably.
-
- JGPCopy uses JGPrSlave to actually do the printing, but the arrangements are
- very different in !jgpcopy and !jgp.
-
- In !jgpcopy JGPrSlave is a direct slave of JGPCopy without involving !printers.
- Multi\-tasking is not available, and you must ensure that other sources of
- printing do not conflict with this use of the printer.
-
- More flexibility is provided in !jgp; alias$@Printtype_205 is set to
- .....!jgp.Runimage 4. If JGPCopy sends appropriate messages to !Printers, or a
- JGPCopy file has been dragged to !printers, !printers can queue the printer
- request and JGPrSlave will print it.
-
- In the option menu of !jgp, you can choose whether or not JGPrSlave should
- attempt to multitask; you can request JGPrSlave to pause, and you can stop
- JGPrSlave.
-
- JGPCopy files produced by JGPrint may, if requested in the initial dialogue,
- contain the pseudo printer directive <esc><esc>, which will cause JGPrSlave to
- put up a verso window to enable paper to be turned round, or directives
- <esc>0<n> at the beginning of Page <n>, to enable a pause for each page to be
- set in the printer. In both !jgp and !jgpcopy, these will set JGPrSlave to
- multitask.
-
- These pseudo directives have been chosen, as far as possible, not to affect the
- printer and not to pre/-empt existing printer directives.
-
- For files produced by JGPrint to be used via a !Printers' printer, there must be
- consistency between the configuration used in JGPrint and that printer. In the
- paragraphs below, printer signifies a !Printers printer.
-
- There are three matters to consider: initialising printer-code; printer X & Y
- offset; character mapping.
-
- A JGPCopy file has its own printer initialisation code at its head. !Printers
- will precede this by its own initialisation code. It is necessary that the
- former cancels any effects of the latter that will precede it. In effect, the
- init code in the JGPrint configuration file should start by a printer code to
- set the printer state to its default values. (Epson is <esc>@, HP is <esc>E.)
-
- If you have set printer Y offset non-zero, the effective pagelength will be
- reduced by the amount set; use the config size skiplength to apprise JGPrint of
- this reduction. If you have set X offset non-zero, you may have to adjust your
- margins, and you may not be able to print as wide a text as JGPCopy will permit
- directly.
-
- If the printer has defined a character mapping for top-bit set characters, it
- may transform bytes sent by JGPCopy. This may be significant in two contexts: if
- the JGPrint configuration has itself generated top-bit set characters which it
- wishes to put out verbatim; if bytes > 128 are put out as parameters to printer
- directives. £ is the major problem in the first case, though hatty characters or
- insert may have put top-bit set characters into the text. The second may be a
- problem if your text contains epson style codes.
-
- I recommend careful checking if you propose to use !Printers in association
- with JGPCopy files.
-
- .col
- |-oOo-
-
- More about Scything codes from the text:-
-
- The option that selects between None, Epson, HP, etc. style codes controls an
- attempt to scythe, from the text copied to screen, noise from printer commands.
- Remember that horizontal and vertical setting commands will not be effected on
- the screen, so that what shows on the screen may not be exactly laid out as it
- would be if JGPrinted directly. It is possible that some codes may not be
- correctly recognised, though I have had no problem from any I have tried.
- Moreover, bytes that will mess up the screen never get through. Each such
- command is replaced by a space, in order to separate words on the screen.
-
- If a file has come from MSDOS and uses ANSI-standard commands to manipulate the
- window, HP-style codes may succeed in scything them out; however, I have
- encountered some whose terminator is lower case, which, if used, will cause too
- much to be missed. It may be possible to modify the definition of valid code,
- described below.
-
- Those who have FormEd can change the initial selection by editing a window in
- the Template file in !jgp and/or !Jgcopy; also the Codes recognised as valid can
- be modified. See details below (To be implemented only on request.)
-
- .setst :| :
- .setend : |:
- .col
- |Technical Note
-
- The problems are quite different in Epson-style and HP-style codes. In each,
- there are 2 problems.
-
- In Epson\-style, the problems come from those codes that are required to be
- followed by bytes that may be screen\-displayable: either 1 byte as in, for
- example, the code for a vertical tab; or to be followed by 2 bytes, as for
- example, the codes to move the print head either relatively or absolutely.
-
- In HP-style codes, there are two classes of codes that do not have @, A-Z as
- terminators. The first has a single character following <esc>, and I have
- encountered the usages '=' for half\-line\-feed and '9' to clear margins. The
- second has a lower case letter terminal after 3,4,6,...characters. I have
- encountered these forms in bringing across MSDOS files that use (an extension
- of) the ANSI standard codes to manage modes and cursor. I have seen f,s,u,n,m,h,
- used, respectively, as terminators for Horizontal and Vertical Position,
- Save/Restore Cursor Position, Device Status Report, Set Graphics Rendition, Set
- Mode.
-
- .col
- |Amending facilities
-
- To amend the code-style initially chosen, double click on the file Templates in
- !jgpcopy and/or !jgp. The window you want has, as Title, Printer Codes Ignored,
- and as Identifier, Scythe.
-
- You want to amend the sprite icons to the right of Epson and HP respectively so
- that the one to the right of your choice is the one whose sprite name is pgo. A
- convenient name for the other is pwait. (These icons are coloured circles used
- in the printer window.)
-
- More precisely, IF Epson+1 is pgo THEN the Firstchoice is Epson ELSEIF HP+1 is
- pgo THEN Firstchoice is HP ELSE Firstchoice is none.
-
- .col
- |not implemented Mon,06 Apr 1993
-
- Below Epson and Hp are two Sprites in which are listed the characters following
- <esc> that are to be specially treated in the respective ways described
- above, the first described in the window immediately below the printer name, and
- the second in the bottom window. The number of characters that can be entered in
- these windows is limited to 12. Those shown in the window provided are presently
- built in to JGPCopy.
-
- It is, of course, vital not to renumber the sprites in the Scythe window.
-
- If your printer has a code-style that does not fit into this framework, I should
- be glad to discuss appropriate customising.
-
- .setst ::
- .setend ::
- .col
- |-oOo-
-
- I do not charge for a licence to use JGPCopy from within !jgpcopy.
-
- However, if you find yourself regularly making use of it, other than to read
- the documentation of material with which it was distributed, without having
- bought a licence for JGEd or JGPrint, you should make whatever donation you
- think suitable to an arts or higher education charity of your choice, and I
- request you to send me any programs for which you are entitled to give me a
- licence and that you think might interest me.
-
- If you distribute documentation with !jgpcopy, as a condition of a free licence
- to do so, I require you to distribute the shareware JGP disc at whatever
- handling charge you deem fair.
-
-
- .\ \Q
- .col
- | |J.G.Laski |
- .col
- | |18 Ebury Street|
- .col
- | |London |
- .col
- | |SW1W OLU |
- .col
- | |\d