Skip to content
Snippets Groups Projects
Commit 283eea2d authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

sort array now uses sort()

Rev: lib/simulate.lpc:1.15
parent b43f5f51
Branches
Tags postgres/1.0.2/0.5
No related merge requests found
...@@ -274,7 +274,13 @@ varargs mixed *sort_array(array foo,function cmp, mixed ... args) ...@@ -274,7 +274,13 @@ varargs mixed *sort_array(array foo,function cmp, mixed ... args)
int length; int length;
int foop, fooend, barp, barend; int foop, fooend, barp, barend;
if(!cmp) cmp=`>; if(!cmp || cmp==`>)
{
foo+=({});
sort(foo);
return foo;
}
length=sizeof(foo); length=sizeof(foo);
foo+=({}); foo+=({});
...@@ -379,7 +385,7 @@ void create() ...@@ -379,7 +385,7 @@ void create()
add_efun("sum_arrays",sum_arrays); add_efun("sum_arrays",sum_arrays);
add_efun("system",system); add_efun("system",system);
add_efun("this_function",this_function); add_efun("this_function",this_function);
add_efun("version",lambda() { return "uLPC v1.0E-8"; }); add_efun("version",lambda() { return "uLPC v1.0E-7"; });
add_efun("write_file",write_file); add_efun("write_file",write_file);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment