###############################################################################
##                                                                           ##
##      M     M            ll     tt     ii    RRRRR                         ##
##      MM   MM            ll     tt           RR  RR                        ##
##      MMM MMM   uu  uu   ll    ttttt   ii    RR  RR    eeee     qqqqq      ##
##      MMMMMMM   uu  uu   ll     tt     ii    RRRRR    ee  ee   qq  qq      ##
##      MM M MM   uu  uu   ll     tt     ii    RR RR    eeeeee   qq  qq      ##
##      MM   MM   uu  uu   ll     tt     ii    RR  RR   ee        qqqqq      ##
##      MM   MM    uuuuu    ll     ttt    ii   RR  RR    eeee        qq      ##
##                                                                   qq      ##
##                                                                           ##
###############################################################################


MultiReq v1.20 © 11/1992 by Andreas Krebs (released at 12-Nov-92)


This file contains a detailed description of all functions of the
"multireq.library". The functions are listed according to there offsets.
All this functions ONLY change those registers, that are mentioned as RESULTS
and sometimes D0 als return value. All other registers are not changed, also if
they are used as parameters.



multireq.library/StrLen                                  multireq.library/StrLen

NAME
  StrLen -- returns the length of a text string

SYNTAX
  length = StrLen( str )
  D0       -30     A0

  UWORD StrLen( UBYTE * )

FUNCTION
  This function returns the length of a text string, whereby the length is
  counted without the final nullbyte.

INPUTS
  str - Pointer to a nullterminated string

RESULTS
  length - length of the string in bytes
  A0     - address of the final nullbyte

SEE ALSO
  StrCpy, StrCmp, StrIns, UpperCase, TestPattern



multireq.library/StrCpy                                  multireq.library/StrCpy

NAME
  StrCpy -- copies a text string into another

SYNTAX
  StrCpy( src, dest )
  -36     A0   A1

  void StrCpy( UBYTE *, UBYTE * )

FUNCTION
  This function copies the text string src into the string dest, whereby the
  copy-procedure ends, when the final nullbyte is reached.

INPUTS
  src  - pointer to the nullterminated source string
  dest - pointer to a buffer for the destination string

RESULTS
  A0 - address of the final nullbyte of the source string
  A1 - address of the final nullbyte of the destination string

SEE ALSO
  StrLen, StrCmp, StrIns, UpperCase, TestPattern



multireq.library/StrCmp                                  multireq.library/StrCmp

NAME
  StrCmp -- compares two strings

SYNTAX
  dif = StrCmp( str1, str2 )
  D0    -42     A0    A1

  WORD StrCmp( UBYTE *, UBYTE * )

FUNCTION
  This function compares two text strings, whereby no difference is made between
  small and capital letters and also umlauts are considered.
  If dif is < 0, then string str1 is "smaller" than string str2, that means the
  ASCII-code of str1 is lower than that of str2.
  If dif is = 0, then str1 and str2 are equal.
  If dif is > 0, then str1 is "larger" than str2.

INPUTS
  str1 - pointer to the first nullterminated string
  str2 - pointer to the second nullterminated string

RESULTS
  dif - difference between str1 and str2
  A0  - address of the different character in str1
  A1  - address of the different character in str2

SEE ALSO
  StrLen, StrCpy, StrIns, UpperCase, TestPattern



multireq.library/StrIns                                  multireq.library/StrIns

NAME
  StrIns -- inserts a text string into another

SYNTAX
  StrIns( src, dest )
  -48     A0   A1

  void StrIns( UBYTE *, UBYTE * )

FUNCTION
  This function inserts a text string into another, therefore the destination
  string dest is first shifted StrLen( src ) characters and afterwards src is
  placed into the formed gap.

INPUTS
  src  - pointer to the string to be inserted
  dest - pointer to the position, where the string should be inserted

RESULTS

SEE ALSO
  StrLen, StrCpy, StrCmp, UpperCase, TestPattern



multireq.library/UpperCase                            multireq.library/UpperCase

NAME
  UpperCase -- converts a character into a capital character

SYNTAX
  character = Uppercase( character )
  D0          -54        D0

  UBYTE UpperCase( UBYTE )

FUNCTION
  This function converts the given symbol into a capital character, if is a
  character. Special symbols like Unlauts are also considered.

INPUTS
  character - the character to be converted

RESULTS
  character - the corresponding capital character

SEE ALSO
  StrLen, StrCpy, StrCmp, StrIns, TestPattern



multireq.library/TestPattern                        multireq.library/TestPattern

NAME
  TestPattern -- tests, if a string matches a given pattern

SYNTAX
  result = TestPattern( wild, str )
  D0       -60          A0    A1

  BOOL TestPattern( UBYTE *, UBYTE * )

FUNCTION
  This function tests, if the text string str matches the pattern wild. The
  wildcard '*' represents a substring of any length and '|' separates two
  patterns from each other.
  During the test no difference is made between small and capital letters,
  therefore e.g. "a*" is identical to "A*".

INPUTS
  wild - pointer to the string, containing the pattern
  str  - pointer to the string to be tested

RESULTS
  result - TRUE (1), if the string matches the pattern, else FALSE (0)

EXAMPLES
  TestPattern( "*.c|*.h", str )   - is str a C source- or include-file ?
  TestPattern( "*.*|*-*", str )   - contains str a '.'- or '-'-symbol ?
  TestPattern( "*", str )         - always TRUE, cause each string matches
                                    this pattern

SEE ALSO
  StrLen, StrCpy, StrCmp, StrIns, UpperCase



multireq.library/DelPort                                multireq.library/DelPort

NAME
  DelPort -- deletes a message port

SYNTAX
  DelPort( port )
  -66      A1

  void DelPort( struct MsgPort * )

FUNCTION
  This function deletes a message port, therfore it's removed from the systems
  message port list and afterwards the used memory is freed again.

INPUTS
  port - pointer to the MsgPort-structure of the message port

RESULTS

NOTES
  This function is identical to the DeletePort-function of the linker library
  amiga.lib.

SEE ALSO
  CrtPort



multireq.library/CrtPort                                multireq.library/CrtPort

NAME
  CrtPort -- creates a message port

SYNTAX
  port = CrtPort( name, pri )
  D0     -72      A0    D0

  struct MsgPort *CrtPort( UBYTE *, UWORD )

FUNCTION
  This function creates a message port with the selected name and priority,
  therefore the needed memory is allocated. When created the message port is
  automatically added to the systems message port list.

INPUTS
  name - pointer to a nullterminated string with the name or 0 for no name
  pri  - priority the message port should have

RESULTS
  port - pointer to the MsgPort-structure of the message port or 0 if an
  error occured

NOTES
  This function is identical to the CreatePort-function of the linker library
  amiga.lib.

SEE ALSO
  DelPort



multireq.library/GetCurrentPath                  multireq.library/GetCurrentPath

NAME
  GetCurrentPath -- locates the name and path of the current directory

SYNTAX
  GetCurrentPath( bufff )
  -78             A0

  void GetCurrentPath( UBYTE * )

FUNCTION
  This function locates the name and the path of the current directory and
  writes it to the buffer defined by buff.
 
INPUTS
  buff - pointer to a buffer, in which the name should be written

RESULTS



multireq.library/DrawBox                                multireq.library/DrawBox

NAME
  DrawBox -- draws a rectangle with 3D-effect

SYNTAX
  DrawBox( rp, x1, y1, x2, y2, col1, col2 )
  -84      A1  D0  D1  D2  D3  D4    D5

  void DrawBox( struct RastPort *, UWORD, UWORD, UWORD, UWORD, UWORD, UWORD )

FUNCTION
  This function draws a rectangle with 3D-effect in the specified size, whereby
  the left and top border are drawn in the Color col1 and the right and bottom
  one in the color col2.
  
INPUTS
  rp   - pointer to the RastPort, that should be drawn to
  x1   - x-position of the left top edge
  y1   - y-position of the left top edge
  x2   - x-position of the right bottom edge
  y2   - y-position of the right bottom edge
  col1 - color of the left and top border
  col2 - color of the right and bottom border

RESULTS

NOTES
  It has to made save, that x1<x2 and y1<y2, cause otherwise there might be a
  crash.
 
SEE ALSO
  DrawFilledBox



multireq.library/DrawFilledBox                    multireq.library/DrawFilledBox

NAME
  DrawFilledBox -- draws a filled rectangle with 3D-effect

SYNTAX
  DrawFilledBox( rp, x1, y1, x2, y2, col1, col2, fillcol )
  -90            A1  D0  D1  D2  D3  D4    D5    D6

  void DrawFilledBox( struct RastPort *, UWORD, UWORD, UWORD, UWORD, UWORD,
                      UWORD, UWORD )

FUNCTION
  This function draws a filled rectangle with 3D-effect in the specified size,
  therefore first the inside is filled in the color fillcol and afterwards the 
  border is drawn with DrawBox.
  
INPUTS
  rp      - pointer to the RastPort, that should be drawn to
  x1      - x-position of the left top edge
  y1      - y-position of the left top edge
  x2      - x-position of the right bottom edge
  y2      - y-position of the right bottom edge
  col1    - color of the left and top border
  col2    - color of the right and bottom border
  fillcol - color, that should be used to fill the inside of the rectangle 

RESULTS

NOTES
  It has to made save, that x1<x2 and y1<y2, cause otherwise there might be a
  crash.

SEE ALSO
  DrawBox



multireq.library/DrawTexts                            multireq.library/DrawTexts

NAME
  DrawTexts -- draws several texts of the same style

SYNTAX
  DrawTexts( rp, textlist)
  -96        A1  A0

  void DrawTexts( struct RastPort *, struct MRText * )

FUNCTION
  This function draws several texts, whereby the texts have to of the same
  style, size, drawmode and background color. This parameters have to be set
  before this function is called.

INPUTS
  rp       - pointer to the RastPort, that should be drawn to
  textlist - pointer to an array with MRText-structures and an entry with the
             value -1 as last entry  
 
RESULTS

EXAMPLES

  static struct MRText MyTexts[]=
  {
    { 10, 15,  2,  6, (UBYTE *)"Text 1" },    /* x, y, pen, len, text */
    { 10, 30,  1,  6, (UBYTE *)"Text 2" },
    { -1, -1, -1, -1, (UBYTE *)-1 }           /* last text */
  };

  /* */
  DrawTexts(rp, MyTexts);
  /* */



multireq.library/DrawWinBorder                    multireq.library/DrawWinBorder

NAME
  DrawWinBorder -- draws a 3D-border around a window

SYNTAX
  DrawWinBorder( win, title )
  -102           A0   A1

  void DrawWinBorder( struct Window *, UBYTE * )

FUNCTION
  This function draws a 3D-border for a window like WorkBench 2.0 does, whereby
  the top border is wider than the other ones, cause he's containing the window
  title. 
  This function should only be used for windows of the type BORDERLESS, cause
  otherwise there might be problems with the windows "normal" border.
  This function is mainly for use under Kickstart 1.3. Under Kickstart 2.0 the
  normal border should be prefered, cause he has more facilities (e.g. system-
  gadgets).
 
INPUTS
  win   - pointer to the window, that's border should be drawn
  title - pointer to a nullterminated string with the window title

RESULTS



multireq.library/DrawGadgetBorder              multireq.library/DrawGadgetBorder

NAME
  DrawGadgetBorder -- draws a border for a number of gadgets

SYNTAX
  DrawGadgetBorder( gadgets, win, numgad )
  -108              A0       A1   D0

  void DrawGadgetBorder( struct Gadget *, struct Window *, UWORD )

FUNCTION
  This function draws for the given number of gadgets a border. The borders have
  to be defined with the BORDER-macros (see multireq.h or multireq.i) in the
  UserData-entry of the Gadget-structure.
  The macros are used a follows:

  BORDER( type, col1, col2, fillcol )

  type - border type (see multireq.h or multireq.i)
  col1, col2, fillcol - see DrawFilledBox

  A list of all possible border types is located in the include-files
  (multireq.h or multireq.i).
  After drawing the border, it can be necessary to refresh the gadgets (with
  RefreshGadgets or RefreshGList), cause DrawGadgetBorder does no refresh and
  so some other parts of the gadgets (e.g. texts) may be hidden.  
 
INPUTS
  gadgets - pointer to the first gadget in a linked list
  win     - pointer to the window, that contains the gadgets
  numgad  - number of gadgets to draw a border, or -1 for all gadgets

RESULTS



multireq.library/InitFileReq                        multireq.library/InitFileReq

NAME
  InitFileReq -- initializes a FileReq-structure

SYNTAX
  InitFileReq( fr_ptr, numlist )
  -114         A0      D0

  void InitFileReq( struct FileReq **, UWORD )

FUNCTION
  This function initializes a FileReq-structure, therefore first the needed
  memory is allocated and afterwards all needed datas of the FileRequester are
  created. Afterwards a pointer to the FileReq-structure is written to the
  address defined by fr_ptr.
  The option numlist is not supported in this version, but it should always be
  set to 2, cause otherwise there might be problems with newer version of the
  multireq.library.
 
INPUTS
  fr_ptr  - address of a pointer to a FileReq-structure
  numlist - number of file lists (in this version always 2)

RESULTS

SEE ALSO
  FreeFileReq, FileRequester



multireq.library/FreeFileReq                        multireq.library/FreeFileReq

NAME
  FreeFileReq -- frees a previous initialized FileReq-structure

SYNTAX
  FreeFileReq( fr_ptr )
  -120         A0

  void FreeFileReq( struct FileReq ** )

FUNCTION
  This function frees a FileReq-structure, created by InitFileReq. This also
  includes possibly read in directories. After this the pointer to the structure
  is cleared.  
  This function should be used before a program quits, cause otherwise the
  allocated memory is not returned to the system.  

INPUTS
  fr_ptr - address of a pointer to a FileReq-structure

RESULTS

SEE ALSO
  InitFileReq, FileRequester



multireq.library/FileRequester                    multireq.library/FileRequester

NAME
  FileRequester -- starts the FileRequester

SYNTAX
  status = FileRequester( filereq, screen )
  D0       -126           A0       A1

  UWORD FileRequester( struct FileReq *, struct Screen * )

FUNCTION
  This function starts the FileRequester on the screen defined by "screen" (0 =
  WorkBench-screen) and uses therefore the values defined in the FileReq-
  structure. The screen has to be a Hires-screen, cause a Lores-screen is
  because of it's little wide to small for the FileRequester.
  The FileRequester is described in the file "FileReq.doc".
  The parameters of the FileReq-structure are described in the include-files
  "multireq.h" and "multireq.i".

INPUTS
  filereq - pointer to a FileReq-structure
  screen  - pointer to the screen, oh which the FileRequester should be
            opened
RESULTS
  status - Contains the status how the FileRequester was quitted. This value
           is identical to the ReturnStatus-entry in the FileReq-structure.
           (A list of all possible statuses is also located in the include-
           files.)

SEE ALSO
  InitFileReq, FreeFileReq

