Changeset 3917 for trunk/tools/database/StateUpd.cpp
- Timestamp:
- Aug 2, 2000, 4:18:05 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/database/StateUpd.cpp
r3899 r3917 1 /* $Id: StateUpd.cpp,v 1.2 7 2000-07-29 14:12:46bird Exp $1 /* $Id: StateUpd.cpp,v 1.28 2000-08-02 02:18:03 bird Exp $ 2 2 * 3 3 * StateUpd - Scans source files for API functions and imports data on them. … … 825 825 static unsigned long processDesignNote(char **papszLines, int i, int &iRet, const char *pszFilename, POPTIONS pOptions) 826 826 { 827 unsigned long ulRc ;827 unsigned long ulRc = 0; 828 828 char szBuffer[0x10000]; 829 829 char * psz; 830 830 831 831 /* 832 * Find and parse the @design notetag/keyword.833 * syntax: @design note[seqnbr] <title>832 * Find and parse the @design tag/keyword. 833 * syntax: @design [seqnbr] <title> 834 834 * <text> 835 835 * 836 836 */ 837 psz = stristr(papszLines[i], "@design note");838 if (psz != NULL )837 psz = stristr(papszLines[i], "@design"); 838 if (psz != NULL && (psz[7] == '\0' || psz[7] == ' ')) 839 839 { 840 840 signed long lSeqNbr; … … 854 854 855 855 /* Update database */ 856 if (!dbAddDesignNote(pOptions->lDllRefcode, pOptions->lFileRefcode, psz, &szBuffer[0], lSeqNbr, pOptions->lSeqFile++ ))856 if (!dbAddDesignNote(pOptions->lDllRefcode, pOptions->lFileRefcode, psz, &szBuffer[0], lSeqNbr, pOptions->lSeqFile++, i + 1)) 857 857 { 858 858 ulRc = 0x00010000; … … 867 867 else 868 868 { 869 fprintf(phSignal, "%s(%d): internal error @design note\n", pszFilename, i);869 fprintf(phSignal, "%s(%d): internal error @design\n", pszFilename, i); 870 870 ulRc = 0x00010000; 871 871 } … … 897 897 FnDesc.lStatus = 99; 898 898 FnDesc.lFile = pOptions->lFileRefcode; 899 FnDesc.lLine = i + 1; 899 900 900 901 /* precondition: isFunction is true. … … 1521 1522 1522 1523 /* status */ 1523 pFnDesc->psz ReturnDesc= SDSCopyTextUntilNextTag(pszB, FALSE, iStatus, iEnd, papszLines);1524 pFnDesc->pszStatus = SDSCopyTextUntilNextTag(pszB, FALSE, iStatus, iEnd, papszLines); 1524 1525 pszB += strlen(pszB) + 1; 1525 1526 … … 1546 1547 /* time */ 1547 1548 i = findStrLine("@time", iStart, iEnd, papszLines); 1548 pFnDesc->psz ReturnDesc= SDSCopyTextUntilNextTag(pszB, TRUE, i, iEnd, papszLines);1549 pFnDesc->pszTime = SDSCopyTextUntilNextTag(pszB, TRUE, i, iEnd, papszLines); 1549 1550 pszB += strlen(pszB) + 1; 1550 1551 1551 1552 /* equiv */ 1552 1553 i = findStrLine("@equiv", iStart, iEnd, papszLines); 1553 pFnDesc->psz ReturnDesc= SDSCopyTextUntilNextTag(pszB, TRUE, i, iEnd, papszLines);1554 pFnDesc->pszEquiv = SDSCopyTextUntilNextTag(pszB, TRUE, i, iEnd, papszLines); 1554 1555 pszB += strlen(pszB) + 1; 1555 1556 … … 1561 1562 * parameters, new @param for each parameter! 1562 1563 */ 1564 i = iStart - 1; 1563 1565 do 1564 1566 { … … 1566 1568 1567 1569 /* find first */ 1568 i = findStrLine("@param", i Start, iEnd, papszLines);1570 i = findStrLine("@param", i + 1, iEnd, papszLines); 1569 1571 if (i >= iEnd) 1570 1572 break; … … 1597 1599 } 1598 1600 } 1599 } while (i >iEnd);1601 } while (i < iEnd); 1600 1602 } 1601 1603 … … 1605 1607 if (pFnDesc->pszStatus != NULL && *pFnDesc->pszStatus != '\0') 1606 1608 { 1607 if (str str(pFnDesc->pszStatus, "STUB") != NULL || *pFnDesc->pszStatus == '1')1609 if (stristr(pFnDesc->pszStatus, "STUB") != NULL || *pFnDesc->pszStatus == '1') 1608 1610 pFnDesc->lStatus = 1; /* STUB */ 1609 1611 else if (stristr(pFnDesc->pszStatus, "Partially") != NULL || *pFnDesc->pszStatus == '2' || *pFnDesc->pszStatus == '3') … … 2100 2102 return FALSE; 2101 2103 2102 // look for /**@design note "2104 // look for /**@design 2103 2105 while (*psz == ' ') 2104 2106 psz++; … … 2108 2110 while (*psz == '*' || *psz == ' ') 2109 2111 psz++; 2110 return strnicmp(psz, "@design note ", 12) == 0;2112 return strnicmp(psz, "@design", 7) == 0 && (psz[7] == '\0' || psz[7] == ' '); 2111 2113 } 2112 2114 pOptions = pOptions;
Note:
See TracChangeset
for help on using the changeset viewer.