From 6beea0ecdcee6728651e7342e5d3c8e261168caf Mon Sep 17 00:00:00 2001 From: Saturneic Date: Wed, 22 Aug 2018 23:38:03 +0800 Subject: [PATCH] utf-8 --- ZE-Standard-Libraries.xcodeproj/project.pbxproj | 14 +++++++------- communicate/communicate.h | 8 -------- type/type.h | 13 ++++++++++++- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/ZE-Standard-Libraries.xcodeproj/project.pbxproj b/ZE-Standard-Libraries.xcodeproj/project.pbxproj index a485e40..e9882e2 100644 --- a/ZE-Standard-Libraries.xcodeproj/project.pbxproj +++ b/ZE-Standard-Libraries.xcodeproj/project.pbxproj @@ -33,8 +33,8 @@ /* Begin PBXFileReference section */ 9233C30E212292B000FB2485 /* md5.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = md5.h; path = id/md5.h; sourceTree = ""; }; 9233C30F212292B000FB2485 /* md5.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = md5.c; path = id/md5.c; sourceTree = ""; }; - 9246994F20CD000300B4E894 /* list.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = list.c; sourceTree = ""; }; - 9246995020CD000300B4E894 /* list_expand.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = list_expand.h; sourceTree = ""; }; + 9246994F20CD000300B4E894 /* list.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; lineEnding = 0; path = list.c; sourceTree = ""; }; + 9246995020CD000300B4E894 /* list_expand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = list_expand.h; sourceTree = ""; }; 9246995120CD000300B4E894 /* list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = list.h; sourceTree = ""; }; 9246995820CE52A700B4E894 /* stack.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = stack.h; sourceTree = ""; }; 9246995920CE52A700B4E894 /* stack.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = stack.c; sourceTree = ""; }; @@ -42,10 +42,10 @@ 9246995D20CE655900B4E894 /* tree.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = tree.h; sourceTree = ""; }; 9246995E20CE655900B4E894 /* tree.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = tree.c; sourceTree = ""; }; 9269D4E7210F1B3D00161557 /* stack_expand.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stack_expand.c; sourceTree = ""; }; - 9269D4E9210F1B4B00161557 /* list_expand.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = list_expand.c; sourceTree = ""; }; - 9269D4EB210F1B5E00161557 /* test.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = test.c; sourceTree = ""; }; - 9269D4EC210F1B5E00161557 /* test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = test.h; sourceTree = ""; }; - 9269D4F0210F1B8000161557 /* type.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = type.h; path = type/type.h; sourceTree = ""; }; + 9269D4E9210F1B4B00161557 /* list_expand.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 0; path = list_expand.c; sourceTree = ""; }; + 9269D4EB210F1B5E00161557 /* test.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 0; path = test.c; sourceTree = ""; }; + 9269D4EC210F1B5E00161557 /* test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = test.h; sourceTree = ""; }; + 9269D4F0210F1B8000161557 /* type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = type.h; path = type/type.h; sourceTree = ""; }; 9269D4F2210F1BB000161557 /* id.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = id.c; path = id/id.c; sourceTree = ""; }; 9269D4F3210F1BB000161557 /* id.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = id.h; path = id/id.h; sourceTree = ""; }; 9269D4F7210F1D0B00161557 /* tree_expand.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tree_expand.c; sourceTree = ""; }; @@ -54,7 +54,7 @@ 9286EB79211400C900752977 /* error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = error.c; path = error/error.c; sourceTree = ""; }; 9286EB7B211400D000752977 /* error.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = error.h; path = error/error.h; sourceTree = ""; }; 9286EB7D2114022A00752977 /* communicate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 0; name = communicate.c; path = communicate/communicate.c; sourceTree = ""; }; - 9286EB7F2114022F00752977 /* communicate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = communicate.h; path = communicate/communicate.h; sourceTree = ""; }; + 9286EB7F2114022F00752977 /* communicate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = communicate.h; path = communicate/communicate.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ diff --git a/communicate/communicate.h b/communicate/communicate.h index 991bf3b..5ebe1d0 100644 --- a/communicate/communicate.h +++ b/communicate/communicate.h @@ -4,14 +4,6 @@ #include "../type/type.h" #include "../list/list_expand.h" -typedef struct message{ - SID *p_sid; - time_t time; - char titile[16]; - unsigned long size; - char content[0]; -}MSG; - D_FILE *initDataFileForWrite(char *route); D_FILE *initDataFileForRead(char *route); STD_BLOCKS *initStandardDBlocks(SID *p_sid, unsigned int type, unsigned long long data_size); diff --git a/type/type.h b/type/type.h index 9cc4887..50b810e 100644 --- a/type/type.h +++ b/type/type.h @@ -89,7 +89,7 @@ /************************************************ - *库相关结构的定义 + *库相关结构体的定义 ************************************************/ /* @@ -337,4 +337,15 @@ typedef struct standard_data{ List *pd_ctnlst;//数据块连接关系结构的储存链表 }STD_DATA; +/* + *消息的管理及操作的结构 + */ +typedef struct message{ + SID *p_sid;//消息的ID + time_t time;//消息的产生时间 + char titile[16];//消息标题 + unsigned long size;//消息的大小 + char content[0];//消息的正文 +}MSG; + #endif /* type_h */