From 8509b82b188888cbc54bc1a442ff9727ab67e486 Mon Sep 17 00:00:00 2001 From: rslopes Date: Fri, 21 Mar 2003 18:21:35 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@806 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/compiler.c | 2 +- C/stdpreds.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/C/compiler.c b/C/compiler.c index 31c32cace..49c67cb76 100644 --- a/C/compiler.c +++ b/C/compiler.c @@ -2918,7 +2918,7 @@ Yap_cclause(Term inp_clause, int NOfArgs, int mod) f=fopen("PROFPREDS","a"); } if (f!=NULL) { - fprintf(f,"%x - %x - Pred(%d) - %s/%d\n",acode,PROFSIZE, CodeStart->rnd1, RepAtom(AtomOfTerm(MkAtomTerm((Atom) CodeStart->rnd1)))->StrOfAE, CodeStart->rnd2); + fprintf(f,"%x - %x - Pred(%ld) - %s/%d\n",acode,PROFSIZE, CodeStart->rnd1, RepAtom(AtomOfTerm(MkAtomTerm((Atom) CodeStart->rnd1)))->StrOfAE, CodeStart->rnd2); fclose(f); } } diff --git a/C/stdpreds.c b/C/stdpreds.c index 54bbb2446..ffbbacb3e 100644 --- a/C/stdpreds.c +++ b/C/stdpreds.c @@ -155,7 +155,7 @@ char nome[200]; f=fopen("PROFPREDS","r"); - if (f==NULL) return -1; + if (f==NULL) return (FALSE); i=fscanf(f,"%x - %x - Pred(%ld) - %s",&es,&ee,&p,nome); @@ -176,12 +176,12 @@ char nome[200]; fclose(f); end=(long *) malloc((e2-e1+1)*sizeof(long)); - if (end==NULL) { printf("Not enought mem to process results...\n"); return -1; } + if (end==NULL) { printf("Not enought mem to process results...\n"); return (FALSE); } memset(end,0, (e2-e1+1)*sizeof(long)); f=fopen("PROFILING","r"); - if (f==NULL) return -1; + if (f==NULL) return (FALSE); i=fscanf(f,"%x",&e); total=0; fora=0; @@ -198,7 +198,7 @@ char nome[200]; printf("Total count %ld (other code %ld)\n",total,fora); f=fopen("PROFPREDS","r"); - if (f==NULL) return -1; + if (f==NULL) return (FALSE); total2=0; do { @@ -214,6 +214,7 @@ char nome[200]; printf("Total counted %ld (other code %ld)\n",total2,total-total2); free(end); + return (TRUE); }