TempleOSCD_140715.ISO
This commit is contained in:
1 parent
7ef616a20e
commit
64f679eeb9
1095 files changed
+24814
-221011
No files matched your search
@@ -14,7 +14,7 @@ U0 F64FileGenTXT(U8 *filename,I64 n)
|
||||
F64FileGenTXT("/Demo/SortFileExample/UnsortedF64.TXT.Z",10);
|
||||
|
||||
U0 F64FileGenDAT(U8 *filename,I64 n)
|
||||
{//$LK,"File/Program Routines/CFile",A="HI:File/Program Routines/CFile"$, $LK,"::/Demo/Dsk/DataBase.CPP"$
|
||||
{//$LK,"File/CFile",A="HI:File/CFile"$, $LK,"::/Demo/Dsk/DataBase.CPP"$
|
||||
I64 i;
|
||||
F64 *a=MAlloc(n*sizeof(F64));
|
||||
for (i=0;i<n;i++)
|
||||
|
||||
@@ -16,7 +16,7 @@ U0 F64FileSortTXT(U8 *in_name,U8 *out_name)
|
||||
|
||||
//Pass1: Count the number of F64s.
|
||||
n=0;
|
||||
lx=LexNew(MPrint("#include \"%s\"",in_name));
|
||||
lx=LexNew(MStrPrint("#include \"%s\"",in_name));
|
||||
while (Lex(lx))
|
||||
if (lx->token==TK_F64)
|
||||
n++;
|
||||
@@ -26,7 +26,7 @@ U0 F64FileSortTXT(U8 *in_name,U8 *out_name)
|
||||
|
||||
//Pass2: Read F64s.
|
||||
i=0;
|
||||
lx=LexNew(MPrint("#include \"%s\"",in_name));
|
||||
lx=LexNew(MStrPrint("#include \"%s\"",in_name));
|
||||
while (Lex(lx))
|
||||
if (lx->token==TK_F64)
|
||||
a[i++]=lx->cur_f64;
|
||||
@@ -49,7 +49,7 @@ Type("/Demo/SortFileExample/UnsortedF64.TXT.Z");
|
||||
Type("/Demo/SortFileExample/SortedF64.TXT.Z");
|
||||
|
||||
U0 F64FileSortDAT(U8 *in_name,U8 *out_name)
|
||||
{//$LK,"File/Program Routines/CFile",A="HI:File/Program Routines/CFile"$, $LK,"::/Demo/Dsk/DataBase.CPP"$
|
||||
{//$LK,"File/CFile",A="HI:File/CFile"$, $LK,"::/Demo/Dsk/DataBase.CPP"$
|
||||
I64 size;
|
||||
F64 *a=FileRead(in_name,&size);
|
||||
QSortI64(a,size/sizeof(F64),&Compare); //Sort 64-bit sized values
|
||||
@@ -59,7 +59,7 @@ U0 F64FileSortDAT(U8 *in_name,U8 *out_name)
|
||||
F64FileSortDAT("/Demo/SortFileExample/UnsortedF64.DAT.Z","/Demo/SortFileExample/SortedF64.DAT.Z");
|
||||
|
||||
U0 F64FileDumpDAT(U8 *in_name)
|
||||
{//$LK,"File/Program Routines/CFile",A="HI:File/Program Routines/CFile"$, $LK,"::/Demo/Dsk/DataBase.CPP"$
|
||||
{//$LK,"File/CFile",A="HI:File/CFile"$, $LK,"::/Demo/Dsk/DataBase.CPP"$
|
||||
I64 i,n,size;
|
||||
F64 *a=FileRead(in_name,&size);
|
||||
n=size/sizeof(F64);
|
||||
|
||||
Binary file not shown.
@@ -1,11 +1,11 @@
|
||||
//This is sorted.
|
||||
0.098806
|
||||
0.110989
|
||||
0.116332
|
||||
0.210938
|
||||
0.228724
|
||||
0.316528
|
||||
0.474631
|
||||
0.830658
|
||||
0.882384
|
||||
0.982264
|
||||
0.111769
|
||||
0.169010
|
||||
0.171046
|
||||
0.247664
|
||||
0.308198
|
||||
0.335631
|
||||
0.473049
|
||||
0.704792
|
||||
0.887694
|
||||
0.982955
|
||||
Binary file not shown.
@@ -1,11 +1,11 @@
|
||||
//This is unsorted.
|
||||
0.830658
|
||||
0.228724
|
||||
0.474631
|
||||
0.982264
|
||||
0.098806
|
||||
0.316528
|
||||
0.882384
|
||||
0.110989
|
||||
0.210938
|
||||
0.116332
|
||||
0.473049
|
||||
0.704792
|
||||
0.335631
|
||||
0.247664
|
||||
0.887694
|
||||
0.169010
|
||||
0.982955
|
||||
0.308198
|
||||
0.111769
|
||||
0.171046
|
||||
Reference in new issue
Block a user