Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/runtime/c-libs/dl/dlerror.c
ViewVC logotype

Annotation of /sml/trunk/src/runtime/c-libs/dl/dlerror.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 772 - (view) (download) (as text)

1 : blume 772 /* dlerror.c
2 :     *
3 :     * COPYRIGHT (c) 2000 by Lucent Technologies, Bell Laboratories
4 :     */
5 :    
6 :     #include "ml-unixdep.h"
7 :     #include <dlfcn.h>
8 :     #include "ml-base.h"
9 :     #include "ml-values.h"
10 :     #include "ml-objects.h"
11 :     #include "ml-c.h"
12 :     #include "cfun-proto-list.h"
13 :    
14 :     /* _ml_P_Dynload_dlerror : unit -> string option
15 :     *
16 :     * Extract error after unsuccessful dlopen/dlsym/dlclose.
17 :     */
18 :     ml_val_t _ml_U_Dynload_dlerror (ml_state_t *msp, ml_val_t ml_handle)
19 :     {
20 :     char *e = dlerror ();
21 :     ml_val_t r, s;
22 :    
23 :     if (e == NULL)
24 :     r = OPTION_NONE;
25 :     else {
26 :     s = ML_CString (msp, e);
27 :     OPTION_SOME (msp, r, s);
28 :     }
29 :     return r;
30 :     }

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0