Changeset 3882 for trunk/tools/database
- Timestamp:
- Jul 21, 2000, 11:09:45 PM (25 years ago)
- Location:
- trunk/tools/database
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/database/APIImport.cpp
r2789 r3882 1 /* $Id: APIImport.cpp,v 1. 5 2000-02-15 13:31:05bird Exp $ */1 /* $Id: APIImport.cpp,v 1.6 2000-07-21 21:09:42 bird Exp $ */ 2 2 /* 3 3 * … … 66 66 * -u:<user> Userid 67 67 * -h:<host> Hostname/IP-address 68 * -e[+|-] Erase functions which wasn't found. 68 69 **************************************************************************/ 69 70 if (argc == 1) … … 82 83 else 83 84 fprintf(stderr, "warning: option '-d:' requires database name.\n"); 85 break; 86 87 case 'e': /* erase */ 88 case 'E': 89 options.fErase = argv[argi][2] != '-'; 84 90 break; 85 91 … … 177 183 " -p:<password> Password. default: <empty>\n" 178 184 " -d:<database> Database to use. default: Odin32\n" 185 " -e[+|-] Erase functions which wasn't found.\n" 186 " default: -e-\n" 179 187 " dll/defnames List of DLL/Defs to process.\n" 180 188 "\n" … … 188 196 "\t2) function name\n" 189 197 "\t3) function ordinal (If not option 'o-' is specified.)\n" 190 "This utililty is not destructive but additive. That is, it would not remove any\n"191 "rows in the database, only add or update them. On existing functions the\n"192 "ordinal value will be updated when 'o+' is specified.\n"193 198 "\n" 194 "Copyright (c) 1999 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)",199 "Copyright (c) 1999-2000 knut st. osmundsen (knut.stange.osmundsen@mynd.no)", 195 200 MAJOR_VER, MINOR_VER 196 201 ); … … 248 253 char achDataBuffer[0x200]; 249 254 char *pszModuleName = &achDataBuffer[0]; 250 signed short sDll;255 signed long lDll; 251 256 252 257 /* try create file objects */ … … 271 276 272 277 /* find or insert module name */ 273 if (( sDll = dbCheckInsertDll(pszModuleName)) >= 0)278 if ((lDll = dbCheckInsertDll(pszModuleName, DLL_ODIN32_API)) >= 0) 274 279 { 275 BOOL fOk; 280 BOOL fClearUpdateOk = FALSE; 281 BOOL fOk; 276 282 EXPORTENTRY export; 283 284 /* Clear the update flag for all functions in this DLL. */ 285 if (pOptions->fErase) 286 fClearUpdateOk = dbClearUpdateFlagFunction(lDll, FALSE); 277 287 278 288 lRc = 0; … … 313 323 } 314 324 else 315 { 316 fOk = dbInsertUpdateFunction( sDll,325 { /* Update Database */ 326 fOk = dbInsertUpdateFunction(lDll, 317 327 &szName[0], 318 328 &szIntName[0], 319 329 export.ulOrdinal, 320 pOptions->fIgnoreOrdinals && export.ulOrdinal != 0xffffffffUL); 330 pOptions->fIgnoreOrdinals && export.ulOrdinal != 0xffffffffUL, 331 FUNCTION_ODIN32_API 332 ); 321 333 if (fOk) 322 334 cFunctions++; 335 else 336 { 337 fprintf(phLog, "%s: error - dbInsertUpdateFunction failed.\n\terror description: %s \n", 338 pszFilename, dbGetLastErrorDesc()); 339 lRc++; 340 } 323 341 } 324 }325 326 if (!fOk)327 {328 fprintf(phLog, "%s: error - dbInsertUpdateFunction failed.\n\terror description: %s \n",329 pszFilename, dbGetLastErrorDesc());330 lRc = 1;331 342 } 332 343 … … 335 346 } 336 347 348 /* Clear the update flag for all functions in this DLL. */ 349 if (fClearUpdateOk && pOptions->fErase) 350 if (!dbDeleteNotUpdatedFunctions(lDll, FALSE)) 351 { 352 fprintf(phLog, "%s: error - dbDeleteNotUpdatedFunctions failed.\n\terror description: %s\n", 353 pszFilename, dbGetLastErrorDesc()); 354 lRc += 1; 355 } 337 356 } 338 357 else -
trunk/tools/database/APIImport.h
r2759 r3882 1 /* $Id: APIImport.h,v 1. 2 2000-02-11 18:35:53 bird Exp $ */1 /* $Id: APIImport.h,v 1.3 2000-07-21 21:09:43 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 BOOL fIgnoreOrdinals; 22 BOOL fIgnoreOrdinals; /* Don't update ordinals. */ 23 BOOL fErase; /* Erase functions which wasn't found. */ 23 24 } OPTIONS, *POPTIONS; 24 25 -
trunk/tools/database/StateUpd.cpp
r3848 r3882 1 /* $Id: StateUpd.cpp,v 1.2 5 2000-07-18 17:56:50bird Exp $1 /* $Id: StateUpd.cpp,v 1.26 2000-07-21 21:09:43 bird Exp $ 2 2 * 3 3 * StateUpd - Scans source files for API functions and imports data on them. … … 310 310 { /* failed to find dll - concidered nearly fatal. */ 311 311 fprintf(phSignal, "-,-: failed to find dll (%s)!\n\t%s\n", 312 options.pszDLLName ? options.pszDLLName : "<NULL>"); 312 options.pszDLLName ? options.pszDLLName : "<NULL>", 313 dbGetLastErrorDesc()); 313 314 ulRc++; 314 315 } … … 323 324 if (cNotAliased > cUpdated) 324 325 { 325 fprintf(phSignal, "%d functions where not found (found=%d, total=%d).\n", 326 fprintf(phSignal, "%d functions where not found (found=%d, total=%d).\n", 326 327 cNotAliased- cUpdated, cUpdated, cNotAliased); 327 328 ulRc += 0x00010000; … … 697 698 szId[psz2 - psz] = '\0'; 698 699 iRet = i; 699 700 700 701 /* parse it! */ 701 702 psz = strstr(szId+4, ",v "); -
trunk/tools/database/db.cpp
r3848 r3882 1 /* $Id: db.cpp,v 1.1 5 2000-07-18 17:56:50bird Exp $ *1 /* $Id: db.cpp,v 1.16 2000-07-21 21:09:44 bird Exp $ * 2 2 * 3 3 * DB - contains all database routines. … … 158 158 * @param pszDllName Dll name. 159 159 */ 160 signed short_System dbGetDll(const char *pszDllName)160 signed long _System dbGetDll(const char *pszDllName) 161 161 { 162 162 int rc; … … 173 173 rc = -1; 174 174 mysql_free_result(pres); 175 return (s hort)rc;175 return (signed long)rc; 176 176 } 177 177 … … 180 180 * Count the function in a given dll. 181 181 * @returns Number of functions. -1 on error. 182 * @param usDllDll refcode.182 * @param lDll Dll refcode. 183 183 * @param fNotAliases TRUE: don't count aliased functions. 184 184 */ 185 signed long _System dbCountFunctionInDll(signed long ulDll, BOOL fNotAliases)185 signed long _System dbCountFunctionInDll(signed long lDll, BOOL fNotAliases) 186 186 { 187 187 signed long rc; … … 189 189 MYSQL_RES * pres; 190 190 191 if ( ulDll >= 0)192 { 193 sprintf(&szQuery[0], "SELECT count(refcode) FROM function WHERE dll = %ld\n", ulDll);191 if (lDll >= 0) 192 { 193 sprintf(&szQuery[0], "SELECT count(refcode) FROM function WHERE dll = %ld\n", lDll); 194 194 if (fNotAliases) 195 195 strcat(&szQuery[0], " AND aliasfn < 0"); … … 217 217 * (In the mysql-world everything is case insensitive!) 218 218 */ 219 signed short _System dbCheckInsertDll(const char *pszDll)219 signed long _System dbCheckInsertDll(const char *pszDll, char fchType) 220 220 { 221 221 int rc; … … 233 233 mysql_free_result(pres); 234 234 235 sprintf(&szQuery[0], "INSERT INTO dll(name ) VALUES('%s')\n", pszDll);235 sprintf(&szQuery[0], "INSERT INTO dll(name, type) VALUES('%s', '%c')\n", pszDll, fchType); 236 236 rc = mysql_query(pmysql, &szQuery[0]); 237 if (rc < 0) 238 return -1; 237 239 238 240 /* select row to get refcode */ … … 248 250 mysql_free_result(pres); 249 251 250 return ( short)rc;252 return (long)rc; 251 253 } 252 254 … … 280 282 mysql_free_result(pres); 281 283 282 return ( short)rc;284 return (unsigned short)rc; 283 285 } 284 286 … … 286 288 /** 287 289 * Updates or inserts a function name into the database. 288 * @returns Success indicator. TRUE / FALSE. 289 * @param usDll Dll refcode. 290 * @param pszFunction Function name. 291 * @param pszIntFunction Internal function name. (required!) 292 * @param ulOrdinal Ordinal value. 293 * @param fIgnoreOrdinal Do not update ordinal value. 294 */ 295 BOOL _System dbInsertUpdateFunction(unsigned short usDll, 290 * The update flags is always updated. 291 * @returns Success indicator. TRUE / FALSE. 292 * @param lDll Dll refcode. 293 * @param pszFunction Function name. 294 * @param pszIntFunction Internal function name. (required!) 295 * @param ulOrdinal Ordinal value. 296 * @param fIgnoreOrdinal Do not update ordinal value. 297 * @param fchType Function type flag. One of the FUNCTION_* defines. 298 */ 299 BOOL _System dbInsertUpdateFunction(signed long lDll, 296 300 const char *pszFunction, const char *pszIntFunction, 297 unsigned long ulOrdinal, BOOL fIgnoreOrdinal) 298 { 299 int rc; 300 long lFunction = -1; 301 char szQuery[512]; 301 unsigned long ulOrdinal, BOOL fIgnoreOrdinal, char fchType) 302 { 303 int rc; 304 long lFunction = -1; 305 char szQuery[512]; 306 char * pszQuery = &szQuery[0]; 302 307 MYSQL_RES *pres; 303 308 … … 307 312 308 313 /* try find function */ 309 sprintf( &szQuery[0], "SELECT refcode, intname FROM function WHERE dll = %d AND name = '%s'", usDll, pszFunction);310 rc = mysql_query(pmysql, &szQuery[0]);314 sprintf(pszQuery, "SELECT refcode, intname FROM function WHERE dll = %d AND name = '%s'", lDll, pszFunction); 315 rc = mysql_query(pmysql, pszQuery); 311 316 pres = mysql_store_result(pmysql); 312 317 if (rc >= 0 && pres != NULL && mysql_num_rows(pres) != 0) 313 { /* update function (function is found) */ 318 { /* 319 * Found the function. So now we'll update it. 320 */ 314 321 MYSQL_ROW parow; 315 322 if (mysql_num_rows(pres) > 1) 316 323 { 317 324 fprintf(stderr, "internal database integrity error(%s): More function by the same name for the same dll. " 318 " usDll = %d, pszFunction = %s\n", __FUNCTION__, usDll, pszFunction);325 "lDll = %d, pszFunction = %s\n", __FUNCTION__, lDll, pszFunction); 319 326 return FALSE; 320 327 } 321 328 322 329 parow = mysql_fetch_row(pres); 323 if (parow != NULL) 324 lFunction = getvalue(0, parow); 330 lFunction = getvalue(0, parow); 325 331 mysql_free_result(pres); 326 332 333 strcpy(pszQuery, "UPDATE function SET updated = updated + 1"); 334 pszQuery += strlen(pszQuery); 327 335 if (strcmp(parow[1], pszIntFunction) != 0) 328 { 329 sprintf(&szQuery[0], "UPDATE function SET intname = '%s' WHERE refcode = %ld", 330 pszIntFunction, lFunction); 331 rc = mysql_query(pmysql, &szQuery[0]); 332 } 333 334 if (rc >= 0 && !fIgnoreOrdinal) 335 { 336 sprintf(&szQuery[0], "UPDATE function SET ordinal = %ld WHERE refcode = %ld", 337 ulOrdinal, lFunction); 338 rc = mysql_query(pmysql, &szQuery[0]); 339 } 340 336 pszQuery += sprintf(pszQuery, ", intname = '%s'", pszIntFunction); 337 338 if (!fIgnoreOrdinal) 339 pszQuery += sprintf(pszQuery, ", ordinal = %ld", ulOrdinal); 340 341 sprintf(pszQuery, ", type = '%c' WHERE refcode = %ld", fchType, lFunction); 342 rc = mysql_query(pmysql, &szQuery[0]); 341 343 } 342 344 else 343 { /* insert */ 344 sprintf(&szQuery[0], "INSERT INTO function(dll, name, intname, ordinal) VALUES(%d, '%s', '%s', %ld)", 345 usDll, pszFunction, pszIntFunction, ulOrdinal); 345 { /* 346 * The function was not found. (or maybe an error occured?) 347 * Insert it. 348 */ 349 sprintf(&szQuery[0], "INSERT INTO function(dll, name, intname, ordinal, updated, type) VALUES(%d, '%s', '%s', %ld, 1, '%c')", 350 lDll, pszFunction, pszIntFunction, ulOrdinal, fchType); 346 351 rc = mysql_query(pmysql, &szQuery[0]); 347 352 } … … 355 360 * Inserts or updates (existing) file information. 356 361 * @returns Success indicator (TRUE / FALSE). 357 * @param usDll Dll reference code.362 * @param lDll Dll reference code. 358 363 * @param pszFilename Filename. 359 364 * @param pszDescription Pointer to file description. … … 364 369 * @remark 365 370 */ 366 BOOL _System dbInsertUpdateFile( unsigned short usDll,371 BOOL _System dbInsertUpdateFile(signed long lDll, 367 372 const char *pszFilename, 368 373 const char *pszDescription, … … 377 382 378 383 /* parameter assertions */ 379 assert( usDll != 0);384 assert(lDll != 0); 380 385 assert(pszFilename != NULL); 381 386 assert(*pszFilename != '\0'); 382 387 383 388 /* try find file */ 384 sprintf(&szQuery[0], "SELECT refcode, name FROM file WHERE dll = %d AND name = '%s'", usDll, pszFilename);389 sprintf(&szQuery[0], "SELECT refcode, name FROM file WHERE dll = %d AND name = '%s'", lDll, pszFilename); 385 390 rc = mysql_query(pmysql, &szQuery[0]); 386 391 pres = mysql_store_result(pmysql); … … 391 396 { 392 397 fprintf(stderr, "internal database integrity error(%s): More files by the same name in the same dll. " 393 " usDll = %d, pszFilename = %s\n", __FUNCTION__, usDll, pszFilename);398 "lDll = %d, pszFilename = %s\n", __FUNCTION__, lDll, pszFilename); 394 399 return FALSE; 395 400 } … … 446 451 { /* insert */ 447 452 sprintf(&szQuery[0], "INSERT INTO file(dll, name, description, lastauthor, lastdatetime, revision) VALUES(%d, '%s', %ld, ", 448 usDll, pszFilename, lLastAuthor);453 lDll, pszFilename, lLastAuthor); 449 454 if (pszDescription != NULL && *pszDescription != '\0') 450 455 sqlstrcat(&szQuery[0], NULL, pszDescription); … … 986 991 } 987 992 988 /* Equiv*/993 /* Time */ 989 994 if (pFnDesc->pszTime != NULL) 990 995 { … … 1917 1922 1918 1923 1924 1925 /** 1926 * Clear the update flags for all file in a dll/module. 1927 * @returns Success indicator. (TRUE / FALSE) 1928 * @param lDll Dll refcode. 1929 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 1930 * @remark Intended for use by APIImport. 1931 */ 1932 BOOL _System dbClearUpdateFlagFile(signed long lDll) 1933 { 1934 int rc; 1935 char szQuery[128]; 1936 1937 sprintf(&szQuery[0], 1938 "UPDATE file SET updated = 0 WHERE dll = (%ld)", 1939 lDll); 1940 rc = mysql_query(pmysql, &szQuery[0]); 1941 return rc == 0; 1942 } 1943 1944 1945 /** 1946 * Clear update flag 1947 * @returns Success indicator. 1948 * @param lDll Dll refcode. 1949 * @param fAll All dll. If false only APIs and Internal APIs are cleared 1950 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 1951 * @remark Intended for use by APIImport. 1952 */ 1953 BOOL _System dbClearUpdateFlagFunction(signed long lDll, BOOL fAll) 1954 { 1955 int rc; 1956 char szQuery[128]; 1957 1958 sprintf(&szQuery[0], 1959 "UPDATE function SET updated = 0 WHERE dll = (%ld)", 1960 lDll); 1961 if (!fAll) 1962 strcat(&szQuery[0], " AND type IN ('A', 'I')"); 1963 rc = mysql_query(pmysql, &szQuery[0]); 1964 return rc == 0; 1965 } 1966 1967 1968 1969 /** 1970 * Deletes all the files in a dll/module which was not found/updated. 1971 * @returns Success indicator. 1972 * @param lDll Dll refcode. 1973 * @sketch Select all files which is to be deleted. 1974 * Set all references to each file in function to -1. 1975 * Delete all files which is to be deleted. 1976 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 1977 * @remark Use with GRATE CARE! 1978 */ 1979 BOOL _System dbDeleteNotUpdatedFiles(signed long lDll) 1980 { 1981 MYSQL_RES * pres; 1982 int rc; 1983 BOOL fRc = TRUE; 1984 char szQuery[128]; 1985 1986 sprintf(&szQuery[0], 1987 "SELECT refcode FROM file WHERE dll = (%ld) AND updated = 0", 1988 lDll); 1989 rc = mysql_query(pmysql, &szQuery[0]); 1990 pres = mysql_store_result(pmysql); 1991 if (pres != NULL && mysql_num_rows(pres)) 1992 { 1993 MYSQL_ROW row; 1994 while ((row = mysql_fetch_row(pres)) != NULL) 1995 { 1996 sprintf(&szQuery[0], 1997 "UPDATE function SET file = -1 WHERE file = %s", 1998 row[0]); 1999 rc = mysql_query(pmysql, &szQuery[0]); 2000 if (rc) fRc = FALSE; 2001 } 2002 } 2003 2004 sprintf(&szQuery[0], 2005 "DELETE FROM file WHERE dll = %ld AND updated = 0", 2006 lDll); 2007 rc = mysql_query(pmysql, &szQuery[0]); 2008 if (rc) fRc = FALSE; 2009 2010 return fRc; 2011 } 2012 2013 2014 /** 2015 * Deletes all the functions which haven't been updated. 2016 * All rows in other tables which references the functions are 2017 * also delete. 2018 * 2019 * @returns Success indicator. (TRUE / FALSE) 2020 * @param lDll The refcode of the dll owning the functions. 2021 * @param fAll All function. If FALSE then only APIs and Internal APIs. 2022 * @sketch Select all functions which has updated = 0 and dll = lDll. 2023 * Delete the referenced to the functions in: 2024 * parameters 2025 * fnauthor 2026 * Delete all function which has updated = 0 and dll = lDll 2027 * 2028 * @remark Use with GREATE CARE! 2029 */ 2030 BOOL _System dbDeleteNotUpdatedFunctions(signed long lDll, BOOL fAll) 2031 { 2032 MYSQL_RES * pres; 2033 int rc; 2034 BOOL fRc = TRUE; 2035 char szQuery[128]; 2036 2037 sprintf(&szQuery[0], 2038 "SELECT refcode FROM function WHERE dll = %ld AND updated = 0", 2039 lDll); 2040 if (!fAll) 2041 strcat(&szQuery[0], " AND type IN ('A', 'I')"); 2042 rc = mysql_query(pmysql, &szQuery[0]); 2043 pres = mysql_store_result(pmysql); 2044 if (pres != NULL && mysql_num_rows(pres)) 2045 { 2046 MYSQL_ROW row; 2047 while ((row = mysql_fetch_row(pres)) != NULL) 2048 { 2049 /* delete parameters */ 2050 sprintf(&szQuery[0], "DELETE FROM parameter WHERE function %s", row[0]); 2051 rc = mysql_query(pmysql, &szQuery[0]); 2052 if (rc) fRc = FALSE; 2053 2054 /* author relations */ 2055 sprintf(&szQuery[0], "DELETE FROM fnauthor WHERE function %s", row[0]); 2056 rc = mysql_query(pmysql, &szQuery[0]); 2057 if (rc) fRc = FALSE; 2058 } 2059 } 2060 2061 sprintf(&szQuery[0], 2062 "DELETE FROM function WHERE dll = %ld AND updated = 0", 2063 lDll); 2064 if (!fAll) 2065 strcat(&szQuery[0], " AND type IN ('A', 'I')"); 2066 rc = mysql_query(pmysql, &szQuery[0]); 2067 if (rc) fRc = FALSE; 2068 2069 return fRc; 2070 } 2071 2072 2073 1919 2074 /** 1920 2075 * Appends a set of strings to a query. The main string (pszStr) is enclosed in "'"s. … … 1929 2084 static char *sqlstrcat(char *pszQuery, const char *pszBefore, const char *pszStr, const char *pszAfter) 1930 2085 { 1931 char * pszLineStart = pszQuery; 2086 char * pszLineStart = pszQuery; 1932 2087 register char ch; 1933 2088 … … 1982 2137 *pszQuery++ = 'n'; 1983 2138 break; 1984 2139 1985 2140 case '\t': 1986 2141 *pszQuery++ = '\\'; -
trunk/tools/database/db.h
r3841 r3882 1 /* $Id: db.h,v 1.1 0 2000-07-18 07:35:00bird Exp $ */1 /* $Id: db.h,v 1.11 2000-07-21 21:09:45 bird Exp $ */ 2 2 /* 3 3 * DB - contains all database routines … … 19 19 * Defined Constants * 20 20 *******************************************************************************/ 21 #define NBR_PARAMETERS 30 22 #define NBR_FUNCTIONS 20 23 #define NBR_AUTHORS 20 24 #define ALIAS_NULL -1 25 #define ALIAS_DONTMIND -2 21 #define NBR_PARAMETERS 30 22 #define NBR_FUNCTIONS 20 23 #define NBR_AUTHORS 20 24 25 #define ALIAS_NULL -1 26 #define ALIAS_DONTMIND -2 27 28 /* type flags of function */ 29 #define FUNCTION_ODIN32_API 'A' /* for Odin32 APIs (ie. LoadLibrary) */ 30 #define FUNCTION_INTERNAL_ODIN32_API 'I' /* for Internal/Additional Odin32 APIs (ie. RegisterLxExe) */ 31 #define FUNCTION_OTHER 'O' /* for all other functions (ie. OSLibInitWSeBFileIO) */ 32 33 /* type flags of dll */ 34 #define DLL_ODIN32_API 'A' /* for Odin32 API dll (ie. kernel32) */ 35 #define DLL_INTERNAL 'I' /* for Internal Odin32 (API) dll (ie. odincrt) */ 36 #define DLL_SUPPORT 'S' /* for support stuff (ie. pe.exe and win32k.sys). */ 37 #define DLL_TOOLS 'T' /* for tools (executables and dlls) */ 26 38 27 39 … … 81 93 * Exported Functions * 82 94 *******************************************************************************/ 83 char * _System dbGetLastErrorDesc(void);95 char * _System dbGetLastErrorDesc(void); 84 96 85 BOOL _System dbConnect(const char *pszHost, 86 const char *pszUser, 87 const char *pszPassword, 88 const char *pszDatabase); 89 BOOL _System dbDisconnect(); 90 signed short _System dbGetDll(const char *pszDllName); 91 signed long _System dbCountFunctionInDll(signed long ulDll, 92 BOOL fNotAliases); 93 signed short _System dbCheckInsertDll(const char *pszDll); 94 unsigned short _System dbGet(const char *pszTable, 95 const char *pszGetColumn, 96 const char *pszMatch1, 97 const char *pszMatchValue1); 98 BOOL _System dbInsertUpdateFunction(unsigned short usDll, 99 const char *pszFunction, 100 const char *pszIntFunction, 101 unsigned long ulOrdinal, 102 BOOL fIgnoreOrdinal); 103 BOOL _System dbInsertUpdateFile(unsigned short usDll, 104 const char *pszFilename, 105 const char *pszDescription, 106 const char *pszLastDateTime, 107 signed long lLastAuthor, 108 const char *pszRevision); 109 BOOL _System dbFindFunction(const char *pszFunctionName, 110 PFNFINDBUF pFnFindBuf, 111 signed long lDll); 112 signed long _System dbFindFile(signed long lDll, const char *pszFilename); 113 signed long _System dbFindAuthor(const char *pszAuthor, const char *pszEmail); 114 signed long _System dbGetFunctionState(signed long lRefCode); 115 unsigned long _System dbUpdateFunction(PFNDESC pFnDesc, 116 signed long lDll, 117 char *pszError); 118 BOOL _System dbRemoveDesignNotes(signed long lFile); 119 BOOL _System dbAddDesignNote(signed long lDll, 120 signed long lFile, 121 const char *pszTitle, 122 const char *pszText, 123 signed long lSeqNbr, 124 signed long lSeqNbrFile); 125 unsigned long _System dbCreateHistory(char *pszError); 126 unsigned long _System dbCheckIntegrity(char *pszError); 97 BOOL _System dbConnect(const char *pszHost, 98 const char *pszUser, 99 const char *pszPassword, 100 const char *pszDatabase); 101 BOOL _System dbDisconnect(); 102 signed long _System dbGetDll(const char *pszDllName); 103 signed long _System dbCountFunctionInDll(signed long ulDll, 104 BOOL fNotAliases); 105 signed long _System dbCheckInsertDll(const char *pszDll, char fchType); 106 unsigned short _System dbGet(const char *pszTable, 107 const char *pszGetColumn, 108 const char *pszMatch1, 109 const char *pszMatchValue1); 110 BOOL _System dbInsertUpdateFunction(signed long lDll, 111 const char *pszFunction, 112 const char *pszIntFunction, 113 unsigned long ulOrdinal, 114 BOOL fIgnoreOrdinal, 115 char fchType); 116 BOOL _System dbInsertUpdateFile(signed long lDll, 117 const char *pszFilename, 118 const char *pszDescription, 119 const char *pszLastDateTime, 120 signed long lLastAuthor, 121 const char *pszRevision); 122 BOOL _System dbFindFunction(const char *pszFunctionName, 123 PFNFINDBUF pFnFindBuf, 124 signed long lDll); 125 signed long _System dbFindFile(signed long lDll, const char *pszFilename); 126 signed long _System dbFindAuthor(const char *pszAuthor, const char *pszEmail); 127 signed long _System dbGetFunctionState(signed long lRefCode); 128 unsigned long _System dbUpdateFunction(PFNDESC pFnDesc, 129 signed long lDll, 130 char *pszError); 131 BOOL _System dbRemoveDesignNotes(signed long lFile); 132 BOOL _System dbAddDesignNote(signed long lDll, 133 signed long lFile, 134 const char *pszTitle, 135 const char *pszText, 136 signed long lSeqNbr, 137 signed long lSeqNbrFile); 138 unsigned long _System dbCreateHistory(char *pszError); 139 unsigned long _System dbCheckIntegrity(char *pszError); 127 140 128 141 /* kHtml stuff */ 129 void * _System dbExecuteQuery(const char *pszQuery);130 signed long _System dbQueryResultRows(void *pres);131 BOOL _System dbFreeResult(void *pres);132 BOOL _System dbFetch(void *pres,133 DBCALLBACKFETCH dbFetchCallBack,134 void *pvUser);135 signed long _System dbDateToDaysAfterChrist(const char *pszDate);136 BOOL _System dbDaysAfterChristToDate(signed long ulDays,142 void * _System dbExecuteQuery(const char *pszQuery); 143 signed long _System dbQueryResultRows(void *pres); 144 BOOL _System dbFreeResult(void *pres); 145 BOOL _System dbFetch(void *pres, 146 DBCALLBACKFETCH dbFetchCallBack, 147 void *pvUser); 148 signed long _System dbDateToDaysAfterChrist(const char *pszDate); 149 BOOL _System dbDaysAfterChristToDate(signed long ulDays, 137 150 char *pszDate); 138 151 /* StateUpd stuff */ 139 BOOL _System dbGetNotUpdatedFunction(signed long lDll, 140 DBCALLBACKFETCH dbFetchCallBack); 141 signed long _System dbGetNumberOfUpdatedFunction(signed long lDll); 152 BOOL _System dbGetNotUpdatedFunction(signed long lDll, 153 DBCALLBACKFETCH dbFetchCallBack); 154 signed long _System dbGetNumberOfUpdatedFunction(signed long lDll); 155 156 /* APIImport stuff */ 157 BOOL _System dbClearUpdateFlagFile(signed long lDll); 158 BOOL _System dbClearUpdateFlagFunction(signed long lDll, BOOL fAll); 159 BOOL _System dbDeleteNotUpdatedFiles(signed long lDll); 160 BOOL _System dbDeleteNotUpdatedFunctions(signed long lDll, BOOL fAll); 142 161 143 162 #ifdef __cplusplus
Note:
See TracChangeset
for help on using the changeset viewer.