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

📄 pub.h

📁 自已结累的Unix下C语言开发函数库
💻 H
字号:
/* *公用函数库头文件 */#ifndef _H_PUB#define _H_PUB/*包含的头文件*/#include <stdio.h>#include	<fcntl.h>#include <stdlib.h>#include <errno.h>#include	<assert.h>#include <varargs.h>#include <time.h>#include <sys/timeb.h>#include <sys/types.h>#include <sys/ipc.h>#include <sys/msg.h>#include <sys/shm.h>#include <unistd.h>#include <sys/socket.h>#include	<netinet/in.h>#include	<netinet/tcp.h>#include	<arpa/inet.h>#include "./DefConst.h"#include "./Screen.h"/* 函数声明 *//* 1.pub_AscBin */char *Char2Binary           ( ) ;char *S_Char2Binary         ( ) ;char AsciiByte2HexByte      ( ) ;char *Ascii2Bcd             ( ) ;char *Bcd2Ascii             ( ) ;unsigned char BinaryStr2Byte( ) ;void String2BinaryStr       ( ) ;/* 2.pub_DateTime */int  Is_RunYear  ( ) ;void IntervalDate( ) ;void OutChinaDate( ) ;int  GetCurtTimeb( ) ;int  GetBetweenTimeb1ToTimeb2( ) ;void getlocaldatetime( ) ;/* 3.pub_File */int  GetFileString            ( ) ;int  FindSection              ( ) ;int  GetLinesBetweenSection   ( ) ;int  GetMaxWidthBetweenSection( ) ;int  GetFileStringNoTail      ( ) ;void FileChmod                ( ) ;/* 4.pub_FmtData */void LongTypeToFixStr  ( ) ;int  DoubleTypeToFixStr( ) ;void ChangeAmount( ) ;/* 5.pub_MsgFun */key_t GetKey      ( ) ;int   CrtMsgQ     ( ) ;int   CrtMsgQ_C   ( ) ;int   RemoveQ     ( ) ;int   GetQ_Ds     ( ) ;int   ChangeQ_Mode( ) ;int   MsgRcv      ( ) ;int   MsgRcvC     ( ) ;int   MsgSnd      ( ) ;/* 6.pub_Shm */int CrtShm     ( ) ;int GetPtrShmat( ) ;int RemoveShm  ( ) ;int WriteShm   ( ) ;int ChangeShm  ( ) ;/* 7.pub_String */void StrTrim     ( ) ;void ToUpperStr  ( ) ;void ToLowerStr  ( ) ;int  FindChar    ( ) ;int  FindStr     ( ) ;int  SetCenterStr( ) ;int  SetRightStr ( ) ;int  SetLeftStr  ( ) ;/* 8.pub_WriteLog */void WrinteFmtLog     ( ) ;int  WlogSuperaddition( ) ;void Error            ( ) ;void WlogHexContent   ( ) ;/* 9.pub_Socket */void init_socket( ) ;void SetSocketRuseAddr( ) ;int  close_socket( ) ;int  pcsp_server_connect( ) ;int  pcsp_client_connect( ) ;int  pcsp_tcp_send( ) ;int  pcsp_tcp_receive( ) ;int  pcsp_tcp_receive_waitall( ) ;char *pcsp_get_client_address( ) ;int  readn( ) ;int  writen( ) ;int  CreateSocket( ) ;int  BindIP( ) ;int  Listen( ) ;int  Accept( ) ;/* 10.pub_FileLock */int lm_lock( ) ;int lm_unlock( ) ; /* 11.pub_Screen *//* 函数在Screen.h中申明了 */#endif

⌨️ 快捷键说明

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