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/smlnj-ccalls/cutil.c
ViewVC logotype

Annotation of /sml/trunk/src/runtime/c-libs/smlnj-ccalls/cutil.c

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : monnier 2 /* cutil.c
2 :     *
3 :     * COPYRIGHT (c) 1995 by AT&T Bell Laboratories.
4 :     *
5 :     * Some useful user-level C functions.
6 :     * Declared and registered on the C side by cutil-cfuns.h
7 :     */
8 :    
9 :     char *ptos(void *p)
10 :     {
11 :     #ifdef DEBUG_C_CALLS
12 :     printf("in ptos with string \"%s\"",(char *)p);
13 :     #endif
14 :     return (char *) p;
15 :     }
16 :    
17 :     int ptoi(int *p)
18 :     {
19 :     int i;
20 :    
21 :     /* p may not be pointing to an aligned int, hence the memcpy */
22 :     memcpy (&i, p, sizeof(int));
23 :     return i;
24 :     }
25 :    
26 :    
27 :     /* end of cutil.c */

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