home *** CD-ROM | disk | FTP | other *** search
/ synchro.net / synchro.net.tar / synchro.net / main / BBS / ODOORS62.ZIP / ODUtil.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-19  |  2.8 KB  |  67 lines

  1. /* OpenDoors Online Software Programming Toolkit
  2.  * (C) Copyright 1991 - 1999 by Brian Pirie.
  3.  *
  4.  * This library is free software; you can redistribute it and/or
  5.  * modify it under the terms of the GNU Lesser General Public
  6.  * License as published by the Free Software Foundation; either
  7.  * version 2 of the License, or (at your option) any later version.
  8.  *
  9.  * This library is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.  * Lesser General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU Lesser General Public
  15.  * License along with this library; if not, write to the Free Software
  16.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  17.  *
  18.  *
  19.  *        File: ODUtil.h
  20.  *
  21.  * Description: Contains prototypes and definitions for use by non-platform
  22.  *              specific utility functions. These functions are implemented in
  23.  *              odutil.c. Platform-specific utility functions are defined in
  24.  *              odplat.h, and implemented in odplat.c.
  25.  *
  26.  *   Revisions: Date          Ver   Who  Change
  27.  *              ---------------------------------------------------------------
  28.  *              Nov 01, 1994  6.00  BP   Created.
  29.  *              Dec 31, 1994  6.00  BP   Added ODMakeFilename().
  30.  *              Nov 13, 1995  6.00  BP   32-bit portability.
  31.  *              Nov 23, 1995  6.00  BP   Added ODDWordDivide().
  32.  *              Nov 23, 1995  6.00  BP   Added ODDStringHasTail().
  33.  *              Nov 23, 1995  6.00  BP   Added ODFileSize().
  34.  *              Feb 19, 1996  6.00  BP   Changed version number to 6.00.
  35.  *              Mar 03, 1996  6.10  BP   Begin version 6.10.
  36.  *              Mar 06, 1996  6.10  BP   Added ODDWordMultiply().
  37.  */
  38.  
  39. #ifndef _INC_ODUTIL
  40. #define _INC_ODUTIL
  41.  
  42. #include "ODGen.h"
  43. #include "ODTypes.h"
  44. #include "OpenDoor.h"
  45.  
  46. /* General string manipulation functions. */
  47. void ODStringCopy(char *pszDest, CONST char *pszSource, INT nSizeofDest);
  48. char *ODStringCToPascal(char *psPascalString, BYTE btMaxPascalLength,
  49.    char *pszCString);
  50. char *ODStringPascalToC(char *pszCString, char *psPascalString,
  51.    BYTE btMaxLength);
  52. BOOL ODStringHasTail(char *pszFullString, char *pszTail);
  53.  
  54. /* File-related functions. */
  55. tODResult ODMakeFilename(char *pszOut, CONST char *pszPath,
  56.    CONST char *pszFilename, INT nMaxOutSize);
  57. DWORD ODFileSize(FILE *pfFile);
  58.  
  59. /* DWORD math functions. */
  60. DWORD ODDWordShiftLeft(DWORD dwValue, BYTE btDistance);
  61. DWORD ODDWordShiftRight(DWORD dwValue, BYTE btDistance);
  62. BOOL ODDWordDivide(DWORD *pdwQuotient, DWORD *pdwRemainder,
  63.    DWORD dwDividend, DWORD dwDivisor);
  64. DWORD ODDWordMultiply(DWORD dwMultiplicand, DWORD dwMultiplier);
  65.  
  66. #endif /* !_INC_ODUTIL */
  67.