summaryrefslogtreecommitdiffstats
path: root/maccaml/lib.c
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>1998-10-02 13:02:32 +0000
committerDamien Doligez <damien.doligez-inria.fr>1998-10-02 13:02:32 +0000
commit1785aa4ef9afce6807d5d810687b376620618cf9 (patch)
treee11f59bd40aa82a9cff2f63de8ee9e9e27a619be /maccaml/lib.c
parent89074600b8f8425a829f253a27580b5548fd8193 (diff)
portage MacOS standalone: T=0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2111 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'maccaml/lib.c')
-rw-r--r--maccaml/lib.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/maccaml/lib.c b/maccaml/lib.c
new file mode 100644
index 000000000..e5f71ffd3
--- /dev/null
+++ b/maccaml/lib.c
@@ -0,0 +1,33 @@
+/***********************************************************************/
+/* */
+/* Objective Caml */
+/* */
+/* Damien Doligez, projet Para, INRIA Rocquencourt */
+/* */
+/* Copyright 1998 Institut National de Recherche en Informatique et */
+/* en Automatique. Distributed only by permission. */
+/* */
+/***********************************************************************/
+
+/* $Id$ */
+
+#include "main.h"
+
+/* These are declared in TextUtils.h but not implemented in Apple's
+ libraries ?!
+*/
+
+void CopyPascalStringToC (ConstStr255Param src, char *dst)
+{
+ strncpy (dst, (char *) src + 1, src[0]);
+ dst [src[0]] = '\000';
+}
+
+void CopyCStringToPascal (const char *src, Str255 dst)
+{
+ int l = strlen (src);
+
+ l = l > 255 ? 255 : l;
+ dst [0] = l;
+ strncpy ((char *) dst + 1, src, l);
+}