home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / UTILITY.H < prev    next >
C/C++ Source or Header  |  1997-02-28  |  4KB  |  110 lines

  1. /* @(#)Z 1.5 com/src/cm/Utility.h, odstorage, od96os2, odos29646d 96/11/15 15:27:39 (96/10/29 09:20:16) */
  2. /*====START_GENERATED_PROLOG======================================
  3.  */
  4. /*
  5.  *   COMPONENT_NAME: odstorage
  6.  *
  7.  *   CLASSES: none
  8.  *
  9.  *   ORIGINS: 82,27
  10.  *
  11.  *
  12.  *   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  13.  *   All Rights Reserved
  14.  *   Licensed Materials - Property of IBM
  15.  *   US Government Users Restricted Rights - Use, duplication or
  16.  *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  17.  *       
  18.  *   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  19.  *   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  20.  *   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  21.  *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  22.  *   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  23.  *   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  24.  *   OR PERFORMANCE OF THIS SOFTWARE.
  25.  */
  26. /*====END_GENERATED_PROLOG========================================
  27.  */
  28.  
  29. /*
  30.     File:        Utility.h
  31.  
  32.     Contains:    Container Manager Miscellaneous Utility Routines Interfaces
  33.  
  34.     Written by:    Ira L. Ruben
  35.  
  36.     Owned by:    Ed Lai
  37.  
  38.     Copyright:    ⌐ 1991-1994 by Apple Computer, Inc., all rights reserved.
  39.  
  40.     Change History (most recent first):
  41.  
  42.          <2>     8/26/94    EL        #1181622 Ownership update.
  43.          <1>      2/3/94    EL        first checked in
  44.  
  45.     To Do:
  46. */
  47.  
  48. /*---------------------------------------------------------------------------*
  49.  |                                                                           |
  50.  |                         <<<     Utility.h     >>>                         |
  51.  |                                                                           |
  52.  |        Container Manager Miscellaneous Utility Routines Interfaces        |
  53.  |                                                                           |
  54.  |                               Ira L. Ruben                                |
  55.  |                                 12/02/91                                  |
  56.  |                                                                           |
  57.  |                  Copyright Apple Computer, Inc. 1991-1994                 |
  58.  |                           All rights reserved.                            |
  59.  |                                                                           |
  60.  *---------------------------------------------------------------------------*
  61.  
  62.  This file containes a collection of generally usefull utility routines that don't
  63.  logically fit anywhere else.
  64. */
  65.  
  66. #ifndef __UTILITYROUTINES__
  67. #define __UTILITYROUTINES__
  68.  
  69.  
  70. #ifndef __CMTYPES__
  71. #include "CMTypes.h"
  72. #endif
  73. #ifndef __HANDLERS__
  74. #include "Handlers.h"
  75. #endif
  76. #ifndef __TOCENTRIES__
  77. #include "TOCEnts.h"   
  78. #endif
  79. #ifndef __TOCOBJECTS__
  80. #include "TOCObjs.h"   
  81. #endif
  82. #ifndef __CONTAINEROPS__
  83. #include "Containr.h"  
  84. #endif
  85.  
  86.                                                                     CM_CFUNCTIONS
  87.  
  88.  
  89. CM_CHAR *cmltostr(CM_LONG n, CM_SHORT width, CMBoolean hexConversion, CM_CHAR *s);
  90.     /*
  91.     Converts the (long) integer n to a string. IF width>0 and width > strlen(string), then
  92.     the number will be right-justified in a string of width characters.  If width<0 and 
  93.     abs(width) > length(string), then the number is again right-justified but padded with
  94.     leading zeros instead of blanks.    In this case a negative number will have a minus as
  95.     its first character.  If width is too small the entire number is returned overflowing
  96.     the width.
  97.     
  98.     If hex conversion is desired, set the hexConversion parameter to true.
  99.     
  100.     The function returns the specified string parameter as its value. That string is assumed
  101.     large enough to hold the number.
  102.     
  103.     Note, this routine is provided as a substitute for sprintf().  It is more compact,
  104.     faster, and doesn't "drag" in a lot of I/O library routines with it.
  105.     */
  106.     
  107.     
  108.                                                           CM_END_CFUNCTIONS
  109. #endif
  110.