Changeset 8006 for trunk/tools/database
- Timestamp:
- Feb 24, 2002, 3:58:29 AM (24 years ago)
- Location:
- trunk/tools/database
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/database/APIImport.cpp
r6678 r8006 1 /* $Id: APIImport.cpp,v 1.1 2 2001-09-07 10:31:42bird Exp $ */1 /* $Id: APIImport.cpp,v 1.13 2002-02-24 02:58:26 bird Exp $ */ 2 2 /* 3 3 * … … 12 12 * Header Files * 13 13 *******************************************************************************/ 14 #include <os2.h>15 14 #include <stdio.h> 16 15 #include <string.h> 17 16 18 #include "APIImport.h" 17 #include "kTypes.h" 18 #include "kError.h" 19 19 #include "kFile.h" 20 #include "k Interfaces.h"20 #include "kFileInterfaces.h" 21 21 #include "kFileFormatBase.h" 22 22 #include "kFilePE.h" 23 23 #include "kFileDef.h" 24 25 #include "APIImport.h" 24 26 #include "db.h" 25 27 … … 50 52 { 51 53 int argi; 52 BOOLfFatal = FALSE;54 KBOOL fFatal = FALSE; 53 55 long lRc = 0; 54 56 OPTIONS options = {0}; … … 270 272 { 271 273 i = i; 272 kFileDef *pFile = new kFileDef( pInFile);274 kFileDef *pFile = new kFileDef(new kFile(pszFilename)); 273 275 pExportFile = pFile; 274 276 pModuleFile = pFile; … … 288 290 if ((lDll = dbCheckInsertDll(pszModuleName, DLL_ODIN32_API)) >= 0) 289 291 { 290 BOOLfClearUpdateOk = FALSE;291 BOOLfOk;292 KBOOL fClearUpdateOk = FALSE; 293 KBOOL fOk; 292 294 kExportEntry export; 293 295 -
trunk/tools/database/APIImport.h
r3882 r8006 1 /* $Id: APIImport.h,v 1. 3 2000-07-21 21:09:43bird Exp $ */1 /* $Id: APIImport.h,v 1.4 2002-02-24 02:58:27 bird Exp $ */ 2 2 /* 3 3 * APIImportPE - imports a DLL with functions into the Odin32 database. Header. … … 20 20 typedef struct _options 21 21 { 22 BOOLfIgnoreOrdinals; /* Don't update ordinals. */23 BOOLfErase; /* Erase functions which wasn't found. */22 KBOOL fIgnoreOrdinals; /* Don't update ordinals. */ 23 KBOOL fErase; /* Erase functions which wasn't found. */ 24 24 } OPTIONS, *POPTIONS; 25 25 -
trunk/tools/database/StateUpd.cpp
r6678 r8006 1 /* $Id: StateUpd.cpp,v 1. 39 2001-09-07 10:31:43bird Exp $1 /* $Id: StateUpd.cpp,v 1.40 2002-02-24 02:58:27 bird Exp $ 2 2 * 3 3 * StateUpd - Scans source files for API functions and imports data on them. … … 20 20 #include <stdlib.h> 21 21 #include <assert.h> 22 22 #include <direct.h> 23 24 #include "kTypes.h" 23 25 #include "StateUpd.h" 24 26 #include "db.h" … … 53 55 static unsigned long analyseFnDcl(PFNDESC pFnDesc, char **papszLines, int i, int &iRet, const char *pszFilename, POPTIONS pOptions); 54 56 static unsigned long analyseFnDcl2(PFNDESC pFnDesc, char **papszLines, int i, int &iRet, const char *pszFilename, POPTIONS pOptions); 55 static char *SDSCopyTextUntilNextTag(char *pszTarget, BOOL fHTML, int iStart, int iEnd, char **papszLines, const char *pszStart = NULL);56 static char *CommonCopyTextUntilNextTag(char *pszTarget, BOOL fHTML, int iStart, int iEnd, char **papszLines, const char *pszStart = NULL);57 static BOOLisFunction(char **papszLines, int i, POPTIONS pOptions);58 static BOOLisDesignNote(char **papszLines, int i, POPTIONS pOptions);57 static char *SDSCopyTextUntilNextTag(char *pszTarget, KBOOL fHTML, int iStart, int iEnd, char **papszLines, const char *pszStart = NULL); 58 static char *CommonCopyTextUntilNextTag(char *pszTarget, KBOOL fHTML, int iStart, int iEnd, char **papszLines, const char *pszStart = NULL); 59 static KBOOL isFunction(char **papszLines, int i, POPTIONS pOptions); 60 static KBOOL isDesignNote(char **papszLines, int i, POPTIONS pOptions); 59 61 static long _System dbNotUpdatedCallBack(const char *pszValue, const char *pszFieldName, void *pvUser); 60 62 static char *skipInsignificantChars(char **papszLines, int &i, char *psz); … … 69 71 static void copy(char *psz, char *pszFrom, int iFrom, char *pszTo, int iTo, char **papszLines); 70 72 static void copy(char *psz, int jFrom, int iFrom, int jTo, int iTo, char **papszLines); 71 static void copyComment(char *psz, char *pszFrom, int iFrom, char **papszLines, BOOL fStrip,BOOL fHTML);72 static void copyComment(char *psz, int jFrom, int iFrom, char **papszLines, BOOL fStrip,BOOL fHTML);73 static void copyComment(char *psz, char *pszFrom, int iFrom, char **papszLines, KBOOL fStrip, KBOOL fHTML); 74 static void copyComment(char *psz, int jFrom, int iFrom, char **papszLines, KBOOL fStrip, KBOOL fHTML); 73 75 static char *stristr(const char *pszStr, const char *pszSubStr); 74 76 static char *skipBackwards(const char *pszStopAt, const char *pszFrom, int &iLine, char **papszLines); … … 85 87 { 86 88 int argi; 87 BOOLfFatal = FALSE;89 KBOOL fFatal = FALSE; 88 90 unsigned long ulRc = 0; 89 91 char szDLLName[64]; … … 96 98 char *pszPasswd = ""; 97 99 ULONG ul1, ul2; 98 ULONGcUpdated, cAll, cNotAliased;100 unsigned long cUpdated, cAll, cNotAliased; 99 101 100 102 DosError(0x3); … … 468 470 PSZ pszDir; 469 471 PSZ pszFile; 470 BOOLfFile;472 KBOOL fFile; 471 473 472 474 /* -0.*/ … … 1200 1202 1201 1203 /* 2a. */ 1202 /* operators are not supported ( BOOL kTime::operator > (const kTime &time) const) */1204 /* operators are not supported (KBOOL kTime::operator > (const kTime &time) const) */ 1203 1205 if (pszFn > papszLines[iFn]) 1204 1206 { … … 1278 1280 if (strnicmp(pszFn, "ODINFUNCTION", 12) == 0 || strnicmp(pszFn, "ODINPROCEDURE", 13) == 0) 1279 1281 { 1280 BOOL fProc = strnicmp(pszFn, "ODINPROCEDURE", 13) == 0;1282 KBOOL fProc = strnicmp(pszFn, "ODINPROCEDURE", 13) == 0; 1281 1283 j = 0; 1282 1284 if (cArgs < (fProc ? 1 : 2)) … … 1830 1832 * @remark Addes some HTML tags. 1831 1833 */ 1832 static char *SDSCopyTextUntilNextTag(char *pszTarget, BOOL fHTML, int iStart, int iEnd, char **papszLines, const char *pszStart)1834 static char *SDSCopyTextUntilNextTag(char *pszTarget, KBOOL fHTML, int iStart, int iEnd, char **papszLines, const char *pszStart) 1833 1835 { 1834 1836 char *pszRet = pszTarget; … … 1957 1959 * @remark Addes some HTML tags. 1958 1960 */ 1959 static char *CommonCopyTextUntilNextTag(char *pszTarget, BOOL fHTML, int iStart, int iEnd, char **papszLines, const char *pszStart)1961 static char *CommonCopyTextUntilNextTag(char *pszTarget, KBOOL fHTML, int iStart, int iEnd, char **papszLines, const char *pszStart) 1960 1962 { 1961 1963 char *pszRet = pszTarget; … … 2087 2089 * @param pOptions Pointer to options. 2088 2090 */ 2089 static BOOL isFunction(char **papszLines, int i, POPTIONS pOptions)2091 static KBOOL isFunction(char **papszLines, int i, POPTIONS pOptions) 2090 2092 { 2091 2093 if (!pOptions->fOld) … … 2244 2246 * @param pOptions Pointer to options. 2245 2247 */ 2246 static BOOL isDesignNote(char **papszLines, int i, POPTIONS pOptions)2248 static KBOOL isDesignNote(char **papszLines, int i, POPTIONS pOptions) 2247 2249 { 2248 2250 char *psz = papszLines[i]; … … 2327 2329 static char *skipInsignificantChars(char **papszLines, int &i, char *psz) 2328 2330 { 2329 BOOL fComment = *psz == '/' && psz[1] == '*';2331 KBOOL fComment = *psz == '/' && psz[1] == '*'; 2330 2332 2331 2333 while (fComment || *psz == ' ' || *psz == '\0' || (*psz == '/' && psz[1] == '/')) … … 2739 2741 * 2740 2742 */ 2741 static void copyComment(char *psz, char *pszFrom, int iFrom, char **papszLines, BOOL fStrip,BOOL fHTML)2743 static void copyComment(char *psz, char *pszFrom, int iFrom, char **papszLines, KBOOL fStrip, KBOOL fHTML) 2742 2744 { 2743 2745 copyComment(psz, pszFrom - papszLines[iFrom], iFrom, papszLines, fStrip, fHTML); … … 2760 2762 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 2761 2763 */ 2762 static void copyComment(char *psz, int jFrom, int iFrom, char **papszLines, BOOL fStrip,BOOL fHTML)2764 static void copyComment(char *psz, int jFrom, int iFrom, char **papszLines, KBOOL fStrip, KBOOL fHTML) 2763 2765 { 2764 2766 char * pszStartBuffer = psz; /* Start of the target buffer. */ … … 2916 2918 static char *skipBackwards(const char *pszStopAt, const char *pszFrom, int &iLine, char **papszLines) 2917 2919 { 2918 BOOLfComment = FALSE;2920 KBOOL fComment = FALSE; 2919 2921 int i = iLine; 2920 2922 const char *psz = pszFrom; -
trunk/tools/database/StateUpd.h
r6678 r8006 1 /* $Id: StateUpd.h,v 1. 7 2001-09-07 10:33:10bird Exp $ */1 /* $Id: StateUpd.h,v 1.8 2002-02-24 02:58:28 bird Exp $ */ 2 2 /* 3 3 * StateUpd - Scans source files for API functions and imports data on them. … … 16 16 typedef struct _options 17 17 { 18 BOOLfIntegrityBefore; /* ib */19 BOOLfIntegrityAfter; /* ie */20 BOOLfIntegrityOnly; /* io */21 BOOLfRecursive; /* s */22 BOOLfOld; /* Old */23 BOOLfOS2; /* Ignore OS2 prefixes */24 BOOLfCOMCTL32; /* Ignore COMCTL32 prefixes */25 BOOLfVERSION; /* Ignore VERSION prefixes */18 KBOOL fIntegrityBefore; /* ib */ 19 KBOOL fIntegrityAfter; /* ie */ 20 KBOOL fIntegrityOnly; /* io */ 21 KBOOL fRecursive; /* s */ 22 KBOOL fOld; /* Old */ 23 KBOOL fOS2; /* Ignore OS2 prefixes */ 24 KBOOL fCOMCTL32; /* Ignore COMCTL32 prefixes */ 25 KBOOL fVERSION; /* Ignore VERSION prefixes */ 26 26 char * pszDLLName; /* Name of the dll being processed */ 27 27 signed long lDllRefcode; /* Database reference code of the dll */ -
trunk/tools/database/db.cpp
r7911 r8006 1 /* $Id: db.cpp,v 1.2 8 2002-02-15 14:09:56bird Exp $ *1 /* $Id: db.cpp,v 1.29 2002-02-24 02:58:29 bird Exp $ * 2 2 * 3 3 * DB - contains all database routines. … … 64 64 #include <mysql.h> 65 65 66 #include "kTypes.h" 66 67 #include "db.h" 67 68 -
trunk/tools/database/db.h
r6678 r8006 1 /* $Id: db.h,v 1.1 6 2001-09-07 10:31:44bird Exp $ */1 /* $Id: db.h,v 1.17 2002-02-24 02:58:29 bird Exp $ */ 2 2 /* 3 3 * DB - contains all database routines … … 101 101 char * _System dbGetLastErrorDesc(void); 102 102 103 BOOL_System dbConnect(const char *pszHost,103 KBOOL _System dbConnect(const char *pszHost, 104 104 const char *pszUser, 105 105 const char *pszPassword, 106 106 const char *pszDatabase); 107 BOOL_System dbDisconnect();107 KBOOL _System dbDisconnect(); 108 108 signed long _System dbGetDll(const char *pszDllName); 109 109 signed long _System dbCountFunctionInDll(signed long ulDll, 110 BOOL fNotAliases);110 KBOOL fNotAliases); 111 111 signed long _System dbCheckInsertDll(const char *pszDll, char fchType); 112 112 unsigned short _System dbGet(const char *pszTable, … … 114 114 const char *pszMatch1, 115 115 const char *pszMatchValue1); 116 BOOL_System dbInsertUpdateFunction(signed long lDll,116 KBOOL _System dbInsertUpdateFunction(signed long lDll, 117 117 const char *pszFunction, 118 118 const char *pszIntFunction, 119 119 unsigned long ulOrdinal, 120 BOOL fIgnoreOrdinal,120 KBOOL fIgnoreOrdinal, 121 121 char fchType); 122 BOOL_System dbInsertUpdateFile(signed long lDll,122 KBOOL _System dbInsertUpdateFile(signed long lDll, 123 123 const char *pszFilename, 124 124 const char *pszDescription, … … 126 126 signed long lLastAuthor, 127 127 const char *pszRevision); 128 BOOL_System dbFindFunction(const char *pszFunctionName,128 KBOOL _System dbFindFunction(const char *pszFunctionName, 129 129 PFNFINDBUF pFnFindBuf, 130 130 signed long lDll); … … 135 135 signed long lDll, 136 136 char *pszError); 137 BOOL_System dbRemoveDesignNotes(signed long lFile);138 BOOL_System dbAddDesignNote(signed long lDll,137 KBOOL _System dbRemoveDesignNotes(signed long lFile); 138 KBOOL _System dbAddDesignNote(signed long lDll, 139 139 signed long lFile, 140 140 const char *pszTitle, … … 144 144 signed long lSeqNbrNote, 145 145 signed long lLine, 146 BOOLfSubSection,146 KBOOL fSubSection, 147 147 signed long *plRefCode); 148 148 unsigned long _System dbCreateHistory(char *pszError); … … 152 152 void * _System dbExecuteQuery(const char *pszQuery); 153 153 signed long _System dbQueryResultRows(void *pres); 154 BOOL_System dbFreeResult(void *pres);155 BOOL_System dbFetch(void *pres,154 KBOOL _System dbFreeResult(void *pres); 155 KBOOL _System dbFetch(void *pres, 156 156 DBCALLBACKFETCH dbFetchCallBack, 157 157 void *pvUser); 158 158 signed long _System dbDateToDaysAfterChrist(const char *pszDate); 159 BOOL_System dbDaysAfterChristToDate(signed long ulDays,159 KBOOL _System dbDaysAfterChristToDate(signed long ulDays, 160 160 char *pszDate); 161 161 /* StateUpd stuff */ 162 BOOL_System dbGetNotUpdatedFunction(signed long lDll,162 KBOOL _System dbGetNotUpdatedFunction(signed long lDll, 163 163 DBCALLBACKFETCH dbFetchCallBack); 164 164 signed long _System dbGetNumberOfUpdatedFunction(signed long lDll); 165 165 166 166 /* APIImport stuff */ 167 BOOL_System dbClearUpdateFlagFile(signed long lDll);168 BOOL _System dbClearUpdateFlagFunction(signed long lDll,BOOL fAll);169 BOOL_System dbDeleteNotUpdatedFiles(signed long lDll);170 BOOL _System dbDeleteNotUpdatedFunctions(signed long lDll,BOOL fAll);167 KBOOL _System dbClearUpdateFlagFile(signed long lDll); 168 KBOOL _System dbClearUpdateFlagFunction(signed long lDll, KBOOL fAll); 169 KBOOL _System dbDeleteNotUpdatedFiles(signed long lDll); 170 KBOOL _System dbDeleteNotUpdatedFunctions(signed long lDll, KBOOL fAll); 171 171 172 172 #ifdef __cplusplus
Note:
See TracChangeset
for help on using the changeset viewer.