X-Git-Url: http://git.harvie.cz/?p=svn%2FCll1h%2F.git;a=blobdiff_plain;f=demos%2Flocale.c;fp=demos%2Flocale.c;h=0f7d5af4a19853d0c2cd10a916f3da1797f62742;hp=c170c137b5ed8cd54a01684c93cf902a56a4aa5e;hb=49df11dfb79a408ff31ebadd42c16cd5d71d6a7f;hpb=99cd47b15d13ea0126dab46bcbec912a2f920f24 diff --git a/demos/locale.c b/demos/locale.c index c170c13..0f7d5af 100644 --- a/demos/locale.c +++ b/demos/locale.c @@ -4,7 +4,7 @@ program { str a,b; time_t t = time(NULL); - int f; + file f; str filename = "blabla.txt"; print("Local language (enviroment) is set to:", LANG); @@ -16,12 +16,12 @@ program printf("eq(\"%s\",\"%s\") = %s\n",a,a,btoa(eq(a,a))); printf("eqi(\"%s\",\"%s\") = %s\n",a,b,btoa(eqi(a,b))); printf("PI will be displayed as: %f\n",PI); - print("Time will be displayed as: ", ctime(&t)); + echo("Time will be displayed as: ", ctime(&t)); print("Error mesages will be displayed as: "); - f = open(filename,"r"); - if(f<0) + f = fopen(filename,"r"); + if(not f) { errstr = filename; - fail(SYSTEM_FAILURE); + _SYSFAIL(SYSTEM_FAILURE); } }