[MLton-commit] r6208

Vesa Karvonen vesak at mlton.org
Mon Nov 26 13:08:24 PST 2007


Also generate FFI for our utility lib.
----------------------------------------------------------------------

U   mltonlib/trunk/org/mlton/vesak/sdl/unstable/Generate-FFI.sh
A   mltonlib/trunk/org/mlton/vesak/sdl/unstable/detail/lib/
A   mltonlib/trunk/org/mlton/vesak/sdl/unstable/detail/lib/util.c
A   mltonlib/trunk/org/mlton/vesak/sdl/unstable/detail/lib/util.h

----------------------------------------------------------------------

Modified: mltonlib/trunk/org/mlton/vesak/sdl/unstable/Generate-FFI.sh
===================================================================
--- mltonlib/trunk/org/mlton/vesak/sdl/unstable/Generate-FFI.sh	2007-11-26 20:43:58 UTC (rev 6207)
+++ mltonlib/trunk/org/mlton/vesak/sdl/unstable/Generate-FFI.sh	2007-11-26 21:08:23 UTC (rev 6208)
@@ -44,7 +44,8 @@
 $SDL/SDL_timer.h
 $SDL/SDL_types.h
 $SDL/SDL_version.h
-$SDL/SDL_video.h"
+$SDL/SDL_video.h
+detail/lib/util.h"
 
 ##########################################################################
 # MLton Platform
@@ -57,10 +58,12 @@
 mkdir -p $outdir
 
 ##########################################################################
-# Generate ML-NLFFI
+# Generate FFI for MLton
 
+rm -rf $outdir/mlton
+mkdir -p $outdir/mlton
 mlnlffigen -linkage static                             \
-           -dir $outdir                                \
+           -dir $outdir/mlton                          \
            -cppopt "-include detail/config/$target.h"  \
            $headers
 

Added: mltonlib/trunk/org/mlton/vesak/sdl/unstable/detail/lib/util.c
===================================================================
--- mltonlib/trunk/org/mlton/vesak/sdl/unstable/detail/lib/util.c	2007-11-26 20:43:58 UTC (rev 6207)
+++ mltonlib/trunk/org/mlton/vesak/sdl/unstable/detail/lib/util.c	2007-11-26 21:08:23 UTC (rev 6208)
@@ -0,0 +1,21 @@
+/* Copyright (C) 2007 Vesa Karvonen
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ */
+
+#include "util.h"
+
+int SML_SDL_FillRect(SDL_Surface *dst,
+                     int x,
+                     int y,
+                     unsigned w,
+                     unsigned h,
+                     Uint32 color) {
+  SDL_Rect rect;
+  rect.x = x;
+  rect.y = y;
+  rect.w = w;
+  rect.h = h;
+  return SDL_FillRect(dst, &rect, color);
+}


Property changes on: mltonlib/trunk/org/mlton/vesak/sdl/unstable/detail/lib/util.c
___________________________________________________________________
Name: svn:eol-style
   + native

Added: mltonlib/trunk/org/mlton/vesak/sdl/unstable/detail/lib/util.h
===================================================================
--- mltonlib/trunk/org/mlton/vesak/sdl/unstable/detail/lib/util.h	2007-11-26 20:43:58 UTC (rev 6207)
+++ mltonlib/trunk/org/mlton/vesak/sdl/unstable/detail/lib/util.h	2007-11-26 21:08:23 UTC (rev 6208)
@@ -0,0 +1,15 @@
+#ifndef SML_SDL_LIB_UTIL_H
+#define SML_SDL_LIB_UTIL_H
+
+/* Copyright (C) 2007 Vesa Karvonen
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ */
+
+#include <SDL/SDL_video.h>
+
+int SML_SDL_FillRect(SDL_Surface *dst, int x, int y, unsigned w, unsigned h,
+                     Uint32 color);
+
+#endif


Property changes on: mltonlib/trunk/org/mlton/vesak/sdl/unstable/detail/lib/util.h
___________________________________________________________________
Name: svn:eol-style
   + native




More information about the MLton-commit mailing list