Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

dllkit.c

Go to the documentation of this file.
00001 
00007 #include "dllkit.h"
00008 
00009 BOOL CreateMsgList(MSGLIST* MsgList, int MessageCount)
00010 {
00011         if (MessageCount == 0) {
00012                 return FALSE;
00013         }
00014         *MsgList = calloc(MessageCount + 1, sizeof(UINT));
00015         if (*MsgList == NULL) {
00016                 return FALSE;
00017         }
00018         (*MsgList)[0] = ENDOFMSGLIST;
00019         return TRUE;
00020 }
00021 
00022 void FreeMsgList(MSGLIST MsgList)
00023 {
00024         free(MsgList);
00025 }
00026 
00027 void AddMessage(MSGLIST MsgList, UINT Message)
00028 {
00029         int i;
00030         if (MsgList == NULL || Message == ENDOFMSGLIST) {
00031                 return;
00032         }
00033         for (i = 0; MsgList[i] != ENDOFMSGLIST; i++)
00034                 ;
00035         MsgList[i] = Message;
00036         MsgList[i+1] = ENDOFMSGLIST;
00037 }

Generated on Fri Sep 6 18:32:14 2002 for Emu6502 by doxygen1.2.17