Changeset 2159 for trunk/src


Ignore:
Timestamp:
Dec 20, 1999, 12:47:20 PM (26 years ago)
Author:
sandervl
Message:

Added qsort, ftol, CIpow, ltoa, ultoa

Location:
trunk/src/NTDLL
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/NTDLL/arith64.asm

    r1654 r2159  
    1 ; $Id: arith64.asm,v 1.2 1999-11-09 09:54:46 phaller Exp $
     1; $Id: arith64.asm,v 1.3 1999-12-20 11:47:00 sandervl Exp $
    22
    33;/*
     
    666666
    667667; ----------------------------------------------------------------------------
     668
     669PUBLIC          _POP_FPU
     670_POP_FPU proc near
     671        mov     eax, [esp+4]
     672        fstp    qword ptr [eax]
     673        ret
     674_POP_FPU endp
     675
    668676CODE32          ENDS
    669677
  • trunk/src/NTDLL/crt.cpp

    r1955 r2159  
    1 /* $Id: crt.cpp,v 1.12 1999-12-03 11:56:26 sandervl Exp $ */
     1/* $Id: crt.cpp,v 1.13 1999-12-20 11:47:00 sandervl Exp $ */
    22
    33/*
     
    2323#include "ntdll.h"
    2424#include <heapstring.h>
     25#include "arith64.h"
    2526
    2627/*
     
    13101311 *****************************************************************************/
    13111312
    1312 LONG CDECL NTDLL__CIpow(double x, double y)
    1313 {
    1314   dprintf(("NTDLL: _CIpow\n"));
    1315   dprintf(("should be register function\n"));
    1316   return pow(x, y);
     1313LONG CDECL NTDLL__CIpow()
     1314{
     1315        double x,y;
     1316        POP_FPU(y);
     1317        POP_FPU(x);
     1318        return pow(x,y);
    13171319}
    13181320
     
    13321334LONG CDECL NTDLL__ftol(void)
    13331335{
    1334   dprintf(("NTDLL: _ftol not implemented.\n"));
    1335 
    1336   return 0;
     1336        /* don't just do DO_FPU("fistp",retval), because the rounding
     1337         * mode must also be set to "round towards zero"... */
     1338        double fl;
     1339        POP_FPU(fl);
     1340        return (LONG)fl;
    13371341}
    13381342
     
    13521356LPSTR  CDECL NTDLL__ltoa(long x,LPSTR buf,INT radix)
    13531357{
    1354   dprintf(("NTDLL: _ltoa(%08xh, %08xh, %08xh) not implemented\n",
    1355            x,
    1356            buf,
    1357            radix));
    1358 
    1359   return 0;
     1358    return ltoa(x,buf,radix);
    13601359}
    13611360
     
    16191618LPSTR  CDECL NTDLL__ultoa(long x,LPSTR buf,INT radix)
    16201619{
    1621   dprintf(("NTDLL: _ultoa(%08xh, %08xh, %08xh) not implemented\n",
    1622            x,
    1623            buf,
    1624            radix));
    1625 
    1626   return 0;
     1620    return ultoa(x,buf,radix);
    16271621}
    16281622
     
    18631857
    18641858
    1865 /*****************************************************************************
    1866  * Name      :
    1867  * Purpose   :
    1868  * Parameters:
    1869  * Variables :
    1870  * Result    :
    1871  * Remark    : NTDLL.909
    1872  * Status    :
    1873  *
    1874  * Author    : Jens Wiessner
    1875  *****************************************************************************/
    1876 
    1877 void CDECL NTDLL_qsort( void *base, size_t nmemb, size_t size,
    1878                         int (*compar)( const void *s1, const void *s2 ))
    1879 {
    1880     dprintf(("NTDLL: qsort(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
    1881                 base, nmemb, size, compar));
    1882 }
    1883 
    18841859
    18851860/*****************************************************************************
  • trunk/src/NTDLL/makefile

    r1895 r2159  
    1 # $Id: makefile,v 1.14 1999-11-30 19:42:09 sandervl Exp $
     1# $Id: makefile,v 1.15 1999-12-20 11:47:01 sandervl Exp $
    22
    33#
     
    3535       unknown.obj\
    3636       arith64.obj\
    37        regfunc.obj
     37       regfunc.obj qsort.obj
    3838
    3939
     
    9090regfunc.obj: .\regfunc.asm
    9191
     92qsort.obj: qsort.c
     93
    9294clean:
    9395        $(RM) *.obj *.lib *.dll *.map *.pch
  • trunk/src/NTDLL/ntdll.def

    r2134 r2159  
    1 ; $Id: ntdll.def,v 1.29 1999-12-19 12:25:55 sandervl Exp $
     1; $Id: ntdll.def,v 1.30 1999-12-20 11:47:01 sandervl Exp $
    22
    33;Created by BLAST for IBM's compiler
     
    335335    RtlConvertUlongToLargeInteger  = _RtlConvertUlongToLargeInteger@4   @320
    336336
     337    RtlDeleteCriticalSection       = _DeleteCriticalSection@4           @327
     338    RtlLeaveCriticalSection        = _LeaveCriticalSection@4            @426
     339    RtlEnterCriticalSection        = _EnterCriticalSection@4            @344
     340    RtlInitializeCriticalSection   = _InitializeCriticalSection@4       @406
     341
    337342; ------------------
    338343; Register Functions
     
    399404    memset                        = _NTDLL_memset                    @907
    400405    pow                           = _NTDLL_pow                       @908
    401     qsort                         = _NTDLL_qsort                     @909
     406    qsort                         = _qsort                           @909
    402407    sin                           = _NTDLL_sin                       @910
    403408    sprintf                       = _OS2sprintf                       @911
Note: See TracChangeset for help on using the changeset viewer.