int notifyListStart(XsldbgMessageEnum type) { int result = 0; switch (type) { case XSLDBG_MSG_INTOPTION_CHANGE: case XSLDBG_MSG_STRINGOPTION_CHANGE: msgList = arrayListNew(10, (freeItemFunc) optionsParamItemFree); break; default: msgList = arrayListNew(10, NULL); } notifyList = (notifyMessageListPtr) xmlMalloc(sizeof(notifyMessageList)); if (notifyList && msgList) { notifyList->type = type; notifyList->list = msgList; result = 1; } return result; }
/** * breakPointInit: * * Returns 1 if breakpoints have been initialized properly and all * memory required has been obtained, * 0 otherwise */ int breakPointInit(void) { int result = 0; /* the average file has 395 lines of code so add 100 lines now */ breakList = arrayListNew(100, lineNoItemFree); if (breakList) { /* * We don't need to do any thing else, as its done when we add the * breakPoints */ result = 1; } else { #ifdef WITH_XSLDBG_DEBUG_BREAKPOINTS xsltGenericError(xsltGenericErrorContext, "Unable to intialize breakPoints: memory error\n"); #endif } return result; }