[pure-lang-svn] SF.net SVN: pure-lang:[506] pure/trunk/lib
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-08-15 08:12:24
|
Revision: 506 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=506&view=rev Author: agraef Date: 2008-08-15 08:12:33 +0000 (Fri, 15 Aug 2008) Log Message: ----------- Cosmetic changes. Modified Paths: -------------- pure/trunk/lib/primitives.pure pure/trunk/lib/system.pure Modified: pure/trunk/lib/primitives.pure =================================================================== --- pure/trunk/lib/primitives.pure 2008-08-15 07:48:07 UTC (rev 505) +++ pure/trunk/lib/primitives.pure 2008-08-15 08:12:33 UTC (rev 506) @@ -332,11 +332,11 @@ extern expr* bigint_pow(void*, int), double pow(double, double) = c_pow; pow x::int y::int = bigint_pow (bigint x) y if y>=0; -pow x::bigint y::bigint = bigint_pow x (int y) if y>=0; +pow x::bigint y::bigint = bigint_pow x y if y>=0; pow x::double y::double = c_pow x y if x>=0 || frac y==0.0; // mixed int/bigint -pow x::int y::bigint = bigint_pow (bigint x) (int y) if y>=0; +pow x::int y::bigint = bigint_pow (bigint x) y if y>=0; pow x::bigint y::int = bigint_pow x y if y>=0; // mixed double/int/bigint Modified: pure/trunk/lib/system.pure =================================================================== --- pure/trunk/lib/system.pure 2008-08-15 07:48:07 UTC (rev 505) +++ pure/trunk/lib/system.pure 2008-08-15 08:12:33 UTC (rev 506) @@ -103,7 +103,6 @@ extern int sleep(int); extern double pure_nanosleep(double) = nanosleep; -sleep t::bigint = sleep (int t); nanosleep t::int | nanosleep t::bigint = nanosleep (double t); /* Basic process operations: system executes a shell command, exit terminates @@ -195,12 +194,10 @@ do_fprintf fp (count,arg:args) (printf_format_spec t s) = count, args when res = case t, arg of - "d", x::int = pure_fprintf_int fp s x; - "d", x::bigint = pure_fprintf_int fp s (int x); + "d", x::int | "d", x::bigint = pure_fprintf_int fp s x; "g", x::double = pure_fprintf_double fp s x; "s", x::string = pure_fprintf_string fp s x; - "p", x::string = pure_fprintf_pointer fp s x; - "p", x::pointer = pure_fprintf_pointer fp s x; + "p", x::string | "p", x::pointer = pure_fprintf_pointer fp s x; _ = throw (printf_value_error s arg); end; count = if res>=0 then count+res else throw printf_error res; @@ -260,12 +257,10 @@ end; buf = check_buf (malloc size); res = case t, arg of - "d", x::int = pure_snprintf_int buf size s x; - "d", x::bigint = pure_snprintf_int buf size s (int x); + "d", x::int | "d", x::bigint = pure_snprintf_int buf size s x; "g", x::double = pure_snprintf_double buf size s x; "s", x::string = pure_snprintf_string buf size s x; - "p", x::string = pure_snprintf_pointer buf size s x; - "p", x::pointer = pure_snprintf_pointer buf size s x; + "p", x::string | "p", x::pointer = pure_snprintf_pointer buf size s x; _ = throw (printf_value_error s arg) when _ = free buf end; end; u = if res>=0 then u + cstring buf This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |