Skip to content

Commit

Permalink
Removed printf stmnts
Browse files Browse the repository at this point in the history
  • Loading branch information
BartJongejan committed Feb 14, 2015
1 parent 5fb695a commit 541990f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
13 changes: 8 additions & 5 deletions src/affixtrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2531,7 +2531,7 @@ static void rearrange
{
if(buf[i] == '\n')
{
printf("\n");
//printf("\n");
size[n] += sizeof(int) + sizeof(int); // room for index and '\0' byte
size[n] >>= 2;
size[n] <<= 2; // rounded to nearest word boundary
Expand All @@ -2552,7 +2552,7 @@ static void rearrange
else if(doind)
{// read nesting level
ind[n] *= 10;
printf("%c",buf[i]);
//printf("%c",buf[i]);
ind[n] += buf[i] - '0';
}
else
Expand Down Expand Up @@ -3336,15 +3336,17 @@ void computeParms(const char * fname/* input */,const char * extra,const char *
{
brownNo = Nnodes;
brownweight = weight;
printf("swath %d brownNo %d currentNo %d\n",swath,brownNo,currentNo);
if (VERBOSE)
printf("swath %d brownNo %d currentNo %d\n", swath, brownNo, currentNo);
if( (!doweights && brownNo <= currentNo)
|| ( doweights && brownweight <= currentweight)
)
{
bool improvement =
(!doweights && (brownNo < currentNo))
|| ( doweights && (brownweight < currentweight));
printf("%s\n",improvement ? "IMPROVEMENT" : "same");
if (VERBOSE)
printf("%s\n", improvement ? "IMPROVEMENT" : "same");
currentNo = brownNo;
currentweight = brownweight;
betterfound(currentNo,currentweight,swath,iterations,besttxt,parmstxt,blobs,lines,fraction,fraclines,suffixonly,doweights,improvement);
Expand All @@ -3355,7 +3357,8 @@ void computeParms(const char * fname/* input */,const char * extra,const char *
//onlyZeros(parmstxt);
}
}
printf("br1 %d br2 %d\n",br1,br2);
if (VERBOSE)
printf("br1 %d br2 %d\n", br1, br2);
}
}
remove(fbuf);
Expand Down
6 changes: 3 additions & 3 deletions src/flexcombi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1152,13 +1152,13 @@ bool flexcombi(const char * bestflexrules, const char * nextbestflexrules, const
if (TreeNode)
{
printf("\nTree:\n");
TreeNode->print(0);
//TreeNode->print(0);
treenode * NextTreeNode = treenodeFactory(NextFileBuffer.buf, NextFileBuffer.buf + NextFileBuffer.Length);
printf("\nNext Tree:\n");
NextTreeNode->print(0);
//NextTreeNode->print(0);
TreeNode->merge(NextTreeNode);
printf("\nCombined Tree:\n");
TreeNode->print(0);
//TreeNode->print(0);
int length = TreeNode->copy(arr, 0);
*(int*)arr = 0;
for(int i = 0;i < length;++i)
Expand Down
10 changes: 5 additions & 5 deletions src/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ strng * protect(strng * p)
while((pq = strpbrk(txt,"\\\"")) != NULL)
{
strng stxt(txt,pq - txt);
printf("stxt %s pq %s\n",stxt.itsTxt(),pq);
//printf("stxt %s pq %s\n",stxt.itsTxt(),pq);
if(*pq == '\\')
ret->cat(&stxt,&slash,(const strng *)0);
else
Expand Down Expand Up @@ -1498,7 +1498,7 @@ int printRules(node * nd
#if BRACMATOUTPUT
snode = makeNode(patreps,nr,pat,rep,L,R,&nLL,&nRR);
fprintf(fobra,"(");
printf("(");
//printf("(");
#else
makeNode(patreps,pat,rep,L,R,&nLL,&nRR);
#endif
Expand Down Expand Up @@ -1549,14 +1549,14 @@ int printRules(node * nd
#endif
#if BRACMATOUTPUT
fprintf(fobra,"%s\n",snode->itsTxt());
printf("%s\n",snode->itsTxt());
//printf("%s\n",snode->itsTxt());
delete snode;
#endif
if(nd->IfPatternSucceeds)
{
#if BRACMATOUTPUT
fprintf(fobra,",");
printf(",");
//printf(",");
#endif
strng nL(L);
strng nR(nRR);
Expand All @@ -1578,7 +1578,7 @@ int printRules(node * nd
);
#if BRACMATOUTPUT
fprintf(fobra,")\n");
printf(")\n");
//printf(")\n");
#endif
}
delete nLL;
Expand Down

0 comments on commit 541990f

Please sign in to comment.