guile-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile/guile-core/libguile ChangeLog numbers.h v...


From: Mikael Djurfeldt
Subject: guile/guile-core/libguile ChangeLog numbers.h v...
Date: Sun, 23 Sep 2001 17:25:26 -0400

CVSROOT:        /cvs
Module name:    guile
Changes by:     Mikael Djurfeldt <address@hidden>       01/09/23 17:25:26

Modified files:
        guile-core/libguile: ChangeLog numbers.h validate.h 

Log message:
        * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
        SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
        macros. (The NUM names might soon change.)
        
        * numbers.h: Added missing declarations.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/ChangeLog.diff?cvsroot=OldCVS&tr1=1.1515&tr2=1.1516&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/numbers.h.diff?cvsroot=OldCVS&tr1=1.56&tr2=1.57&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/validate.h.diff?cvsroot=OldCVS&tr1=1.36&tr2=1.37&r1=text&r2=text

Patches:
Index: guile/guile-core/libguile/ChangeLog
diff -u guile/guile-core/libguile/ChangeLog:1.1515 
guile/guile-core/libguile/ChangeLog:1.1516
--- guile/guile-core/libguile/ChangeLog:1.1515  Sat Sep 22 17:39:42 2001
+++ guile/guile-core/libguile/ChangeLog Sun Sep 23 17:25:26 2001
@@ -1,3 +1,11 @@
+2001-09-23  Mikael Djurfeldt  <address@hidden>
+
+       * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
+       SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
+       macros. (The NUM names might soon change.)
+
+       * numbers.h: Added missing declarations.
+
 2001-09-22  Mikael Djurfeldt  <address@hidden>
 
        * Makefile.am: Distribute num2float.i.c.
Index: guile/guile-core/libguile/numbers.h
diff -u guile/guile-core/libguile/numbers.h:1.56 
guile/guile-core/libguile/numbers.h:1.57
--- guile/guile-core/libguile/numbers.h:1.56    Fri Aug 31 08:13:50 2001
+++ guile/guile-core/libguile/numbers.h Sun Sep 23 17:25:26 2001
@@ -325,8 +325,15 @@
 extern long long scm_num2long_long (SCM num, unsigned long int pos,
                                     const char *s_caller);
 extern unsigned long long scm_num2ulong_long (SCM num, unsigned long int pos,
-                                     const char *s_caller);
+                                             const char *s_caller);
 #endif
+
+extern SCM scm_float2num (float n);
+extern SCM scm_double2num (double n);
+extern float scm_num2float (SCM num, unsigned long int pos,
+                           const char *s_caller);
+extern double scm_num2double (SCM num, unsigned long int pos,
+                             const char *s_caller);
 
 extern void scm_init_numbers (void);
 
Index: guile/guile-core/libguile/validate.h
diff -u guile/guile-core/libguile/validate.h:1.36 
guile/guile-core/libguile/validate.h:1.37
--- guile/guile-core/libguile/validate.h:1.36   Fri Aug 31 07:17:06 2001
+++ guile/guile-core/libguile/validate.h        Sun Sep 23 17:25:26 2001
@@ -116,6 +116,12 @@
 #define SCM_NUM2ULONG_LONG_DEF(pos, arg, def) \
   (SCM_UNBNDP (arg) ? def : scm_num2ulong_long (arg, pos, FUNC_NAME))
 
+#define SCM_NUM2FLOAT(pos, arg) \
+  (scm_num2float (arg, pos, FUNC_NAME))
+
+#define SCM_NUM2DOUBLE(pos, arg) \
+  (scm_num2double (arg, pos, FUNC_NAME))
+
 #define SCM_OUT_OF_RANGE(pos, arg) \
   do { scm_out_of_range_pos (FUNC_NAME, arg, SCM_MAKINUM (pos)); } while (0)
 
@@ -230,6 +236,16 @@
 #define SCM_VALIDATE_LONG_COPY(pos, k, cvar) \
   do { \
     cvar = SCM_NUM2LONG (pos, k); \
+  } while (0)
+
+#define SCM_VALIDATE_FLOAT_COPY(pos, k, cvar) \
+  do { \
+    cvar = SCM_NUM2FLOAT (pos, k); \
+  } while (0)
+
+#define SCM_VALIDATE_DOUBLE_COPY(pos, k, cvar) \
+  do { \
+    cvar = SCM_NUM2DOUBLE (pos, k); \
   } while (0)
 
 #define SCM_VALIDATE_BIGINT(pos, k) SCM_MAKE_VALIDATE (pos, k, BIGP)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]