⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 common.h

📁 联通接收发送新程序
💻 H
字号:
/* Copyright(C) 1999, 2000 by JiangSu Bell Software CO.,LTD. */
/*
  Name: common.h                       Version: 1.0.0
  Created by HanBing                   Date: 2000-08-08
  Comment: Our group defining all base-class sets
  Modified:
2)  2000-09-18	HanBing	-	Add functions for Print: PrintText;
1)  2000-08-08	HanBing	-	Create;
*/


#ifndef __COMMON__
#define __COMMON__

#ifndef __STDC__
#define __STDC__  1
#endif //__STDC__

#ifdef _WINDOWS

  #include <windows.h>

#elif defined( UNIX ) || defined( VMS )

#ifdef hpux
  typedef enum BoolType
  {
    false = 0,
    true  = 1
  } bool;
#endif // bool

#ifndef BOOL
  #define BOOL  bool
#endif

#ifndef TRUE
  #define TRUE  true
#endif

#ifndef FALSE
  #define FALSE false
#endif

#endif

#include <ctype.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <iostream.h>

typedef unsigned char   uchar;
typedef unsigned int    uint;
typedef unsigned long   ulong;
typedef unsigned short  ushort;

#include "ostring.h"
#include "otimespan.h"
#include "otime.h"

#include "T_LIST.hpp"
#include "T_LIST10.hpp"
#include "profile.h"

extern "C"
{
  char* Rtrim( char *str );
  char* Ltrim( char *str );
  char* TrimChar( char *str, int flag );
  char* PackString( char *str );
  bool  IsNumber  ( char *src );
  char* GetNjTime( char *s_ch_code ); 
  char* StrnCpy( char* dest, const char* src, int len );
}

extern "C"
{
  const char* Encrypt( const char* pwd, const char* salt, char* encrypted = NULL );
  const char* Decrypt( const char* pwd, const char* salt, char* decrypted = NULL );
}

inline const char* EnPasswd( const char* pwd, char* encrypted = NULL )
{
  return Encrypt( pwd, "hzjcfgnld", encrypted );
}

inline const char* DePasswd( const char* pwd, char* decrypted = NULL )
{
  return Decrypt( pwd, "hzjcfgnld", decrypted );
}

extern short StdAnnounce( const char* exp, const char *file, unsigned line, const char *str );

#ifdef _WINDOWS
extern short WinAnnounce( const char *exp, const char *file, unsigned line, const char *str );
#define Assert( exp, str ) ( (exp) ? NULL : WinAnnounce( (const char*)#exp, (const char*)__FILE__, __LINE__, str ) )
#else
#define Assert( exp, str ) ( (exp) ? NULL : StdAnnounce( (const char*)#exp, (const char*)__FILE__, __LINE__, str ) )
#endif

extern "C" bool PrintText( char **ppc_text, const char *p_in, const char *p_out = NULL );

typedef enum common_state
{
  closed = 0,
  opened = 1
} State;

#endif //__COMMON__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -