home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / FileMover / HF-OM1.DMS / in.adf / OpusSDK.lha / SDK / docs / misc.doc < prev    next >
Encoding:
Text File  |  1997-05-11  |  10.1 KB  |  381 lines

  1. dopus5.library/Atoh                                       dopus5.library/Atoh
  2.  
  3.     NAME
  4.         Atoh - convert a hex ascii string to a long
  5.  
  6.     SYNOPSIS
  7.         Atoh(string, len)
  8.                A0     D0
  9.  
  10.         long Atoh(char *, long);
  11.  
  12.     FUNCTION
  13.         Converts an ascii representation of a hex value to a long value.
  14.  
  15.     INPUTS
  16.         string - string to convert
  17.         len - length of string to convert, or -1 for the whole string
  18.  
  19.     RESULT
  20.         Returns the long value equivalent to the ascii string.
  21.  
  22. dopus5.library/BtoCStr                                 dopus5.library/BtoCStr
  23.  
  24.     NAME
  25.         BtoCStr - convert a BCPL string to a C string
  26.  
  27.     SYNOPSIS
  28.         BtoCStr(bstr, cstr, length)
  29.                  A0    A1     D0
  30.  
  31.         void BtoCStr(BSTR, char *, long);
  32.  
  33.     FUNCTION
  34.         Converts the supplied BSTR to a null-terminated C string.
  35.  
  36.     INPUTS
  37.         bstr - BCPL pointer to BSTR to convert
  38.         cstr - buffer to store converted string in
  39.         length - size of buffer
  40.  
  41.     RESULT
  42.         The string is converted. BSTRs are limited to 255 characters.
  43.  
  44. dopus5.library/BuildKeyString                   dopus5.library/BuildKeyString
  45.  
  46.     NAME
  47.         BuildKeyString - build a commodities key code string
  48.  
  49.     SYNOPSIS
  50.         BuildKeyString(code, qual, qual_mask, qual_same, buffer)
  51.                         D0    D1      D2         D3        A0
  52.  
  53.         void BuildKeyString(USHORT, USHORT, USHORT, USHORT, char *);
  54.  
  55.     FUNCTION
  56.         Takes the supplied key code and qualifier and converts them to an
  57.         ASCII string that is compatible with Commodities.
  58.  
  59.     INPUTS
  60.         code - key code
  61.         qual - key qualifier
  62.         qual_mask - mask of the qualifiers to care about
  63.         qual_same - which qualifiers are equivalent
  64.  
  65.     RESULT
  66.         The string is stored in the supplied buffer. String lenghts can
  67.         vary but for safety this buffer should be at least 80 bytes.
  68.  
  69.     SEE ALSO
  70.         commodities.library/ParseIX()
  71.  
  72. dopus5.library/BytesToString                     dopus5.library/BytesTOString
  73.  
  74.     NAME
  75.         BytesToString - build a string representation of a byte size
  76.  
  77.     SYNOPSIS
  78.         BytesToString(bytes, buffer, places, separator)
  79.                        D0      A0      D1       D2
  80.  
  81.         void BytesToString(ULONG, char *, short, char);
  82.  
  83.     FUNCTION
  84.         This routine takes a long value and creates a string to represent
  85.         that value as an expression of size. Some examples are :
  86.  
  87.                  102       ->    102b
  88.                  5804      ->    5K
  89.                  1829382   ->    1.8M
  90.  
  91.     INPUTS
  92.         bytes - byte value
  93.         buffer - buffer to store result
  94.         places - number of decimal places. This must be set to 1 currently.
  95.         separator - column separator (eg a comma could produce "1,193")
  96.  
  97.     RESULT
  98.         The string is stored in the buffer. The buffer should be at least
  99.         16 bytes long.
  100.  
  101. dopus5.library/CalcPercent                         dopus5.library/CalcPercent
  102.  
  103.     NAME
  104.         CalcPercent - calculate a percentage value
  105.  
  106.     SYNOPSIS
  107.         CalcPercent(amount, total, utility_lib)
  108.                       D0      D1        A0
  109.  
  110.         long CalcPercent(ULONG, ULONG, struct Library *);
  111.  
  112.     FUNCTION
  113.         Calculates the percentage that amount is of total. For
  114.         example, with amount == 25 and total == 50, the percentage
  115.         returned would be 50.
  116.  
  117.     INPUTS
  118.         amount - amount of total
  119.         total - total value
  120.         utility_lib - requires a pointer to UtilityBase
  121.  
  122. dopus5.library/ConvertRawKey                     dopus5.library/ConvertRawKey
  123.  
  124.     NAME
  125.         ConvertRawKey - convert a key from the raw key code
  126.  
  127.     SYNOPSIS
  128.         ConvertRawKey(code, qual, keybuf)
  129.                        D0    D1     A0
  130.  
  131.         BOOL ConvertRawKey(USHORT, USHORT, char *);
  132.  
  133.     FUNCTION
  134.         Takes the supplied code and qualifier and returns the equivalent
  135.         key in the current key map. This function provides a convenient path
  136.         to the console.device's RawKeyConvert() routine.
  137.  
  138.     INPUTS
  139.         code - key code
  140.         qual - key qualifier
  141.         keybuf - buffer to store key
  142.  
  143.     RESULT
  144.         The key is stored in the supplied buffer. Most keys only require
  145.         a single byte but in case one is larger the buffer should be at
  146.         least 8 bytes in size.
  147.  
  148.     SEE ALSO
  149.         console.device/RawKeyConvert()
  150.  
  151. dopus5.library/DivideToString                   dopus5.library/DivideToString
  152.  
  153.     NAME
  154.         DivideToString - divide two numbers, store the result as ASCII
  155.  
  156.     SYNOPSIS
  157.         DivideToString(buffer, numerator, denominator, places, separator)
  158.                          A0       D0          D1         D2        D3
  159.  
  160.         void DivideToString(char *, ULONG, ULONG, short, char);
  161.  
  162.     FUNCTION
  163.         This routine divides the numerator by the denominator, and stores
  164.         the result with one decimal place precision as an ASCII string.
  165.  
  166.     INPUTS
  167.         string - buffer to store result
  168.         numerator - number to divide
  169.         denominator - number to divide by
  170.         places - decimal places, must be set to 1 for now
  171.         separator - columns separator (eg a comma might produce "1,103")
  172.  
  173.     RESULT
  174.         The division is performed and the result stored in the buffer.
  175.  
  176. dopus5.library/DivideU                                 dopus5.library/DivideU
  177.  
  178.     NAME
  179.         DivideU - 32bit unsigned division with remainder
  180.  
  181.     SYNOPSIS
  182.         DivideU(numerator, denominator, remainptr, utillib)
  183.                    D0           D1          A0        A1
  184.  
  185.         ULONG DivideU(ULONG, ULONG, ULONG *, struct Library *);
  186.  
  187.     FUNCTION
  188.         This routine calls the utility.library UDivMod32() routine, and
  189.         returns the result. Any remainder is stored in the supplied
  190.         variable.
  191.  
  192.     INPUTS
  193.         numerator - number to divide
  194.         denominator - number to divide by
  195.         remainptr - pointer to ULONG to store the remainder
  196.         utillib - pointer to UtilityBase
  197.  
  198.     RESULT
  199.         Returns the integer result. The remainder is stored in the supplied
  200.         variable.
  201.  
  202.     SEE ALSO
  203.         utility.library/UDivMod32()
  204.  
  205. dopus5.library/Itoa                                       dopus5.library/Itoa
  206.  
  207.     NAME
  208.         Itoa - converts signed integer to a string
  209.  
  210.     SYNOPSIS
  211.         Itoa(num, string, separator)
  212.               D0     A0       D1
  213.  
  214.         void Itoa(long, char *, char);
  215.  
  216.     FUNCTION
  217.         This routine takes the supplied signed number and converts it to
  218.         an ASCII string.
  219.  
  220.     INPUTS
  221.         num - number to convert
  222.         string - string to store result
  223.         separator - column separator character, or 0 for no separator.
  224.  
  225.     RESULT
  226.         The string is stored in the supplied buffer.
  227.  
  228.     SEE ALSO
  229.         ItoaU()
  230.  
  231. dopus5.library/ItoaU                                     dopus5.library/ItoaU
  232.  
  233.     NAME
  234.         ItoaU - converts unsigned integer to a string
  235.  
  236.     SYNOPSIS
  237.         ItoaU(num, string, separator)
  238.                D0     A0       D1
  239.  
  240.         void ItoaU(long, char *, char);
  241.  
  242.     FUNCTION
  243.         This routine takes the supplied unsigned number and converts it to
  244.         an ASCII string.
  245.  
  246.     INPUTS
  247.         num - number to convert
  248.         string - string to store result
  249.         separator - column separator character, or 0 for no separator.
  250.  
  251.     RESULT
  252.         The string is stored in the supplied buffer.
  253.  
  254.     SEE ALSO
  255.         Itoa()
  256.  
  257. dopus5.library/QualValid                             dopus5.library/QualValid
  258.  
  259.     NAME
  260.         QualValid - mask out invalid qualifiers
  261.  
  262.     SYNOPSIS
  263.         QualValid(qual)
  264.                    D0
  265.  
  266.         USHORT QualValid(USHORT);
  267.  
  268.     FUNCTION
  269.         Masks out invalid qualifiers from the supplied value and returns
  270.         the result.
  271.  
  272.     INPUTS
  273.         qual - qualifier mask
  274.  
  275.     RESULT
  276.         The return value is the new qualifier mask. Only the following
  277.         qualifiers are considered "valid" for operations within Opus :
  278.  
  279.             IEQUALIFIER_LCOMMAND, IEQUALIFIER_RCOMMAND,
  280.             IEQUALIFIER_LSHIFT, IEQUALIFIER_RSHIFT,
  281.             IEQUALIFIER_LALT, IEQUALIFIER_RALT,
  282.             IEQUALIFIER_CONTROL, IEQUALIFIER_NUMERICPAD
  283.  
  284. dopus5.library/Random                                    dopus5.libary/Random
  285.  
  286.     NAME
  287.         Random - generate a psuedo-random number
  288.  
  289.     SYNOPSIS
  290.         Random(limit)
  291.                 D0
  292.  
  293.         long Random(long);
  294.  
  295.     FUNCTION
  296.         Returns a psuedo-random number between 0 and 'limit' inclusive.
  297.  
  298.     INPUTS
  299.         limit - upper limit of number
  300.  
  301.     RESULT
  302.         Returns random number.
  303.  
  304.     SEE ALSO
  305.         Seed()
  306.  
  307. dopus5.library/StrCombine                           dopus5.library/StrCombine
  308.  
  309.     NAME
  310.         StrCombine - combine two strings into one buffer
  311.  
  312.     SYNOPSIS
  313.         StrCombine(buffer, first, second, size)
  314.                      A0      A1     A2     D0
  315.  
  316.         BOOL StrCombine(char *, char *, char *, long);
  317.  
  318.     FUNCTION
  319.         Combines the two supplied strings into the one buffer.
  320.  
  321.     INPUTS
  322.         buffer - buffer to store result
  323.         first - first string
  324.         second - second string
  325.         size - size of buffer
  326.  
  327.     RESULT
  328.         Returns TRUE if both strings fitted in the buffer, or FALSE
  329.         if they had to be truncated.
  330.  
  331.     SEE ALSO
  332.         StrConcat()
  333.  
  334. dopus5.library/StrConcat                             dopus5.library/StrConcat
  335.  
  336.     NAME
  337.         StrConcat - concatenate two strings
  338.  
  339.     SYNOPSIS
  340.         StrConcat(first, second, size)
  341.                     A0     A1     D0
  342.  
  343.         BOOL StrConcat(char *, char *, long);
  344.  
  345.     FUNCTION
  346.         Joins the second string to the end of the first string.
  347.  
  348.     INPUTS
  349.         first - first string
  350.         second - string to join
  351.         size - size of first buffer
  352.  
  353.     RESULT
  354.         The second string is joined to the end of the first string.
  355.         This function returns TRUE if the second string fitted in the
  356.         buffer, or FALSE if it had to be truncated.
  357.  
  358.     SEE ALSO
  359.         StrCombine()
  360.  
  361. dopus5.library/Seed                                       dopus5.library/Seed
  362.  
  363.     NAME
  364.         Seed - seed the random number generator
  365.  
  366.     SYNOPSIS
  367.         Seed(seed)
  368.               D0
  369.  
  370.         void Seed(long);
  371.  
  372.     FUNCTION
  373.         Seeds the random number generator.
  374.  
  375.     INPUTS
  376.         seed - value to seed generator with
  377.  
  378.     SEE ALSO
  379.         Random()
  380.  
  381.