Changeset 2773 for trunk/tools/database/StateUpd.cpp
- Timestamp:
- Feb 14, 2000, 2:49:14 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/database/StateUpd.cpp
r2770 r2773 1 /* $Id: StateUpd.cpp,v 1.1 1 2000-02-12 23:54:29bird Exp $1 /* $Id: StateUpd.cpp,v 1.12 2000-02-14 13:49:13 bird Exp $ 2 2 * 3 3 * StateUpd - Scans source files for API functions and imports data on them. … … 608 608 { 609 609 unsigned long ulRcTmp; 610 char szErrorDesc[2113]; /* due to some limitation in the latest EMX release size is 2112 and not 4096 as initially implemented. */ 610 //char szErrorDesc[2113]; /* due to some limitation in the latest EMX release size is 2112 and not 4096 as initially implemented. */ 611 char *pszErrorDesc = (char*)malloc(20480); 611 612 612 613 /* 2.*/ … … 632 633 633 634 /* 4.*/ 634 ulRcTmp = dbUpdateFunction(&FnDesc, pOptions->lDllRefcode, &szErrorDesc[0]);635 ulRcTmp = dbUpdateFunction(&FnDesc, pOptions->lDllRefcode, pszErrorDesc); 635 636 if (ulRcTmp != 0) 636 637 { 637 fprintf(phSignal, "%s,%s: %s\n", pszFilename, FnDesc.pszName, &szErrorDesc[0]);638 fprintf(phSignal, "%s,%s: %s\n", pszFilename, FnDesc.pszName, pszErrorDesc); 638 639 ulRc += ulRcTmp << 16; 639 640 } 641 free(pszErrorDesc); 640 642 } 641 643 … … 914 916 *pszEnd = '\0'; 915 917 copy(pszEnd, pszReturn, iReturn, pszFn-1, iFn, papszLines); 916 if (strlen(pszEnd) > 1 024)918 if (strlen(pszEnd) > 128) 917 919 { 918 920 fprintf(phSignal,"Fatal error! return statement is too larget. len=%d", strlen(pszEnd)); … … 950 952 { 951 953 if ((psz = strchr(apszArgs[j], ')')) == NULL) 952 { 953 pFnDesc->apszParamName[j] = findStartOfWord(apszArgs[j] + strlen(apszArgs[j]) - 1, 954 { /* Common argument */ 955 if (apszArgs[j][strlen(apszArgs[j]-1)] != '*') 956 { /* Normal case, Type [moretype] Name.*/ 957 pFnDesc->apszParamName[j] = findStartOfWord(apszArgs[j] + strlen(apszArgs[j]) - 1, 954 958 apszArgs[j]); 955 pFnDesc->apszParamName[j][-1] = '\0'; 959 pFnDesc->apszParamName[j][-1] = '\0'; 960 } 961 else 962 { /* No argument name only type - make a dummy one: 'arg[1..n]' */ 963 sprintf(pszEnd, "arg%i", j); 964 pFnDesc->apszParamName[j] = pszEnd; 965 pszEnd = strlen(pszEnd) + pszEnd + 1; 966 *pszEnd = '\0'; 967 } 956 968 pFnDesc->apszParamType[j] = trim(apszArgs[j]); 957 969 } 958 970 else 959 { 971 { /* Function pointer argument... */ 960 972 char *pszP2 = psz; 961 973 psz = findStartOfWord(psz-1, apszArgs[j]); … … 1643 1655 1644 1656 1657 /** 1658 * Trims a string, ie. removing spaces (and tabs) from both ends of the string. 1659 * @returns Pointer to first not space or tab char in the string. 1660 * @param psz Pointer to the string which is to be trimmed. 1661 * @status completely implmented. 1662 * @author knut st. osmundsen (knut.stange.osmundsen@pmsc.no) 1663 */ 1645 1664 static char *trim(char *psz) 1646 1665 { … … 1661 1680 * ensuring space after '*', ensuring no space before ',' and ')'. 1662 1681 */ 1663 1664 1682 static void copy(char *psz, char *pszFrom, int iFrom, char *pszTo, int iTo, char **papszLines) 1665 1683 { … … 1718 1736 1719 1737 #else 1738 /** 1739 * Copies a set of lines to a buffer (psz) removing precompiler lines and all comments. 1740 * @param psz 1741 * @param jFrom Starting position, index into line iFrom. 1742 * @param iFrom Starting position, index into papszLines. 1743 * @param jTo Ending position, index into line iFrom. 1744 * @param iTo Ending position, index into papszLines. 1745 * @param papszLines Array of lines. 1746 * @status completely implemented. 1747 * @author knut st. osmundsen (knut.stange.osmundsen@pmsc.no) 1748 */ 1720 1749 static void copy(char *psz, int jFrom, int iFrom, int jTo, int iTo, char **papszLines) 1721 1750 { … … 1781 1810 * @param ch Char to capitalize. 1782 1811 */ 1812 #if 0 1783 1813 inline char upcase(char ch) 1784 1814 { 1785 1815 return ch >= 'a' && ch <= 'z' ? (char)(ch - ('a' - 'A')) : ch; 1786 1816 } 1817 #else 1818 #define upcase(ch) ((ch) >= 'a' && (ch) <= 'z' ? (char)((ch) - ('a' - 'A')) : (ch)) 1819 #endif 1787 1820 1788 1821
Note:
See TracChangeset
for help on using the changeset viewer.