Implement EngSort()
authorGé van Geldorp <ge@gse.nl>
Sat, 12 Jul 2003 12:45:29 +0000 (12:45 +0000)
committerGé van Geldorp <ge@gse.nl>
Sat, 12 Jul 2003 12:45:29 +0000 (12:45 +0000)
svn path=/trunk/; revision=5098

reactos/include/ddk/winddi.h
reactos/subsys/win32k/eng/sort.c [new file with mode: 0644]
reactos/subsys/win32k/makefile
reactos/subsys/win32k/stubs/stubs.c
reactos/subsys/win32k/win32k.def
reactos/subsys/win32k/win32k.edf

index 691e4c2..4525a43 100644 (file)
@@ -1248,7 +1248,14 @@ EngSetLastError
 EngSetPointerShape
 EngSetPointerTag
 EngSetPrinterData
-EngSort
+*/
+
+typedef int CDECL (*SORTCOMP)(const void *Elem1, const void *Elem2);
+
+void STDCALL
+EngSort(IN OUT PBYTE Buf, IN ULONG ElemSize, IN ULONG ElemCount, IN SORTCOMP CompFunc);
+
+/*
 EngStretchBlt
 EngStrokeAndFillPath
 EngStrokePath
diff --git a/reactos/subsys/win32k/eng/sort.c b/reactos/subsys/win32k/eng/sort.c
new file mode 100644 (file)
index 0000000..fd1f2bb
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ *  ReactOS W32 Subsystem
+ *  Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/* $Id: sort.c,v 1.1 2003/07/12 12:45:29 gvg Exp $ */
+
+#include <stdlib.h>
+#include <ddk/winddi.h>
+
+/*
+ * @implemented
+ */
+void STDCALL
+EngSort(IN OUT PBYTE Buf, IN ULONG ElemSize, IN ULONG ElemCount, IN SORTCOMP CompFunc)
+{
+  qsort(Buf, ElemSize, ElemCount, CompFunc);
+}
+
+/* EOF */
index ff296d6..440f2af 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.68 2003/06/21 18:06:11 ekohl Exp $
+# $Id: makefile,v 1.69 2003/07/12 12:45:29 gvg Exp $
 
 PATH_TO_TOP = ../..
 
@@ -31,12 +31,13 @@ TARGET_CFLAGS =\
 
 TARGET_LFLAGS =\
  $(PATH_TO_TOP)/dk/nkm/lib/freetype.a \
+ $(PATH_TO_TOP)/dk/w32/lib/rosrtl.a \
  --disable-stdcall-fixup
 
 ENG_OBJECTS= eng/debug.o eng/mem.o eng/brush.o eng/bitblt.o eng/clip.o \
     eng/copybits.o eng/device.o eng/handle.o eng/lineto.o eng/paint.o \
     eng/palette.o eng/perfcnt.o eng/surface.o eng/xlate.o eng/transblt.o \
-    eng/mouse.o eng/misc.o eng/nls.o
+    eng/mouse.o eng/misc.o eng/nls.o eng/sort.o
 
 MAIN_OBJECTS = main/dllmain.o main/svctabm.o
 
index fb34177..17d2d6f 100644 (file)
@@ -58,7 +58,6 @@ STUB(EngSetLastError)
 STUB(EngSetPointerShape)
 STUB(EngSetPointerTag)
 STUB(EngSetPrinterData)
-STUB(EngSort)
 STUB(EngStretchBlt)
 STUB(EngStrokeAndFillPath)
 STUB(EngStrokePath)
index ca25157..42abf86 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: win32k.def,v 1.17 2003/06/21 18:06:11 ekohl Exp $
+; $Id: win32k.def,v 1.18 2003/07/12 12:45:29 gvg Exp $
 ;
 ; win32k.def
 ;
@@ -92,7 +92,7 @@ EngSetLastError
 EngSetPointerShape
 EngSetPointerTag
 EngSetPrinterData
-EngSort
+EngSort@16
 EngStretchBlt
 EngStrokeAndFillPath
 EngStrokePath
index b02aa03..91628cc 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: win32k.edf,v 1.11 2003/06/21 18:06:11 ekohl Exp $
+; $Id: win32k.edf,v 1.12 2003/07/12 12:45:29 gvg Exp $
 ;
 ; win32k.def
 ;
@@ -92,7 +92,7 @@ EngSetLastError
 EngSetPointerShape
 EngSetPointerTag
 EngSetPrinterData
-EngSort
+EngSort=EngSort@16
 EngStretchBlt
 EngStrokeAndFillPath
 EngStrokePath