home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / win3 / patches / symantec / rtlinc.exe / 2COMP.H next >
C/C++ Source or Header  |  1993-08-02  |  837b  |  32 lines

  1. /* $Revision:   1.2  $ */
  2.  
  3. #ifndef __2COMP_H
  4. #define __2COMP_H
  5.  
  6. #pragma pack(1)
  7.  
  8. struct _2c_translate_info {
  9.     char *cp;
  10.     char digits[20];
  11.     int neg, radix, dcount, bytes;
  12. };
  13.  
  14. class ostream;
  15. class istream;
  16. class _2Comp {
  17. friend class ostream;
  18. friend class istream;
  19.     static  ostream & _cdecl insert(ostream&, const void *body, int bytes, int issigned);
  20.     static int _cdecl format(unsigned char *body, char *buf, int bytes,
  21.             int radix, int upper, int negative);
  22.     static istream & _cdecl extract(istream &is, void *body, int bytes);
  23.     static int _cdecl _2Comp::xlate(char *s, unsigned char *body,
  24.             int radix, int negative, int bytes);
  25.     static int _cdecl div(unsigned char *body, int d, int bytes);
  26.     static void _cdecl negate(unsigned char *body, int bytes);
  27. };
  28.  
  29. #pragma pack()
  30. #endif
  31.  
  32.