Changeset 3919 for trunk/tools/database/StateUpd.cpp
- Timestamp:
- Aug 2, 2000, 5:02:49 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/database/StateUpd.cpp
r3917 r3919 1 /* $Id: StateUpd.cpp,v 1.2 8 2000-08-02 02:18:03bird Exp $1 /* $Id: StateUpd.cpp,v 1.29 2000-08-02 03:02:49 bird Exp $ 2 2 * 3 3 * StateUpd - Scans source files for API functions and imports data on them. … … 1750 1750 * Copy loop. 1751 1751 */ 1752 int cBlanks = 0; 1752 1753 do 1753 1754 { 1754 1755 int i; 1756 1757 /* 1758 * new paragraph?. 1759 */ 1760 if (cBlanks == 1) 1761 { 1762 strcpy(pszTarget, "<p>\n"); 1763 pszTarget += 4; 1764 } 1765 1766 /* 1767 * indent...? 1768 */ 1755 1769 for (i = psz - papszLines[iStart]; i < iStartColumn; i++) 1756 1770 *pszTarget++ = ' '; /* FIXME HTML and indenting... */ … … 1758 1772 strcpy(pszTarget, psz); 1759 1773 trimR(pszTarget); 1774 if (*pszTarget == '\0') 1775 cBlanks++; 1776 else 1777 cBlanks = 0; 1760 1778 pszTarget += strlen(pszTarget); 1761 if (fHTML) 1762 strcpy(pszTarget, "<BR>\n"); 1763 else 1764 strcpy(pszTarget, "\n"); 1765 pszTarget += strlen(pszTarget); 1779 *pszTarget++ = '\n'; 1780 *pszTarget = '\0'; 1766 1781 1767 1782 /* Next */ … … 1784 1799 { 1785 1800 pszTarget--; 1786 while (pszTarget >= pszRet && (*pszTarget == '\n' || *pszTarget == ' ')) 1801 while ((pszTarget >= pszRet && (*pszTarget == '\n' || *pszTarget == ' ')) 1802 || (pszTarget - 3 >= pszRet && strnicmp(pszTarget - 3, "<p>", 3) == 0) 1803 || (pszTarget - 4 >= pszRet && strnicmp(pszTarget - 4, "<br>",4) == 0) 1804 ) 1787 1805 { 1788 if (*pszTarget == '\n')1789 pszTarget -= 4;1806 if (*pszTarget != '\n' && *pszTarget != ' ') 1807 pszTarget -= pszTarget[3] == '<' ? 3 : 4; 1790 1808 *pszTarget-- = '\0'; 1791 1809 } … … 1853 1871 * copy loop 1854 1872 */ 1873 int cBlanks = 0; 1855 1874 do 1856 1875 { … … 1867 1886 1868 1887 /* 1888 * new paragraph?. 1889 */ 1890 if (cBlanks == 1) 1891 { 1892 strcpy(pszTarget, "<p>\n"); 1893 pszTarget += 4; 1894 } 1895 1896 /* 1869 1897 * Indent up to iStartColumn 1870 1898 */ … … 1877 1905 strcpy(pszTarget, psz); 1878 1906 trimR(pszTarget); 1907 if (*pszTarget == '\0') 1908 cBlanks++; 1909 else 1910 cBlanks = 0; 1879 1911 pszTarget += strlen(pszTarget); 1880 if (fHTML) 1881 strcpy(pszTarget, "<BR>\n"); 1882 else 1883 strcpy(pszTarget, "\n"); 1884 pszTarget += strlen(pszTarget); 1912 *pszTarget++ = '\n'; 1913 *pszTarget = '\0'; 1885 1914 1886 1915 /* … … 1909 1938 { 1910 1939 pszTarget--; 1911 while (pszTarget >= pszRet && (*pszTarget == '\n' || *pszTarget == ' ')) 1912 { 1913 if (*pszTarget == '\n') 1914 pszTarget -= 4; 1940 while ((pszTarget >= pszRet && (*pszTarget == '\n' || *pszTarget == ' ')) 1941 || (pszTarget - 3 >= pszRet && strnicmp(pszTarget - 3, "<p>", 3) == 0) 1942 || (pszTarget - 4 >= pszRet && strnicmp(pszTarget - 4, "<br>",4) == 0) 1943 ) 1944 { 1945 if (*pszTarget != '\n' && *pszTarget != ' ') 1946 pszTarget -= pszTarget[3] == '<' ? 3 : 4; 1915 1947 *pszTarget-- = '\0'; 1916 1948 }
Note:
See TracChangeset
for help on using the changeset viewer.