home *** CD-ROM | disk | FTP | other *** search
- Library Name:
- romuluscrunchlib #74
- romulusprtlib #70
- romulusrequesterlib #69
- romuluslocalelib #68
- romulusconsolelib #67
-
- Author:
- Andre Bergmann, Am Pannesbusch 39a, 42281 Wuppertal 2, Germany
-
- OverView:
- Haven't been in touch with Andre for a while, sorry that I stuffed
- up the inclusion of the prtlib in BUM6.
-
- Commands:
- status.b=CheckPrt
- PrtCommand Command,Para1,Para2,Para3,Para4
- PrtText <STRING>
- Hardcopy ScreenPointer,X,Y,Width,Height,PrtWidth,PrtHeight,Flags
- OpenConsole Window#,Console#
- PrintCon Console#,Expression
- NPrintCon Console#,Expression
- CloseConsole Console#
- EasyRequest Result=EasyRequest([#Window,]title$,body$,gtext$)
- IsLocale
- UseCatalog Catalogname
- FreeCatalog
- GetLocaleStr #StringNumber,DefaultString$
-
- Authors Documentation:
-
- ===========================================================================
- PRINTER LIBRARY
- ===========================================================================
-
- This is a library for using the printer.device!!!
- There are only four commands included, but I think these are the most wanted
- ones...
-
- Statement: CheckPrt
- ---------------------------------------------------------------------------
- Syntax: status.b=CheckPrt
-
- Modes: AMIGA/BLITZ
-
- Description:
-
- Checks the state of the Printer and return it.
-
- status: -1 = Printer Off
- -3 = Printer Offline
- -4 = Printer On
-
- Bugs:
-
- I had exculded this Routine, because it doesn' t worked 100%...
- I have now reincluded it and compiled with the newest version of the
- BB2 compiler...
- It seems that it now works 100%...
- ---------------------------------------------------------------------------
-
- Statement: PrtCommand
- ---------------------------------------------------------------------------
- Syntax: PrtCommand Command,Para1,Para2,Para3,Para4
-
- Modes: AMIGA
-
- Description:
-
- Send a ESC-Sequence to the printer.
-
- Command: Escape-Sequence
-
- Para1 - Para 4: Parameters for ESC-Sequence
-
- Beispiel: PrtCommand 6,0,0,0,0 ;Kursiv on
- PrtCommand 7,0,0,0,0 ;Kursiv off
- ---------------------------------------------------------------------------
-
- Statement: PrtText
- ---------------------------------------------------------------------------
- Syntax: PrtText <STRING>
-
- Mode: AMIGA
-
- Description:
-
- PrtText: Prints the text 'STRING' at your printer...
- It' s the same like WriteFile(0,"PRT:"), but why have the AMIGA
- a own printer.device...
- So I think we should use it, right?
- ---------------------------------------------------------------------------
-
- Statement: Hardcopy
- ---------------------------------------------------------------------------
- Syntax: Hardcopy ScreenPointer,X,Y,Width,Height,PrtWidth,PrtHeight,Flags
-
- Mode: AMIGA
-
- Description:
-
- Prints the screen or a part of it at your printer.
-
- ScreenPointer: Adress of the screen (Addr Screen(x))
- X............: \ Are the corners of the screen where we
- Y............: / want to start printing it to paper...
- Width........: Width of the screen part you want to print
- Height.......: Height of the screen part you want to print
- PrtWidth.....: Width of the print(on the paper)
- PrtHeight....: Height of the print(on the paper)
- Flags........: Printerflags...
- Have a look to a documantation aout it, the most importent(?)
- ones:
- $40 - Centre graphic
- $10 - Weidth= Maximum
- $20 - Height = Maximum
- $100,$200,$300,$400 - Printing quality($400 = Heighest)
-
- Bugs:
-
- Hm, it seems that the flags are not 100% taken...
- I haven' t find out why, but might be you do...
- I still working on it!
- But however, it works...
- ---------------------------------------------------------------------------
- ===========================================================================
-
- BTW: This library is copyright 1992/93 by Andre Bergmann.
- Use it on your own risk, I don' t take the responsibility for using it!
- This source is PD, feel free to update it!
- Please send me updates done by you and Bug Reports!
-
-
- Andre Bergmann
- Am Pannesbusch 39a
- 42281 Wuppertal 2
- Germany
- Tel: 0049/0202/702606
-
- ===========================================================================
- CONSOLE LIBRARY
- ===========================================================================
-
- - ConsoleLib(a little buggy yet):
- - OpenConsole Window#,Console#
- Open a CON: Port for the window, so ANSI output is possible.
-
- - PrintCon Console#,Expression
- Write text to window-console.
-
- - NPrintCon Console#,Expression
- Write text to window-console, and add a Linefeed.
-
- - CloseConsole Console#
- Close the CON: Port, but NOT the window itself!
-
- Note:
- These command work if you use them only for ONE window...
- If you wanna use the CON's for more windows, so that object
- are use it doesn' t work anymore...
- Ya see, I need ya help, please...
-
- ===========================================================================
- CRUNCH LIBRARY
- ===========================================================================
-
- - CrunchLib:
- - Implode Error/CrunchedLen=Bufferadr,DataLen,?Callback
- Crunch a buffer using the Imploder algorythm.
- The ?Callback could be a 0 for no own routine or a pointer
- to an own routine for display or abort checking.
- If the Imploder command jump to the callback in register d0
- the current crunch position is presend.
- The callback itself have to return True for cont crunching
- or False for a break!
- The command return the crunched buffer len or of course a break
- or an error.
- If a <0 is returned the callback returned a userbreak,
- a return of 0 means an error happens.
- Else the new buffer len is returned.
-
- - Deplode Success=Startadr
- Decrunch a Imploder-Crunched buffer.
- There is no need to give the crunched buffer len to the command,
- imploder handle this by itself.
- But be careful, if the alloceted buffer hasn' t enought space
- the program crash.
-
- The buffer has to have a header like this:
-
- Type Offset Contents Function
- LONG 0 "IMP!" To recongnize crunched files
- LONG 4 Original Len Datalen before packing
- LONG 8 Crunched Len-$32 Datalen after packing
-
- So $a is the start of the datas...
-
- The decrunch routine NEED this header to decrunch!!!
- Do memoryallocation for the buffer using a allocate for the Startadr+$4
- size.
-
- - CrMDecrunch Bufferadr [,Destinationadr]
- If the only parameter is the Bufferadr this routine works like the Deplode
- command, but decrunch a CrunchMania crunched file.
- If you use it with to parameters the decrunch will be done from
- Bufferadr to Destinationadr, so 2 buffers have to been allocated.
- The header for CrunchMania files have to look like this:
-
- Type Offset Contents Function
- LONG 0 "CrM!"/"CrM2" To recongnize crunched files
- WORD 4 Minimum Security Distance To savely decrunch Data when
- Source AND Dest is in the same Memoryblock
- LONG 6 Original Len Datalen before packing
- LONG 10 ($a) Crunched Len Datalen after packing without header
-
- So at $d is the data startadress.
-
- This header is NEEDED for decrunching!
-
- - PPDecrunch Bufferadr,Bufferend,Destinationadr
- This command decrunch a PowerPacker crunched file.
- PowerPacker need two buffers for decrunching.
- Also the lenght of the buffer must be given!
- Sorry, I can' t find my PowerPacker archive where the header is
- descripted...
- Like Imploder and CrunchMania PowerPacker also support his own
- file header.
- Please have a look at the PowerPacker(.library) documentation!
-
- ===========================================================================
- LOCALE LIBRARY
- ===========================================================================
-
- - LocaleLib:
- - IsLocale
- There is now way to check the ROM-Version of the Kickstart
- for locale presents.
- Both, OS 2.0 and 2.1 have the ROM-Version 37.175!
- So the command returns if the locale.library exists on the system.
-
- - UseCatalog Catalogname
- Opens the catalog for your programm.
- Might by your program is called BB2Program the catalog should
- be called BB2Program.catalog.
- But you' re also able to open a catalog from an other program,
- like Term.catalog.
- The catalog files are in an IFF format!!!
- Read the Commodore documentation of it...
-
- - FreeCatalog
- Removes the catalog that you opened with UseCatalog.
-
- - GetLocaleStr #StringNumber,DefaultString$
- Read a string from the catalog that you opened with UseCatalog.
- You have to give a defaultstring to that command.
- If the asked string could be find in the catalog the default
- string will be returned.
- Else the string from the catalog will be returned.
-
- ===========================================================================
- PRINTER LIBRARY
- ===========================================================================
-
- - PrtLib:
- - PrtText String
- The given String will be send to your printer.
-
- - Hardcopy Screen#,X,Y,Width,Height,PtrWidth,PrtHeight,Flags
- Send an image to your printer.
-
- - PrtCommand Command,Para1,Para2,Para3,Para4
- Sends a command to your printer.
-
- Note:
- Please read the doc files for the PrtLib!!! (ABOVE!!!)
-
- ===========================================================================
- REQUESTER LIBRARY
- ===========================================================================
-
- - RequestLib:
- - EasyRequest Result=EasyRequest([#Window,]title$,body$,gtext$)
- A intuition system requester will be open.
- Optional you could give a window number.
- The title$ is the displayed string in the top.
- body$ is the displayed text in the requester, a Chr$(10)
- means a linefeed.
- gtext$ is the text for the gadgets.
- Every gadgettext will be added by a '|'.
- Examples:
- "Ok" will only display one gadget in the requester.
- "Ok|Cancel" add two gadgets to it.
- "1|2|3|4|5" five gadgets are displayed.
-
-
-