Ignore:
Timestamp:
Sep 13, 1999, 9:46:07 PM (26 years ago)
Author:
phaller
Message:

Add: more CRT functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/NTDLL/crt.cpp

    r638 r927  
    1 /* $Id: crt.cpp,v 1.8 1999-08-22 22:45:52 sandervl Exp $ */
     1/* $Id: crt.cpp,v 1.9 1999-09-13 19:45:33 phaller Exp $ */
    22
    33/*
     
    13001300  return (_itoa(i,s,r));
    13011301}
     1302
     1303
     1304/*****************************************************************************
     1305 * Name      :
     1306 * Purpose   :
     1307 * Parameters:
     1308 * Variables :
     1309 * Result    :
     1310 * Remark    : NTDLL.749
     1311 * Status    :
     1312 *
     1313 * Author    : Jens Wiessner
     1314 *****************************************************************************/
     1315
     1316LONG CDECL NTDLL__CIpow(void)
     1317{
     1318  dprintf(("NTDLL: _CIpow not implemented.\n"));
     1319
     1320  return 0;
     1321}
     1322
     1323
     1324/*****************************************************************************
     1325 * Name      :
     1326 * Purpose   :
     1327 * Parameters:
     1328 * Variables :
     1329 * Result    :
     1330 * Remark    : NTDLL.864
     1331 * Status    :
     1332 *
     1333 * Author    : Jens Wiessner
     1334 *****************************************************************************/
     1335
     1336LONG CDECL NTDLL__ftol(void)
     1337{
     1338  dprintf(("NTDLL: _ftol not implemented.\n"));
     1339
     1340  return 0;
     1341}
     1342
     1343
     1344/*****************************************************************************
     1345 * Name      :
     1346 * Purpose   :
     1347 * Parameters:
     1348 * Variables :
     1349 * Result    :
     1350 * Remark    : NTDLL.866
     1351 * Status    :
     1352 *
     1353 * Author    : Jens Wiessner
     1354 *****************************************************************************/
     1355
     1356LPSTR  CDECL NTDLL__ltoa(long x,LPSTR buf,INT radix)
     1357{
     1358  dprintf(("NTDLL: _ltoa(%08xh, %08xh, %08xh) not implemented\n",
     1359           x,
     1360           buf,
     1361           radix));
     1362
     1363  return 0;
     1364}
     1365
     1366
     1367/*****************************************************************************
     1368 * Name      :
     1369 * Purpose   :
     1370 * Parameters:
     1371 * Variables :
     1372 * Result    :
     1373 * Remark    : NTDLL.868
     1374 * Status    :
     1375 *
     1376 * Author    : Jens Wiessner
     1377 *****************************************************************************/
     1378
     1379INT CDECL NTDLL__memicmp(
     1380        LPCSTR s1,      /* [in] first string */
     1381        LPCSTR s2,      /* [in] second string */
     1382        DWORD len       /* [in] length to compare */ )
     1383{
     1384        dprintf(("NTDLL: memicmp(%08xh, %08xh, %08xh)\n",s1,s2,len));
     1385        int     i;
     1386
     1387        for (i=0;i<len;i++) {
     1388                if (tolower(s1[i])<tolower(s2[i]))
     1389                        return -1;
     1390                if (tolower(s1[i])>tolower(s2[i]))
     1391                        return  1;
     1392        }
     1393        return 0;
     1394}
     1395
     1396
     1397/*****************************************************************************
     1398 * Name      :
     1399 * Purpose   :
     1400 * Parameters:
     1401 * Variables :
     1402 * Result    :
     1403 * Remark    : NTDLL.869
     1404 * Status    :
     1405 *
     1406 * Author    : Jens Wiessner
     1407 *****************************************************************************/
     1408
     1409int  CDECL NTDLL__snprintf( char *buf, size_t bufsize, const char *fmt, ... )
     1410{
     1411  dprintf(("NTDLL: _snprintf(%08xh, %08xh, %08xh) not implemented\n",
     1412           buf,
     1413           bufsize,
     1414           fmt));
     1415
     1416  return 0;
     1417}
     1418
     1419
     1420/*****************************************************************************
     1421 * Name      :
     1422 * Purpose   :
     1423 * Parameters:
     1424 * Variables :
     1425 * Result    :
     1426 * Remark    : NTDLL.870
     1427 * Status    :
     1428 *
     1429 * Author    : Jens Wiessner
     1430 *****************************************************************************/
     1431
     1432int  CDECL NTDLL__snwprintf( wchar_t *buf, size_t bufsize, const wchar_t *fmt, ... )
     1433{
     1434  dprintf(("NTDLL: _snwprintf(%08xh, %08xh, %08xh) not implemented\n",
     1435           buf,
     1436           bufsize,
     1437           fmt));
     1438
     1439  return 0;
     1440}
     1441
     1442
     1443/*****************************************************************************
     1444 * Name      :
     1445 * Purpose   :
     1446 * Parameters:
     1447 * Variables :
     1448 * Result    :
     1449 * Remark    : NTDLL.871
     1450 * Status    :
     1451 *
     1452 * Author    : Jens Wiessner
     1453 *****************************************************************************/
     1454
     1455void CDECL NTDLL__splitpath( const char *path, char *drive,
     1456                             char *dir, char *fname, char *ext )
     1457{
     1458  dprintf(("NTDLL: _splitpath(%08xh, %08xh, %08xh, %08xh, %08xh) not implemented\n",
     1459           path,
     1460           drive,
     1461           dir,
     1462           fname,
     1463           ext));
     1464
     1465}
     1466
     1467
     1468/*****************************************************************************
     1469 * Name      :
     1470 * Purpose   :
     1471 * Parameters:
     1472 * Variables :
     1473 * Result    :
     1474 * Remark    : NTDLL.872
     1475 * Status    :
     1476 *
     1477 * Author    : Jens Wiessner
     1478 *****************************************************************************/
     1479
     1480void CDECL NTDLL__strcmpi( LPCSTR s1, LPCSTR s2 )
     1481{
     1482  dprintf(("NTDLL: _strcmpi(%08xh, %08xh)\n",
     1483           s1,
     1484           s2));
     1485
     1486  lstrcmpiA( s1, s2 );
     1487}
     1488
     1489
     1490/*****************************************************************************
     1491 * Name      :
     1492 * Purpose   :
     1493 * Parameters:
     1494 * Variables :
     1495 * Result    :
     1496 * Remark    : NTDLL.874
     1497 * Status    :
     1498 *
     1499 * Author    : Jens Wiessner
     1500 *****************************************************************************/
     1501
     1502CHAR * CDECL NTDLL__strlwr(char *x)
     1503{
     1504  char *y =x;
     1505 
     1506  dprintf(("NTDLL: _strlwr got %s\n", x));
     1507  while (*y) {
     1508    if ((*y > 0x40) && (*y< 0x5b))
     1509      *y = *y + 0x20;
     1510    y++;
     1511  }
     1512  dprintf(("   returned %s\n", x));
     1513                 
     1514  return x;
     1515}
     1516
     1517
     1518/*****************************************************************************
     1519 * Name      :
     1520 * Purpose   :
     1521 * Parameters:
     1522 * Variables :
     1523 * Result    :
     1524 * Remark    : NTDLL.875
     1525 * Status    :
     1526 *
     1527 * Author    : Jens Wiessner
     1528 *****************************************************************************/
     1529
     1530int  CDECL NTDLL__strnicmp( LPCSTR s1, LPCSTR s2, INT n )
     1531{
     1532  dprintf(("NTDLL: _strnicmp(%08xh, %08xh, %08xh) not implemented\n",
     1533           s1,
     1534           s2,
     1535           n));
     1536
     1537  return 0;
     1538}
     1539
     1540
     1541/*****************************************************************************
     1542 * Name      :
     1543 * Purpose   :
     1544 * Parameters:
     1545 * Variables :
     1546 * Result    :
     1547 * Remark    : NTDLL.876
     1548 * Status    :
     1549 *
     1550 * Author    : Jens Wiessner
     1551 *****************************************************************************/
     1552
     1553LPSTR CDECL NTDLL__strupr(LPSTR x)
     1554{
     1555  dprintf(("NTDLL: _strupr(%08xh)\n",
     1556           x));
     1557
     1558  LPSTR y=x;
     1559
     1560  while (*y) {
     1561        *y=toupper(*y);
     1562        y++;
     1563  }
     1564  return x;
     1565}
     1566
     1567
     1568/*****************************************************************************
     1569 * Name      :
     1570 * Purpose   :
     1571 * Parameters:
     1572 * Variables :
     1573 * Result    :
     1574 * Remark    : NTDLL.877
     1575 * Status    :
     1576 *
     1577 * Author    : Jens Wiessner
     1578 *****************************************************************************/
     1579
     1580LPSTR  CDECL NTDLL__ultoa(long x,LPSTR buf,INT radix)
     1581{
     1582  dprintf(("NTDLL: _ultoa(%08xh, %08xh, %08xh) not implemented\n",
     1583           x,
     1584           buf,
     1585           radix));
     1586
     1587  return 0;
     1588}
     1589
     1590
     1591/*****************************************************************************
     1592 * Name      :
     1593 * Purpose   :
     1594 * Parameters:
     1595 * Variables :
     1596 * Result    :
     1597 * Remark    : NTDLL.878
     1598 * Status    :
     1599 *
     1600 * Author    : Jens Wiessner
     1601 *****************************************************************************/
     1602
     1603int CDECL NTDLL__vsnprintf( char *s, size_t bufsize, const char *format, va_list arg )
     1604{
     1605  dprintf(("NTDLL: _ultoa(%08xh, %08xh, %08xh) not implemented\n",
     1606           s,
     1607           bufsize,
     1608           format));
     1609
     1610  return 0;
     1611}
     1612
     1613
     1614/*****************************************************************************
     1615 * Name      :
     1616 * Purpose   :
     1617 * Parameters:
     1618 * Variables :
     1619 * Result    :
     1620 * Remark    : NTDLL.897
     1621 * Status    :
     1622 *
     1623 * Author    : Jens Wiessner
     1624 *****************************************************************************/
     1625
     1626int CDECL NTDLL_iswalpha(wint_t i)
     1627{
     1628  dprintf(("NTDLL: iswalpha(%08xh)\n", i));
     1629
     1630  return (iswalpha(i));
     1631}
     1632
     1633
     1634/*****************************************************************************
     1635 * Name      :
     1636 * Purpose   :
     1637 * Parameters:
     1638 * Variables :
     1639 * Result    :
     1640 * Remark    : NTDLL.898
     1641 * Status    :
     1642 *
     1643 * Author    : Jens Wiessner
     1644 *****************************************************************************/
     1645
     1646int CDECL NTDLL_iswctype(wint_t i, wctype_t wct)
     1647{
     1648  dprintf(("NTDLL: iswctype(%08xh, %08xh)\n", i, wct));
     1649
     1650  return (iswctype(i, wct));
     1651}
     1652
     1653
     1654/*****************************************************************************
     1655 * Name      :
     1656 * Purpose   :
     1657 * Parameters:
     1658 * Variables :
     1659 * Result    :
     1660 * Remark    : NTDLL.899
     1661 * Status    :
     1662 *
     1663 * Author    : Jens Wiessner
     1664 *****************************************************************************/
     1665
     1666int CDECL NTDLL_isxdigit(int i)
     1667{
     1668  dprintf(("NTDLL: isxdigit(%08xh)\n", i));
     1669
     1670  return (isxdigit(i));
     1671}
     1672
     1673
     1674/*****************************************************************************
     1675 * Name      :
     1676 * Purpose   :
     1677 * Parameters:
     1678 * Variables :
     1679 * Result    :
     1680 * Remark    : NTDLL.900
     1681 * Status    :
     1682 *
     1683 * Author    : Jens Wiessner
     1684 *****************************************************************************/
     1685
     1686long int CDECL NTDLL_labs( long int j )
     1687{
     1688  dprintf(("NTDLL: labs(%08xh)\n", j));
     1689
     1690  return (labs(j));
     1691}
     1692
     1693
     1694/*****************************************************************************
     1695 * Name      :
     1696 * Purpose   :
     1697 * Parameters:
     1698 * Variables :
     1699 * Result    :
     1700 * Remark    : NTDLL.901
     1701 * Status    :
     1702 *
     1703 * Author    : Jens Wiessner
     1704 *****************************************************************************/
     1705
     1706double CDECL NTDLL_log( double x )
     1707{
     1708  dprintf(("NTDLL: log(%08xh)\n", x));
     1709  return (log(x));
     1710}
     1711
     1712
     1713/*****************************************************************************
     1714 * Name      :
     1715 * Purpose   :
     1716 * Parameters:
     1717 * Variables :
     1718 * Result    :
     1719 * Remark    : NTDLL.902
     1720 * Status    :
     1721 *
     1722 * Author    : Jens Wiessner
     1723 *****************************************************************************/
     1724
     1725size_t CDECL NTDLL_mbstowcs( wchar_t *pwcs, const char *s, size_t n )
     1726{
     1727      dprintf(("NTDLL: mbstowcs(%08xh, %08xh, %08xh)\n", pwcs, s, n));
     1728      return (mbstowcs(pwcs, s, n));
     1729}
     1730
     1731
     1732/*****************************************************************************
     1733 * Name      :
     1734 * Purpose   :
     1735 * Parameters:
     1736 * Variables :
     1737 * Result    :
     1738 * Remark    : NTDLL.903
     1739 * Status    :
     1740 *
     1741 * Author    : Jens Wiessner
     1742 *****************************************************************************/
     1743
     1744void * CDECL NTDLL_memchr( const void *s, int c, size_t n )
     1745{
     1746    dprintf(("NTDLL: memchr(%08xh, %08xh, %08xh)\n", s, c, n));
     1747    return memchr( s, c, n );
     1748}
     1749
     1750
     1751/*****************************************************************************
     1752 * Name      :
     1753 * Purpose   :
     1754 * Parameters:
     1755 * Variables :
     1756 * Result    :
     1757 * Remark    : NTDLL.904
     1758 * Status    :
     1759 *
     1760 * Author    : Jens Wiessner
     1761 *****************************************************************************/
     1762
     1763int CDECL NTDLL_memcmp( const void * c1, const void * c2, size_t n )
     1764{
     1765    dprintf(("NTDLL: memcmp(%08xh, %08xh, %08xh)\n", c1, c2, n));
     1766    return memcmp( c1, c2, n );
     1767}
     1768
     1769/*****************************************************************************
     1770 * Name      :
     1771 * Purpose   :
     1772 * Parameters:
     1773 * Variables :
     1774 * Result    :
     1775 * Remark    : NTDLL.905
     1776 * Status    :
     1777 *
     1778 * Author    : Jens Wiessner
     1779 *****************************************************************************/
     1780
     1781void * CDECL NTDLL_memcpy( void *s1, const void *s2, size_t n )
     1782{
     1783    dprintf(("NTDLL: memcpy(%08xh, %08xh, %08xh)\n", s1, s2, n));
     1784    return memcpy( s1, s2, n );
     1785}
     1786
     1787
     1788/*****************************************************************************
     1789 * Name      :
     1790 * Purpose   :
     1791 * Parameters:
     1792 * Variables :
     1793 * Result    :
     1794 * Remark    : NTDLL.907
     1795 * Status    :
     1796 *
     1797 * Author    : Jens Wiessner
     1798 *****************************************************************************/
     1799
     1800void * CDECL NTDLL_memset( void *s, int i, size_t n )
     1801{
     1802    dprintf(("NTDLL: memset(%08xh, %08xh, %08xh)\n", s, i, n));
     1803    return memset( s, i, n );
     1804}
     1805
     1806
     1807/*****************************************************************************
     1808 * Name      :
     1809 * Purpose   :
     1810 * Parameters:
     1811 * Variables :
     1812 * Result    :
     1813 * Remark    : NTDLL.908
     1814 * Status    :
     1815 *
     1816 * Author    : Jens Wiessner
     1817 *****************************************************************************/
     1818
     1819double CDECL NTDLL_pow( double x, double y )   
     1820{
     1821    dprintf(("NTDLL: pow(%08xh, %08xh)\n",x, y));
     1822    return pow( x, y );
     1823}
     1824
     1825
     1826/*****************************************************************************
     1827 * Name      :
     1828 * Purpose   :
     1829 * Parameters:
     1830 * Variables :
     1831 * Result    :
     1832 * Remark    : NTDLL.909
     1833 * Status    :
     1834 *
     1835 * Author    : Jens Wiessner
     1836 *****************************************************************************/
     1837
     1838void CDECL NTDLL_qsort( void *base, size_t nmemb, size_t size,
     1839                        int (*compar)( const void *s1, const void *s2 ))
     1840{
     1841    dprintf(("NTDLL: qsort(%08xh, %08xh, %08xh, %08xh)\n",
     1842                base, nmemb, size, compar));
     1843}
     1844
     1845
     1846/*****************************************************************************
     1847 * Name      :
     1848 * Purpose   :
     1849 * Parameters:
     1850 * Variables :
     1851 * Result    :
     1852 * Remark    : NTDLL.910
     1853 * Status    :
     1854 *
     1855 * Author    : Jens Wiessner
     1856 *****************************************************************************/
     1857
     1858double CDECL NTDLL_sin( double x )
     1859{
     1860  dprintf(("NTDLL: sin(%08xh)\n", x));
     1861  return (sin(x));
     1862}
     1863
     1864
     1865/*****************************************************************************
     1866 * Name      :
     1867 * Purpose   :
     1868 * Parameters:
     1869 * Variables :
     1870 * Result    :
     1871 * Remark    : NTDLL.912
     1872 * Status    :
     1873 *
     1874 * Author    : Jens Wiessner
     1875 *****************************************************************************/
     1876
     1877double CDECL NTDLL_sqrt( double x )
     1878{
     1879  dprintf(("NTDLL: sqrt(%08xh)\n", x));
     1880  return (sqrt(x));
     1881}
     1882
     1883
     1884
     1885/*****************************************************************************
     1886 * Name      :
     1887 * Purpose   :
     1888 * Parameters:
     1889 * Variables :
     1890 * Result    :
     1891 * Remark    : NTDLL.913
     1892 * Status    :
     1893 *
     1894 * Author    : Jens Wiessner
     1895 *****************************************************************************/
     1896
     1897int CDECL NTDLL_sscanf( const char *s, const char *format, ... )
     1898{
     1899  dprintf(("NTDLL: sscanf(%08xh, %08xh) not implemented.\n"));
     1900  return 0;
     1901}
     1902
     1903
     1904/*****************************************************************************
     1905 * Name      :
     1906 * Purpose   :
     1907 * Parameters:
     1908 * Variables :
     1909 * Result    :
     1910 * Remark    : NTDLL.933
     1911 * Status    :
     1912 *
     1913 * Author    : Jens Wiessner
     1914 *****************************************************************************/
     1915
     1916int CDECL NTDLL_vsprintf( char *s, const char *format, va_list arg )
     1917{
     1918  dprintf(("NTDLL: vsprintf(%08xh, %08xh)\n", s, format));
     1919  return (vsprintf(s, format, arg));
     1920}
     1921
     1922
     1923/*****************************************************************************
     1924 * Name      :
     1925 * Purpose   :
     1926 * Parameters:
     1927 * Variables :
     1928 * Result    :
     1929 * Remark    : NTDLL.947
     1930 * Status    :
     1931 *
     1932 * Author    : Jens Wiessner
     1933 *****************************************************************************/
     1934
     1935wchar_t * CDECL NTDLL_wcstok( wchar_t *s1, const wchar_t *s2, wchar_t **ptr )
     1936{
     1937  dprintf(("NTDLL: wcstok(%08xh, %08xh, %08xh)\n",s1,s2,ptr));
     1938  return (wcstok(s1, s2, ptr));
     1939}
     1940
     1941/*****************************************************************************
     1942 * Name      :
     1943 * Purpose   :
     1944 * Parameters:
     1945 * Variables :
     1946 * Result    :
     1947 * Remark    : NTDLL.948
     1948 * Status    :
     1949 *
     1950 * Author    : Jens Wiessner
     1951 *****************************************************************************/
     1952
     1953long int CDECL NTDLL_wcstol( const wchar_t *s1, wchar_t **s2, int i )
     1954{
     1955  dprintf(("NTDLL: wcstol(%08xh, %08xh, %08xh)\n",s1,s2,i));
     1956  return (wcstol(s1, s2, i));
     1957}
     1958
     1959
     1960/*****************************************************************************
     1961 * Name      :
     1962 * Purpose   :
     1963 * Parameters:
     1964 * Variables :
     1965 * Result    :
     1966 * Remark    : NTDLL.949
     1967 * Status    :
     1968 *
     1969 * Author    : Jens Wiessner
     1970 *****************************************************************************/
     1971
     1972size_t CDECL NTDLL_wcstombs( char *s, const wchar_t *pwcs, size_t n )
     1973{
     1974  dprintf(("NTDLL: wcstombs(%08xh, %08xh, %08xh)\n",s,pwcs,n));
     1975  return (wcstombs(s, pwcs, n));
     1976}
     1977
     1978
     1979/*****************************************************************************
     1980 * Name      :
     1981 * Purpose   :
     1982 * Parameters:
     1983 * Variables :
     1984 * Result    :
     1985 * Remark    : NTDLL.950
     1986 * Status    :
     1987 *
     1988 * Author    : Jens Wiessner
     1989 *****************************************************************************/
     1990
     1991unsigned long int CDECL NTDLL_wcstoul( const wchar_t *s1, wchar_t **s2, int i )
     1992{
     1993  dprintf(("NTDLL: wcstoul(%08xh, %08xh, %08xh)\n",s1,s2,i));
     1994  return (wcstoul(s1, s2, i));
     1995}
     1996
     1997
     1998/*****************************************************************************
     1999 * Name      :
     2000 * Purpose   :
     2001 * Parameters:
     2002 * Variables :
     2003 * Result    :
     2004 * Remark    : NTDLL.983
     2005 * Status    :
     2006 *
     2007 * Author    : Jens Wiessner
     2008 *****************************************************************************/
     2009
     2010int CDECL NTDLL__wtoi( const wchar_t *s )
     2011{
     2012  dprintf(("NTDLL: _wtoi(%08xh) not implemented.\n"));
     2013  return 0;
     2014}
     2015
     2016
     2017/*****************************************************************************
     2018 * Name      :
     2019 * Purpose   :
     2020 * Parameters:
     2021 * Variables :
     2022 * Result    :
     2023 * Remark    : NTDLL.984
     2024 * Status    :
     2025 *
     2026 * Author    : Jens Wiessner
     2027 *****************************************************************************/
     2028
     2029long int CDECL NTDLL__wtol( const wchar_t *s )
     2030{
     2031  dprintf(("NTDLL: _wtol(%08xh) not implemented.\n"));
     2032  return 0;
     2033}
Note: See TracChangeset for help on using the changeset viewer.